<ntgg>
i'm getting an issue with `std.SegmentedList`, saying that in std/segmented_list.zig:160:59 it expected type u6, found usize
<ntgg>
also the assertion at std/segmented_list.zig:82 fails
<ntgg>
i'm trying to use std.parse
<daurnimator>
emekankurumeh[m]: something I'm not sure I mentioned. the "command buffer" style of things lets us automatically do things like TCP Fast Open. I just re-came across https://gist.github.com/daurnimator/3f2cfef6f4101e432313 which is back from when I was thinking about this stuff
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
ntgg has quit [Ping timeout: 258 seconds]
ntgg has joined #zig
darithorn has quit [Quit: Leaving]
Ichorio_ has quit [Ping timeout: 264 seconds]
kristoff_it has joined #zig
jethron has joined #zig
kristoff_it has quit [Ping timeout: 248 seconds]
StateOff has joined #zig
jethron has quit [Remote host closed the connection]
knebulae has quit [Read error: Connection reset by peer]
<ntgg>
is there a way to convert a f64 into a []const u8?
ntgg has quit [Ping timeout: 246 seconds]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 246 seconds]
squiddlebit has joined #zig
laaron has quit [Remote host closed the connection]
laaron has joined #zig
StateOff has quit [Quit: Leaving]
<daurnimator>
niftynei: std.mem.asBytes ?
Summertime has quit [Quit: Sunsetting.]
<daurnimator>
ntgg ^^
Summertime has joined #zig
<daurnimator>
:( that feeling when you read C++ after staring at Zig
<daurnimator>
(and worse.... an academic's C++ code)
<daurnimator>
with preprocessor tricks
<daurnimator>
and lots of operator overloading
<daurnimator>
and templates
<daurnimator>
:(
<daurnimator>
`zig translate-c++` when? :P
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 258 seconds]
tgschultz has quit [Ping timeout: 258 seconds]
tgschultz has joined #zig
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 268 seconds]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
kristoff_it has joined #zig
<gonz_>
I think you laid out the time frame perfectly in the lines preceding that one :D
<emekankurumeh[m]>
fubd: I thought that was fixed in af86614
<fubd>
emekankurumeh[m]: ah, you're right, thanks for the reminder
fubd has quit [Remote host closed the connection]
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
_whitelogger has joined #zig
ntgg has joined #zig
MajorLag has joined #zig
tgschultz has quit [Ping timeout: 244 seconds]
MajorLag is now known as tgschultz
<ntgg>
I have a function that returns `[]const u8` and in some branches of the switch it returns [_]u8 and in others it returns []u8, how do I get this to work?
<hryx>
ntgg: see the description for a workaround. you can explicitly slice the array. But note that if you return a slice from your function, be careful that it doesn't point to a stale stack address
Ichorio has joined #zig
<ntgg>
hryx: Thanks, the workaround works for what I am doing
<scientes>
also, I have had plenty of times where the cache just doesn't work
<scientes>
and i have to manually clear it
<scientes>
when the compiler changes
<scientes>
oh nvm
<hryx>
scientes: andrew has mentioned a few times that there are no known bugs with the cache and clearing it is never a solution to recommend. def open an issue if you find problems with the cache
<scientes>
well there is a real one i noticed
<scientes>
which is that zig0 tries and fails to use the cache
<scientes>
because it is written in zig
<hryx>
did an issue get opened?
<hryx>
(mainly my point was we shouldn't recommend clearing cache in any scenario)
<Tetralux>
I had to delete it the other day because it was taking up 127MB...
<Tetralux>
My setup for that is a little non-standard though.
<hryx>
that doesn't seem very big to me
<hryx>
I see
<Tetralux>
It is when you're in Dropbox and only have <100MB left in it :3
<scientes>
just use git
<hryx>
wait.... you're syncing a zig project directory in dropbox?
<scientes>
git is alot more friendly than those type of things
<Tetralux>
It's less of a project, and more of where I keep my Zig programs that I'm fiddling with.
<Tetralux>
Often single files I run.
<Tetralux>
As for git, that feel a little too heavyweight for this.
<Tetralux>
Managing git commits for that seems too much work.
<Tetralux>
Besides which, I don't have private repos.
<Tetralux>
If I did, then maybe I'd consider it.
<Tetralux>
Though, the auto-sync ability of Dropbox would be hard to lose.
<Tetralux>
I like how I can just install it on a newly formatted computer and just have everything there.
ntgg has quit [Ping timeout: 245 seconds]
<Tetralux>
I just wish there was a Google Drive client that was multiplatform, supported by Google, stored everything encrypted, and _just worked_, like DB does.
<Tetralux>
Unless there is and I'm not aware of it.
<Tetralux>
Only you have three times the space on that.
<scientes>
that's why I refuse to have two laptops at the same time
<scientes>
its to much work
<scientes>
or a desktop+laptop
<Tetralux>
If Google Drive had a decent client that just worked, I'd probably use it to keep all my projects.
<Tetralux>
Sadly, that's only true on Windows.
<Tetralux>
If even that.
<Tetralux>
I haven't used it in a little while.
<scientes>
just use a USB ssd
<scientes>
simple
<scientes>
easy
<scientes>
much faster
<Tetralux>
The cloud has redundancy that I don't have to think about xD
<scientes>
that's why important stuff goes into git
<Tetralux>
Beside which
<Tetralux>
I can sync across multiple systems simulataenously.
<Tetralux>
Can't do that with a usb without farting with networking stuff.
<scientes>
just ssh
<scientes>
i use sftp all the time
<Tetralux>
There's an auto-sync client that uses sftp?
<Tetralux>
And a server that works on Windows.)
<gonz_>
Tetralux: Why not just pay for Dropbox, then? You get an insane amount of space.
<gonz_>
Or do you pay and still manage to use all of it?
<Tetralux>
*smiles* So far I haven't needed to pay for it.
<Tetralux>
At some point I might though.
<Tetralux>
But if I can get by without it - /shrug.
<Tetralux>
Besides which, if there's a way to trivially set up sftp on windows and just have it work as well.
<Tetralux>
That's better for me.
<Tetralux>
I could even write a server in Zig ;)
<Tetralux>
My impression is that FTP isn't that complicated.
<Tetralux>
Maybe I'm wrong about though.
<scientes>
sftp is not the same thing
<Tetralux>
I know.
<Tetralux>
There's obv encryption involved and stuff.
<scientes>
I find windows a waste of time in every way
<Tetralux>
I'm only on Windows because I play games at 165 Hz.
<Tetralux>
Linux can't do that without massive input lag yet.
<Tetralux>
I tried it.
<Tetralux>
And it's a pain to actually make it all work reliably.
<Tetralux>
Wine's making progress though.
<Tetralux>
So one day.
<Tetralux>
Not only with input lag
<Tetralux>
But when you fullscreen, it doesn't "activate" the refresh rate.
<Tetralux>
In the same way that Windows doesn't if you're in windowed mode.
<Tetralux>
It's like it's borderless.
<Tetralux>
That won't wash with me.
<Tetralux>
If all the software I ever need to use works flawlessly with Wine.
<Tetralux>
And games run at 165 Hz just fine.
<Tetralux>
Then I may switch.
<Tetralux>
I actually have PopOs dual-booted rn.
<Tetralux>
That's how I tested what I just said xD
<Sahnvour>
Tetralux: for your files on dropbox, can't you juste use zig with --cache-dir set to something else ?
kristoff_it has joined #zig
kristoff_it has quit [Ping timeout: 245 seconds]
<Tetralux>
I could... but then I'd have to pass that for every invocation of every compilation.
<Tetralux>
And then if I forget even once, I have to rm it. xD
<Tetralux>
I could make a batch script or something.. but no cross platform and just... ugh.
<gonz_>
So a `ZIG_CACHE_DIRECTORY` env var it is, then
<gonz_>
If you rely so heavily on Dropbox I still think buying it is the most convenient solution
<gonz_>
You get 2TB
<dec05eba>
i use linux with a 60hz 4k monitor and 144hz monitor and it's fine, however on windows i get screen tearing that i cant fix in any way
<Sahnvour>
an alias might do the trick
<dec05eba>
never would i have though screen tearing would be an issue on windows but not on linux
<Tetralux>
dec05eba: Likewise... That sounds... odd.
tgschultz has quit [Ping timeout: 246 seconds]
tgschultz has joined #zig
kristoff_it has joined #zig
tgschultz has quit [Ping timeout: 245 seconds]
kristoff_it has quit [Ping timeout: 244 seconds]
tgschultz has joined #zig
slice has quit [Ping timeout: 250 seconds]
Pho75 has joined #zig
slice has joined #zig
<Pho75>
hi all. I'm trying to build zig compiler from github on ubuntu but build is failing. cmake is defaulting to llvm-8, is that too new? If so how to I get cmake to use llvm-4? thanks
<Tetralux>
You need 8.
<Pho75>
so it's just an upstream bug that's causing this build error?
<Pho75>
/usr/lib/llvm-8/include/llvm/ADT/ArrayRef.h:102:37: error: initializing ‘llvm::ArrayRef<long unsigned int>::Data’ from ‘std::initializer_list<long unsigned int>::begin’ does not extend the lifetime of the underlying array [-Werror=init-list-lifetime]
bkleiner has joined #zig
darithorn has joined #zig
tgschultz has quit [Ping timeout: 245 seconds]
<Tetralux>
You have clang right?
<Pho75>
yes i do
tgschultz has joined #zig
Pho75 has quit [Ping timeout: 245 seconds]
Akuli has joined #zig
<mikdusan>
fyi: Pho75 expierienced an error message I have observed with gcc >= 9.1.0
<scientes>
const v: u32 = 5;
<scientes>
const x = @splat(4, v);
<scientes>
who do i have to do to get the type of v populated in stage1?
<scientes>
its null
<scientes>
when it is clearly there
<mmx870>
><daurnimator> Is there a way to test on arm64 without a physical device?
<mmx870>
Qemu?
<scientes>
daurnimator, scaleway
<scientes>
you can get a arm64 VPS for 3eu/mo
<scientes>
just be aware those are 64-bit only
<scientes>
can can't run 32-bit code
marijnfs_ has joined #zig
marijnfs_ has quit [Client Quit]
marijnfs_ has joined #zig
ntgg has joined #zig
kristoff_it has joined #zig
dec05eba has quit [Quit: Lost terminal]
fsateler has quit [Ping timeout: 245 seconds]
Poetastrophe has joined #zig
fsateler has joined #zig
marijnfs_ has quit [Ping timeout: 250 seconds]
marijnfs_ has joined #zig
wootehfoot has quit [Read error: Connection reset by peer]
occivink has quit [Quit: WeeChat 2.4]
ntgg has quit [Ping timeout: 272 seconds]
occivink has joined #zig
Akuli has quit [Quit: Leaving]
dec05eba has joined #zig
<Poetastrophe>
Hello guys I am just getting into Zig and I need to build LLVM from source. I followed the instructions on the Zig wiki, under POSIX:https://github.com/ziglang/zig/wiki/How-to-build-LLVM%2C-libclang%2C-and-liblld-from-sourceWhere I try to compile llvm-8.0.0.srcBut all I am getting is that the cmake cannot find LLVMs headers:$ make installfatal erro
<Poetastrophe>
r: llvm/Demangle/Demangle.h: No such file or directory #include "llvm/Demangle/Demangle.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~compilation terminated.make[2]: *** [lib/Demangle/CM
<Poetastrophe>
akeFiles/LLVMDemangle.dir/build.make:63: lib/Demangle/CMakeFiles/LLVMDemangle.dir/ItaniumDemangle.cpp.o] Error 1make[1]: *** [CMakeFiles/Makefile2:876: lib/Demangle/CMakeFiles/LLVMDemangle.dir/all] Error 2make: *** [Makefile:152: all] Error 2Can anyone help me out?
<dec05eba>
any reason you are building zig from source rather than using the release binary on zig website?
<Poetastrophe>
Mostly if I want to experiment a bit with the Zig source and libraries
Tetralux has quit [Read error: Connection reset by peer]
dec05eba has quit [Quit: Lost terminal]
Tetralux has joined #zig
Tetralux has quit [Read error: Connection reset by peer]
Tetralux has joined #zig
Poetastrophe has left #zig [#zig]
<darithorn>
Poetastrophe if you mean the standard library the zig compiler uses the source directly, so you can edit it and use the changes immediately
Poetastrophe has joined #zig
marijnfs_ has quit [Ping timeout: 264 seconds]
<andrewrk>
Poetastrophe, please double check that you followed the directions, they do work
<emekankurumeh[m]>
does zig compile all files into a single object?
<hryx>
ok, why don't I take a look at #2749 first then
<andrewrk>
hryx, it's a tricky issue, it will be difficult (but it must be done)
<andrewrk>
emekankurumeh[m], yes, stage1 does that
<hryx>
roger that. I poked at the result location concept in ir.cpp briefly and will most certainly have a few questions along the way
<andrewrk>
zig provides no guarantees about what files go in what objects. self-hosted takes advantage of this to do incremental builds
<andrewrk>
hryx, there will almost certainly be some bugs to fix with regards to result location stuff along the way
<andrewrk>
godspeed
<emekankurumeh[m]>
is parallel compilation a goal for zig?
<andrewrk>
yes emekankurumeh[m]
<hryx>
(**)7
<andrewrk>
for debug builds. for release builds, not necessarily. deterministic builds is a higher priority
<andrewrk>
deterministic/reproducible
<andrewrk>
I don't think stage1 should ever deal with threads
<andrewrk>
just keep it simple and debuggable so we can get to self-hosted
<scientes>
yes
<Sahnvour>
this reminds me we did not make this issue about reproducible builds andrewrk (or I missed it)
<scientes>
but build.zig might use threads
<andrewrk>
yeah once we have better event-based support (async/await) then the child process API can be greatly improved
<emekankurumeh[m]>
oh yeah when I was writing a simple threadpool in zig I was getting some weird errors from zig
<scientes>
anyone know an editor that can match Makefile endif and else statements?
mipri has quit [Quit: Lost terminal]
andrewrk has quit [Ping timeout: 268 seconds]
<emekankurumeh[m]>
is the new `@Frame` stuff going to be generic like `promise`?
wootehfoot has joined #zig
andrewrk has joined #zig
Ichorio has quit [Ping timeout: 264 seconds]
allan0 has quit [Ping timeout: 258 seconds]
donpdonp has quit [Quit: WeeChat 2.4]
donpdonp has joined #zig
wootehfoot has quit [Read error: Connection reset by peer]
ltriant has joined #zig
Poetastrophe has quit [Ping timeout: 260 seconds]
kristoff_it has quit [Ping timeout: 246 seconds]
<daurnimator>
emekankurumeh[m]: what do you mean by "generic"?
<daurnimator>
andrewrk: also, DESTDIR gets prefixed onto the install prefix
kristoff_it has joined #zig
<daurnimator>
--> 'prefix' is where the built files should assume any hard coded paths start from (e.g. /usr vs /usr/local vs /opt/myprog). 'DESTDIR' is where the destination rootfs is mounted.