frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: A toy compiler I built in high school (runs in browser)

https://vire-lang.web.app
2•xeouz•1h ago
Hey HN,

Indian high schooler here, currently prepping for JEE, thought itd be nice to share here.

Three years ago in 9th/10th grade I got a knack for coding, I taught myself and made a custom compiler with LLVM to try to learn C++. So I spent a lot of time learning LLVM from the docs and also C++. It's not some marvelous piece of engineering,

I designed the syntax to be a mix of C and what I wished C looked like back in 9th grade.

It has:

  - Basic types like bool, int, double, float, char etc. with type casting
  - Variables, Arrays, Assign operators & Shorthands
  - Conditionals (if/else-if/else), Operators (and/or), arithmetics (parenthesis etc)
  - Arrays and indexing stuff
  - C style Loops (for/while) and break/continue
  - Structs and dot accessing
  - extern C interop with the "extern" keyword
Some challenges I faced:

  - Emscripten and WASM, as I also had to make it run on my demo website
  - Learning typescript and all for the website (lol)
  - Custom parser with basic error reporting and Semantic analysis was a PITA for my undeveloped brain (I was 15)
  - Learning LLVM from the docs
Important Learnings:

  - Testing is a very important aspect of making software, I skipped it - big regret
  - Learning how computers interpret text
  - Programming in general was a new tour for me
  - I appreciate unique_ptrs and ownership
Github: https://github.com/xeouz/virec

Its on my github and there's a link to my web demo (https://vire-lang.web.app/), it might take some time to load the binary from firebase.

Very monolithic, ~7500 lines of code, I’d really appreciate any feedback, criticism, or pointers on how I could’ve done this better.

Comments

xeouz•1h ago
OP here! If anyone is curious about the syntax without opening the demo, here is an implementation of insertion sort:

extern puti(n: int);

func sort(arr: int[5]) {

    let i=0;
    let key=0;
    let j=0;

    for(i=0; i<5; ++i)
    {
        key = arr[i];
        j = i-1;

        while(j>=0)
        {
            if(arr[j] < key)
            {
                break;
            }

            arr[j + 1] = arr[j];
            j-=1;
        }

        arr[j + 1] = key;
    }
}

let arr=[61,86,53,19,61];

sort(arr);

for(let i=0; i<5; ++i) {

    puti(arr[i]);

}

Portuguese icon (FROM A CAN) makes a simple meal (Canned Fish Files) [video]

https://www.youtube.com/watch?v=e9FUdOfp8ME
1•zeristor•53s ago•0 comments

Brookhaven Lab's RHIC Concludes 25-Year Run with Final Collisions

https://www.hpcwire.com/off-the-wire/brookhaven-labs-rhic-concludes-25-year-run-with-final-collis...
1•gnufx•3m ago•0 comments

Transcribe your aunts post cards with Gemini 3 Pro

https://leserli.ch/ocr/
1•nielstron•6m ago•0 comments

.72% Variance Lance

1•mav5431•7m ago•0 comments

ReKindle – web-based operating system designed specifically for E-ink devices

https://rekindle.ink
1•JSLegendDev•9m ago•0 comments

Encrypt It

https://encryptitalready.org/
1•u1hcw9nx•9m ago•1 comments

NextMatch – 5-minute video speed dating to reduce ghosting

https://nextmatchdating.netlify.app/
1•Halinani8•10m ago•1 comments

Personalizing esketamine treatment in TRD and TRBD

https://www.frontiersin.org/articles/10.3389/fpsyt.2025.1736114
1•PaulHoule•11m ago•0 comments

SpaceKit.xyz – a browser‑native VM for decentralized compute

https://spacekit.xyz
1•astorrivera•12m ago•1 comments

NotebookLM: The AI that only learns from you

https://byandrev.dev/en/blog/what-is-notebooklm
1•byandrev•12m ago•1 comments

Show HN: An open-source starter kit for developing with Postgres and ClickHouse

https://github.com/ClickHouse/postgres-clickhouse-stack
1•saisrirampur•13m ago•0 comments

Game Boy Advance d-pad capacitor measurements

https://gekkio.fi/blog/2026/game-boy-advance-d-pad-capacitor-measurements/
1•todsacerdoti•13m ago•0 comments

South Korean crypto firm accidentally sends $44B in bitcoins to users

https://www.reuters.com/world/asia-pacific/crypto-firm-accidentally-sends-44-billion-bitcoins-use...
2•layer8•14m ago•0 comments

Apache Poison Fountain

https://gist.github.com/jwakely/a511a5cab5eb36d088ecd1659fcee1d5
1•atomic128•16m ago•2 comments

Web.whatsapp.com appears to be having issues syncing and sending messages

http://web.whatsapp.com
1•sabujp•16m ago•2 comments

Google in Your Terminal

https://gogcli.sh/
1•johlo•18m ago•0 comments

Shannon: Claude Code for Pen Testing: #1 on Github today

https://github.com/KeygraphHQ/shannon
1•hendler•18m ago•0 comments

Anthropic: Latest Claude model finds more than 500 vulnerabilities

https://www.scworld.com/news/anthropic-latest-claude-model-finds-more-than-500-vulnerabilities
2•Bender•23m ago•0 comments

Brooklyn cemetery plans human composting option, stirring interest and debate

https://www.cbsnews.com/newyork/news/brooklyn-green-wood-cemetery-human-composting/
1•geox•23m ago•0 comments

Why the 'Strivers' Are Right

https://greyenlightenment.com/2026/02/03/the-strivers-were-right-all-along/
1•paulpauper•24m ago•0 comments

Brain Dumps as a Literary Form

https://davegriffith.substack.com/p/brain-dumps-as-a-literary-form
1•gmays•24m ago•0 comments

Agentic Coding and the Problem of Oracles

https://epkconsulting.substack.com/p/agentic-coding-and-the-problem-of
1•qingsworkshop•25m ago•0 comments

Malicious packages for dYdX cryptocurrency exchange empties user wallets

https://arstechnica.com/security/2026/02/malicious-packages-for-dydx-cryptocurrency-exchange-empt...
1•Bender•25m ago•0 comments

Show HN: I built a <400ms latency voice agent that runs on a 4gb vram GTX 1650"

https://github.com/pheonix-delta/axiom-voice-agent
1•shubham-coder•26m ago•0 comments

Penisgate erupts at Olympics; scandal exposes risks of bulking your bulge

https://arstechnica.com/health/2026/02/penisgate-erupts-at-olympics-scandal-exposes-risks-of-bulk...
4•Bender•26m ago•0 comments

Arcan Explained: A browser for different webs

https://arcan-fe.com/2026/01/26/arcan-explained-a-browser-for-different-webs/
1•fanf2•28m ago•0 comments

What did we learn from the AI Village in 2025?

https://theaidigest.org/village/blog/what-we-learned-2025
1•mrkO99•28m ago•0 comments

An open replacement for the IBM 3174 Establishment Controller

https://github.com/lowobservable/oec
1•bri3d•31m ago•0 comments

The P in PGP isn't for pain: encrypting emails in the browser

https://ckardaris.github.io/blog/2026/02/07/encrypted-email.html
2•ckardaris•33m ago•0 comments

Show HN: Mirror Parliament where users vote on top of politicians and draft laws

https://github.com/fokdelafons/lustra
1•fokdelafons•33m ago•1 comments