This commit is contained in:
parent
031edd2ffe
commit
009472e6a8
1 changed files with 10 additions and 3 deletions
|
@ -24,6 +24,12 @@ cd q
|
||||||
go build
|
go build
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Add a symlink in `~/.local/bin` or `/usr/local/bin`:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
ln -s $PWD/q ~/.local/bin/q
|
||||||
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Quick test:
|
Quick test:
|
||||||
|
@ -46,7 +52,7 @@ q build examples/hello --os windows
|
||||||
|
|
||||||
### Unix scripts
|
### Unix scripts
|
||||||
|
|
||||||
The compiler is actually so fast that it's possible to use `q` for scripting. Create a new file:
|
The compiler is actually so fast that it's possible to use `q` for scripting. Create a new file...
|
||||||
|
|
||||||
```q
|
```q
|
||||||
#!/usr/bin/env q
|
#!/usr/bin/env q
|
||||||
|
@ -58,8 +64,9 @@ main() {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Add permissions via `chmod +x`. The file can be executed from anywhere now.
|
...and add exec permissions via `chmod +x`. The file can be executed from anywhere now.
|
||||||
The machine code is run directly from memory if the OS supports it.
|
|
||||||
|
The generated machine code is run directly from memory if the OS supports it.
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue