<leeward>
Heh, the CI jobs that failed include one called BuildLinux: windows.zig
dddddd has quit [Ping timeout: 260 seconds]
Zannzen has quit [Quit: WeeChat 2.8]
ur5us has quit [Ping timeout: 260 seconds]
doublex has quit [Ping timeout: 260 seconds]
nephele_ has joined #zig
nephele has quit [Ping timeout: 260 seconds]
nephele_ is now known as nephele
ur5us has joined #zig
doublex has joined #zig
Zannzen has joined #zig
<andrewrk>
leeward, pretty much all the CI jobs cross compile for all the targets :)
<leeward>
It's pretty sweet that they can do that.
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 246 seconds]
aerona has joined #zig
drp_ has joined #zig
drp has quit [Ping timeout: 256 seconds]
opDispatch has quit [Quit: Konversation terminated!]
waleee-cl has quit [Quit: Connection closed for inactivity]
reductum has joined #zig
marler8997_ has quit [Quit: Leaving]
ur5us has quit [Ping timeout: 260 seconds]
aerona has quit [Quit: Leaving]
reductum has quit [Quit: WeeChat 2.8]
traviss has quit [Remote host closed the connection]
<leeward>
Wow, those tests took a long time to run. #5629 updated. Hopefully it can be denied on its merits now, instead of because it doesn't work :P
traviss has joined #zig
slowtype1 has joined #zig
slowtyper has quit [Ping timeout: 256 seconds]
tdc has joined #zig
<pixelherodev>
andrewrk: want me to add a harness for Zig code? :)
<andrewrk>
pixelherodev, if you want to code something up against my zig-ast-to-zir branch between now and ~10 hours from now, go for it, I'll take a look before I resume coding on it tomorrow
nikita` has joined #zig
marnix has joined #zig
cole-h has quit [Quit: Goodbye]
squeek502_ has joined #zig
squeek502 has quit [Ping timeout: 264 seconds]
st4ll1 has quit [Ping timeout: 264 seconds]
st4ll1 has joined #zig
ur5us has joined #zig
ur5us has quit [Ping timeout: 244 seconds]
ur5us has joined #zig
s-ol_ is now known as s-ol
nycex- has quit [Remote host closed the connection]
nycex has joined #zig
mokafolio has quit [Quit: Bye Bye!]
mokafolio has joined #zig
waleee-cl has joined #zig
ur5us has quit [Ping timeout: 260 seconds]
dermetfan has joined #zig
<pixelherodev>
Gotcha
<pixelherodev>
andrewrk: If I don't fall asleep, I'll try to get it done within the next two or three hours :)
wootehfoot has joined #zig
Amun_Ra has joined #zig
Patrice_ has quit [Read error: Connection reset by peer]
squeek502_ has quit [Ping timeout: 246 seconds]
squeek502 has joined #zig
Patrice_ has joined #zig
marijnfs has quit [Quit: leaving]
marijnfs has joined #zig
frett27 has joined #zig
Patrice_ has quit [Ping timeout: 265 seconds]
neceve_ has joined #zig
<pixelherodev>
oh I see
<pixelherodev>
You just create a Module with a .zig file instead of a .zir one
<pixelherodev>
This should probably use the same TestContext but a ZigCase instead of a ZirCase
<pixelherodev>
Definitely shouldn't try mixing the two types of tests :P
dddddd has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
waleee-cl has joined #zig
daurnimator has quit [Ping timeout: 260 seconds]
dermetfan has quit [Ping timeout: 244 seconds]
<pixelherodev>
andrewrk: figured out a design for the harness, will try to get it in within the next three hours
daurnimator has joined #zig
<gonz_>
andrewrk: I see we fell in love with Tracy at the same time. Someone posted the Tracy video on Twitter like a week ago and I had the exact same feeling about it
<gonz_>
Last friday I wrote this to my colleagues: "This tool, though. Whenever I think the video has peaked it just keeps going..."
_Vi has joined #zig
dermetfan has joined #zig
marnix has quit [Ping timeout: 240 seconds]
wootehfoot has quit [Ping timeout: 258 seconds]
blinghound has joined #zig
<blinghound>
Has anyone had any luck compiling freetype on windows in a zig build?
xackus_ has joined #zig
<blinghound>
ok I successfully linked FreeType with my zig project. I had to configure and build FreeType from scratch with mingw64 to get libfreetype.a, then include the freetype headers and link the library file
<blinghound>
god the FreeType build system is messy
* pixelherodev
is absolutely stunned by the very concept
<leeward>
Hoonay, something worked!
decentpenguin has joined #zig
<leeward>
But not my r key
dingenskirchen has quit [Quit: dingenskirchen]
decentpenguin has quit [*.net *.split]
drp_ has quit [*.net *.split]
nephele has quit [*.net *.split]
hspak has quit [*.net *.split]
Amun_Ra has quit [*.net *.split]
jicksaw has quit [*.net *.split]
ky0ko has quit [*.net *.split]
rom1504 has quit [*.net *.split]
nycex has quit [*.net *.split]
blinghound has quit [*.net *.split]
BitPuffin has quit [*.net *.split]
pltrz has quit [*.net *.split]
Snektron has quit [*.net *.split]
watzon has quit [*.net *.split]
metheflea has quit [*.net *.split]
pmwhite has quit [*.net *.split]
decentpenguin has joined #zig
blinghound has joined #zig
Amun_Ra has joined #zig
nycex has joined #zig
drp_ has joined #zig
hspak has joined #zig
nephele has joined #zig
jicksaw has joined #zig
BitPuffin has joined #zig
pltrz has joined #zig
Snektron has joined #zig
watzon has joined #zig
metheflea has joined #zig
pmwhite has joined #zig
rom1504 has joined #zig
ky0ko has joined #zig
<leeward>
The quick version of a netsplit
nmeum has quit [Remote host closed the connection]
nmeum has joined #zig
dingenskirchen has joined #zig
alva has quit [Ping timeout: 244 seconds]
ifreund[m] has quit [Ping timeout: 240 seconds]
BitPuffin has quit [Ping timeout: 244 seconds]
Snektron has quit [Ping timeout: 244 seconds]
pltrz has quit [Ping timeout: 244 seconds]
metheflea has quit [Ping timeout: 244 seconds]
pmwhite has quit [Ping timeout: 244 seconds]
afontain_ has quit [Ping timeout: 244 seconds]
Bastian[m] has quit [Ping timeout: 260 seconds]
watzon has quit [Ping timeout: 244 seconds]
BaroqueLarouche has quit [Ping timeout: 240 seconds]
AlexMax has quit [Ping timeout: 240 seconds]
fengb has quit [Ping timeout: 246 seconds]
hamoko[m] has quit [Ping timeout: 256 seconds]
return0e[m] has quit [Ping timeout: 256 seconds]
sammich has quit [Ping timeout: 256 seconds]
frett27_ has joined #zig
frett27 has quit [Ping timeout: 264 seconds]
blinghound has quit [Remote host closed the connection]
<dch>
leeward: thanks for your libsodium wrapping post, really appreciate that
salotz has joined #zig
<leeward>
dch: Any time. I'm glad you liked it.
<leeward>
Someone raised an interesting point in a reddit comment about that post: declaring that a function returns `ErrorUnion!whatever` might actually be worse for usability than having it just return `!whatever`. I'm curious if anyone around here has thoughts on that.
<leeward>
The reasoning is that a caller has to put a bunch of errors that won't ever happen (assuming the function returns an incomplete subset of ErrorUnion) in their catch switch, or use `else => unreachable` or something.
stripedpajamas has joined #zig
Patrice_ has joined #zig
frett27_ has quit [Ping timeout: 260 seconds]
blinghound has joined #zig
<blinghound>
Would someone be able to explain the differences between array/slice/pointer syntax like [], [_], [*], [*:0] etc?
waleee-cl has quit [Quit: Connection closed for inactivity]
<ifreund>
[] is a slice, which is a combination of a [*] pointer to many and a length
<ifreund>
[3] is an array of three items, a block of contigous memory
<ifreund>
[*:0] is a null terminated pointer, which should be familiar from how strings work in C
<ifreund>
it is a signle pointer to the start of the string, and you then read from memory starting at that address until a null byte is found
<ifreund>
you can also use other terminators though, for example [*:5]
<ifreund>
does that clear things up at all? any specific questions?
<blinghound>
awesome. Thanks a bunch ifreund
<blinghound>
ah just wanted to know what [_] means too
<ifreund>
the _ means that the compiler should infer the length
<ifreund>
so [_]u8{ 1, 3, 4} is the same as [3]u8{ 1, 3, 4}
<ifreund>
also note that a pointer to an array can be coerced to a slice, since the size of the array is known
<blinghound>
@mq32 cheers, that's very helpful too
<mq32>
7 hours old :D
<blinghound>
ok so [_] can only be used when the length is compile-time known?
<ifreund>
yup
<mq32>
nah, not quite
<mq32>
it can be used in an array constructor
<mq32>
so
<mq32>
[_]T { … }
<mq32>
you cannot infer array sized like this:
<ifreund>
it's comptime known then no?
<mq32>
fn f(param: [_]T) void
<ifreund>
oh really? that's sick
<mq32>
note: you can not_!_
<ifreund>
:D i can't read
<blinghound>
ahhh I get it now
cole-h has joined #zig
<blinghound>
I'm also trying to allocate memory for a c string
<mq32>
var x : [_]i32 = [_]i32 { 1, 2, 3 };
<mq32>
the first use of [_]i32 is not allowed (specifying the type), but the second one is (instantiating an array)
<mq32>
you can use std.mem.dupeZ for that
<mq32>
or if you want a static string:
<mq32>
var c_string: [*:0]u8 = "Hello";
doublex has quit [Ping timeout: 260 seconds]
<mq32>
this means "[]" → collection; "*" → unknown number of elements; ":0" → terminated by a 0 value of type u8
<blinghound>
I have to allocate space for the string returned from the opengl call glGetShaderInfoLog(GLuint shader, int len, int chars_written, char *log)
<blinghound>
I'm not entirely sure how to allocator the memory need for char *log
<mq32>
ah
<mq32>
you can use an allocator
<mq32>
(doh)
<blinghound>
yep I'm using c_allocator
<mq32>
ah
<mq32>
var ptr = try c_allocator.alloc(u8, 1000); // will allocate 1000 u8
<blinghound>
I'm getting error: expected type '[*c]u8', found '[]u8'
<mq32>
ah
<mq32>
[]u8 is a slice
<mq32>
you can convert the slice to a pointer by using ".ptr"