gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
<samueldr> cross-compilation and python extensions are going to be the end of me
<samueldr> I'm not convinced things are setup so it should work in nixpkgs
<samueldr> but I'm starting knowing so little I don't even know
<samueldr> I can't seem to coerce misc. search engines to show me someone cross-compiling something with setup.py
KeiraT has quit [Ping timeout: 240 seconds]
KeiraT has joined #nixos-chat
<gchristensen> infinisil: crikes. I think znapzend deleted some snapshots I was using which it didn't create
<infinisil> That's not very good
<infinisil> Did you name them like znapzend does?
<gchristensen> no, mass@transfer-to-rpool-2020-01-27T02:12 vs. mass/Petunia@2020-01-27--015500Z
<gchristensen> I guess I'll use bookmarks
<infinisil> Sometimes I use `zfs hold` to prevent znapzend from deleting a snapshot I want to keep for a bit longer
<gchristensen> ooh good idea
<gchristensen> just need to time it perfectly to make sure it doesn't get deleted between snapshot and hold
<ashkitten> sounds unlikely, since snapshots and holds are both approximately instant
<gchristensen> unlikely yes but ...
<gchristensen> would be nice to have a snapshot-and-hold
<gchristensen> it is tough to know if it worked or anything was missed, too, since presumably zfs hold -r doesn't complain if only a subset of the datasets have a name-matching snapshot
<gchristensen> also a zfs send which was breadth-first would be nice
<gchristensen> man I'm going to learn C aren't I
<infinisil> gchristensen: You could contribute a `zfs hold` function to the lua interface, then you can implement your snapshot-and-hold with `zfs program` :)
<gchristensen> do those run atomically?
<infinisil> gchristensen: Yup!
<gchristensen> that is wonderful
<infinisil> See top of `man zfs program`
<gchristensen> "If the channel program exhausts an instruction or memory limit, a fatal error will be generated and the program will be stopped, leavingthe program partially executed." atomically but not transactionally
<infinisil> Btw, this took me longer to find than anticipated, but in the zfs source, zcp.c is responsible for defining the lua interface
<infinisil> zcp = zfs channel program
<gchristensen> nice
<gchristensen> I've started sending them PRs :X
<infinisil> Yeah seen that, very nice :D
<infinisil> elvishjerricco: I have the hope of eventually being able to use `zfs program` as the interaction layer for a zfs library
<elvishjerricco> Oh that's a cool idea
<elvishjerricco> But it runs Lua in kernel space, which I found really weird
<gchristensen> very
<infinisil> As opposed to C?
<elvishjerricco> infinisil: I just figured they'd expose more in the /dev/zfs ioctl interface and write a lua library for interacting with that from userspace
<elvishjerricco> Instead, there's now a lua interpreter in the kernel :P
<infinisil> Hm I see, perhaps that's needed so it can guarantee atomicity though?
<elvishjerricco> I doubt it's *needed*, but I wouldn't be surprised if it was just easier this way
<elvishjerricco> In particular to kill the program if it takes too long or something. No idea if they actually do that
<infinisil> This does get mentioned
<infinisil> zfs program [-jn] [-t instruction-limit] [-m memory-limit] pool script
<elvishjerricco> But like they could just abort the transaction if it takes too long and report an error to user space
<infinisil> Probably yeah
<gchristensen> there is no transaction
<gchristensen> and no guarantee the user-space program would end
<gchristensen> afaict it isn't actually atomic, it is just has exclusive write cacess
<elvishjerricco> gchristensen: What happens if you exceed the instruction limit? Half-made changes?
<infinisil> Well the man page explicitly mentions it's atomic
drakonis has quit [Quit: WeeChat 2.6]
<ashkitten> elvishjerricco: i believe netbsd supports kernel modules in lua
<colemickens> Has anyone written about Unison from a Nix perspective yet?
<Church-> Wait wat
<Church-> Lua is in the kernel when zfs is loaded?
<Church-> That's... interesting
<ashkitten> i like how everyone is astonished at zfs including a lua interpreter but nobody comments on my mention of netbsd's built in lua interpreter
Jackneill has joined #nixos-chat
evanjs has quit [Remote host closed the connection]
evanjs has joined #nixos-chat
<FireFly> hehe
vesper11 has quit [Read error: Connection reset by peer]
vesper11 has joined #nixos-chat
__monty__ has joined #nixos-chat
Synthetica has joined #nixos-chat
<elvishjerricco> ashkitten: I find that equally undesirable.
<gchristensen> elvishjerriccoo, infinisil: it also explicitly says it does not attempt to roll back changes. "If the channel program exhausts an instruction or memory limit, a fatal error will be generated and the program will be stopped, leaving the program partially executed. No attempt is made to reverse or undo any operations already performed."
waleee-cl has joined #nixos-chat
<infinisil> Hm yeah, so I guess it's atomic unless resource exhaustion
<gchristensen> or any other fatal error
<infinisil> "Note that because both the instruction count and amount of memory used by a channel program are deterministic when run against the same inputs and filesystem state, as long as a channel program has run successfully once, you can guarantee that it will finish successfully against a similar size system."
<gchristensen> yeah I read that
<gchristensen> anyway
<gchristensen> it is atomic I guess but isn't transactional
<gchristensen> afaik anyway, since usually transactions fully complete or don't apply at all? I dunno. definitely getting in to the pedantic parts of these words
<infinisil> Doesn't atomic mean it either doesn't execute at all or it fully executes? So if we take these resource limits into consideration it's not atomic
<infinisil> Probably not a problem in practice though
<gchristensen> it isn't until it is
<gchristensen> it is always the most fun to learn the lies your system told you when things aren't going well
<gchristensen> it may be easy to write a program one way assuming it'll totally succeed or not apply at all, vs. slightly trickier to write it the other way which can handle mid-execution failure
<infinisil> Hmm, what are these resource limits even good for if they're meant to not be hit at all?
<gchristensen> keeping ZFS responsive and usable in the event of a bug
<gchristensen> ("oops, I did a for loop from 1 to 100, but accidentally messed up my limit and now my ZFS kerne lmodule is completely stuck forever" vs "guess I have to wait 10 million operations"
<infinisil> Ahh that makes sense
<gchristensen> back in 30-40min
drakonis has joined #nixos-chat
drakonis has quit [Quit: WeeChat 2.6]
<gchristensen> does Fish and stuff set $SHELL or something?
<Synthetica> Doesn't look like it, when I `echo $SHELL` in fish it reports `/run/current-system/sw/bin/bash`
<gchristensen> do you normally use Fish?
<Synthetica> Yes
<gchristensen> is there a way to know your shell is Fish?
<gchristensen> other than $SHELL?
<Synthetica> $FISH_VERSION should be a good clue
<Synthetica> I think you can assume that when that's set you're running Fish
<gchristensen> hm it is annoying it doesn't set $SHELL :P
drakonis has joined #nixos-chat
<infinisil> gchristensen: $0 perhaps?
<infinisil> Synthetica: That should be fish for you right?
<Synthetica> echo $0 gives an empty string
<gchristensen> I need it to be in the env so that a program I execute in my shell knows what shell I'm in
<infinisil> Huh, does fish have a different syntax to get $0 perhaps?
<gchristensen> (and $0 wouldn't be set
<infinisil> gchristensen: What are you doing with that?
<gchristensen> starting a new shell :)
<__monty__> Hmm, my SHELL is definitely set to fish.
<__monty__> Are you sure nothing's setting it to bash?
<gchristensen> nice
<gchristensen> thanks, __monty__
<__monty__> It might be nix-darwin setting that I guess?
<__monty__> Oh, hold on.
<__monty__> Looks like SHELL isn't set upon invocation of any shell?
<__monty__> Maybe it just reflects the user's preferred shell?
<__monty__> I.e., set by chsh?
<Synthetica> __monty__: Yeah, I have my chsh shell set to bash, because things tend to break when you change that. But Fish doesn't change $SHELL
drakonis has quit [Read error: Connection reset by peer]
<elvishjerricco> gchristensen, infinisil: I'm a little loose on terminology. What is the difference between atomic and transactional? The docs make it sound like these channel programs are neither.
<gchristensen> the way I read it, the only true thing about these programs is they get an exclusive write lock
<infinisil> I have no idea how those differ
<gchristensen> to me transactional operations don't have any effect outside of their transaction isolation until they commit.
<elvishjerricco> I had thought atomic meant no in-between state was ever visible to others (regardless of end state after failures), and transactional meant failures would get rolled back and write access is exclusive.
<gchristensen> yeah I am not educated enough in these matters
* elvishjerricco fires up the search engine
<elvishjerricco> Kinda looks like they're meant to be synonymous based on the first couple links. Like "transaction" is just a noun that means "an atomic operation"
<gchristensen> heh
<elvishjerricco> Yea so these programs just aren't atomic/transactional at all it sounds like
<gchristensen> who wants to PR the docs
<elvishjerricco> Failures will leave stuff in borked intermediate state, and intermediate states are readable during the operation
<gchristensen> I guess this really says it all: The entire script is executed atomically, with no other administrative operations taking effect concurrently.
<gchristensen> the truth is after the comma
<elvishjerricco> Yea, shame. I really wish all FS related things could be done ACID-style.
<gchristensen> I think it would necessarily block writes druing execution, which would be a tough pill to swallow
<elvishjerricco> gchristensen: Why would that be?
<gchristensen> I think you have enough tools to change the underlying meaning of a dataset, and if you wanted it to be atomic you'd need to interrupt writes to that dataset
<gchristensen> maybe not
<elvishjerricco> gchristensen: If it were sufficiently atomic, the changes to its meaning would appear instantaneous, so writes that were occurring during the execution of the program would be written as though the program hadn't had any effect yet
<gchristensen> aye, after execution, right
Jackneill has quit [Remote host closed the connection]
wildtrees has joined #nixos-chat
endformationage has joined #nixos-chat
<elvishjerricco> Is a patch file that reverts a commit from a GPL codebase considered a derivative of that codebase? If so, doesn't that make the simd patch we have in nixpkgs for the kernel a GPL violation?
<samueldr> if we were to assume it's a violation, how is it a violation?
<samueldr> (not necessarily doubting that assertion)
<samueldr> is it because it's lacking the GPL notice? or is there something else?
<elvishjerricco> samueldr: Well a revert patch is just copying code from the original project. Copying any individual file from the kernel source tree into nixpkgs would absolutely violate GPL, so copying a diff of such a file seems suspect as well
<samueldr> yes, but copying it alone does not make it a violation, I don't know for sure though, there must be a more tangible way it violates
<elvishjerricco> Can you have individual files in nixpkgs that are GPL when the rest of nixpkgs isn't?
<samueldr> I assume you could
<elvishjerricco> Interesting
<elvishjerricco> The whole "derivative" part of GPL is very unclear....
<samueldr> yeah, can you open an issue about that particular one and we'll cc the one person that generally has good answers
<samueldr> because I hear and understand your concerns, and I think there's merit in making sure there's nothing wrong here
<__monty__> Hmm, I don't see the violation. The patch is available under the same terms?
<__monty__> I don't think anyone claims the GPL has reach past the licensed source code just because a distro patches it?
<samueldr> that's what I'm thinking, but it may not be entirely complete, not sure how GPL requires a notice
<__monty__> Keeping the patch hidden and only distributing a binary kernel would be a violation.
<samueldr> that's for sure
<__monty__> The notice is still in the patched code though?
<gchristensen> the GPL doesn't say "you can do anything you want except for change the license-verification code"
<samueldr> we could still be in the spirit of the GPL, but in violation of a finer aspect accidentally
<gchristensen> GPL compliance is a legal thing not a code thing
<__monty__> The patch isn't distributed an sich.
<gchristensen> we have a blanket notice on the repo: 'Note: MIT license does not apply to the packages built by Nixpkgs, merely to the files in this repository (the Nix expressions, build scripts, NixOS modules, etc.). It also might not apply to patches included in Nixpkgs, which may be derivative works of the packages to which they apply. The aforementioned artifacts are all covered by the licenses of the
<gchristensen> respective packages.'
<elvishjerricco> The issue is that this patch is a revert patch. It contains code that was released under GPL. If it were a custom patch file made by a NixOS maintainer, I think it'd be much more likely fine
<gchristensen> it isn't an issue
<elvishjerricco> But every aspect of the file is derived from kernel sources
<gchristensen> the patch is automatically GPL since it is a kernel patch, and we say patches in the repo may be governed by the project they came from
<elvishjerricco> Ah
<elvishjerricco> Oh yea I see
<gchristensen> it may even not matter at all, since the patch is not a creative work in any way and is mechanically created
<elvishjerricco> Also fair
<elvishjerricco> Though you could argue a kernel binary is mechanically created by the build scripts
<gchristensen> lol
<gchristensen> good thing I'm not arguing anything close to that
<elvishjerricco> Just saying creativity may not be relevant
<samueldr> lawyerly speak is almost an antithesis to us rigidly stricly coding types
<pie_[bnc]> are works created by AI owned by the AI or are they considered derivative works under the intellectual roperty license governing the AI?
<gchristensen> elvishjerricco: you're probably right
<pie_[bnc]> damn all the typos ruined ti
<elvishjerricco> pie_[bnc]: Can an AI be its own licensor? :P
<pie_[bnc]> and which copy of an AI owes me the money i loaned it
<gchristensen> samueldr: lawyers are just computer programmers reapplied to the largest distributed system in the world
<elvishjerricco> If only :P
* gchristensen just got a "lgtm" from nixos' resident gpl-compliance, not-a-lawyer person
<elvishjerricco> gchristensen: Did they say it was because of the disclaimer in the readme, or because it wouldn't have been an issue in the first place?
<gchristensen> the patch is modifying an existing file, so the patch is automatically under that license, especially since the reverted patch is also part of upstream. this is true with or without our notice
<joepie91> pie_[bnc]: the more interesting question is the source data; AIs are not 'designed' as such, they are trained on inputs
<joepie91> and all of its decisionmaking behaviour is a derivative work of those inputs
<joepie91> (on which note, there's a loooooot of laundering going on where AI training data is concerned, copyright-wise and otherwise)
<pie_[bnc]> joepie91: i almost figured as much, i was mostly joking about strong AI though
<pie_[bnc]> joepie91: one could arguably say the same about humans
<elvishjerricco> gchristensen: That sounds like evidence that the patch needs to be considered GPL, right? Hence it's ok because of our notice?
<gchristensen> elvishjerricco: the patch *IS* GPL. there is zero doubt about that.
<elvishjerricco> Cool
<joepie91> of course, which is one reason why copyright is bullshit; but it's a lot more difficult to trace and a lot more indirect with humans, than it is with current-gen AI :)
<pie_[bnc]> licenses as political parties
obadz has joined #nixos-chat
waleee-cl has quit [Quit: Connection closed for inactivity]
spacekookie_ has joined #nixos-chat
spacekookie has quit [Ping timeout: 268 seconds]
avn has joined #nixos-chat
drakonis has joined #nixos-chat
jD91mZM2 has quit [Quit: ZNC 1.7.5 - https://znc.in]
jD91mZM2 has joined #nixos-chat
Jackneill has joined #nixos-chat
wildtrees has quit [Quit: Leaving]
Jackneill has quit [Remote host closed the connection]
<samueldr> :/ the listed IRC channel in the libinput docs is #wayland-devl here on freenode, but the channel doesn't exist
<pie_[bnc]> what if no l
<samueldr> sorry, let me copy/paste rather than rewrite with typos
<samueldr> >> Questions can be asked on #wayland-devel on freenode
* pie_[bnc] doesnt know anyof the waylandchannels
<pie_[bnc]> aw v.v
<pie_[bnc]> its always sad when there isnt an irc channel
<samueldr> though it likely was previously a good channel
<samueldr> there's chanserv in there
<__monty__> Let me guess they moved to discord/gitter/slack to kill the community?
<__monty__> : )
<samueldr> no mention of that, it looks like they simple removed the -devel channel and development questions are accepted in #wayland
<gchristensen> out of 100,000 emails I reply, maybe 1 or 2 would be esaier to reply to with a proper text editor ... and man, is it painful when I can't
<__monty__> Why can't you? You can always compose in an editor and then copy/paste, no?
<gchristensen> it'd be much easier if I already had it all locally but I don't
<infinisil> I occasionally open vim just to write short stuff :)
<__monty__> Had all what locally? An email thread?
<__monty__> Also, replying to 100k emails, props o.O
<pie_[bnc]> id like to think that was part of a joke
<gchristensen> oops, I don't reply to that many
<gchristensen> but gosh, my job is more email + calendars than I'd like to admit
<__monty__> gchristensen: I'm still hireable as your assistant. I'll handle all that tedious email and calendaring : >
<__monty__> nn, peeps
__monty__ has quit [Quit: leaving]
<gchristensen> :P
<gchristensen> tragically my budget is like a pack of gum