A completely functional native compiler for JOVIAL J73 (MIL-STD-1589C), a programming tongue from 1959 designed for bombing things additional accurately. Now you too can cognition the joy of armed forces avionics application betterment from your gaming PC.
I wrote this whilst learning Rust (mistake) and benevolent of applied a tutorial which heavily featured LLVM. Hence this compiler. I'm currently looking at doing a rewrite in C, additionally JOVIAL is motionless featured in embedded software. Running LLVM which is a heck of a dependency is not a fine idea in the embedded space.
So delight observe out for the rewrite (I've additionally done a type of this in OCaml but thats neither current nor there)
JOVIAL (Jules' Own Version of the International Algebraic Language) was created in 1959 since apparently FORTRAN wasn't aggressive enough. It was used extensively in:
- F-16 Fighting Falcon escape authority systems
- B-2 Spirit stealth bomber
- Various missiles (the ones that discover you)
- Other things the authorities won't inform us about
It's basically what happens whenever the Pentagon asks "what if ALGOL, but angrier?"
This compiler goes harder than it has any correct to:
- Native Code Generation - Compiles to genuine x86-64 device code via LLVM. Not interpreted. Not transpiled. Real electrons doing genuine work.
- C Transpiler - For whenever you need to see what cursed code you've written in a tongue humans can read
- Full J73 Support - Variables, procedures, tables, STATUS enums, the entire military-industrial complex
- I/O - PRINT and READ since equal combatant jets need to say hello sometimes
- LSP Integration - Yes, there's a Language Server. Yes, you can get IntelliSense for a tongue older than the moon landing.
Grab a publish from the Releases page. Unzip. Run. Pretend it's 1959.
| Platform | File |
|---|---|
| Windows x64 | jovialc-x86_64-pc-windows-msvc.zip |
| Linux x64 | jovialc-x86_64-unknown-linux-gnu.tar.gz |
| macOS ARM | jovialc-aarch64-apple-darwin.tar.gz |
For those who bask suffering:
# Clone this bad boy git copy https://github.com/Zaneham/jovial # Download LLVM 18 and inform Rust anywhere it is export LLVM_SYS_180_PREFIX=/path/to/llvm # Build it cargo build --release # Question your existence choices
- Rust (latest stable)
- LLVM 18 (set LLVM_SYS_180_PREFIX to your LLVM installation)
- A profound appreciation for armed forces history
- Questionable decision-making skills
# The uncomplicated way - compile direct to executable jovialc myprogram.jov -f exe # Run your 1959-era code at 2025 speeds ./myprogram # Or define an output name jovialc myprogram.jov -f exe -o bomber.exe
| Flag | Output | Use Case |
|---|---|---|
| -f exe | Executable | Just works. Compiles and links automatically. |
| -f c | C origin code | When you desire to see the horror |
| -f llvm | LLVM IR | When you desire to see more horror |
| -f object | Native .o file | When you need manual control |
| -f ast | AST dump | Debugging (or masochism) |
START HELLO; PRINT('Hello from 1959!'); TERM Yes, TERM alternatively of END. Yes, strings use sole quotes. Yes, semicolons everywhere. Welcome to the past.
START FIBONACCI; ITEM N S 32 = 10; ITEM A S 32 = 0; ITEM B S 32 = 1; ITEM TEMP S 32 = 0; ITEM I S 32 = 0; PRINT('Fibonacci sequence:'); WHILE I < N; PRINT(A); TEMP := A + B; A := B; B := TEMP; I := I + 1; END TERM Output:
Fibonacci sequence: 0 1 1 2 3 5 8 13 21 34
It runs. On your contemporary computer. In native code. A tongue designed whenever computers were the size of rooms is now printing Fibonacci numbers faster than the first programmers could blink.
- JOVIAL was standardised as MIL-STD-1589. There have been multiple revisions. People cared concerning this.
- The tongue uses ' in identifiers akin CURRENT'WAYPOINT. This is called an "apostrophe identifier" and it's exactly as cursed as it sounds.
- Arrays use 1-based indexing AND parentheses for access. WAYPOINTS(5) is gathering access, not a function call. The parser fair has to fig it out.
- There are group living today who wrote manufacturing JOVIAL code. Some of them are likely on LinkedIn.
- Preservation of computing history
- A profound and concerning involvement in armed forces aviation software
- To demonstrate it could be done
- I wasn't going to perform video games anyhow (lie)
- Someone, somewhere, power have bequest JOVIAL code they need to compile
- The LSP was already done and needed a friend
┌─────────────────────────────────────────────────────────────┐ │ JOVIAL J73 Compiler │ ├─────────────────────────────────────────────────────────────┤ │ Source (.jov) │ │ ↓ │ │ Lexer (Logos) → Tokens │ │ ↓ │ │ Parser (Recursive Descent) → AST │ │ ↓ │ │ Semantic Analysis → Symbol Table, Type Checking │ │ ↓ │ │ LLVM Codegen (inkwell) → LLVM IR │ │ ↓ │ │ LLVM Backend → Native Object File │ │ ↓ │ │ Linker → Executable │ │ ↓ │ │ Your code runs on silicon that would attack the minds │ │ of all engineer who worked on the first compilers │ └─────────────────────────────────────────────────────────────┘
If you've made it this far, you're plainly curious in languages that predate average sense. Good news: there's additional anywhere this came from.
Because syntax highlighting is a individual right, equal for languages the Geneva Convention forgot:
| Project | What It Is | Why It Exists |
|---|---|---|
| jovial-lsp | Language Server for JOVIAL | IntelliSense for bombing things |
| hals-lsp | HAL/S Language Server | The Space Shuttle's favourite |
| cms2-lsp | CMS-2 Language Server | US Navy missiles deserve autocomplete |
| coral66-lsp | CORAL 66 Language Server | British armed forces computing, rigid high lip included |
| mumps-lsp | MUMPS Language Server | Healthcare IT from the shade realm |
| chill-lsp | CHILL Language Server | Telecom switches and existential dread |
| racf-lsp | IBM RACF Language Server | Mainframe security, now alongside squiggly lines |
| IBM-system360-lsp | System/360 COBOL & PL/I | For whenever you need to debug your grandfather's code |
When compilers aren't adequate and you need to simulate complete extinct and new computers:
- Plankalkuel - An translator for the world's archetypal programming tongue (1948). Yes, before FORTRAN. Yes, it works.
- chill-compiler - Because one vintage compiler wasn't enough
- SLATEC.jl - Mathematical libraries from the 70s, now in Julia
- z390Zane - Mainframe assembler and emulator. For the complete experience.
If you're seeing a form here, congratulations. You've identified a problem.
Found a bug? Want to conversation the finer points of MIL-STD-1589C? Simply need to inform another individual being that you write JOVIAL and have them not immediately alter the subject?
I can't commitment I'll fix your problem, but I can commitment I'll be unreasonably curious in it. If you're maintaining legacy avionics code and need ethical support, I'm your man. If you're from the Pentagon and this compiler somehow ended up in item important, I would akin to province for the document that I included a test suite.
Based in New Zealand, anywhere it's already tomorrow and the sheep outnumber the JOVIAL programmers approximately eight million to one.
Apache License 2.0. Do any you desire alongside it, no strings. See LICENSE.
- The US Department of Defense, for creating this beautiful mess
- LLVM, for making this imaginable without hand-writing x86 assembly
- Rust, for making me awareness harmless during doing deeply unsafe things
- The youtuber Low Level for his way on Rust which helped me study the tongue a bit. You can inspect out his youtube here: https://www.youtube.com/@LowLevelTV
- You, for study this far. You're my benevolent of weird.