ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
<donpdonp> as soon as i add var bytes : [255]u8 = undefined;
<donpdonp> the wasm tries to import 'memcpy', which i dont have an implementation for.
<donpdonp> i know its very early for webasm. im not sure if there is supposed to be a 'libc' for webasm yet
<andrewrk> donpdonp, zig provides memcpy (and more) automatically when you use build-exe or build-lib
<andrewrk> that's going to depend on zig using the wasm linker correctly - which I believe we are close to but might need a couple patches
_whitelogger has joined #zig
_whitelogger has joined #zig
Ichorio has quit [Ping timeout: 240 seconds]
steveno has quit [Remote host closed the connection]
tridactyla has quit [Ping timeout: 264 seconds]
wilsonk has quit [Ping timeout: 246 seconds]
Marumoto has joined #zig
wilsonk has joined #zig
Marumoto has quit [Ping timeout: 268 seconds]
jevinskie has joined #zig
jevinski_ has quit [Ping timeout: 268 seconds]
tridactyla has joined #zig
<emekoi> well i got a zig program to work with libc in mingw, but i had to use mingw's linker
<emekoi> it must be doing some weird magic to get msvcrt to link correctly
<kristate> hey emekoi
<emekoi> what's up?
<kristate> how are you?
<emekoi> good, what about you?
<kristate> pretty good -- it's almost 4pm in kyoto
<emekoi> it's almost 1am where i live
emekoi has quit [Remote host closed the connection]
emekoi has joined #zig
emekoi has quit [Ping timeout: 240 seconds]
Zaab1t has joined #zig
Ichorio has joined #zig
Zaabtop has joined #zig
Zaab1t has quit [Ping timeout: 268 seconds]
Zaabtop is now known as Zaab1t
Zaab1t has quit [Ping timeout: 240 seconds]
wootehfoot has joined #zig
clarete has joined #zig
porky11 has joined #zig
<porky11> hi
Zaab1t has joined #zig
<porky11> C is good for writing cross language libraries, but it doesn't allow compile time generic code
<kristate> hi porky11
<porky11> and even for c++ it's not possible to export compile time generic code to other languages
<porky11> but zig also doen't help there, I assume, right?
<kristate> what do you mean by comptime generic code?
<porky11> for example vector math (Vector<T, N>)
<kristate> porky11: the C ABI does not have support for generics and comptime code, but of course, zig can export its translation units to the C ABI
<porky11> yeah, I thought so
<kristate> the C ABI meaning the C ABI -- not the zig C ABI layer
<porky11> I just thought, a cross language way to import generics (similar to .o .so or whatever c can compile to) would be a good idea, and so I hoped, since zig aims to be a better C with generics, it maybe implements something like that
<kristate> well, you would write your code in zig, and then write some wrapper functions to talk with C
<porky11> the problem is, when I switch language, I have to rewrite a bunch of my libs, so I started to use C for most of my libs, so I just have to write wrappers for other languages, which is much simpler, but with generics that's not possible. Assuming I write a generic vector math library in zig and want to use it in rust later, I cannot simply write a wrapper
<porky11> I either have to rewrite it or instantiate all important types (maybe vectors up to 10 dimensions), but when I need some less important types, it won't work, and when I don't use most of the types, filesize will be too large
<kristate> porky11: that's why zig is so important -- it's the closest thing we have to a true c competitor. Rust is too runtime centric
<porky11> rust was just an example. There are langauges with similar goals to zig like scopes, odin, dale. For example I wrote a nice library in scopes and it would be cool if I could use it in zig without having to rewrite most of it
clarete has quit [Ping timeout: 246 seconds]
darithorn has joined #zig
porky12 has joined #zig
porky11 has quit [Remote host closed the connection]
porky12 has quit [Ping timeout: 245 seconds]
steveno has joined #zig
steveno has quit [Ping timeout: 250 seconds]
Zaab1t has quit [Quit: bye bye friends]
steveno has joined #zig
wootehfoot has quit [Quit: Leaving]
wootehfoot has joined #zig
Flaminator has joined #zig
steveno has quit [Remote host closed the connection]
wootehfoot has quit [Read error: Connection reset by peer]
steveno has joined #zig
steveno has quit [Remote host closed the connection]
Flaminator has quit [Disconnected by services]