<nikki93>
is there any way to initialize a big text array with a shorter string? it's ok if the rest is zero-initialized or uninitialized, fine either way. `var text: [256]u8 = "hello, world!";` complains
<nikki93>
i just want to have some space to hold user-entered text that defaults to some initial value
<nikki93>
would i have to just keep it uninitialized then fill it with the initial value in some init code?
<ifreund>
var text = "hello".* ++ [_]u8{undefined} ** (256 - "hello".len);
<ifreund>
or something like that
<ifreund>
it's comptime, you can do what you want
nvmd has quit [Quit: Later nerds.]
earnestly has quit [Ping timeout: 260 seconds]
klltkr has quit [Ping timeout: 260 seconds]
<nikki93>
digging how the 'metaprogramming' in zig involve writing normal forward logic among typeinfo enums and whatnot vs. weird pattern matches
<nikki93>
(like; it'll be cool to pattern match on the enums, but i like that it'll be pattern matching in value-space among type info, vs. pattern matching in the type space of teh language or w/e like most generics/templates stuff out there)
<fengb>
I don’t think LLVM generates source maps yet
<ifreund>
metaprogramming in zig is a breath of fresh air
<ifreund>
no need to learn another sub-language, it's all just normal zi
<fengb>
Hmm I do remember something about enabling DWARF for wasm though
<ifreund>
ah yes, I seem to remember this post. it's a mess
nycex has quit [Ping timeout: 240 seconds]
a_chou has quit [Quit: a_chou]
nycex has joined #zig
osa1 has joined #zig
traviss has joined #zig
nycex has quit [Remote host closed the connection]
nycex has joined #zig
moinstar has joined #zig
cole-h has joined #zig
waleee-cl has quit [Quit: Connection closed for inactivity]
moinstar has quit [Remote host closed the connection]
marnix has joined #zig
moinstar has joined #zig
traviss has quit [Remote host closed the connection]
moinstar has quit [Remote host closed the connection]
moinstar has joined #zig
moinstar has quit [Remote host closed the connection]
moinstar has joined #zig
<moinstar>
any documentation on how packages work in zig .. best practices and guidelines on creating and using them
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
<daurnimator>
moinstar: nope; essentially right now all you have is passing --pkg-begin flag to `build-exe` where you alias a package name to a local path
<daurnimator>
moinstar: many people are using git submodules as a stop-gap to facilitate that.
<moinstar>
daurnimator, thank you
nycex has quit [Ping timeout: 240 seconds]
<gonz_>
Well, you have `std.build.Pkg`, no? Together with `exe.addPackage(Pkg{...})`
<gonz_>
Before that you had `exe.addPackagePath(...)`
<gonz_>
No need to fiddle with command line BS if you have a package depending on some code in a directory.
nickster has quit [Remote host closed the connection]
procnto has quit [Ping timeout: 272 seconds]
dch has joined #zig
nickster has joined #zig
procnto has joined #zig
guan has quit [Ping timeout: 272 seconds]
guan has joined #zig
kristoff_it has joined #zig
Sahnvour has joined #zig
Sahnvour has quit [Client Quit]
Sahnvour has joined #zig
earnestly has quit [Ping timeout: 260 seconds]
earnestly has joined #zig
marnix has quit [Read error: Connection reset by peer]
marnix has joined #zig
<fgenesis>
bah. after hackfixing all those weird usize != u64 compile errors, the rpi goes out of ram, swap, and will to live when building zig1.o. guess i'll wait until RAM usage gets fixed
<fgenesis>
why's this just one giant blob .o though
<fgenesis>
it kinda sucks hard to require a 64bit system just to link that one thing
<mq32>
because zig is creating a single compile unit
<fgenesis>
then that is kinda dumb
<mq32>
it's only for now until stage2 is ready
<scientes>
well when you switch to multiple compile units you end up with all the LTO issues that C has
<fgenesis>
given the choice between actually compiling something and having everything fail? not a hard choice to make really
<fgenesis>
that said i do appreciate working with a 486 machine with 8 MB ram every now and then. really gives a perspective and a sense of scale :D
<mq32>
stage3 will probably work fine on this machine ;)
osa1 has quit [Remote host closed the connection]
waleee-cl has joined #zig
_whitelogger has joined #zig
jj__ has joined #zig
jasom has quit [Ping timeout: 260 seconds]
jjsullivan1 has quit [Ping timeout: 260 seconds]
jasom has joined #zig
<earnestly>
scientes: (To be fair, there are no LTO issues with C if you don't use LTO)
<scientes>
earnestly, zig claims that "what other's call LTO we do automatically"
<earnestly>
Yes, that I think is the problem
<earnestly>
In this particular case
<earnestly>
LTO appears to be a memory intensive feature so zig must surely recognise the tradeoff, unless it can do it without as much memory usage as C, I don't know
<ifreund>
I think the main issue is that the architecture of the stage1 compiler is just very inefficient
<Sahnvour>
LTO is expensive because it tries to do optimizations that would be much easier done at compile time if the code wasn't split into multiple translation units (ie object files)
JimRM has quit [Ping timeout: 272 seconds]
betawaffle has quit [Ping timeout: 272 seconds]
JimRM has joined #zig
tracernz has quit [Ping timeout: 272 seconds]
betawaffle has joined #zig
tracernz has joined #zig
<Piraty>
jjsullivan: the current zig template builds stage1, is that right or not?
<Piraty>
so what you really want to do (I guess) is: do it like the go bootstrap chain, i.e. rename the current template to sth like zig-bootstrap and build the real thing with that in hostmakedepends
<Piraty>
also, some folks told me stage2 is not usable as of 0.6, so why bother
<marler8997>
having runtime loader problems with the latest zig compiler on NixOS...anyone else see something similar?
<marler8997>
I'm linking to openssl (libcrypto.so.1.1 and libssl.so.1.1), it looks like I'm missing a "runpath" in my executable with the latest compiler
<marler8997>
Compiler from September 28 (0.6.0+e60939bfa) works