gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
{^_^} has quit [Remote host closed the connection]
{^_^} has joined #nixos-chat
ninjin has quit [Ping timeout: 256 seconds]
ninjin has joined #nixos-chat
drakonis has quit [Read error: Connection reset by peer]
drakonis_ has joined #nixos-chat
drakonis has joined #nixos-chat
drakonis_ has quit [Ping timeout: 268 seconds]
drakonis1 has joined #nixos-chat
<elvishjerricco> is freedesktop.org down for anyone else?
<samueldr> curl: (7) Failed to connect to freedesktop.org port 80: Connection refused
<elvishjerricco> that's odd
<drakonis1> its up
<drakonis1> well, kind of.
<samueldr> how kind of?
<drakonis1> i pinged it and i'm getting replies
<drakonis1> but not from the main domain, i'm getting pingbacks from annarchy.freedesktop.org
<samueldr> that's probably fine
<samueldr> the IP reverse-resolved to that domain
<samueldr> just like when you ping google.com it resolves a 1e100.net domain
<samueldr> and yeah, looks like their server just doesn't respond to requests
<jasongrossman> I can't ping it from here in Australia.
<jasongrossman> Oh no, wait, I can, but it was VERY slow to start responding.
drakonis_ has joined #nixos-chat
drakonis has quit [Ping timeout: 252 seconds]
drakonis has joined #nixos-chat
drakonis_ has quit [Ping timeout: 246 seconds]
Myhlamaeus has quit [Ping timeout: 252 seconds]
pie___ has joined #nixos-chat
pie__ has quit [Ping timeout: 246 seconds]
jackdk has quit [Ping timeout: 245 seconds]
<infinisil> Oh god are you serious
<infinisil> appleid.apple.com gives me 502 Bad Gateway if I'm using my VPN..
<infinisil> ???
endformationage has quit [Ping timeout: 272 seconds]
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]
jasongrossman has joined #nixos-chat
drakonis_ has joined #nixos-chat
drakonis has quit [Ping timeout: 245 seconds]
drakonis1 has quit [Ping timeout: 252 seconds]
noonien has quit [Quit: Connection closed for inactivity]
drakonis_ has quit [Read error: Connection reset by peer]
drakonis_ has joined #nixos-chat
Myhlamaeus has joined #nixos-chat
drakonis has joined #nixos-chat
drakonis_ has quit [Ping timeout: 252 seconds]
Myhlamaeus has quit [Ping timeout: 252 seconds]
johanot has joined #nixos-chat
obadz has quit [Ping timeout: 246 seconds]
__monty__ has joined #nixos-chat
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]
jasongrossman has joined #nixos-chat
__Sander__ has joined #nixos-chat
drakonis has quit [Remote host closed the connection]
jasongrossman has quit [Remote host closed the connection]
johanot has quit [Read error: Connection reset by peer]
jasongrossman has joined #nixos-chat
drakonis has joined #nixos-chat
waleee has joined #nixos-chat
Jackneill has quit [Ping timeout: 245 seconds]
Jackneill has joined #nixos-chat
<srhb> Any obvious way to "cage" the mouse pointer so that it cannot escape my current main monitor? Using xmonad.
<srhb> Or, um, nonobvious :-)
<gchristensen> looks like there are some gnarly x application hacks you can do ...
<srhb> I'm alrady hooked deep into the X bindings, what could go wrong...
* gchristensen chooses to not enumerate the ways
drakonis_ has joined #nixos-chat
<joepie91> srhb: far as I know everything (mouse-locking games, synergy, etc.) just does the hack of "if mouse moved, and position outside bounds, then reset to bounds"
<gchristensen> making r13y.com's update process an automatic background job is really really annoying due to things not working the same without a TTY, + the huge build time
<srhb> joepie91: Yuck, of course... :-)
<joepie91> srhb: caveat: I believe it was Firefox that used to check on screen bounds for mouse locking, instead of locking it in the center, and this caused some fun bugs when combined with stuff like Synergy that moves the pointer to another monitor when it is moved offscreen
<joepie91> which manifested as "anything that mouselocks goes absolutely spinning crazy when you move your mouse"
<srhb> Oh yeah...
<joepie91> so now it locks in the center of the screen instead I think :P
<srhb> :|
drakonis_ has quit [Read error: Connection reset by peer]
drakonis_ has joined #nixos-chat
drakonis has quit [Ping timeout: 255 seconds]
drakonis_ has quit [Read error: Connection reset by peer]
drakonis_ has joined #nixos-chat
drakonis_ has quit [Read error: Connection reset by peer]
drakonis has joined #nixos-chat
drakonis has quit [Read error: Connection reset by peer]
drakonis has joined #nixos-chat
<sphalerite> gchristensen: really, are there other broken parts than diffoscope?
<gchristensen> rsync + ssh identities etc.
<gchristensen> every test run is like 1hr40min
<gchristensen> so finding out you typo'd ssh-key instead of ssh.key is pretty gnarly
drakonis has quit [Read error: Connection reset by peer]
<sphalerite> ouch
jcrben has quit [Quit: Ping timeout (120 seconds)]
jcrben has joined #nixos-chat
endformationage has joined #nixos-chat
noonien has joined #nixos-chat
drakonis has joined #nixos-chat
__Sander__ has quit [Quit: Konversation terminated!]
<manveru> looks like the browser in steam isn't working anymore :(
<manveru> they updated the chrome in the steam beta yesterday, probably the issue...
<manveru> and i think there was a new steamos release
obadz has joined #nixos-chat
Myhlamaeus has joined #nixos-chat
waleee has quit [Quit: WeeChat 2.4]
<gchristensen> the system I moved r13y's build over to seems to be muuuch slower than my laptop :|
<tilpner> Slow storage?
<gchristensen> ssd iirc
<joepie91> PSA: https://twitter.com/fox8091_1/status/1108767553961250820 -- for all those with Razer laptops
<tilpner> Huh. That's what I blame it on when my laptop outperforms the Hetzner server
<joepie91> haven't verified, still in the 'scoop' stage
<samueldr> feature?
<samueldr> corebootable!
* samueldr eternally sees the bright side
<joepie91> lol
<gchristensen> always look on the briight side of rootkits
<samueldr> aren't most desktop hardware subject to the same kind of issue? (genuing question)
<samueldr> hm maybe not
<samueldr> probably some kind of system to check if the thing is genuine when flashing from the OS
<samueldr> though, thinking about it, maybe it means easily brickable, rather than corebootable; if bootguard is active, and you modify the firmware, it won't validate
<samueldr> >> FPFs are typically used to store platform parameters. Setting FPFs requires Intel’s ME to be in the Manufacturing Mode. As part of a two-step process, the FPFs are first stored to temporary memory and are then “burned” when the Manufacturing Mode is closed. If a system remains in Manufacturing Mode, that means the FPFs have never been initialized because the process hasn’t been completed.
Myhlamaeus has quit [Ping timeout: 252 seconds]
Myhlamaeus has joined #nixos-chat
<gchristensen> is a list a composite type?
<elvishjerricco> gchristensen: As in can you make your own list type in Nix?
<gchristensen> no, I mean more w.r.t. terminology
<elvishjerricco> Then I don't know what "composite type" means :P
<gchristensen> I guess I want aggregate data type?
<__monty__> With lambdas you can encode *any* data type : >
<gchristensen> *sigh* I'm just trying to write a stinking comment :P separated primitive types from list/set/lambda :)
<elvishjerricco> __monty__: I don't think you can encode the asymptotics of a list with lambdas, can you?
<elvishjerricco> of an array*
<__monty__> That wasn't part of the original question.
<__monty__> : >
<elvishjerricco> hah fair enough
<__monty__> And I'm not sure actually. I think you *can* in fact get the asymptotics. Just many times slower maybe.
<__monty__> Oh wait, I guess I'm presupposing boundedness of the arrays.
<__monty__> gchristensen: Lambda doesn't sound like a very aggregate type though.
<__monty__> Maybe types of kind * -> * is what you're after?
<gchristensen> I deleted the comment
<infinisil> I once tried implementing a O(1) append list in Nix. Didn't finish it, but I think it would have worked
<steveeJ> wouldn't it be more sensible to add that in the C++ code as a builtin?
<LnL> hmm, what complexity is it now?
<steveeJ> no idea, I just jumped on the idea of implementing it in Nix
<joepie91> bad write-it-in-Rust joke goes here
<joepie91> :)
<ldlework> nixr
<joepie91> well, we already have rnix, so
<joepie91> and soon hopefully rnix-js
<LnL> both rnix and hnix are a thing
<steveeJ> what/where is rnix?
<joepie91> Nix parser in Rust
<joepie91> one of my mad-science projects at the moment is to see whether I can reimplement Nix in JS, and how performant I can reasonably make it
<joepie91> by abusing V8's optimization features
<steveeJ> I see. parsing and doing evaluations are probably far apart in complexity
<joepie91> via code generation
<LnL> yeah, and hnix can evaluate all (or maybe most) of nixpkgs now
<infinisil> LnL: Appending is currently O(n) in Nix
<infinisil> Afaik at least
<infinisil> Where append = list: elem: list ++ [ elem ]
<LnL> huh, that sounds like extremely low hanging fruit to optimize evaluation time
<LnL> or are they represented as a linked list
<infinisil> Nah, Nix's lists are just arrays
<infinisil> And ++ works by just creating a new array of the size of both operands added together, then copies both contents into the new one
<infinisil> LnL: builtins.tail is also O(n) btw
<LnL> eh
<LnL> you just said it's an array
<infinisil> And?
<LnL> err tail not last, was confusing things in my head
<gchristensen> there isn't a last :|
<infinisil> > lib.last
<{^_^}> <LAMBDA>
<gchristensen> elemAt list (length list - 1);
<LnL> or this
<LnL> last = xs: if length xs == 1 then elemAt xs 0 else last (tail xs)
<gchristensen> wouldn't that be O(n!)?
<infinisil> ^^
<LnL> yep
<gchristensen> neat
<gchristensen> [hydra]$ nix-instantiate --strict --json --eval ./ofborg.nix
<gchristensen> {"build.x86_64-linux":"/nix/store/6gw2gxdp1l2lcgv0y8zmcx3dzwgi3n8a-hydra-0.1.2609.0e337e6f9c7ea9edfc64e9975b35faac1bd2b708","manual":"/nix/store/igky87hk672pxc2j38s48hjn2rgah4qj-hydra-manual-0.1.2609.0e337e6f9c7ea9edfc64e9975b35faac1bd2b708","tests.api.x86_64-linux":"/nix/store/w7w8rvrwm3xsr8rv8857d6gh720yivkf-vm-test-run-unnamed","tests.install.x86_64-linux":"/nix/store/b6q0x0g915qmnb00vfd48501z7hsirmy-v
<gchristensen> m-test-run-unnamed"}
<gchristensen> this library function was a nightmare to write :)
<samueldr> {"a.a" = 0;} # developers hate him
<samueldr> lossy in the other way
<gchristensen> get out!
<gchristensen> "PRs welcome"
<samueldr> the way you implemented it is fine, but won't allow de-flattening :)
<gchristensen> that is actually the point of why I wrote it :|
<samueldr> (and is probably a way harder than necessary thing to do)
<samueldr> oh
<samueldr> if it known that it's lossy, it might be fine for most uses?
<gchristensen> yeah probably
* gchristensen adds flattenStructure-samueldr-is-annoying = assertEq ...
<gchristensen> (with love)
<gchristensen> huh, do we not have a "contains" or something?
<gchristensen> eh, I'm going to assume this is good enough :P
<tilpner> builtins.elem?
<tilpner> > builtins.elem 1 [ 1 2 3 ]
<{^_^}> true
<tilpner> > builtins.elem 4 [ 1 2 3 ]
<{^_^}> false
<gchristensen> for strings :)
<tilpner> match, but... :/
<simpson> > lib.hasInfix
<{^_^}> attribute 'hasInfix' missing, at (string):222:1
<simpson> gchristensen: First commit of https://github.com/NixOS/nixpkgs/pull/56817 has both a fix for `hasInfix` being in the wrong scope, and also an example usage.
<{^_^}> #56817 (by MostAwesomeDude, 2 weeks ago, open): PyPy: 7.0.0
<tilpner> > lib.strings.hasInfix "oo" "foobar"
<{^_^}> true
<infinisil> simpson: It's not in the wrong scope, it's just not in lib's global scope
<simpson> infinisil: Oh. It's confusingly-named and a surprising omission, then. TIL about lib.strings.
* tilpner votes concatImapStringsSep for most overspecialized function
<tilpner> Why do one thing when you could do three
<infinisil> tilpner: Check out #57091..
<{^_^}> https://github.com/NixOS/nixpkgs/pull/57091 (by danbst, 1 week ago, open): lib: introduce `foreach`, `combined` and `combined map` idioms
<tilpner> Oh!
<tilpner> combined seems a little overloaded though
__monty__ has quit [Quit: leaving]
<colemickens> I guess NexDock is trying again. I'd be curious to see how well this + Librem5 works out for someone who offloads CPU-intensive tasks anyway.
<colemickens> (It's on Kickstarter, but I don't want to link it, it's easy to find.)
<samueldr> ah, raspi support is through hdmi in
<samueldr> (still interesting)
<samueldr> they don't specify which type-c alternate mode is required to be supported
<samueldr> (this, stupidly, could also be used with another laptop to dual screen in the most absurd way, in theory)
<samueldr> oh, it's in the list of other cool uses later on
<samueldr> colemickens: you seemed to know them from, probably, the first device
<samueldr> anything to know?
<samueldr> >> NexDock 2 USB-C port works over displayport
<colemickens> samueldr: ah, no, sorry, I've always been holding out for the 1 port dream. This is the first device of it's kind that hasn't had some sort of obvious flaw, and/or seems to have some momentum behind it. Some others I've seen are very far behind schedule, etc.
<samueldr> the fact that they shipped previously tempts me to back
* colemickens nods
<colemickens> If I understand correctly Linux supports DP alt mode even if the HW doesn't have special support for it. And I assume Librem5 will be able to handle a stockish, new-enough kernel. I'm probably going to pull the trigger on it. Esp since the Librem5 purchase was long enough ago to write off in my head.
<samueldr> (for another relatively open phone)
<colemickens> oh cool, I missed that device.
<samueldr> it's basically based on the a64-lts hardware, so support state is kinda known (it's not DIRECTLY a64-lts, but close enough to gauge AFAIUI)
<samueldr> well, should have said the sopine, it's closer to reality
jackdk has joined #nixos-chat
drakonis_ has joined #nixos-chat
jasongrossman has quit [Quit: ERC (IRC client for Emacs 26.1)]