<frmdstryr>
How can I get the current thread name?
<frmdstryr>
Oh, nvm std.Thread.getCurrentId
<andrewrk>
hello
<jabb>
yo!
<jabb>
how're you?
<andrewrk>
I'm ok. I won't be able to be at full productivity until I get this situation worked out, but I'm not in any physical danger anymore
<andrewrk>
I have a few hours to spare now to work towards the release :)
<jabb>
nice. yeah i saw it on twitter. sucky situation. glad you're okay
<ifreund>
good to see you back on IRC, been a litte worried
<g-w1>
One thing that I got confused about was in rust `variable: &Type` is equavalent to `Type *variable`. But in zig it is equavelent to `variable: *Type` why is this?
<g-w1>
in the second example i am reffereing to c
<ifreund>
I'm not sure I understand the question
<a92>
Zig chose Rust-like syntax for variable/parameter declaration but C-like syntax for pointer types. Languages do strange things sometimes.
<g-w1>
I am confused why rust uses &Type and zig uses *Type
mschwaig has quit [Quit: WeeChat 2.7.1]
<a92>
Just syntax choices; they don't have to be the same
<g-w1>
It made sense with c because the * was on the variable so i thought it was equavalent to the & being on the type
<g-w1>
oh
<g-w1>
ok
mschwaig has joined #zig
<ifreund>
oh rust has * pointers too, they're different though
<andrewrk>
g-w1, we used to have &Type for pointers
<g-w1>
ok
<g-w1>
it makes sense that its just a syntax decision
<andrewrk>
we had to change it because in zig types are values and so &T was ambiguous
<g-w1>
that makes sense
<daurnimator>
TIL
squeek502 has quit [Remote host closed the connection]
ryuukk__ was banned on #zig by ChanServ [ryuukk__!*@*]
ryuukk__ was kicked from #zig by ChanServ [Banned: bad vibes]
Kena has quit [Remote host closed the connection]
Axiomatic has joined #zig
AceNovo has quit [Remote host closed the connection]
<Axiomatic>
@kandinski np ... its crazy that even a nominally simple concept like determining the sign of a numeric quantity is so complex, but there you have it
a92 has quit [Quit: Leaving]
<ifreund>
man, why did someone add zig support to code.golf
<ifreund>
i have wasted too much time already :D
ryuukk_ has joined #zig
<ifreund>
I can't figure out how to drop 2 more characters and it's annoyingme
<andrewrk>
does it let you see others' solutions?
<pixelherodev>
andrewrk: what happened, are you okay?
<andrewrk>
let's keep it on topic here but feel free to dm me
mschwaig has quit [Read error: Connection reset by peer]
<ryuukk_>
ChanServ has kicked ryuukk__ from #zig (Banned: bad vibes)
<ryuukk_>
what does that mean?
<ryuukk_>
i have very unstable connection since few weeks ago, server is probably flagging me as bot
mattnite has joined #zig
ryuukk_ was kicked from #zig by ChanServ [Banned: bad vibes]
<Axiomatic>
Odd that anyone even programmed a bot to detect vibes. Seems like it would be difficult to debug...
<pixelherodev>
Obviously, the first sign of bad vibes is questioning the bot's decisions ;)
<pixelherodev>
I for one welcome our new glorious bot overlord
<Axiomatic>
(Praise the Bot)
<ifreund>
andrewrk: it lets me see how many characters/bytes they used, but not their code
<andrewrk>
interesting decision. I think it makes sense although it's a shame, it seems like a missed learning opportunity
<ifreund>
I am 2 bytes away from first place for the "beer on the wall" problem
<ifreund>
honestly I'm happy with the way they did it. It's the best way to encourage competition I see
<ifreund>
I know that improvement is possible but I have to arrive at the solution myself
<pixelherodev>
ifreund: can you use the standard library in that?
<pixelherodev>
Or is it language only?
<ifreund>
you can use the std, you need to print to stdout :P
<pixelherodev>
Ah right
<fengb>
What if I make a PR to stdlib to solve this? 🤔
<pixelherodev>
... have you tried using compression? ;P
<fengb>
std.beers()
<ifreund>
that's basically what I did yeah
dbandstra has joined #zig
<ifreund>
though I kinda hit a dead end
Guest47 has joined #zig
earnestly has quit [Ping timeout: 240 seconds]
<ifreund>
could just be that my by-hand compression wasn't optimal
<Guest47>
Ok, so i checked log, and i got banned by individual, that's OK, i would have prefered to be told prior to that so i could perhaps work on what the "issues" i have caused, that would have been more polite and more adult from whoever banned me, i will not come back since, apparently, sharing 1st experience or frustrations is too much for whoever
<Guest47>
decided to ban me, and that's ok, i respect that choice, even if i disagree with it, but that's life, i wish good luck to this project, and maybe consider speaking to whoever banned be to maybe be less emotive
<ifreund>
Guest47: mostly likely your tone regarding the docs a couple hours ago
<Guest47>
(ryuukk is my username on IRC, just to be precise)
<ifreund>
you came across quite entitled
<Guest47>
that is private document, draft that i decided to share with you, i had warned about it being my ranting over frustration, but it's okay, i shared it with you it is my fault, anyways, i don't want cause more issues, i will just leave and respect the ban inflicted
CmdrCrisp has quit [Ping timeout: 260 seconds]
x2C25 has quit [Ping timeout: 260 seconds]
Guest47 has quit [Quit: Connection closed]
Axiomatic has left #zig ["Leaving"]
<andrewrk>
thank you I appreciate that. if you want to, come back in about a year, and let's see how things go. 211 people in this channel, there is a high expectations of behavior
<andrewrk>
getting banned from this channel doesn't mean you are a bad person. this channel is an experiment with a trigger happy ban hammer
<andrewrk>
and I know that's a juicy subject but let's resist meta discussion temptations and redirect the topic back to zig coding
mattnite has quit [Ping timeout: 245 seconds]
lanodan has quit [Quit: WeeChat 2.9]
<daurnimator>
ifreund: beat you :)
<ifreund_>
daurnimator: nicely done :)
<ifreund_>
it’s 4am here so i’m gonna have to sleep before my brain stops working entirely:D
<daurnimator>
not sure if I should share my answer? I guess that's not in the spirit of the game...
notpiika has joined #zig
xackus has quit [Ping timeout: 240 seconds]
klltkr has quit [Ping timeout: 260 seconds]
lanodan has joined #zig
x2C25 has joined #zig
earnestly has joined #zig
dbandstra has quit [Ping timeout: 258 seconds]
marnix has joined #zig
kristoff_it1 has quit [Ping timeout: 240 seconds]
dbandstra has joined #zig
dbandstra has quit [Client Quit]
lucid_0x80 has joined #zig
lucid_0x80 has quit [Quit: Leaving]
lucid_0x80 has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
lucid_0x80 has quit [Ping timeout: 260 seconds]
frett27 has quit [Ping timeout: 260 seconds]
osa1 has joined #zig
Stephanie has quit [Quit: Fuck this shit, I'm out!]
Stephie has joined #zig
cole-h has quit [Ping timeout: 256 seconds]
decentpenguin has quit [Read error: Connection reset by peer]
decentpenguin has joined #zig
ur5us has joined #zig
mmohammadi9812 has joined #zig
marnix has quit [Remote host closed the connection]
marnix has joined #zig
ur5us has quit [Ping timeout: 260 seconds]
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
ask6155 has joined #zig
tane has joined #zig
squeek502 has joined #zig
tundrax has joined #zig
gazler_ has joined #zig
FireFox317 has joined #zig
gazler__ has quit [Ping timeout: 260 seconds]
kristoff_it1 has joined #zig
kristoff_it2 has joined #zig
kristoff_it1 has quit [Ping timeout: 260 seconds]
mmohammadi9812 has quit [Ping timeout: 256 seconds]
mmohammadi9812 has joined #zig
Kingsquee has quit []
mmohammadi9812 has quit [Ping timeout: 246 seconds]
mmohammadi9812 has joined #zig
ask6155 has left #zig [#zig]
<kandinski>
hi folks, I have an array of c pointers into a u8 buffer (pcre2 matches into a string), and I want to turn it into a slice of slices of u8. I guess I could write C-like code, but I was hoping I could cast the buffer into an array of 2-pointer structs, and then iterate through it using a function on the 2-pointer struct to output a Zig slice.
dddddd has quit [Ping timeout: 260 seconds]
<kandinski>
I'd appreciate a tip on how to proceed. I don't know if I'm complicating my life too much.
<ifreund>
hmm, I'm not sure if you can do this in place without UB as I don't think slices have a well defined memory layout
<kandinski>
ifreund: yeah, I misspoke, I need to do this in two steps
<ifreund>
If you want to transform it to a slice of slices you'll need to allocate your own array then and copy the data over
<kandinski>
one, cast the array of c pointers into a known-length array of zig structs
<kandinski>
then I can iterate over it and generate the second array as you say
<ifreund>
i'd skip step one, it seems like an overcomplication
<ifreund>
just iterate 2 at a time
<kandinski>
for every pair of c pointers, I do whatever I need to generate a []u8, and I copy that to the mmh
<kandinski>
sure
<kandinski>
you're right, of course
dddddd has joined #zig
<kandinski>
I know the number of captures, so I can:
<ifreund>
it'd be need it this were doable in place though, a packed slice would be exactly the size of 2 pointers
<kandinski>
- build an array of slices of the subject string
<ifreund>
s/need/neat/
<kandinski>
- rewrite each slice's pointer and length as I iterate over the pcre2's ovector
<kandinski>
well, ifreund it's not that easy because my zig function can allocate and return an array on the stack, and then free the pcre2 ovector which is in the C heap
<kandinski>
thanks for helping me work through it
<ifreund>
the length is known at compile time?
<kandinski>
no
<kandinski>
it's known at runtime only
<kandinski>
because it's as long as the number of matches/captures
<ifreund>
you probably need to allocate the zig array of slices then
<kandinski>
why so?
<ifreund>
stack variables must have a compile time known size
<kandinski>
I thought zig could make caller allocate
<kandinski>
aaah
<kandinski>
so it goes
<kandinski>
so yes, it will be compile time known, because it will be a pointer into heap memory
<kandinski>
so it goes
<ifreund>
just take an allocator as a parameter
<kandinski>
for now I'm not even doiong that, because pcre2 uses the c heap already
<kandinski>
(there's a way to pass an allocator to it, but I'll figure that out once I get it working)
<ifreund>
then just hardcode std.heap.c_allocator for now I guess :D
<kandinski>
yup, I already have a deinit() fn cleaning up after pcre2, it might as well clean up after me
<kandinski>
thanks
<nyaayaya>
Is it possible to do something like this in Zig?
<nyaayaya>
const a=1, b=2, c=3;
<nyaayaya>
(instead of const a=1; const b=2; const c=3;) @.@
<Nypsie[m]>
No
<kandinski>
(that was silly of me: of course caller can only stack-allocate values of compile-time-known size)
<nyaayaya>
oh, ookie ^^
<nyaayaya>
thank you
<ifreund>
cosnt out = std.heap.c_allocator.alloc([]u8, N); var i: usize = 0; while (i < N) : (i += 2) out[i/2] = in[i][0..in[i+1]-in[i]]; return out;
<kandinski>
ifreund: thanks
<Nypsie[m]>
nyaayaya: Would be nice, but goes against Zig's zen :)
<nyaayaya>
Nypsie[m]: Ah, right. "Only one obvious way to do things."
<ifreund>
yep :)
<ifreund>
also, where would you put the types?
<nyaayaya>
const a: u32 = 1, b: u32 = 2; ?
<ifreund>
hmm, is a for loop cleaner? for (out) |*o, i| o.* = in[2*i][0..in[2*i+1]-in[2*i]];
burkac has joined #zig
<kandinski>
ifreund: of course
<ifreund>
nyaayaya: yeah I guess, but then you loose out even more on readability
<kandinski>
I couldn't figure how to iterate through in, but I don't need to
<kandinski>
well, I can iterate through out and make the iteration code more readable
<ifreund>
and without great benefit as you can't "share" the type between the variables
<kandinski>
I think I can figure it out now
<ifreund>
:)
<kandinski>
or I can use pointer arithmetic against the start of the regex target buffer, and just slice the buffer
mmohammadi9812 has quit [Ping timeout: 256 seconds]
mmohammadi9812 has joined #zig
<kandinski>
anyway, thanks very much
osa1 has quit [Ping timeout: 256 seconds]
mmohammadi9812 has quit [Ping timeout: 260 seconds]
<nyaayaya>
ifreund: yay, solved it (444 bytes). but geh, if there would be a way to join const declarations together :(
mmohammadi9812 has joined #zig
<ikskuh>
uuuh, let me join in! :D
<Nypsie[m]>
This looks fun! I will try it too tonight
<earnestly>
That website does not show any code for me
<earnestly>
Perhaps that's the point
<Nypsie[m]>
That is indeed the point :P
<ifreund>
nyaayaya: congrats! I've decided that I suck at golf :P
<ifreund>
gonna get back to work on river and related projects
<fengb>
Nah, practice makes perfect :P
<ikskuh>
okay, i have a working solution, 799 bytes :D
marnix has quit [Ping timeout: 260 seconds]
marnix has joined #zig
<kandinski>
hey ifreund, I got it working. The two first comments in this are just for you, but the rest is because I prefer to let the compiler do the code golf and I write as readable as possible: https://termbin.com/9578
<kandinski>
ifreund: tips on style and performance very welcome
<g-w1>
why does standardReleaseOptions() require libc
<g-w1>
I am trying to write an only static executable and it is saying stuff like `undefined reference to memcpy`
<g-w1>
and the weird thing is I just changed the name of the library and now it requires libc
<ikskuh>
g-w1, standardReleaseOptions should not require libc
<ikskuh>
can you show the build fle?
<g-w1>
yes
<g-w1>
lemme do a scrot
<ikskuh>
ifreund: did you use std.debug.print or proper stdout writing?
<kandinski>
ifreund: this is still rough af, and I only plan to implement just what I need for now and move on to the rest of the make-a-lisp project before coming back and cleaning up, but I'm pretty chuffed of the progress in just one week and the two weekends at both sides: https://github.com/candeira/mal/blob/zigzug-wip/impls/zigzug/re.zig
<kandinski>
wat
<g-w1>
i fixed this problem before by turning on release mode but I shouldn't have to do that, right? https://i.imgur.com/ygESQM1.png
<g-w1>
here is the ld errorss
<ifreund>
ikskuh: you need to write to stdout :/
<ifreund>
which takes a lot of bytes with zig
<ikskuh>
:D
<ikskuh>
yeah i figured
<g-w1>
do you have an idea why it is linking against something else, maybe libc
<ikskuh>
it is not linking against libc
<ikskuh>
but the compiler is spilling mallocs as optimizations for larger copy operations
<g-w1>
interesting.
<ifreund>
kandinski: looking good :) I'm sure you'll find thing you can improve upon through real-world usage
<g-w1>
so I guess I have to turn on release mode to get rid of it
<ikskuh>
g-w1: i don't think that will help
<ikskuh>
it really depends on your code
<g-w1>
i helped before, but I wanted to have standard mode, and then it broke again
<ikskuh>
memcpy and stuff are part of compiler_rt
<ikskuh>
you might need to bundle/link against it as well
<ikskuh>
lib.bundle_compiler_rt = true
<g-w1>
ok
<ikskuh>
should do the job
<kandinski>
ifreund: sure! I'd like to eventually have something others can use, but for now I feel this is a well shaved yak and I'm going to move on as long as I get the results I need
<g-w1>
i think it works with builtin.Mode.ReleaseFast
<kandinski>
ifreund: thanks so much for your support and advice
<ikskuh>
ha, finally sub-600 :)
<g-w1>
well now it works with release-fast mode enabled. ill file this in the back of my head as a potential bug
<ifreund>
kandinski: no problem!
<ikskuh>
ifreund: the one thing that bugs me is that darn "No more bottles" ;D
<ikskuh>
g-w1: does it work with standard mode?
<ikskuh>
so Debug=
<ifreund>
ikskuh: I got bored of that one, I'm working on the brainfuck one now :D
<ikskuh>
heh
<ikskuh>
will check that out as well
<g-w1>
do you think this is the best way to embed zig in a rust project? https://paste.rs/k1B.rs as a build.zig
<ikskuh>
but right now, i want to get at least down to ~550
osa1 has joined #zig
frmdstryr has quit [Read error: No route to host]
<ifreund>
damn, daurnimator got down to 414
<ifreund>
I'm so curious
<ikskuh>
yeah, me too
<ikskuh>
i just discovered something which requires an issue on github though
<g-w1>
what?
<ikskuh>
we're playing code golf
<g-w1>
I mean what reqires an issue
<ikskuh>
oh
<ikskuh>
you'll see :D
frmdstryr has joined #zig
* virkony
just noticed that EAGAIN in std.os.fork translated to error.SystemResources, which seems to be wrong...
<ikskuh>
EAGAIN A system-imposed limit on the number of threads was encountered. There are a
<ikskuh>
number of limits that may trigger this error:
<g-w1>
is there a way to do a for loop for a known amount of iterations without creating an array?
<dutchie>
var i: usize = 0; while (i < numIters) : (i += 1) { ... }
<g-w1>
ok
<ifreund>
there's also a hacky way to use a for loop with a slice of 0 bit types
<g-w1>
you have to create a variable
<ifreund>
but a while loop is the right answer
<g-w1>
ok
<dutchie>
it feels like zig's while look with a continue expression is closer in spirit to C's for
<dutchie>
loop*
<ifreund>
it's kinda halfway between C's while and for
<tane>
I kinda dislike that the loop indices litter the enclosing namespace, similar dependence for "err" variables in go, making it hard to copy code segments around
<g-w1>
could you enclose everything in a {}
<tane>
sure
nvmd has joined #zig
<travv0>
yeah one thing i wish was in zig is `while (var i: usize = 0...) {...}` syntax so that the i is only accessible inside the loop
<travv0>
but obviously that's not consistent with how variable initialization works anywhere else in the language
skuzzymiglet has joined #zig
<ifreund>
I've slowy come to realize that it doesn't matter too much to me in practice
<nyaayaya>
hmm
hnOsmium0001 has joined #zig
<nyaayaya>
zig\lib\zig\std\os\windows.zig:1442:20: error: unable to evaluate constant expression
<nyaayaya>
I've tried to solve Fizzbuzz... but got stuck with this weird Windows error
<nyaayaya>
:(
<ifreund>
maybe try using the % operator instead of @mod?
<nyaayaya>
hmm, but how is this related to [.x86_64 => asm volatile (]?
<nyaayaya>
because it looks like it's caused by getStdOut.writer()
<ifreund>
nvm, just looked at the stack trace
<g-w1>
I am getting expected type *std.mem.Allocator found *const std.mem.allocator
<g-w1>
what am i doing wrong
<nyaayaya>
(also wouldn't it cause that error with int_comptime and u8?)
<dutchie>
you need to declare your allocator as a var not a const
<ifreund>
maybe passing the allocator by value instead of by pointer?
<g-w1>
oh
<g-w1>
ill try that
<g-w1>
it doesn't work
<ifreund>
paste the code somewhere?
<nyaayaya>
[https://paste.rs/8tF.C] so uhhuh, it looks like a problem with std/os/windows.zig @.@
Kena has joined #zig
<ifreund>
that doesn't make much sense
TheLemonMan has joined #zig
<Kena>
Hey dutchie, why do you declare a `usize` to iterate through a for loop insteand of a integer? I do not grasp the role or at least use case for usize data type.
<TheLemonMan>
nyaayaya, the compiler is trying to execute your code at compile-time
<TheLemonMan>
try replacing `const p` with `var p`
<Kena>
I'm grateful earnestly, but it deal about size_t and ptrdiff_t, those are not primitive types in Zig, are they?
<earnestly>
Kena: They are specific to the machine
<earnestly>
Kena: zig has their own versions of them
<Kena>
Allright, I'd rather read it now :)
<earnestly>
Kena: Although zig uses slices instead of pointer arithmetic for addressing arrays, but what those things represent are the nature of the beast if you want to understand a bit about what's going on under the hood
<Kena>
I would love to as I want to use a non-GC low level language ^^
<Kena>
In the doc regarding to the optional pointer, please why does the address 0 cannot have a value? It may be a stupid question.
<Kena>
It has value null I admit, but why it is this only value allowed? That why I mean.
<justin_smith>
Kena: do any architectures supported by zig allow storing a value at 0?
<justin_smith>
if so, not being able to write to location 0 is a limitation, but I was under the impression that no modern architectures allowed storage to 0
<fengb>
wasm, freestanding
<fengb>
You can do `*allowzero T` for a zero friendly pointer
x2C25 has quit [Ping timeout: 260 seconds]
<Kena>
You're right, I missed that mechanic.
<Kena>
I did'nt know it could be a use case for wasm though.
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
<Kena>
Please what does 'prong' means? E.g. "A switch on a non-exhaustive enum can include a '_' prong as an alternative to an else prong..."
<CommunistWolf>
case
<CommunistWolf>
i.e. the different possible execution paths, each is a prong, like on a fork
<ifreund>
messed up the braces but you get the idea
<Kena>
Ah yes, it's more clear now, thanks =)
<Kena>
In the doc, when it is said "safety-checked undefined behaviour", does it mean the compiler prevent undefined behaviour from happening? Or is it executed nonetheless with some kind of possible recovery mechanism for the user?
<ifreund>
that means that in safe build modes the compiler will add extra code to check for UB at runtime and abort if it occurs
<ifreund>
in fast modes UB means literally anything could happen, you can only hope your program crashes
<Kena>
Nice ^^ Does it include debug mode too?
<ifreund>
yes, Debug and ReleaseSafe
<Kena>
Thank you.
<Kena>
But it also bloat the size right?
<ifreund>
yes
<ifreund>
though this is a very reasonable tradeoff in most cases
<andrewrk>
sometimes the optimizer (llvm) figures out it can delete some safety checks
<Kena>
is ReleaseSafe a viable option for a production environment?
<ifreund>
and you can enable ReleaseFast for only some functions if you need
<ugla>
And in any mode where @setRuntimeSafety(true) is used, I assume?
<ifreund>
yes, release safe is a totally vaild default, it's what I use 99% of the time
<Kena>
Allright.
<ifreund>
it's not as fast or small as release fast/small, but it's by no means slow :D
<TheLemonMan>
proposal: rename ReleaseFast to YOLO
<nyaayaya>
ReleaseSmol
<Kena>
accepted for milestone 0.8.0 :D
lucid_0x80 has quit [Ping timeout: 240 seconds]
<g-w1>
releasefast is crazy fast.
<jabb>
i think it would be cool to have a noop function generator to avoid null function pointers, like @noop({}). this will help with interface declarations where you want default functions
<jabb>
i end up just making a bunch of stub functions and assigning them so i don't have to pass every function
xackus has quit [Ping timeout: 260 seconds]
<andrewrk>
ifreund, my goal is to get all the breaking changes for 0.7.0 in by tomorrow evening at the latest, and then only bug fixes & stability issues from then until the tag is cut. hopefully river can be in a good place to stick with 0.7
<andrewrk>
TheLemonMan, how's it going? nice seeing you around again
<TheLemonMan>
andrewrk, not good, not bad, I'm quite busy with my master thesis but I always find some time for some Zig hacking
<ifreund>
what's your thesis on?
<TheLemonMan>
innovative topologies/design for high-efficiency power amplifiers
<jabb>
:O
<andrewrk>
wow
<ifreund>
that sounds like electrical engineering not CS :P
<jabb>
i'm sure there's some machine learning involved
<TheLemonMan>
yep, I'm a EE with a penchant for CS
<fengb>
Is zig somehow involved too? >_>
<TheLemonMan>
only a boatload of Matlab *sad trombone*
<justin_smith>
looking for some help decyphering a compiler error: "expected type '[]audio_node.Node', found '[2]audio_node.Node'"
<ifreund>
andrewrk: I appreciate it! My fancy new bindings using opaque{} for libwayland and wlroots and related are now working and just need a bit of cleanup before I bring them into river :)
<ifreund>
justin_smith: try &foo
<TheLemonMan>
justin_smith, you need a &
<g-w1>
how should I represent a tuple as a type?
<g-w1>
.{ bool, u32, usize, usize } this does not work
<justin_smith>
ifreund: TheLemonMan: thanks, that's the trick
<TheLemonMan>
g-w1, meta.Tuple
<g-w1>
ok
<g-w1>
thx
<ifreund>
it's saying that it expects a slice but found an array, using & will give you the address of the array which can coerce to a []foo slice
xackus has joined #zig
<justin_smith>
ifreund: aha, that was my confusion, I thought my literal was a slice
wootehfoot has joined #zig
<ifreund>
yeah, arrays are values in zig
cole-h has quit [Quit: Goodbye]
cole-h has joined #zig
<Kena>
does the concept of dynamic array exist in Zig? Or is it more or less the slice?
<g-w1>
std.ArrayList
<g-w1>
also, how does returning an array work at the assembly level, this has confused me for a while?
<TheLemonMan>
read a bit on NRVO
<g-w1>
ok
<Ristovski>
Is there an alternative to std::multimap/std::unordered_multimap in Zig?
klltkr has joined #zig
osa1 has quit [Ping timeout: 240 seconds]
frett27 has joined #zig
donniewest has quit [Read error: Connection reset by peer]
donniewest has joined #zig
radgeRayden has joined #zig
mmohammadi9812 has quit [Read error: Connection reset by peer]
mmohammadi9812 has joined #zig
x2C25 has joined #zig
burkac` has joined #zig
riba has joined #zig
burkac has quit [Ping timeout: 240 seconds]
nvmd has quit [Ping timeout: 272 seconds]
burkac` has quit [Remote host closed the connection]
frmdstryr has quit [Ping timeout: 240 seconds]
ur5us has joined #zig
<g-w1>
TheLemonMan: thanks, I read about a "return slot" and that cleared it up.
<kandinski>
ifreund: I added more test yesterday and I'd forgotten that I was only capturing the first match. Woops.
<kandinski>
12:47 < ifreund> kandinski: looking good :) I'm sure you'll find thing you can improve upon through real-world usage
<kandinski>
p r o p h e t i c
frmdstryr has joined #zig
aperezdc[m] has quit [*.net *.split]
Nypsie[m] has quit [*.net *.split]
euantorano has quit [*.net *.split]
Sahnvour has quit [*.net *.split]
letoram has quit [*.net *.split]
euantorano has joined #zig
Sahnvour has joined #zig
letoram has joined #zig
riba has quit [Ping timeout: 260 seconds]
aperezdc[m] has joined #zig
Nypsie[m] has joined #zig
klltkr_ has joined #zig
klltkr has quit [Ping timeout: 265 seconds]
marnix has quit [Ping timeout: 260 seconds]
marnix has joined #zig
frmdstryr has quit [Quit: Konversation terminated!]
frmdstryr has joined #zig
FireFox317 has quit [Ping timeout: 246 seconds]
marnix has quit [Ping timeout: 258 seconds]
<Kena>
Can a union be both tagged and packed?
<Kena>
concurrently I mean.
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
radgeRayden has quit [Read error: Connection reset by peer]
wootehfoot has quit [Read error: Connection reset by peer]
<g-w1>
did ziglang.org just switch to light theme?
<travv0>
ziglang.org has been light for me since i started using zig a couple weeks ago lol
<g-w1>
thats what I thought, Im on a different pc than normal. thanks
<justin_smith>
TIL google-chrome has a --force-dark-mode flag
<justin_smith>
(I was wondering how to get that behavior without using a desktop environment)
skuzzymiglet has quit [Read error: No route to host]
tane has quit [Quit: Leaving]
skuzzymiglet has joined #zig
donniewest has quit [Quit: WeeChat 2.9]
<virkony>
I think I'm doing something wrong. Have A catch return X; and now I want to lift catch to higher level. E.g. { try A; } catch return X; . Reason for this is to benefit from errdefer in C callback