HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
nukata
little-scheme
Scheme2019–2020
nukata / little-scheme

little-scheme

A meta-circular interpreter of a subset of Scheme

2Distinct people
9Mentions
0Explicit recommenders
16GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A meta-circular interpreter of a subset of Scheme

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month9 dated mentions

Observed mentions: 2019-02-23 15:06:29 UTC to 2020-11-06 12:15:22 UTC.

01232019-02-01 00:00:00 UTC to 2019-03-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsFeb 20192019-03-01 00:00:00 UTC to 2019-04-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2019-04-01 00:00:00 UTC to 2019-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-05-01 00:00:00 UTC to 2019-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-06-01 00:00:00 UTC to 2019-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-07-01 00:00:00 UTC to 2019-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-08-01 00:00:00 UTC to 2019-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-09-01 00:00:00 UTC to 2019-10-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2019-10-01 00:00:00 UTC to 2019-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-11-01 00:00:00 UTC to 2019-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-12-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsDec 20192020-01-01 00:00:00 UTC to 2020-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-02-01 00:00:00 UTC to 2020-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-03-01 00:00:00 UTC to 2020-04-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2020-04-01 00:00:00 UTC to 2020-05-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-05-01 00:00:00 UTC to 2020-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-01 00:00:00 UTC to 2020-07-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-07-01 00:00:00 UTC to 2020-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-08-01 00:00:00 UTC to 2020-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-09-01 00:00:00 UTC to 2020-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-10-01 00:00:00 UTC to 2020-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-11-01 00:00:00 UTC to 2020-12-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsNov 2020

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Feb 20192019-02-01 00:00:00 UTC2019-03-01 00:00:00 UTC110
Mar 20192019-03-01 00:00:00 UTC2019-04-01 00:00:00 UTC101
Apr 20192019-04-01 00:00:00 UTC2019-05-01 00:00:00 UTC000
May 20192019-05-01 00:00:00 UTC2019-06-01 00:00:00 UTC000
Jun 20192019-06-01 00:00:00 UTC2019-07-01 00:00:00 UTC000
Jul 20192019-07-01 00:00:00 UTC2019-08-01 00:00:00 UTC000
Aug 20192019-08-01 00:00:00 UTC2019-09-01 00:00:00 UTC000
Sep 20192019-09-01 00:00:00 UTC2019-10-01 00:00:00 UTC110
Oct 20192019-10-01 00:00:00 UTC2019-11-01 00:00:00 UTC000
Nov 20192019-11-01 00:00:00 UTC2019-12-01 00:00:00 UTC000
Dec 20192019-12-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
Jan 20202020-01-01 00:00:00 UTC2020-02-01 00:00:00 UTC000
Feb 20202020-02-01 00:00:00 UTC2020-03-01 00:00:00 UTC000
Mar 20202020-03-01 00:00:00 UTC2020-04-01 00:00:00 UTC312
Apr 20202020-04-01 00:00:00 UTC2020-05-01 00:00:00 UTC101
May 20202020-05-01 00:00:00 UTC2020-06-01 00:00:00 UTC000
Jun 20202020-06-01 00:00:00 UTC2020-07-01 00:00:00 UTC101
Jul 20202020-07-01 00:00:00 UTC2020-08-01 00:00:00 UTC000
Aug 20202020-08-01 00:00:00 UTC2020-09-01 00:00:00 UTC000
Sep 20202020-09-01 00:00:00 UTC2020-10-01 00:00:00 UTC000
Oct 20202020-10-01 00:00:00 UTC2020-11-01 00:00:00 UTC000
Nov 20202020-11-01 00:00:00 UTC2020-12-01 00:00:00 UTC101

What Hacker News says

9 sources
I have written almost the identical Scheme interpreters in Ruby and Crystal: [1] and [2]. The biggest difference I have felt between them is the absence of good old Object, which can represent everything at runtime, from Crystal. I had to declare Obj and Val: class Obj end # Value operated by Scheme alias Val = Nil | Obj | Bool | String | Int32 | Float64 | BigInt to define Cons Cell of Scheme: # Cons cell class Cell < Obj include Enumerable(Val) getter car : Val # Head part of the cell property cdr : Val # Tail part of the cell def initialize(@car : Val, @cdr : Val) end ... end # Cell Note that you see generics, Enumerable(Val), and constructor arguments with '@' in the excerpt above. As for performance, Crystal is faster than Ruby 8.6 times as interpreter and 39.4 times as
Read the rest
compiler [3]. You can use Crystal as a superfast (and typed) Ruby interpreter, in a sense. [1] https://github.com/nukata/little-scheme-in-ruby [2] https://github.com/nukata/little-scheme-in-crystal [3] https://github.com/nukata/little-scheme#performance
In Switch from Ruby to Crystal
You are absolutely right. I have written Scheme interpreters in both languages. Compare https://github.com/nukata/little-scheme-in-ruby/blob/v0.3.0/... # Cons cell class Cell include Enumerable attr_reader :car attr_accessor :cdr def initialize(car, cdr) @car = car @cdr = cdr end # Yield car, cadr, caddr and so on, à la for-each in Scheme. def each j = self begin yield j.car j = j.cdr end while Cell === j j.nil? or raise ImproperListException, j end end # Cell and https://github.com/nukata/little-scheme-in-crystal/blob/v0.2... # Cons cell class Cell < Obj include Enumerable(Val) getter car : Val # Head part of the cell property cdr : Val # Tail part of the cell def initialize(@car : Val, @cdr : Val) en
Read the rest
d # Yield car, cadr, caddr and so on, à la for-each in Scheme. def each j = self loop { yield j.as(Cell).car j = j.as(Cell).cdr break unless Cell === j } raise ImproperListException.new(j) unless j.nil? end end # Cell and they will make the point clear. Ruby and Crystal are different languages, but you can translate your code from Ruby to Crystal line by line fairly easily. For the performance boost, see https://github.com/nukata/little-scheme/tree/v1.3.0#performa... which shows times to solve 6-Queens on a meta-circular Scheme as follows: * Crystal 0.34.0: crystal build --release scm.cr: 2.15 sec. * Crystal 0.34.0: crystal scm.cr: 9.88 sec. * Ruby 2.3.7: ruby scm.rb: 84.80 sec. Compiled (and complex enough) Crystal code runs 39 times faster than the equivalent Ruby code in this case.
In Ruby vs. Crystal Performance
I timed each implementation in solving 6-Queens[1] on a meta-circular Scheme[2] (i.e. each Scheme interpreter ran a meta-circular Scheme interpreter to solve 6-Queens). Results are shown in [3]; the order of speed is observed as follows: Go ≈ Java ≈ Crystal(Compiled) ≈ SBCL > C# ≈ PyPy > TypeScript(Node.js) ≈ Crystal ≈ Dart >> PHP > Python ≈ Ruby [1] https://github.com/nukata/little-scheme/blob/v1.2.0/examples... [2] https://github.com/nukata/little-scheme/blob/v1.2.0/scm.scm [3] https://github.com/nukata/little-scheme/tree/v1.2.0#performa...
In Show HN: Scheme with first-class continuations implemented in various languages
This is a small interpreter of a subset of Scheme. It implements the same language as https://github.com/nukata/little-scheme-in-python (and also its meta-circular interpreter, https://github.com/nukata/little-scheme). As a Scheme implementation, it also handles first-class continuations and runs the yin-yang puzzle correctly. $ cat yin-yang-puzzle.scm ;; The yin-yang puzzle ;; cf. https://en.wikipedia.org/wiki/Call-with-current-continuation ((lambda (yin) ((lambda (yang) (yin yang)) ((lambda (cc) (display '*) cc) (call/cc (lambda (c) c))))) ((lambda (cc) (newline) cc) (call/cc (lambda (c) c)))) ;; => \n*\n**\n***\n****\n*****\n******\n... $ little-scheme-in-go yin-yang-puzzle.scm | head * ** *** **** ***** ****** ******* ******** ****
Read the rest
***** $
In Show HN: Scheme with first-class call/cc in 700 lines of Go code

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.