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/
msingle has joined #zig
xackus has quit [Ping timeout: 260 seconds]
radgeRayden has quit [Remote host closed the connection]
ur5us has joined #zig
squeek502 has joined #zig
masoudd has quit [Read error: Connection reset by peer]
squeek502 has quit [Remote host closed the connection]
llimllib has joined #zig
xd1le has joined #zig
tundrax has joined #zig
a_chou has joined #zig
<tundrax> Looks zig was added to TIOBE index as of Oct 2020, https://www.tiobe.com/tiobe-index/
a_chou has quit [Ping timeout: 260 seconds]
tundrax has quit [Ping timeout: 245 seconds]
_whitelogger has joined #zig
<pixelherodev> TIOBE?
<pixelherodev> never mind, found it
<pixelherodev> A generic "programming language rankings" tracker. So impressive.
<waleee-cl> more impressive to never have heard of/seen it actually
earnestly has quit [Ping timeout: 256 seconds]
a_chou has joined #zig
a_chou has quit [Remote host closed the connection]
g-w1 has quit [Ping timeout: 260 seconds]
msingle has quit [Ping timeout: 272 seconds]
msingle has joined #zig
radgeRayden has joined #zig
jjsullivan1 has joined #zig
pingiun has joined #zig
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
ur5us has quit [Ping timeout: 258 seconds]
xd1le has quit [Remote host closed the connection]
ky0ko has quit [Read error: Connection reset by peer]
frett27 has joined #zig
frett27 has quit [Ping timeout: 264 seconds]
CodeSpelunker has quit [Remote host closed the connection]
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
GrooveStomp has quit [Ping timeout: 260 seconds]
llimllib has quit [Quit: Connection closed for inactivity]
ky0ko has joined #zig
osa1 has joined #zig
tsujp has quit [Ping timeout: 265 seconds]
tsujp has joined #zig
radgeRayden_ has joined #zig
radgeRayden has quit [Ping timeout: 272 seconds]
kristoff_it has joined #zig
cole-h has quit [Quit: Goodbye]
cole-h has joined #zig
msingle has quit [Ping timeout: 256 seconds]
cole-h has quit [Ping timeout: 256 seconds]
gazler__ is now known as gazler
ur5us has joined #zig
jjsullivan1 has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 260 seconds]
ur5us has joined #zig
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
marnix has quit [Ping timeout: 256 seconds]
marnix has joined #zig
supercoven has joined #zig
guiraldelli[m] has joined #zig
earnestly has joined #zig
marnix has quit [Ping timeout: 256 seconds]
marnix has joined #zig
supercoven has quit [Ping timeout: 272 seconds]
supercoven has joined #zig
guiraldelli[m] has left #zig ["User left"]
ur5us has quit [Ping timeout: 244 seconds]
Kingsquee has quit []
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
supercoven has quit [Read error: Connection reset by peer]
supercoven has joined #zig
supercoven has quit [Max SendQ exceeded]
supercoven has joined #zig
msingle has joined #zig
omglasers2 has joined #zig
marnix has quit [Ping timeout: 264 seconds]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
Xavi92 has joined #zig
msingle has quit [Ping timeout: 240 seconds]
<Xavi92> Hi, I am experimenting with Zig on the PlayStation 1 (MIPS I is unofficially supported thanks to a patch), but zig complains about mixed ABIs. I have tried different abi values for mips-freestanding- with no success. Any pointers? https://bpa.st/raw/N4YA
<ifreund> it looks like the issue is caused by something you are linking with
<Xavi92> ifreund: I have a C library with some assembly files, and whereas I could insert the C source files into the `zig build-exe` command, I did not find a better way to insert the assembled assembly files rather than archiving them
<daurnimator> Xavi92: are you trying to use o32 or n64?
<daurnimator> whichever it is you want; you're using both and need to fix things to just use the one you want
<Xavi92> daurnimator: https://bpa.st/raw/4GQA obj/exc1.o
<Xavi92> Now I do see some differences there
<Xavi92> Adding -mabi=32 to the assembler flags did it. Thanks!
<ifreund> does usize have the same ABI as *c_void?
<ifreund> is there a good resource to read about the C ABI for various targets?
masoudd has joined #zig
msingle has joined #zig
marnix has quit [Remote host closed the connection]
marnix has joined #zig
dutchie has joined #zig
Xavi92 has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
waleee-cl has joined #zig
g-w1 has joined #zig
pingiun has quit [Quit: Textual IRC Client: www.textualapp.com]
tundrax has joined #zig
tundrax has quit [Remote host closed the connection]
masoudd has quit [Read error: Connection reset by peer]
xackus has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
waleee-cl has quit [Quit: Connection closed for inactivity]
marnix has joined #zig
cole-h has joined #zig
factormystic has quit [Quit: The Lounge - https://thelounge.chat]
cole-h has quit [Quit: Goodbye]
cole-h has joined #zig
xackus has quit [Ping timeout: 272 seconds]
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
factormystic has joined #zig
<ifreund> llvm11 is out
waleee-cl has joined #zig
layneson has joined #zig
<bfredl> yay
<bfredl> not in arch yet smh
<ifreund> slackers
<ifreund> it's been out for a whole 8 hours
<bfredl> they should have prepared from the RC's
<bfredl> so just a single rebuild and CI test and then shipit
<bfredl> i would into arch-testing if i was not in a zoom meeting r n :P
<earnestly> 11 is in staging
<bfredl> how much other stuff is there?
<bfredl> in staging i mean
<bfredl> "Warning: Do not enable the staging repositories for any reason. Your system will unquestionably break after performing an update. This repository is only meant for backend developer use."
<bfredl> sounds like a challenge
<earnestly> It's basically a place for rebuilds to take place
<earnestly> Typically relinking anything that needs it, in some specific order
<bfredl> sounds fun
Akuli has joined #zig
<bfredl> `compiler_rt.so.51.66.656 not found
<bfredl> "bash": failed to load binary
<ikskuh> <bfredl> so just a single rebuild and CI test and then shipit
<ikskuh> 8 hours sounds like a good time for clang to build and pass CI :D
<bfredl> ok. so in the break of the ai safety meeting :P
<ifreund> earnestly: to be clear I was joking about the slacking, it'll probably be a week or two till we get a void package
<bfredl> lolol worst case i delete some warez from my nvme to make space, and build it myself tomorrow.
<fengb> Why wasn’t it available yesterday??
<bfredl> or two yesterdays ago
<bfredl> or three
<bfredl> (and inductively)
<earnestly> ifreund: Oh don't worry about me, you can joke about anything and I'd understand :p
<g-w1> I am on arch. If I upgrade my packages and llvm upgrades to 11, then will zig building break?
<bfredl> i am gonna fix all ASAN/UBSAN and clang-static in neovim b4 anyone notice them existing :]
<earnestly> g-w1: Hopefully the packagers are aware enough to distribute the new llvm with new relinked packages that depend on it
<g-w1> Doesn't zig use llvm 10 though? Will I have to have 2 versions of llvm?
<bfredl> hmm zig is already prepared for llvm 11 right? using comptime/c++ macros.
<ifreund> g-w1: there's already an llvm11 branch on the zig repo
<ifreund> I assume it will be merged shortly
<g-w1> ahh. That makes sense.
<fengb> There’s a separate branch yeah. Master will stop working until Zig merges/releases in a couple weeks
<bfredl> zig 0.7 in a couple of weeks?
<bfredl> yay
<g-w1> I guess this would be a good time to be using nixos to manage all the dependency hell :P
<fengb> I think the target is always 2 weeks after LLVM
<bfredl> hahaha i had to install nixos, just to build/use raptorjit
<fengb> This cycle Zig had to delay because LLVM got pushed multiple times
<bfredl> a luajit fork with some tracess inspection
<ifreund> 26.10.2020 is the current target for 0.7.0
<earnestly> nixos doesn't manage dependencies, that's the point
<bfredl> nixos just does nixos
<bfredl> like. gentoo is not a distro. it is just a collection of handy LFS build scripts :D
mokafolio has quit [Quit: Bye Bye!]
<earnestly> I mean, nixos keeps things isolated in such a way so that it doesn't have to deal with these problems
<earnestly> It's the throwing-your-hands-up approach to solving the problem of distributed package management
<g-w1> I have a laptop with gentoo on it and its just soo high maitnence.
mokafolio has joined #zig
FireFox317 has joined #zig
<FireFox317> andrewrk, llvm 11 finally released :party:
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
<pixelherodev> I'll try to get get LLVM 11 + Zig in my gentoo overlay today
<bfredl> i just gave up on python in that case. and made a separate pipenv for each of my madnessess
<bfredl> before, i could use one tensorflow version for everything. sounds crazy now right
mokafolio has quit [Quit: Bye Bye!]
mokafolio has joined #zig
hnOsmium0001 has joined #zig
layneson has quit [Ping timeout: 258 seconds]
wootehfoot has joined #zig
osa1 has quit [Ping timeout: 240 seconds]
skuzzymiglet has joined #zig
<skuzzymiglet> hello
<skuzzymiglet> i'm trying the example from https://ziglang.org/documentation/master/
<skuzzymiglet> and it says std.debug doesn't have the member print
<skuzzymiglet> ./main.zig:1:35: error: container 'std.debug' has no member called 'print'
<ifreund> skuzzymiglet: Hi, that's likely because you're using zig 0.6.0 but reading the docs for master
<ifreund> on 0.6.0 you should use std.debug.warn
<skuzzymiglet> thanks a million
<skuzzymiglet> zig looks cool
<skuzzymiglet> i'm a Go guy
<ifreund> no problem! zig and go have a common goal of simplicity for sure
<skuzzymiglet> i do like the strictness with errors
<ifreund> I really love how zig does errors, it's strict without being painful
<skuzzymiglet> async looks hard tbh
<ifreund> async takes a little getting used to since its much less abstracted that it is in most other languages
<ifreund> it allows you to implement something equivalent to Go's coroutines in userland though
supercoven has quit [Ping timeout: 272 seconds]
<skuzzymiglet> can zig run the current directory like go does
bfredl has quit [Quit: killed]
juanfra__ has quit [Quit: killed]
alexnask[m] has quit [Quit: killed]
fengb has quit [Quit: killed]
Bastian[m] has quit [Quit: killed]
return0e[m] has quit [Quit: killed]
Snektron has quit [Quit: killed]
deltamaniac[m] has quit [Quit: killed]
Nypsie[m] has quit [Quit: killed]
ifreund_ has quit [Quit: killed]
BaroqueLarouche has quit [Quit: killed]
fabio[m] has quit [Quit: killed]
alva has quit [Quit: killed]
aterius has quit [Quit: killed]
<skuzzymiglet> what's happening
<ifreund> not familiar with go, what do you mean?
<skuzzymiglet> you can `go run .`
<ifreund> and what does that do? find a main function and run it?
<skuzzymiglet> compile the package i think
<ifreund> you can `zig run main.zig`
<skuzzymiglet> will that hook in other files though?
xackus has joined #zig
<ifreund> yes, you only ever need to give zig the root source file
<skuzzymiglet> i see you made an wm in zig
<ifreund> (as for why all those people disconnected, don't mind that it's just the matrix bridge being crappy)
<ifreund> yes I wrote a wayland compositor
a_chou has joined #zig
aterius has joined #zig
<skuzzymiglet> what's the function naming convention in zig? foo_bar or fooBar?
<nikki93> fooBar
frett27 has joined #zig
a_chou has quit [Remote host closed the connection]
alexnask[m] has joined #zig
bfredl has joined #zig
return0e[m] has joined #zig
juanfra__ has joined #zig
ifreund_ has joined #zig
alva has joined #zig
fabio[m] has joined #zig
BaroqueLarouche has joined #zig
fengb has joined #zig
Bastian[m] has joined #zig
Snektron has joined #zig
Nypsie[m] has joined #zig
deltamaniac[m] has joined #zig
<skuzzymiglet> is there a source formatter for zig
<skuzzymiglet> like gofmt
<ifreund> zig fmt
<skuzzymiglet> cool
Piraty has quit [Quit: ---]
<ifreund> note that it doesn't care about line lenght at all, you can tell it to break by adding trailing commas to e.g. function calls
<skuzzymiglet> need to find whether it works with ALE
<skuzzymiglet> in vim
<ifreund> you may want the --stdin flag depending on what ALE expects
Piraty has joined #zig
<skuzzymiglet> i think it's just zls
<skuzzymiglet> with ale
<ifreund> ah yes, zls can run zig fmt for you
<skuzzymiglet> can't get it on void linux
<ifreund> you'll need to build zls from source
<ifreund> it requires zig master
<skuzzymiglet> and can't build from source, because i'm on 0.6.0
<ifreund> you can download a static tarball from ziglang.org
<skuzzymiglet> where do i put the files
<waleee-cl> somewhere on your $PATH
<waleee-cl> (or somewhere which you add to PATH)
<skuzzymiglet> where the `lib` though?
<nikki93> I do it by keeping all releases as separate directories under a 'zig-releases' directory in some nice place
<nikki93> then i just `ln` the `zig` executable into my `~/bin` which is in $PATH
<nikki93> it'll find 'lib/' automatically
<skuzzymiglet> how does it find lib
<skuzzymiglet> it seems like its spending ages just searching for it
<waleee-cl> ... have you moved it from the extracted map?
<skuzzymiglet> yes
<skuzzymiglet> to `~/.local/lib/zig`
<waleee-cl> just add a symlink to the zig binary in ~/.local/bin
<waleee-cl> (ie do not move around the directories in fhe extracted map)
<skuzzymiglet> i just copied it to `/bin`
<skuzzymiglet> i think it's just the libraries
ur5us has joined #zig
<ifreund> zig looks relative to the path of its binary for its libraries
<ifreund> as long as you install them to the same prefix it should have no problem
<nikki93> yeah as i described above -- i symlink it from some nice place where it's exactly as extracted -- and that works
<nikki93> the symlink thing lets you switch versions by just changing a symlink
<nikki93> while keeping multiple versions around
FireFox317 has quit [Ping timeout: 260 seconds]
marnix has quit [Ping timeout: 246 seconds]
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
layneson has joined #zig
wootehfoot has quit [Read error: Connection reset by peer]
Akuli has quit [Quit: Leaving]
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
sawzall has quit [Read error: Connection reset by peer]
sawzall has joined #zig
omglasers2 has quit [Read error: Connection reset by peer]
layneson has quit [Ping timeout: 240 seconds]
skuzzymiglet has quit [Quit: WeeChat 2.9]
SFINAE has joined #zig
SFINAE has quit [Remote host closed the connection]
swills has quit [Quit: swills]
ryuukk_ has joined #zig
<ryuukk_> hi, https://ziglang.org/documentation/master/#toc-Build-Mode shows the build.zig project, but shows this command to build: $ zig build-exe example.zig
<ryuukk_> how to i run the project based on the build.zig?
<ryuukk_> i'm confused
<ifreund> `zig build` will run the build.zig
swills has joined #zig
<andrewrk> hello friends
<andrewrk> oh snap is it llvm release day?
<waleee-cl> you were on 3rd place on the "thanks for contributions list"
<ryuukk_> is there a way to "zig run" on a project? ifreund
* andrewrk starts compiling llvm on 7 different machines
kristoff_it has quit [Ping timeout: 264 seconds]
<ifreund> ryuukk_: you can add a RunStep to your build.zig and use `zig build run`
<ifreund> the template generated by zig init-exe does this
<ryuukk_> ifreund: thanks
<ifreund> no problem!
<pixelherodev> andrewrk: only seven? ;)
<pixelherodev> waleee-cl: what list?
<waleee-cl> https://lists.llvm.org/pipermail/llvm-announce/2020-October/000089.html , "Special thanks to release testers and packagers"-listing is perhaps more appropriate
<ryuukk_> there is no string type in zig?
<andrewrk> ryuukk_, what are you trying to do?
ave_8 has joined #zig
<ryuukk_> i try to port my game engine in D, storing some configuration to then open a window with GLFW, looking to store window title
<ryuukk_> well not D, but from C++ > D > zig, i'm trying out languages
ave_ has quit [Ping timeout: 264 seconds]
ave_8 is now known as ave_
xackus has quit [Ping timeout: 260 seconds]
<earnestly> (I wish I could find an old article which argued for the destruction of the "string type" (instead, arrays) but I can never google hard enough to get at it)
<ryuukk_> https://hastebin.com/yegawobuzi.zig here if someone could give me a hand
<ryuukk_> string / function pointer
<ryuukk_> earnestly: having string type makes it easier to manage
<g-w1> you can just declare functions directly in the structs
<ryuukk_> how?
<g-w1> const StructName = struct {x: i32, fn whatever(self: StructName) {
<g-w1> you can call it with dot notation
<ryuukk_> hmm i'm not sure i understand
<ryuukk_> i want user defined function pointer
<g-w1> ill find an example
<g-w1> ohh. like a closure?
<ryuukk_> in c++ i do like this: ``void(*on_update)(float) = nullptr;``
<ryuukk_> ``app.on_update = &on_update;``
<earnestly> ryuukk_: Yes, they cover such objections
<ryuukk_> how i would go about this? i tried to search about close but couldn't find anything
<ryuukk_> about closure*
<pixelherodev> That's not what you want
<pixelherodev> Function pointers aren't methods
<g-w1> yeah. I misunderstood them
<pixelherodev> `const a = struct { fn b() void {} }` is valid, but not what you want
<pixelherodev> YOu want `const a = struct { b: fn ()void }`
<pixelherodev> Then you could do e.g. `const c = a{}; a.b = some_function;`
<pixelherodev> waleee-cl: 3rd place in alphabetical order lol
<ryuukk_> pixelherodev: it works, thanks
layneson has joined #zig
<pixelherodev> No problem :)
<andrewrk> ryuukk_, not sure why you need to decode for your window title. just keep it as utf8 encoded bytes, never decode
<andrewrk> decoding the window title would drag in a ton of unicode dependencies
<waleee-cl> pixelherodev: oops, didn't notice that
<pixelherodev> :P
g-w1 has quit [Ping timeout: 246 seconds]
g-w1 has joined #zig
<ryuukk_> ``fn run(self: Engine) void`` how to i make self not const? i tried var self: Engine, but it doesn't work
<ryuukk_> .\src\main.zig:83:21: error: cannot assign to constant
<ryuukk_> self.quit = true;
<g-w1> self: *Engine I think you want to pass by reference.
<g-w1> do you?
<ryuukk_> i tried that before, but it wouldn't compile: error: expected type '*Engine', found '*const Engine'
<g-w1> that is because you are declaring your instance as const instead of var
<g-w1> const e = Engine {}; e.run() // will not work because e is const
<ryuukk_> oh it works, thanks g-w1
<ryuukk_> switching from const to var
<ryuukk_> i forgot
<ryuukk_> ok managed to sketch quickly the application, now i'm gonna see how far i can go trying to add glfw as dependency :p