Brian Kung

Asian American dad, husband, and programmer

  • Contact
  • Resume
  • How and why our kids are learning Chinese

    How and why our kids are learning Chinese

    “Are you teaching your kids Chinese?” and “how are you teaching your kids Chinese?” are two questions we get a lot from Chinese American parents. One question I wish more parents asked us is “why?” When I was picking a major course of study in college, I consistently gravitated towards East Asian Languages and Culture…

    bkandcc

    2022-04-13
    Article
    Chinese, kids
  • Ruby has economy-class functions

    Ruby has economy-class functions

    Ruby has economy-class functions, not first-class functions. And that’s okay! It’s a great language anyway.

    Brian

    2022-03-27
    Article
    plt, programming, ruby
  • 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!

    Brian

    2022-02-02
    Article
    programming, ruby, rust
  • Sneak preview: Writing Ruby gem native extensions in Rust

    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…

    Brian

    2022-01-31
    Article
    programming, ruby, rust
  • 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…

    Brian

    2022-01-07
    Article
    programming, rust
  • 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…

    Brian

    2021-12-07
    Article
    Cantonese, Chinese, Mandarin, nom, parsers, programming, rust
  • 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.…

    Brian

    2021-11-20
    Article
    artichoke, programming, ruby, rust
  • Pipes in Elixir

    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…

    Brian

    2021-11-16
    Article
    elixir, programming
  • 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…

    Brian

    2021-11-01
    Article
    elixir, erlang, programming
  • 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…

    Brian

    2021-10-31
    Article
    elixir, programming, ruby
←Previous Page
1 2 3
Next Page→

Blog at WordPress.com.

  • Follow Following
    • Brian Kung
    • Already have a WordPress.com account? Log in now.
    • Brian Kung
    • Edit Site
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar