RSSAmplifier

Blog

The Axis of Eval

Manuel Simoni's blog about programming (languages).

axisofeval.blogspot.comRSS feed ↗25 posts

Latest posts

An alternative idea for a typed language living alongside/inside JavaScript

What if instead of trying to type existing JS code, like TypeScript, we made objects of a new typed language completely separate from JS objects? The TypeScript idea is to be able to type any old JavaScript that's out there. On the one hand this is admirable, but OTOH it leads to a very complicated type system. Here's an alternative idea: instead of typing existing, legacy JavaScript, treat it as…

Delimited Generators - A more natural API for JS generators

I have been studying ways to work around the horrors issues of JavaScript's async APIs for years. I have even built a series of increasingly elaborate continuation-based Lisp interpreters (here's the latest one , it's quite good, if I may say so). But recently I finally came to the point where I understood JS generators well enough to realize that generators already solve the problem! With a small…

Common Lisp's BLOCK / RETURN-FROM and UNWIND-PROTECT

I was just chatting with Ben Titzer on Twitter about control flow in his Virgil language (which is cool and you should definitely check out), when I felt the need to once more promote how Common Lisp does non-local control flow (stuff like returning early from a function or breaking from a loop), because I think it's a very nice solution. So in Common Lisp we have BLOCK / RETURN-FROM (which work…

Peeking into the future with RDP

One aspect of reactive demand programming that sets it apart from other reactive programming models is its support for optimistically working with the predicted future states of signals. Think about a signal that carries the current time in seconds, that you want to display on screen as a clock. The screen should update close to the full second. Let's say your clock display uses complicated…

The worm is the spice

Just had a nice insight regarding systems that deal with reactively updating (potentially large, structured ) values such as RDP : The dynamic output of a process is indistinguishable from a static storage resource (file). In batch systems like Unix, this symmetry is not so deep: the output stream of a process looks somewhat like a file, but the process can't make any changes to earlier, already…

RESTful RDP with big values

What if you want to use a big value, like a whole database table or weblog, as a Reactive Demand Programming signal value? This would make it possible to use RDP to orchestrate things like incremental MapReduce pipelines. Here's one weird trick to make it work. In effect, each RDP signal becomes a RESTful server , speaking an HTTP-like protocol. Clients of a signal remember the ETag of the last…

What I learned about Urbit so far

[Updated, see comment and this Reddit AMA with the Urbit team , that clarifies a lot of issues.] Urbit is some kind of new operating system design thingy, that is kinda hard to categorize. Some interesting design points are: Urbit restricts the number of identities in the system to 2 32 . This means Urbit doesn't have enough identities even for currently living humans. In line with the usual…

A trivial implementation of Reactive Demand Programming

I wrote a trivial implementation of RDP in JavaScript to help me understand how it works. It's called bucky-rdp (about 200 lines of heavily commented code ). It currently supports Sirea 's bconst, bpipe, and bfmap. Here's an example: // Create some behaviors for transforming numbers. var bDouble = rdp.bFMap(function(val) { return val * 2; }); var bMinusOne = rdp.bFMap(function(val) { return val -…

Grokking Reactive Demand Programming

TL;DR: RDP is an exciting declarative model of how computational processes (behaviors) are connected by continuously updating values (signals) to effect changes on storage and external state (resources). I've come a bit closer to understanding David Barbour 's Reactive Demand Programming model, and this has confirmed my previous hunch that RDP is one of the most interesting systems designs since…

Attack of the Monadic Morons

[Deleted. To be replaced with a proper rant at another time.]

Obsession with mathematics

To put it bluntly, the discipline of programming languages has yet to get over its childish passion for mathematics and for purely theoretical and often highly ideological speculation, at the expense of historical research and collaboration with the other social sciences. PL researchers are all too often preoccupied with petty mathematical problems of interest only to themselves. This obsession…

A week of Lisp in Madrid

Jose Maria Cuellar Geeks from all Lisps of life met in Madrid last week for the European Common Lisp Meeting and European Lisp Symposium 2013. A lot of things happened, so I'll just recount the most memorable ones. I enjoyed meeting Pascal Costanza and Charlotte Herzeel . Pascal shares my disdain for the aberration that is Lisp-1 and doesn't tire of telling Schemers so. I think he's a bit too…

Wat: now in Perl, Python, and Ruby, too

I'm delighted somebody by the name of "shadowcat-mst" has taken my Wat interpreter and reimplemented it in Perl . That really seems fitting. Wat now covers JavaScript and Perl - think of the possibilities! Update: Piotr Kuchta ported Wat to Python . Update: Victor Hugo Borja ported Wat to Ruby .

Green threads in the browser in 20 lines of Wat

This page shows 5 independent, cooperatively scheduled Wat green threads (view source for full Wat code). Each thread has an ID and is defined as a function that loops forever, repeatedly printing its ID, and then sleeping for a (randomly long) while. (define (run-thread (id String)) (loop (@appendChild (.body $document) (@createTextNode $document (+ "Active thread: " id " "))) (sleep (* 1000…

A new low in programming language design and implementation

The new Wat is the best, most lightweight way to implement a JavaScript-based programming language I have found so far. Basically, I get away from JS as quickly and painlessly as possible, and start writing the language in itself. So I define a very small set of primitives on the joint foundation of Kernel-like first-class lexical environments and fexprs and delimited continuations . Fexprs are a…

Some progress on the Wat VM

Wat is back! If you'll recall, Wat is my ultra-minimal (~500 lines of JS) interpreter for a Kernel -based language with delimited continuations as well as first-order control , and hygienic macros as well as fexprs . I'm pretty excited by some recent and ongoing changes, which make Wat even smaller and turn it into more of a VM than a full language. Wat will provide (just) the following features:…

A quasiquote I can understand

I've written two Lisps ( 1 , 2 ) with quasiquotation , and in both, quasiquotation was the most difficult thing to implement, and gave me the most headaches. That shouldn't be, right? After all, it only creates new forms. I think now I've found a formulation for quasiquote that has a really simple implementation, and yields more or less the same results as existing quasiquote implementations. Some…

Taf's translation to O'Caml for type-checking

Taf is my new vapor-Lisp with row polymorphism, delimited continuations, and hygienic macros. (Warning: incoherent rambling ahead!) Taf has a class-based object system with no inheritance. A class defines which slots an instance of this class has, and which methods are applicable to it. Every class also implicitly defines a class type. In addition to class types, there are also interface types or…

Current project

In my quest for a good Lisp, I could no longer ignore static types. See Taf - A plan for a statically-typed Lisp . There shouldn't be any difficult roadblocks, so I expect a release sometime in or before summer.

This PLT Life moved

This PLT Life is now on Tumblr , thanks to bloggertotumblr.com .

When I see three layers of weird DSLs for configuring a single app

(Hello, Jetty.)

When everybody and their dog writes a poor OOP critique

When I read a discussion about Scheme fundamentals on the RnRS editors list

When the designers of a bad language decide to add a poorly-understood, "powerful" new feature

When someone shows me their implementation of McCarthy's EVAL