ChanServ changed the topic of #zig to: zig programming language | https://ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
vexu has quit [Quit: WeeChat 2.6]
cleobulus has joined #zig
traviss has quit [Ping timeout: 250 seconds]
wootehfoot has joined #zig
frmdstryr has quit [Ping timeout: 265 seconds]
wootehfoot has quit [Read error: Connection reset by peer]
traviss has joined #zig
mahmudov has quit [Ping timeout: 276 seconds]
nephele has quit [Ping timeout: 246 seconds]
nephele has joined #zig
cleobulus has quit [Ping timeout: 276 seconds]
kristoff_it has quit [Ping timeout: 240 seconds]
muffindrake has quit [Ping timeout: 245 seconds]
muffindrake has joined #zig
rjtobin has joined #zig
rjtobin has quit [Remote host closed the connection]
<pixelherodev> Anyone currently on have a good knowledge of LLVM IR?
<pixelherodev> I'm also asking in #llvm on both freenode and the official OFTC server but from what I've seen those channels are both Very Quiet™ so I figured I'd ask here too in case anyone was familiar with it
dingenskirchen has quit [Quit: dingenskirchen]
dingenskirchen has joined #zig
traviss has quit [Quit: Leaving]
nephele has quit [Ping timeout: 250 seconds]
nephele_ has joined #zig
nephele_ is now known as nephele
muffindrake has quit [Quit: muffindrake]
muffindrake has joined #zig
frmdstryr has joined #zig
muffindrake has quit [Quit: muffindrake]
muffindrake has joined #zig
frmdstryr has quit [Ping timeout: 240 seconds]
iocat has joined #zig
<pixelherodev> Ah, the sweet smell of functioning optimizations at two in the morning :D
<pixelherodev> `Microoptimization zero is replacing load of %FirmwareCTX with an alias to %0`
frmdstryr has joined #zig
<pixelherodev> Ah, using memberCount / memberName / field with an iterator from std.process.args to metaprogrammatically check runtime arguments...
frmdstryr has quit [Remote host closed the connection]
<iocat> hey folks, is there any promise on backward compatibility, maybe on some part of the language today?
<iocat> (Very interested in learning this lang :) )
<pixelherodev> Not *yet* is I believe the best answer at the moment
<pixelherodev> Right now, the language is being improved a lot - but improving the language means existing code needs to be updated
<pixelherodev> Most of the changes are very minor, but they do add up
<pixelherodev> There *will* be such a promise eventually, though when that is I personally don't know
<iocat> oh ok thanks for the answer. I felt the language design is very simple, and extensible. Hope it'll be always simple. Will keep looking forward for its development!
<pixelherodev> iocat, a lot of these changes are actually meant to make the language *more* simple :)
dddddd has quit [Remote host closed the connection]
<iocat> cool!
darithorn has quit [Quit: Leaving]
vexu has joined #zig
iocat has quit [Remote host closed the connection]
vexu has quit [Ping timeout: 265 seconds]
vexu has joined #zig
vexu has quit [Ping timeout: 250 seconds]
<pixelherodev> Just got the first working `Hello, world!` compiled using my LLVM backend :D
<pixelherodev> I mean, I cheated a *little* to get it working despite the fact that I haven't implemented e.g. strings :P
<pixelherodev> But still.
wootehfoot has joined #zig
vexu has joined #zig
wootehfoot has quit [Quit: Leaving]
vexu has quit [Ping timeout: 252 seconds]
redj has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
wootehfoot has joined #zig
redj has joined #zig
vexu has joined #zig
mahmudov has joined #zig
vexu has quit [Ping timeout: 265 seconds]
mahmudov has quit [Ping timeout: 276 seconds]
frmdstryr has joined #zig
mahmudov has joined #zig
vexu has joined #zig
vexu has quit [Ping timeout: 265 seconds]
FireFox317 has joined #zig
redj has quit [Ping timeout: 240 seconds]
redj has joined #zig
dddddd has joined #zig
vexu has joined #zig
FireFox317 has quit [Ping timeout: 246 seconds]
lunamn has quit [Ping timeout: 245 seconds]
lunamn has joined #zig
vexu has quit [Ping timeout: 250 seconds]
lunamn has quit [Ping timeout: 240 seconds]
lunamn has joined #zig
vexu has joined #zig
dingenskirchen has quit [Read error: Connection reset by peer]
dingenskirchen1 has joined #zig
dingenskirchen1 is now known as dingenskirchen
vexu has quit [Ping timeout: 246 seconds]
WendigoJaeger has joined #zig
jokoon has joined #zig
vexu has joined #zig
WendigoJaeger has quit [Read error: Connection reset by peer]
WendigoJaeger has joined #zig
WendigoJaeger has quit [Remote host closed the connection]
WendigoJaeger has joined #zig
WendigoJaeger has quit [Remote host closed the connection]
WendigoJaeger has joined #zig
traviss has joined #zig
Guest66640 is now known as dimenus
traviss has quit [Ping timeout: 240 seconds]
dingenskirchen has quit [Remote host closed the connection]
dingenskirchen has joined #zig
doublex has quit [Read error: Connection reset by peer]
doublex has joined #zig
doublex has quit [Read error: Connection reset by peer]
doublex has joined #zig
adamkowalski has joined #zig
<pixelherodev> I'm starting to think my focus on this parser has gotten a bit... out of hand :P
<pixelherodev> This week alone, I plan on: implementing strings, implementing undefined values (though they already work for pointers), using a proper stream for output instead of stderr, removing the register allocator and allocating all variables to the stack and then accessing them from there (and then relying on optimizations to put them back into registers and increase performance), and beginning work on modularizing the parser so that it can actually be used as a
<pixelherodev> library and I can begin to add in an x86 backend
_whitelogger has joined #zig
WendigoJaeger has quit [Ping timeout: 276 seconds]
kristoff_it has joined #zig
vexu has quit [Ping timeout: 268 seconds]
darithorn has joined #zig
vexu has joined #zig
adamkowalski has quit [Quit: Lost terminal]
vexu has quit [Ping timeout: 265 seconds]
Akuli has joined #zig
<andrewrk> pixelherodev, wow this is really cool!
<andrewrk> love seeing these screenshots
rjtobin has joined #zig
<pixelherodev> andrewrk, thanks!
<pixelherodev> `I actually cleaned it up so that the manual usage of the DragonFruit stack isn't necessary
<pixelherodev> A simple `a3x.Puts("str");` call works now :)
<pixelherodev> (a3x = the firmware)
<pixelherodev> The pointers and stuff are tracked by the a3x structure instead of being passed to main, making its usage a lot more convenient
traviss has joined #zig
WendigoJaeger has joined #zig
WendigoJaeger has quit [Ping timeout: 265 seconds]
vexu has joined #zig
darithorn has quit [Quit: Leaving]
Akuli has quit [Quit: Leaving]
<fengb> andrewrk: I started experimenting with generators again https://github.com/fengb/zig-tmpl
<fengb> I know you don’t like abusing async like this but it really simplifies callbacks / iterators
<fengb> (I’m also probably putting this on hold since a real templating engine requires an AST and comptime allocators...)
jokoon has quit [Quit: jokoon]
<pixelherodev> You could write a comptime allocator.
<pixelherodev> fengb, just decide on its size at comptime
<pixelherodev> And make a comptime array
<fengb> There’s an outstanding issue: https://github.com/ziglang/zig/issues/1291
<pixelherodev> Ah
<fengb> I guess I could slap together a node object pool for now. That wouldn’t be too bad
<pixelherodev> "One does not simply call a function pointer." ... Boromir, why?!
WendigoJaeger has joined #zig
_Vi has joined #zig
frmdstryr has quit [Ping timeout: 252 seconds]
<Snektron> fengb, interestingly i also had a similar idea
<Snektron> I dont think you need either for comptime parser generator
<Snektron> My idea was to bind parsed structure to a struct somehow
<Snektron> For example struct { a: i32, b: i32 } could be parsed with "{a} {b}"
<Snektron> "10 -20" would be parsed by that
<Snektron> Was just an idea though, didnt work anything out
<fengb> I need arbitrary depth to handle for / if instructions
<Snektron> Yeah i was still thinking about how to handle nested structs
<Snektron> And arrays
<Snektron> You could also do a full on parser generator
<Snektron> You dont need recursion for those too i think
<Snektron> Though i forgot how LR(1) parsing worked, but thats probably what you'd want to implement
<fengb> I don’t see how it can be not recursive if I can have infinite embedded for loops
<Snektron> An LR(1) parser is just a kind statemachine i think
<Snektron> Maybe it needs a stack though
<Snektron> LR(1) parser generators are a lot of work though, i didnt even manage to complete my LR(0) one
<fengb> Oh the parser isn’t my concern. Running the formatter needs arbitrary nodes, which requires some form of allocation
<fengb> But I can possibly get by with a fixed object pool
<Snektron> Do you need allocation for formatting though?
<fengb> Nope, it’s generator based
<fengb> I think it’s a more scalable approach than the current formatter
<fengb> But andrewrk has mentioned he doesn’t like abusing async functions for generators
vexu has quit [Quit: WeeChat 2.6]
<bgiannan> is it possible to cast a []const u8 to a []u8 ?
<fengb> Something like `@intToPtr([*]u8, @ptrToInt(c.ptr))[0..c.len]`
darithorn has joined #zig
<Snektron> Now thats what i call undefined behavior 2
<mq32> bgiannan: doing that sounds a lot like "bad design" and is probably undefined behaviour
<fengb> Yes but a lot of old C APIs are poorly typed
iocat has joined #zig