<{^_^}>
#59344 (by deliciouslytyped, 6 days ago, open): Proposal: Engineering a Common "Plugin" Infrastructure
<pie__>
re, the platformio stuff
<joepie91>
pie__: ohai
<joepie91>
only moderately around-ish today
<pie__>
its okay, probaböy the same for me
<joepie91>
:)
<pie__>
preliminaries: i have no idea what im doing,
<pie__>
now that thats out of the way, :P
<pie__>
nix generally overall doesnt like runtime packages right?
<pie__>
i mean, it doesnt fit into th emodel
<joepie91>
what do you mean with 'runtime packages' exactly?
<pie__>
- and what people end up doing is try to move that to some sort of "pre-" stage to make it managed by nix (wow im really bad at talking about this stuff)
<pie__>
joepie91, well, you said platformio downloads stuff ..."later"
<pie__>
and that it orchestrates several other tools
<joepie91>
oh, you mean runtime packages as in applications having their own package management that pulls in additional stuff at runtime?
<pie__>
yeah i guess
<joepie91>
right
<joepie91>
so yes, Nix doesn't like that, sort of - due to a combination of factors
<joepie91>
1) Nix generally does not like mutation outside of its controlled environment, as that means that, well, it cannot control it
<joepie91>
2) runtime package management generally involves semi-statically precompiled binaries, which require a patching step, but there is no hook to do that in most applications where eg. patchelf or Nix could come in
<joepie91>
(so in practice, all this shit is just dumped into an FHS root)
<pie__>
makes sense
<joepie91>
3) there is generally no way to bidirectionally interact between Nix and third-party applications in any performant/ergonomic manner
<joepie91>
you see the exact same problem with KDE configuration thingems and whatnot
<joepie91>
which just write shit to ~ and consequently that isn't managed by Nix
<joepie91>
and you *could* pre-generate KDE desktop configuration from a Nix config, but that would make the configuration immutable, so it breaks all interactive config tools
<joepie91>
that's basically just a variation on the same problem as plugin handling, with slightly different failure parameters
<pie__>
this is something ive had in the back of my mind for a while, re: firefox <joepie91> and you *could* pre-generate KDE desktop configuration from a Nix config, but that would make the configuration immutable, so it breaks all interactive config tools
<joepie91>
to put it bluntly: Nix and application management interactivity do not currently go together, at all, in any way
<joepie91>
yeah, Firefox is the same
<joepie91>
for both extensions and config flags :)
<pie__>
yeah. firefox does iirc have some config setting variant that would behave reasonably with immutability IIRC - this falls under yes there is application support
<joepie91>
pie__: I've been idly pondering about this for a while, whether maybe we (as in, the Nix community) should champion a standardized mechanism for applications to provide configuration/extension hooks, that could be used in Nix but also outside of that (since most applications are unlikely to want to specifically add Nix support)
<joepie91>
so that eg. an interactive config applet in KDE could call a custom hook that applies the change to a Nix-managed configuration
<pie__>
yes i think i might have poked people sbout thst
<pie__>
im open to opening another discussion issue or something else if you have a better idea than github issues
<pie__>
yeah, idk if ive talked to you about my ideas that mabe some sort of imperstive-config-to-nix-config-write-back might not be an utterly horrible idea
<joepie91>
I have no idea, frankly. this feels like a significant standardization effort to me - not one that I'm unwilling to engage on, but certainly one that's going to require more than a few people, and active communication with software vendors
<pie__>
brb
<joepie91>
it feels more like a thing that warrants a working group, than a thing that warrants a github issue :)
<pie__>
yeah but how do i get a WG
<joepie91>
good question!
<joepie91>
btw, config parsing is *an* option, but it
<joepie91>
oops
<joepie91>
btw, config parsing is *an* option, but it'll involve a bunch of fragility *
<joepie91>
it might be the best short-term option we have, though
<joepie91>
re: how to start a WG... I have approximately no experience with that on a personal level, maybe some other people here have more input on that
pie_ has joined #nixos-chat
<joepie91>
(aside: I can't personally commit to championing a WG, as I already have a lot of spinning plates and it'd get time-starved.... I'm certainly willing to contribute to it otherwise though)
<joepie91>
(my main specializations being ergonomic API/abstraction design, and parsing - those are probably the things where I can do the most high-impact work)
pie__ has quit [Ping timeout: 245 seconds]
<infinisil>
There's the problem of pretty much everybody in the nix community only using their free time for development, which makes it hard to do more focused work
<joepie91>
'development' in what sense?
<infinisil>
Nixpkgs development, pr's and such
<joepie91>
right
<pie_>
not sure why i dc-d there
<joepie91>
pie_: see logs to ensure you didn't miss anything :)
<pie_>
did i miss anything between <joepie91> (aside: I can't personally commit to championing a WG, as I already have a lot of spinning plates and it'd get time-starved.... I'm certainly willing to contribute to it otherwise though)<pie__> yeah but how do i get a WG
<pie_>
oh right logs
<pie_>
im so bad at this :p
<joepie91>
looks like your internet spazzed out
<joepie91>
infinisil: but yeah, I share that observation
<pie_>
joepie91, didnt know thats your specialization, im generallyinterested in that. esp if you have any reading materials you can recommend
<joepie91>
pie_: no specific reading materials unfortunately, product of years of experience :)
<joepie91>
happy to answer any specific questions though
<pie_>
damn :P
<pie_>
hard to ask questions with an empty head
<joepie91>
(I'm actually working on both of those things right now, building an ergonomic API over parsed CLI output...)
<joepie91>
pie_: offer stands in general btw, feel free to ask questions about it at some point in the future, provided that I'm around :P
<pie_>
i figured, thanks ^.^
<joepie91>
pie_: on the workgroups thing... I think that if we want to do long-term work on a generic hook API, a Nix workgroup may not be the ideal form
<joepie91>
as at that point, you have to work with a lot of different parties who don't necessarily care about Nix
<pie_>
joepie91, my problem is im not qualified to chairing a WG. so it will probably be much ado about nothing, but probably better than nothing
<joepie91>
and you probably want to very explicitly design a specification that's independent from Nix
<pie_>
oh yeah, on that level...
<sphalerite>
infinisil: not really true, almost all my work on the release was on Mayflower time, the sysadmins here manage our systems with nix and do a bunch of upstreaming, and I believe various Tweag people like gchristensen and eelco himself get paid for a decent amount of nix time
<pie_>
for starters id be happy if we could come up with aparadigm that even seems feasible
<joepie91>
in terms of a short-term solution for config parsing though, a nix WG seems fine
<joepie91>
right
<sphalerite>
infinisil: I think ckauhaus's work is also not on his free time
<joepie91>
sphalerite: I think the comment was not so much about 'free time', as it was about 'developing stuff' (as opposed to high-level design)
<infinisil>
sphalerite: Oh nice, I didn't know about it being this many people
<joepie91>
unless I misunderstood :)
<pie_>
joepie91, well, maybe ill try to register #nixos-wg-*wg name* or something later today
<pie_>
what would be a decent wg name
<joepie91>
pie_: so perhaps, the way to go would be to start as a Nix WG working on direct integration of existing config systems via configuration parsing and such, building up a 'model' for it in the process, and then in the long term spinning off that WG as a stand-alone effort interacting with third-party projects and vendors to standardize a Nix-independent way to allow configuration/extension hooks with first-class support in applications
<joepie91>
using the former as a testbed for the latter
<pie_>
well, i guess one would need something approximating a mission statement first (i.e. what are we working towards)
<pie_>
my knee-jerk was userspace config or something, but that might be too specific
<joepie91>
right, naturally - but as a general idea :)
<pie_>
hold on, reading
<joepie91>
'application integration' may be a better description?
<joepie91>
that is, integration between Nix and other things
<pie_>
sounds reasonable
<joepie91>
bonus: we get to make AI jokes
<joepie91>
:)
<pie_>
yeah? :P
<pie_>
oh lol
<pie_>
flew over my head
<joepie91>
hehehe
<pie_>
ok i probably have to get back to work in a bit, do you have any advice on how to go about the plugin system issue
<pie_>
(got really sidetracked here ;) )
<joepie91>
one moment
* joepie91
digs in his nixrc repo
<pie_>
and by that i mean is a github issue an ok thing for that
<pie_>
ill have to get back to you on this platformio stuff later
<jasongrossman>
There's also a discord discussion about it.
<joepie91>
pie_: I think that in terms of normalizing the current implementation of plugin stuff, a github issue is fine for the time being
<pie_>
meh, kids these days :P discord and discourse
<joepie91>
pie_: possibly something to move into the WG later though
<jasongrossman>
Oh, no, I'm wrong about discord and discourse :-)
<joepie91>
I believe this was the only way to get mods to work for it
<pie_>
joepie91, side-comment: MOAR HOMOGENEOUS ERGONOMIC APIS FOR NIXPKGS :P
<joepie91>
by literally just unpacking all the provided mod zips into the outdir
<jasongrossman>
BTW, gnome-settings is this sort of mechanism, that external programs can use. I'm not at all confident that it's stable though - wish I knew that.
<sphalerite>
pie_: do you hate diversity??
<jasongrossman>
(Or do I mean gconf? One reason I'm not sure that it's stable is that they've changed the name at least once.)
<infinisil>
pie_: A good strategy might be to first examine as many programs as possible, looking at how they do plugins, and group them into categories
<joepie91>
jasongrossman: afaik all that stuff is basically undocumented, and it's hardly a vendor-neutral spec :)
<joepie91>
I cursorily looked into it a year ago or so
<jasongrossman>
Good example of how not to do the details, then. Good that they tried though.
<pie_>
sphalerite, only if they all actually do the same thing and makes it hard to use for non-domain-experts :P
<joepie91>
jasongrossman: there's lot of these obscure undocumented not-quite-good-enough mechanisms unfortunately
<pie_>
infinisil, makes sense
<joepie91>
I talk people's ears off about this shit for hours if they let me
<joepie91>
:)
<joepie91>
it's a serious problem in the Linux world
<pie_>
the linux world seems to be all about ad-hoc stuff
<joepie91>
well, that, and insular standardization
<infinisil>
~/src is our docs!
<pie_>
i mean that in a slightly less mean way than it sounds
<joepie91>
that is, standardizing only in one's own sub-ecosystem
<sphalerite>
one thing that's nice and usually not ad-hoc is package management
<pie_>
like, i could totally understand why things are the way they are
<joepie91>
this isn't just a legacy problem, either; see the client-side window decorations drama with Wayland
<pie_>
but i aim higher
<sphalerite>
rather unlike in the windows world :D
<joepie91>
sphalerite: errr, I have bad news for you... :P
<pie_>
i think sphalerite is laying the humour on thick :P (?)
<sphalerite>
no, I mean that seriously
<joepie91>
sphalerite: once you start looking at the actual contents of DEB/RPM files... or even Arch pkgbuilds... or hell, even nixpkgs (though to a lesser degree)... you start realizing that it's all still ad-hoc, it just has nice gift wrapping around it that looks mostly consistent from the outside
<joepie91>
it's all still a pile of shell scripts that do the same thing in subtly different ways everywhere
<joepie91>
Windows is the other way around; the underlying API is pretty damn consistent nowadays, but the user-facing part is inconsistent
<joepie91>
(ie. installers and all that)
<sphalerite>
but isn't the user-facing part what matters? :)
<joepie91>
no, because the underlying part is what blows up and leaves the user going "WTF IT WORKED YESTERDAY" :)
<joepie91>
both parts matter
<joepie91>
a really good recent example of this is the problem in systemd wrt what characters were considered valid in a username
<joepie91>
which mismatched the host system
<joepie91>
and could break things in subtle and potentially security-impactful ways
<joepie91>
anyway, Nix at least provides the *tools* to make it consistent; now the work to actually get there needs to happen :P
<joepie91>
and thus we arrive back at pie_'s plugin architecture thread!
<pie_>
i love nix because it feels like it makes so much possible
<pie_>
aaaaanyway
<pie_>
(not sure what to do about various pain points though)
<joepie91>
pie_: btw, I think we have pretty similar abstract goals for Linux systems in general :P
<joepie91>
pies unite!
<pie_>
hehe
<joepie91>
pie_: actually, one moment, let me trawl my bookmarks for stuff that you might find relevant
* pie_
really hopes nix can overcome its boundaries in the near-mid-future
<joepie91>
pffft, I have a lot more bookmarks than I thought
<sphalerite>
joepie91: don't bother with bookmarks, just keep them all open as tabs
<joepie91>
pie_: I'm going to mill things over a bit more, in terms of how to do the WG thing, so we should probably continue discussing the approach at Some Later Point :P
<ar>
the long-term goal seems kind of unrealistic. over many years various vendors of CM tools didn't manage to do anything like that
<joepie91>
I'm not aware of anybody even trying, specifically for a vendor-neutral approach for non-server software
<pie_>
im expecting noone to care about nix, but hey we can try
<pie_>
and besides, we need this on the nix side anyway
<joepie91>
well, the idea of a vendor-neutral standard is that they don't /need/ to care about Nix :)
<joepie91>
Nix has the benefit/drawback of requiring a superset of guarantees of almost everything else, regarding immutability and pureness etc.
<joepie91>
so going from "a config management standard that can support Nix" to "a config management standard that can support anything and that looks universal" is not a particularly big step
<joepie91>
from a technical/design perspective
<joepie91>
so if you can come up with some sort of basic framework for expressing configuration/extension changes, that has the guarantees that Nix needs, then that helps in marketing it to third-party developers because you can say "look, it would also make it possible for your thing to work with all these other (existing and hypothetical) things!"
<pie_>
(/me starts wondering if distributed task trackers are a thing yet)
nckx has quit [Quit: Updating my GNU Guix System <https://guix.info>]
nckx has joined #nixos-chat
<averell>
distributed as in decentralized jira?
<gchristensen>
pie_: like git-bug?
<pie_>
averell, maybe
<pie_>
gchristensen, maybe, i had that in the back of my mind but havent had a chance to look at it yet
<makefu>
pie_: TODOs in git are distributed, there were some other tools which can build upon these TODOs
<pie_>
averell, user starts client, connects to the p2p network, searches for a specific sub-network, works on tasks
<pie_>
magic happens
<pie_>
:P
<sphalerite>
pie_: I guess you could implement it on top of an existing "machine" work queue sort of system, where the actual code running consists of "tell user to do it, and ask them to confirm when they've done it" :p
Synthetica has quit [Quit: Connection closed for inactivity]
jasongrossman has quit [Ping timeout: 250 seconds]
<Taneb>
I've just remembered the first time I tried to use NixOS
<Taneb>
It was... 2015? I had problems getting my keyboard to work
<pie_>
he specifically goes into the need for long term usability of software (i mean beuing able to compile and run a 20 year old program)
<pie_>
joepie91, random ux idea: something like apt-gets "get sources" functionality with an autogenerated nix file that uses thr sources for if you just wan tto do a quick one time patch or something (or not so quick not so one time?)
<kisik21>
I like my new laptop, Windows was fun on it, but Linux will be a lot cooler
<kisik21>
because less RAM used means more RAM for gaming
<kisik21>
It has 6 gigs so it can barely play minecraft 1.12.2 with mods
<kisik21>
but Win eats 2.5G
<tilpner>
That's a new one, switching to Linux for gaming :)
<kisik21>
Minecraft works perfectly on Linux
<kisik21>
Even better than on Windows
<kisik21>
I know that because my old laptop runs NixOS too :3
<kisik21>
This new laptop is much faster, has double the cores and 2G more RAM
<kisik21>
so it's 2.5GHz base clock, 4 cores, 6G RAM and AMD Radeon 535DX as a discrete card
<kisik21>
My objective is make it run Minecraft
<kisik21>
on Linux
<tilpner>
I wasn't arguing against it, it's just rare
<kisik21>
I know
<kisik21>
so I'm explaining my reasons
<MichaelRaskin>
There is also using Wine to run old Windows games that crash on Windows
<kisik21>
so, my objective is minecraft on discrete GPU and video encoding on my integrated GPU. Windows did that, and Linux should be able to do that too
<kisik21>
Instant replay feature was fun :3
<kisik21>
It was blazing fast even with encoding, and held the battery wel
<kisik21>
at least an hour of gaming is guaranteed with the discrete GPU on
<kisik21>
But I could run nothing except Minecraft because my RAM is full
<kisik21>
Linux can change that
<kisik21>
Anyone has an AMD 535DX as their card? can someone tell me how it's named in xrandr?
<kisik21>
can I trust xrandr to detect source and offload sinks automatically?
<kisik21>
because GPU stuff seems to depend on this
<kisik21>
I totally have both working, just confused which one is more powerful
<kisik21>
I know they have different types and amounts of RAM though
<kisik21>
The discrete one has DDR3 I think
<joepie91>
MichaelRaskin: I once had to install Mono for Windows into a WINE prefix to run a particular Windows application
<joepie91>
specifically *Mono for Windows*
<joepie91>
regular .NET framework did not work, regular Mono outside WINE did not work
<kisik21>
wow
<MichaelRaskin>
joepie91: a perfect story would also say that on Windows neither Mono not .Net Framework worked
<joepie91>
MichaelRaskin: haha, nah, it did actually run on Windows
<kisik21>
Mono has a windows version?!
<joepie91>
the software in question was Genetica Pro
<joepie91>
kisik21: yep!
<kisik21>
WOW
<kisik21>
YAY Xrandr picked up my GPUs correctly
<kisik21>
I see 2G of VRAM with DRI_PRIME=1
<kisik21>
It's so cool
<kisik21>
I'm so excited
<kisik21>
Aaaaaaaah
<kisik21>
this is SOOO COOL
<kisik21>
Linux rocks
<joepie91>
kisik21: first-time Linux user?
<kisik21>
First-time Linux with discrete GPU user
<joepie91>
ahh :)
<kisik21>
Linux saved my butt years ago when my laptop failed
<kisik21>
I used a VM on my mother's PC
<kisik21>
and was using Linux on it
<kisik21>
Then my HDD failed
<kisik21>
Years of using Linux from a flash drive
<kisik21>
I even erased one to death
<kisik21>
I still have it as a relic of the past
<joepie91>
heh, hardcore user :D
<kisik21>
Mmhm
<kisik21>
My old laptop's battery is dead
<kisik21>
but the new one has a new battery
<kisik21>
so I'm using a new powerful laptop and I can take it anywhere!!!
<nh2>
clever: yep, commenting out the /dev mount, this works and I can use your `ls` command
<nh2>
clever: had you already run `haskell-init` on real hardware before?
jtojnar has quit [Remote host closed the connection]
<kisik21>
I feel awesome. My new notebook is working almost perfectly on NixOS from day one. Though one bug makes me feel a little bit bad
<kisik21>
But it's not THAT critical. At least I can use KDE
<kisik21>
But now it's night and I need to sleep
kisik21 has quit [Ping timeout: 268 seconds]
drakonis has quit [Ping timeout: 246 seconds]
drakonis has joined #nixos-chat
<colemickens>
Interesting. For "reasons" I've been putting physical disks into a HyperV VM.
<colemickens>
For mostly read-workloads on 4 BTRFS drives, it works okay.
<colemickens>
I added another controller to the VM and added my 1TB SSD though, and weird stuff has been happening. mkfs.ext4 ontop of dm-crypt was taking... well, it took over 45 minutes before I gave up.
<colemickens>
really weird spikey IO behavior in IOtop. Anyway, probably what I get for using HyperV.
__monty__ has quit [Quit: leaving]
<gchristensen>
oh how bizarre
ixxie has quit [Ping timeout: 250 seconds]
drakonis has quit [Ping timeout: 255 seconds]
hedning_ has quit [Read error: Connection reset by peer]