plumm has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<mikdusan>
is zig planning to llvm 11.1.0 or skip right to 12.0.0 ?
v0idify has quit [Ping timeout: 268 seconds]
ex_nihilo has joined #zig
zags has quit [Ping timeout: 265 seconds]
marler8997 has quit [Quit: Leaving]
zags has joined #zig
v0idify has joined #zig
sineer has joined #zig
zags has quit [Ping timeout: 265 seconds]
<sineer>
I just ran out if Zig-Zag paper and thought perhaps someone here could help :)
<sineer>
Seriously, are there any Ziglers here? I've been trying to get Zigler master to work on mac Catalina and I'm very close I think but build.zig addSharedLibrary tries to copy .so instead of .dylib files at the very end...
ky0ko has joined #zig
kristoff_it has quit [Ping timeout: 260 seconds]
plumm has joined #zig
cole-h has quit [Ping timeout: 260 seconds]
gazler has joined #zig
plumm has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<andrewrk>
mikdusan, 12.0.0
<andrewrk>
sineer, dnautics is around somewhere
gazler__ has quit [Ping timeout: 240 seconds]
<andrewrk>
I don't remember where he hangs out
<sineer>
thanks, I'll keep an eye out for him :-)
a_chou has joined #zig
<sineer>
Zigler is clearly marked as experimental for mac so I have to at least try harder to fix first...
plumm has joined #zig
Swahili has quit [Remote host closed the connection]
earnestly has quit [Ping timeout: 246 seconds]
blueberrypie has quit [Quit: leaving]
earnestly has joined #zig
blueberrypie has joined #zig
plumm has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
bgold has joined #zig
earnestly has quit [Ping timeout: 246 seconds]
plumm has joined #zig
mjsir911 has quit [Ping timeout: 256 seconds]
mjsir911 has joined #zig
jukan has joined #zig
jukan_ has quit [Ping timeout: 260 seconds]
xackus_ has joined #zig
xackus has quit [Ping timeout: 265 seconds]
bgold has quit [Quit: leaving]
watzon has joined #zig
<andrewrk>
ifreund, nice work on those recent zig fmt commits
braket has joined #zig
v0idify has quit [Remote host closed the connection]
v0idify has joined #zig
plumm has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
waleee-cl has quit [Quit: Connection closed for inactivity]
v0idify has quit [Ping timeout: 268 seconds]
v0idify has joined #zig
v0idify has quit [Ping timeout: 268 seconds]
andreyorst has quit [Quit: WeeChat 2.8]
v0idify has joined #zig
v0idify has quit [Ping timeout: 268 seconds]
knebulae has quit [Read error: Connection reset by peer]
a_chou has quit [Quit: a_chou]
v0idify has joined #zig
v0idify has quit [Ping timeout: 268 seconds]
osa1_ is now known as osa1
v0idify has joined #zig
cole-h has joined #zig
decentpenguin has quit [Read error: Connection reset by peer]
marler8997 has joined #zig
decentpenguin has joined #zig
bitmapper has quit [Quit: Connection closed for inactivity]
marler8997 has quit [Quit: Leaving]
marler8997 has joined #zig
marler8997 has quit [Quit: Leaving]
sord937 has joined #zig
fputs has quit [Ping timeout: 240 seconds]
zags has joined #zig
dingenskirchen has quit [Quit: ZNC 1.8.1 - https://znc.in]
<sineer>
zags!
dingenskirchen has joined #zig
<sineer>
:) I think I found out my problem w/ zigler, turns out it's as deep as erlang hardcoding shared lib FILE_EXT ".so" in load_nif/2 :(
xackus has joined #zig
jzelinskie has quit [Ping timeout: 272 seconds]
jzelinskie has joined #zig
xackus_ has quit [Ping timeout: 265 seconds]
kenran has joined #zig
<ifreund>
andrewrk: thanks :)
kenran has quit [Read error: Connection reset by peer]
kenran has joined #zig
cole-h has quit [Ping timeout: 260 seconds]
geemili has quit [Ping timeout: 264 seconds]
geemili has joined #zig
<zags>
sineer: you pinged? :D
earnestly has joined #zig
kenran has quit [Quit: leaving]
braket has quit [Ping timeout: 272 seconds]
m4r35n357 has joined #zig
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
Swahili has joined #zig
knebulae has joined #zig
tdeo has quit [Ping timeout: 260 seconds]
zags has quit [Quit: leaving]
tdeo has joined #zig
zags has joined #zig
neptunepunk has quit [Ping timeout: 240 seconds]
haliucinas has quit [Remote host closed the connection]
haliucinas has joined #zig
neptunepink has joined #zig
leon-p has quit [Quit: leaving]
leon-p has joined #zig
leon-p has quit [Quit: leon-p]
leon-p has joined #zig
bitmapper has joined #zig
waleee-cl has joined #zig
CommunistWolf has quit [Remote host closed the connection]
CommunistWolf has joined #zig
<Swahili>
Q: How can I convert a unicode character such as "=" or "b" to decimal? Thanks!
<ifreund>
'=' is a comptime_int in zig
<ifreund>
if you really need to deal with unicode, see std.unicode though
<Swahili>
Thank you ifreund! I'll do :)
<ifreund>
(note that "=" and "b" are both ascii, you wouldn't need std.unicode for them)
<Swahili>
Ok, how'd I convert ascii char to the decimal value?
<Swahili>
std.fmt?
<g-w1>
"=" is a []const u8
<g-w1>
but a char like '\n' *is* the same as 10
<ifreund>
*const [1]u8 actually
<g-w1>
^
<ifreund>
oops, *const [1:0]u8
<ifreund>
but yeah, if you do "="[0] you will get the integer corresponding to '='
<g-w1>
this wont work if the first "char" of the string is a multi-codepoint unicode char right?
<ifreund>
i.e. this is true: "12="[2] == '=' and '=' == 61
<ifreund>
g-w1: it will simply give you the first byte of the codepoint yeah
<g-w1>
ok
<Swahili>
Ok, learned. "="[0] works! : )
<dutchie>
'=' is better though, since it will work even for multibyte codepoints
<ifreund>
note that "="[0] == '=' and the latter is more idiomatic
<ifreund>
dutchie makes a very good point as well
<dutchie>
"☺"[0] may not be what you want
<dutchie>
(for that matter, '☺' might not be either, but it's more likely. aren't character encodings fun)
donniewest1 has joined #zig
<Swahili>
So, "=" is []const u8 and '=' is u8. What should I read to understand the difference between " and '?
<g-w1>
as noted by ifreund, "=" is *const [1:0]u8, while '=' is just a comptime_int. ' creates a comptime int of the char value in it. "" creates a pointer to a null terminated string that can be coerced to []const u8
<zags>
I have a callback field like "callback: fn() !void", but that leads to "error: inferring error set of return type valid only for function definitions". But I don't know what errors the injected callback may return. What's a good way to deal with this situation?
Techcable has quit [Ping timeout: 265 seconds]
tane has joined #zig
<tane>
howdy
Akuli has joined #zig
<dutchie>
zags: there's always anyerror
marler8997 has joined #zig
<zags>
dutchie: oh good point
Snaffu has joined #zig
Techcable has joined #zig
zags has quit [Ping timeout: 264 seconds]
<Swahili>
Q: Given a value: u8, and a switch statement switch (value), is it a bad practice to use @enumToInt(Some enum field) in the switch cases? Thanks!
<ifreund>
it would probably make more sense to do switch(@intToEnum(value))
<Swahili>
ifreund: awesome!! didn't see that one!! thanks :D
<Gliptic>
assuming the integer actually has only valid enum values
<dutchie>
or the enum is exhaustive
<ifreund>
indeed
<dutchie>
err, i should have said non-exhaustive
<Swahili>
yeh, safe :)
dyeplexer has joined #zig
dyeplexer has quit [Ping timeout: 265 seconds]
m4r35n357 has quit [Quit: Ex-Chat]
hnOsmium0001 has joined #zig
plumm has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
Techcable has quit [Remote host closed the connection]
plumm has joined #zig
plumm has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
v0idify has quit [Remote host closed the connection]
isolier0 has joined #zig
isolier has quit [Ping timeout: 246 seconds]
isolier0 is now known as isolier
zags has joined #zig
cole-h has joined #zig
riba has joined #zig
donniewest1 has quit [Ping timeout: 260 seconds]
Swahili has quit [Remote host closed the connection]
<g-w1>
could you modify the union type based on the platform?
<ifreund_>
then you’d need to modify all switchs though
<g-w1>
ah, that falls through
xackus_ has quit [Ping timeout: 246 seconds]
<ifreund>
ikskuh: You could probably have a function implemented by each platform that asserts some events are unreachable
<ifreund>
then call this single function before each cross-platform switch
<ikskuh>
yeah
<ifreund>
not super clean I know, but ok
<ikskuh>
my first idea was to have a `field: noreturn`
<ikskuh>
but that just kills the compiler :D
<ifreund>
lol, I don't think a language feature for this is really warrented
<ikskuh>
:D
<ifreund>
you could also do some hack where you define `const Unreachable = opaque{}` and use that as the payload for unreachable things in the platform-specific tagged union declaractions
<ifreund>
then use @typeInfo() to generically assert that all fields of that type are unreachable