ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
howru has joined #zig
<GitHub83>
[zig] andrewrk opened pull request #1053: Pointer Reform: proper slicing and indexing (master...pointer-reform-slicing) https://git.io/vh4ct
howru has quit [Client Quit]
howru has joined #zig
cenomla has joined #zig
davr0s has joined #zig
clownpriest has joined #zig
SergeiMinaev has joined #zig
clownpriest has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
clownpriest has joined #zig
SergeiMinaev has quit [Client Quit]
cenomla has quit [Quit: cenomla]
darithorn has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
clownpriest has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
clownpriest has joined #zig
SimonNa has quit [Read error: Connection reset by peer]
<Hejsil_>
andrewrk, Aah right! Forgot about the notnull attribute in C
<andrewrk>
Hejsil_, potentially we could even figure out a way to annotate unknown length vs single item pointers in a way that would allow us to recover the information in translate-c
<andrewrk>
for example we could use a typedef with a custom annotation
<andrewrk>
and you would want to manually perform this annotation before running translate-c for the porting use case
<andrewrk>
because the generated code would be much nicer. same thing for nullables
<GitHub115>
zig/master 7a09482 Andrew Kelley: fix crash when evaluating return type has compile error...
darithorn has joined #zig
Ichorio has joined #zig
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
noonien has joined #zig
davr0s has joined #zig
nc-x[m] has joined #zig
jjido has joined #zig
kristate has quit [Remote host closed the connection]
mzo has joined #zig
dbandstra2 has joined #zig
bheads_ has joined #zig
return0e has quit [Read error: Connection reset by peer]
return0e has joined #zig
bheads__ has quit [Ping timeout: 265 seconds]
Ichorio has quit [Ping timeout: 245 seconds]
mzo has quit [Ping timeout: 260 seconds]
kristate has joined #zig
kristate has quit [Ping timeout: 264 seconds]
return0e has quit [Read error: Connection reset by peer]
return0e has joined #zig
return0e has quit [Read error: Connection reset by peer]
return0e has joined #zig
<clownpriest>
any suggestions on how i could allocate a module-level global hashmap and initialize it at compile time?
<clownpriest>
or pointers to existing code that does something similar
<clownpriest>
searching through zig compiler repo isn't turning up useful examples (tho i could be searching for the wrong thing)
<andrewrk>
clownpriest, that's a really fun idea that afaik nobody has explored yet
<andrewrk>
the current std lib hash map uses the heap for memory exclusively
<andrewrk>
are you intending it to be read-only at runtime?
<clownpriest>
yup
<andrewrk>
this would be a good use case to explore trying to compute a perfect hash at comptime
Hejsil_ has quit [Quit: Page closed]
jjido has quit [Ping timeout: 240 seconds]
<clownpriest>
i'm not too well versed in compilers, but i'm assuming that if all the data is known at compile time, then it should be doable
<clownpriest>
especially with the input i'm using (just raw u8's for both key and value, super simple hash function, wouldn't even really call it a hash)
<clownpriest>
i could get my job done without a hashmap atm, just use pairs of static arrays and keep track of offsets, but feels like this sort of thing could be cool
howru has quit [Quit: WeeChat 2.1]
davr0s has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davr0s has joined #zig
<dbandstra2>
could someone take a few minutes to look at something? i have some code that's crashing and i'm 75% sure it's not my fault
<dbandstra2>
it's in a test so (hopefully) can be replicated
<dbandstra2>
but anyway std.mem.eql is failing when (i think) it shouldn't be. the |item| part of the for loop is yielding random garbage (but it goes away if i add a debug print!)
<andrewrk>
dbandstra2, I'll have a look in a few moments
<dbandstra2>
thanks
noonien has quit [Quit: Connection closed for inactivity]
clownpriest has quit [Ping timeout: 245 seconds]
bheads__ has joined #zig
bheads_ has quit [Ping timeout: 240 seconds]
<pancake>
hi
<pancake>
i cant build zig from git on mac
<pancake>
/Users/pancake/prg/zig/deps/lld/wasm/WriterUtils.h:27:16: error: use of overloaded operator '==' is ambiguous (with operand types 'const llvm::wasm::WasmSignature' and
<pancake>
zig/deps/lld/include/lld/Core/SymbolTable.h:68:20: error: no member named 'HashString' in namespace 'llvm' return llvm::HashStr...
<andrewrk>
are you using the system compiler? what macos version?