gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
<colemickens> I am also somewhat interested in packaging Firefox Nightly to enable Wayland and see if it works better without involving Flatpak in the mix.
<drakonis_> sway's author is very... impolite
<drakonis_> simpson, sircmpwn's opinions on nvidia are very rude and bad
<drakonis_> also his opinions on software
<simpson> Drakonis_: I was a mod in the Minecraft reverse-engineering community when he was merely a toxic newbie, and he was a PITA back then too.
<drakonis_> he wrote his own git frontend
<drakonis_> own git hosting service lol
<drakonis_> it is a exclusive club
sir_guy_carleton has joined #nixos-chat
jasongrossman has joined #nixos-chat
<emily> simpson: I probably should have updated my expectations of its code quality based on how I feel whenever I see a blog post by him
<emily> but I like i3 and I like Wayland, and what's the chance that there's going to be a *second* project to do i3-on-Wayland given that sway happened in the first place because i3way or whatever it was was vapourware
lassulus_ has joined #nixos-chat
<emily> colemickens: I think I'll probably just stick with i3 for now at least until the meson update hits nixos-unstable, but maybe I'll see about writing that patching for Xwayland when I'm less busy
lassulus has quit [Ping timeout: 244 seconds]
lassulus_ is now known as lassulus
<simpson> emily: Sure, and after all I'm pretty grumpy about anything GPU-related so I should be taken with a grain of salt.
<emily> sadly attempting to make a Linux distribution out of software entirely developed by pleasant people to work with is a bit of a contradiction in terms anyway
<samueldr> wheee, this looks fun :)
<samueldr> gchristensen: any idea to improve the generated description text for generic types in lib/types.nix?
* samueldr will give you a bad sample quickly
drakonis1 has quit [Ping timeout: 250 seconds]
<samueldr> >> Type: list of string (with check: non-empty)s
<gchristensen> ugly :P
<samueldr> asking since an improvement to the docs will create more weird cases
<samueldr> yes!
<gchristensen> moving the subject of "with check:" to before "string" would be a good start
<gchristensen> (ie: "non-empty strings"
<clever> https://www.youtube.com/watch?v=DMNSvHswljM DEF CON 22 - Gene Bransfield - Weaponizing Your Pets: The War Kitteh and the Denial of Service Dog
<samueldr> I'm thinking only about the forced "s" pluralization
<clever> samueldr: oh, and string vs str
<clever> i can never remember which type is the right one to use
<samueldr> clever: ignore that bit :)
<clever> and i recently found a bug in some of my own modules, where i used the wrong one
<clever> delete the deprecated one!!
<samueldr> yeah, after seeing the lib I can see how
<samueldr> clever: pretty sure it won't be approved :/
<gchristensen> samueldr: hmm I'm not sure what you're asking then
Synthetica has quit [Quit: Connection closed for inactivity]
<samueldr> listOf will concat the description of the listed type
<samueldr> so if I have a quux type, with the description "quux" it would pluralize "list of quuxs" instead of "list of quuxes"
<gchristensen> oh
<samueldr> I wasn't sure it made sense when I finished writing it :)
drakonis1 has joined #nixos-chat
<gchristensen> how about making it not natural language, and do `list of elements with the type: quux`
<samueldr> it's been that way for a while :/
<samueldr> gchristensen: right, that was the direction I was thinking of
<gchristensen> that seems good
<samueldr> (we have two other types with the same issue)
<clever> samueldr: its been deprecated for 5 years, let it die already!
<samueldr> clever: while I don't want to step in that again... it's probably why we need some mechanism to alert deprecations noisily :/
<samueldr> (imho)
<gchristensen> :D
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]
<samueldr> list of attribute set off quuxss
<samueldr> oops, of, not off
<gchristensen> can you put a real example in instead of quuxs? I'm not sure what this actually means
<samueldr> the approach cannot work with something as illogical as language :D
<samueldr> list of attribute set off stringss
<samueldr> (where the type is string)
<gchristensen> ah
<samueldr> since this is types.attrsOf tyeps.attrsOf types.str
<gchristensen> "list of attribute sets where each attribute value is of type quux" gets verbose, huh
<samueldr> oops
<samueldr> since this is types.attrsOf tyeps.listOf types.str
jasongrossman has joined #nixos-chat
<samueldr> wondering if those description shouldn't mirror their type names?
<samueldr> though bad UX for the end-user
<samueldr> time to write a natural language serialization module in nix (no)
<gchristensen> "an attribute set where each attribute value is a list of elementst with the type: str"
<gchristensen> complicated :/
<samueldr> (and the attribute will not know anything about its subtype)
<gchristensen> can we make it not automatic
<samueldr> (so it couldn't englishize properly 'where each attribute value is a_n_ attribute set where...'
<gchristensen> yeah, I'm thinking we're solving this at the wrong level somehow
<samueldr> possibly
<samueldr> but it's probably an issue stemming from how types are composed?
<samueldr> maybe we need a dict of pre-composed types to compare?
<gchristensen> yeah, or we shouldn't tr ybeing fancy at all
<gchristensen> and just output docs of "attribute-set-of list-of str" for example
<samueldr> another good possibility
<gchristensen> or, even better,
<samueldr> > lib.types.listOf lib.types.str == lib.types.listOf lib.types.str # :(
<{^_^}> false
<gchristensen> ("better") emit: lib.types.listOf lib.types.str so the user can quickly find the docs for those types
<samueldr> [21:39:53] <samueldr> wondering if those description shouldn't mirror their type names?
<samueldr> [21:40:03] <samueldr> though bad UX for the end-user
<gchristensen> yeah
<gchristensen> well, it depends on who the end user is
<samueldr> someone looking at options.html
<gchristensen> yes, but who is the someone
<gchristensen> do we expect them to be able to infer from that what it means? (many probably could, not all -- is my question)
<samueldr> I would assume some level of inferrence, but not that much
pie___ has joined #nixos-chat
<samueldr> e.g. I have a friend, used to linux, knows about nothing in FP, some programming knowledge, just started using NixOS
<samueldr> though in a way, the verbose descriptions may not be that useful in that case either :/
<gchristensen> a smaller step even is properly documenting the types and merge behavior . a friend/coworker "got" what lib.listOf meant but couldn't find any published docs about how they merged (maybe listOf is documented, but many aren't)
<samueldr> the question is: would the descriptions be better to disambiguate than the verbose descriptions, which I'm not sure they would
<jasongrossman> gchristensen: That sounds right to me.
<gchristensen> I'd rather expose the machinery here to be very precise and shore up the docs to help understanding, before trying to make smart english descriptions
<samueldr> that's a sane idea I think
<gchristensen> b/c if someone comes for help with "it says it isof type lib.types.listOf lib.types.attrSetOf lib.types.str" then that is super easy to answer
pie__ has quit [Ping timeout: 252 seconds]
<gchristensen> and then we arm them with docs for reference
<samueldr> for the first PR for the feature I was working on I'll uh... forget about fixing the smart descriptions... not making it much worse :/
<gchristensen> hehe ok
<jasongrossman> And also because it's good to keep making the docs better and better for all sorts of other reasons.
<gchristensen> +1!
<gchristensen> speaking of which, in https://github.com/NixOS/nixpkgs/pull/47837 I said I'd do one each morning and I haven't since :)
<{^_^}> #47837 (by grahamc, 1 week ago, merged): nixpkgs: Start documenting library functions in XML
<gchristensen> ok good night y'all.
<jasongrossman> night!
<{^_^}> Night!
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]
sir_guy_carleton has quit [Quit: WeeChat 2.0]
drakonis_ has quit [Read error: Connection reset by peer]
jackdk has quit [Ping timeout: 246 seconds]
jasongrossman has joined #nixos-chat
Lisanna has joined #nixos-chat
drakonis1 has quit [Ping timeout: 272 seconds]
drakonis1 has joined #nixos-chat
Synthetica has joined #nixos-chat
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]
drakonis1 has quit [Ping timeout: 245 seconds]
drakonis1 has joined #nixos-chat
jasongrossman has joined #nixos-chat
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]
jasongrossman has joined #nixos-chat
drakonis1 has quit [Ping timeout: 268 seconds]
jasongrossman has quit [Ping timeout: 272 seconds]
drakonis1 has joined #nixos-chat
drakonis1 has quit [Ping timeout: 244 seconds]
drakonis1 has joined #nixos-chat
__monty__ has joined #nixos-chat
jasongrossman has joined #nixos-chat
jasongrossman has quit [Remote host closed the connection]
siers has joined #nixos-chat
<infinisil> ,profiling Myrl-saki
<{^_^}> Myrl-saki: Use NIX_COUNT_CALLS=1 and/or NIX_SHOW_STATS=1 to profile Nix evaluation
<Myrl-saki> infinisil: Oh thanks.
<Myrl-saki> NIX_COUNT_CALLS=1 NIX_SHOW_STATS=1 nix eval '((x: x + x) 1)'
<Myrl-saki> 2
<Myrl-saki> Ah, NIX_COUNT_CALLS=1 NIX_SHOW_STATS=1 nix-instantiate --eval -E '((x: x + x) 1)'
aminechikhaoui has joined #nixos-chat
drakonis1 has quit [Ping timeout: 246 seconds]
drakonis1 has joined #nixos-chat
Church- has joined #nixos-chat
bitmapper has joined #nixos-chat
drakonis1 has quit [Ping timeout: 252 seconds]
drakonis1 has joined #nixos-chat
jasongrossman has joined #nixos-chat
<infinisil> TIL that `git cherry-pick a..c` is not the same as `git cherry-pick a b c`
<infinisil> I think
<gchristensen> I think a...c will be
<infinisil> Hmm, I think my a..c applied the changes from a to c in one go, as if it did `patch $(git diff a..c)`, not sure, I'll try out ... next time
<siers> gchristensen, nope
<gchristensen> everything is awful :P
<siers> cherry picks use a single commit, but it looks like a...b is the disjoint commit set: https://stackoverflow.com/questions/462974/what-are-the-differences-between-double-dot-and-triple-dot-in-git-com
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
infinisil has joined #nixos-chat
infinisil has quit [Client Quit]
infinisil has joined #nixos-chat
Synthetica has quit [Quit: Connection closed for inactivity]
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
infinisil has joined #nixos-chat
infinisil has quit [Remote host closed the connection]
infinisil has joined #nixos-chat
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
infinisil has joined #nixos-chat
infinisil has quit [Client Quit]
infinisil has joined #nixos-chat
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
infinisil has joined #nixos-chat
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]
siers has quit [Ping timeout: 245 seconds]
<sphalerite> Battery 1: design capacity 2137 mAh, last full capacity 1408 mAh = 65%
<sphalerite> Battery 1: design capacity 2151 mAh, last full capacity 1417 mAh = 65%
<sphalerite> Battery 1: design capacity 2153 mAh, last full capacity 1419 mAh = 65%
<sphalerite> I have a variable-design-capacity battery!
<joepie91> lol
<joepie91> sphalerite: was it made by Tesla
* sphalerite lacks context to understand that one
<joepie91> sphalerite: Tesla ships cars with batteries that are bigger than the customer paid for, and then software-locks them to the paid-for capacity
<joepie91> :P
<sphalerite> wow
<joepie91> so, variable design capacity!
<sphalerite> on the bright side they'll take a really long time to drop from the design capacity!
<joepie91> lol
<joepie91> sphalerite: Tesla's rationale is that it simplifies manufacturing
<joepie91> which, like, sure, I can understand that
<joepie91> but then just don't sell an upgrade from a non-existent model to an existent one...
<sphalerite> yeah…
<sphalerite> "any colour you like, as long as it's black " worked for Ford
<joepie91> lol
<joepie91> sphalerite: or just do it how OVH does it
<joepie91> you buy a server with a 1TB HDD
<joepie91> "oh we actually have a pile of 2TBs and no 1TBs, congratulations, you now have a 2TB drive"
<sphalerite> :D
<gchristensen> if your battery is soft-locked to a lower capacity does that mean it'll last longer, as the cells get less use?
<sphalerite> but then the people who paid for 2 will be irritated?
<joepie91> sphalerite: well, you always get at least the advertised capacity
<joepie91> :P
<joepie91> beyond that it's potluck
<sphalerite> I guess
<joepie91> and it's not led to customer revolt, so...
<joepie91> gchristensen: ... possibly?
<gchristensen> sphalerite: SoftLayer would do a similar thing and people would play the Softlayer Lottery: buy 100 X-sized servers and then cancel the 90 lowest specced.
<sphalerite> hahaha
<gchristensen> for a datacenter, it is just reality that you can't offer exact hw forever.
<joepie91> gchristensen: ouch. that must have caused a ton of churn
<gchristensen> yeah, but it is just part of having bare metal hw rentable via api with no lower limiton duration
<gchristensen> when doing some testing for NixOS on Packet I'll deploy dozens of servers for just 5min
siers has joined #nixos-chat
<joepie91> gchristensen: oh, these were cookiecutter models rented through an API? so no expectation or guarantee of new hardware?
<gchristensen> right
<joepie91> this is... disconcerting
<__monty__> Now if only they could predict when I'll get hungry and send an appropriate meal to arrive at that time at the place where I'm going to be...
drakonis1 has quit [Ping timeout: 252 seconds]
drakonis1 has joined #nixos-chat
drakonis1 has quit [Read error: Connection reset by peer]
drakonis1 has joined #nixos-chat
drakonis has joined #nixos-chat
drakonis1 has quit [Ping timeout: 252 seconds]
drakonis has quit [Ping timeout: 260 seconds]
drakonis has joined #nixos-chat
pie___ has quit [Ping timeout: 245 seconds]
drakonis has quit [Ping timeout: 252 seconds]
drakonis has joined #nixos-chat
drakonis_ has joined #nixos-chat
MichaelRaskin has joined #nixos-chat
<gchristensen> + <title>A contrived example of using <function>lib.attrsets.mapAttrsRecursive</function></title>
bitmapper has quit [Ping timeout: 244 seconds]
pie__ has joined #nixos-chat
pie__ has quit [Ping timeout: 276 seconds]
pie__ has joined #nixos-chat
drakonis has quit [Ping timeout: 250 seconds]
drakonis has joined #nixos-chat
drakonis_ has quit [Ping timeout: 244 seconds]
__monty__ has quit [Quit: leaving]
drakonis has quit [Ping timeout: 245 seconds]
drakonis has joined #nixos-chat
drakonis_ has joined #nixos-chat
drakonis has quit [Ping timeout: 252 seconds]
Drakonis__ has joined #nixos-chat
Drakonis__ is now known as Drakonis
siers has quit [Ping timeout: 268 seconds]
jasongrossman has joined #nixos-chat
Drakonis has quit [Ping timeout: 244 seconds]
pie__ has quit [Ping timeout: 252 seconds]
Drakonis has joined #nixos-chat