318 karma · joined Jun 7, 2020 (6y ago) · 105 submissions
comment 11mo ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
Why so many uses of try? Because Zig is all about readability, and anytime you see try you _know_ that the called function can possibly fail.
comment 3y ago · link · parent
Zig is a very consistent language in syntax and semantics, so there are a small number of features I need to be concerned with. My understanding is that once Zig reaches a stable 1.0 the language will not change. Although there is a lot of churn right now, I appreciate the idea of a language that is simple, and stays simple.
The code is also very readable. I haven't found another language (yet) that I can just open up the standard library source code and understand just about everything. With no hidden control flow I can easily read a function and not have to question what a line of code does. Everything it does is right in front of me.
I also love that Zig is trying to fix many of C's problems. Rather than a global libc allocator, each function that can allocate (by convention) accepts an allocator as an argument. In my projects this has been really great for understanding what code paths allocate, which has made it easy to package my fuzzy finder as an allocation-free Zig module and C library.
Now, if I were working on a project with more critical safety requirements, I might consider a different language. But for most of my personal projects Zig is exactly what I need.
comment 3y ago · link · parent
Zig is exactly what I want out of a language though, so take my opinion with a grain of salt :)
[0]: https://github.com/natecraddock/zf
comment 3y ago · link · parent
My projects were focused on user interface improvements, so I also spent a lot of time gathering feedback from users. It was really valuable for me to learn how to get feedback at different stages of the development cycle, and also to learn how to filter the good from the bad feedback.
I hope Gitea is accepted!
comment 3y ago · link · parent
comment 4y ago · link · parent
The speed will come when the native backends are finished. Right now the compile time is mostly llvm. The idea is a native and fast backend for debug (development) builds, and llvm for optimized releases.
comment 4y ago · link · parent
comment 4y ago · link · parent
Lua is a very small language with a tiny standard library. To extend it you write modules in C (or another language with bindings). This allows connecting the Lua code to various libraries. A notable example in lite is SDL. Without the C code in this repo the Lua code wouldn’t be able to use SDL for drawing or inputs
comment 4y ago · link · parent
And I agree it’s different from all the other operating systems, once I understood why it made sense.
For example, I can copy an image to my clipboard, and open Preview. No window opens, but the top menu bar shows that Preview is open. From there I can choose the “new from clipboard” entry. It’s just a different model of interaction.
20.
Python Path Objects(hillelwayne.com ↗)
2 points · by cturtle · 4y ago · discuss
comment 4y ago · link · parent
24.
A Tour of the 19 Largest Natural Arches(naturalarches.org ↗)
2 points · by cturtle · 4y ago · 3 comments
comment 4y ago · link · parent
comment 4y ago · link · parent
If my project requires the memory safety that rust offers, I’ll choose rust. But most of the time I’ll pick something else to lower my mental load when coding.