ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
sagecode has quit [Ping timeout: 256 seconds]
byronh__ has joined #zig
frmdstryr has quit [Ping timeout: 264 seconds]
willllll has quit [Ping timeout: 260 seconds]
zovt has quit [Remote host closed the connection]
darithorn has joined #zig
hoppetosse has quit [Ping timeout: 268 seconds]
_whitelogger has joined #zig
clownpriest has quit [Ping timeout: 260 seconds]
<bb010g> andrewrk: I'm working on fixing up the zig-git PKGBUILD for Arch, and it's dropping off build/zig_cpp/lib{embedded_lld_{coff,elf,lib,mingw,wasm},zig_cpp}.a in weird locations. Are those required, and if they are, where should they ideally be installed?
<andrewrk> bb010g, no, they're not required. I put them as install targets because they're used by stage2
<andrewrk> but it's not recommended to ship stage 2 yet
<bb010g> Where will they need to go once stage 2 becomes a thing?
<andrewrk> "installed" to a prefix of $BUILD/stage1 in the build folder. then stage 2 uses them and "installs" to a prefix of $BUILD/stage2. then stage 3 uses stage 2 and that's the one you actually install to your system or to the package outpust
<andrewrk> the .a files will not end up in the final installation
<bb010g> Ok. So the PKGBUILD should be able to clean them up before install, then.
<andrewrk> yes
tiehuis has joined #zig
<tiehuis> I was going to add a patch to the PKGBUILD tomorrow to fix this when i was back home by the way
<tiehuis> Its a pretty straightforward cmake patch to disable the targets
tiehuis has quit [Client Quit]
<bb010g> I'm just running into this now since I'm setting up aurutils and using aur build's chroot stuff
doingthings_ has quit [Ping timeout: 260 seconds]
bheads__ has quit [Ping timeout: 260 seconds]
byronh__ has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
<bb010g> `namcap` is reporting "Dependency included and not needed ('llvm')"
<bb010g> Is that just a build dep?
<andrewrk> it's just a build dep if building statically against it
<andrewrk> if it's a .so then it's a runtime dep
<bb010g> It's the package llvm that it's talking about, which has `BugpointPasses.so`, `LLVMHello.so`, some executables, and a bunch of `.a`s and headers
<andrewrk> you can use `ldd` on the produced zig executable to find out what the runtime dependencies are
<bb010g> Yeah, doesn't look like it
<bb010g> llvm-libs is a transitive dep of clang, which covers all the .so's from there
<bb010g> Last namcap issue is license. It's fully MIT, right?
<bb010g> Oh, NVM, that's just because it's a `-git` package. I'll pastebin the fixed files:
<bb010g> leave_zig_cpp.patch: https://wank.party/ywu_.patch
<bb010g> That patch should probably be renamed to no_stage_2 or something, since it also does libembedded_*
mahmudov has quit [Ping timeout: 256 seconds]
mahmudov has joined #zig
dbandstra has joined #zig
<GitHub145> [zig] BraedonWooding closed pull request #1071: Added directory open/next for windows (master...WindowsDirOpen) https://git.io/vhEKD
<GitHub28> [zig] BraedonWooding opened pull request #1084: Dir Open, Next, Close; DeleteDir for Windows (master...DirOpenWin) https://git.io/vh2tn
JinShil has joined #zig
darithorn has quit [Quit: Leaving]
<GitHub196> [zig] andrewrk pushed 1 new commit to master: https://git.io/vh2tD
<GitHub196> zig/master 6edd811 Andrew Kelley: nullable pointers follow const-casting rules...
_whitelogger has joined #zig
very-mediocre has joined #zig
very-mediocre has quit [Ping timeout: 260 seconds]
xtreak has joined #zig
<xtreak> Hi I downloaded the linux binary distribution and unzipped it. I went to the directory where I had zig binary. I created a hello world program and tried to run it. I had `Unable to find zig lib directory. Reinstall Zig or use --zig-install-prefix.` as the error
<xtreak> Can I just use the binary or do I need to do some other step from there to run it. If it's the later it will be helpful if someone can point me there so that I can follow the installation steps.
<bb010g> What distribution are you using?
<xtreak> I am on a ubuntu machine and I downloaded binaries from https://ziglang.org/download/0.2.0/zig-linux-x86_64-0.2.0.tar.xz
davr0s has joined #zig
very-mediocre has joined #zig
adagio_ has quit [Ping timeout: 260 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<andrewrk> xtreak, I added the runtime stdlib detection after 0.2.0
<andrewrk> I suggest using the master CI build
<xtreak> andrewrk: Works now. Thanks.
jjido has joined #zig
very-mediocre_ has joined #zig
<very-mediocre_> got disconnected...
<very-mediocre_> seems my message didn't make it
<very-mediocre_> andrewrk: I encountered some weirdness with nullables again. If you recall the gist I sent earlier, it ended up with me saying I must've missed something
<very-mediocre_> I encountered something similar again, but then I toyed with the code and after several recompiles it behaved as expected
<very-mediocre_> Am I going crazy, or could there be some caching issue?
<very-mediocre_> The exact thing I just experienced was: `var match_next: ?u8 = arr[cur_pos];`
<very-mediocre_> and the compiler was complaining that `arr[cur_pos]` was u8 instead of ?u8, and wasn't letting me assign it
<very-mediocre_> now it's compiling fine...
<very-mediocre_> the same code.
very-mediocre has quit [Ping timeout: 260 seconds]
very-mediocre_ is now known as very-mediocre
<very-mediocre> Actually I'm starting to think it's something to do with my system at this point, please disregard for now
<very-mediocre> The files are on a network drive so it may be a sync issue.
dbandstra has quit [Quit: Leaving]
<donpdonp> can someone explain 'error: unknown-length pointer to opaque'
xtreak has quit [Remote host closed the connection]
xtreak has joined #zig
quc has joined #zig
xtreak has quit [Remote host closed the connection]
xtreak has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xtreak has quit [Ping timeout: 240 seconds]
very-mediocre has quit [Ping timeout: 260 seconds]
davr0s has joined #zig
xtreak has joined #zig
triplefox has joined #zig
triplefox is now known as _triplefox
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jjido has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<donpdonp> the hashmap.zig test has a line 'assert((??map.get(2)).value == 22);'
<donpdonp> when i try to use it 'warn("root count {}\n", root.get("url").value);' -> error: type '?*Entry' does not support field access (for .value)
nc-x[m] has left #zig ["User left"]
<donpdonp> (using zig master branch)
Ichorio has joined #zig
<donpdonp> ok i stumbled my way into var url = (??root.get("url")).*; url.value.String
_triplefox has quit [Ping timeout: 260 seconds]
very-mediocre has joined #zig
sagecode has joined #zig
davr0s has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
doingthings_ has joined #zig
xtreak has quit []
btbytes has joined #zig
btbytes has quit [Ping timeout: 260 seconds]
doingthings_ has quit [Ping timeout: 256 seconds]
SimonNa has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
clownpriest has joined #zig
doingthings_ has joined #zig
mahmudov has quit [Ping timeout: 264 seconds]
JinShil has quit [Quit: Leaving]
darithorn has joined #zig
hoppetosse has joined #zig
<andrewrk> donpdonp, you can create the unknown length pointer to opaque like this: [*]c_void
<andrewrk> fix with *c_void
quc has quit [Ping timeout: 240 seconds]
davr0s has joined #zig
doingthings_ has quit [Ping timeout: 268 seconds]
bheads has joined #zig
quc has joined #zig
quc has quit [Remote host closed the connection]
frmdstryr has joined #zig
<bheads> Is there a way to log what a function after comptime resolution? ie the resulting function in Case Study: printf in Zig
<bheads> would something like @compileLog(this) work (or in the future?)
<andrewrk> bheads, if you could see it, it would look something like this: https://clbin.com/kma45
<andrewrk> (zig ir)
<andrewrk> but, maybe it would be a good idea to clean up that syntax and make it a little more user friendly and then yes, in fact, provide a way to introspect zig ir
<bheads> interesting, is that the --verbose-ir flag?
<andrewrk> yes
<andrewrk> be warned, it's a firehose
<bheads> lol yeah ir can be tricky but we could make a tool that takes the ir and the source code and makes an output like godbolt
jjido has joined #zig
<andrewrk> there are 2 tricks to make the output reasonably small. here they are: https://gist.github.com/andrewrk/5684434a2a8d4cbb08bb0d855c4f2ada
<bheads> nice, should but this info in a wiki page so it not lost
<bheads> should put**
quc has joined #zig
<GitHub134> [zig] andrewrk pushed 1 new commit to master: https://git.io/vh2zh
<GitHub134> zig/master 9046b5e Andrew Kelley: fix assertion failure when debug printing comptime values
<GitHub25> [zig] marleck55 opened pull request #1090: std/fmt: Use lowercase k for kilo in base 1000 (master...lowercase-k) https://git.io/vh2gY
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
mahmudov has joined #zig
<GitHub39> [zig] andrewrk pushed 3 new commits to master: https://git.io/vh2g0
<GitHub39> zig/master 670a0a3 Andrew Kelley: Merge branch 'clownpriest-arraylist_set'
<GitHub39> zig/master fc64467 Andrew Kelley: clean up std.ArrayList...
<GitHub39> zig/master e0092ee Arthur Elliott: add set function to arraylist...
<GitHub127> [zig] andrewrk closed pull request #1090: std/fmt: Use lowercase k for kilo in base 1000 (master...lowercase-k) https://git.io/vh2gY
<GitHub167> zig/master 7a96355 marleck55: std/fmt: Use lowercase k for kilo in base 1000 (#1090)
<GitHub167> [zig] andrewrk pushed 1 new commit to master: https://git.io/vh2gE
<GitHub78> [zig] andrewrk closed pull request #1075: add set function to arraylist (master...arraylist_set) https://git.io/vhuCf
<clownpriest> wrote a pure zig implementation of xxhash function
<clownpriest> still not optimized, but the basic functionality works
<andrewrk> oh neat! this looks useful
<clownpriest> yeah the function is supposed to be super fast, but i'd imagine the current implementation is still quite slow, will be a nice exercise in optimizations in zig
<andrewrk> I know tiehuis has a lot of experience doing that
<andrewrk> he may have some tips
<clownpriest> i will ping him to ask to take a look once it's in better shape
bheads has quit [Quit: Leaving]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
jjido has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doingthings_ has joined #zig
bheads__ has joined #zig
<MajorLag1> andrewrk, is there a new typeId for [*] that is undocumented, or some way to tell *T from [*]T in comptime code?
<andrewrk> MajorLag1, I made a couple modifications to type info regarding slices and pointers
<andrewrk> have a look at TypeInfo.Pointer: https://ziglang.org/documentation/master/#Compile-Variables
<andrewrk> @typeInfo([]u8) is now Pointer with Size == .Slice
sagecode has quit [Ping timeout: 260 seconds]
doingthings_ has quit [Ping timeout: 264 seconds]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
darithorn has quit [Quit: Leaving]
doingthings_ has joined #zig
doingthings_ has quit [Ping timeout: 260 seconds]
<clownpriest> is there a way to un-const a []const u8?
<clownpriest> i want to reslice and re-assign to it
<clownpriest> x = x[i..]
ysengrimm has quit [Read error: Connection reset by peer]
bb010g has quit [Ping timeout: 245 seconds]
ysengrimm has joined #zig
sg-james[m] has quit [Ping timeout: 245 seconds]
lorde_kumamon[m] has quit [Ping timeout: 276 seconds]
clebermatheus[m] has quit [Ping timeout: 256 seconds]
pqflx3[m] has quit [Ping timeout: 240 seconds]
dtz has quit [Ping timeout: 260 seconds]
kammd[m] has quit [Ping timeout: 256 seconds]
<andrewrk> sounds like you should use a different variable
<clownpriest> yeah that's what i ended up doing, just wondering if there's a way to get around that
<clownpriest> tho i guess that's not a good idea
<andrewrk> it makes more sense to use a different variable
<andrewrk> if you somehow did the other thing, your "program safety score" would go down
<MajorLag1> I haven't had to do it in a while, but I think `x = @intToPtr([*]T, @ptrToInt(x.ptr))[i..end]` might still work to remove const. Still a bad idea unless a library is being really stupid or something.
<clownpriest> right
<andrewrk> yes that will work. @intToPtr and @ptrToInt is very bad for this "program safety score"
sagecode has joined #zig
<MajorLag1> yeah, but they'll get you out of a jam when you need them.
davr0s has joined #zig
<andrewrk> agreed
<GitHub171> [zig] tgschultz opened pull request #1092: Add C string support to std.fmt w/ "{s}" (master...zig-std.fmt-c-string) https://git.io/vh2rC
mahmudov has quit [Ping timeout: 265 seconds]
mahmudov has joined #zig
frmdstryr has quit [Ping timeout: 260 seconds]
clownpriest has quit [Quit: Textual IRC Client: www.textualapp.com]
clownpriest has joined #zig
sagecode has quit [Ping timeout: 256 seconds]
hinst has quit [Quit: No Ping reply in 180 seconds.]
hinst has joined #zig
frmdstryr has joined #zig
bheads__ has quit [Ping timeout: 260 seconds]
very-mediocre has quit [Quit: Page closed]
pqflx3[m] has joined #zig
sg-james[m] has joined #zig
kammd[m] has joined #zig
lorde_kumamon[m] has joined #zig
dtz has joined #zig
bb010g has joined #zig
clebermatheus[m] has joined #zig
ben_panam has joined #zig
Ichorio has quit [Ping timeout: 264 seconds]
IntoxicatedHippo has joined #zig
frmdstryr has quit [Ping timeout: 260 seconds]
clownpriest has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ben_panam has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
clownpriest has joined #zig
pskocik has joined #zig
pskocik has quit [Client Quit]
dbandstra has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sagecode has joined #zig
sagecode has quit [Ping timeout: 248 seconds]
clownpriest has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
clownpriest has joined #zig
quc has quit [Ping timeout: 256 seconds]
hoppetosse has quit [Remote host closed the connection]
hoppetosse has joined #zig
hoppetosse has quit [Ping timeout: 240 seconds]