ChanServ changed the topic of #zig to: zig programming language | https://ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
_Vi has quit [Ping timeout: 252 seconds]
cheesy has joined #zig
slice has quit [Ping timeout: 244 seconds]
dddddd has quit [Ping timeout: 256 seconds]
slice has joined #zig
cheesy has quit [Ping timeout: 246 seconds]
mokafolio has quit [Ping timeout: 246 seconds]
_whitelogger has joined #zig
antaoiseach has joined #zig
antaoiseach has left #zig [#zig]
nephele_ has joined #zig
nephele has quit [Ping timeout: 272 seconds]
nephele_ is now known as nephele
marijnfs_ has joined #zig
marijnfs has quit [Ping timeout: 260 seconds]
ur5us_ has quit [Ping timeout: 244 seconds]
<andrewrk> stage1 is jealous of self-hosted: https://clbin.com/wFP3S
<andrewrk> don't be jealous, stage1. you've had your time to shine
<fengb> LLVM errors always look so scary
<andrewrk> this is what I get for writing... *checks notes* 26 files changed, 2867 insertions(+), 1723 deletions(-) ... over a perido of 5 days without testing
<andrewrk> hmm seems to be a bug with breaking out of a block with defers in scope
<andrewrk> alright, after 10 hours of looking at compile errors I have something built. now on to the debugging phase!
<foobles> im scared because i started messsing with basic blocks and now im getting "assertion failed" with no other info ;D
<foobles> comptime works like a charm tho!
bheads has quit [Remote host closed the connection]
racoon has joined #zig
aerona has joined #zig
ur5us_ has joined #zig
daex_ has quit [Ping timeout: 246 seconds]
_whitelogger has joined #zig
slice has joined #zig
slice has quit [Client Quit]
waleee-cl has quit [Quit: Connection closed for inactivity]
daex has joined #zig
xackus has joined #zig
_whitelogger has joined #zig
slice has joined #zig
cole-h has quit [Quit: Goodbye]
<marler8997> what's the simplest cpu arch that zig can compile to?
<daurnimator> simplest in terms of?
<pmwhite> can we compile to a mano machine?
<daurnimator> instruction set? implementation effort?
<marler8997> smallest instruction set
<marler8997> don't see mano
<daurnimator> subleq? :)
<marler8997> don't see subleq either
<marler8997> lol, reminds me of a youtube video I saw a few years ago of a guy who implemented a full-compiler that only generated MOV instructions
<daurnimator> the trick with that is there MOV on x86 has a lot of different forms
<daurnimator> marler8997: riscv32 is at least easily synthesizable
<marler8997> yeah, and I remember it couldn't mov into the PC, so he had to run the entire program in a disabled mode to jump backwards...lol
slowtyper has joined #zig
<marler8997> is there a way to disable zigs panic handler?
foobles has quit [Ping timeout: 245 seconds]
<daurnimator> provide your own in main?
<daurnimator> s/main/root/
ur5us_ has quit [Ping timeout: 260 seconds]
<marler8997> what do you mean provide my own root?
aerona has quit [Quit: Leaving]
<daurnimator> in your root file module, provide a panic function
<daurnimator> your root module is the one you pass to zig
<marler8997> gotcha
<daurnimator> (available with `@import("root")`)
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
<marler8997> last thing in my binary is std.target.Arch.isWasm
dermetfan has joined #zig
<daurnimator> yeah that tends to hang around :P
slowtype1 has joined #zig
slowtyper has quit [Ping timeout: 256 seconds]
daex has quit [Ping timeout: 258 seconds]
daex has joined #zig
metaleap has joined #zig
mokafolio has joined #zig
mokafolio has quit [Ping timeout: 240 seconds]
hermier has joined #zig
<hermier> Hi, I'm trying to compile zig on my distro and it fails to "CommandLine Error: Option 'mc-relax-all' registered more than once!"
<hermier> Due to distro, I have to use: -DZIG_PREFER_CLANG_CPP_DYLIB=Yes -DZIG_STATIC_LLVM=True if that has some importance
<hermier> I also have a *minor* issue with git, for some reasons deps/SoftFloat-3e/*.txt get line ending borked on checkout
mokafolio has joined #zig
<ifreund[m]> hermier: what distro? when I updated the package for void i was getting the same error, but disabling `-DZIG_PREFER_CLANG_CPP_DYLIB=Yes` fixed it
<hermier> frugalware
<hermier> infortunatly I can't disable that, because I only have libLLVM.so or all the *.a
ifreund has joined #zig
<ifreund[m]> so you're probably running into the same fiasco that is messing up the homebrew package for mac users
<ifreund[m]> might want to read through this issue and the threads it links to https://github.com/ziglang/zig/issues/4799
<ifreund[m]> i definitely remember seeing that error mentioned somewhere in there
<hermier> thank you, it didn't showed when I tried to google the issue
dddddd has joined #zig
drp has joined #zig
nephele has quit [Read error: Connection reset by peer]
nephele has joined #zig
rzezeski has quit [Quit: Connection closed for inactivity]
ur5us_ has joined #zig
slice has quit [Quit: zzz]
cren has joined #zig
xackus has quit [Quit: Leaving]
<cren> Hello. I'm trying to make an array of multi-line strings. Why isn't it working? Here is the literal: https://bin.snopyta.org/?c328e578d597d845#B5s658gzVqCVXy526m7nGqXcUqCQWeYHNFoJTbNwSay4
<cren> I'm getting ./main.zig:12:5: error: expected token ';', found ','
<cren> (that's the first comma in the array)
Stephie has joined #zig
xackus has joined #zig
<ikskuh> cren: string literals are not arrays anymore
<ikskuh> they are pointer-to-arrays
<cren> so it's the type of the array that's wrong?
<ikskuh> there's also a semicolon missing at the end
<ikskuh> but it's a syntax error
<alexnask> Well the type is wrong too but the `= {` is the issue
slurpie has quit [Ping timeout: 265 seconds]
<ikskuh> oh yeah
<ikskuh> that'S a code block, not an array literal
<alexnask> `const hangman_pics = [_][]const u8 {` is what you want
<alexnask> Or &[_][]const u8 if you only need a slice
<cren> oh yeah
<alexnask> In the future `.{` will work there too but it is a compiler todo atm
_Vi has joined #zig
<cren> why is the syntax different for an array compared to that for a normal type? I think of arrays as being just a special case of type with a more complex literal syntax
<ikskuh> they aren't
<ikskuh> the syntax for type construction in zig is 100% equivalent for all types:
<ikskuh> T { }
<ikskuh> for arrays, T is an array type
<ikskuh> [3]T { }
<ikskuh> for structs, you use your struct type: Point { }
<ikskuh> and so on
<cren> ah so the []u8 in an array of u8 is part of the construction and not the type declaration
<alexnask> Yes it is part of the array literal
<cren> what is the difference between [] and [_] when you construct an array
<alexnask> [] is invalid, you need to specify the size with [N], [_] just means the size is inferred from the initialization list
ur5us_ has quit [Ping timeout: 265 seconds]
wootehfoot has joined #zig
<ikskuh> Names that begin with either ‘is’ or ‘to’ followed by a lowercase letter may be used for additional character testing and conversion functions. See Character Handling.
<ikskuh> the heck?!
<ikskuh> total() and tolerance() are reserved names
<ikskuh> in C
<Amun_Ra> how to assing to x in: for foo |x| { …; } I can't seem to find it
<daurnimator> Amun_Ra: you can't. its const
<Amun_Ra> uhm, thanks
<daurnimator> Amun_Ra: `for (foo) |*x|` might be what you want?
<Amun_Ra> that's it, thanks
<hermier> ifreund[m]: fixed the issue, I need to understand the situation now
rzezeski has joined #zig
<ifreund> hermier: nice!
<ifreund> i don't really understand it either tbh, i just tried some things and it turns out that the simplest option worked for void
<hermier> ifreund: I think the issue lies down to the fact that the embded Find*.cmake are broken, by producing incomplete *_LIBRARIES
<hermier> ifreund: Do you know why the official llvm/clang ones are not used ?
<ifreund> hermier: i believe andrewrk implemented it but it was reverted due to breaking the bootstrapping build from source https://github.com/ziglang/zig/issues/4799#issuecomment-611886454
<ifreund> there was also this attempt to rework things but it also had issues https://github.com/ziglang/zig/pull/4992
<hermier> ifreund: My issue was related to the fact that I missed the clang package dev/static libraries. It resulted in an invalid combo at compiletime resulting in alink issue detected at compiletime
cren has quit [Ping timeout: 245 seconds]
cren has joined #zig
kradnoel has joined #zig
waleee-cl has joined #zig
<cren> Hello. I'm learning Zig. Can I make an array of strings of different lengths?
<ifreund> cren: what you want is an array of pointers to the strings
<ikskuh> you can use slices for this
<ifreund> objects in an array must all have the same size
<cren> ah I see. Sorry if the answers to my questions seem obvious, I'm coming from Python so I'm not used to a language with so many limitations :p
<ikskuh> a slice is pretty much an array with variable size (and you need a memory for backing the storage)
<ikskuh> cren: strings in zig are also only slices/arrays
<ikskuh> so
<afontain_> you can do like in C where there is a `**char`. [3][:0]char = { "hi", "hello", "goodbye" }
<ikskuh> "a" is a pointer to an array of 1 element + NUL-terminator
<afontain_> in my example, it works because the strings are null-terminated. With slices, it works because the size is stored in each element.
<afontain_> that's two ways of doing that
<ifreund> to explain why all objects in an array must be of the same size, an "array" is really just a pointer to a block of memory containing evenly spaced elements
<cren> That makes sense
<ifreund> to access an element of the array, you just add the index of the element to your pointer
<cren> Yes, I was reading The C Programming Language and C pointers/arrays seem to work the same
<ifreund> so if the items weren't all the same size it wouldn't work at all :P
<ifreund> yeah all real arrays work the same way in the end
<ifreund> afaik python wraps literally every object in a ref-counted heap-allocated thing
<ifreund> and so a python lists are actually lists of pointers as well
<afontain_> but if the elements of the array are pointers, and you know you can keep reading until you find a 0, or a pointer + a size, and you know you should keep reading for this size; it works!
<ifreund> but it abstracts it all away so you don't have to worry about the details, for which you then pay a hefty performance penalty
<cren> I'm trying to change the array of arrays to an array of slices, but I can't figure out what the syntax is for a slice
<cren> (type of a slice I mean)
kradnoel has quit [Remote host closed the connection]
<ifreund> []u8
<ifreund> or probably []const u8 in your case
<cren> so for an array of strings, `[_][]const u8` to infer the length of the array?
<ikskuh> yep
<cren> compiler is complaining about that. "Expected type `[]const []u8`, found `[14][]const u8`
<ifreund> try &[_][]const u8
<ifreund> or wait no, that won't work
<ifreund> you need to mutate these strings?
<cren> no
<ifreund> eh, well try what i put then it'll probably work
<ifreund> the & will take the address of the array which coerces into the slice the compiler wants
<cren> It doesn't :p : "Expected type []const []u8`, found `*const [14][]const u8`
xackus has quit [Read error: Connection reset by peer]
xackus has joined #zig
<cren> `[]const []u8`, found `*const [14][]const u8`
<cren> I mean
<ifreund> yeah, so the problem is that []const u8 cant coerce into []u8
<ifreund> maybe you could paste the code somewher?
<cren> Here it is, but there's nothing surprising about it
<ifreund> cren: what are you doing with `words`?
<cren> It gets referenced in a test right afterwards. I'm trying to pull a word out at random
xackus has quit [Read error: Connection reset by peer]
<cren> That's what the test tries to do
wootehfoot has quit [Ping timeout: 258 seconds]
xackus has joined #zig
<ifreund> hmm, it seems like the compiler thinks whatever you are doing with it requires the []u8's to be mutable
<cren> I've just commented the test
<cren> - You're right, it is what I'm doing with it because commenting the test and adding another test that just makes 1 assignment works
<cren> What I'm doing with it is passing it to a function
<ifreund> what's the signature of the function?
xackus has quit [Ping timeout: 260 seconds]
<ifreund> make it `word_list: []const []const u8`
<ifreund> it would also need to return a []const u8 then
<cren> l think my return type is wrong for the function anyway
<alexnask> (except for that weird `^T` syntax they used for the graphic :D)
<cren> For the words array, it's still complaining: "expected type `*const []u8`, found `*const [3:0] u8`
<ifreund> cren: here https://godbolt.org/z/hWuAU9
<afontain_> you could replace [] with [:0] in you declaration
<cren> afontain_: that just gives the same for "found" while changing "expected type"
<cren> oh
<ifreund> or actually, I think this is a little nicer https://godbolt.org/z/twEo_N
<cren> this might be relevant
<afontain_> cren: right
slurpie has joined #zig
<cren> ignore that last
<fengb> I’m starting to think const can be better placed. Translating from array pointer to slice looks like `*const [N]T` => `[]const T`
<cren> it's working now with ifreund's second example
<cren> at least the array declaration is
<fengb> Feels super weird that they look so different
<ifreund> you can also use null terminated pointers everywher, or mix and match https://godbolt.org/z/BcWSfL
<cren> when I put `[]const T`, what's const? Is it the T or the []?
<ifreund> the T
<ifreund> const a: []T,
<ifreund> then the [] is const
<cren> oh right because const or var of the array is the first thing you write on the line anyway xD
<fengb> Think of it as “slice of const T”
<ifreund> yeah no reading in loops like in C
<cren> what do you mean by that?
<fengb> It feels weird at first but it’s a lot less ambiguous than “const slice”
<cren> Do you ever actually get to the point of writing ^^ that kind of gibberish with C? (I mean does it come up under real life constraints)
<fengb> Yes it comes up all the time with function pointers
<ifreund> yes
<fengb> Without typedefs, any function pointer declaration start to look like gibberish
<ifreund> it's also dumb that `const thing *` and `thing const*` are the same
<ifreund> like just pick one C
<fengb> const thing const*const
wootehfoot has joined #zig
<cren> pretty const my dude
<ifreund> right pick one or both if you want it do be double const
<ifreund> thing *const is different though of course :P
<cren> Can you coerce an array to a slice?
<ifreund> only a pointer to an array
<ifreund> and the constness must match of course
<cren> so a slice is more like a pointer than an array?
<ifreund> a slice is a pointer + a length yeah
<ifreund> while an array is a block of memory
<alexnask> west const best const
<ifreund> i wonder how much code uses double const
<ifreund> const int const *help;
<ifreund> it just looks so wrong
<alexnask> Yeah C makes it so awkward to actually const what you want to const
<fengb> I didn’t realize the spiral also pertained to const
<cren> Does Zig copy values when you pass them to a function, like C?
<ikskuh> cren: that is unspecified
<alexnask> Arguments are all const, so the compiler decides what to do
<ikskuh> zig allows the const-pointer optimization
<fengb> Zig decides how the best way to pass args. Sometimes it’s by value and sometimes it’s by const reference
<cren> what's the const-pointer optimisation?
<ikskuh> when it's more efficient to allow passing a const pointer, the compiler may do this
<cren> okay
<fengb> It’s undefined behavior to rely on the address of an argument
<alexnask> You only need to explicitly pass by pointer when you want to modify the input
<ifreund> or compare by pointer
<fengb> It means Zig is choosing the fastest way to pass the data around
<alexnask> gotta go fast
<cren> I saw ifreund use syntax for string formatting (like printf stuff) in an example a minute ago but I have since closed that tab, can someone put the syntax up
<ifreund> cren: std.debug.warn("{}", .{mything});
<cren> thanks
xackus has joined #zig
<cren> Okay here's a question. Can I add new characters to the end of a string if the string is mutable?
<ikskuh> no, not directly
<ikskuh> you have to track the memory of the string
<ikskuh> if you allocated it yourself, you can use std.mem.concat
<ikskuh> that allows you to allocate a "sum" of two or more slices
dingenskirchen has quit [Quit: dingenskirchen]
<cren> Is there a better way to make a string that is the same character repeated `n` times where `n` is known only at runtime?
dingenskirchen has joined #zig
<ifreund> you can allocate an array of size `n` and memset it
cole-h has joined #zig
<cren> okay that looks hard so I'm gonna take a break now. Thanks for all your help everyone
<andrewrk> cren, maybe look into using std.ArrayList
kradnoel has joined #zig
<ifreund> yes, an ArrayList(u8) is probably closer to the resizeable python strings you're used to
<cren> I'm practising Zig by translating a Python program into Zig, so it doesn't translate terribly well.
<ifreund> though the allocation + memset isn't that scary `const n_times_a = try myalloc.create([n]u8); std.mem.set(u8, n_times_a, 'a');`
dingenskirchen has quit [Quit: dingenskirchen]
dingenskirchen has joined #zig
<andrewrk> ifreund, probably would be myalloc.alloc(u8, n)
<andrewrk> if your n is runtime known
<andrewrk> if it is comptime known you could do [1]u8{'a'} ** n
alexnask has quit [Ping timeout: 256 seconds]
<ifreund> andrewrk: that makes sense, the length of the array is definitely part of the type
<ifreund> i did try this out by my n was implicitly comptime https://godbolt.org/z/bPcyfW
<fraktor> Is there a way I can compare two enums to see which one is greater, like in C?
<fraktor> I tried `const Enum = enum(u8) { ... }` but that did not work.
<ifreund> fraktor: you need to specify the tag type iirc
<fraktor> With a @TagType call?
<ifreund> const MyEnum = enum(u8) { .One, .Two, .Three };
<fraktor> Right, I tried that but it still rejected that.
xackus has quit [Read error: Connection reset by peer]
xackus has joined #zig
alexnask has joined #zig
foobles has joined #zig
Akuli has joined #zig
st4ll1 has joined #zig
<cren> Is there an example of how to use ArrayList?
<ikskuh> look in the tests in arraylist.zig
wootehfoot has quit [Ping timeout: 246 seconds]
<cren> Also, is there any documentation about getting user input (from the command line)?
<alexnask> std.io.getStdIn() returns the stdin File
<alexnask> You can get the .inStream() and work with it like any other inStream or use the read* functions on File
<cren> got it
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
cren has quit [Ping timeout: 245 seconds]
foobles has quit [Remote host closed the connection]
foobles has joined #zig
pystub has joined #zig
kristoff_it has joined #zig
<ikskuh> huh
<ikskuh> it looks like getentropy isn't in libc?
wootehfoot has joined #zig
dimenus has joined #zig
wootehfoot has quit [Ping timeout: 240 seconds]
<andrewrk> hmm. does it matter whether function machine code is aligned?
<andrewrk> I doubt it
<kristoff_it> Hi all, I've created a Zig meetup CfS as a google form. I believe there's a lot of people that have something interesting to share so please take a look, let me know if you have any feedback, but most importantly, apply! https://docs.google.com/forms/d/e/1FAIpQLSekJlwyMyzYfeQgsZ6ske7B2ANu13gc4kcBBBN0o449ebAR9Q/viewform
<andrewrk> exciting!
<andrewrk> I'm looking forward to this :)
<andrewrk> It's looking like I'm going to be at a point in a few hours where I can do a live stream and I'll be sure to promote this
<fengb> 🎉
FireFox317 has joined #zig
<kristoff_it> nice, let us know at what time you're going live, so I can raid you if I'm still online.
<dimenus> andrewrk: I just got here but it might depending on the platform. eg I have a weird bug with alignment on aarch64 that goes away if I inline all of the calls
knebulae has quit [Ping timeout: 260 seconds]
<dimenus> this with qemu emulating a raspi3
knebulae has joined #zig
<FireFox317> dimenus, did you install expection handlers? So you can see if an alignment exception is actually generated. Aarch64 is really strict about alignment
<foobles> does anyone who knows how 2nd-pass IR is validated take a look at my PR? It's generating basic blocks that apparently cause assertion errors. I think it has to to with me not properly communicating that they are not supposed to correspond to matching IrInstSrc instructions
<foobles> since they are just generated during the 2nd apss
<foobles> s/apss/pass
<dimenus> Firefox317: no not yet. excellent point though
<FireFox317> dimenus, also did you properly setup the target using zig cpu features? that might also make a difference
<ifreund> hmm, would people find a presentation on writing a wayland compositor in zig interesting? maybe I should try and put something together
<ifreund> not really sure if i'd have enough to fill 30min or not
<fengb> I’d love to hear it
<andrewrk> it sounds interesting to me. also the form says 20-30min
<dimenus> Just targeting a cortex_a53 right now, no specific features
<ifreund> been thinking about doing my first actual blog post on it too after reading about people trying to write them in rust
<andrewrk> kristoff_it, what do you think about lowering the minimum even more? 10-30min, so that way it feels less like a big pressure to do a whole thing
<andrewrk> short presentations can be quite enjoyable as well
<FireFox317> dimenus, looks good! It might help to enable the cpu feature "strict_align", i think that forces llvm to have everything properly aligned. Might not be optimal for performance tho
<ifreund> i could definitely fill a 15 minute slot, not really sure how much I have to say tbh
<dimenus> FireFox317: it only happens with the flat binary, not the elf file - but good to know
<kristoff_it> andrewrk: I'm fine with lowering the time limit, although in my experience 10min talks are harder than 20min talks, but from an organizational point of view, I have zero issues with either
<FireFox317> dimenus, that is a good hint. In a elf file everything (code, data) is page aligned, and when you ask a flat binary it is all smashed together so alignment might be wrong indeed
<fengb> ifreund: rant about how bad X11 is 🙃
<ifreund> fengb: my experiance with X11 programming is literally starting to read the docs, then going "oh, may i should switch from i3 to sway and see if wayland is nicer"
<ifreund> turns out working with wayland is a lot of fun
<kristoff_it> ifreund: I have no idea what a wayland compositor is, so you already have 1 person interested in your talk :) if it ends up being 10 mins long it's perfectly fine!
<fengb> Sounds like my experience with Rust :P
<ifreund> kristoff_it: alright, yeah if i'm giving a brief intro to wayland as well i can do 30 minutes, and it sounds like i should do that :D
<dimenus> i would highly recommend Drew Devault's wayland book as well, he changed the license recently.
<companion_cube> just avoid his rants
<fengb> Ah neat
<ifreund> yeah drew's book is pretty good, as are the docs on the freedesktop site
dnmllr has joined #zig
<pmwhite> companion_cube: i kinda like his rants
<companion_cube> yeah, they're entertaining
slice has joined #zig
<ifreund> kristoff_it: submitted the form, do you have a sense of when this is going to happen yet?
<kristoff_it> Let's say teantively next month. My plan is to get a few submissions and then work with the speakers to find a date that works for them
<ifreund> cool, sounds good to me
<ifreund> i wonder how much I can mature my project in another month
knebulae has quit [Ping timeout: 246 seconds]
<fengb> Times are not great :(
<ikskuh> damn you, global communities!
<fengb> We need to be on galactic standard time
<ikskuh> UTC is enough
<fengb> Is it really universal though?
<fengb> Should be called global instead 🤔
slice has quit [Quit: zzz]
dimenus has quit [Quit: WeeChat 2.8]
dimenus has joined #zig
knebulae has joined #zig
wootehfoot has joined #zig
dimenus has quit [Quit: WeeChat 2.8]
dimenus has joined #zig
<dimenus> has anyone done any xml parsing in Zig?
fraktor has quit [Quit: WeeChat 2.6]
<fengb> Have you tried regex? 🙃
* companion_cube slaps fengb around with a large trout
<dimenus> negative, haven't tried anything yet
<companion_cube> bind to a C library? :p
<dimenus> yeah, i spose reinventing the wheel in xml parsing isn't a good idea when libxml exists :P
<fengb> RIIZ
<dimenus> i started out wanting to build a wayland vnc client in zig, and then i decided i wanted to parse wayland's xml files myself instead of relying on wayland-client
FireFox317 has quit [Remote host closed the connection]
FireFox317 has joined #zig
FireFox317 has quit [Quit: Leaving]
FireFox317 has joined #zig
<ifreund> i think tdeo may have
wootehfoot has quit [Ping timeout: 265 seconds]
slice has joined #zig
<andrewrk> anyone want to play around with readelf/objdump and figure out why this small ELF binary is giving EINVAL when I try to execve it?
hermier has quit [Ping timeout: 260 seconds]
slurpie has quit [Ping timeout: 240 seconds]
<tdeo> i have a working parser for wayland.xml, yeah
<tdeo> i'll just make my zwl repo public even though it's not close to working yet
slurpie has joined #zig
<ifreund> yay!
<tdeo> ifreund, dimenus: https://github.com/tadeokondrak/zwl
<tdeo> i know the xml parser is bad, but it works and it's small :)
<fengb> No license. It's a secret to everybody
<tdeo> ah, i'll add one
<fengb> https://emojipedia.org/ninja/ this finally exists! 🎉
<ikskuh> i feel fooled. the field with the ninja emoji in it is … empty
<ikskuh> but: ninjas are invisible … so it might be there
<alexnask> Wait, there are emoji modifiers? TIL https://emojipedia.org/light-skin-tone/
<companion_cube> even "é" can be a composite unicode char, so yeah
frmdstryr has joined #zig
<fengb> Only emojis: where I can be a black man with blonde hair 👱🏿, but I still can't be asian
<alexnask> Sure, I know about the diacretics/composites, just didnt expect it to be the case in emoji
<alexnask> idk why
<ikskuh> it's quite ingenious to use ligatures for combining such features :D
<ikskuh> if it's ligatures :D
<ikskuh> but yeah, you can merge multiple people into a family :D
<alexnask> lol
<ikskuh> and with backspace, you delete persons from the family 😱
<ikskuh> 👩‍👩‍👧‍👧
<companion_cube> it's below the level of ligatures, afaik
<companion_cube> you combine codepoints to make a grapheme
<andrewrk> ok I'm for sure going to be able to stream today
<andrewrk> 18:00 my time zone. that's in 1.5 hours from now
<alexnask> 🎉
<oats> alexnask: you're in NYC, right?
<oats> er, *andrewrk
<andrewrk> both of us are I believe
<oats> heh, ok then
<alexnask> nah :P
<companion_cube> ah, the move to CA was delayed because of covid?
<oats> andrewrk: looking forward to it!
<ikskuh> andrewrk, i'm so getting no sleep tonight :D
<alexnask> EU life
<andrewrk> alee didn't get into santa cruz :( so another year in NYC it is
<oats> time zone buddies \e/
<andrewrk> I used to say "EST" but then I realized that the time zone doesn't stay constant for daylight savings. the *TIME ZONE CHANGES* rather than the time changing. so you have to look up what time zone you are in every time you want to tell someone a time, which is ridiculous
<oats> yeah, we're in "EDT" :P
slice has quit [Quit: zzz]
<andrewrk> but you can't say EDT either. one day you will be wrong
<andrewrk> I suppose I could say NYC time zone
<alexnask> ^
<ikskuh> andrewrk, just announce times in UTC
<oats> could just do UTC :P
<oats> let everybody else figure it out
<alexnask> Hah europeans mad /s
<andrewrk> that's not rigth either though
<ikskuh> let *everybody* figure it out :D
<andrewrk> because your local municipality can change its time zone and then your UTC date is wrong
<ifreund> man i've been building up stream hype for 3 days now :P
<companion_cube> that sounds amazing
<andrewrk> the truest way to tell someone a time is with a tuple (geographical_location, local_time)
<kristoff_it> I think you can say ET to be daylight-savings-agnostic
<companion_cube> just imagine a local city of 20k habitants, with its own timezone
<oats> andrewrk: start a campaign for timekeeping reform and I will happily jump on the bandwagon :P
<alexnask> Yes, we just need a new standard
<companion_cube> or a bot with a counter
<companion_cube> "stream in 1.5h"
<companion_cube> durations are sometimes easier than datetime
<andrewrk> I also decided to play my new favorite game in the ~10 min while waiting for ppl to join
<andrewrk> "Getting Over It with Bennett Foddy"
<ikskuh> alexnask: i still wonder about europe removing DST
<alexnask> Im generally favorable to it but I havent really given it much thought :P
<ikskuh> yeah
<ikskuh> it will break a lot of embedded devices though :D
frmdstryr has quit [Ping timeout: 260 seconds]
<fengb> UTC would be correct if you're talking about "instant in time", but not necessarily about future scheduled times
<fengb> So if it's an hour away, broadcast in UTC :P
metaleap has quit [Quit: Leaving]
<sjm> how come this code compiles on linux but not on windows? https://gist.github.com/drguildo/34a30f6c371caa19709a42a5e2bcfb2a
<andrewrk> fengb makes a good point
<sjm> on windows i get ".\main.zig:13:56: error: expected type '*[98302]u8', found '*[260]u8'"
* redj will miss the stream
<redj> :(
<sjm> my guess is that certain stdlib functions expect the path to be a certain length that's incompatible with PATH_MAX but i'm a noob so it's probably just that i'm missing something
<ikskuh> use std.fs.MAX_PATH_BYTES instead of PATH_MAX
<andrewrk> sjm, maybe this helps explain a little bit: https://github.com/ziglang/zig/issues/5019
<sjm> andrewrk: thanks
<andrewrk> sjm, there is also fs.realpathAlloc which might be easier to use
Akuli has quit [Quit: Leaving]
<andrewrk> also consider that you might be able to get away with using dir fds rather than realpath, which could have nicer semantics
<ikskuh> btw, i successfully hooked up Zig and BearSSL to connect a TLS1.2 socket stream :)
* ikskuh is a bit proud
<andrewrk> nice
<sjm> andrewrk: which function(s) would i use to do that?
<andrewrk> sjm, everything in std.fs.Dir
<andrewrk> so you'd start with std.fs.cwd() and then go from there
<andrewrk> I'm not sure what your use case is for realpath, maybe this is not helpful advice
<sjm> andrewrk: it's all good. i'm just messing around experimenting trying to wrap my head around the language. doesn't help that i've probably forgotten most of the system programming stuff i'd learned while teaching myself c years ago.
<FireFox317> andrewrk, in the binary you send i see twice the program header LOAD, where one has flags rx and the other only has the r flag. Is that correct?
<andrewrk> FireFox317, I got the problem worked out - it was the .got section not having an aligned file offset
<FireFox317> Ah nice! Looking forward seeing you demo this on stream :D
dnmllr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
wootehfoot has joined #zig
slice has joined #zig
lanodan has quit [Ping timeout: 265 seconds]
jmiven has quit [Quit: reboot]
jmiven has joined #zig
dnmllr has joined #zig
lanodan has joined #zig
<foobles> oh crud did i just miss the stream
<foobles> or has it not happened yet?
<kristoff_it> starts in 3m
<foobles> whoo! ok thanks
<foobles> that was close
wootehfoot has quit [Ping timeout: 260 seconds]
_Vi has quit [Ping timeout: 244 seconds]
hermier has joined #zig
pystub has quit [Ping timeout: 258 seconds]
slowtype1 has quit [Ping timeout: 256 seconds]
xackus has quit [Ping timeout: 240 seconds]
dimenus has quit [Quit: WeeChat 2.8]
kradnoel has quit [Remote host closed the connection]
slice has quit [Quit: zzz]
dermetfan has quit [Ping timeout: 260 seconds]
kristoff_it has quit [Ping timeout: 258 seconds]