New
The latest blog posts to take off on Hacker News. 3,709 posts.
Lessons learned porting 50k loc from Java to Go
Things I've learned while porting 50 thousand lines of code from Java to Go
Idiomatic Monads in Rust
A pragmatic new design for high-level abstractions Monads (and, more generally, constructs known as “higher kinded types”) are a tool for high-level abstraction in programming languages1. Historically, there has been a lot of debate inside (and outside) the Rust community about whether monads would be a useful…
Ruby's Creed
Every programming language has some fundamental idea(s) that drives its design and evolution. For Haskell that’s functional purity and state-of-the-art static typing, for Erlang that’s distributed programming and fault tolerance, for Clojure that’s simplicity and stability. What all these examples have in common is…
OCaml on Baremetal Shakti RISC-V Processor
It has been 3 months since I joined IIT Madras and it has been good fun so far. Along with the members of the RISE group , we’ve initiated a project to build secure applications on top of secure extensions of the open-source Shakti RISC-V processor ecosystem. Unsurprisingly, my language of choice to build the…
I Built a Lisp Compiler
I’m very proud to announce the completion of my first programming language compiler! Malcc is an incremental and ahead-of-time lisp compiler written in C. This is the story of my progress over the years and what I learned in the process. An alternate title for this post is: “How to Write a Compiler in Ten Years or…
Local Variables
And as imagination bodies forth The forms of things unknown, the poet’s pen Turns them to shapes and gives to airy nothing A local habitation and a name.
Why I Switched from Python to Clojure (2016)
I spent some more time with Python and started to realize that I needed something more. Here's a brief list of the reasons why I switched to Clojure.
On Learning Rust and Go: Migrating Away from Python
I first started using Python in 1993. It's been my main programming language since about 2000. I've written a ton of code in Python, both for work and in my free time. For several years now, I've been growing dissatisfied with it. Partly it's because I'd like more help from my programming tools, such as static type…
Lisp Macros, Delayed Evaluation and the Evolution of Smalltalk
At a recent Clojure Berlin Meetup , Veit Heller gave an interesting talk on Macros in Clojure. The meetup was very enjoyable, and the talk...
Why Operators Are Useful
This is something I posted on python-ideas, but I think it's interesting to a wider audience. There's been a lot of discussion recently ab...
Writing a simple evaluator and type-checker in Haskell
This tutorial serves as a very short and quick summary of the first few chapters of TAPL. Huge thanks to the ##dependent@freenode community (pgiarrusso, lyxia, mietek, …) for clearing all my …
What causes Ruby memory bloat?
Ruby apps can use a lot of memory. But why? Various people in the community attribute it to memory fragmentation, and provide two “hacky” solutions. Dissatisfied by the current explanations and provided solutions, I set out on a journey to discover the deeper truth and to find better solutions.
Why I rewrote the mesh generator of Dust3D from Rust to C++
Dust3D is a free, open source low poly 3D modeling tool for video games and 3D printing. Features sketch-to-mesh, auto-rigging, procedural animation, and single-tool GLB/FBX export.
Compiler Basics: LLVM
Writing a lisp compiler from scratch in JavaScript: 3. LLVM
Dreaming of a Parser Generator for Language Design
Trying to design a new programming language, I’m faced with the question of how to implement a parser for it. Various parser generators are available and sup...
Generating C code that people want to use
Project Everest is a large, collaborative research effort that aims to verify and deploy a new, secure HTTPS stack. All of our code is verified using the F* programming language. Using KreMLin, a dedicated compiler, the verified F* code is compiled to readable C, meaning existing systems projects can readily integrate…
The Kernel Programming Language
I'm developing a programming language called Kernel. Kernel is a conservative, Scheme-like dialect of Lisp in which everything is a first-class object.
NASM Tutorial (2018)
This tutorial will show you how to write assembly language programs on the x86-64 architecture.
The CPython Bytecode Compiler Is Dumb
Due to sheer coincidence of several unrelated tasks converging on Python at work, I recently needed to brush up on my Python skills. So far for me, Python has been little more than a fancy extension language for BeautifulSoup , though I also used it to participate in the recent tradition of writing one’s own static…
Enquire: Everything you wanted to know about your C compiler and machine
This is a program that determines many properties of the C compiler and machine that it is run on, such as minimum and maximum [un]signed char/int/long, many properties of float/ [long] double, and so on.