The time has come. I've been putting off going this low level for too long.
I plan to to the first part in #Swift instead of Java, and the second in #Zig instead of C.
But it's yet another side project I start, so who knows how long it'll take me to finish it 😆
I'd say reading "Game Programming Patterns" was a pivotal point in my career, so I have high expectations for this one.
2 days ago out of boredom i went back to recording the number of issues of #zig, #rust, #go, #crystal and #nim each day.
changes i noticed since i stopped recording months ago:
* go has broken 8000 😭
* crystal has gone up a couple hundred, but is still the lowest
* nim is about the same as it was, if anything a few less i think
Still reading docs. I will try #Zig with some gravity simulation or a Flipper. Looking for a 2D framework/engine for Web and native.
Here's a blog post benchmarking compilers by “Hello, World!” and Ruby didn't fare well.
#MastoDev #FediDev #Programming #Assembly #Zig #C #Rust #Go #Java #Python #Ruby #Permacomputing
🦎 I think Zig is hard...but worth it
"Zig is trying to help. C and assemblers don’t much care what I do with my memory, so they make it "easy" to write code that performs actions regardless of type. But if I get it wrong (and I will), the program will segfault. The language won’t get in my way, but it won’t help me either. Zig makes you get it right, and that’s a good thing. Slower and more tedious, especially at first, but good."
made a blog post on writing a simple init daemon for #linux in #zig, https://juliette.page/blog/init.html
I want to take a closer look at #zig one of these days.
yooo! #zig seems to have fixed a long-standing issue where building the compiler using its `build.zig` directly instead of `cmake`+`make` would always produce a non-working executable for me, even with the same version.
excited for the #WebAssembly build of #SpacestationDefense! Almost all the pieces are in the place, I've figured out how to wrangle #emscripten into cooperating. I just need the #zig folks to release async support and then I can write the necessary websocket API.
What small program could I write for #OpenStreetMap to learn #ZigLang ? Preferred by using WASM in the Browser.
An ASCII-2D map renderer ;-). OSM to LEGO models?
Some gamification?! Packman (or a car race) on the OSM roads?
#Zig [⚡] => osm
I know that I'm learning new things when I'm banging my head agaisnt the wall 👱♀️🧱.
@mitchellh Might want to tag it with #zig and/or #ziglang - fair amount of people following that.
Over the weekend I published a blog post describing how I integrate Zig with SwiftUI. This enables me to create cross-platform apps with native GUI experiences while a vast majority of the code remains shared/platform-neutral. https://mitchellh.com/writing/zig-and-swiftui #zig #ziglang
Trying to go really lowlevel in #zig is weird! On the one hand it has some things that make it far nicer then C (e.g. raw syscalls in the stdlib with minimal to no wrapping and even the option to do syscallN yourself) on the other hand its missing a fair number of constants and doing certain calls will be quite clunky or require a lot of pointless casts, and if you want to format strings that will be passed into a syscall, convert them first..
For example look at this: https://zigbin.io/9c5aa2
Nice read. Be interesting to do a similar integration that @mitchellh did here integrating #zig and #swiftui but instead integrating #scala #scalanative and #swiftui https://mitchellh.com/writing/zig-and-swiftui
🦎⚡ #zig unexpected stuff 😮
🔜🗣️Join our #ZIGTalk with Frode Forland today at 5 pm! He is a member of the Scientific Advisory Board of our international department #ZIG and currently seconded from Folkehelseinstituttet in Norway to Africa CDC in Ethiopia.
🦎⚡ #zig very interesting 🕵️♀️
Can't wait to see all of that shipped:
A bit hacky, but I got zig running on the Tillitis key :)
#Zig's :zig: Build System is incredible. Building and cross compiling my #interpreter, which is written in C, is happening like magic.
It just Works!
i'm excited for the release of #zig 0.11, but also anxious because i'm afraid it won't include async support, meaning #SpacestationDefense 's server will be stuck on 0.10.1 for another long time
Saw a nice C++ example of separators in binary literals being useful for register accesses, à la 0b111'11'01'0001. Thought, "I should try and add that to #zig". Discovered it has had support for years
<insert Vince Mcmahon reaction meme>
Looks like the latest #Zig version is linking C libs again on my mac, so I think I'll get back to my little game.
Since lately I'm trying to keep my code simple and not over-engineer the design, I decided to scrap all and start all over again.
However, I kept the previous state of development in a separated branch in case I want to go back just to see how far I can go with a language without inheritance.
Is build.zig stable yet? #zig
My 18yo nephew asked me what my favorite #ProgrammingLanguage is and I don’t actually know the answer.
I *use* #C and #Go for applications. I write #Python for data munging and scripts and small apps. I’ve written many thousands of lines of each. I sponsor #Zig.
But is one of them my *favorite*?
I think my favorite would probably be something like #APL or #BQN or #Lisp or #Prolog or #PostScript or #Forth or #REXX or #Tcl or #Eiffel or #REBOL or #Oberon or #HyperTalk or #TutorialD or…
@mhd, compilers backed by #QBE are pretty fast, and I’m also waiting for #Zig’s self-hosted backend.
🔮 Zig Nifs In Elixir
— Isaac Yonemoto
「 The programming philosophy of Zig matches up nicely with the programming philosophy of the BEAM VM and in particular its emphasis on simplicity and structure should very appealing to the practitioners of Elixir 」
#Zigler #Zig #MyElixirStatus #Elixir
It's been a really long time since my last blog post, but I just wrote a new one about some abstraction techniques I've been using in #zig: https://ianjohnson.dev/posts/zero-cost-bindings-with-zig/ Hopefully I will keep up the habit a bit better going forward 😆
With Go's toolchain, cross-compiling is a breeze. But what if your repo contains C++ code as well?
Faced with the outlook of setting up and maintaining 15 LLVM toolchains (three host architectures multiplied by five targets), a team at Uber decided to build a C++ version of Go's cross-compiling toolchain.
Their toolchain is based on Zig, which is more lightweight than an LLVM or GCC solution and supports all targets at once. So they only need one toolchain per host.
Result: "Since January 2023, the Zig toolchain compiles all of the C and C++ code in Uber’s Go Monorepo for Linux targets."
In less inflammatory stuff, looks like ziglang might be actually pretty cool to learn!
Not a fan of having to use the main branch builds but I guess this will improve with time
I just tried the zig.pkg stuff and it worked just nice
Which is great I really didn't want to work with git sub modules 😅 (which I guess I still do but that's not my concern thanks to the pkg support)
Few observations as a completely new and outsider:
too many magic strings in the build.zig (see clap in the image)
That also touches in the following, hopefully for pure zig packages I won't have to actually specify this kind of stuff (or maybe I'm too used to higher level languages?)
Vs Code Tooling is cool but it still lets some errors slip by until the compiler lets you know.
Speaking of errors, they are so alien to me (I'd say because I'm not familiar with low level stuff)
Inline tests are... quite interesting I'm positively inclined to try them, perhaps that will make it easier to test some stuff I tend to just forget and try to test after things are in place (or never at all)
Strings are byte arrays?
I've never manipulated strings that way so I guess if I keep learning zig I'll finally know how to do that stuff!
Overall, I like it I'll keep trying
#ziglang #zig #softwaredevelopment #programming
If you are looking for making a #ziglang contribution, here is something that linuxwave project needs:
Bootstrapping Uber’s Infrastructure on arm64 with Zig https://www.uber.com/en-US/blog/bootstrapping-ubers-infrastructure-on-arm64-with-zig/ #go #zig
Bootstrapping Uber’s Infrastructure on arm64 with Zig https://www.uber.com/en-US/blog/bootstrapping-ubers-infrastructure-on-arm64-with-zig/ | https://lobste.rs/s/f3kd0s #go #zig
The cool thing about #zig (especially when using comptime) is that you write some code and think "This makes sense, will it work?" and it actually does
SIMD with Zig https://www.openmymind.net/SIMD-With-Zig/ | https://lobste.rs/s/feueje #zig
I've been poking zig today and I'm wondering if I can load whatever wasm I have there in F# with https://github.com/bytecodealliance/wasmtime-dotnet
I think this might be interesting for Perla, users could write their plugins targeting wasm and I could just... load their wasm files in the dev server... I guess I will be able to explore both zig, and wasmtime-dotnet in the process 😂
#ziglang #zig #fsharp #dotnet #wasmtime
Have a colorful weekend everyone!
#generative #CreativeToots #genart #GenerativeArt #cellularautomata #zig #ziglang #typescript #thingumbrella
Getting a bit more complex
#ThrowbackThursday #nostalgia #pixelart #genartclub #generative #GenerativeArt #thingumbrella #CreativeToots #cellularautomata #zig
This is finally coming together 😊 #zig #webassembly rendering via #thingumbrella + reactive ui with thi.ng/rdom, rstream and atom 🥳
More edge and more chaos
#GenArt #ziglang #web #programming #coding #generative #CreativeCoding #thingumbrella #zig
TigerStyle! (Or How To Design Safer Systems in Less Time) https://www.youtube.com/watch?v=w3WYdYyjek4 | https://lobste.rs/s/paq79n #databases #distributed #testing #video #wasm #zig
✨ Deep Neural Networks from Scratch in Zig
Deep Neural Networks from Scratch in Zig https://monadmonkey.com/dnns-from-scratch-in-zig | https://lobste.rs/s/nudkxl #ai #zig
I'm a Type 2 programmer of #C 🙋🏽♂️:
"The Two Types Of C Programmers (A Provocative Thesis)", Chris Siebenmann (https://utcc.utoronto.ca/~cks/space/blog/programming/CProgrammersTwoTypes).
Neither #Zig nor #Rust cut it for me as an alternative to C. 🤷🏽♂️
Regular Expressions in Zig https://www.openmymind.net/Regular-Expressions-in-Zig/ | https://lobste.rs/s/93mqjs #zig
Data Oriented Parallel Value Interner https://matklad.github.io/2023/04/23/data-oriented-parallel-value-interner.html | https://lobste.rs/s/z2psxx #zig
Zig Bits 0x3: Mastering project management in Zig https://blog.orhun.dev/zig-bits-03/ | https://lobste.rs/s/ibqzqp #programming #zig
Intro to the Zig Programming Language by Andrew Kelley
Now that I've got a #zig #wasm #gamedev web game lib thing, I think it'd be breaking some kind of internet law if I didn't port #doom to it...
Recently I've been incrementally porting a RISC-V emulator from C to Zig. I really enjoyed it, so have written something about the process. https://www.ringtailsoftware.co.uk/zig-rv32/ #zig #riscv #c #ziglang
Some of the breaking changes to the #Ziglang build system were a bit counter-intuitive to deal with, but I managed eventually... Just updated the https://thi.ng/wasm-api #Zig/#WebAssembly build script utils to simplify working with modules (formerly "packages") which are distributed via NPM. Because these Zig changes are *heavily* in flux right now, I've added a 2nd script for those of you who want to use the latest Zig v0.11.0-dev versions... The existing one can still be used for Zig versions up to v0.10.1
More info & source:
To follow the Zig build system & package manager progress:
@diceprophet same here!
Currently developing @Mochi a Unity plugin.
Also learning #zig and #raylib
I’m a bit concerned though, as I need to find contract work soon and feeling like I’m not progressing on that front…
I hope a varied background is a good thing these days 😊
Bitshifting pixel colors. Some basic patterns emerged from learning to use canvas API from #zig via #wasm and #thingumbrella
#ziglang #thingumbrella #genartclub #generative #CreativeCoding #typescript #PixelArt #colors #creativecodeart #generative #GenerativeArt
@aeva Having worked my "up" from Z80 assembly to eventually dynamic langs like JS/TS/Clojure, it's hard, if not impossible, to switch off considering at least some implications of using certain highlevel features. These days (mainly to learn more about #Zig & #WebAssembly internals) I'm also regularly using @mattgodbolt's compiler explorer to see how various language structures get translated... as others have said already, there's so much to learn from peaking behind the curtain...
Humans interact with their environment in complex local networks that influence zoonotic outbreak risks. Our Centre for International Health Protection #ZIG won transnational research funding from Volkswagen Foundation. #GlobalHealth
6 project partners from 5 countries in West Africa and Europe join their forces for 4 years. We look forward to expanding our ethnographic research and to collaborating with colleagues in 🇳🇬, 🇫🇷, 🇬🇲 and 🇬🇧 .
Excuse me for waxing poetically a little about some #ThingUmbrella #DesignPhilosophy... 😅 But since questions about it do come up fairly regularly and the design does somewhat seem divergent from (dare I say) the majority of other JS tooling in the frontend dev domain, I'd like to quote (as a clarification) what I just wrote in some GH issue:
"As for the auto-tracking & 'everything reactive by default' - that's exactly why all of these other tools require their enterprise-scale elaborate/complex pre-processing/transpilation tooling, something I've been strictly & fundamentally avoiding with all projects in this repo. In https://thi.ng/rdom, there's no "magic" reactivity or any form of centralized/auto-managed behind-the-scenes coordination and all reactivity and other control flow is forced to be explicit (by design). This not only provides super fine-grained control (see https://thi.ng/rstream & https://thi.ng/transducers for various reactivity/transformation building blocks), but also allows rdom to be absolutely nimble, components to be super simple, mix & match declarative/imperative updates, perform minimal updates without any need for diffing, and IMHO is just easier to reason about. I'm well aware this approach is not popular in the wider JS/frontend community, but in other language camps (e.g. #Clojure, now also #Zig) this 'no magic' and 'no hidden control flow' attitude is seen as one of the main design principles & net positives, even if it makes some parts more verbose (one can always build some cheap abstractions around that, if needed)...
As a more general comment about the design of umbrella packages: Most of the provided packages here started out as relatively low-level building blocks and basis for (slowly) building up higher level tooling/convenience layers, to experiment with different techniques & approaches. For years, I've been doing that myself, but also was always kinda hoping/relying that other people would do so too (and then maybe even share/feedback some of those results 😉 - not so much, yet...).
This design approach & focus on composability is totally counter to the much more popular all 'batteries-included' or 'zero-conf' myths and their constant re-invention of the wheel... To me composability and reasoning is 1000% more important!"
1/ What factors were supportive for emergency risk communication in the early phase of #COVID19?
Researchers from our Centre for International Health Protection #ZIG led a cross-country study comparing Guinea🇬🇳, Germany🇩🇪, Nigeria🇳🇬, Singapore🇸🇬.
@toxi 👏 ah yes, thanks for these recommendations! Really helps to dig deeper into #thingumbrella.
Yet I've only stuck to p5 and three for my #genuary pieces... mainly due to convenience.
At least wanted to use #thingumbrella for some of the upcoming prompts, ... probably even some #wasm #zig stuff 😁
Long story short: I wrote a Ruby extension in Zig
@toxi oh yes 🙌 haven't had the time to start using canvas with my edge of chaos experiments, but I'm pretty sure this will simplify some things. Btw. do you plan (have already?) to share some detailed info about how you approach writing a new wasm interop package? Something like "How to use X from zig/wasm". I was able to pick up #thingumbrella + #zig pretty easily, thanks to documentation and examples, but I feel like I don't yet understand completely how #webassembly works 🤔
Back to zig for day 10 of advent of code: https://github.com/llimllib/personal_code/blob/master/misc/advent/2022/10/a.zig
I overengineered it in case we have to do more with our "CPU".
Array vs. slice types and memory allocations continue to be a stumbling point for me in zig.
Day 9 of advent of code. Went back to bashing solutions out in #python, and found it much more fun after the detour to #zig.
I might come back and play around with zig again, but boy does it feel nice to be comfortable in the language you're using.
Day 7 of Advent of Code, in #zig: https://github.com/llimllib/personal_code/blob/master/misc/advent/2022/07/a.zig
I found this a nice, pleasing exercise and I'm starting to feel comfortable allocating memory in zig.
I don't ever free it, mind you, but I didn't hit any segfaults in solving this first more complicated one, which is a big change from the past.
Advent of code day 6 in #zig, bit sets come to the rescue again
Advent of code, day 5 in #zig: https://github.com/llimllib/personal_code/blob/master/misc/advent/2022/05/a.zig
This is the sort of problem I wanted to do zig for! Took me lots of learning about when and how I have to allocate, and I had some code that was succeeding intermittently because it was relying on stack memory not getting overwritten.
Day 4 solution in zig for of advent of code, topaz kept it chill through the first weekend.
Finished advent of code day 3 in zig just in time to watch the USA game. go USA!