SETUP:
Install nim
REPO_PATH=$HOME/repos
cd $REPO_PATH
git clone git@github.com:nim-lang/Nim.git
cd Nim
./build_all.sh
SETUP:
Install nim
REPO_PATH=$HOME/repos
cd $REPO_PATH
git clone git@github.com:nim-lang/Nim.git
cd Nim
./build_all.sh
| import std/[ | |
| os, | |
| json, | |
| tables, | |
| options, | |
| strformat, | |
| strutils, | |
| sugar, | |
| sequtils, | |
| ] |
| --outdir:"build" | |
| --nimcache:"build/cache" | |
| when defined(useObjcArc): | |
| --passC:"-fobjc-arc" | |
| else: | |
| --passC:"-fno-objc-arc" | |
| task withArc, "compile and run with arc": | |
| exec "nim objc --listCmd -d:useObjcArc -r guts.nim" |
| import std/[strformat, atomics, terminal, options] | |
| export options | |
| type | |
| ExceptionInfo* = object | |
| name*: string | |
| msg*: string | |
| stacktrace*: string | |
| ParResult*[T] = object |
| import std/[parseutils, strformat, strutils, tables, sugar, enumerate] | |
| type ParseError* = object of CatchableError | |
| proc parseValue*(x: var int, value: string): bool = parseInt(value, x) > 0 | |
| proc parseValue*(x: var float, value: string): bool = parseFloat(value, x) > 0 | |
| proc parseValue*(x: var string, value: string): bool = | |
| x = value | |
| return true |
| package commandflags | |
| import "core:flags" | |
| import "core:fmt" | |
| import "core:io" | |
| import "core:os" | |
| import "core:strings" | |
| Command :: struct { | |
| name: string, |