more readme edits
This commit is contained in:
parent
f1d17a2d5f
commit
901037fa30
1 changed files with 22 additions and 4 deletions
26
Readme.md
26
Readme.md
|
|
@ -40,7 +40,12 @@ Function call: `(append () 1 2 3)`
|
||||||
|
|
||||||
System binary call: `(vim Readme.md)`
|
System binary call: `(vim Readme.md)`
|
||||||
|
|
||||||
Control flow statement: `(if (eq "example" (fread 'test_file')) (print "test worked) (rm -rf /))`
|
```
|
||||||
|
; complex call
|
||||||
|
(if (eq "example" (fread 'test_file'))
|
||||||
|
(print "test worked")
|
||||||
|
(rm -rf /))
|
||||||
|
```
|
||||||
|
|
||||||
There may be alternative REPLs, officially or from community members, that do not exhibit this behavior.
|
There may be alternative REPLs, officially or from community members, that do not exhibit this behavior.
|
||||||
|
|
||||||
|
|
@ -49,6 +54,11 @@ Export is used to define variables.
|
||||||
|
|
||||||
`(export NAME (value))`
|
`(export NAME (value))`
|
||||||
|
|
||||||
|
Example export:
|
||||||
|
```
|
||||||
|
(export vim 'nvim')
|
||||||
|
```
|
||||||
|
|
||||||
Users may also leverage the `export` function to create aliases in the SHS shell.
|
Users may also leverage the `export` function to create aliases in the SHS shell.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
@ -85,7 +95,9 @@ The if form takes 3 arguments. It evaluates the first argument, the condition, a
|
||||||
|
|
||||||
```
|
```
|
||||||
(if (cond) (then) (else))
|
(if (cond) (then) (else))
|
||||||
(if (= 1 1.0) (print "numbers are equal") (print "numbers are not equal"))
|
(if (eq 1 1.0)
|
||||||
|
(print "numbers are equal")
|
||||||
|
(print "numbers are not equal"))
|
||||||
```
|
```
|
||||||
|
|
||||||
#### while loops
|
#### while loops
|
||||||
|
|
@ -114,7 +126,12 @@ Any characters after a semicolon will be ignored until end of line. Semicolons f
|
||||||
|
|
||||||
## How to build
|
## How to build
|
||||||
### Compiling/Installation
|
### Compiling/Installation
|
||||||
- For now simply run `go install ./cmd/shs` . If you have $GOPATH and $GOBIN set in your shell it should be usable with $PATH.
|
1. [follow Google's instructions to install Go](https://golang.org/doc/install)
|
||||||
|
- after these instructions you should have $GOPATH set
|
||||||
|
2. run `$ go get -u gitlab.com/whom/shs`
|
||||||
|
3. change directory to $GOPATH/src/gitlab.com/whom/shs
|
||||||
|
4. run `$ go install ./cmd/shs.go`
|
||||||
|
- if you have the Go binary directory in your path you can now call `shs` via the shell
|
||||||
|
|
||||||
### Adding SHS to your application
|
### Adding SHS to your application
|
||||||
Here are some important tips for integrating an SHS REPL into another codebase.
|
Here are some important tips for integrating an SHS REPL into another codebase.
|
||||||
|
|
@ -153,13 +170,14 @@ Here is an example of a SHS configuration file:
|
||||||
```
|
```
|
||||||
|
|
||||||
## The Docs
|
## The Docs
|
||||||
|
|
||||||
|
#### Godoc
|
||||||
What follows are links to documentation for the code and interfaces used by SHS. This documentation is automatically generated by godoc, and in times of transition may not be complete.
|
What follows are links to documentation for the code and interfaces used by SHS. This documentation is automatically generated by godoc, and in times of transition may not be complete.
|
||||||
- [Documentation on language interpreter](https://godoc.org/gitlab.com/whom/shs/ast)
|
- [Documentation on language interpreter](https://godoc.org/gitlab.com/whom/shs/ast)
|
||||||
- [Documentation on logging module](https://godoc.org/gitlab.com/whom/shs/log)
|
- [Documentation on logging module](https://godoc.org/gitlab.com/whom/shs/log)
|
||||||
- [Documentation on configuration module](https://godoc.org/gitlab.com/whom/shs/config)
|
- [Documentation on configuration module](https://godoc.org/gitlab.com/whom/shs/config)
|
||||||
- [Documentation on utility functions](https://godoc.org/gitlab.com/whom/shs/util)
|
- [Documentation on utility functions](https://godoc.org/gitlab.com/whom/shs/util)
|
||||||
- [Documentation on standard library](https://godoc.org/gitlab.com/whom/shs/stdlib)
|
- [Documentation on standard library](https://godoc.org/gitlab.com/whom/shs/stdlib)
|
||||||
- [Guide to standard library](https://gitlab.com/whom/shs/-/blob/master/stdlib/Readme.md)
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
- Any contribution to this software is welcome as long as it adheres to the conduct guidelines specified in the `Contributing.md` file in this repository.
|
- Any contribution to this software is welcome as long as it adheres to the conduct guidelines specified in the `Contributing.md` file in this repository.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue