<energizer>
the executor is just the runtime, the scheduling strategy is "run them in reverse"?
<gchristensen>
this is C
<samueldr>
only for a subset of async functionalities
<samueldr>
nothing runs asynchrouously with defer
<lovesegfault>
right, this is all synchronous
<energizer>
there's nothing async about `await` in python either :D
<lovesegfault>
there are no promises/futures
<gchristensen>
hehe
<gchristensen>
fair enough
<energizer>
lovesegfault: exactly
<lovesegfault>
I don't think that's true, right? You can be asynchronous without being threaded
<lovesegfault>
python async is not parallel, but it's still async
<energizer>
right, but you dont need promises either
<lovesegfault>
I'm confident if we drill down this discussion we will reach my "will not be taking any questions" opinion of programming which is " everything is just a lookup table" :P
LnL has quit [Quit: exit 1]
LnL has joined #nixos-chat
LnL has joined #nixos-chat
LnL has quit [Changing host]
<lovesegfault>
it's LUTs all the way down
<gchristensen>
and assembly is a pure functional language with a very special runtime
<energizer>
lovesegfault: oh "I don't think that's true" was for me?
<samueldr>
gchristensen: every instructions purely functional
<lovesegfault>
energizer: yeah
<lovesegfault>
samueldr: that just follows from them being lookup tables
<energizer>
lovesegfault: it's really the concurrency library (asyncio,trio,twisted,tornado) and select/epoll that make async. `await` is just sugar over `yield from`
<gchristensen>
this got super meta when the topic was C support for defer :P
<energizer>
haha oops :)
<lovesegfault>
:D
<infinisil>
lovesegfault: Still trying to come up with an example that would require defer.. There may be none!
<lovesegfault>
infinisil: I'm trying too!
<lovesegfault>
I think if you use that guard pattern and Drop you completely replace defer
<infinisil>
If you allocate a resource, it makes sense to return that resource as an object -> destructor/drop
* lovesegfault
nods
<infinisil>
I can imagine defers being used to just do state modifications though, because destructors can't be used for that
<infinisil>
But, when do you even want to "undo" some state change?
<infinisil>
Like, unconditionally
* lovesegfault
nods
<gchristensen>
defer certainly makes sense for C
<gchristensen>
whereas drop does not
<lovesegfault>
Right, I don't think we're talking about C, but just language design in general
<lovesegfault>
(at least I am)
<gchristensen>
aye
<lovesegfault>
the claims I'm making are:
<infinisil>
Yeah
<gchristensen>
I wish we could get away from C, but we really really can't, since it is the basis for all FFI
<lovesegfault>
1. Drop + Guard is superior to defer in almost every way, and covers almost all the same cases
<lovesegfault>
that's it, there's one claim, I thought there'd be more :P
<gchristensen>
I dunno I really don't like how protobuf has everything optional
<infinisil>
lovesegfault: Yeah lol, why the heck would anybody want to do modifications to a running database just to simulate whether an update could be done
<lovesegfault>
lol L595 of that file is one I also don't know
<gchristensen>
lol
<energizer>
in i3, can you associate this monitor with these workspaces and that monitor with those workspaces, so switching to workspace 1-3 always appears on left monitor, and switching to workspace 4-6 always appears on right monitor?
<infinisil>
I know you can do that in xmonad :D
<cole-h>
Yes
<cole-h>
(I think -- because I do it with sway)
<infinisil>
But that's mainly just because you can do anything in xmonad, because it's just an arbitrary program lol
<energizer>
is there a name for that setting in sway cole-h
<cole-h>
energizer: The syntax (in sway, at least) is `workspace # output OUTPUTNAME`
<samueldr>
up to at least the 28th, so I don't think halloween will be a thing this year
* lovesegfault
does it
<sphalerite>
please do join me :)
<sphalerite>
I might write a script to automate this, since I expect this will not be the last one we get this month…
waleee-cl has quit [Quit: Connection closed for inactivity]
<cole-h>
sphalerite: > like coretemp
<cole-h>
Was this person banned in the past, or is this some other reference?
<sphalerite>
yes, was banned in the past for being unfriendly/rude/highly demanding.
<cole-h>
Ah, OK. Sounds like before my time.
<sphalerite>
search for commenter:coretemp in nixpkgs if you want to get angry :p
* lovesegfault
goes get angry
<lovesegfault>
oh god
<sphalerite>
I mean, it's a bit of a shame because they did make the occasional useful contribution. But that doesn't nearly justify the way they treated everyone else.
<samueldr>
(the ban was only temporary IIRC)
<samueldr>
(AFAIK we have zero permanently banned people)
<sphalerite>
really? huh ok
<samueldr>
oh, maybe one
<samueldr>
not 100% sure though
<sphalerite>
coretemp hasn't been back in any case
<samueldr>
yep
<samueldr>
getting a temporary (though not short) ban must have been enough of a chilling effect
<abathur>
I don't even know what I did to convince yt I really want to watch train videos
<abathur>
but it keeps suggesting multi-hour train videos to me
<abathur>
*I may be exaggerating on the length of these videos :)
<gchristensen>
aanderse: I took a look at it some time ago but it freaked me out
<aanderse>
gchristensen: yeah? in what way?
waleee-cl has joined #nixos-chat
<gchristensen>
it is free(beer) software but closed source, and listens to what I say and types things for me
<gchristensen>
I don't trust that
<aanderse>
right, right
<aanderse>
i had some crazy reason i was thinking it was open source, but then i saw it went to public beta and was not open source
<gchristensen>
and supposedly written by one guy. I dunno
<aanderse>
would be interesting to run it in a jail and monitor network activity
<gchristensen>
I'd trust it if I paid $300 for it :P
<aanderse>
ha ha ha
<gchristensen>
I mean that, actually. it is complicated software. $20 is too cheap in terms of the value it offers. I'd want to be paying enough for it where the developer is actually invested in me being the customer
<aanderse>
yeah
<aanderse>
or at least good voice software
<aanderse>
not sure how much voice software exists for linux, though
<gchristensen>
yeah
<gchristensen>
I used aenia and caster, and the open dictation toolbox
<gchristensen>
but it never really worked right. Dragon on Windows, though, is seriously amazing
<gchristensen>
it uses their incredibly good accessibility controls to make it really seamless
<aanderse>
sounds nice
<gchristensen>
it is very persuasive to me w.r.t. windows
irc_bot[m]1 has joined #nixos-chat
appservicebot9 has joined #nixos-chat
spudly[m] has left #nixos-chat ["User left"]
appservicebot9 has quit [Client Quit]
appservicebot9 has joined #nixos-chat
spudly has joined #nixos-chat
<eyJhb>
Anyone found anymore PRS regarding DO?
<andi->
Anyone here played with gtk4 in nixpkgs yet?
<gchristensen>
I don't suppose anyone uses Outlook in their daily life
<gchristensen>
I ask, in the channel *LEAST* likely to get any "yes"s
<eyJhb>
gchristensen: SOMETIMES, why?
<gchristensen>
is there a workflow that makes sense?
<gchristensen>
like, it appears that I can't trivially make email go away once I'm done with it
<gchristensen>
which is how I usually use email
<eyJhb>
Guessing most just dump it into a folder to never look at again
<eyJhb>
But I don't use it that much.... :/ Sorry
<gchristensen>
guh
<eyJhb>
The only one I know that uses it quite alot is my mother
<eyJhb>
My dad usually just deletes everything
<pie_>
aanderse: yes
<pie_>
aanderse: i havent run it myself yet but ther are people that have worked on it so if you go on the slack you can ask the main dev
<pie_>
oh huh <gchristensen> but it never really worked right. Dragon on Windows, though, is seriously amazing
<eyJhb>
gchristensen: also, why do you use outlook?
<gchristensen>
one of my clients is Enterprise
<eyJhb>
Ohh...
<sphalerite>
gchristensen: yes, I found that info afterwards…
<gchristensen>
WSL not supporting systemd is really stuck in my craw today
<sphalerite>
even WSL2?
<gchristensen>
it doesn't seem to? distros still use init
<V>
most mainstream distros use systemd these days AIUI?
<gchristensen>
yeah
<gchristensen>
but not on WSL!
<Mic92>
but wsl2 supports systemd, no?
<gchristensen>
apparently not nicely? there are things like ttps://github.com/arkane-systems/genie to make it work apparently
<Mic92>
Do they goove up the kernel?
<gchristensen>
goove? :)
<Mic92>
*goof up
<gchristensen>
maybe? not sure :(
<Mic92>
Does not look like it genie creates its own namespace
<Mic92>
does wsl2 not run systemd as pid1
<gchristensen>
not sure, I didn't come prepared for anybody to actually look at the problem :x I was just griping
<Mic92>
but systemd also supports running as pid2 I believe, They added this when rkt was still a thing
<gchristensen>
"The only missing element is systemd as the init system. Microsoft is using a custom init that sets up what is effectively a container for each installed WSL-2 distribution."
<Mic92>
so what does echo $$ return in wsl?
<gchristensen>
I don't even have access to it right now, even, this is just a problem I'm having to help a team work through
<gchristensen>
I was really not prepared for anything beyond a "ah that sucks" :x :')
<Mic92>
one could hack pid1 to do a re-exec to systemd :)
<Mic92>
with ptrace
<gchristensen>
haha sounds great :D
<Mic92>
If I have to use this one day, I will implement this
<gchristensen>
unfortunately this is for users to install in to their existing wsl2 and so taking it over like that is probably not an option for this particular case :P
<Mic92>
How so? I thought the goal is to run systemd in the end?
<Mic92>
or nixos?
<gchristensen>
nah, the hope is it'd be trivial to support wsl to start a service: just treat it like any other systemd based distro and call it done
<gchristensen>
but it isn't, it is the same bad-old-days of pre-systemd
cole-h has joined #nixos-chat
hax404 has quit [Remote host closed the connection]
hax404 has joined #nixos-chat
hax404 has quit [Remote host closed the connection]
<lovesegfault>
the important part is in `discogs/`
<lovesegfault>
which is just me trying to wrap around this RESTful API
<ashkitten>
lovesegfault: you repeat serde::Serialize and serde::Deserialize many times, i'd add a use statement at the top
<lovesegfault>
ashkitten: Yeah, I wanted to do that once I move all of these data types into a module
<lovesegfault>
but I couldn't figure out what to name the module
<lovesegfault>
so I procrastinated
<cole-h>
Just name it module and then stick a `TODO: rename` above it :D
liff has quit [*.net *.split]
rajivr has quit [*.net *.split]
mog has quit [*.net *.split]
mog has joined #nixos-chat
liff has joined #nixos-chat
dingenskirchen has quit [Quit: ZNC 1.7.5 - https://znc.in]
dingenskirchen has joined #nixos-chat
endformationage has joined #nixos-chat
dadada_ has quit [Quit: WeeChat 2.7.1]
dadada_ has joined #nixos-chat
maxdevjs has quit [Remote host closed the connection]
maxdevjs has joined #nixos-chat
<gchristensen>
I bet I could use ocvpn, vpnns, and wireguard to have an always-on VPN connection separate from my laptop...
* pie_
looks at the two thirds of that he doesnt know
<pie_>
whzat does "separate from my laptop" mean here
<gchristensen>
when i close my laptop I lose the VPN connection and have a very annoying process to reconnect
<pie_>
right
<gchristensen>
if I instead ran the VPN (ocvpn) on a stable system and then plumbed wireguard to it, I could use wireguard locally to connect to this stable system and connect right in
<pie_>
this vpnns thing might be neat
<pie_>
i currently run separate containers as vpn gateways
<gchristensen>
vpnns is great!
<pie_>
(which is probably (?) orthogonal, jus sayin)
<gchristensen>
gutsy to assume Linux audio works well enough for authentication
<worldofpeace>
gchristensen: thanks ❤️ Me and Jon also talked about taking the rm docs out of the nixos manual
<gchristensen>
oh really? cool
<worldofpeace>
and doing a github wiki
<pie_>
eeeh
<cole-h>
gchristensen: btw, I think $$ is POSIX
<cole-h>
A POSIX replacement for $BASHPID *
<pie_>
wiki is harder to download (whats rm?)
<gchristensen>
$BASHPID isn't the same as $$
<cole-h>
Oh
<worldofpeace>
release management pie_
<worldofpeace>
there's no reason for it to be in the nixos manual. like, hey this is how u use nixos modules, and also if you want to be releasing nixos here's our internal process
<pie_>
as an extra benefit it gets to be versioned? (do github wikis get versioned? i never used em)
<cole-h>
gchristensen: `echo $(echo $$) $$` -> `16238 15259` for me -- is that not what you want?
<cole-h>
(This was tested inside mrsh, a POSIX shell)
<__monty__>
I think they do but I've never checked to see if I could actually roll anything back.
<worldofpeace>
pie_: basically. but it needs to be very very mutable because it's quickly changing. it's most convenient and I figure as rm's we can just do what we want
<cole-h>
They're versioned. Kinda like the Arch Wiki
<infinisil>
gchristensen: Oh the extension guessing is nice, I might steal that for mine
<cole-h>
gchristensen: Could you maybe explain why $$ doesn't suffice? I keep misunderstanding :P
<gchristensen>
cole-h: sure, I use `(somestuff here)&` and everything inside the (...) becomes a background process
<gchristensen>
then immediately I SIGSTOP that background process, in the background process
<infinisil>
I also now feel the need to make an auto-expiring paste, which just returns `https://paste.infinisil.com` as the url. The paste becomes invalid once I paste the next thing :P
<gchristensen>
so that later on I can SIGCONT the background process
<gchristensen>
infinisil: I used to have a URL shortener which started a 1, and incremented a number, and entries expired after 24h. it was really nice
<gchristensen>
cole-h: does that make sense?
<infinisil>
I guess generally you do want links to stay valid though, so maybe best to only use expiring ones when necessary
<cole-h>
gchristensen: OK, I see. Lemme play around a bit.
<__monty__>
Yeah, so many irc logs full of holes from expired urls :'(
abathur has quit [Quit: abathur]
<cole-h>
gchristensen: OK, I see. From my meager knowledge of POSIX and brief testing, doesn't seem possible.
abathur has joined #nixos-chat
<cole-h>
("OK, I see." is my favorite phrase, as you can probably tell)
<gchristensen>
aye, cool
<abathur>
:]
<gchristensen>
I wasn't sure if it was possible or not -- but cool to know this is a properly required bashism!
<gchristensen>
this sigstop/sigcont bit feels especially dirty
<infinisil>
Just set up a monthly donation to wikipedia. The amount of benefit I got out of wikipedia is so big, no regrets at all
<__monty__>
Otoh, maybe a second wikipedia would reveal how wikipedia is super biased.
<joepie91>
it's uh, worth a read
<samueldr>
yeah, it's hard to gauge _how_ biased it is
<samueldr>
it surely is, everything is
<gchristensen>
joepie91: "By: Guy Macon" "Guy Macon has been a Wikipedian since 2005, has more than 30,000 edits to his name, and is the author of the Wikipedia essay WP:1AM. He runs a consulting business, rescuing engineering projects that have gone seriously wrong." okay I'm ready to read... an ad
<worldofpeace>
it's like every day I find something new https://nixos.org/manual/nix/unstable/ 🤣 I knew they were markdown but I didn't know it would be pretty :D
<gchristensen>
they are pretty :o
<samueldr>
they don't play well with narrow viewports :(
<__monty__>
How narrow? My browser's often identified as a "mobile" browser so my viewport must be pretty narrow already.
<worldofpeace>
do u know how they're generated samueldr ?
<samueldr>
a third of my display size; 752 innerWidth
<samueldr>
worldofpeace: using the toolchain from rust's books
<samueldr>
ah, I see what is going on
<samueldr>
if the page is _opened_ narrow, the menu will default to be hidden
<samueldr>
but uh... reflowing the text with a side menu is a bad idea for perfs
<samueldr>
(spicy take) no because no one would put an experimental system like distri in production, when there are well-proven technologies like Nix
<V>
distri is explicitly a research operating system
<V>
also the activation script is absolutely a post-install hook
<colemickens>
I guess I'm not sure I understand why "images" seem to be stressed over archives. (And I do admit I think there are places Nix isn't as parallel as it could be.)
<V>
it's just a bunch of post-install hooks concatenated into a single file
<__monty__>
Is nix really among the faster package managers in those measurements?
<joepie91>
colemickens: gotta say, I didn't expect Nix to perform as well as it does, comparatively
<colemickens>
V: why? nothing about "installing" that package requires it to run. I add my system config to my package manager without running that script, it doesn't execute until runtime
<V>
nix has terrible performance but that's not b/c of using files instead of archives
<colemickens>
it is, by definition, not a post-build hook
<colemickens>
or a post-install hook, it requires manual execution
<V>
is there a difference between a post-install hook and one which is run later?
cole-h has quit [Quit: Goodbye]
<colemickens>
Yes? Especially in the context of distri and that article?
<colemickens>
The presumption is that post-install hooks prevent parallel installation of packages, which simply isn't true with Nix. Or I'm misunderstanding.
cole-h has joined #nixos-chat
<V>
oh, that point doesn't apply to nix (although the activation script is still run in sequence)
<colemickens>
I mean, if you just install packages into the store, no activation script is run, but ok
<colemickens>
like, that activation script literally only applies to NixOS, not even a single "package".
<infinisil>
V: The important difference the activation script has from just a post install script is that the amount of steps it does is very low, and each step is atomic
<V>
I misremembered what the article's contents were and thought he was against them because they couldn't be done at runtime or something
<infinisil>
While in current NixOS you can add whatever you want to the activation script, ideally that shouldn't be allowed