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/
isolier has quit [Quit: isolier]
v0idify has quit [Remote host closed the connection]
isolier has joined #zig
v0idify has joined #zig
rom1504 has quit [Ping timeout: 272 seconds]
rom1504 has joined #zig
powerofzero has joined #zig
<qbit> does anyone have an example of a build.zig that does native and cross compile ?
<qbit> oh.. -Dtarget :D
<g-w1> you can also set the target if you want it to be different in build.zig
<qbit> sweet
<qbit> my grand plan won't work anyway.. seems macos' SDL stuff is too different to openbsd
<qbit> trying to compile zig-gorillas on openbsd so i can plan it on my m1 (in rosetta)
isolier has quit [Quit: isolier]
isolier has joined #zig
notzmv has joined #zig
brzg has joined #zig
craigo has joined #zig
decentpenguin has quit [Ping timeout: 245 seconds]
decentpenguin has joined #zig
Techcable has quit [Quit: ZNC - https://znc.in]
ur5us_ has joined #zig
brzg has quit [Quit: leaving]
powerofzero has quit [Ping timeout: 265 seconds]
powerofzero has joined #zig
ur5us_ has quit [Ping timeout: 264 seconds]
bitmapper has joined #zig
<daurnimator> g-w1: I wrote a terminfo parser
<g-w1> in zig? I saw the lua one :)
<daurnimator> g-w1: yes
<daurnimator> infact its a port of my lua one ;)
purpleLizard has joined #zig
<g-w1> can you link :O ?
<daurnimator> I did a little more work on it but didn't push it up
<g-w1> nice :)
powerofzero has quit [Ping timeout: 246 seconds]
squeek502 has quit [Remote host closed the connection]
gazler has joined #zig
gazler_ has quit [Ping timeout: 265 seconds]
xackus has joined #zig
xackus__ has quit [Ping timeout: 265 seconds]
cbix is now known as fh
fh is now known as cbix
cbix is now known as fh
fh is now known as cbix
cbix is now known as fh
fh is now known as cbix
cbix is now known as fh
Techcable has joined #zig
fh is now known as cbix
Techcable has quit [Quit: Techcable - The Lounge]
Techcable has joined #zig
_whitelogger has joined #zig
earnestly has quit [Ping timeout: 256 seconds]
purpleLizard has left #zig ["Konversation terminated!"]
cole-h has quit [Ping timeout: 276 seconds]
decentpenguin has quit [Quit: ZNC crashed or something]
decentpenguin has joined #zig
xackus has quit [Ping timeout: 256 seconds]
bitmapper has quit [Quit: Connection closed for inactivity]
waleee-cl has quit [Quit: Connection closed for inactivity]
<mikdusan> andrewrk: "simplest" option to start publishing zig-macos-aarch64 tarballs is to:
<mikdusan> - add another azure job on x86_64 macos-10.15 vm
<mikdusan> - use xcode-12.4 or higher (it's available) to produce arm64 target
<mikdusan> - built against a llvm+clang+lld that I can spin pretty quickly with arm64 arch target
<mikdusan> negatives:
<mikdusan> - no zig build test ability for the ci process
dyeplexer has joined #zig
<mikdusan> - not built using a zig-boostrap process. we can't do that style (even with system-linker-hack) without changing how zig build-exe and zig cc drivers strips the command-line when it thinks we're cross-compiling
<mikdusan> also though, zig-bootstrap is, as far as I can tell, broken for x86_64 macos host too. And in order to fix (continue using zig cc/c++) we only have 2 choices: wait for zld and/or improve system-linker-hack enough to get zig-bootstrap working.
<mikdusan> thoughts?
ur5us_ has joined #zig
shirty has joined #zig
sord937 has joined #zig
shirty has quit [Client Quit]
_whitelogger has joined #zig
mtiljeset[m] has quit [Quit: Idle for 30+ days]
craigo has quit [Ping timeout: 256 seconds]
craigo has joined #zig
hidayat has joined #zig
hidayat has quit [Client Quit]
ur5us_ has quit [Ping timeout: 240 seconds]
ifreund has joined #zig
zupss has joined #zig
ur5us_ has joined #zig
craigo has quit [Remote host closed the connection]
craigo has joined #zig
earnestly has joined #zig
ur5us_ has quit [Ping timeout: 240 seconds]
kbd has joined #zig
<kbd> So, one can say: `var foo = if(true) "T" else "F";`. Is it possible to use blocks in place of "T"/"F", returning a value from the blocks?
leon-p has joined #zig
<ifreund> sure
<ifreund> if (true) blk: { break :blk 5; } else 4;
<kbd> ok: var result = if (flag) b1: { break :b1 "truthy"; } else b2: { break :b2 "falsy"; }; Thanks ifreund.
tane has joined #zig
johannes_ has joined #zig
johannes_ is now known as kenran
xackus has joined #zig
ifreund1 has joined #zig
ifreund2 has joined #zig
gpanders has quit [Remote host closed the connection]
ifreund has quit [Disconnected by services]
ifreund2 is now known as ifreund
gpanders has joined #zig
ifreund1 has quit [Ping timeout: 264 seconds]
mjanssen has joined #zig
<mjanssen> I know I can make build a dynamic library from the command line with zig build-lib -dynamic. Is there any way to pass the -dynamic from build.zig ?
<ifreund> pretty sure addSharedLibrary() passes that by default
kenran has quit [Ping timeout: 256 seconds]
<mjanssen> I tried that, but that requires a version and then failes with a file not found
<mjanssen> removing zig-cache fixed that
<mjanssen> so works with addSharedLibrary, thanks
<ifreund> mjanssen: you can use .unversioned if your use-case doesn't require a version
<mjanssen> ifreund: thanks
<mjanssen> it does require a version, so that's OK. Any easy way to pass the version from build.zig to the actual zig code?
<ifreund> addBuildOption()
<ifreund> then you can @import("build_options"); in your code
<mjanssen> ah great thanks
* mjanssen working on a basic Tcl/Tk dynamic library
txdv has joined #zig
<txdv> random.init needs a seed, how do I randomly generate a seed? :D
dyeplexer has quit [Ping timeout: 276 seconds]
<daurnimator> huh... what happended to the AT_RANDOM code?
<ifreund> daurnimator: see the discussion on the PR
<daurnimator> ifreund: which bit?
<ifreund> daurnimator: starting with jediscat1's comment I guess
eax has joined #zig
<daurnimator> ifreund: mmm. I agree with andrew's initial comment
<daurnimator> I might throw up a PR bringing it back; but without the downside
<ifreund> I don't have a strong opinion one way or the other, haven't looked closely enough myself for that
<ifreund> currently fixing more things we broke in #7920 :D
<txdv> That rewrite was huge
<mjanssen> any prefered paste site?
<daurnimator> mjanssen: zig.godbolt.org
dyeplexer has joined #zig
wilsonk_ has joined #zig
wilsonk has quit [Remote host closed the connection]
<mjanssen> trying to translate a working zig build-lib to zig build. Fails with an unreachable code error: https://zig.godbolt.org/z/n6Te5h
<ifreund> I see that you're using 0.6.0, you probably want to be using 0.7.1 if not master
<mjanssen> this was with 0.7.0
<mjanssen> but I can try with master
<mjanssen> ah using 0.6.0 lib
<ifreund> you have to use the same library version as compiler version
<mjanssen> same error if I remove the system zig and it uses the lib of the compiler
<mjanssen> I can try with master
<ifreund> mjanssen: it would help to see your build.zig and the working zig build-lib command
Ashpool has quit [Remote host closed the connection]
<mjanssen> t's in the paste
<mjanssen> in the comments
<mjanssen> lib.linkSystemLibrary("tclstub8.6"); seems to be the offending line
<ifreund> I don't think you should need addLibPath there
<ifreund> you could try linkSystemLibraryName instead of linkSystemLibrary to bypass pkg-config
<mjanssen> indeed addLibPath is not needed
kbd has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<mjanssen> and changing to linkSystemLibraryName works
ubert1 has joined #zig
eax has quit [Ping timeout: 268 seconds]
johannes_ has joined #zig
eax has joined #zig
<mjanssen> thanks ifreund. Build works now
<ifreund> nice :)
bitmapper has joined #zig