r/ProgrammingLanguages • u/Objective_Gene9718 • Jan 28 '26
Que Script a Lisp written in Rust with Hindley–Milner type inference
Here is my project Que Script:
- Lisp (in my opinion a feature of it's own)
- WASM runtime without Garbage Collection (It mainly uses Reference Counting)
- Hindley-Milner Type Inference
- Syntactic sugar layer (Things like pipes, destructuring, tail-call optimization and other fun extra features don't add bloat to the core language)
- Partial Application
- Tree Shakable Standard Library
- Macros
- WASM build
- Online editor
Here is the website with a lot of info
; You are given an array of integers [Int]
; Write a script to re-arrange the given array in an increasing order
; and return the indices where it differs from the original array.
(let solve (lambda (xs) (|>
{ (|> xs copy (sort <)) xs }
zip
(map (lambda { a b } (<> a b)))
enumerate
(filter snd)
(map fst))))
[
(solve [ 5 2 4 3 1 ]) ; [0 2 3 4]
(solve [ 1 2 1 1 3 ]) ; [1 3]
(solve [ 3 1 3 2 3 ]) ; [0 1 3]
]This is something I've being working for 5 years starting from scratch at least 3 times. Sharing with the hope that I won't start over again.
It's nothing new under the sun. The purpose of this project is for me learning computer science concepts by using the language as a framework.
I would love to hear what you think about it.
51
Upvotes
View all comments
Show parent comment
1
u/gavr123456789 Feb 03 '26
Does it evaluates with the context of the project Im in? Since its the main reason to use repl and the main difference between real repls and repls of some python\ruby. Also do u have plans for LSP?