gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
<infinisil> Aw yeah, new and improved (but not done) nixbot evaluation:
<infinisil> >> x = 1
<{^_^}> Did assign
<infinisil> >> x = x + 2
<{^_^}> Did assign
<infinisil> >> x
<{^_^}> 3
<infinisil> The other one would give infinite recursion for that
<infinisil> >> attrs = { x = 10; }
<{^_^}> Did assign
<infinisil> >> attrs.z = "Deep overriding!"
<{^_^}> Did assign
<infinisil> >> attrs
<{^_^}> { x = 10; z = "Deep overriding!"; }
<gchristensen> >> builtins.trace "pretty" (builtins.trace "fancy" null)
<{^_^}> null
<gchristensen> that is really cool!
<infinisil> Also, you can't override builtins and co. anymore
<infinisil> >> builtins = null
<{^_^}> Did assign
<infinisil> >> builtins.map (x: x + 1) []
<{^_^}> [ ]
<infinisil> :D
<gchristensen> >> with { builtins = null; }
<{^_^}> error: NixParseFailure "error: syntax error, unexpected $end, expecting ';', at (string):1:36\n"
<gchristensen> >> with { builtins = null; };
<{^_^}> error: NixParseFailure "error: syntax error, unexpected $end, at (string):1:37\n"
<infinisil> Also this:
<infinisil> >> x = 10; y = 20; z = 30
<{^_^}> Did assign
<infinisil> >> x + y + z
<{^_^}> 60
<nbp> "<company name> are able to be very competitive to your current compensation at Tweag I/O", No kidding! But I wonder if they can be competitive with my current position at Mozilla.
<gchristensen> when did you join tweag?? :)
<nbp> That's exactly my point. I did not.
<nbp> So it is easy to claim that I can have a better compensation :)
<elvishjerricco> Why would `stress -c 8` only saturate one core? It spawns 8 workers, but only one core spikes to 100%
<clever> elvishjerricco: i sometimes wound up with my terminal pinned to one core by accident when i was messing with stress, no idea how i did it
<elvishjerricco> clever: Yea I just discovered that not running it in a `nix run nixpkgs.stress` worked fine
<elvishjerricco> So that doesn't make much sense...
<clever> ah, that might explain things
<clever> nix pins things to a core
<clever> check the output -vvvv adds to nix
<elvishjerricco> clever: The only thing that I see that seems relevant is `starting pool of 31 threads`
<elvishjerricco> (this is a 16core / 32thread machine)
<elvishjerricco> Ah ha! locking this thread to CPU 24
<elvishjerricco> Why though?...
<elvishjerricco> And why would that extend to the child process?
<clever> locking this thread to CPU 2
<clever> not sure why exactly nix does it, but that kind of thing always inherits to children
<clever> that also perfectly explains why it "randomly" got set when i was running stress
* samueldr files that knowledge in "could help someday"
<elvishjerricco> Ok. Now I can get back to figuring out why my fans don't spin up under load :P
<elvishjerricco> Is there a program I should use to manually try to spin up the fans?
<clever> elvishjerricco: lm_sensors can query some things, but i dont know how to control the fans on anything modern
<elvishjerricco> looks like lm_sensors comes with a `fancontrol` program. Dunno if that'll do the trick
<samueldr> hand-crafted or generated?
<ldlework> not sure what you mean
<ldlework> the image was made with tools
<samueldr> so, not manually made in e.g. inkscape or gimp, neat, what tools?
<ldlework> the legend was made in gimp
<ldlework> the keyboard layout was made with http://www.keyboard-layout-editor.com/
<samueldr> ah, I see
<ldlework> yeah it is a pretty cool tool
lassulus_ has joined #nixos-chat
<samueldr> ??!? I broke a git repo :/ (with backup, and not necessarily irreparably)
<samueldr> with some massaging with bfg to remove stuff, and a bit of rebase I apparently got an initial commit without an author date
lassulus has quit [Ping timeout: 252 seconds]
lassulus_ is now known as lassulus
<elvishjerricco> Alright. I disconnected and reconnected the fans to the fan header, and somehow that helped my temps a lot. Still not where they should be though, so for now I'm quelling my overclock until I get a new cable for the fans.
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nixos-chat
jtojnar has quit [Quit: jtojnar]
jtojnar has joined #nixos-chat
lopsided98 has joined #nixos-chat
jtojnar has quit [Read error: Connection reset by peer]
jtojnar has joined #nixos-chat
jtojnar has quit [Read error: Connection reset by peer]
jtojnar has joined #nixos-chat
ma27 has quit [Remote host closed the connection]
ma27 has joined #nixos-chat
disasm_ is now known as disasm
lopsided98 has quit [Ping timeout: 240 seconds]
lopsided98 has joined #nixos-chat
Guanin has joined #nixos-chat
Guanin_ has joined #nixos-chat
Guanin has quit [Ping timeout: 245 seconds]
kisik21 has joined #nixos-chat
Guanin__ has joined #nixos-chat
Guanin_ has quit [Ping timeout: 252 seconds]
<sphalerite> samueldr: what's the state of your postmarketos fiddling? Can you build it on nixos, or even with nix?
lopsided98 has quit [Ping timeout: 240 seconds]
lopsided98 has joined #nixos-chat
<samueldr> sphalerite: it never was meant to compile postmarketos directly; postmarketos was used to figure out the hard bits
<samueldr> right now, on armv7 (nexus 7 2013) and on aarch64 (zenfone 2 laser), it boots to initrd, and I stopped there (due to lack of time)
<samueldr> cross compilation was part of the issue I was facing
<samueldr> plainly: it didn't work right, too much stuff to fix
<samueldr> (for stage 2)
<samueldr> for stage 1, it worked well enough at the time
<samueldr> going forward I was probably going to forget about cross compiled stage 2, and focus on gettint it working
<samueldr> well, more: getting it useful
<manveru> yarn becoming even more like nix :P
tertl3 has quit [Quit: Connection closed for inactivity]
<joepie91> oof
<joepie91> just carried home 20kg of DIY supplies on foot
<joepie91> shit's heavy
<joepie91> but I do have most of the stuff I need now
jtojnar has quit [Read error: Connection reset by peer]
jtojnar has joined #nixos-chat
<manveru> joepie91: what're you building?
<joepie91> manveru: not so much building as fixing
<joepie91> the entire house, basically
<joepie91> this house is an absolute nightmare, very poorly maintained, everything's poorly done
<joepie91> I'll be moving out in not too long, and until then I'll be using it as my testing environment for DIY skills
<joepie91> :P
<joepie91> so I've done a run to the local discount store that has an unreasonable amount of DIY supplies
<joepie91> and got most of the stuff I need there
<manveru> :D
<manveru> sounds fun
<joepie91> also picked up some cheap (5 EUR) whiteboards
<joepie91> one can never have enough whiteboards
<MichaelRaskin> Main problem with unmaintained houses is to avoid them becoming !!FUN!!, especially if electricity or (where applicable) natural gas infrastructure is badly maintained…
<manveru> i just wish cheap whiteboards weren't just crappy cardboard with some white paint here
<manveru> maybe i should get that whiteboard wall paint, but no clue how to get it off again when i move out
<joepie91> the 5 EUR whiteboard in question
<joepie91> 40x60cm or so
<joepie91> really thin MDF backing it seems
Guanin__ has quit [Ping timeout: 244 seconds]
Guanin has joined #nixos-chat
<zimbatm> manveru: haven't see it yet
<zimbatm> I'll take a look as soon as I have some free time :)
<manveru> :)
<manveru> sry, haven't really used js in half a year
Guanin_ has joined #nixos-chat
Guanin has quit [Ping timeout: 240 seconds]
Guanin_ has quit [Ping timeout: 246 seconds]
<infinisil> Oh god apple are you serious
<infinisil> You can now buy an iphone for $1450
jtojnar has quit [Quit: jtojnar]
<joepie91> that doesn't even register as particularly cheap or expensive to me anymore, for Apple
<joepie91> I have no idea what their pricing is like
<joepie91> I just assume they charge a lot
<joepie91> lol
jtojnar has joined #nixos-chat
jtojnar has quit [Quit: jtojnar]
<andi-> so a macbook is cheaper now?
<andi-> but since they only sell iphones and ipads with 3g/4g/.. you still need an iphone if you are an apple user?
<LnL> macbook? they didn't update any of the macs
<MichaelRaskin> And that price for iPhone is now with even less of the convertors to actual standard interfaces
<sphalerite> clever: I found a DOS utility that does replicated setup for the desktops I've been fiddling with!
<sphalerite> clever: so, I could use the DOS utility on freedos, or I could try and reverse engineer it..?
<sphalerite> how hard can that be, right?
<clever> sphalerite: reverse engineer would be fun
<sphalerite> clever: the util is 35K
<sphalerite> I have never reversed x86 code
<sphalerite> (I once sort of did some very very basic stuff with MIPS, but that's all)
<sphalerite> clever: you can do this sort of thing, right? Any hints for a complete RE newbie?
<ldlework> i have done some reverse engineering in the past
<sphalerite> ldlework: hints not from clever are also much appreciated :D
<ldlework> you have some DOS program you wanna reverse engineer?
<sphalerite> yep
<ldlework> Hmm I'm not sure any of the modern disassemblers/debuggers support DOS, but maybe.
<sphalerite> I've opened it up in radare2 and am just starting from the beginning
<sphalerite> reading and taking notes on what should be happening
<ldlework> ah nice
<ldlework> first you have to learn radare2
<ldlework> lol
<ldlework> that is one confusing interface
<ldlework> but radare2 is pretty awesome
<ldlework> sphalerite: what is the overall goal?
<sphalerite> ldlework: find out how the tool works and if I can replace it with a linux program :D
<sphalerite> the purpose of the tool is configuring the BIOS
<ldlework> hmm that doesn't sound too bad
<sphalerite> I'm guessing it just pokes some specific memory locations, which I think I can do from userspace with the appropriate kernel calls to get access to the memory?
<sphalerite> what do the ; RELOC 16 comments radare2 adds mean?
<clever> sphalerite: i suspect that means all relocations are in 16bit mode?
<sphalerite> clever: it has it in multiple places
<clever> when in doubt, ignore it :P
<sphalerite> um
<sphalerite> or al, al <-- isn't that a no-op?
<clever> it may update status flags
<clever> which conditional branching detect
<sphalerite> oh right, it is followed by a je
<sphalerite> but wouldn't that make it effectively an unconditional jump?
<clever> i think it depends on if the value was zero or not
<sphalerite> aaaah makes sense
<sphalerite> yes that does make sense — since it first loads a value into eax from memory, then does or al, al — so I guess that's just checking if the low bits of the value at that memory address are zero
<sphalerite> and I'm guessing it doesn't just load 8 bits of the value for alignment reasons?
<clever> probably
jtojnar has joined #nixos-chat
<sphalerite> hm so eax is set to [0x488c032] — does that mean al is the byte at [0x488c032] or the byte at [0x488c035]?
<sphalerite> Life would be so much easier if we only had one endianness
<clever> endianness only comes into play when loading the data to/from ram
<clever> oh yeah, and thats what your question is
<clever> not sure
<sphalerite> I think it would be the former, since x86 is little-endian i.e. low bits first?
<sphalerite> push ds; push cs; pop ds; is basically saving ds, then copying cs into it, right?
<sphalerite> oooh my first system call!
<joepie91> it's a... velcro strip dispenser
<joepie91> with tear-off strips and tear-off point on the dispenser and all
<joepie91> it boggles my mind how this was viable enough to mass-produce
<sphalerite> that does sound useful
<joepie91> the problem is: how many people are there, really, who have enough need for velcro strips to buy and use a whole dispenser for it
<joepie91> lol
<joepie91> tech enthusiasts with wired peripherals, sure, but beyond that?
<joepie91> and they've produced it in large enough quantities that this is outright the cheapest option for velcro cable ties in NL
<samueldr> I wonder if it's the same plastic dispenser used in cheap-o tape?
<sphalerite> probably?
<samueldr> (I'd bet yes, explaining the low cost)
<joepie91> samueldr: nop; slightly larger
<sphalerite> damn, I can't find any docs for this BIOS call :'(
<joepie91> and unlike the regular cheapo tape dispenser, it doesn't have the ridged-edge cutoff thing
<joepie91> it instead has a glued-on piece of sort-of-velcro
<joepie91> it's definitely a custom mold
<joepie91> samueldr: sphalerite: pictures are easier... https://imgur.com/a/BcSbopJ
<joepie91> obviously based off the same design, but definitely a dedicated mold given the lack of slot to place a 'blade' in
<samueldr> ooh, fun!
<sphalerite> oh boy, 0xaaaa5555. That doesn't look like a constant that's used for something actually productive, does it? :|
<ldlework> i don't get it
<ldlework> his editor literally has level lines
<sphalerite> ldlework: yes but those are hard to follow when there are so many of them
<ldlework> he needs rainbow-level-lines.el
<andi-> he works on a mirror.
<ldlework> yeah that would be drive me nuts
<andi-> Maybe it would solve my issue of never looking in the mirror before leaving the house...
<samueldr> ah, which reminds me
<samueldr> I received a fanmail about the logs site lately :/
<samueldr> (didn't know for sure if it was legit fanmail or cleverly hidden spam, so I didn't reply, probably looking like a huge dolt)
<sphalerite> lol
<sphalerite> achievement: translated some sort of obfuscation function (I think) from x86 disassembly into haskell!
<sphalerite> not sure if my translation is correct, but ssssshhhhhhhh
<sphalerite> why is as not recognising movl and xorl as instructions? :(
<sphalerite> ah I want xord
<sphalerite> and movw in this case
<ldlework> sphalerite: I hope your having fun. I absolutely enjoyed my three year obsession with reverse engineering.
<ldlework> you're*
<sphalerite> ldlework: uh oh.
<ldlework> wat
<sphalerite> ldlework: 3 year obsession
<sphalerite> blargh
<sphalerite> I'm trying to link a thing I wrote in assembly against a thing I wrote in C
<sphalerite> and it complains about an undefined symbol..?
<sphalerite> even though nm lists it as being defined in the object file that I got from as
<sphalerite> oooh I needed a .global
<ldlework> sphalerite: there was a multiplayer game called GunZ: The Duel, which was a third-person shooter/sword-play game wherein the networking for gameplay was COMPLETELY P2P
<ldlework> Which means owning the client would mean /owning the simulation itself/
<samueldr> YOU WERE THE F***R
<samueldr> :)
<samueldr> (it was a fun premise, but man was it unplayable)
<ldlework> Additionally, someone discovered that in an archive of an early release of the game, they accidentially shipped the debugging symbols database
<ldlework> Which, um, made reverse engineering the client *cough* considerably easier
<ldlework> I had a few minutes of fame when I created a single-byte patch to the client which removed the condition that checked that you had released the mouse button before it would handle another mouse press action.
<ldlework> Thereby allowing you to attack with your sword, literally as fast as the network would allow
kisik21 has quit [Ping timeout: 240 seconds]
<samueldr> I officially hate you ;)
<ldlework> I called it the "lawnmower" hack, because of the effect playing the attack sound overlayed a million times sounded like
<ldlework> I remember checking back in on the GunZ hacking scene like 5 years later, and people were STILL using the term "lawnmower hack" for that specific hack
<ldlework> it gets better
<ldlework> so one of the people who was mentoring me was basically a genius. they went on to work for blizard and helped create Warden. Anyway, they did amazing things.
<ldlework> They created a hack that teleported you around a chosen player, in a circle around them, so fast that it looked as if there were multiple copies of you around them
<ldlework> but you were just out side of attack range
<ldlework> so you could taunt someone while teleporting around them at light speed and they couldn't do anything
<ldlework> he did better than that though
<ldlework> he eventually got our whole reverse engineering team into a server on the anniversary of the group
<ldlework> and we're all standing in that one map where there is like that castle pillar in the middle of a big arena
<ldlework> we're all standing ontop and he goes check this out
<ldlework> He takes out his rocket launcher and shoots it into the sky and suddenly the text "Happy Anniversary" is rendered in Helveitca font, made of rocket pixels, flying up into the sky
<ldlework> that is probably the coolest hack i've ever been live witeness to :)
<ldlework> he implemented a rocket-driven truetype renderer
<ldlework> heh a video of my lawnmower hack, https://www.youtube.com/watch?v=n28-JEExv_Y
<sphalerite> BLARGH calling conventions
<ldlework> a potato video, but hey
<sphalerite> so I have a function with the signature uint32_t foo(uint32_t). It expects its arg in eax and returns through eax. Can I inform gcc of this and use it from C code?
<ldlework> you can always just inline
<ldlework> a practice you shoudl probably get comfortable with
<ldlework> it will save you lots of time
<sphalerite> inline assembly?
<sphalerite> I ended up just adapting the assmebly to load the arg from the stack at the beginning
<ldlework> yeah
<sphalerite> hm. r2 prints both `66355555aaaa` and `355555aaaa` as `xor eax, 0xaaaa5555`, but isn't the 0x66 "operand override" which changes the size of the operand?
lassulus_ has joined #nixos-chat
lassulus has quit [Ping timeout: 244 seconds]
lassulus_ is now known as lassulus