Fixed install, fixed typo

This commit is contained in:
Teo
2025-03-21 12:29:32 +09:00
parent 55976c58d2
commit f2f979b11c
3 changed files with 8 additions and 3 deletions

View File

@ -6,9 +6,9 @@ build-release:
test:
@echo "Test release"
@cargo test --release
@MAL_HOME=core cargo test --release
conf:
conf: test
@echo "Copy core and libraries"
@mkdir -p ${HOME}/.config/mal
cp -f core/core.mal ${HOME}/.config/mal/
@ -17,6 +17,7 @@ conf:
install: build-release test conf
@echo "Install mal"
@sudo mkdir -p /usr/local/bin
sudo cp target/release/rust-mal /usr/local/bin/mal
@sudo chown ${USER} /usr/local/bin/mal
@echo "To start mal run:"

View File

@ -5,3 +5,7 @@ Trying and implementing [mal](https://github.com/kanaka/mal) project from [kanak
## Why
Because I need to improve my knowledge of rust and I also don't know how to use lisp
## Installation
Running `make install` should suffice

View File

@ -76,7 +76,7 @@ pub fn ns_init() -> Env {
"car" => Fun(|a| mal_car(car(a)?), "Returns the first element of the list, NIL if its empty"),
"cdr" => Fun(|a| mal_cdr(car(a)?), "Returns all the list but the first element"),
// A tribute to PHP's explode (PHP, a language I never used)
"boom" => Fun(mal_boom, "Split a string into a list of string\n; BE CAREFUL WHEN USING"),
"boom" => Fun(mal_boom, "Split a string into a list of chars\n; BE CAREFUL WHEN USING"),
"read-string" => Fun(|a| read_str(Reader::new().push(car(a)?.if_string()?)).map_err(MalErr::severe), "Tokenize and read the first argument"),
"slurp" => Fun(|a| Ok(Str(read_file(car(a)?.if_string()?)?)), "Read a file and return the content as a string"),
"atom" => Fun(|a| Ok(Atom(Rc::new(RefCell::new(car(a).unwrap_or_default().clone())))), "Return an atom pointing to the given arg"),