ChanServ changed the topic of #zig to: zig programming language | | be excellent to each other | channel logs:
craigo has joined #zig
reductum has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 260 seconds]
stripedpajamas has quit [Quit: sleeping...]
reductum has joined #zig
_whitelogger has joined #zig
reductum has quit [Quit: WeeChat 2.8]
reductum has joined #zig
layneson has joined #zig
ur5us has joined #zig
kevsmith has quit [Remote host closed the connection]
nephele_ has joined #zig
nephele has quit [Ping timeout: 264 seconds]
nephele_ is now known as nephele
satchmo has joined #zig
<leeward> ifreund[m]: thanks
waleee-cl has quit [Quit: Connection closed for inactivity]
<satchmo> how come you have to call cwd() before openFile()? It seems a bit awkward when you're opening a file that's not under the cwd
Aransentin has quit [Ping timeout: 245 seconds]
<daurnimator> satchmo: because that's actually how modern operating systems work
<satchmo> ah, i see
<daurnimator> it also encourages good practice: absolute paths should only rarely be used
<companion_cube> wait, what?
<daurnimator> satchmo: also note that `cwd()` is effectively "free": on posix systems its a constant; on windows its a TEB reference.
<companion_cube> relative paths should rarely be used, you mean?
<daurnimator> companion_cube: no. absolute should rarely be used
<companion_cube> I strongly disagree :D
<companion_cube> "current directory" should not even be a thing outside a shell :/
<companion_cube> (it's not even thread-local, is it?)
<daurnimator> companion_cube: I didn't say cwd relative
<satchmo> daurnimator: didn't know that, that's pretty interesting
<daurnimator> relative to *some other fd* -> e.g. installing a program, you should take a `--prefix=/usr` argument -> and the install everything relative to that.
<companion_cube> ah, I see.
<companion_cube> (well I mean, I'd rather have a package manager do that for me anyway)
<companion_cube> (like, pacman/yay)
<companion_cube> just use `install` instead of copy
<daurnimator> so you'd do: `const install_prefix = try fs.cwd().open(prefix_arg_from_user, ......)` (which could be relative or absolute!) -> and then you would install everything into that
<daurnimator> just giving an example here... and somewhere out there is the code that implements your package manager
<satchmo> If only absolute paths will be passed it would probably be better to use openFileAbsolute() though right?
<daurnimator> satchmo: perhaps? though IIRC that's just a wrapper around fs.cwd().open anyway
<satchmo> oh you're right, it is just a wrapper lol
<satchmo> now, what if O_CLOEXEC needs to be passed as an open flag? Would I have to resort to since OpenFlags doesn't have a field for it?
<daurnimator> `O_CLOEXEC` is the default in zig
<satchmo> oh is it?
<satchmo> whaaaaaaaaaat
layneson has quit [Quit: WeeChat 2.8]
<satchmo> oh it is, nicee
<companion_cube> daurnimator: anyway, most of the time, I normalize paths as soon as possible :)
Zloudef has joined #zig
jmiven_ has joined #zig
bbrittain has joined #zig
<daurnimator> companion_cube: best to never normalize until the last minute
<satchmo> ah shoot, apparently some people need to open /dev/kvm without O_CLOEXEC..
jmiven has quit [*.net *.split]
ky0ko has quit [*.net *.split]
mixi has quit [*.net *.split]
bbrittain_ has quit [*.net *.split]
danyspin97_ has quit [*.net *.split]
Cloudef has quit [*.net *.split]
Zloudef is now known as Cloudef
<satchmo> guess its for me
<daurnimator> satchmo: "need"?
pltrz has quit [Ping timeout: 240 seconds]
fengb has quit [Ping timeout: 260 seconds]
ifreund[m] has quit [Ping timeout: 252 seconds]
<daurnimator> however, we should have an option in OpenFlags to allow non-O_CLOEXEC if they want
Dominic[m] has quit [Ping timeout: 252 seconds]
D3zmodos has quit [Ping timeout: 240 seconds]
sammich has quit [Ping timeout: 240 seconds]
AlexMax has quit [Ping timeout: 240 seconds]
metheflea has quit [Ping timeout: 256 seconds]
Bastian[m] has quit [Ping timeout: 256 seconds]
alva has quit [Ping timeout: 256 seconds]
watzon has quit [Ping timeout: 256 seconds]
return0e[m] has quit [Ping timeout: 260 seconds]
hamoko[m] has quit [Ping timeout: 244 seconds]
afontain_ has quit [Ping timeout: 252 seconds]
BaroqueLarouche has quit [Ping timeout: 252 seconds]
pmwhite has quit [Ping timeout: 252 seconds]
Snektron has quit [Ping timeout: 272 seconds]
<satchmo> daurnimator: apparently. some comments in rust-vmm say "one usecase is opening /dev/kvm before exec-ing into a process with seccomp filters"
<daurnimator> satchmo: you can un-set O_CLOEXEC after open.
<daurnimator> satchmo: infact std.ChildProcess has something for that already IIRC
<satchmo> I'll probably do that then, thanks!
stripedpajamas has joined #zig
<satchmo> it's funny though, rusvmm has kvm::new() always open /dev/kvm with O_CLOEXEC even with their comment
BitPuffin has quit [Ping timeout: 244 seconds]
<daurnimator> essentially the only times you should use `open` without O_CLOEXEC are: 1. after fork() and before exec(). 2. if you're writing a shell
sammich has joined #zig
BaroqueLarouche has joined #zig
D3zmodos has joined #zig
Snektron has joined #zig
Dominic[m] has joined #zig
ifreund[m] has joined #zig
fengb has joined #zig
pltrz has joined #zig
AlexMax has joined #zig
ky0ko has joined #zig
joey152 has quit [Remote host closed the connection]
Bastian[m] has joined #zig
pmwhite has joined #zig
hamoko[m] has joined #zig
alva has joined #zig
BitPuffin has joined #zig
afontain_ has joined #zig
metheflea has joined #zig
return0e[m] has joined #zig
satchmo has quit [Ping timeout: 246 seconds]
dimenus has quit [Ping timeout: 246 seconds]
Kingsquee has joined #zig
foobles has joined #zig
xackus_ has joined #zig
xackus_ has quit [Ping timeout: 265 seconds]
dddddd has quit [Ping timeout: 265 seconds]
Invader_Bork has joined #zig
<scientes> or in systemd
<pixelherodev> ?
<scientes> systemd socked activation
<scientes> where it passes fds to the child process
<daurnimator> scientes: that's case 1. (systemd does the fork and exec)
reductum has quit [Quit: WeeChat 2.8]
<scientes> oh yeah, you are right
* scientes use to contribute to systemd
<daurnimator> so did I...
slowtyper has joined #zig
dongcarl has quit [Read error: Connection reset by peer]
<pixelherodev> ...
<pixelherodev> and here, I thought we were friends.
<pixelherodev> :(
aerona has quit [Quit: Leaving]
stripedpajamas has quit [Quit: sleeping...]
stripedpajamas has joined #zig
foobles has quit [Ping timeout: 245 seconds]
<leeward> I have a [size]u8 called chunk and want to read from an InStream in size-sized chunks. Is there a better way than `var bytes: usize = size; while (bytes == chunk.len) : (bytes = stream.readAll(chunk[0..]) { // do stuff }`
<leeward> ?
<pixelherodev> There should be a readBuf or something, no?
<leeward> There's a readAllArrayList...
<pixelherodev> readBytesNoEof?
<leeward> I don't need to hold all the chunks in memory at once though.
<pixelherodev> // Reads exactly `num_bytes` bytes and returns as an array
<pixelherodev> Is readByesNoEof not what you want?
<pixelherodev> while (istream.available()) { chunk = istream.readBytesNoEof(size); } `?
<leeward> I don't think it is. If the number of bytes remaining doesn't fill the buffer, I still want them.
<leeward> ooh, istream.available() helps though
<leeward> except I don't see that in in_stream.zig.
<pixelherodev> Then yeah, I think you're doing it right
<pixelherodev> I don't think there is an available(), actually
<leeward> My issue is that the loop is awfully awkward.
<pixelherodev> If you're reading from a file, you could stat() the file ahead of time
<leeward> It's a stream; could be a file or stdin.
<pixelherodev> Then yeah, no way of knowing size ahead of time that I know of (at least, not in stdlib currently)
<leeward> For the moment, it's actually stdin
<pixelherodev> Well, gl
<leeward> thanks
_Vi has joined #zig
<daurnimator> leeward: you don't want short reads?
<daurnimator> leeward: what are you going to do with the chunks after you have them?
<leeward> daurnimator: They're not necessarily short; they're chunk sized.
<leeward> I'm decrypting them.
ur5us has quit [Ping timeout: 260 seconds]
<daurnimator> leeward: exactly chunk sized? or max?
<leeward> Exactly chunk sized.
<daurnimator> > I don't think it is. If the number of bytes remaining doesn't fill the buffer, I still want them.
<leeward> The encryption process spits out an integer number of chunks.
<leeward> Oh, yeah, I was thinking about the encryption side.
<leeward> So if I'm encrypting, the last chunk is allowed to be smaller.
<daurnimator> if you're encrypting then why exactly chunk sized?
<leeward> For the reads? For simplicity.
<leeward> I don't care about speed yet; when I do, I can buffer the input.
<daurnimator> reads of encrypted or decrypted?
<daurnimator> in general, you shouldn't care about amount of data unless you have to
<daurnimator> ask for (e.g.) 4096 bytes; if you get less then work with what you got
<leeward> The encryption side reads plaintext in chunks, and spits out chunk+stuff sized chunks.
<leeward> If there's more coming, I don't want to waste the rest of the chunk. Cryptotext can't be compressed.
<leeward> er, ciphertext
<leeward> It must be getting late.
<daurnimator> if you're e.g. listening to stuff I typed into the terminal
<daurnimator> then I might not type anything for a while
<leeward> Right, and if you don't, I don't want to generate another block of encrypted data until you've typed enough to fill a chunk, or sent an EOF.
<daurnimator> what if I've typed in e.g. a command and I'm waiting a the reply? (I don't know anything about your usecase)
<leeward> I can imagine a tool where that's not true, but it's not this tool.
<leeward> Yeah, not a thing I'm worried about. This is for encrypting files, not interactive terminal sessions.
<daurnimator> and does your encryption algorithm need a whole block? or is it happy emitting data as it goes?
<leeward> It needs a whole block.
<leeward> Trust me, I don't want to read a little bit, do stuff with it, then read more. I need whole chunks for everything but the last chunk.
<daurnimator> looks like you want `while (true) { const bytes = try stream.readAll(&buffer); encrypt_block(buffer[0..bytes]); if (bytes < buffer.len) break; }`
<leeward> Yeah, that's actually what I ended up with.
<leeward> It feels like an appropriate place for a do..while, but Zig doesn't have those.
<leeward> Oh hey, &buffer is the same as buffer[0..]?
reductum has joined #zig
<leeward> where buffer is `var buffer: [number]u8 = undefined`?
<daurnimator> not quite. &buffer would give a `*[4096]u8`; while `buffer[0..]` gives a `[]u8`
<leeward> hmm
<daurnimator> `*[4096]u8` can cast to a `[]u8` though
<leeward> Ahh, ok
<daurnimator> essentially its a slice with comptime-known length
<leeward> That is a good thing to know. I had been slicing all my arrays to pass them around.
<daurnimator> slicing with comptime known indicies does the same thing
<leeward> Yeah, but it's 5 characters instead of 1.
<daurnimator> --> `buffer[0..buffer.len]` will give a `*[4096]u8` I think?
<daurnimator> maybe the [0..] even does the same thing
<daurnimator> I'd have to check
<leeward> Having problems because the standard library code you're looking at is newer than the version you're building against: fun times.
student069 has quit [Quit: ZNC 1.8.0 -]
<leeward> nifty, it works
<leeward> Is there a canonical Zig equivalent of getopt?
<daurnimator> no
wootehfoot has joined #zig
craigo has quit [Ping timeout: 246 seconds]
reductum has quit [Quit: WeeChat 2.8]
ttmrichter has joined #zig
<scientes> also zig's arg handling is a bit strange
<scientes> I wanted to write something so that you get what you want from the ARGV vector, and then it actually shifts back the stack pointer and writes over it
<scientes> because the ARGV vector size is unbounded to a percentage of the stack size
<scientes> and it can be huge, and there is alot of waste, like ARGV[0] is passed twice
<pixelherodev> ?
<pixelherodev> What passes it twice?
<scientes> one is unforgable
<pixelherodev> ?
<scientes> ARGV[0] can be set by the calling process
<scientes> and it is also passed in another place that is what was actually passed to execve()
<scientes> pixelherodev, the kernel passes alot to new processes, which is all placed before the stack pointer
<scientes> this means that environment variables are very wasteful of RAM
<pixelherodev> But that's not argv[0].
<pixelherodev> argv[0] can be literally anything.
<pixelherodev> It doesn't actually have to be the program path
<pixelherodev> You can pass oasudhauahoa as the argv[0] to a called process
<pixelherodev> argv[0] shouldn't really be relied upon
<scientes> well all this stuff takes up memory
<scientes> and because it is variable and unpredicatable it means you have to overcommit stack space
<scientes> so I wanted to have zig reset the stack pointer to write over ARGV and ENV (after copying what it wants)
<pixelherodev> There's... really no need?
<pixelherodev> If you're in an environment with argv (linux-esque), you can afford to waste - what, a few hundred bytes?
<pixelherodev> There's plenty of bigger fish to catch here
<scientes> pixelherodev, it can be up to 25% of the stack size
<scientes> but yeah, bigger fish
<scientes> it is just after all the analness again unbounded stacks (which I never understood
<scientes> I was always like--why not make stacks massive---like 4GB on 64-bit
<pixelherodev> Because on older microarchs it was really really inefficient
<pixelherodev> If you need that much memory, you shouldn't be using the stack at all
<scientes> but it is allocate-on-demand
<pixelherodev> On newer archs (like Ryzen), the Stack Engine means that it's mostly fine though, but still nowhere near as efficient
<pixelherodev> Yes, but it's not about the allocations
<pixelherodev> The pushes and pops themselves are slower
<pixelherodev> Though I suppose that's not really accurate for generated code as muhc
<pixelherodev> much*
<pixelherodev> since it does it in chunks and does e.g. `add %sp`
dermetfan has joined #zig
dermetfan has quit [Client Quit]
dermetfan has joined #zig
stripedpajamas has quit [Quit: sleeping...]
<pixelherodev> Whoaa
<pixelherodev> After switching to Musl, ZLS still just... *works*
<pixelherodev> I didn't have to recompile it
<pixelherodev> (though Kak-LSP had issues)
<pixelherodev> Statically linked by default, apparently?
<pixelherodev> :)
st4ll1 has quit [Ping timeout: 256 seconds]
st4ll1 has joined #zig
ur5us has joined #zig
jmiven_ is now known as jmiven
ur5us has quit [Quit: Leaving]
daex has quit [Quit: /me 's znc kicks the bucket]
daex has joined #zig
dingenskirchen1 has joined #zig
dingenskirchen1 has quit [Remote host closed the connection]
dingenskirchen has quit [Ping timeout: 260 seconds]
greenfork has joined #zig
ifreund has joined #zig
<tdeo> pixelherodev: yeah, i really hate depending on libc unnecessarily and there aren't really many languages that can do that
<tdeo> i wish it was easier to do in rust
<tdeo> most of the ecosystem is based on raw calls to libc because that's the level of platform abstraction they chose
<tdeo> and not more os abstraction in the standard library, which would let you switch out libc/direct
<pixelherodev> In other words
<pixelherodev> Zig = <3
<tdeo> i would write more c if i didn't hate null terminated strings so much
<tdeo> adding slices to c would immediately make it 2x better
<pixelherodev> True
<pixelherodev> I mean, extending C is rather easy if you have your own compiler, but, it won't be standard
<pixelherodev> You'd need GNU-level pull
<pixelherodev> Get it in GCC or Clang and you're good
<tdeo> i have been thinking of trying to write a language
<pixelherodev> Lol, nice
<tdeo> basically c's features with rust's syntax plus simple generics and slices
<pixelherodev> It's a nice age for langdev :D
<pixelherodev> Zig, Nim, Rust, Jai, Odin, and a few others that I know of
<tdeo> i have some of the grammar written but not much actually written because i hate writing parsers
<tdeo> not much actual code written*
<pixelherodev> Heh
<pixelherodev> One sec
alecthomas has joined #zig
<alecthomas> hello
greenfork has quit [Quit: WeeChat 2.8]
<tdeo> hi
<pixelherodev> Greetings! :)
alecthomas has quit [Remote host closed the connection]
Kingsquee has quit [Quit: Konversation terminated!]
belgin has left #zig ["Leaving"]
alecthomas has joined #zig
alecthomas has quit [Remote host closed the connection]
dingenskirchen has joined #zig
alecthomas has joined #zig
FireFox317 has joined #zig
FireFox317 has quit [Client Quit]
alecthomas has quit [Remote host closed the connection]
dddddd has joined #zig
<drp> I am compiling the bootstrap and zig on powerpc64le-unknown-linux-gnu and get almost exactly the same error on stage 2, is there a way to send this without using github?
<pixelherodev> DCC, but please don't :P
<pixelherodev> What's the crux of the issue?
<pixelherodev> ohh wait
<pixelherodev> drp: are you asking for an alternate method of reporting the issue?
<drp> pixelherodev: yes
<pixelherodev> Wait a sec
<pixelherodev> why haven't I been getting mail for it??
* pixelherodev facepalms
<pixelherodev> overeager filter
<pixelherodev> that's why
<drp> lol, you've heard of email based development, now have irc development with patchfiles sent via DCC and dances! :D-\-<
<pixelherodev> I'd take you to court for emotional abuse or something
<drp> basically, when doing the zig compile I get ./lib/std/time.zig:146:23: error: container 'std.os' has no member called 'timespec'
<drp> and the bootstrap starts at ./lib/std/time.zig:146:23: error: container 'std.os' has no member called 'timespec'
<drp> but then gets to the same timespec issue a few lines down
Invader_Bork has quit [Ping timeout: 256 seconds]
<drp> which has be kinda suprised as I would have assumed the issue would happen before stage2, running zig0 appears to work
<pixelherodev> drp: mispaste?
<pixelherodev> ahh wait I see
<pixelherodev> ... wait no
<pixelherodev> you gave the same error both times?
<pixelherodev> what OS are you targeting?
<drp> I am running void linux on ppc64le
<pixelherodev> one sec, going to take a look
<pixelherodev> uhh
<pixelherodev> hmm
<pixelherodev> you get that issue building master, too?
<drp> haven't tried to be honest, I've only tried 0.6.0
<pixelherodev> Ahh
<pixelherodev> Try with master, maybe?
<pixelherodev> Willing to bet it's been fixed
<pixelherodev> Bootstrap won't be updated yet though :(
<drp> yeah well I don't really need bootstrap, I just thought I'd give it a go
<drp> famous last words
<drp> nah same error
<pixelherodev> cruds
<pixelherodev> Submit the full log to the mailing list and I'll take a look
<drp> do you prefer attachments per log or just a superlong single email?
tralamazza has joined #zig
tralamazza has quit [Client Quit]
tralamazza has joined #zig
st4ll1 has quit [Ping timeout: 256 seconds]
* pixelherodev shrugs
<pixelherodev> Doesn't matter to me
dimenus has joined #zig
drp has quit [Remote host closed the connection]
riba has joined #zig
sacredbirdman has joined #zig
r4pr0n has joined #zig
<sacredbirdman> Hi, what's the current method to traverse a directory? I found some code in zig/tools/process_headers.zig but it does not seem to be current/valid
<r4pr0n> ifreund: hey, I saw your talk and q&a about river and i was wondering: what do you think about implementing "fancy compositor features" like e.g. blur? you said that with wayfire you could do stuff like that, but the problem is if you use wirefire for that, you have to use it for the whole compositing, right?
dermetfan has quit [Ping timeout: 260 seconds]
<ifreund> r4pr0n: no plans to do so at the moment, though perhaps down the line once the core functionality has stablized
<ifreund> note that wayfire has powerful plugin system which should be able to accomplish just about whatever you want with regards to window management
<r4pr0n> well besides that I would like a window manager exactly like river I guess, switched from sway to dwm recently, because of the dynamic window management but also because I missed some of the modularity of x11 like e.g. that you can use compton
<ifreund> yeah, I wouldn't be opposed to supporting "fancy" effects in river, but dont plan to work on stuff like that anytime soon
<r4pr0n> I wasn't expecting that, those effects are pretty much the most low priority stuff there is at the moment, just wanted to ask given that the sway author said that it was out of scope
<companion_cube> I still just use i3 🤷
<companion_cube> does wayland allow to have different font size on different screens?
<ifreund> sure
<tdeo> yeah, wayland compositors generally have much better multi-dpi support than xorg does
<afontain_> different dpi settings, yes
<tdeo> assuming the question i answered is what you meant to ask
drp has joined #zig
<tdeo> something something just a protocol
<ifreund> yup
<dimenus> xwayland is still blurry even on sway atm, but there's MRs out there to resolve that as well
<dimenus> sway in general though is easily the best with mixed dpi imo
<companion_cube> I just have a high density laptop screen, and less dense second monitor
<companion_cube> so that might be the one thing that makes me re-try sway instead of i3…
<ifreund> well, i just got the `map` command implemented in river
<ifreund> time to de-hardcode all the keybinds
<tdeo> i thought of the functional sense of map first and wondered how that'd work
<ifreund> heh
<ifreund> map as in the kakoune command :)
<companion_cube> so I missed the context, is river a WM in zig?
<tdeo> compositor/display server being the correct terms
<companion_cube> ugh, whatevs :p
<dimenus> i've been working on my wayland vnc client and I found a couple bugs in wayvnc :P
dermetfan has joined #zig
<companion_cube> it's the thingie that manages windows
<tdeo> i think it would be cool to actually have a window-manager based wayland compositor
<gonz_> What are the practical upsides to wayland?
<tdeo> even though it's a bad idea in most situations, it's cool to be able to make something quickly
<gonz_> I never ran it when I ran Linux
<dimenus> gonz_: perfect frames every time
<companion_cube> gonz_: I guess DPI mixing is the oe…
<companion_cube> one*
<dimenus> mixed dpi support. leaner.
<tdeo> i like that the whole thing is just way, way simpler and more efficient
<gonz_> DPI mixing sounds useful, I suppose. Does it actually work or is it one of those "Yeah, this is possible in certain circumstances"?
<dimenus> it's a 98% solution on sway, kwin is getting there as well
<ifreund> i mean, river is also a window manager, not just a compostior/display server
<tdeo> ha, xorg is where it only works if you spend a week configuring it and only for half your apps
<tdeo> works just fine on most/all compositors
<companion_cube> gonz_: yeah otherwise it makes other things more difficult, like screenshots and whatnot :/
<tdeo> other than blurry x windows as mentioned
<dimenus> screenshots are a solved problem
<dimenus> screen sharing however is still getting there
<dimenus> the spec is written but no major vendors have it implemented
<tdeo> it's sad that gnome hates actually using wayland and loves dbus
<tdeo> because they refuse to implement things like a wayland screenshot extension
<tdeo> but i'm happy with sway and its wayland support for gamma control/screenshots/etc
<gonz_> Display stuff was always a bitch to me on Linux, so it's not as if I'm doubting that there are improvements to be made. But most alternatives to things usually just present new issues.
<ifreund> they just want a dbus-based display protocol
<companion_cube> also you have to give up on all the tools you know in X
<companion_cube> that annoys me :/
<tdeo> what are you missing?
<tdeo> as long as you're not using gnome, there's usually some alternative
<tdeo> recently working on a clone of an X tool myself, actually
<companion_cube> rofi, scrot, I guess
<companion_cube> I got my habits
<ifreund> yeah, so you got wofi, and grim
<tdeo> ah yeah the equivalents aren't exactly the same but similar
<dimenus> sway has a wrapper script for grim/slurp in their repo
<dimenus> works great
<companion_cube> yeah but does wofi accept the extensions of rofi?
<companion_cube> there's a lot of small changes
<tdeo> wofi is gtk, which kinda bothers me, but i'll probably make my own replacement eventually too
<ifreund> yeah i use bemenu personally
<tdeo> in zig, hopefully
<pixelherodev> Sway in general is just the best
<pixelherodev> I use it always
<tdeo> sway's latency tuning has gotten so good
<pixelherodev> well
<ifreund> been considering writing a fuzzy wayland dmenu in zig, but i have too much to do right now
<pixelherodev> except right now
<dimenus> drew's challenging at times, but those guys produce excellent code
<pixelherodev> because alacritty is broken
<tdeo> what's broken
<ifreund> pixelherodev: are you using master branch alacritty?
<pixelherodev> compiling it
<pixelherodev> Rust is broken.
<pixelherodev> I'm on musl :P
<pixelherodev> So... a lot of shit is broken.
<pixelherodev> Or requires patches.
<tdeo> i want to make a gpu terminal emulator eventually
* companion_cube uses kitty…
<tdeo> there's just so many things i want to make
<companion_cube> tdeo: alacritty does that
<pixelherodev> I have a patch I stole from Alpine (thanks to someone in #gentoo-hardened who pointed me the right way)
<pixelherodev> for Mesa
<tdeo> yeah but in zig
<pixelherodev> Is Kitty any good?
<tdeo> i do not like kitty because it is written in python
<companion_cube> I like it
<companion_cube> it's reasonably fast
<companion_cube> and it has tabs :-°
<afontain_> I'm using alacritty on Alpine, works for me :P
<afontain_> (and sway)
<ifreund> i mentioned master branch alacritty because it now uses frame callbacks on wayland
<dimenus> what were they doing before?
<tdeo> oh does it? i have to update
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
<ifreund> dimenus: just rendering whenever they felt like i guewss
<dimenus> heh
<tdeo> not for any reason, just better behaved wayland support seems like something to update for lol
<ifreund> it also has a "vi mode"
<gonz_> > drew's challenging at times
<gonz_> Understatement of the year so far.
<dimenus> did he do something new?
<companion_cube> he's just very rough on the edges
<gonz_> No, not that I know of. I think there's enough historical record to say it's an understatement.
<gonz_> Even when you agree with him a fair amount it's almost impossible to take his side, IMO.
<companion_cube> depends on the issue, I liked his post on accessibility via simplicity
<gonz_> I like his composite view of what (likely) makes good software, but only a minor part of the arguments he would make for it.
<gonz_> Because he makes completely ridiculous leaps of logic to make those points, usually.
<companion_cube> ah, this I think I can agree on
<gonz_> His post about how Rust isn't an alternative to C is agreeable in premise, but almost none of the arguments make any sense.
<companion_cube> (I'm still salty on the rust post)
<companion_cube> ahah yeha
satchmo has joined #zig
<fengb> “Concurrency is generally a bad thing” wat
<companion_cube> yeah his is funny
<companion_cube> (the argument against rust is hilarious there too)
waleee-cl has joined #zig
<fengb> Concurrency is hard. No sense making it easier!
<companion_cube> if your compiler makes it easier, it's lying to you
dimenus has quit [Quit: WeeChat 2.8]
dimenus has joined #zig
<fengb> I generally agree with this premise... but he makes it impossible for me to agree with him lol
<fengb> Share nothing is a lot easier to scale but the way he’s trying to convey it is...
<companion_cube> I mean sometimes, threads with shared memory is the most efficient
<companion_cube> for compression, encoding, or whenever communication costs would be too high
<fengb> He must love JS’s model of concurrency then! :P
<companion_cube> for some reason he really hates rust
<scientes> > On a long enough time-scale, all programs will be proven incorrect.
<scientes> hahahahaha
danyspin97 has joined #zig
<fengb> I've seen people focus on simplicity by ignoring complicated things
<fengb> Not saying that's what ddevault is doing... but you see this often around Clojure
<companion_cube> kind of, though
<companion_cube> sometimes things are complicated
<fengb> Yeah I agree
<drp> I think some scales of the two sides haven't been taken into account with simplicity vs complexity
<drp> complexity is clearly winning, yes some things are just complicated but we're lightyears away from defending your complex algo from a marauding suckless horde
danyspin97 has quit [Quit: ZNC -]
<fengb> I think overengineering and complexity is a big problem yes
<fengb> "Accidental complexity"
<fengb> But that doesn't mean you can just sweep all complexity under a rug
<companion_cube> "suckless horde" I like that
<fengb> And a lot of accidental complexity comes from not understanding the problem space, and not choosing the wrong tools
danyspin97 has joined #zig
<ikskuh> fengb: true dat
<drp> accidential is pretty broad
<drp> is electron accidentially complex? I am pretty sure their goal has a lot of purposeful complexity.
<fengb> No, but it solves a problem: enabling native-ish UI for web developers
<fengb> Can we do better? Absolutely. But that doesn't mean it doesn't serve a purpose and should be destroyed
<fengb> And unfortunately, Electron is actually one of the better cross-platform UI systems out there
<fengb> This sucks a lot
<ikskuh> yes
st4ll1 has joined #zig
<pmwhite> Solving a developer problem doesn't make it not accidental, right? Essential complexity is what solves *end-user* problems.
<drp> It's one of the better if you're the big 3, electron is absolutely not the best if you like BSD
<fengb> I mean Electron makes it easy for developers. No other UI toolkit does
<fengb> And yes it's awful for endusers
<pmwhite> My experience with XAML was not too bad. Isn't that cross-platform now?
<pmwhite> But it sounds like you're saying electron makes it easy for developers to awful programs, which is amusing to say the least.
<pixelherodev> ij wit
<pixelherodev> whoops
<pixelherodev> uh wut
riba has quit [Ping timeout: 260 seconds]
<pixelherodev> Electron is awful on every OS
<pixelherodev> If 'easy for developers' is a priority at the expense of end users, you're doing it wrong.
<pmwhite> s/to awful/to write awful
<pixelherodev> But yeah, I second what pmwhite said
<ifreund> hah, fun bug
<pixelherodev> Making it easy to make shit isn't an accomplishment.
<drp> I never made anything serious with python tkinter but I enjoyed it
<ifreund> i exec'ed arg 0 instead of arg 1
<nycex> it's not a bug if it's a cool-looking feature ^^
<ifreund> if it's not clear, what's happening is river is imediately starting another nested river session on start up
<ifreund> recursively
<nycex> it *efficiently* uses your resources maximally
<ikskuh> ifreund: killall
<ikskuh> most helpful tool :D
<ifreund> well, killing the outermost one is sufficent in this case, the rest panic
<ikskuh> ah, good :D
<ikskuh> hm
<ikskuh> is that good? :D
<ifreund> yeah, i think it's the right thing to do in this case
<ikskuh> probably, yes
<ifreund> when you're running as a wayland client and your compositor crashes you should exit
<ifreund> though maybe not panic,
<ikskuh> how does graphics output in wayland work?
<ikskuh> so, how does your compositor output graphics?
<ifreund> in this case wlroots is doing all the heavy lifting for me. They abstract over several backends including a wayland backend
<ifreund> so my compostior can function as a wayland client as seen here
<ifreund> it can also be run directly from a tty and use KMS
<ikskuh> ah
<ikskuh> i have to check out how to do some OpenGL or Vulkan output without wayland/X11
<ifreund> the protocol itself doesn't require any particular output method
<ikskuh> would be nice for non-desktop apps
<ifreund> an alternative might be something like cage, it's a very lightweight wayland kiosk
<ikskuh> hm, sounds good!
<satchmo> +1 for cage, it's slick
<ikskuh> so, wayland+opengl→ smooth graphics without tearing *and* kiosk mode
<fengb> I'm saying that people "valuing simplicity" don't understand developers
<fengb> And if you make your shit hard to use, people will flock to something easier
<fengb> If we had a toolkit that works better and is easy to use, people will use that
<fengb> But we don't. And most companies won't spend an extra 2x time to work around developer issues
<nephele> ifreund, huh? shouldn't you try to reconecct to the compositor?
<ifreund> how? the compositor crashed
<ikskuh> restart compositor?
<ikskuh> then reconnect
<ikskuh> way better than losing all of the session content
<ifreund> i don't know of any wayland clients that do that tbh
<companion_cube> what's "tearing"?
<drp> strangely there appears to be 10 times more documentation on wayland compositors than wayland clients
<ifreund> companion_cube: tearing is when you get parts of two separate buffers rendered on your screen, causing some kind of discontinuity or "tear" in the frame
dimenus has quit [Quit: WeeChat 2.8]
<companion_cube> hmm ok, is that a common thing?
<ifreund> companion_cube: on X11 yes
<ifreund> though using a compositor helps things a lot afaik
<fengb> Ah tearing. Does X11 not have double buffering?
<companion_cube> maybe I'm just lucky…
<ifreund> drp: drew's wayland book is mostly focused on the client side
<fengb> I had to fix that in my emulator :P
<drp> it used to be much more common than it is today
<pmwhite> if you want to see tearing, just scroll your web browser.
<drp> ifreund: thankyou, I bought the book back when it was under paywall
<drp> it was more of a comment on the state of documentation in wayland rather than there being no documentation on wayland clients
<ifreund> ah like the docs in wayland.xml itself?
<drp> as in generally on the web
<drp> searching for wayland examples leads to compositors more than clients
<ifreund> i mean part of that is probably that clients are a lot simpler, so they don't need as much in the way of docs
<ifreund> if you're looking for examples this one is pretty up to date
<ifreund> also see the weston example clients
dermetfan has quit [Ping timeout: 272 seconds]
<satchmo> oh my god
<satchmo> I've been trying to use fcntl all day but couldn't find it in stdlib, turns out i was typing fnctl
racoon is now known as washbear
craigo has joined #zig
stripedpajamas has joined #zig
<drp> ifreund: thank you, I didn't have that hello-wayland, bookmarked.
foobles has joined #zig
mixi has joined #zig
mixi has quit [Client Quit]
mixi has joined #zig
gazler has quit [Remote host closed the connection]
gazler has joined #zig
satchmo has quit [Ping timeout: 252 seconds]
joey152 has joined #zig
satchmo has joined #zig
benjif has joined #zig
xackus_ has joined #zig
<scientes> why is my function getting a .exit that looks for stderr and writes to it?
<scientes> even with --release-fast
<scientes> it is a very simple function
<pixelherodev> A panic?
<pixelherodev> Paste the output also?
<pixelherodev> (has to be pure JS-free text, as I don't have a proper web browser right now :P)
<pixelherodev> `export`ed functions are definitionally C ABI, right>
<pixelherodev> ?
swills has quit [Ping timeout: 240 seconds]
<scientes> pixelherodev, generally
<scientes> maybe a few other ABIs too
<scientes> it would be nice to get a back-trace when hitting @compileError
<scientes> then i could figure out what is dragging in this debug stuff
<pixelherodev> wouldn't work
<pixelherodev> At least, not consistently
<pixelherodev> There can be multiple callers
<scientes> a what-includes-what back-trace
<scientes> yeah but i want to eliminate all callers
<scientes> and you could use a comptime check to filter
<pixelherodev> huh
<pixelherodev> that might be doable
<pixelherodev> implementable I mean
<pixelherodev> It'd basically mark the compilation as a failure and print a backtrace whenever run
<pixelherodev> then just
<pixelherodev> keep going
<pixelherodev> once semanisis is done, fails properly
<pixelherodev> ... there is no good way to contract semantic analysis
swills has joined #zig
<scientes> oh @compileLog already prints a back-trace
<pixelherodev> Neat :)
<scientes> oh no
<scientes> just the reference
Akuli has joined #zig
reductum has joined #zig
satchmo has quit [Ping timeout: 260 seconds]
<pixelherodev> Has there ever been a proposal to use function instead of fn?
<pixelherodev> `Favor reading code over writing code`
<pixelherodev> If there has, I'd rather not tread old ground
<ikskuh> i think `fn` is okay
<pixelherodev> That's what I said ten minutes ago :P
<pixelherodev> Then I thought it over some more
<leeward> For what it's worth, it's easier to read code when the lines are shorter. Meaningful names are important, but fn doesn't add cognitive load (for me, at least).
<fengb> We should use λ instead
<ifreund> i agree with leeward
<leeward> That would certainly shift the balance strongly towards easy to read and hard to write.
<pixelherodev> How about just `f`?
<leeward> I dislike single-letter names on principle, but other people don't so `f` seems more likely to collide with variable names.
<ifreund> it's also less readabel than fn
<ikskuh> <ifreund> i agree with leeward +1
<ifreund> I think fn-func is the sweet spot personally
<leeward> agreed
<ikskuh> fn-func(i: i32) i32
<ikskuh> perfection!
<leeward> I particularly like fun, but that's just because I like puns.
<ikskuh> i had fun once. it was aweful
<fengb> Zig doesn’t really understand pure functions so we should use procedure instead
<ikskuh> proc
<ikskuh> but procedures can't return values
<ikskuh> let's do the VHDL way!
<ikskuh> impure function(i:i32) i32
<fengb> Proction
<foobles> ok wait, in `fn`, is it `FunctioN` or `FuNction`
<leeward> Particularly in Zig, where function prototypes tend to be long (int main(int argc, char *argv[]) vs (fn main(argc: usize, argv: [][]u8) anyerror!usize)
<foobles> which N is it?
<ikskuh> Funcedure
<pixelherodev> Funcit
<ikskuh> funk
<pixelherodev> Functiot
<leeward> It's actually short for "the Following block defiNes a procedure"
<leeward> That's how I read it, anyway.
<fengb> My prof joked that nop stood for not-optimized-properly
<leeward> But nops execute so fast!
<leeward> 1 cycle on every architecture there is.
<scientes> lol
<pixelherodev> Nope.
<fengb> It’s the Uber business model: we don’t make anything per unit but we’ll make it up in volume!
<companion_cube> we lose money on each unit*
<scientes> they make plenty
<pixelherodev> Nops on x86 can take less than a cycle
<leeward> So fast!
<scientes> its just that they provide so little
<pixelherodev> scientes: IIRC, their most profitable division is Uber Eats
<pixelherodev> Which had a net profit of negative four hundred billion in a single quarter
<pixelherodev> So
<pixelherodev> Yeah.
<scientes> pixelherodev, mass transportation is profitable in south america
<pixelherodev> Too bad Uber is in North America then, isn't it?
<scientes> it is down there too
<companion_cube> uber loses money all the time
<scientes> you just need to change your expectations
<scientes> but it isn't about money
<fengb> But... self driving cars
<leeward> Their business model is "use VC money from people who don't care to put the competition out of business, then profit."
<pixelherodev> Well, it is about money
<scientes> it is about arrogance
<pixelherodev> It's about money.
<fengb> They’re manufacture the next market!
<pixelherodev> Just not for the company.
<fengb> You just don’t get it
<pixelherodev> How much does the CEO make?
<companion_cube> it's about the potential of making money in the future
<scientes> ok, wrong channel
<leeward> scientes: ++
mononote has joined #zig
mononote_ has joined #zig
mononote has left #zig ["Leaving"]
mononote has joined #zig
mononote has left #zig ["Leaving"]
mononote has joined #zig
mononote_ has left #zig ["Leaving"]
mononote has left #zig ["Leaving"]
mononote_ has joined #zig
dermetfan has joined #zig
alva has quit [*.net *.split]
foobles has quit [Remote host closed the connection]
return0e[m] has quit [Ping timeout: 240 seconds]
metheflea has quit [Ping timeout: 252 seconds]
hamoko[m] has quit [Ping timeout: 256 seconds]
afontain_ has quit [Ping timeout: 256 seconds]
BitPuffin has quit [Ping timeout: 256 seconds]
pmwhite has quit [Ping timeout: 256 seconds]
Snektron has quit [Ping timeout: 256 seconds]
fengb has quit [Ping timeout: 256 seconds]
sammich has quit [Ping timeout: 252 seconds]
AlexMax has quit [Ping timeout: 244 seconds]
ifreund[m] has quit [Ping timeout: 244 seconds]
BaroqueLarouche has quit [Ping timeout: 246 seconds]
D3zmodos has quit [Ping timeout: 246 seconds]
Dominic[m] has quit [Ping timeout: 246 seconds]
pltrz has quit [Ping timeout: 252 seconds]
Bastian[m] has quit [Ping timeout: 260 seconds]
r4pr0n has quit [Quit: r4pr0n]
sacredbirdman has quit [Remote host closed the connection]
<leeward> Is there a way to convert from a [*:0]u8 to a [:0]u8? @ptrCast doesn't, since slices aren't pointer types.
<pixelherodev> You can slice it
<pixelherodev> e.g. if it's currently called `ptr`
<pixelherodev> `ptr[0..len]`
<pixelherodev> std.mem.span(ptr) is the best way
<pixelherodev> It determines the length in the most efficient way possible and returns it as a slice
<pixelherodev> Found that one out this morning :)
<leeward> I don't see span in mem.zig.
afontain_ has joined #zig
<leeward> oh, looking at the wrong mem.zig
<leeward> I'm clever.
<ifreund> lol
<leeward> thanks
<leeward> That is exactly what I was looking for.
<leeward> I feel like there should be another document that's like the language introduction, but for the standard library. Want to write to a file? This is how. Want to interact with C libraries? Here are the essentials.
<leeward> Maybe I'll turn my cheat sheet into something with broader use.
<ifreund> yes, that would be very awesome to have
<ifreund> the standard library is planned to recieve a big cleanup and documentation effort shortly before 1.0
<leeward> Yeah, it needs it. Hard to do now with how much flux there is.
marijnfs has joined #zig
<marijnfs> I just found out about Zig Showtime. When was that event?
fengb has joined #zig
<fengb> The previous Saturday. Upcoming show is on Sunday
<ifreund> marijnfs: link here if you want to catch up
<marijnfs> nice is it several talks?
<marijnfs> Ah thanks
<marijnfs> I was wathcing the emulator talk but there is no master link say
<ifreund> yeah fengb and I were the speakers for the first event
return0e[m] has joined #zig
AlexMax has joined #zig
dtz has joined #zig
BitPuffin has joined #zig
Dominic[m] has joined #zig
pltrz has joined #zig
D3zmodos has joined #zig
pmwhite has joined #zig
hamoko[m] has joined #zig
alva has joined #zig
sammich has joined #zig
ifreund[m] has joined #zig
metheflea has joined #zig
Bastian[m] has joined #zig
Snektron has joined #zig
BaroqueLarouche has joined #zig
satchmo has joined #zig
<leeward> Is there a way to get access to all the build options in LibExeObjStep from within the program? Specifically, I want to know what the name of the executable will be.
satchmo has quit [Ping timeout: 244 seconds]
<leeward> Sweet, thanks
stripedpajamas has quit [Quit: sleeping...]
stripedpajamas has joined #zig
<marler8997> anyone else see some weird behavior with deps/SoftFloat-32/COPYING.txt and README.txt?
<marler8997> git says they have changed, but whenever I revert the changes, they still say they have changed
<pixelherodev> Update to master
<pixelherodev> It's been fixed
<pixelherodev> Which is good
<marler8997> I can't update to master because it says I need to handle those changes first :)
<pixelherodev> because it was really annoying
<pixelherodev> Uhh
<pixelherodev> hmm
<pixelherodev> okay so here's what you do
<pixelherodev> you add them, and commit
<pixelherodev> then, do a rebase and wipe them
<pixelherodev> ... after pulling
<pixelherodev> probably
<pixelherodev> I did something along those lines and it worked
<marler8997> adding/committing worked
<marler8997> what they heck was going on there?
<pixelherodev> Line endings.
* pixelherodev rolls eyes
<ikskuh> pixelherodev: \r\n
<pixelherodev> Exactly
<pixelherodev> It's ridiculous
<marler8997> but how does that mess up git?
<ikskuh> marler8997: read something about autocrlf ;)
<ifreund> git likes to automatically tweak your line endings on windows apparently
<fengb> Git likes to convert line endings
<marler8997> git checkout, git reset, and git restore all didn't work
<fengb> And then gets confused when it’s doing it
<marler8997> even deleting them and checking them out again, it still said they were modified
<marler8997> I'm familair with autocrlf
<marler8997> it's not enabled on my machine anywhere
<pixelherodev> Git.
<pixelherodev> Git uses it.
<marler8997> this is linux by the way
<leeward> Why must Git be such a...git?
<marler8997> I still don't understand though, I'm on linux, autocrlf is not enabled
<pixelherodev> It is.
<pixelherodev> I'm on Linux too
<pixelherodev> Just...
<pixelherodev> don't think about it too hard.
<pixelherodev> It only makes it worse.
<fengb> Git auto enables it
<marler8997> andrewrk: I'd like to make some progress on I've had this PR open for over a month: I'm not saying we should merge it but I'd like to work on this so if you have anything I can do to make progress, maybe implement a different solution/idea then let me know
<andrewrk> marler8997, ah yes. I'll take a look today and try to help make progress on it
<andrewrk> is #5151 related as well?
<marler8997> I don't like that the change requires changes to every single allocator, I would prefer smaller changes but I wasn't sure how to break it up
<marler8997> it's "related" in that it also deals with allocation
<marler8997> but they're really separate things
<marler8997> I think we should probably decide on issue 4431 before we look at 5151
<andrewrk> ok
<marler8997> 5151 is still more meant to be exploratory/experimental
<marler8997> I'm stepping away from my second job to have more time to work on personal projects and Zig. If you have other directiosn you need help with let me know as well
Akuli has quit [Quit: Leaving]
<xackus_> andrewrk slice layout is not guaranteed, right?
<fengb> 2nd job? Sheesh
<xackus_> ptr and len
<marler8997> Did it for about 6 months, was a good experience
<andrewrk> xackus_, correct and currently it is not planned to change that
<marler8997> With a company that uses D (not too many), but I'm moving away from the language as I see where the language is going
<xackus_> thanks for the confirmation
<leeward> Wow, there are companies that use D?
<andrewrk> xackus_, it is also not stabilized whether or not a (ABI-aligned) pointer to the individual fields (ptr/len) will be available
<leeward> Where are they hiding?
<marler8997> There's a few, a game developer, some investments companies and other tech/tooling companies
<marler8997> For them I wrote a tool that allows you to call managed code from a native process written in D. Was thinking of supporting Zig as well if the need ever comes up, but it might not.
<xackus_> the company i work at has some production code in a custom language
<marler8997> here if there are any .NET developers interested:
<xackus_> i haven't touched it though
<xackus_> but from what i've heard it's no zig
<pixelherodev> Which one is 4431?
<leeward> I worked at a place that liked to build DSLs for a while. The tools were amazing.
<marler8997> Improve Allocator interface...
<pixelherodev> Ahh gotcha
<xackus_> problems start when the only person maintaining the language quits
<leeward> It's true, but we had 3 people who did that kind of stuff, one of whom was the CTO.
<leeward> Of course, all 3 of us are no longer there now.
stripedpajamas has quit [Quit: sleeping...]
drewr has quit [Ping timeout: 256 seconds]
<gonz_> marler8997: Wasn't that Ethan Watson guy doing something like this with Binderoo?
<marler8997> ethan was one of the guys who worked for the game company that used D, Remedy
<gonz_> Mhm
<marler8997> As I recall, this was a cross-language framework
<marler8997> but .NET is done completely differently
xackus_ has quit [Read error: Connection reset by peer]
xackus has joined #zig
<fengb> "problems start when the only person maintaining the language quits" 🤔
<fengb> Reminds me of this old story:
<gonz_> I have a feeling some of the Elixir macros I wrote for my last employer might've been rewritten now. Though I wouldn't be surprised if they turned the whole code base into Scala at this point.
<gonz_> s/rewritten/"yeeted", as the kids say,/
<via> yat
<gonz_> Ah, thanks for correcting my grammar.
<gonz_> yat indeed
<gonz_> It's important to stay in touch with the kids...
<gonz_> Phrasing.
<andrewrk> perhaps we should rename `zig translate-c` to `zig yeet`
<gonz_> :D
<xackus> yet another stage1 bug squashed, making a pr soon
<pixelherodev> Nice
<marler8997> this BoxX thing is satire right?
<xackus> we could make `zig yeet` a secret alias of `zig translate-c`
<gonz_> I never figured out whether or not The Daily WTF was satire or not
<xackus> after some of the code i've seen at work i'm willing to believe anything
<gonz_> I always remembered this one:
<gonz_> It's crazy that this was back in 2005
<fengb> True, False, FileNotFound
<andrewrk> I once read a critque of The Daily WTF that changed my life. It pointed out that it didn't really matter that it was making fun of bad code / bad practices. At the end of the day, it celebrates mediocrity, and comes at an opportunity cost of celebrating excellence
<companion_cube> gonz_: you can't invent some of these
<fengb> I'm not sure "celebrate" is the right word
<gonz_> It's certainly spotlighting it.
<fengb> One thing that's true though... the best code is often unnoticed
<alehander92> andrewrk very true, i haven't seen it like that before
<gonz_> When I read this one nowadays I feel a bit bad for Paula, to be honest.
<gonz_> In 2005 I didn't
<alehander92> it's almost like a chekhov story
<leeward> If only they had had Zig: They just needed a FileError!bool.
_Vi has quit [Ping timeout: 272 seconds]
slowtyper has quit [Ping timeout: 265 seconds]
stripedpajamas has joined #zig
dermetfan has quit [Ping timeout: 260 seconds]
<marler8997> wow thanks for the link, and the laughs :)
ifreund has quit [Quit: WeeChat 2.8]
ifreund has joined #zig
marijnfs_ has joined #zig
<torque> that paula bean one hits a little too close to home
<torque> we had a "senior architect" contracting for several months who was let go when someone did an audit and realized he had not committed any code in that time
<companion_cube> so what did he do?
<gonz_> torque: Does the name Quanterall mean anything to you?
<leeward> This is why I make people write code in interviews.
nycex has quit [Remote host closed the connection]
<pixelherodev> So that they can wait to not write code until after the interview?
marijnfs has quit [Ping timeout: 256 seconds]
<pixelherodev> alrighty, stage2 time
<pixelherodev> Fortunately, I don't need to set up Zig; I can just keep remote-ing it :P
nycex has joined #zig
<pixelherodev> Going to get that error_tests branch fixed up now
<gonz_> When I was working at Crytek/Creative Assembly our lead got tasked with creating a new service. We ended up making half of it when he up and left after sitting on the project for like half a year or something.
<torque> gonz_, haha nope
<leeward> pixelherodev: Sure, or so I know that they at least can write code if they need to. If someone goes several months without writing any code, and nobody at the company notices, there are deeper problems.
<fengb> You worked at Crytek?
<gonz_> torque: Ah. That guy ended up working for that company, is why I ask. It felt so familiar. :D
<pixelherodev> andrewrk: the idea is to have any N number of stages, which can either succeed (check output), fail (check errors), transform (check output ZIR)?
<gonz_> fengb: Yes, on a MOBA that never released, then we got sold to CA. I have a Crytek credit for a game I never even saw, though.
<gonz_> At CA I worked on another MOBA that never ended up releasing as well.
<pixelherodev> CA?
<pixelherodev> Ahh
<gonz_> The Creative Assembly
<gonz_> Total War series
<pixelherodev> Yeah, I saw
<pixelherodev> You mentioned that just above
<andrewrk> pixelherodev, the "check output ZIR" one will probably be different than "compare output". but yeah the idea is that you have a list of "updates" to source files, and each "update" will either succeed with some expected output, or fail with expected errors
<companion_cube> gonz_: cool cool
mokafolio has quit [Write error: Connection reset by peer]
<fengb> I find the MOBA scene pretty fascinating. Nobody can dethrone the top two
<gonz_> Crytek worked on it for, I kid you not, 7 years before I showed up. It was an MMORPG initially.
<gonz_> Completely crazy project
mokafolio has joined #zig
<fengb> o_O
<gonz_> They also made a Steam competitor, or were in the process of making one.
<fengb> They've tried everything
<gonz_> Absolute madlads
<gonz_> If you get the chance I recommend CA, though. It's a great company.
<pixelherodev> andrewrk: would it make more sense to pass in a slice of a tagged union of stages, or use e.g. a builder type?
<gonz_> If you know Erlang they probably still use it even though that specific project was shut down.
<pixelherodev> I think I should also reimplement the current tests *over* the new framework for more convient small tsests
<leeward> I miss Erlang. Nobody wants me to use it these days.
dimenus has joined #zig
<leeward> Of course, nobody wants me to use Zig either, but here I am.
<pixelherodev> heh
<pixelherodev> 20MiB/s internal wireless network is ncie
<pixelherodev> nice*
<fengb> I want you to use zig
<pixelherodev> It doesn't get that high for actual internet access, but for my SSH builds? It's more than enough :D
<gonz_> fengb: Make one of those Uncle Sam posters, plox
<leeward> Thanks, fengb. That means a lot.
<pixelherodev> Heh
<pixelherodev> I second gonz_'s idea
<dimenus> i was lukewarm on zig back in 2017
<dimenus> but it's progressed nicely
<pixelherodev> Gonna be honest
<pixelherodev> I looked at Zig like six times before I bothered trying it
<pixelherodev> Then I used it to write a kernel
<fengb> I suppose I should photoshop the face too
<pixelherodev> and, well
<pixelherodev> I've written maybe 1K lines of C since
<pixelherodev> Which might sound like a lot, but it really isn't
<leeward> Sounds like you don't write C for money, pixelherodev.
<pixelherodev> I don't write for money at all
<pixelherodev> I don't do anything for money, in fact
<leeward> That does make things simpler.
<pixelherodev> Yeah
<pixelherodev> I mean, harder too
<leeward> Simpler isn't the same as easier.
<dimenus> writing against a moving target for a salary doesn't sound like a good idea :)
<pixelherodev> I know
<gonz_> pixelherodev: This sounds either like a great existence or miserable. Are you looking?
<pixelherodev> sorta
<pixelherodev> I'm currently interning for SourceHut
<companion_cube> dimenus: you mean C++, right?
<fengb> He's working for ddevault :P
<dimenus> companion_cube: hah!
<pixelherodev> I just graduated high school, and my school required every senior to have an internship
<gonz_> Ohhh, what, he has interns?
krishss has joined #zig
<pixelherodev> One intern
<pixelherodev> Hi
<leeward> Yeah, there's no way I'm using Zig for work until 1.0. That said, once it lands, I'm going to be pushing for it.
<gonz_> Hello, intern :D
<pixelherodev> Yeah, I reached out to him when my school said I needed an internship
<gonz_> That's great, though, you get to work on real stuff right out of HS.
<pixelherodev> Yeah :)
<gonz_> Congrats
<pixelherodev> I mean, I'm also working on Zig :P
<dimenus> does he have one fulltime employee atm? emersion?
<andrewrk> you should know, you can get paid for a computer science internship
<pixelherodev> AFAIK yeah
<pixelherodev> andrewrk: I'm aware
<fengb> Maybe ZSF can hire you
<pixelherodev> That'd be nice :)
<leeward> Yeah, unpaid internships are bs.
<torque> how do you even define an unpaid internship working on open source software
<leeward> I have strong feelings about the ethics on that one.
<torque> how is this distinguishable from just being an open source contributor
<pixelherodev> "more of what I've been doing for years"
<pixelherodev> "except now my school's off my back"
<leeward> torque: someone's making money from it.
<pixelherodev> leeward: not in this case
<dimenus> andrewrk: are you still in NYC?
<andrewrk> yeah
<dimenus> i give you a lot of credit for being willing to go OSS fulltime living there
<pixelherodev> leeward: yes, but I'm not contributing to proper
<pixelherodev> I'm working a project called Ikiru, which I have control over
<companion_cube> are you working on the webmail?
<pixelherodev> Nah
<pixelherodev> Uptime system
<pixelherodev> Just fixed the HTML layouts, actually :)
<pixelherodev> Simple prometheus frontend, effectively
<pixelherodev> It's how I was able to quickly get my gotta-go-fast graphgen working
<companion_cube> ah yes, right
<companion_cube> do you have a demo page for that?
<pixelherodev> because it's basically the same thing Ikiru does :P
<pixelherodev> companion_cube: the repo is public?
<pixelherodev> I can pastebin one if you want
<pixelherodev> the generated HTML has the SVGs inlined
<companion_cube> ahh nice
<pixelherodev> Yeah
<companion_cube> yeah I'd like to see what this look like
<pixelherodev> Sure thing
<pixelherodev> ... wait shit. I don't have a web browser :P
<pixelherodev> Dammit, going to have to reboot :(
<pixelherodev> Or try chrooting maybe
<leeward> So if you're contributing open source code under a license like the GPL, that's one thing. If you're assigning ownership of your work to someone else who can do what they want with it for free, that's...not cool.
<ifreund> pretty sure most if not all of sourcehuts stuff is GPL'd
<leeward> pixelherodev: I'm not going to tell you what to do, and I don't know the details of your situation, but unpaid internships are bs.
<companion_cube> pixelherodev: wtf no browser? :D
<pixelherodev> leeward: that's not what's happening though
<pixelherodev> I have ownership of the project
<leeward> shiny
<pixelherodev> It *is* GPL though :P
<pixelherodev> companion_cube: it's a fresh install
<companion_cube> almost surprised it's not AGPL :D
<pixelherodev> sue me
<pixelherodev> and I'm still trying to find a way to get an X11-less browser
<companion_cube> ah, the smell of a fresh install…
<pixelherodev> I need to patch QT later
<pixelherodev> So i can get OBS working in Wayland native
<leeward> pixelherodev: links?
<companion_cube> elinks or w3m must work :p
<pixelherodev> leeward: yeah just a sec
<pixelherodev> companion_cube: yeah, but not for pasting a file
<leeward> heh, I meant links the browser
<pixelherodev> lol
<pixelherodev> w3m for me
<pixelherodev> Not too familiar with it
<pixelherodev> but it used to be my daily driver lol
<ifreund> why do you need a browser to paste a file?
<pixelherodev> I had a 2003 pentium which...
<ifreund> just curl into your patsebin
<pixelherodev> well
<pixelherodev> nuff said
<pixelherodev> ifreund: good point
<pixelherodev> except
<pixelherodev> I don't remember the API :P
<pixelherodev> and it's easier to just chroot
<ifreund> then curl and read the html :D
<pixelherodev> That's the exact output of `curl localhost:8080/example` from a few minutes ago :)
<dimenus> did anyone order a pinebook pro?
<pixelherodev> I was going to, but they ran out of stock :(
<pixelherodev> Well
<pixelherodev> First, the bank thought it was fraud
<dimenus> hah
<pixelherodev> Then once that was taken care of, they were out of stock
<pixelherodev> Yeah
<pixelherodev> Downside of working outside: I may have just swallowed a bug. Ew.
<leeward> You've been outside in the past 3 months?
<pixelherodev> I'm outside right now
<pixelherodev> Back "yard"
<leeward> 😱
<pixelherodev> there's a nice table
<pixelherodev> it's a nice day
<leeward> No teargas?
<pixelherodev> only downside are the bugs
<pixelherodev> Not here, no
<pixelherodev> By which I mean this street
<pixelherodev> Not too sure about the surrounding area
* pixelherodev shrugs
<pixelherodev> I'm more concerned with the bug
<leeward> The police spent about an hour last night announcing that they were going to deploy gas if people didn't disperse.
<leeward> Bugs are high in protein. It's good for you.
<pixelherodev> I think it's trying to get out now
<pixelherodev> I'm not in an area where that's an issue, thankfully
<pixelherodev> Off by a few miles
<pixelherodev> I'm the good ol' toxic waste dump capital
<pixelherodev> in the*
<leeward> Garden state?
<pixelherodev> NJ
<pixelherodev> So
<pixelherodev> I think so?
<pixelherodev> yeah
<pixelherodev> i remember now
<pixelherodev> but only because I found the term amusing
<fengb> the armpit of America?
<pixelherodev> There we go
<leeward> I thought that was PA.
<pixelherodev> Do *you* only have a single armpit?
<pixelherodev> ;)
<leeward> I mean, RI is clearly an armpit. The cape is flexing.
<companion_cube> here we have a proper curfew :s
<leeward> fengb: I stand corrected.
<pixelherodev> ouch
<fengb> Chicago actually needs more police. The gangs are defending neighborhood stores now :(
<leeward> That is simultaneously awesome and terrible.
<fengb> They were working with the police
<fengb> It’s all kinds of bad
<pixelherodev> That's...
<pixelherodev> wow
<pixelherodev> fuck 2020.
<pixelherodev> just sayin'
<leeward> Sounds like a heartwarming tale about things that never should have happened to me.
<pixelherodev> Anywho
<pixelherodev> stage2 awaits
<pixelherodev> pun intended
krishss has left #zig ["Killed buffer"]
xackus has quit [Ping timeout: 272 seconds]
<alehander92> fengb are you in Chicago?
<fengb> Yep
<alehander92> is it really that bad
<alehander92> i am sorry if this is insensitive, just that i've only seen some random videos online and thought it's just something like the ferguson events
<fengb> Some neighborhoods are yeah. My area is comparatively more quiet but the stores got hit
<dimenus> we had protests 2 blocks from my house (mayor livs around the corner), but they AFAIK peaceful
<fengb> Most of the business districts are mass chaos. Downtown is trashed
<dimenus> *lives
<alehander92> bizarre: i can't really imagine this here
<dimenus> yeah, many big cities are a mess right now
<fengb> There was a gunfight around the block from my coworker
<pixelherodev> side benefit of the new Gentoo-musl install: power consumption is apparently noticably down
<alehander92> i thought it's mostly like la riots 92 at the worst
<fengb> I wonder if it’s because of COVID. No jobs, sitting around, excuse to go rioting
<alehander92> i hope they stay peaceful, stay safe
<ifreund> pixelherodev: what were you running before?
<pixelherodev> Gentoo + glibc
<pixelherodev> I'm guessing it's the kernel upgrade though
<pixelherodev> I remember seeing something about a patch that improved power management
<ifreund> yeah, that would make more sense
<alehander92> yeah, and this is also a bit bizarre: at one point everyone was afraid of covid19, and suddenly people just gather everywhere
<dimenus> fengb: there's a ton of legitimate angst going on right now, but that's probably part of it. It also only takes a few people to turn a peaceful protest into a mob
<fengb> Yeah I know. It’s just hard for me to focus on the protests when there’s looting right outside my doors
<pixelherodev> I don't think it's that people aren't afraid of CoViD-19 anymore, and more that they're *more* scared / angry towards the government
<pixelherodev> People act irrationally when they're afraid
<fengb> And in general, Chicago police are terrible, but they’re much better than what’s going on
<dimenus> fengb: correction, Illinois is terrible :P
<fengb> And at least here, it wasn’t police incited unlike some other cities
<alehander92> i see
<rom1504> seeing this from France it's so weird. We have protests every year here and I used to think they were a bit violent, but compared to what's happening in the us, they would be considered as very peaceful. It's seems US is not used to protests so when they do, it has to be very violent.
<alehander92> i agree, those protest sound like the greek ones to me
<fengb> We just arrested a guy who’s being charged for terrorism. Apparently he’s incited some rioting in Minneapolis too
<dimenus> the US has a far more militarized police force than basically the entire first world
<fengb> Oh this isn’t normal...
<alehander92> i cant imagine the police letting things get to that point here (in bulgaria)
<alehander92> the army would be on the streets
<pixelherodev> The American concept of freedom is... werid
<pixelherodev> weird*
<fengb> We’ve deployed the National Guard. Our military doesn’t generally have jurisdiction on soil
<alehander92> interesting
<pixelherodev> s/doesn/isn't supposed to
<pixelherodev> s/doesn/doesn't
<fengb> Of course it doesn’t help that our police is militarized
<pixelherodev> :P
<fengb> Or maybe it does in this case? I’m not sure anymore
<alehander92> i hope some kind of peaceful movement similar to mlk's one arises
<leeward> Civilians also have much easier access to the kinds of weapons that only the military has in most other developed countries. It's an arms race.
<fengb> They were supposed to be peaceful -_-
<leeward> Many were.
<ifreund> i've been away from the US for a while (studying in germany) and I'm feeling more and more that america is totally insane
<dimenus> i think social media has turned out to be an awful experiment
<alehander92> ah, that explains your nick
<fengb> Chicago is pretty different :p
<ifreund> my nick? it's just my name lol
<alehander92> i have a friend in Chicago! good thing you reminded me of him
<ifreund> Isaac Freund
<fengb> Although usually the violence is pretty localized away from rich neighborhoods
<alehander92> ah ok :D
<ifreund> though may name is german :D
<alehander92> yeah, friendly isaac
<ifreund> exactly, i'll be everyone's friend
<fengb> Hi friend. You look nothing like what I had expected :P
<alehander92> yeah, and isaac means something like "will rejoice"
<alehander92> pretty cool
<ifreund> news to me
<ifreund> I mean i knew it was hebrew/biblical but never looked up the literal translation
<pixelherodev> I thought it was from the binding game thing?
<pixelherodev> Some friends are obsessed with that. I think
<pixelherodev> Were obsessed?
<ifreund> all the names in that game are biblical, didn't you play it?
<pixelherodev> Probably
<alehander92> yeah, iirc it was because the mother laughed when she realized she would have isaac :P
<pixelherodev> ifreund: nah
<ifreund> it has a very weird story
<ifreund> i only played it cause of the name lol
<pixelherodev> whoaaaa
<pixelherodev> I quantified the battery life differences
<pixelherodev> this is *massive*
<pixelherodev> something like 40% longer now
<pixelherodev> If my quick mental numbers are accurate, at least
<pixelherodev> Went from 3-4 hours to 5-6
<pixelherodev> So depending on the exact improvement... this is *massive*
<pixelherodev> I mean, apparently my bluetooth headphones use 2W, which lowers it right back to where it was
<pixelherodev> but aside from that :P
ave_ has quit [Quit: ave on]
lunamn has quit [Quit: ave on]
linuxgemini has quit [Quit: ave on]
ave_ has joined #zig
lunamn has joined #zig
linuxgemini has joined #zig
<pixelherodev> huh
<pixelherodev> yeah, it's basically *exactly* what it was before
<pixelherodev> with the hadphones, i mean
<pixelherodev> that's sick
<dimenus> powertop always gives me an insane number
<dimenus> like way lower than i would expect
linuxgemini has quit [Quit: o/]
ave_ has quit [Quit: o/]
lunamn has quit [Quit: o/]
lunamn has joined #zig
ave_ has joined #zig
linuxgemini has joined #zig
mikdusan has quit [Quit: WeeChat 2.6]
<pixelherodev> Is there any reason to not just hit "okay" to all of the powertop tunables and mark em good?
<shakesoda> nope
<shakesoda> i always just set it to auto tune everything
<pixelherodev> actually, there's one I'm going to tune manually
<shakesoda> it's never caused any meaningful issue
<pixelherodev> USB keyboard auto shutoff time
<shakesoda> or any at all that i can think about
<pixelherodev> Sliiightly too fast by default
<pixelherodev> which is annoying because i try typing *right* as the keyboard gets shut off, and it takes a second for it to shut off
<pixelherodev> which is weird because it can instantly wake up afterwards
<pixelherodev> Whoaaa
<pixelherodev> I know I said it's awesome already
<pixelherodev> But it's *awesome*
<pixelherodev> e.g. when I was streaming Project Tricarbon, battery left went so high it would be akin to ~80-90 minutes at full
<pixelherodev> s/left/usage
<pixelherodev> Now, the same workload leaves me with nearly three hours
<pixelherodev> :D
<pixelherodev> three hours *at ~75%`