ChanServ changed the topic of #zig to: zig programming language | | be excellent to each other | channel logs:
donniewest has quit [Quit: WeeChat 3.0]
riba has quit [Ping timeout: 240 seconds]
tracernz has quit [Ping timeout: 272 seconds]
kwilczynski has quit [Ping timeout: 260 seconds]
kushalp has quit [Ping timeout: 272 seconds]
tracernz has joined #zig
r0bby has quit [Ping timeout: 260 seconds]
kwilczynski has joined #zig
r0bby has joined #zig
kushalp has joined #zig
a92 has joined #zig
mikdusan has quit [Quit: WeeChat 2.5]
<pixelherodev> Okay, CBE patches incoming soonish :)
FireFox317 has quit [Ping timeout: 240 seconds]
jjido has quit [Quit: Connection closed for inactivity]
<ifreund> The CBE seems fun to work on, I enjoyed that stream
<ifreund> probably cause I know C way better than I know any of the other output formats :D
<g-w1> -Dskip-non-native saves about 8s, pretty nice
alexpana has quit [Quit: WeeChat 1.9.1]
<andrewrk> I think I have an actually good idea to solve alloc_inferred
a92 has quit [Quit: My presence will now cease]
leon-p has quit [Remote host closed the connection]
Exonorid has joined #zig
<g-w1> andrewrk: here is a solidification of the inferred error set "superposition" that gets resolved after all functions are resolved: what do you think about the idea of having callbacks?
<g-w1> it seems that async programming would suit this well: if you encounter an error set that is not resolved, just suspend, when it gets resolved resume. the only exception would be special stuff having to do with recursive error sets. I wonder if there is a way to incorporate this even if the compiler is sync?
<andrewrk> g-w1, re: async programming: I was thinking along similar lines. unfortunately I don't think there is a good answer to that question
<andrewrk> reading the paste
<andrewrk> one observation is that you are essentially constructing a Function Call Graph which is useful for many other things
<andrewrk> we have something similar already for detecting when we need to recompile
<andrewrk> plus we need a similar thing for detecting whether functions need to be generated async
<andrewrk> I wonder if it's all the same problem...
<andrewrk> another observation is that there are other points that also trigger error set resolution. for example if you do @typeInfo on an error set and then iterate over the fields
<andrewrk> I wonder how far you could get with a new Type tag for error sets that has a Decl as a payload value, and it simply means the inferred error set of that function? wait, is that perhaps what we already have?
ehaas has quit [Ping timeout: 268 seconds]
ur5us has joined #zig
<g-w1> oh you are right, a Type.Payload.ErrorSet is just a *Decl! vexu can see the future. This seems perfect because the Decl.typed_value *is* the type and if it is never_succeeded, it means that the errorset is not analyzed! after I get #7092 merged, which this almost certainly depends on, I will play around with this using actual code and see how far I can get. do you happen to know where in stage1 the
<g-w1> logic is for seeing if it is returning an error, and adding it to the inferred error set? I think I could just put that in analyzeInstRet. im pretty sure we still need the Module lazy resolution solution, but this definently reduces some of the boilerplate. thanks!
ehaas has joined #zig
<andrewrk> hmm no I don't yet -I haven't closely inspected the error set stuff in stage2 yet
<andrewrk> I do think there will be some more work to do this "superposition" thing once we start really getting into it, but I think the Decl thing is a good start
<andrewrk> now might be a good time to add some doc comments to that Payload in Type that would have been useful for your past self when you saw it the first time :D
a_chou has joined #zig
a_chou has quit [Remote host closed the connection]
nycex has quit [Ping timeout: 240 seconds]
nycex has joined #zig
koakuma has joined #zig
ur5us has quit [Ping timeout: 264 seconds]
fraktor has joined #zig
rowbee has quit [Quit: ZNC -]
rowbee has joined #zig
rowbee has quit [Quit: ZNC -]
rowbee has joined #zig
ehaas has quit [Ping timeout: 260 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
<fraktor> Out of curiosity, does anyone know of Zig projects with GUIs?
decentpenguin has quit [Read error: Connection reset by peer]
wallygivesthed has joined #zig
decentpenguin has joined #zig
<viashimo> fraktor there's at least some example games that I've seen. I've been using zig w/ glfw and vulkan
<fraktor> Do you know if those can be statically linked? I'm looking at Zig for possibly developing LV2 plugins.
<pixelherodev> I have a GUI library in C that I use almost exclusively with Zig lol
<fraktor> pixelherodev: What is it?
knebulae has quit [Ping timeout: 260 seconds]
<pixelherodev> fraktor: I mean I wrote one :P
<pixelherodev> Not worth using, I threwa lot of it out and have no intention of revisiting it in the future
<daurnimator> fraktor: o.o LV2 is a public C++ abi? sounds dreadful :/
<pixelherodev> I looked it up, thought it said C?
<pixelherodev> WP says "written in C and turtle" ?
<daurnimator> looking at I see classes?
<pixelherodev> daurnimator: that looks like it's just a really poorly chosen syntax
<daurnimator> hmmm, maybe
techtirade has quit [Quit: ZNC 1.8.2 -]
techtirade has joined #zig
ur5us has joined #zig
FireFox317 has joined #zig
nyaa85 has joined #zig
nyaa85 is now known as nyaa8
nyaa8 has quit [Read error: Connection reset by peer]
dumenci has joined #zig
<pixelherodev> Gah, now I'm back to obsessing over c3z design (c3 == tricarbon == my compiler project, c3z == a way of referring to zyg that I can say out loud without confusing myself XD)
<pixelherodev> ... if anyone has a zig update script, I'd appreciate it if you could link me a copy :P Currently I just do `curl | tar xf && cd zig-lin* && cp zig /usr/local/bin && rsync lib/ /usr/local/lib/zig/ -av --delete && cd .. && rm -rf zig-lin*` which is a bit of a nuisance, and this is just easy enough that I don't feel like writing one
<pixelherodev> myself lol
<pixelherodev> s/xf/xJ
<pixelherodev> uhhh how much memory does test-stage2 use? I'm getting an OOM in the GPA with over 7GiB free
<pixelherodev> Sorry, *10* GiB free :P
<pixelherodev> ... oh wait, that's just the uncleared error trace :P
<pixelherodev> Real issue is with `zig run` subprocess > error: unable to find zig installation directory: FileNotFound
<pixelherodev> Oh lol oops
<pixelherodev> I accidentallied my zig lib dir :P
<pixelherodev> that rsync lib should've been lib/zig :Pp
frett27_ has joined #zig
<pixelherodev> Yay, now everything is good :D
frett27 has quit [Ping timeout: 272 seconds]
<pixelherodev> Anyone interested in a CBE stream? Considering doing one in tennish minutes
ur5us has quit [Ping timeout: 260 seconds]
<pixelherodev> eh, nah
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
leon-p has joined #zig
<pixelherodev> andrewrk: got CBE working with updates!
<pixelherodev> PR incoming shortly ;)
<koakuma> CBE?
<pixelherodev> C backend
<pixelherodev> ... with the minor nit that the order of decls has changed since we're using the decl_table instead of the work queue. So, uh, that's not a deliberate thing :P
<pixelherodev> (e.g. main is before start in the output for the simple start+main test now)
cole-h has quit [Ping timeout: 265 seconds]
<pixelherodev> Had to change two of the tests to account for that, but yeah
<pixelherodev> That's one item off the list; I'll remove the panics and fix the error handling tomorrow, convert the compareoutput tests to execution the day after, and possibly improve variable tracking (add MCValue for alloc,raw,literal,etc) the day after that
FireFox317 has quit [Ping timeout: 256 seconds]
knebulae has joined #zig
notzmv has quit [Remote host closed the connection]
koakuma has quit [Quit: Leaving.]
lucus16 has quit [Remote host closed the connection]
lucus16 has joined #zig
mokafolio has quit [Quit: Bye Bye!]
mokafolio has joined #zig
dumenci has quit [Ping timeout: 256 seconds]
lucid_0x80 has joined #zig
frett27_ has quit [Read error: Connection reset by peer]
frett27_ has joined #zig
<g-w1> pixelherodev, consider using zigup, it just works and has support for multiple zig versions at the same time installed with a zigup master or zigup 0.7.1 to switch
donniewest has joined #zig
notzmv has joined #zig
spiderstew_ has quit [Ping timeout: 246 seconds]
waleee-cl has joined #zig
SimonNa has quit [Remote host closed the connection]
alexpana has joined #zig
frett27_ has quit [Ping timeout: 272 seconds]
remby has joined #zig
nycex has quit [Quit: Quit]
nycex has joined #zig
lucid_0x80 has quit [Ping timeout: 240 seconds]
frett27_ has joined #zig
<ifreund> ugh, the ZBS does not make it easy to install stuff to /etc
<ifreund> altertively: ugh, why isn't /etc a symlink for /usr/etc by default
<ifreund> we should probably just copy meson's logic regarding this stuff eventually
<ifreund> it's quite sane
save-lisp-or-die has left #zig ["The Lounge -"]
a_chou has joined #zig
a_chou has quit [Client Quit]
nvmd has quit [Quit: Later nerds.]
bitmapper has quit [Quit: Connection closed for inactivity]
ehaas has joined #zig
remby has quit [Quit: remby]
<andrewrk> ifreund, this is the first I've heard of installing stuff to /etc
<andrewrk> what kind of stuff goes there?
<ifreund> default config files
<andrewrk> oh right conf files
<ifreund> the logic I've stolen from meson is to check if --prefix is "/usr" and if it is install my file to "../etc/river/init". Otherwise use "etc/river/init"
cole-h has joined #zig
nvmd has joined #zig
<ifreund> oh nice, LemonBoy's PR got merged
<ifreund> I wonder if river builds on FreeBSD now
<g-w1> is there a way to view zir before it has been analyzed? I am trying to do astgen for `try` but cant check if it works because `.iserr` is not implimented, so the rendering code just gives a compileerror. How did you test astgen for orelse and catch?
<andrewrk> g-w1, --verbose-ir
<g-w1> ok thx. I am confsed? is zir typed when you do -femit-zir? why does --verbose-ir have a different format than zir?
remby has joined #zig
<g-w1> hmm, it seems --verbose-ir renders the ir as a tree after it comes out of astgen
Joey152 has joined #zig
Joey152 has quit [Remote host closed the connection]
nvmd has quit [Quit: Later nerds.]
nvmd has joined #zig
remby has left #zig ["Good Bye"]
hnOsmium0001 has joined #zig
<andrewrk> let's come up with a name for the 2 different IRs we have, because currently we say "ZIR" for both and it is confusing
<companion_cube> ZIR and ZMADAM
nvmd has quit [Quit: Later nerds.]
<andrewrk> when you do -femit-zir, here is what happens: source -> tokenize -> AST -> untyped ir -> typed ir -> text representation as untyped ir
<andrewrk> I think ZIR should be the untyped one
nvmd has joined #zig
<ifreund> TZIR for the typed one?
<ikskuh> <companion_cube> ZIR and ZMADAM <= this please :D
<g-w1> ok, in my head i have `zir` for what comees out of `astgen.zig` and `ir` for what comes out of `zir_sema.zig`. because ir.zig represents typed ir and zir.zig represents untyped ir. now I get it thx
<ifreund> ZTIR is nicer to pronounce actually
<ifreund> zeeer and zee-ter
ur5us has joined #zig
jokoon has joined #zig
remby has joined #zig
wallygivesthed has quit [Remote host closed the connection]
jjido has joined #zig
<andrewrk> maybe both ZIR and TZIR should have text representations
* companion_cube whispers "S-expressions" at andrewrk's ear
* ikskuh screams at companion_cube
<andrewrk> did you just sext me?
<companion_cube> I sexprt you
<companion_cube> (🍆((🍑)))
<ikskuh> lol
<companion_cube> more seriously, it's quite readable (if well indented) and super super easy to print and parse.
<remby> is ZIR zig immediate representation?
<ifreund> yes
<ifreund> well s/immediate/intermediate/ but I think that's what you meant :P
<remby> yeah, woops
<remby> could do something like nock
<ifreund> nock?
<companion_cube> oh no, not urbit :(
<remby> just an alternative suggestion :P
<ifreund> s-experssions are more readable than that IMO
<remby> s-expressions have a lot of upside, but sometimes devs are afraid of parenthesis
<companion_cube> who'd be afraid of parenthesis but not of a cryptic esolang like nock?
<remby> touche
nvmd has quit [Quit: Later nerds.]
<andrewrk> I think our existing syntax is pretty nice
<andrewrk> not shown here: blocks
<remby> that's just the ir? or can it be used inline somehow ?
<remby> i'm ok with thise syntax
<ifreund> that's a text reprensentation of the ir only used for debugging
<justin_smith> another vote for sexp, there's a lot of editor support, pretty printers, etc.
<justin_smith> also it's a great format for doing automated transforms on (that can be useful even if it's just for debugging)
wootehfoot has joined #zig
jokoon has quit [Quit: Leaving]
ur5us_ has joined #zig
ur5us has quit [Ping timeout: 268 seconds]
<ugla> `error: container 'std.crypto' has no member called 'randomBytes'`; is there a replacement for that one?
<andrewrk> ugla, std.crypto.random.bytes
<ifreund> std.crypto.random.bytes according to the git log
<andrewrk> now it supports the full Random interface, and it uses a thread local CSPRNG, OS-seeded, fork-safe
<andrewrk> in summary: better API; fewer syscalls