zig
Odin
zig | Odin | |
---|---|---|
854 | 91 | |
36,516 | 7,435 | |
3.7% | 5.6% | |
10.0 | 10.0 | |
4 days ago | 4 days ago | |
Zig | Odin | |
MIT License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
zig
-
TIL: Ghostty — a new and quite promising terminal emulator
At the same time, in the internal Slack of the company I work for, my colleague asked the security team whether we have any policies about the apps, as they'd like to start using Ghostty as their terminal emulator. I took a look at it, and it immediately caught my attention: a fresh look, a zero-config setup, platform-native UI (discovered in details in the “Ghostty Is Native—So What?” post by Gregory Anders) and GPU acceleration, and FOSS with very permissive MIT license (here is the GitHub repo). I googled the author (Mitchell Hashimoto), and discovered that he is a co-founder of HashiCorp, that brought Terraform, Vargant, Consult, Vault, and others to the world. That's quite a list. And, last but not the least, Zig as the main programming language was an interesting factor as well.
-
C++ or Rust? I'd stick to my good old C++
I'm not sure which language will be more mainstream in the future between these two. Maybe Zig(https://ziglang.org) can be some contender in the future, but not now at least - it could be a good contender at least it shows OOP grammar as simple as Python, internalizing vtable. For C++ and Rust, at least for me Rust is more like "you MUST do this" while C++ is like "you CAN do it also in this way." While one is highly opinionated, the other is unopinionated at all(that is to say, at least for me. your opinions are always welcome). And that may be one of the reasons that I don't like Qt? :D Maybe C++ is still superset of Rust in some way (it's just "in some way", because there are things unique in Rust language itself. For example, Rust trait can be mimicked with template class and combination of C++ enum and template class can behave like class-associated Rust enum, but C++ doesn't have anything equivalent or similar to borrow checker).
-
Flattening ASTs (and Other Compiler Data Structures)
Zig compiler pipeline (AST, Zir, Air, Sema) does exactly this on all layers. Not only contiguous, but instead of array-of-structs it is struct-of-arrays, so walking the tree is even more cache friendly. For AST see: https://github.com/ziglang/zig/blob/master/lib/std/zig/Ast.z...
-
I Wrote a Game Boy Advance Game in Zig
Yes, please read the comment linked at the issue description: https://github.com/ziglang/zig/issues/16270#issuecomment-161...
-
When Zig Is Safer and Faster Than Rust
A few notes:
1) Lack of a garbage collector does not make your program faster, it makes the performance more easily predictable in terms of latency.
It also makes it more friendly for memory bandwidth, CPU cache and to overall memory usage, which in turn results in better performance in real-case scenarios vs synthetic/toy benchmarks. This is particularly noticeable in constrained environments (like embedded systems).
2) Zig was never about memory safety, and it is not a memory-safe language.
It might have better plumbing than C, it might add better way to implement and abstract concepts.. but so does C++, for instance.
The more striking differences between C++ and Zig, IMHO, are syntax and the ability to use the same language instead of a separate one to do meta-programming (templates vs comptime).
3) Aliasing enforcement in Rust is there for a reason.
Two examples I quickly found on Zig's issue tracker:
https://github.com/ziglang/zig/issues/3696
-
Enum of Arrays
I'll tell you my experience with Zig. I don't have any. I saw maybe Primagen talking about it and I see your post here. I watched 10 minutes of your vimeo video. I see it has 30k+ stars on github. So now I have to try to understand it in a nutshell.
First like any language, I go to indeed.com and put in "Zig" to see if there are any jobs listed which use it. I don't see any.
Then I click to https://ziglang.org/ and it describes Zig as "robust, optimal and reusable". Well that doesn't really say much of anything.
I read the example listed, which appears to be a test case, and I wonder how the 'try' mechanism works without a 'catch'
Then I go to https://ziglang.org/documentation/master/ and see that it says:
- Zon – object notation like JSON in Zig
- Linux Syscall Support
-
Zig is everything I want C to be
> will that function also get to return a u8?
No, the main function (the entry point of the entire program) is special cased. Have a look at the source code. There you can see the it's calling the user defined main function and handling its return value / error.
https://github.com/ziglang/zig/blob/2d888a8e639856e8cb6e4c6f...
> Also, what happened to argv/argc?
You can access argv with std.os.argv which is a slice of null terminated strings. It's better to go with std.process.argsAlloc though (requires an allocation but works on all supported platforms).
-
Introduction to Zig (a project-based book)
I'm a bit hesistant to mentally invest in Zig, given the maintainers choice to directly develop against a mostly undocumented NT-API instead of the Win32 API.
[1]: https://github.com/ziglang/zig/issues/1840
Odin
- Borgo Programming Language
- Huly – Open-Source All-in-One Project Management Platform
-
One must imagine Sisyphus writing a new JS framework
Or maybe you want a language that's more geared towards game dev, and includes a lot of the commonly use libraries? Odin
-
Comfy, the 2D rust game engine, is now archived
I have noticed a trend for Rust game development to revolve around developing engines that are "high-performance," particularly with a focus on entity component systems. This is development for the sake of optimisation and premature is putting it lightly.
Let me say this loud and clear for anyone who dares to hear a fool: don't even think about performance until it becomes a problem and even then you could still probably stand to ignore it. Ergonomics are infinitely more important for an engine. If you can't develop and iterate quickly you can't prove your ideas and make something fun. These are two things Rust is very bad at.
Rust is good at many things, but game development is really not one of them. C++ is still okay. If you want to try something new, Odin[1] is shaping up nicely.
[1] https://odin-lang.org/
-
Introduction to the Odin Programming Language
Odin website sure could! Highlights according to landing page:
> Data-Oriented, Simplicity, High Performance, "Batteries Included", Open Source (BSD 3)
https://odin-lang.org/
- Odin programming language now supports NetBSD
-
Giving Odin Vision
This article is about my experience with Odin programming language. So, I won't talk about its features and advantages and provide basic tutorials. There are plenty of materials on those topics.
-
Zig, Rust, and Other Languages
There's also Odin[0] too. I tried using them all and Odin was pretty nice. Nim is also good too but a lot more features.
But - I concluded that language matters a lot less compared to APIs. Yes, the language should have enough good features to let the programmers express themselves, but overall well designed APIs matter a lot more than language. For example -tossing most of the C stdlib and following a consistent coding style (similar to one described here -[1]), with using Arenas for memory allocation, I can be just as productive in C.
[0] - https://odin-lang.org
-
Odin Programming Language
I highly recommend looking at:
* The Overview: <https://odin-lang.org/docs/overview/>
* examples/demo: <https://github.com/odin-lang/Odin/blob/master/examples/demo/...>
As for the first example: a basic lexing example is probably boring, but it does show some basic ideas of what the language is about. If people want to write better examples or just reorder the current ones, please feel free to make an issue or PR on the website's GitHub page: <https://github.com/odin-lang/odin-lang.org>.
-
babel tree
I use Odin primarily, it’s C-level but pascal/Go syntax and inspiration https://odin-lang.org/
What are some alternatives?
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
ssr-proxy-js - A Server-Side Rendering Proxy focused on customization and flexibility!
rust - Empowering everyone to build reliable and efficient software.
go - The Go programming language
raylib - A simple and easy-to-use library to enjoy videogames programming
Jai-Community-Library - Tutorials and Cheatsheet for Jai, written by its community
rust - Rust for the xtensa architecture. Built in targets for the ESP32 and ESP8266
crystal - The Crystal Programming Language