Update readme

This commit is contained in:
2025-11-16 18:51:20 +11:00
parent 9d345724ea
commit a9aa0f0e01

View File

@@ -24,7 +24,11 @@ pipple>
Pipple code you write will be run now. Try something like `(print "Hello, World!")`. See what happens!
If you'd like to use Pipple with a file, just add the filename after the executable path.
If you'd like to use Pipple with a file, just add the filename after the executable path, like `pipple path/to/code.ppl`
Pipple also has an experimental transpiler, which will turn your Pipple code into C++. To use, run `pipple -c path/to/code.ppl`. This will print code to the console.
To quickly compile Pipple code, try `pipple -c path/to/code.ppl | g++ -xc++ - -o exename`, where `exename` is the name of the executable to output to.
## Syntax
@@ -40,6 +44,12 @@ Pipple's syntax looks like most other Lisps. You enclose your statements in `(`
### Setting and Changing Variables
`let` initializes a variable for the first time.
`set` changes that variable to something else.
Note: `set` is currently unsupported by the Pipple transpiler.
```
(let x 3.141)
(print x)
@@ -51,6 +61,8 @@ Pipple's syntax looks like most other Lisps. You enclose your statements in `(`
Remember: Polish notation is the key!
Note: All math is currently unsupported by the Pipple transpiler.
```
(let x (+ 3 4))
(print x)
@@ -67,6 +79,8 @@ Remember: Polish notation is the key!
In Pipple, `nil` is the only non-truthy value. Every non-`nil` value is truthy.
Note: All conditionals are currently unsupported by the Pipple transpiler.
```
(let x 0)
(if (== x 0)
@@ -84,6 +98,8 @@ In Pipple, `nil` is the only non-truthy value. Every non-`nil` value is truthy.
### User console input
Note: `input` is currently unsupported by the Pipple transpiler.
```
(let x (input))
(print "You said" x)
@@ -91,6 +107,8 @@ In Pipple, `nil` is the only non-truthy value. Every non-`nil` value is truthy.
### Lists
Note: Lists are currently unsupported by the Pipple transpiler.
```
(list item1 item2 item3)
(list "hi there" 32 nil)
@@ -117,4 +135,4 @@ Valid types in Pipple are:
* int
* double
* string
* list
* list (Currently unsupported by the Pipple transpiler)