Deru is a Lisp dialect designed to support programming in German (Deutsche Sprache), Russian (Русский язык).
Lisp (LISt Processing) is one of the oldest programming languages, known for its simple syntax and powerful macro system. It's particularly well-suited for symbolic computation and artificial intelligence applications. Deru aims to bring this powerful language into a multilingual context.
This programing language is a example to learn how to make a programming language in a easy way
English:
(print "hello world")
German:
(drucken "Hallo Welt")
Russian:
(печать "привет Мир")
Greet the user:
(drucken "hallo" (eingabe "your name\n"))
Create a function to sum numbers from 0 to a:
(леть sum (фн [a] (/ ( * a (+ a 1) ) 2)))
(sum 100)
Sum two numbers given by the user:
(+ (входнойавтомат) (входнойавтомат))
Check if a number is even or odd:
(wenn (== (% (eingabeautomatik) 2) 0 ) (drucken "even") (drucken "odd"))
Factorial:
(леть fac (фн [n] (если (== n 1 ) 1 (* n (fac (- n 1))) )))
Fibonacci:
(let fibonacci (fn [n] (если (<= n 1) n (+ (fibonacci (- n 1)) (fibonacci (- n 2))))))
Syntax Sugar:
(+ 2 3 12 3 412)
(* 2 3 12 3 412)
-
Clone the repository:
git clone https://github.com/jero98772/deruuk.git cd deruuk
-
Run the main script:
python main.py
We are working on integrating Rust to add Tail Call Optimization (TCO) to improve performance. The related code is currently commented out.
- Lispy by Fluent Python
- Norvig's Lispy
- Make a Lisp (mal) by Kanaka <- give a star to this code i get most of this code from here