Odin is a manually memory managed language. Beginners of such languages are often afraid of memory leaks, meaning that you forget to deallocate memory. The first remedy for this is to use the tracking allocator. It will warn you about memory you forgot to deallocate. Nifty! But you can also think along these lines: Can I simplify things a bit, so I don’t have to think about the deallocation? What you can do is to try to use the temporary allocator whenever possible.| zylinski.se
I have recently tried to update my Zig project from 0.11.0 version of Zig, to 0.12.0. Zig compiler brings in its own build system. Since Zig is still under development, that API changes. The 0.12.0 changes forced me to dive a bit deeper into Zig’s source code. I went through Build.zig and Step.zig. What caught my attention was the usage of Tagged Unions. Tagged unions aren’t nothing new. C has them… kind of. In C, the tagged unions are more of a design pattern than a language feature.| Projects
In my book Understanding the Odin Programming Language I wrote that “Odin incorporates some of my favorite C best practices, straight into the language”. But I didn’t really elaborate on the details. Let’s do that here! This brings me to talking a bit about a previous job I had. Back in 2021 I worked at a place called Our Machinery. We were creating a whole game engine in plain C. We used a very comfortable and powerful way to program C.| zylinski.se
Games can be made in many different ways. Many games are made using big, general purpose game engines such as Unity and Godot. I enjoy using the Odin Programming Language combined with Raylib. Odin is a C-like programming language and Raylib is library for drawing graphics, checking input and playing sounds. So it’s just a program that uses a simple library, no engine! There are no objectively best ways to create games.| zylinski.se
When programming in Odin you can use arena allocators. If you use an arena allocator combined with a dynamic array, then there are a couple of pitfalls that may not be apparent at first. Let’s look at what arenas are, how you can run into trouble when naively using them with dynamic arrays and what you can do instead. What’s an arena? How does it work? Arenas and arena allocators are useful for grouping allocations that have the same lifetime.| zylinski.se
Introduction| wiki.alopex.li
Learn the Odin Programming Language and demystify low-level programming| odinbook.com
Gamedev, FOSS, programming, stuff.| akselmo.dev
Preface This article is an introduction the Odin Programming Language. It is aimed at people who know a bit of programming, but have never touched Odin. It is not a reference guide, rather I try to keep things informal and talk about what I think are important aspects of the language. There will be some notes on differences to C/C++, as Odin in many ways tries to be better C. If you enjoy this article and want to support me, then you can do so by becoming a patron.| zylinski.se
Borrow checking, RC, GC, and the Eleven (!) Other Memory Safety Approaches| verdagon.dev
A review of Handmade Seattle 2023| carlsverre.com
Today we’re excited to announce the release of TypeScript 5.2! If you’re not familiar with TypeScript, it’s a language that builds on top of JavaScript by making it possible to declare and describe types. Writing types in our code allows us to explain intent and have other tools check our code to catch mistakes like […]| TypeScript
An overview of the Odin programming language and its features.| odin-lang.org
Today we are excited to announce the availability of TypeScript 5.2 Beta. To get started using the beta, you can get it through NuGet, or through npm with the following command: npm install -D typescript@beta Here’s a quick list of what’s new in TypeScript 5.2! using Declarations and Explicit Resource Management Decorator Metadata Named and […]| TypeScript