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/
<andrewrk> emekankurumeh[m], let me go check
<andrewrk> confirmed... that's why we have https://github.com/ziglang/zig/issues/1968 open to add tests. I'll see if it's a quick fix
scientes has joined #zig
scientes has quit [Remote host closed the connection]
<andrewrk> emekankurumeh[m], fix pushed to master. thanks for the heads up
kristate has joined #zig
kristate has quit [Ping timeout: 264 seconds]
kristate has joined #zig
wootehfoot has quit [Read error: Connection reset by peer]
kristate has quit [Remote host closed the connection]
kristate has joined #zig
scientes has joined #zig
knebulae has quit [Read error: Connection reset by peer]
<strmpnk> I've got a question regarding the `args: ...` syntax. I've been translating some of my project euler solutions I've done in other languages into Zig. Here is problem 5: https://gist.github.com/strmpnk/2cfa386fe2e12efdba0e1cef5515aa87
<strmpnk> My first pass made the mistake for making map on line 63 comptime. It runs but fails in this case as an empty slice.
<strmpnk> Is there a caveat to how this is evaluated during compilation? It seems that comptime would be redundant here.
<strmpnk> The other question was around conventions for local vars with initial values from the arguments like on line 42 + 43. I know the reason these are unassignable is for the pass-by-maybe-reference-or-value for non-integer types but it seems a bit awkward to me still (reminds me of my days writing lots of Erlang code actually).
scientes has quit [Remote host closed the connection]
_whitelogger has joined #zig
<tgschultz> strmpnk, actually I think the reason it is unassignable is because arguments are always immutable. In the case of `fn(thing: *ThingStruct)` the pointer is immutable while the thing it points to is not.
<strmpnk> Yes, but the reasoning for the immutability is given in the docs. https://ziglang.org/documentation/master/#Pass-by-value-Parameters
<strmpnk> There are possibly other reasons I can imagine for this as well. constness is a good default in general.
<strmpnk> I'll have to dive into the compiler at some point to see how this is leveraged.
reductum has joined #zig
kristate has quit [Remote host closed the connection]
reductum has quit [Quit: WeeChat 2.4]
kristate has joined #zig
kristate has quit [Ping timeout: 250 seconds]
Zaab1t has joined #zig
Zaab1t has quit [Client Quit]
barua has joined #zig
barua has quit [Ping timeout: 255 seconds]
Ichorio has joined #zig
kristate has joined #zig
scientes has joined #zig
SimonNa has joined #zig
schme245 has joined #zig
schme245 has quit [Remote host closed the connection]
scientes has quit [Ping timeout: 250 seconds]
klltkr has joined #zig
develonepi3 has quit [Remote host closed the connection]
Zaab1t has joined #zig
Akuli has joined #zig
scientes has joined #zig
develonepi3 has joined #zig
Zaab1t has quit [Quit: bye bye friends]
<develonepi3> hello: has anyone built zig on Raspberry Pi 3B with RaspBian. I tried to install version 0.3.0 from zig-0.3.0+98869edb.tar.xz. First unable to find llvm-config. I did sudo apt-get install llvm-dev. New error expected LLVM 7.x but found 3.8.1
<Akuli> develonepi3, i had a similar problem on another debian fork
<Akuli> you need to install llvm 7 from their ppa
<andrewrk> develonepi3, why not use the binary build from https://ziglang.org/download/ ?
<andrewrk> oh, rpi is aarch64 isn't it?
<andrewrk> I should know :)
Ichorio has quit [Ping timeout: 255 seconds]
<andrewrk> develonepi3, just a heads up, linux-aarch64 is a "Tier 2" supported target, which you can read about here: https://github.com/ziglang/zig/#tier-2-support
<andrewrk> (we want to get to tier 1 for that target but it will take some more effort to accomplish)
<develonepi3> RaspBian that I am running is 32 bit not 64 bit
<develonepi3> All I am wanting to run this on Ultibo bare metal which I believe is also 32 bit.
<andrewrk> develonepi3, if you have trouble building zig from source on raspbian, you can cross compile for your target
<develonepi3> andrewrk: Are most folks using Windows or Linux x86_64?
<andrewrk> develonepi3, yes I believe so
<scientes> develonepi3, true bare metal is quite well supported (as much as llvm supports it)
<scientes> although not as tested
<andrewrk> linux, windows, macos - x86_64 - these are the current Tier 1 (well tested, well supported) targets
<scientes> I did the initial arm64 porting work, but i just broke my arm64 laptop by dropping water on it
<scientes> so i am back on x86_64
<andrewrk> I did not know that happened, bummer
<develonepi3> andrewrk: When is tier 1 expected? I am also working on a FPGA doing lifting step for jpeg 2000 which I hope to merge with Ultibo.
<andrewrk> develonepi3, for arm32-linux ?
<andrewrk> that's hard to predict. I don't personally have any use for that target, and it's pretty low on my priority list compared to language stuff. So I think the timing of it will highly depend on contributions from others
<andrewrk> for tier 1 we would need Continuous Integration testing for the target and I'm not even aware of any services that provide testing for arm32 linux
<develonepi3> andrewrk, I have openjpeg working in Ultibo bare metal. I have 10 project that I just tftp a kernel7.img (RPi2) or kernel.img (RPi zero) and Pis reboot. I can download a bitstream to the FPGA and over 8 bit parallel port get the Gettyburg address see https://github.com/develone/Ultibo_Projects/blob/master/fpganet/sp.png & https://github.com/develone/Ultibo_Projects/blob/master/fpganet/sd.png https://github.com/develone/Ultibo_Projects/blob/master/j
<develonepi3> peg2000/RPi2/1024.png
<andrewrk> develonepi3, neat!
<andrewrk> develonepi3, I'm also working on a rpi3 bare metal project: https://github.com/andrewrk/clashos
<andrewrk> this one is aarch64. I cross compile to deploy
<develonepi3> andrewrk, The fpga work is using yosys tools all done on a RPi3B. https://github.com/develone/catzip see README.md
a_chou has joined #zig
a_chou has quit [Remote host closed the connection]
a_chou has joined #zig
<develonepi3> andrewrk, Did you see https://github.com/markfirmware/API.git
a_chou has quit [Client Quit]
a_chou has joined #zig
a_chou has quit [Client Quit]
<develonepi3> andrewrk, He posted asking if anyone was interested. https://www.reddit.com/r/Zig/comments/arynkj/zig_linked_with_ultibo_pascal_unikernel_for/
a_chou has joined #zig
scientes has quit [Ping timeout: 246 seconds]
schme245 has joined #zig
<andrewrk> develonepi3, yes I saw that
<andrewrk> I actually thought you were markfirmware at first
a_chou has quit [Ping timeout: 258 seconds]
wootehfoot has joined #zig
a_chou has joined #zig
a_chou has quit [Quit: a_chou]
<develonepi3> andrewrk, No Mark and I started working on Ultibo about the same time. I use RaspBian and he is mostly Windows.
<develonepi3> andrewrk, I believe most is done in Ultibo less Wi-FI. Networking, serial, spi, gpio, USB and VC4 appear to be working okay.
schme245 has quit [Remote host closed the connection]
schme245 has joined #zig
bheads has quit [Ping timeout: 244 seconds]
darithorn has joined #zig
<develonepi3> andrewrk, If I get zig to build on ubuntu 16.04 will it zig then work on bare metal? I just got an executable zig on my ubuntu 16.04 system.
<andrewrk> develonepi3, you can use your zig on ubuntu 16.04 to create bare metal executables which you can then upload to your device and run
wootehfoot has quit [Read error: Connection reset by peer]
Akuli has quit [Quit: Leaving]
scientes has joined #zig
<develonepi3> ardrewrk, ./zig build-obj -isystem ../../API/include/ultibo/ -isystem /usr/lib/arm-none-eabi --target-arch armv7 --target-os freestanding --target-environ gnueabihf ../../API/samples/zigtest/zigmain.zig I am getting an error Unable to find zig lib directory Any idea?
darithorn has quit [Ping timeout: 246 seconds]
<andrewrk> develonepi3, looks like you built from source. did you remember to `make install` ?
<develonepi3> yes it installed in ~/testbuilds/ultibozig/zig-0.3.0+98869edb/build/bin & ~/testbuilds/ultibozig/zig-0.3.0+98869edb/build/lib
<andrewrk> I'm confused by this path name. are you just trying to have a working zig compiler? why not use the binary download?
<develonepi3> When I did the install in the build folder it created a bin & lib folders.
schme245 has quit [Remote host closed the connection]
mouldysammich has joined #zig
<develonepi3> andrewrk when you zig build xx.zig do you get a build.zip file? I tried several in the test folder and it just kept adding to build.zip
<develonepi3> ls
<develonepi3> I must have used zip instead of zig sorry