From 5cc058023d9142faab9181f1d7e0a4122c43bfc1 Mon Sep 17 00:00:00 2001 From: Mattia Giambirtone Date: Fri, 3 Mar 2023 00:57:28 +0100 Subject: [PATCH 1/2] Added basic build instructions --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cf07296..8511642 100644 --- a/README.md +++ b/README.md @@ -110,4 +110,29 @@ or open an issue/PR! - [Art](https://git.nocturn9x.space/art) <3 - Everyone to listened (and still listens to) me ramble about compilers, programming languages and the likes (and for giving me ideas and testing peon!) - ... More? (I'd thank the contributors but it's just me :P) -- Me! I guess \ No newline at end of file +- Me! I guess + + +## Ok, cool, how do I use it? + +Great question! If this README somehow didn't turn you away already (thanks, by the way), then you may want to try peon +out for yourself. Fortunately, the process is quite straightforward: + +- First, you're gonna have to install [Nim](https://nim-lang.org/), the language peon is written in. I highly recommend + using [choosenim]() to manage your Nim installations as it makes switching between them and updating them a breeze +- Once Nim is installed, you should install [jale](https://git.nocturn9x.space/japl/jale), peon's custom line editor + library written by our beloved [Art](https://git.nocturn9x.space/art). This is needed for the REPL to work: just clone the repository, `cd` into it and run `nimble install`; this will install the library on your + system so that the Nim compiler can find it later +- After jale has been installed, clone this repository and run the REPL with `nim r src/main` (in the appropriate + directory of course). If you want to do more than play around in the REPL, I recommend compiling peon in release + mode with `nim -d:release --passC:"-flto" -o:peon`, which should produce a `peon` binary ready for you to play with + (if your C toolchain doesn't support LTO then you can just omit the `--passC` option, although that would be pretty weird + for a modern linker) +- If you want to move the executable to a different directory (say, into your `PATH`), you should copy peon's standard + library (found in `/src/peon/stdlib`) into a known folder and edit the `moduleLookupPaths` variable inside `src/config.nim` + by adding said folder to it so that the peon compiler knows where to find modules when you `import std;`. Hopefully I will + automate this soon, but as of right now the work is all manual (and it's part of the fun, IMHO ;)) + + +If you've done everything right, you should be able to run `peon` in your terminal and have it drop you into the REPL. Good +luck and have fun! \ No newline at end of file From 0e2a66ce61a5081a42a759441a68a0f3862f542a Mon Sep 17 00:00:00 2001 From: Mattia Giambirtone Date: Fri, 3 Mar 2023 01:02:30 +0100 Subject: [PATCH 2/2] Added choosenim link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8511642..53f71f7 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ Great question! If this README somehow didn't turn you away already (thanks, by out for yourself. Fortunately, the process is quite straightforward: - First, you're gonna have to install [Nim](https://nim-lang.org/), the language peon is written in. I highly recommend - using [choosenim]() to manage your Nim installations as it makes switching between them and updating them a breeze + using [choosenim](https://github.com/dom96/choosenim) to manage your Nim installations as it makes switching between them and updating them a breeze - Once Nim is installed, you should install [jale](https://git.nocturn9x.space/japl/jale), peon's custom line editor library written by our beloved [Art](https://git.nocturn9x.space/art). This is needed for the REPL to work: just clone the repository, `cd` into it and run `nimble install`; this will install the library on your system so that the Nim compiler can find it later