mirror of
https://github.com/teo3300/rust-mal.git
synced 2026-01-12 01:05:32 +01:00
Fixed install, fixed typo
This commit is contained in:
5
Makefile
5
Makefile
@ -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:"
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user