There is no such thing as a global method in Ruby
What Ruby’s top-level methods actually are, who they belong to and how they are namespaced
Topics /
The most popular blog posts about programming languages on Hacker News. 327 posts.
What Ruby’s top-level methods actually are, who they belong to and how they are namespaced
Gleam is a statically-typed functional programming language, which recently had its v1 released, designed for building scalable and maintainable software. It
This set of slides sketches out the implementation of Hell , in technical detail. I do tend to switch between the slides, old code, and the present code, so bear with me. It's more about the ideas. If you want to see a complete implementation, the complete implementation of Hell is one file , which you can look…
What is Damas-Hindley-Milner?
It has been said that the most popular programming language in the world is the spreadsheet (and in particular these days, Excel). There...
Clojure macros have two modes: avoid them at all costs/do very basic stuff, or go absolutely crazy.
How to handle and report errors effectively in Rust applications is a common question. This blog shares our experience organizing variant types of Error in a complex system like GreptimeDB, from how an error is defined to how to log the error or present it to end-users. Such a system is composed of multiple components…
CPS, or continuation-passing style, is an intermediate representation for programs, particularly functional programs. It’s used in compilers for languages such as SML and Scheme. Much of its utility comes from its support for tail calls and nonlocal control flow such as call/cc, but it can also be used as an…
A few years ago, on a whim, I wrote YAIOUOM. YAOIOUM was a static analyzer for Rust that checked that the code was using units of measures correctly, e.g. a distance in meters is not a distance in centimeters, dividing meters by seconds gave you a value in m / s (aka m * s^-1). YAIOUOM was an example of a refinement…
Code reflection, an enhancement to Java reflection, enables access to symbolic representations of Java code in method and lambda expressions. “Symbolic representations of Java code” may seem like a fancy term, but its easily demystified. It’s a model of Java code where the code of a method or lambda expressions is…
I had a really enlightening talk with Daniel Slutsky this week (who is an exceptional data scientist, software engineer, and community organizer I highly…
This post announces SaberVM, an abstract machine for functional programs that guarantees safety, reliability, and portability.
TypedDict was introduced in PEP-589 which landed in Python 3.8. The primary use case was to create type annotations for dictionaries. For example,...
NOTE: This is based on, but completely rewritten, from a Twitter post:https://x.com/TheGingerBill/status/1802645945642799423TL;DR: It makes Go feel too "functional" rather than being an unabashed imperative language.I recently saw a post on Twitter showing the upcoming Go iterator design for Go 1.23 (August 2024)…
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…
I wrote the analysis of “useless sugar” features of Ruby for two months, and I regret nothing.
Design, build and integrate your own Domain Specific Language with Lingo.
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…
History of Perl releases since version 5.6, each with a summary of added or changed features.
Rust is my favorite programming language. I've been writing Rust for about 6 years, from college to professionally, and I'm vocal about how helpful the compi...
While I was looking the other way, Python got advanced static types! Here’s matrix multiplication, describing the input shapes and its output shape:
A blog about functional programming
This question is always asked. My thoughts are a little bit different than what I've read online.
One product of mine takes reports that come in as a table that’s been exported to PDF, which means text extraction. For dollar figures I find a prefixed dollar symbol and convert the number following it into a float . If there’s a hyphen in addition to the dollar symbol, it’s negative.
Enhance the switch construct so that exceptions thrown by the selector (the e in switch (e) ... ) can be handled in the switch block. Alongside a previous enhancement to handle null selectors, this makes switch even more useful for pattern matching. This is a preview language feature .