ChanServ changed the topic of #zig to: zig programming language | https://ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
drawkula is now known as yeti
spacelove has joined #zig
<spacelove> @cepheus your construction returns *const [0][]u8, it's not evident how to convert that to a type [][]const u8. Do you have any idea?
<spacelove> Thought maybe this might work: &[][]const u8{}
<spacelove> But alas
<spacelove> Trying a new method to solve this problem by making a copy of a slice:
<spacelove> you would think this would work: slice_copy = std.mem.dupe(allocator, [][]const u8, slice)
<daurnimator> spacelove: `*const [0][]u8` will coerce to []const[]u8`
txdv has quit [Ping timeout: 246 seconds]
gazler_ has joined #zig
gazler has quit [Ping timeout: 265 seconds]
spacelove has quit [Ping timeout: 240 seconds]
kushalp has quit [Ping timeout: 250 seconds]
kwilczynski has quit [Ping timeout: 250 seconds]
tracernz has quit [Ping timeout: 250 seconds]
procnto has quit [Ping timeout: 250 seconds]
kwilczynski has joined #zig
procnto has joined #zig
tracernz has joined #zig
kushalp has joined #zig
vrdhn has joined #zig
vrdhn has quit [Quit: Leaving]
vrdhn has joined #zig
osa1 has quit [Ping timeout: 240 seconds]
vrdhn has quit [Client Quit]
vrdhn has joined #zig
earnestly has quit [Ping timeout: 240 seconds]
leon-p has quit [Quit: leaving]
waleee-cl has quit [Quit: Connection closed for inactivity]
vrdhn has quit [Ping timeout: 265 seconds]
vrdhn has joined #zig
vrdhn has quit [Ping timeout: 240 seconds]
vrdhn has joined #zig
pjz has joined #zig
semarie has quit [Ping timeout: 252 seconds]
vrdhn has quit [Read error: Connection reset by peer]
vrdhn has joined #zig
semarie has joined #zig
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vrdhn has quit [Ping timeout: 268 seconds]
aerona has joined #zig
sord937 has joined #zig
vrdhn has joined #zig
vrdhn has quit [Ping timeout: 265 seconds]
earnestly has joined #zig
gazler_ is now known as gazler
cole-h has quit [Ping timeout: 240 seconds]
aerona has quit [Quit: Leaving]
yyp has joined #zig
vrdhn has joined #zig
vrdhn has quit [Ping timeout: 265 seconds]
dyeplexer has joined #zig
vrdhn has joined #zig
vrdhn has quit [Client Quit]
sundbp has joined #zig
osa1 has joined #zig
<rbino> where can I look for the implementation of builtin functions (specifically @export) in the Zig codebase? I'm trying to debug a problem with how @export works with multiple Weak symbols to the same function
<daurnimator> rbino: maybe `ir_analyze_instruction_export` in ir.cpp ?
spyjetfayed has joined #zig
yyp has quit [Quit: now it's safe to turn off your computer]
<rbino> seems about right, thanks daurnimator
teratorn has joined #zig
retropikzel has joined #zig
klltkr has joined #zig
retropikzel has left #zig ["Leaving"]
retropikzel has joined #zig
koakuma has joined #zig
leon-p has joined #zig
LewisGaul has joined #zig
<koakuma> So when building stage2 on sparc64, I'm getting errors like this:
<koakuma> error(compilation): /home/k/zig/src/zig/lib/libc/glibc/sysdeps/sparc/sparc64/crti.S:1:1: unable to build C object: unable to build C object: FileNotFound
<koakuma> From what I understand, the SPARCs uses a common crti.S file that lives at sysdeps/sparc/crti.S in the glibc directory. How do I teach Zig to point to the proper path?
semarie has quit [Quit: WeeChat 3.1]
<koakuma> Nevermind, found it, it's start_asm_path in src/glibc.zig
knebulae has quit [Read error: Connection reset by peer]
sundbp has quit [Ping timeout: 265 seconds]
semarie has joined #zig
knebulae has joined #zig
Akuli has joined #zig
bndbsh has joined #zig
qbit has joined #zig
<qbit> hola
<Snektron> hello
<ifreund> o7
<g-w1> hi
<ShockTohp> hey
wootehfoot has joined #zig
waleee-cl has joined #zig
vrdhn has joined #zig
<vrdhn> emacs+lsp+zig: trying lsp-goto-implmentation, getting The connected server(s) does not support method textDocument/typeDefinition. Is there any a way to jump to definition inside the stdlibrary ?
<vrdhn> / zig / zls /
<ifreund> hmm, goto-definition works for me with kakoune + zls
<ifreund> not at all familiar with emacs sadly
<g-w1> vrdhn: make sure you update zls and emacs, there have been some breaking changes recently that fixed some stuff
<g-w1> like in the past 10 hours
<vrdhn> g-w1, thx .. zls is recent, i can try updating lsp-mode
<g-w1> make sure you run `zls` config
nvmd has joined #zig
<vrdhn> g-w1, thanks for the tip , i'll need to poke around to see what i did wrong.
<vrdhn> Got it working. Thanks .
<g-w1> np
<g-w1> what did you have to change?
<vrdhn> zls config (-:
<g-w1> ah
<vrdhn> yeah PEBKAC !
teratorn has quit [Read error: Connection reset by peer]
wootehfoot has quit [Quit: Leaving]
ifreund has quit [Ping timeout: 246 seconds]
ifreund has joined #zig
tm-exa_ has joined #zig
sord937 has quit [Quit: sord937]
_whitelogger has joined #zig
yyp has joined #zig
yyp has quit [Quit: now it's safe to turn off your computer]
yyp has joined #zig
dyeplexer has quit [Read error: Connection reset by peer]
<mikdusan> andrewrk: I closed #8130 - upstream https://bugs.llvm.org/show_bug.cgi?id=49401 can be closed too
<andrewrk> mikdusan, thanks! great. the upstream bug is already closed
<andrewrk> don't forget to grep the code for 8130 to look for test cases to re-enable
<mikdusan> will do
<andrewrk> here's the upstream tracking issue for llvm 12: https://bugs.llvm.org/show_bug.cgi?id=48902
<andrewrk> 3 of those open reports are ours
<mikdusan> pinned
<mikdusan> looks like 49830 last comment shows a fix
<andrewrk> yeah :)
<andrewrk> also I was pleased to see 34435 as a release blocker. that wasn't me who did that
<mikdusan> that one is hard to nail down
paulgrmn has joined #zig
<mikdusan> and I really fucked that issue up by: A. adding an unrelated issue, then B. adding ANOTHER unrelated issue with 2 reductions.
<mikdusan> (just noticed my last 2 reductions have different assertion errors)
retropikzel has quit [Quit: Leaving]
aerona has joined #zig
aerona has quit [Client Quit]
aerona has joined #zig
<cepheus> is it common for Zig to come across issues simply by exercising features/optimisations in LLVM that are not common or used in clang? (I know this is something the Rust compiler has encountered a few times)
<andrewrk> yes
<andrewrk> particularly with SIMD
<andrewrk> a lot of the release blocker bugs for LLVM 10, 11, 12 have been from zig finding regressions in release candidates
teratorn has joined #zig
ur5us has joined #zig
<bndbsh> I'm trying to add support for extern C ABI calls returning small structs to stage1. I think I know what's wrong with the generated llvm ir and what it should look like instead. but I'm having a hard time following the compiler code
<bndbsh> from what I understand the change I need to make is twofold: first, if a function returns a small struct, it actually needs to be declared to returned something like `i32`, `i64`, up to `{ i64, i64 }` instead
<bndbsh> second, after generating the call there needs to be some trickery to copy the int/int struct value into whatever the original struct was
<bndbsh> I *think* step 1 can be done in `resolve_llvm_types_fn_type`, where if we're dealing with a c abi function returning a small struct, we swap out the return type. but I'm not sure what the downstream effects of this are, so far I've only managed to crash zig0
<bndbsh> I'm not sure where step 2 would be done. I can't figure out what's generating the store instruction after the call
<bndbsh> I think maybe I can do it in `ir_render_call` by tacking a few more instructions after the call?
r0bby has joined #zig
cole-h has joined #zig
teratorn has quit [Ping timeout: 260 seconds]
teratorn has joined #zig
ur5us has quit [Ping timeout: 250 seconds]
ur5us has joined #zig
mikdusan has quit [Quit: WeeChat 3.0.1]
mikdusan has joined #zig
nvmd has quit [Quit: Later nerds.]
pretty_dumm_guy has joined #zig
proteusguy has quit [Ping timeout: 260 seconds]
<cepheus> i should probably stop riding the halfway house and actually start moving my stuff to target zig master instead of 0.7.1
<andrewrk> bndbsh, there is some C ABI code in analyze.cpp and some in codegen.cpp
<andrewrk> this would probably enable you to put a breakpoint in codegen.cpp and follow the logic in a debugger
<andrewrk> cepheus, might make sense since we're nearing the end of the release cycle
<andrewrk> you can also pick an arbitrary revision and stick with it until 0.8.0 is tagged
ur5us has quit [Ping timeout: 276 seconds]
pretty_dumm_guy has quit [Quit: WeeChat 3.2-dev]
<cepheus> yeah i got that feeling, there's already an appreciable divergence with 0.7 at this point, plus i've already investigated enough to have bridged most of the differences in my most sizeable codebase
proteusguy has joined #zig
osa1 has quit [Ping timeout: 268 seconds]
osa1 has joined #zig
spacelove has joined #zig
<spacelove> So, continuing with my word puzzle project, I used zig to find the longest chain of words in english. A chain is made by adding, subtracting, or swapping a letter
<spacelove> I am really proud to say I finally understand what a slice is and why it's dope AF
<spacelove> It's no wonder pizza comes in slices, and not in arrays
yyp has quit [Quit: now it's safe to turn off your computer]
<spacelove> Before clicking, it's kind of fun to guess at what you think the diameter of the graph would be... the longest shortest path between English words
Akuli has quit [Quit: Leaving]
teratorn has quit [Ping timeout: 240 seconds]
spacelove has quit [Ping timeout: 240 seconds]
<ifreund> wow, that is pretty neat :D
<ifreund> Does the dictionary you're using really contain all the words though?
ur5us has joined #zig
mikdusan has quit [Quit: WeeChat 3.0.1]
LewisGaul has quit [Ping timeout: 240 seconds]
spacelove has joined #zig
<spacelove> ifreund what's considered a word is kind of arbitrary
<spacelove> So, to answer your question, absolutely not
<spacelove> But I picked the 25k words that I, at a glance, would recognize as a reasonable word
<spacelove> Some dictionaries contain 500k words
<spacelove> But I think the average person's vocabulary is around 10-50k so... it's like a ballpark
<cepheus> i appreciate that this may not necessarily be considered warranting addition but i use this in my code and it broke going from 0.7.1 -> master: https://github.com/ziglang/zig/pull/8443
<cepheus> it didn't really work correctly before (it would just paste the string value in without quotes) but you could at least work around it which is not possible afterwards
spacelove has quit [Quit: Ping timeout (120 seconds)]
LewisGaul has joined #zig
klltkr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikdusan has joined #zig
paulgrmn has quit [Ping timeout: 260 seconds]
<LewisGaul> Looking into https://github.com/ziglang/zig/issues/5176, I think instead of checking for a newline we want to be checking for a comment: https://github.com/ziglang/zig/blob/83a2665772578f6262afc858613023738a7d25ef/lib/std/zig/render.zig#L1637 - is there an equivalent of `tokensOnSameLine()` I could use? (ifreund?)
spacelove has joined #zig
<LewisGaul> oh `hasComment()` looks promising aha
spacelove has quit [Ping timeout: 240 seconds]
LewisGaul has quit [Ping timeout: 240 seconds]
spyjetfayed has quit [Ping timeout: 258 seconds]