<teratorn>
ok, now i have an exported struct with a hashmap field, which wont compile??
Core3159 has joined #zig
<Core3159>
justin_smith: since -% have wraparound semantic, -%-1 still equal -1, isn't it?
jjsullivan1 has quit [Remote host closed the connection]
<daurnimator>
teratorn: you'll have to elaborate a bit. but my hunch is that you need to use only `extern` structs in your C interfaces
<daurnimator>
Core3159: yes; though note that `i1` doesn't fit `1`.
Core3159 has quit [Read error: Connection reset by peer]
ur5us_ has joined #zig
Core3159 has joined #zig
<Core3159>
daurnimator: so @absCast(Uint, -%x) works , just like ~@absCast(Uint, x+% -1), right?
Core3159 has quit [Read error: Connection reset by peer]
<yZ5vlALg86lP>
so this is my very first zig project, thanks all for helping me out, answering my noob questions. i am sure this code has a lot of room for improvement, hence i lay it before you, i hope some of you will provide constructive feedback: https://github.com/stef/zphinx-zerver
Core3159 has joined #zig
Core3159 has quit [Read error: Connection reset by peer]
a92 has joined #zig
<marler8997__>
yZ5vlALg86l, cool project
<marler8997__>
inStream and outStream are deprecated, it's reader and writer now
<marler8997__>
concat already exists: std.mem.concat(allocator, u8, a, b)
<marler8997__>
you're using the now kinda old allocator interface, are you compiling with an old compiler?
<yZ5vlALg86lP>
i still use 0.6.0
<marler8997__>
0.7.0 just release, good time to update
<yZ5vlALg86lP>
the instream/outstream thing i mostly copied from the bearssl bindings
<yZ5vlALg86lP>
i'm actually packaging stuff in alpine, i might just bump the version there...
<marler8997__>
yeah, it's time for all the package managers to update anyway
<marler8997__>
not sure if you want to wait for 0.7.1 though..not sure how long it will take, maybe a week or so?
<marler8997__>
0.7.0 was just released, but 0.7.1 is a patch release fixing a few known issues with 0.7.0
<yZ5vlALg86lP>
ah. the problem is there is no llvm11 yet in alpine...
<marler8997__>
ah, well, zigup is still there for you, you may want to have it around anyway if you are doing zig development because you'll want to be able to have multiple compilers installed and the ability to switch between them
<yZ5vlALg86lP>
thanks. i cloned it, will have a look at the changed interfaces you suggested
pfg_ has joined #zig
Kingsqueee has joined #zig
Kingsquee has quit [Ping timeout: 260 seconds]
aerona has quit [Quit: Leaving]
<mla>
maybe obvious but im struggling here, how do i pass options to clang in compile via zig build-exe, i want to just pass through -fno-profile-arcs
aerona has joined #zig
squeek502 has quit [Remote host closed the connection]
a92 has quit [Quit: My presence will now cease]
ur5us_ has quit [Ping timeout: 260 seconds]
<mla>
ok figured it out, using zig cc passes things through
ur5us_ has joined #zig
Kingsqueee has quit [Remote host closed the connection]
Kingsqueee has joined #zig
jjsullivan has joined #zig
ur5us_ has quit [Ping timeout: 260 seconds]
msingle has joined #zig
msingle has quit [Ping timeout: 240 seconds]
dimenus has joined #zig
dimenus has quit [Ping timeout: 260 seconds]
<pfg_>
mla, -cflags -fno-profile-arcs -- source.c
<pfg_>
also build.zig lets you do .addCSourceFile("file.c", &[_][]const u8{"-fno-profile-arcs"});
ffde has joined #zig
ffde has quit [Remote host closed the connection]
a_chou has joined #zig
a_chou has quit [Remote host closed the connection]
Jeanne-Kamikaze has joined #zig
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]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
Jeanne-Kamikaze has quit [Quit: Leaving]
aerona has quit [Quit: Leaving]
sord937 has joined #zig
GrooveStomp_ has quit [Ping timeout: 264 seconds]
mmohammadi9812 has quit [Quit: Quit]
waleee-cl has quit [Quit: Connection closed for inactivity]
_whitelogger has joined #zig
earnestly has quit [Ping timeout: 260 seconds]
Ashpool has joined #zig
gazler_ has quit [Ping timeout: 264 seconds]
lucid_0x80 has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
wilsonk has quit [Quit: Leaving]
xackus_ has joined #zig
cole-h has quit [Ping timeout: 240 seconds]
radgeRayden has quit [Ping timeout: 272 seconds]
gazler_ has joined #zig
gazler__ has quit [Ping timeout: 258 seconds]
haliucinas has quit [Ping timeout: 240 seconds]
haliucinas has joined #zig
omglasers2 has joined #zig
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
earnestly has joined #zig
cow-orker has quit [Remote host closed the connection]
<BaroqueLarouche>
haha "Brilliant. By now I should have dozens of diplomas after being schooled by LemonBoy so many times."
GrooveStomp_ has joined #zig
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
xackus_ has quit [Ping timeout: 260 seconds]
tane has quit [Quit: Leaving]
casaca has quit [Remote host closed the connection]
<fengb>
:o
casaca has joined #zig
xackus_ has joined #zig
<xackus_>
i'd like to take a shot at implementing astgen for continue. should it be implemented with BreakVoid?
sord937 has quit [Quit: sord937]
kacak has quit [Ping timeout: 264 seconds]
<GrooveStomp_>
What's the idiomatic way to convert a c string into []u8 ?
<ikskuh>
std.mem.span()
<ikskuh>
will return []const u8
<GrooveStomp_>
Wow! Thanks! :-D
<GrooveStomp_>
Man, I'd love to help with the standard library documentation.
<g-w1>
is the only reason that it doesn't work the lazy evaluation?
<andrewrk>
the work has to be partially re-done in self-hosted, so I didn't push it beyond a proof-of-concept
<g-w1>
ah
<demizer>
i could also help with stdlib docs, no idea where to even begin. :D
radgeRayden has joined #zig
ur5us_ has joined #zig
xackus_ has quit [Ping timeout: 260 seconds]
<demizer>
hey all, I am trying to add line numbers to my log output so it's easier to debug, see https://hastebin.com/qiruqulilu.zig. I am using @returnAddress() with a hacked up stacktrace, but it's not getting the correct line from where the prints are called in main. Does anyone have any suggestions how to overcome this? I think this should be a feature in the logging library and am more than happy to open a
<demizer>
ticket. It's much quicker to go straight to the problem when debugging than grepping for the message when debugging an issue in prod. ;-)
<demizer>
hey all, I am trying to add line numbers to my log output so it's easier to debug, see https://hastebin.com/qiruqulilu.zig. I am using @returnAddress() with a hacked up stacktrace, but it's not getting the correct line from where the prints are called in main. Does anyone have any suggestions how to overcome this? I think this should be a feature in the logging library and am more than happy to open a
<demizer>
ticket. It's much quicker to go straight to the problem when debugging than grepping for the message when debugging an issue in prod. ;-)
<demizer>
hey all, I am trying to add line numbers to my log output so it's easier to debug, see https://hastebin.com/qiruqulilu.zig. I am using @returnAddress() with a hacked up stacktrace, but it's not getting the correct line from where the prints are called in main. Does anyone have any suggestions how to overcome this? I think this should be a feature in the logging library and am more than happy to open a
<demizer>
ticket. It's much quicker to go straight to the problem when debugging than grepping for the message when debugging an issue in prod. ;-)
<demizer>
hey all, I am trying to add line numbers to my log output so it's easier to debug, see https://hastebin.com/qiruqulilu.zig. I am using @returnAddress() with a hacked up stacktrace, but it's not getting the correct line from where the prints are called in main. Does anyone have any suggestions how to overcome this? I think this should be a feature in the logging library and am more than happy to open a
<demizer>
ticket. It's much quicker to go straight to the problem when debugging than grepping for the message when debugging an issue in prod. ;-)
<demizer>
oh craps, sorry guys my window was scrolled up
xackus_ has joined #zig
lltt has joined #zig
<pfg_>
demizer, @src() can tell you line numbres, I'm not sure if that's what you want
<pfg_>
oh you want to get the line number without passing in something like `@src()`
<pfg_>
the stacktrace you are printing is only showing the line in std.log for me and nothing else
<pfg_>
demizer, try std.debug.writeCurrentStackTrace. you will then have to search through that to find the place where log was called
<pfg_>
or you can use a StackIterator directly
<pfg_>
that way you can get the value directly instead of writing a bunch of text out to an arraylist and searching through the arraylist to find what you want
<demizer>
sweet, thanks pfg_, i'll see if i can make that work
cole-h has quit [Ping timeout: 260 seconds]
neceve has quit [Ping timeout: 260 seconds]
moo has quit [Quit: Leaving]
wootehfoot has joined #zig
decentpenguin has quit [Ping timeout: 264 seconds]
frmdstryr has quit [Read error: No route to host]
frmdstryr has joined #zig
msingle has quit [Read error: Connection reset by peer]
frmdstryr has quit [Ping timeout: 256 seconds]
kristoff_it1 has joined #zig
decentpenguin has joined #zig
kristoff_it has quit [Ping timeout: 258 seconds]
marnix has quit [Ping timeout: 258 seconds]
frmdstryr has joined #zig
zippoh has quit [Ping timeout: 272 seconds]
zippoh` has joined #zig
ur5us_ has quit [Ping timeout: 260 seconds]
omglasers2 has quit [Read error: Connection reset by peer]
omglasers2 has joined #zig
jjsullivan1 has joined #zig
ur5us_ has joined #zig
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
tane has joined #zig
Amun_Ra has quit [Ping timeout: 264 seconds]
donniewest has quit [Quit: WeeChat 3.0]
wilsonk has joined #zig
wilsonk is now known as Guest9767
nvmd has quit [Ping timeout: 240 seconds]
Amun_Ra has joined #zig
skuzzymiglet has quit [Ping timeout: 260 seconds]
omglasers2 has quit [Read error: Connection reset by peer]
skuzzymiglet has joined #zig
ur5us_ has quit [Ping timeout: 264 seconds]
tane has quit [Quit: Leaving]
skuzzymiglet has quit [Ping timeout: 260 seconds]
wootehfoot has quit [Read error: Connection reset by peer]