mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-26 05:07:41 +00:00 
			
		
		
		
	
			
				
					
						
					
					a15f62e4b2845f8775ff7d44311687dbb0dbd8d0
				
			
			
		
	dst
dst is a functional programming language and vm. It is a variant of Lisp with several native useful datatypes. Some of the more interesting and useful features are first class functions and closures, immutable and mutable hashtables, arrays, and bytebuffers, macros (NYI), tail-call optimization, and continuations (coroutines, error handling). The runtime and compiler are written in C99.
There is a repl for trying out the language, as well as the ability to run script files. This client program is separate from the core runtime, so dst could be embedded into other programs.
Features
- First class closures
- Garbage collection
- Lexical scoping
- First class green threads (continuations)
- Mutable and immutable arrays (array/tuple)
- Mutable and immutable hashtables (table/struct)
- Mutable and immutable strings (buffer/string)
- Byte code interpreter with an assembly interface, as well as bytecode verification
- Proper tail calls for functional code
- Direct interop with C
- REPL (read eval print loop)
The code can be compiled to be either a bytecode interpreter and runtime, or a full language.
Compiling and Running
To build the runtime and run test, run
make test
A repl can also be run with
make repl
					Languages
				
				
								
								
									C
								
								76%
							
						
							
								
								
									Janet
								
								21.7%
							
						
							
								
								
									Makefile
								
								0.8%
							
						
							
								
								
									Meson
								
								0.7%
							
						
							
								
								
									Roff
								
								0.4%
							
						
							
								
								
									Other
								
								0.3%
							
						
					