• Stars
    star
    117
  • Rank 301,828 (Top 6 %)
  • Language
    Clojure
  • Created about 13 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Clojure-based x86 assembler and toy Lisp compiler

What is Lithium?

Lithium is an attempt at several things at once:

  • An assembler for x86 CPUs, written in Clojure and using Clojure S-expressions as its input data. This part has been first announced in this blog post.
  • A compiler for a toy Lisp-like language, using that assembler as a backend. The compiler is being written following the guidelines found in a paper "An Incremental Approach to Compiler Construction."

The purposes of Lithium are, first and foremost, to learn and to have fun.

Try it out

In the REPL:

(require '[lithium.compiler :as compiler])
(compiler/compile-and-run! "examples/stripes-grey.clj")

License

Unless otherwise noted, code in this repository is copyright by Daniel Janus and released under the MIT license:

Copyright 2012–2021 Daniel Janus

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

The assembly code in register-dump is a s-expression version of a snippet that comes from http://www.fysnet.net/yourhelp.htm and is copyright by Forever Young Software.

More Repositories

1

skyscraper

Structural scraping for the rest of us.
Clojure
387
star
2

clj-tagsoup

A HTML parser for Clojure.
Clojure
179
star
3

clj-iter

A Clojure iteration macro inspired by Common Lisp iterate.
Clojure
45
star
4

wordchampions

A fun word game!
Clojure
27
star
5

sunflower

Easily extract content from a bunch of similarly-formatted HTML files.
Clojure
23
star
6

soupscraper

dej, mam umierajoncom zupe
Clojure
19
star
7

smyrna

Prosty konkordancer dla języka polskiego
Clojure
18
star
8

summhn

Clojure
12
star
9

clj-tvision

Turbo Vision, the Clojure way
Clojure
11
star
10

cartestian

Test all the combinations
Clojure
9
star
11

clj-json-rpc

A Clojure handler for JSON-RPC compatible with Ring
Clojure
9
star
12

solitaire

Sample app for the re-frame workshop
Clojure
8
star
13

clj-bitfields

Easy accessing C-compatible packed bitfields from Clojure.
Clojure
7
star
14

gumtree-scraper

Gumtree RSS generator
Clojure
6
star
15

spleen

A Scrabble engine written in Clojure.
Clojure
5
star
16

koronalotek

na kogo wypadnie, na tego covid
Clojure
4
star
17

oswn

Operating System Without Name
Assembly
3
star
18

croissant

Yet another web-application framework in Common Lisp.
2
star
19

clj-nkjp

Clojure tools for processing the National Corpus of Polish
Clojure
2
star
20

nhp

Static site generator for my homepage
Clojure
2
star
21

ruby-continuation-webapp

Proof-of-concept continuation-based Sinatra webapp.
Ruby
2
star
22

dxces

A converter of text collections in .txt format to XCES for use with Poliqarp.
Python
2
star
23

haze

Haskellish Abominable Z-machine Emulator
Haskell
2
star
24

setgame

An implementation of Set game in Clojure.
Clojure
1
star
25

cl-netstrings

Reading and writing netstrings from/to binary streams in Common Lisp
Common Lisp
1
star
26

color-europe

Color your own Europe in Clojure!
Clojure
1
star
27

polelum

Clojure
1
star
28

skyscraper-cache-rocksdb

A cache backend for Skyscraper based on RocksDB.
1
star
29

psps

Przenośny Słownik Polskiego Scrabblisty
C
1
star
30

skyscraper-cache-mapdb

A MapDB-based cache backend for Skyscraper.
Clojure
1
star
31

blogs

My Octopress blogs.
Ruby
1
star
32

dotemacs

My Emacs configuration.
Emacs Lisp
1
star
33

versions

Research on Clojure version numbers, in Clojure.
Clojure
1
star
34

pallium

Clojure
1
star