HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
graalvm
simplelanguage
Java2018–2024
graalvm / simplelanguage

simplelanguage

A simple example language built using the Truffle API.

5Distinct people
7Mentions
0Explicit recommenders
644GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A simple example language built using the Truffle API.

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, 1:49:46 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 year7 dated mentions

Observed mentions: 2018-04-17 21:04:04 UTC to 2024-03-06 20:13:07 UTC.

01232018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024

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
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC101
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 UTC101
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 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC202

What Hacker News says

7 sources
really developers manipulate abtract words that are ungrounded in reality. You care about speed, feature set/expressivity and simplicity. GraalVM has the three, it is the fastest JIT out there, it brings you so many features out of the box, including state of the art grabage collector and unique language polyglotism interop, and the API is the simplest there is for building a language. https://github.com/graalvm/simplelanguage
In Ask HN: Recommendation for general purpose JIT compiler
> Can someone please give a sober explanation of what GraalVM, is and how Truffle works? GraalVM is basically a JVM with a new compiler, the Graal compiler. Truffle is the language implementation framework for GraalVM and designed to build AST interpreter. The Graal compiler can optimize Truffle ASTs through partial evaluation (see "One VM to rule them all" paper [1]), and produces machine code directly without using Java bytecode as IR. > how do JS semantics get expressed in a Java VM? Graal.js comes with a parser for JavaScript code that generates a Truffle ASTs for a given JavaScript program. JS semantics are defined within the AST nodes (see [2]). > What does a getProperty instruction look like? I think getProperty is implemented in `CachedGetPropertyNode` [3], but I am not sure as there are multiple other property-related nodes. > Ho
Read the rest
w does it know when to invalidate inline caches? Unfortunately, Graal.js lacks documentation for `CachedGetPropertyNode`. But I encourage you to have a look at SimpleLanguage [4], a JS-like toy language and the reference language implementation for Truffle with proper documentation. [5] explains how reading properties and invalidating inline caches works and it's all done using the Truffle DSL. The `@Specialization` annotation [6] might be a good starting point if you want to learn how it works. You may also want to check out the docs on the GraalVM website (e.g. [7]). [1] https://doi.org/10.1145/2509578.2509581 [2] https://github.com/graalvm/graaljs/tree/a36b978aa328a8da3a7f... [3] https://github.com/graalvm/graaljs/blob/a36b978aa328a8da3a7f... [4] https://github.com/graalvm/simplelanguage [5] https://github.com/graalvm/simplelanguage/blob/a25e385dd8626... [6] https://www.graalvm.org/truffle/javadoc/com/oracle/truffle/a... [7] https://www.graalvm.org/docs/Truffle-Framework/user/README
In GraalVM
Truffle makes it possible to implement a JITed dynamically-typed language simply by annotating actions on the AST. http://www.graalvm.org/docs/graalvm-as-a-platform/implement-... Here's an example of the addition operator from Graal's SimpleLanguage: @NodeInfo(shortName = "+") public abstract class SLAddNode extends SLBinaryNode { @Specialization(rewriteOn = ArithmeticException.class) protected long add(long left, long right) { return Math.addExact(left, right); } @Specialization @TruffleBoundary protected SLBigNumber add(SLBigNumber left, SLBigNumber right) { return new SLBigNumber(left.getValue().add(right.getValue())); } @Specialization(guards = "isString(left, right)") @TruffleBoundary protected String add(Object left, Object right) { retu
Read the rest
rn left.toString() + right.toString(); } protected boolean isString(Object a, Object b) { return a instanceof String || b instanceof String; } } https://github.com/graalvm/simplelanguage By default it uses an arbitrary precision adder. But node rewriting on the AST (predicated by the "guard") provides specializations for long and String types. The long-type execution is a "fast path" that executes machine instructions directly; the String-type execution is a string concatenation. A research paper provides further details: https://dl.acm.org/citation.cfm?id=2658776 The full tutorial is at: https://github.com/oracle/graal/blob/master/truffle/docs/Lan...
In GraalVM: Run Programs Faster Anywhere

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.