How Python asyncio works: recreating it from scratch
Learn how asyncio works by recreating it from scratch with Python generators and using the __await__ dunder method for the async/await keywords.
The latest blog posts to take off on Hacker News. 3,707 posts.
Learn how asyncio works by recreating it from scratch with Python generators and using the __await__ dunder method for the async/await keywords.
Using Java's Foreign Function API to Call C like fopen, fgets, and fclose.
Not sure if your compilers have matching ABIs? Then put them through the ultimate compatibility crucible and pair them up on a shift at The ABI Café! Find out if your one true pairing fastcalls for each other or are just another slowburn disaster. (Maid outfits optional but recommended.)
Let's talk compilers with part one of a whistle stop tour of their history
piccolo is an interpreter for the Lua language written in pure, mostly safe Rust with an eye towards safe sandboxing and resiliency. It uses gc-arena for its garbage collection system, and in fact gc-arena was originally created as part of piccolo .
Programming blog of Eugene
Other languages are inflexible and broken. Let's fix that.
TLDR: read the paper and view the gallery of pretty Perl programs. In this paper, we aim to answer a long-standing open problem in the programming languages community: is it possible to smear paint on the wall without creating valid Perl?
My book Crafting Interpreters on programming languages is done. OK, OK. I know I said it was done like fifteen months ago . But now it’s really done. And by that I mean, the print, e-book and PDF versions are done. You can buy it . You can hold it in your hands. And I do mean “hands” plural. Because this little…
I saw a project a couple weeks back which allows writing and running Crystal methods inline inside a Ruby file. It’s a neat project, and I don’t want to take away from it but something in the README example looked off to me. require 'crystalruby' require 'benchmark' module Fibonnaci crystalize [n:
Zeke: "Wait, so with generational references, we now have four ways to do memory safety?"
Piet is a programming language in which programs look like abstract paintings. The language is named after Piet Mondrian , who pioneered the field of geometric abstract art. I would have liked to call the language Mondrian, but someone beat me to it with a rather mundane-looking scripting language. Oh well, we can't…
No general procedure for bug checks will do. Now, I won’t just assert that, I’ll prove it to you. I will prove that although you might work till you drop, you cannot tell if computation will stop. For imagine we have a procedure called P that for specified input permits you to see whether specified source code, with…
An extra dimension that you can play with
SBCL is a Common Lisp implementation, with a performant compiler and support for a wide range of platforms. It has excellent documentation , and even a guide to internals (... this is written towards people who already know a lot about how it works though). This paper about SBCL's fairly unique build process is also…
For the past few months I’ve been mulling over some things that Russell Johnston made me realize about the relationship between effect systems and coroutines. You can read more of his thoughts on this subject here , but he made me realize that effect systems (like that found in Koka) and coroutines (like Rust’s async…
I will often say that the so-called “C ABI” is a very bad one, and a relatively unimaginative one when it comes to passing complicated types effectively. A lot of people ask me “ok, what would you use instead”, and I just point them to the Go register ABI , but it seems most people have trouble filling in the gaps of…
While I was looking the other way, Python got advanced static types! Here’s matrix multiplication, describing the input shapes and its output shape:
Swift for C++ Practitioners, Part 1: Intro & Value Types
This essay says that inheritance is harmful and if possible you should "ban inheritance completely". You see these arguments a lot, as well as things like...
A blog about modern PHP, the web, and programming in general. Follow my newsletter and YouTube channel as well.
I had a really enlightening talk with Daniel Slutsky this week (who is an exceptional data scientist, software engineer, and community organizer I highly…
A somewhat compact implementation of the awk programming language
Projects and articles by Chris Gioran
Sometimes you have a pointer to a class, and you want to invoke a method. You can use the -> operator for that.
I’ve been learning at least one new programming language a month through Exercism which has been really fun and interesting. I frequently say that “every language you learn teaches you something about all the others you know” and with nearly a dozen under my belt so far I’m starting to worry about the combinatorics of…
All the “C++ killers”, even these which I wholeheartedly love and respect like Rust, Julia, and D, help you write more features with fewer bugs, but they don't much help when you need to squeeze the very last FLOPS from the hardware you rent. As such, they don’t have a competitive advantage over C++. Or, for that…
Andrey Mokhov, Neil Mitchell, Simon Peyton Jones Published in Journal of Functional Programming, Vol 30(E11) View PDF Download BibTex
In the 1990s, computers were magic and we were wizards. Want proof? I offer below, Larry Wall’s foreword to Learning Perl from 1993. It greatly inspired a very young me who wandered into a book shop, picked up an odd book with llama on the cover and a seemingly misspelled title. The first few pages had me hooked and…