ChanServ changed the topic of #zig to: zig programming language | ziglang.org | be excellent to each other | channel logs: https://irclog.whitequark.org/zig/
redj has quit [Ping timeout: 256 seconds]
redj has joined #zig
scientes_ has joined #zig
scientes_ has quit [Ping timeout: 263 seconds]
wilsonk has joined #zig
<wilsonk>
anyone around?
<andrewrk>
wilsonk, hi
<wilsonk>
zig build --build-file ../build.zig test is giving me a segfault on Ubuntu 16.04 and I am not sure why?
<wilsonk>
bt: Program received signal SIGSEGV, Segmentation fault. 0x0000000000f91236 in llvm::DenseMapInfo<unsigned int>::isEqual (LHS=@0x5: <error reading variable>, RHS=@0x7fffffffcc60: 4294967295) at /usr/lib/llvm-5.0/include/llvm/ADT/DenseMapInfo.h:88 88 return LHS == RHS;
<wilsonk>
I could pastebin the full output if that would help
<andrewrk>
that would help
<wilsonk>
ok, one second
<andrewrk>
this is trying to test the zig compiler?
<wilsonk>
just following the build instructions for posix
<wilsonk>
so: zig build --build-file ../build.zig test
<andrewrk>
hmm that's really strange. my best guess is that ubuntu has patched LLVM headers in an ABI-incompatible way
<wilsonk>
hmm
<andrewrk>
wilsonk, would you be willing to try these packages instead of the system ones? http://apt.llvm.org/
<wilsonk>
I posted an issue ten minutes ago that might be relevant, I suppose
<andrewrk>
ah I see it
arBmind has joined #zig
<wilsonk>
wow, that is the first time I have screwed a linux system into the ground in a while!! :( I just accidently changed all the ownership permissions of my /bin and /etc directories to my user instead of root!! This could take a while to fix, since I can't sudo now (and can't get root)!!! FAAAKKK
<wilsonk>
I will have to reboot and probably won't be back for a bit andrewrk...I will check back in as soon as I can :(
wilsonk has quit [Quit: Page closed]
<andrewrk>
and that is why I recommend -DCMAKE_INSTALL_PREFIX=$HOME/local
<GitHub0>
zig/master 2c25c8a Andrew Kelley: docs: remove references to %% prefix operator...
<wilsonk>
Ok, I see what I did. I typed 'sudo make install' to install zig instead of just 'make install'...that is part of what confused me. Ok, now I have installed the clang version you recommended and things built without a problem but I am getting a new error when trying to run the tests. I will post it to the github issue
<andrewrk>
ok
<andrewrk>
wilsonk, good night. I'll be around tomorrow
<andrewrk>
looks like you got to an exciting checkpoint in pokemon randomizer
<andrewrk>
my girlfriend is into pokemon; I'm excited to show her a demo of your project when it's ready :)
<Hejsil>
Nice :)
<Hejsil>
If she likes randomized Pokemon roms, the Universal Randomizer exists though
<andrewrk>
ahh
<andrewrk>
what does your project plan to do differently?
<Hejsil>
But the project seem to be dead now, soo~
<andrewrk>
I see
<Hejsil>
Well, I want to implement some "game modes"
<Hejsil>
I have ideas
<Hejsil>
But first, I wonna get the "fundamentals" done
<Hejsil>
Randomizing trainers and wild mons
<andrewrk>
cool
<Hejsil>
Btw, you might want to find a way to test expressions in the docs. As far as I know, the example in the operator table under catch is wrong :)
<Hejsil>
const value: %u32 = null;
<andrewrk>
ahh, thanks. I was thinking about that
<Hejsil>
but nice work on the doc testing
<Hejsil>
That'll help it stay up to date
<andrewrk>
that was so much work. I am exhausted
<Hejsil>
lol
<andrewrk>
and now I need to implement std.os code for directory listing for MacOS and Windows
<Hejsil>
So you're gonna sit with 3 computers again?
<Hejsil>
Or, i guess 2
<andrewrk>
yes
<Hejsil>
ooh boy
<andrewrk>
3 because I have to run the tests on linux to make sure I didn't regress :)
<alexm_>
hey guys can you define a function like this in zig "fn map2 (n : usize,items : [n]u8)->[n]u8" ?
<andrewrk>
alexm_, yes, where `n` is a compile-time known value
arBmind has quit [Quit: Leaving.]
<andrewrk>
what is the function supposed to do?
<alexm_>
im basically trying to write a function where you pass an array and a function and it applies the function to each element and returns a new array
<andrewrk>
alexm_, of the same size?
<alexm_>
yeah
<andrewrk>
a new array, so you want the new one to be allocated on the heap?
<alexm_>
yep
<alexm_>
so applying fn(x:i32) -> i32{return x+1} to [1,2,3] will result in [2,3,4]
<andrewrk>
I can work on a std lib heap allocator soon
<andrewrk>
err, I mean a general purpose allocator
<Hejsil>
Well, I guess I could allocate 500mb like that lol
<Hejsil>
It's for the randomizer btw
<andrewrk>
yeah
<andrewrk>
it looks like llvm 6 will release on time, which is scheduled for feb 21
<Hejsil>
Anyways. It was mostly to test my implementation of seekTo and getPos on windows in the std
<Hejsil>
Because the randomizer uses those alot
<andrewrk>
ahh
<Hejsil>
Oooh, well. Did test it in some smaller code, and it seems to work. I'll probably just make a PR now
<andrewrk>
:D
<Hejsil>
:)
<Hejsil>
Idk, if I handle all windows errors correctly. Couldn't find a source for what kind of errors you get from GetLastError after calling different functions
<Hejsil>
Aka, errors from SetFilePointerEx
<andrewrk>
I couldn't find that either for a lot of stuff, which is why I made that unexpectedErrorWindows function
<Hejsil>
Ye, I just ended up using that too
<andrewrk>
we almost can get rid of the dumpStackTrace part of it, since we have error return tracing
<andrewrk>
...if we knew how to parse debug symbols on windows
<Hejsil>
The struggle
<Hejsil>
PR for you
<GitHub181>
[zig] Hejsil opened pull request #710: Implemented windows versions of seekTo and getPos (master...seekto-getpos-windows) https://git.io/vNzfE