Tag: programming
-
Writing a Rust gem from scratch
This is a followup to the last post. Instead of using the template rust_ruby_example gem, we’ll make one from scratch. Make sure to go back over the “Using a rubygems fork” section because we’ll be using it heavily during this post, as well!
-
Sneak preview: Writing Ruby gem native extensions in Rust
In December 2021, Ian Ker-Seymer (@ianks) submitted a pull request to add a CargoBuilder class for handling Rust code in gems, enabling native extensions in Rust! I was so excited, I had to try it out, even though it hadn’t been merged yet. A lot of maintainers are showing interest and pitching in, so I…
-
Crate of the Week second chance list
TLDR – the three most upvoted crates that were never recognized as Crate of the Week in This Week in Rust are glutin, rust-cuda, and redshirt. The Crate of the Week is a Rust (programming language, not game) segment in the This Week in Rust newsletter that highlights a single Rust library in a given…
-
Building a CEDICT parser in Rust with Nom
The CEDICT format is a simple, creative commons-licensed file format for Chinese/English dictionaries. While Mandarin-only CEDICT parsers abound, there is basically no support for Cantonese jyutping in the English-speaking programming world. As someone who would have liked to use Cantonese pronunciations in my programs, at first I was stuck. I considered adding jyutping support to…
-
Contributing to Artichoke in Rust
Yesterday, I eked out a bit of time to contribute to Artichoke in Rust, in no small part due to the maintainer @lopopolo: Artichoke is an implementation of Ruby written in the Rust programming language. The issue I worked on was to expose a newly stabilized method in Artichoke’s implementation of the Ruby String class.…
-
Pipes in Elixir
Pipes are a delightful feature in Elixir that you can use to pass the evaluation of an expression into a function. For example, the code below will output “Hello, world!” to the terminal: You can use this to chain together different operations: And Elixir specifically substitutes the result of the expression into the first argument…
-
Why Elixir? ⚗️🧪
Elixir, other than being an alchemical cure-all, does double duty as a programming language that’s good for fast, resilient, parallel computing. It has all the syntactical charm of Ruby, with the power of an alien (actually Swedish, but close enough) technology. But why am I learning Elixir now, after so many years of Ruby? To…
-
Trying Elixir as a Rubyist
I’ve been working through Dave Thomas’s fantastic book Programming Elixir 1.6 in hopes of using Phoenix LiveView, and it has been really interesting, coming from Ruby. A lot of syntax is familiar enough to be alluring, but unfamiliar enough to trip me up. For instance, even something as simple as an if block was hard…
-
Hello, World!
My homepage looks so lonely without a post that I thought I’d write something really quickly. It’s been a long time since I wrote in a blog. I hope to jot down thoughts about a few of the things I’ve been working on lately here, including, but not limited to: Rust Elixir / Phoenix OS…