Ruby's switch statement is flexible
Ruby's switch statement is very versatile and flexible, especially due to the dynamic nature of Ruby. This post shows how it works with examples.
Ruby's switch statement is very versatile and flexible, especially due to the dynamic nature of Ruby. This post shows how it works with examples.
Zig is a new, independently developed low-level programming language. It’s a modern reimagining of C that attempts to retain C’s performance while embracing improvements from the last 30 years of tooling and language design. Zig makes calling into C code easier than any other language I’ve used. Zig also treats unit…
Goroutines are the single feature that distinguishes Go from other languages. They look very much like threads, but they are cheap to create and manage. Go's runtime schedules goroutines onto real threads efficiently so you can easily create lots of goroutines.
“lex and yacc” are two terms that are used together so often that they can seem indivisible. lex takes a string as input and divides it up into lexemes (roughly speaking “words”) and yacc takes a sequence of lexemes and parses them. Since some parsing approaches such as recursive descent parsing unify these phases…
UPDATE: Wow, this post has gotten popular! I’ve written a new post that adds new papercuts combined with concrete suggestions for how C++ could improve, if you are interested. Also, if you want to read more about C++’s deeper-than-papercut issues, I recommend specifically my post on its move semantics. Thank you for…
I find myself thinking about a particular design principle of Rust today. I’m not sure I’ve ever seen it named specifically before, but it gets referred to from…
Scott Mabin's blog
The question of which language suits best for compiler development is a frequent one amongst language enthusiasts (e.g., see discussions here , here , and here ). Sadly, most of the commenters either 1) just answer with their language of choice without any explanation, or 2) provide a vague explanation without any…
Thank you to Seth Brown, Eric Oestrich, and Kevin Rankin for reviewing this article.
Its declarative lunch was partly eaten
My Thursday CppCon talk is now online. Note: There’s already a Reddit thread for it, so if you want to comment on the video I suggest you use that thread instead of creating a new one. At Cpp…
Building UIs in HTML+CSS can be untenable. When making complex frontend experiences, I reach for Elm.
Gleam is a Type-Safe programming language that transpiles to Erlang And javascript . , so you can run its code on the BEAM. I’ve slept on Gleam for a while because its syntax. It was too much Rust and not enough Elixir for me.
Coding in Rust and others; making coding videos.
You probably know how to use async/await. But have you ever wondered how it works under the hood?
I’ve been on a C kick recently as I learn the intricacies involved in low level programming. As a Data Scientist/Python Programmer I work with strings all the time. People say that handling strings in C range anywhere from tricky to downright awful. I was curious so I decided to see how deep the rabbit hole went.
Now that Java 21 is features complete (Rampdown Phase Two at the day of writing), it’s time to walk through all the functionalities that bring to us, developers, this new version. This article is part of a series on what’s new on the last versions of Java, for those who wants to read the others,
Listen, I didn’t plan on making a whole ‘writing X like Y’ series. But here we are.
Update (2023-07-21): I was being a bit overly brief with liberal use of ... to mean “unimportant” in the code examples. Ginger Bill (creator of Odin) noted it might be clearer to have more correct/explicit Odin and Zig code for the examples given people would be less familiar. Those has been updated For the past few…
Welcome to Learning Zig, an introduction to the Zig programming language. This guide aims to make you comfortable with Zig. It assumes prior programming experience, though not in any particular language.
On April 8, 2020, John Horton Conway developed symptoms of COVID-19. On April 11, 2020, he succumbed to the disease. 1 2 3 4
Designing APIs is hard. Designing good APIs that future people will not instantly classify as "total crap" is even harder. There are typical...
In my last post about Zig and Rust, I mentioned that Rust is a scalable language. Let me expand on this a bit.
I sometimes get asked why I use Perl so much. Am I not a fan of strongly typed functional programming? Yeah, I am. Ask me to write something that is known, for sure , to become a big system and I’ll pick strongly typed functional programming without hesitation. 1 1 And, of course, put me in a team that uses Blub, and…
Every March, developers worldwide each try to make a roguelike game in less than 168 hours as part of the 7DRL Challenge . Roguelike games are hard , involving procedural level generation, pathfinding, line-of-sight algorithms, and more dijkstra maps than you can imagine.
The Lua programming language is unusual among its peers. It’s a dynamically typed, scripting language with a really small core (100-200kB), but runs efficiently, has far simpler semantics than other similar languages, and is just as old as the giants like JavaScript, Python, and Ruby – first made in a research lab…
My paper P1144R8 “std::is_trivially_relocatable” has, in the past few months, been joined by three(!) papers out of Bloomberg: