ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<GitHub145> [zig] thejoshwolfe pushed 1 new commit to master: https://git.io/vbgnc
<GitHub145> zig/master 0003cc8 Josh Wolfe: self-hosted: implement addr of align parsing
<GitHub144> [zig] thejoshwolfe pushed 1 new commit to master: https://git.io/vbgcQ
<GitHub144> zig/master d295279 Josh Wolfe: self-hosted: implement var decl align
scientes has quit [Ping timeout: 255 seconds]
cenomla has quit [Quit: cenomla]
cenomla has joined #zig
cenomla has quit [Client Quit]
cenomla has joined #zig
scientes has joined #zig
scientes has quit [Changing host]
scientes has joined #zig
scientes has quit [Ping timeout: 264 seconds]
cenomla has quit [Quit: cenomla]
arBmind has joined #zig
scientes has joined #zig
scientes has quit [Changing host]
scientes has joined #zig
arBmind has quit [Quit: Leaving.]
arBmind has joined #zig
arBmind1 has joined #zig
arBmind has quit [Ping timeout: 256 seconds]
arBmind has joined #zig
arBmind1 has quit [Ping timeout: 240 seconds]
scientes has quit [Ping timeout: 264 seconds]
scientes has joined #zig
scientes has quit [Changing host]
scientes has joined #zig
scientes has quit [Ping timeout: 248 seconds]
skyfex has joined #zig
<GitHub41> [zig] andrewrk pushed 1 new commit to master: https://git.io/vb2fq
<GitHub41> zig/master 84619ab Andrew Kelley: add test for allowing slice[slice.len..slice.len]
<skyfex> andrewrk: I found some time to test cInclude again. It just works now :)
arBmind1 has joined #zig
arBmind has quit [Ping timeout: 264 seconds]
arBmind1 has quit [Quit: Leaving.]
<andrewrk> skyfex, great. now to solve your other issues
arBmind has joined #zig
<skyfex> We have hello world!
<andrewrk> cool!
<skyfex> There's something very weird going on though. I tried to define a const string, but then the linker complained that memcpy was missing. I was going to write my own memcpy, so I defined the function but didn't fill it out. I tried to compile just to check that it would link, and suddenly it just worked. No idea what's really going on
<andrewrk> zig creates memcpy (and other primitives) for you when you do build-exe or build-lib
<andrewrk> in builtin.o
<andrewrk> but if you do build-obj then it's assumed you're going to link against libc or similar
<andrewrk> what build command are you using?
<skyfex> build-obj
<skyfex> Do you know why this code generates code to memcpy btw? Doesn't seem necessary to me:
<skyfex> const string = "Hello World from Zig!\n"; for (string) |ch| { ... }
<andrewrk> it probably doesn't once the optimizer runs, but the naive code generated might copy, for example, the ptr and the len from the constant data into a stack variable
<andrewrk> this is an LLVM thing - it can generate calls to memcpy and some others, so we have to make them available
<andrewrk> is there any way you could use build-exe instead of build-obj ?
<andrewrk> the linker is failing right? but then you could try the way you're linking, but with all the args given with --verbose-link
<andrewrk> which will include builtin.o
<skyfex> I tried a few things. I tried "build-exe .." and "build-obj lib/std/special/builtin.zig" .. the issue then is the built-ins related to float.
<skyfex> ld.lld: error: undefined symbol: __aeabi_dcmpeq >>> referenced by floor.zig:59 (C:\SW\zig\lib\zig\std\math\floor.zig:59) >>> .\zig-cache\builtin.o:(floor.0.2)
<skyfex> (dozens of those)
<andrewrk> ohhh ok
<skyfex> But if I copien builtin.zig, and deleted all the functions related to floating point, then it works
<andrewrk> so we just need to port more of compiler-rt
<andrewrk> can you open an issue with all those missing float built-ins?
<andrewrk> actually, post them here: https://github.com/zig-lang/zig/issues/495
<skyfex> done
<andrewrk> thanks! I should be able to get these implemented soon. it's just porting code from LLVM's compiler-rt project
<skyfex> I have to leave now. Will experiment more tomorrow maybe
<andrewrk> take care
arBmind has quit [Quit: Leaving.]
Tobba has quit [Read error: Connection reset by peer]
Tobba has joined #zig
sient has joined #zig
sient has quit [Client Quit]
Tobba has quit [Ping timeout: 248 seconds]
Tobba has joined #zig
arBmind has joined #zig
scientes has joined #zig
scientes has quit [Changing host]
scientes has joined #zig
scientes has quit [Ping timeout: 256 seconds]
arBmind has quit [Quit: Leaving.]