ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
steveno has joined #zig
steveno has quit [Ping timeout: 240 seconds]
steveno has joined #zig
steveno has quit [Remote host closed the connection]
Marumoto has quit [Ping timeout: 246 seconds]
darithorn has joined #zig
darithorn has quit [Quit: Leaving]
<diltsman>
For the compiler_rt functions, are there any processor specific ones that have been done?
kristate has joined #zig
<emekankurumeh[m]>
that last commit has got me excited
jevinski_ has quit [Read error: Connection reset by peer]
jevinskie has joined #zig
jevinski_ has joined #zig
jevinskie has quit [Ping timeout: 245 seconds]
schme245 has joined #zig
<schme245>
I'm curious as to why there is no increment or decrement operators in Zig (++ and --)
<schme245>
I'm sure this has been asked a million times but I couldn't find anything about it in the GitHub issues
<kristate>
schme245: it's a flaw of C and is prone to undefined behavior
<schme245>
flawed in what way? is it more prone to undefined behavior than `x += 1`?
<kristate>
"it is not clear in what sequence the subtraction and increment operations should be performed. Such expressions generally invoke undefined behavior, and should be avoided."
<schme245>
hah, I'd never thought to write something like `x - ++x` :D
<schme245>
that clears thing up, thanks!
eagle2com has joined #zig
<kristate>
schme245: cool
<kristate>
you are very welcome
steveno has joined #zig
halosghost has joined #zig
<schme245>
are there intrinsics for stuff like AES-NI instructions or is inline assembly the way to go?
<andrewrk>
I think we should be able to call that with inline assembly
* donpdonp
nods
<andrewrk>
unfortunately, unlike mmap, this is global, and so if any other allocator (such as libc) tries to "own" the memory block, it will conflicct
<andrewrk>
hmm it's not so bad, because there is no shrink. so multiple allocators cannot clobber each other
schme245 has joined #zig
<andrewrk>
donpdonp, good news by the way: llvm 8 rc1 is out; final release planned for feb 27. that's when zig officially gets wasm support in master branch
<andrewrk>
(and that's when I will personally take steps to make sure it's working well)
<donpdonp>
orly. i thought llvm7 was the bar for wasm. what does llmv8 add?
<andrewrk>
The WebAssembly target is "experimental" in llvm7 and thus not enabled by default. So it is missing from, e.g. the apt packages in Debian & Ubuntu. LLVM 8 promotes the WebAssembly target to non-experimental status.
<donpdonp>
also i think zig is a good match for wasm because its accustomed to be a low-level language, but i love it for its type/pointer handling.
<donpdonp>
andrewrk: ah i see.
<donpdonp>
im looking forward to webpages being able to use a variety of languages
<donpdonp>
though my own project here is putting the 'wagon' go webasm interpreter into an irc bot :)
kristate has quit [Remote host closed the connection]
Zaabtop has joined #zig
<andrewrk>
based on reading the wasm specs, it seems that zig's handling of out of memory conventions will be quite harmonious with web assembly
Zaabtop1 has joined #zig
Zaabtop1 has quit [Read error: Connection reset by peer]
Zaabtop has quit [Read error: Connection reset by peer]
Zaab1t has quit [Ping timeout: 240 seconds]
eagle2com has joined #zig
schme245 has quit [Remote host closed the connection]
steveno_ has joined #zig
marmotini_ has joined #zig
Zaab1t has joined #zig
schme245 has joined #zig
<schme245>
andrewrk: quick question: are you interested in having symmetric / asymmetric crypto in the standard lib?
marmotini_ has quit [Ping timeout: 246 seconds]
<andrewrk>
schme245, hmm I'm not sure I have a quick answer. It's definitely welcome at least before 1.0. When 1.0 nears, there is planned a standard library audit, and a lot of stuff will probably move to third party packages
<schme245>
makes sense. I'm playing around with some stuff at the moment, if they turn out OK then maybe I'll shot a PR
<schme245>
if they get scrapped in 1.0 that's fine by me :)
<schme245>
(if they get in at all that is)
marmotini_ has joined #zig
eagle2com has quit [Ping timeout: 250 seconds]
<andrewrk>
sounds good
Zaab1t has quit [Quit: bye bye friends]
steveno_ has quit [Ping timeout: 240 seconds]
marmotini_ has quit [Ping timeout: 240 seconds]
porky11 has joined #zig
<porky11>
is there already some kind of ECS written in zig?
<andrewrk>
porky11, what does ECS stand for?
<porky11>
andrewrk, Entity Component System
<andrewrk>
oh, yeah quite possibly. I know unique_id and MajorLag, and possibly also dbandstra are all working on games
<andrewrk>
it's also a use case that people are talking about with respect to https://github.com/ziglang/zig/issues/130 which is the open issue for possibly introducing OOP (or similar), and has no accepted solution yet
<porky11>
andrewrk, I also found this issue before writing here, but only one person mentions ECS once there
<andrewrk>
porky11, I don't think you are going to find a high quality, stable, ready-for-everybody-to-use ECS package at this time
eagle2com has joined #zig
Avila has quit [Ping timeout: 250 seconds]
darithorn has quit [Quit: Leaving]
wootehfoot has quit [Read error: Connection reset by peer]
eagle2com has quit [Ping timeout: 250 seconds]
<MajorLag>
I've only seen some simple demos of how ECS could be handled in zig, never a serious attempt.
<andrewrk>
@bytesToSlice takes element type, not slice type
<schme245>
that does the trick!
<andrewrk>
that is a well-defined conversion, as long as you can comptime assert @sizeOf(u5) == @sizeOf(u6). which I'm pretty sure is going to be guaranteed in the language specification.
<schme245>
neat!
<schme245>
Zig is the first time I'm programming in a low-level language, I feel like I'm going mad with power, casting pointers left and right just to see what'll happen
<andrewrk>
exciting :)
<schme245>
yeah, really enjoying it so far, keep up the great work!