<mattnite>
Sorry wasn't exact, you're correct, you have to hit the errdefer for it to be "registered"
<kandinski>
sure, thanks
<kandinski>
my mental model was incorrect
<mattnite>
I skimmed the code a little to fast :P
<mattnite>
too*
<kandinski>
(somehow in my mental model `foo = try blargh()` meant the variable now contained the error, instead of the block exiting with the error)
<mattnite>
ah, yeah you'd have the error if there was no try
<kandinski>
I don't really know C, I'm learning zig as an exciting opportunity to catch up on system programming without having to take on historical baggage of mentally learning about all the quirks and warts
st4ll1 has joined #zig
a_chou has quit [Quit: a_chou]
earnestly has quit [Ping timeout: 272 seconds]
dermetfan has quit [Ping timeout: 272 seconds]
nephele_ has joined #zig
nephele has quit [Ping timeout: 240 seconds]
nephele_ is now known as nephele
mattnite has quit [Remote host closed the connection]
waleee-cl has quit [Quit: Connection closed for inactivity]
cole-h has quit [Quit: Goodbye]
cole-h has joined #zig
a_chou has joined #zig
a_chou has quit [Quit: a_chou]
GrooveStomp has joined #zig
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
joey152 has quit [Remote host closed the connection]
marnix has quit [Ping timeout: 260 seconds]
marnix has joined #zig
ur5us has quit [Ping timeout: 260 seconds]
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
cole-h has quit [Quit: Goodbye]
decentpenguin has quit [Read error: Connection reset by peer]
marnix has joined #zig
decentpenguin has joined #zig
marnix has quit [Read error: Connection reset by peer]
lqd has joined #zig
khr has joined #zig
<khr>
hello folks. first foray into zig here, anyone have a simple example of a build.zig file which adds a C header include directory? the docs are a bit sparse on the subject of build.zig and std.build at the moment.
<ikskuh>
heya
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
<Barabas>
ikskuh I can't find the function. `span` looks like it, but that doesn't accept a single pointer it seems.
<ikskuh>
hm
<ikskuh>
maybe i should add it or the coercion of single item pointer to multi-item-pointer is accepted some day…
joey152 has joined #zig
xackus has joined #zig
a_chou has joined #zig
LanceThePants has quit [Read error: Connection reset by peer]
LanceThePants has joined #zig
wootehfoot has joined #zig
lqd is now known as phazon
phazon is now known as lqd
GrooveStomp_ has joined #zig
xackus has quit [Read error: Connection reset by peer]
swills has quit [Ping timeout: 240 seconds]
xackus_ has joined #zig
marnix has quit [Ping timeout: 264 seconds]
<leeward>
fn toArray(comptime T: type, *T) [1]T
<leeward>
mmm, that'd be a *[1]T
swills has joined #zig
joey152 has quit [Quit: Leaving]
marnix has joined #zig
layneson has quit [Ping timeout: 260 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
mokafolio has quit [Quit: Bye Bye!]
swills has quit [Ping timeout: 265 seconds]
mokafolio has joined #zig
swills has joined #zig
a_chou has quit [Ping timeout: 246 seconds]
layneson has joined #zig
waleee-cl has joined #zig
LanceThePants has quit [Read error: Connection reset by peer]
LanceThePants has joined #zig
wootehfoot has quit [Read error: Connection reset by peer]
wootehfoot has joined #zig
_Vi has joined #zig
Barabas has quit [Remote host closed the connection]
wootehfoot has quit [Read error: Connection reset by peer]
a_chou has joined #zig
marnix has quit [Ping timeout: 272 seconds]
SimonNa has quit [Remote host closed the connection]
frmdstryr has joined #zig
SimonNa has joined #zig
a_chou has quit [Quit: a_chou]
layneson has quit [Ping timeout: 260 seconds]
ur5us has joined #zig
frmdstryr has quit [Ping timeout: 258 seconds]
ur5us_ has joined #zig
arqv has joined #zig
ur5us has quit [Ping timeout: 258 seconds]
xackus_ has quit [Remote host closed the connection]
xackus_ has joined #zig
<dmiller>
Does anyone have a little snippet handy showing how to create an AutoHashMap with strings as keys? As a systems programming newbie I'm having a hard time figuring out how to do it since strings seem to usually be represented as `[]u8` which is a pointer at the end of the day. Pointers aren't very useful as keys, it turns out!
<andrewrk>
dmiller, std.StringHashMap
<andrewrk>
you can see some usage examples in tools/*.zig
Akuli has quit [Quit: Leaving]
xackus_ has quit [Ping timeout: 240 seconds]
xackus_ has joined #zig
a_chou has joined #zig
ur5us_ has quit [Read error: Connection reset by peer]
ur5us_ has joined #zig
_Vi has quit [Ping timeout: 272 seconds]
a_chou has quit [Ping timeout: 272 seconds]
xackus_ has quit [Ping timeout: 240 seconds]
<johnLate>
I want to read from a json file. I'm trying to simplify var value1 = tree.root.Object.get("a").?.value.Object.get("x").?.value.Object.get("1").?.value;
<johnLate>
into something like: var value3 = J.lookup(tree.root, .{ "a", "x", "1"});