ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<wink_> Hejsil mentions in https://github.com/ziglang/zig/pull/1685#issuecomment-438253107 that there is code to format zig code for the new changes, "zig-fmt-error-to-anyerror" and "zig-fmt-revert-dot-init-container-decl" but I built tip of tree and stage2 but don't seem the comamnds. I also looked on his github page and don't see them their either. Any i
<wink_> deas?
<wink_> I found them, they are branches on the main zig repo, https://github.com/ziglang/zig/branches
oconnor0 has quit [Ping timeout: 252 seconds]
oconnor0 has joined #zig
<benjikun> Jeez the macros in this make everything complicated
<benjikun> I followed the `DefaultRootWindow` rabithole and came out with `&((_XPrivDisplay(display))->screens[(_XPrivDisplay)(display)->default_screen->root)]`
<benjikun> *rabbithole
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benjikun> I have no idea how I'm going to get past these macros with zig
jmiven has quit [Quit: co'o]
<benjikun> wow, nevermind
<benjikun> they have function alternatives
jmiven has joined #zig
steveno has quit [Remote host closed the connection]
* daurnimator waves
<daurnimator> andrewrk: around?
benjikun has quit [Quit: Lost terminal]
benjikun has joined #zig
<daurnimator> Different beginner question (to anyone): what am I doing wrong here? https://ptpb.pw/yJX7
oconnor0 has quit [Ping timeout: 268 seconds]
oconnor0 has joined #zig
<presiden> daurnimator: from quick peek, first, probably the return value of the function
<daurnimator> presiden: I tried adding that. same error (error: expected token ';', found ',')
<presiden> daurnimator: fn sample() []f64 { ... }
<presiden> let me check
benjikun has quit [Quit: Lost terminal]
<presiden> daurnimator: something like this, https://paste.debian.net/plain/1051634
<daurnimator> presiden: that also fails with the same error for me. also I don't want to pre-declare the length
<presiden> or older version?
<daurnimator> I was using this arrays.zig: https://ziglang.org/documentation/0.3.0/#Arrays
<presiden> wokrs on 0.3.0
<presiden> I'm not so sure myself
<jfondren> presiden's code works for me on 0.3.0. Although the output's not so nice.
<jfondren> you can return 0 from main if you set its return type to u8
wink_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<presiden> sample() returning slice, https://paste.debian.net/plain/1051636
davr0s has joined #zig
<jfondren> 0.3.0
<daurnimator> MajorLag: My intention was to (at comptime) concat arrays
<jfondren> concatenating arrays at compile-time: https://gist.github.com/jrfondren/9f79f00f7ae055b5eff647f60e3484e5
<benjikun> jfondren: stealth message?
<jfondren> I'm using sirc in tmux on a remote box for an IRC client, so usually I watch the logs rather than the client
<jfondren> but if it's bugged, eh.
<benjikun> weird
<jfondren> yeah. several messages in the last few minutes aren't in the log
<benjikun> strange
<benjikun> lol
<benjikun> is that wrong?
<jfondren> nah. it looks pretty good to me.
<jfondren> if ev.type were an enum, you could use a switch, and zig would error out if you missed a case.
<benjikun> but for some reason it doesn't work with dragging
<daurnimator> MajorLag: yeah that's not pretty :(
<daurnimator> disappointing that zig doesn't infer the array length for the return value
<benjikun> zig isn't a normal language heh
<benjikun> thank you :)
<MajorLag> bear in mind, I'm pretty much entirely ignorant of X api, so.
<benjikun> changed that, but still no cigar
<benjikun> hm
<daurnimator> okay, so now I've got further
oconnor0 has quit [Ping timeout: 268 seconds]
oconnor0 has joined #zig
<jfondren> damn this broken logger.
<benjikun> MajorLag: I did `ButtonPressMask|ButtonReleaseMask|PointerMotionMask` instead now, still nothin :(
<daurnimator> 1134964
<daurnimator> you sure?
<MajorLag> pretty sure, I've run the compiler out of memory before
<daurnimator> hryx: I figured it was a good first-experiment
<hryx> Awesome, good luck!
<jfondren> *shrug*
<benjikun> yep
<benjikun> 8gb
_whitelogger has joined #zig
oconnor0 has quit [Ping timeout: 244 seconds]
oconnor0 has joined #zig
Zaab1t has joined #zig
<Hejsil> Hmmm. Anyone know of any good line-oriented formats that is able to represent structured data. So far, I've only found line-oriented XML and Fson formats (which might be good enough for my purposes).
<Hejsil> Motivation: I need to stream structured data between different process unix style
<Hejsil> Fson/Json*
Hejsil has quit [Ping timeout: 256 seconds]
<MajorLag> why serialize to a text format instead of a custom binary format? You can have a switch to render the output human readable. This would avoid the overhead cost of parsing it and rendering it at every stage in normal operation.
<MajorLag> Actually, don't even do a switch, just make a program that renders the input data and pipe the output to it.
qazo has quit [Ping timeout: 252 seconds]
oconnor0 has quit [Ping timeout: 268 seconds]
oconnor0 has joined #zig
oconnor0 has quit [Ping timeout: 246 seconds]
oconnor0 has joined #zig
Hejsil has joined #zig
oconnor0 has quit [Ping timeout: 268 seconds]
oconnor0 has joined #zig
unique_id has left #zig ["Konversation terminated!"]
Ichorio has joined #zig
qazo has joined #zig
qazo has quit [Ping timeout: 260 seconds]
m4ge123 has joined #zig
qazo has joined #zig
qazo has quit [Ping timeout: 260 seconds]
wootehfoot has joined #zig
davr0s has joined #zig
wink_ has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
benjikun has joined #zig
<benjikun> Hi again
steveno has quit [Remote host closed the connection]
porky11 has quit [Read error: Connection reset by peer]
porky11 has joined #zig
Zaab1t has quit [Quit: bye bye friends]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
<MajorLag> Hi benjikun, saw you got the wm working.
<benjikun> yep :)
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
Hejsil has quit [Quit: Page closed]
wootehfoot has quit [Read error: Connection reset by peer]
m4ge123 has quit [Ping timeout: 246 seconds]
oconnor0 has quit [Ping timeout: 244 seconds]
oconnor0 has joined #zig
wink_ has joined #zig
<jzelinskie> i feel like zig is the python of c
<jzelinskie> hard to describe why, but it feels right in my head
<benjikun> I don't see it that way
<jzelinskie> from a "language doesn't get in your way" perspective
<benjikun> hm
<jzelinskie> it's clear andy n co definitely start from a problem and come up with elegant solutions, rather than adding features because they think something will ben ice
<jzelinskie> be nice*
<benjikun> yeah, I like zig's scrupulous behavior in regards to new feature requests
rom1504 has quit [Ping timeout: 252 seconds]
oconnor0 has quit [Ping timeout: 240 seconds]
oconnor0 has joined #zig
rom1504 has joined #zig
benjikun has quit [Read error: Connection reset by peer]
porky11 has quit [Quit: Leaving]