<ifreund>
probably some kind of linking issue, the builds from the site are static
swills has joined #zig
ur5us has quit [Ping timeout: 260 seconds]
cole-h has quit [Quit: Goodbye]
<delaney>
Not sure if it's a Mac thing but vscode extension and nativedebug sure aren't playing, damn.
jjsullivan has quit [Ping timeout: 264 seconds]
<nikki93>
i think it may be a mac thing haha -- there's a bunch of "security" stuff it does around things like debuggers
<delaney>
Wouldn't surprise me, have this Mac for work, not a fan
ur5us has joined #zig
linuxgemini2 has joined #zig
linuxgemini has quit [Ping timeout: 240 seconds]
linuxgemini2 is now known as linuxgemini
marijnfs has joined #zig
marijnfs_ has quit [Ping timeout: 260 seconds]
xackus has quit [Ping timeout: 260 seconds]
tundrax has joined #zig
<nikki93>
what are y'all working on :D
tundrax has quit [Ping timeout: 245 seconds]
_whitelogger has joined #zig
<nikki93>
delaney: yeah the main reason i've needed to hold onto a mac is to make builds for ios
adamkowalski has joined #zig
<adamkowalski>
Is there a way to build a compile time lookup table?
<adamkowalski>
I mainly just need a hash map that will be a fixed size with a few values that are known at compile time that I would like to be able to query from elsewhere
<adamkowalski>
I will do the lookups at runtime, and no mutation is necessary. I just want to prefill the map at compile time and store it as a global constant
radgeRayden has joined #zig
adamkowalski has quit [Quit: Lost terminal]
wozeparrot has quit [Ping timeout: 260 seconds]
kristoff_it has quit [Ping timeout: 256 seconds]
qeeg_ has quit [Ping timeout: 260 seconds]
waleee-cl has quit [Quit: Connection closed for inactivity]
Miaourt has quit [*.net *.split]
wjlroe has quit [*.net *.split]
guan has quit [*.net *.split]
JimRM has quit [*.net *.split]
yrashk has quit [*.net *.split]
dch has quit [*.net *.split]
karrick has quit [*.net *.split]
marnix has joined #zig
Miaourt has joined #zig
wjlroe has joined #zig
yrashk has joined #zig
dch has joined #zig
JimRM has joined #zig
guan has joined #zig
karrick has joined #zig
tundrax has joined #zig
tundrax has quit [Ping timeout: 245 seconds]
ur5us has quit [Ping timeout: 260 seconds]
moinstar69 has joined #zig
moinstar69 has quit [Remote host closed the connection]
moinstar has joined #zig
<moinstar>
trying to build github main branch. stage 1 built successfully, unable to get pass `lld: error: undefined symbol: getPollyPluginInfo()`.
<moinstar>
above error is for : `./zig build --prefix $(pwd)/stage2 -Denable-llvm`
<pixelherodev>
Manually add libLLVMPolly or something to the list of linked libs
<moinstar>
i edited CMakeLists.txt and passed ZIG_WORKAROUND_POLLY_SO for the stage 1 compilation. But confused for how to go about in the stage 2
<Piraty>
jjsullivan1: ok, i will probably invert the logic to exclude known-to-not-compile archs instead of whitelisting them
osa1 has quit [Ping timeout: 240 seconds]
Cloudef has joined #zig
ask6155 has joined #zig
osa1 has joined #zig
<ask6155>
if I realloc on a pointer (I assume it's a pointer) does the address stay the same?
<ifreund>
you mean is the new allocation guarenteed to start at the same address as the old one? no
<ask6155>
so my pointer has to be a var then?
<ikskuh>
it depends on which realloc you use
<ask6155>
I'm using the page allocator
<ikskuh>
zig has a realloc that will fail when memory has to be moved
<ikskuh>
and there's realloc which will move if no resize is possible
<ask6155>
the realloc returns a var so I assume I have to put it into my address variable and then use that one?
moinstar has quit [Remote host closed the connection]
<ifreund>
yes
<ifreund>
use resize() if you don't want the allocation to be moved
<ask6155>
what is the usize type? I want to put my int where the size is supposed to go. But it takes a usize
<ikskuh>
usize is a unsigned integer that can take any pointer or object size
kristoff_it has joined #zig
mmohammadi98120 has joined #zig
mmohammadi9812 has quit [Ping timeout: 264 seconds]
mmohammadi9812 has joined #zig
mmohammadi98120 has quit [Ping timeout: 265 seconds]
mmohammadi98126 has joined #zig
mmohammadi9812 has quit [Ping timeout: 272 seconds]
mmohammadi98126 has quit [Ping timeout: 260 seconds]
waleee-cl has joined #zig
osa1 has quit [Ping timeout: 272 seconds]
<ask6155>
what is the maximum number of elements an array can have?
<ikskuh>
std.math.maxInt(usize) in theory
<ikskuh>
in practise: depends on where the array is stored
<ask6155>
let's say I allocated a 1024^2 u8s on the heap I trying to realloc it by increasing that number but I get stuck at around (1024^2)*1000
<ikskuh>
huh
<ikskuh>
you should be able to alloc gigabytes
<ikskuh>
depending on how much memory you have avail
<ask6155>
does it matter which allocator I use?
<ikskuh>
yes
<ask6155>
I using c malloc
<ikskuh>
some allocatos (like FBA) will out of memory
<ikskuh>
huh
<ikskuh>
your still allocating megabytes of memory
marnix has quit [Ping timeout: 240 seconds]
<ikskuh>
what do you do exactly?
<ask6155>
I'm trying to make a ram eater
<ask6155>
lol
<ikskuh>
well
<ikskuh>
what for?
<ask6155>
well... uhhhh
<ikskuh>
and for which os?
<ask6155>
nothing
<ask6155>
linux
<ikskuh>
note: overcommitment is real
marnix has joined #zig
<ask6155>
I'm just messing around. I wanted to make a tamed memory eater which only eats how much I say it to eat
FireFox317 has joined #zig
<ask6155>
I get a segfault when I was a ~512M and I asked for more 50M
<ask6155>
I have 4GB
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
osa1 has joined #zig
marijnfs has quit [Quit: leaving]
ask6155 has left #zig ["Later!"]
decentpenguin has quit [Ping timeout: 256 seconds]
decentpenguin has joined #zig
donniewest has joined #zig
marnix has quit [Remote host closed the connection]
marnix has joined #zig
<fgenesis>
hm, tried to compile zig master but it fails at the cmake step, it's not finding llvm even though i just compiled it and llvm-config is on the PATH
<fgenesis>
aha, turns out i just need to set the include dirs for some reason
<fgenesis>
it's not picking up llvm-config --includedir for whatever reason
arqv has quit [Quit: WeeChat 2.9]
<fgenesis>
same for the libs. do i really need to config all of them manually? ugh
waleee-cl has quit [Quit: Connection closed for inactivity]
omglasers2 has joined #zig
<fgenesis>
oops, overlooked something. all good and builds now apparently
waleee-cl has joined #zig
juanfra__ has quit [Ping timeout: 240 seconds]
alva has quit [Ping timeout: 240 seconds]
waleee-cl has quit [Ping timeout: 240 seconds]
JimRM_ has joined #zig
gonz_ has quit [Ping timeout: 244 seconds]
JimRM has quit [Ping timeout: 244 seconds]
JimRM_ is now known as JimRM
gonz_ has joined #zig
layneson has joined #zig
alva has joined #zig
lqd has quit [Ping timeout: 244 seconds]
lqd has joined #zig
juanfra__ has joined #zig
waleee-cl has joined #zig
wjlroe has quit [*.net *.split]
Miaourt has quit [*.net *.split]
yrashk has quit [*.net *.split]
dch has quit [*.net *.split]
karrick has quit [*.net *.split]
guan has quit [*.net *.split]
dch has joined #zig
guan has joined #zig
Miaourt has joined #zig
karrick has joined #zig
yrashk has joined #zig
wjlroe has joined #zig
l1x has joined #zig
gonz_ has joined #zig
dch has joined #zig
guan has joined #zig
karrick has joined #zig
yrashk has joined #zig
ky0ko1 has joined #zig
dch has quit [Ping timeout: 244 seconds]
l1x has quit [Ping timeout: 246 seconds]
gonz_ has quit [Ping timeout: 244 seconds]
layneson has quit [Ping timeout: 240 seconds]
karrick has quit [Ping timeout: 244 seconds]
guan has quit [Ping timeout: 244 seconds]
yrashk has quit [Ping timeout: 244 seconds]
ky0ko1 has quit [Ping timeout: 244 seconds]
r0bby has joined #zig
r0bby has quit [Ping timeout: 244 seconds]
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
Akuli has joined #zig
squeek502 has quit [Ping timeout: 260 seconds]
casaca has quit [Ping timeout: 244 seconds]
casaca has joined #zig
marnix has quit [Ping timeout: 240 seconds]
marnix has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
wootehfoot has joined #zig
radgeRayden has quit [Remote host closed the connection]
<ikskuh>
it's a creative live-editing tool for multimedia effects
<codemessiah>
Oh that's cool
<codemessiah>
if you made that UI toolkit that uses Vulkan as the backend and made it a library it would be really useful
<ikskuh>
the ui toolkit is dear imgui
<ikskuh>
atm
<ikskuh>
but i'm not 100% sold
<codemessiah>
I used to want to make a video editing software with vulkan, got about 1000k lines of C++ Vulkan code done and it was a white window :)
<ikskuh>
heh
<ikskuh>
Snektron has a nice hello-vulkan sample with zig
nvmd has joined #zig
moinstar has joined #zig
layneson has joined #zig
BaroqueLarouche has joined #zig
<moinstar>
I am trying to build from the source. I was able to build the stage 1 with `-DZIG_WORKAROUND_POLLY_SO:STRING=/usr/lib/llvm-10/lib/LLVMPolly.so`. Now having difficulty building the stage 2. Getting `lld: error: undefined symbol: getPollyPluginInfo()`.
osa1_ has joined #zig
osa1 has quit [Ping timeout: 240 seconds]
<ikskuh>
FireFox317 is on a PR streak i see :D
<FireFox317>
ikskuh, getting that t-shirt right :P
<ikskuh>
heh
<ikskuh>
t-shirt progress tomorrow evening is 2/3 :D
<ikskuh>
wait, wrong shirt
<ikskuh>
current shirt is 3/4 :D
<ikskuh>
we need more "get shirts for doing community chores"-incentives
wootehfoot has joined #zig
nvmd has quit [Quit: Later nerds.]
codemessiah has left #zig [#zig]
bartwe_ has quit []
nvmd has joined #zig
<kristoff_it>
ikskuh, note taken :D
<ikskuh>
:D
riba has joined #zig
nvmd has quit [Quit: Later nerds.]
nvmd has joined #zig
Tallin has joined #zig
osa1_ has quit [Ping timeout: 256 seconds]
<cr1901_modern>
Uhh this might be a silly q, but how did zig get its own copy of ntdll.lib? http://ix.io/2zwz
<cr1901_modern>
(This is a linux cross compile to windows)
<ikskuh>
cr1901_modern: a lib file is mostly just a list of exported functions
<ikskuh>
Tallin: search in the stdlib, not google ;)
<Tallin>
:D
<nikki93>
when i build to wasm (maybe applies to any target) is there a way to get source-annotated assembly? so far i've just been 'disassembling' the output with wasm2wat. would be neat if it works with `--release-small` too
<Tallin>
Yeah Im still new and figuring out how to best research functions and how to use them
<nikki93>
(just for reading, not intending to feed that to any program after)
<ikskuh>
Tallin: use ZLS
jjsullivan has joined #zig
<fengb>
There was some discussion about standardizing sourcemaps in wasm. I don't remember what the status was
<Tallin>
cool so zls is like zig + some helpful functions and i can include it into vscode directly?
<ikskuh>
zls is your power IDE
<ikskuh>
go-to definition
<ikskuh>
code completion
<ikskuh>
...
marnix has quit [Ping timeout: 256 seconds]
<nikki93>
Tallin: it's a "language server" which then anything that is a "languageserver client" can talk to -- vscode is one of the editors that can host a languageserver client
marnix has joined #zig
factormystic4 has joined #zig
<Tallin>
i never heard of a language server (client) I only programmed in R and Python up til now and followed some c++ tutorials. thank you for the explanation
<nikki93>
i just cloned zls (make sure to clone recursive or submodule init recursive) and then ran `zig build`
<nikki93>
didn't do any config
<Tallin>
alright
<Nypsie[m]>
config can either be done manually in zls_config.json or by running `zig build config`
factormystic has quit [Ping timeout: 240 seconds]
factormystic4 is now known as factormystic
<Nypsie[m]>
Note that you can only run `zig build config` after running `zig build`
<nikki93>
the resulting zls executable will be in 'zig-cache/bin' under the repo directory
<nikki93>
that's what the vscode extn will have to know about
<cr1901_modern>
So if I understand correctly: zig never links against the system libc in the invocation "zig build-exe hello.zig"?
<cr1901_modern>
it compiles its own under .cache and uses that
<alexnask[m]>
Well, if you are not using libc and explicitly linking against it
<alexnask[m]>
Then it doesn't even need it (we don't even rely on CRT)
<Tallin>
> the resulting zls executable will be in 'zig-cache/bin' under the repo directorythat's what the vscode extn will have to know about
<Tallin>
Thanks that was critical information
<cr1901_modern>
>explicitly linking against it
<cr1901_modern>
I'm not linking against it... the lld invocation has a libc.a on it
<cr1901_modern>
err explicitly*
<cr1901_modern>
>we don't even rely on CRT <-- that was my follow-up q :P, so good to know
<nikki93>
Tallin: :)
riba has quit [Ping timeout: 256 seconds]
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
layneson has quit [Ping timeout: 258 seconds]
ikskuh has quit [Ping timeout: 240 seconds]
mq32 has joined #zig
layneson has joined #zig
mixi has quit [Quit: connection reset by purr]
mixi has joined #zig
wootehfoot has quit [Quit: Leaving]
layneson has quit [Ping timeout: 240 seconds]
Akuli_ has joined #zig
Akuli has quit [Disconnected by services]
Akuli_ is now known as Akuli
Amun_Ra has quit [Ping timeout: 256 seconds]
Amun_Ra has joined #zig
Akuli has quit [Quit: Leaving]
FireFox317 has quit [Ping timeout: 240 seconds]
kristoff_it has quit [Ping timeout: 246 seconds]
Tallin has quit [Ping timeout: 245 seconds]
donniewest has quit [Quit: WeeChat 2.9]
<nikki93>
any reason to prefer one of `buf[0..]` or `&buf` over the other when passing an array as an argument for a slice param?
<alexnask[m]>
Those are equivalent
<ifreund>
i prefer the latter because it's shorter
<nikki93>
wondering if there were any stylistic / legibility reasons too
<nikki93>
i see yeah. i was using `buf[0..]` and only then discovered `&buf`
<alexnask[m]>
I also personally preferr &buf
xd1le has quit [Remote host closed the connection]
<nikki93>
does `buf[0..]` make it clearer that the function accepts a slice param, vs. with `&buf` it could be either a slice or a 'pointer to array' or sth
<ifreund>
does it matter? if you want to know details you look at the function signature
<alexnask[m]>
buf[0..] will also return a pointer to an array
<ifreund>
zls makes that easy :)
<nikki93>
:)
<nikki93>
probs gonna start using `&buf`
<alexnask[m]>
buf[a..(b?)] will return a pointer-to-array when a and b are comptime known
<alexnask[m]>
So the semantics will always be the same, use the one you like the look of better ;)
<nikki93>
cool :)
marnix has quit [Ping timeout: 240 seconds]
nycex has quit [Remote host closed the connection]
nycex has joined #zig
delaney has joined #zig
<delaney>
fengb, I was asking about vscode/Mac last night on your stream but had to leave. Does zig's clang/wasm toolchain generate soutcemaps and stack debugging in was on the browser? I have a project where wasm makes a lot of sense but not sure about the current state vs something like assemblyscript or C with emscripten
moinstar has quit [Remote host closed the connection]
delaney has quit [Read error: Connection reset by peer]