HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
bbu
quaint-lang
C2016–2023
bbu / quaint-lang

quaint-lang

An experimental statically typed procedural language with first-class resumable functions.

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

What to know before exploring

What it is

An experimental statically typed procedural language with first-class resumable functions.

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, 3:56:07 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 year9 dated mentions

Observed mentions: 2016-04-15 20:05:29 UTC to 2023-06-22 09:59:30 UTC.

024682016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 8 mentions; 2 submissions, 6 comments20162017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20192020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023

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
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC826
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101

What Hacker News says

9 sources
> I would like to build a rich "process api" that can fork, merge, pause, yield, yield until, drop while, synchronize, wait (latch), react according to events. I feel every distributed systems builds this again and again. Years ago I attempted to build an experimental language with first-class resumable functions. Every function can be invoked by the caller through a special reference type called "quaint". The caller can resume or stop the execution of the function either after reaching a timeout, or after passing a "wait label": https://github.com/bbu/quaint-lang A typical CPU-intensive example where preemption is done by the caller after a certain timeout: entry { fibq: quaint(u32) = ~fibonacci(32 as u32); ps("At start: "), pu8(fibq@start), pnl(); iter: u32 = 0:u32; do { wait fibq fo
Read the rest
r 1000 msec; ps("Iteration "), pu32(iter++), pnl(); } while !fibq@end; ps("At end: "), pu8(fibq@end), pnl(); const value: u32 = *fibq; ps("Reaped value: "), pu32(value), pnl(); } fibonacci(number: u32): u32 { if number == 0:u32 || number == 1:u32 { return number; } else { return fibonacci(number - 1:u32) + fibonacci(number - 2:u32); } } An example that uses "wait labels" to suspend execution of the callee at certain points: entry { q: quaint(u64) = ~pointless_function(); wait q until pointless_function::label_a; ps("At label_a: "), pu8(q@pointless_function::label_a), pnl(); wait q until pointless_function::label_b; ps("At label_b: "), pu8(q@pointless_function::label_b), pnl(); wait q until pointless_function::label_c; ps("At label_c: "), pu8(q@pointless_function::label_c), pnl(); wait q; ps("At end: "), pu8(q@end), pnl(); ps("Result: "), pu64(*q), pnl(); } pointless_function: u64 { i: u64 = 0 as u64; while ++i < 1000000:u64 { x: vptr = malloc(1024:usize); free(x); if i == 300000:u64 { [label_a] } elif i == 600000:u64 { [label_b] } elif i == 900000:u64 { [label_c] } } return i; }
In Coroutines make robot code easy
> You read strictly left to right That wouldn't play well with pointers to arrays and pointers to functions: int (*pa)[X]; // int(*)[X] pa; int (*fp)(void); // int(*)(void) fp; Here is how I designed the type declaration syntax in my own language, Quaint (https://github.com/bbu/quaint-lang): pa: ptr(int[3]); // int (*pa)[3] fp: fptr(): int; // int (*fp)(void) arr: int[5]; // int arr[5] p: ptr(int); // int *p pp: ptr(ptr(int)); // int **pp arrp: ptr[5](int); // int *p[5] You basically have the identifier first, and then a recursive expression which uses mostly function-call-like expressions in order to nest recursive types.
In A convenient untruth: Array notation in C is a lie
IMHO, C's type system is quite orthogonal but is let down by the confusing declarator syntax. I designed my own experimental statically-typed language which basically inherits the C type system, but uses a "human-oriented" declaration syntax: a: int; // int a p: ptr(int); // int *p q: ptr(ptr(long)); // long **q arr: int[20]; // int arr[20] arrp: ptr[20](int); // int *arrp[20] parr: ptr(int[20]); // int (*parr)[20] fp: fptr(a: int, b: int): long; // long (*fp)(int a, int b) https://github.com/bbu/quaint-lang
In Building a C Compiler Type System – Part 1: The Formidable Declarator
Here is how I implemented a small instruction set for the VM of my experimental language, without using GPRs. Basically, instruction operands are divided into 4 classes: - G (global): the operand refers to the global memory space and contains an offset and size. - A (automatic): the operand refers to the current stack frame. The offset is relative to the current base pointer. - I (immediate) - T (temporary): this is where intermediate results from computations are stored. For example, the result of `a + b` from `(a + b) * c` would be stored in the T memory space. Upon the end of a statement in the HLL, all values in the temporary space are discarded. Reference: https://github.com/bbu/quaint-lang/blob/master/src/exec.c
In Design of the RISC-V Instruction Set Architecture [pdf]

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.