This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const routerdll = "librouter.dll" | |
const | |
stEnableDebug = 0 | |
stDebugVerbosity = 1 | |
stWriteLogCallback = 2 | |
stSetTableDataCallback = 3 | |
stUserAgent = 4 | |
stUseCustomPage = 5 | |
stCustomPage = 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
total executions of each stack trace: | |
Entry: 1/41 Calls: 239/689 = 34.69% [sum: 239; 239/689 = 34.69%] | |
test.nim: expand 632/689 = 91.73% | |
test.nim: test 689/689 = 100.00% | |
Entry: 2/41 Calls: 55/689 = 7.98% [sum: 294; 294/689 = 42.67%] | |
test.nim: pixelsOn 55/689 = 7.98% | |
test.nim: test 689/689 = 100.00% | |
Entry: 3/41 Calls: 42/689 = 6.10% [sum: 336; 336/689 = 48.77%] | |
hashes.nim: hash 181/689 = 26.27% | |
hashes.nim: hash 181/689 = 26.27% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./koch boot -d:release | |
iteration: 1 | |
compiler/nim0 c -d:release --nimcache:nimcache/r_macosx_amd64 compiler/nim.nim | |
Error: Requested executable is missing. (Path: /Users/tiber/.choosenim/toolchains/nim-#devel/bin/nim0) | |
Info: If unexpected, please report this error to https://github.com/dom96/choosenim | |
FAILURE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import osproc | |
let komande = ["-f", "video4linux2", "-s 640x480", "-i /dev/video0", "-ss 0:0:2", "-frames 1" , "/tmp/out.jpg"] | |
let process = startProcess("ffmpeg", "", komande) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC: compiler_koch | |
Error: invocation of external compiler program failed. No such file or directory | |
Additional info: Could not find command: '/bin/sh'. OS error: No such file or directory 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nim.nim(121) nim | |
nim.nim(77) handleCmdLine | |
main.nim(167) mainCommand | |
main.nim(74) commandCompileToC | |
modules.nim(240) compileProject | |
modules.nim(180) compileModule | |
passes.nim(218) processModule | |
passes.nim(136) processTopLevelStmt | |
cgen.nim(1337) myProcess | |
ccgstmts.nim(1163) genStmts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/tiber/stuff/nlvm/nlvm/nimcache/llgen.o: In function `add_BZDxkHufyxnxOdirpHMKRg(unsigned char, char*, unsigned long long, unsigned int, void*)': | |
/home/tiber/stuff/nlvm/nlvm/nimcache/llgen.c:27353: undefined reference to `LLVMNimDIBuilderCreateBasicType(tyObject_DIBuilder_sPte9bVxDg6xXfmAqEwh1Og*, char*, unsigned long long, unsigned int)' | |
/home/tiber/stuff/nlvm/nlvm/nimcache/llgen.o: In function `debugGetFile_b53tDsI4Mt2iuuXOrTeirg(tyObject_LLGenObj_jb9aF0IFhpKDYHmJ5jeqOCw*, int)': | |
/home/tiber/stuff/nlvm/nlvm/nimcache/llgen.c:5099: undefined reference to `LLVMNimDIBuilderCreateFile(tyObject_DIBuilder_sPte9bVxDg6xXfmAqEwh1Og*, char*, char*)' | |
/home/tiber/stuff/nlvm/nlvm/nimcache/llgen.o: In function `debugStructType_kXAsqnfOOudFZxbv7JyWug_2(tyObject_LLGenObj_jb9aF0IFhpKDYHmJ5jeqOCw*, tyObject_TType_LTUWCZolpovw9cWE3JBWSUw*)': | |
/home/tiber/stuff/nlvm/nlvm/nimcache/llgen.c:5913: undefined reference to `LLVMNimDIBuilderCreateStructType(tyObject_DIBuilder_sPte9bVxDg6xXfmAqEwh1Og*, tyObject_OpaqueNimMetadata_6qV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import httpclient, locks, json, strutils, sequtils, os | |
var | |
threads: array[3, Thread[int]] | |
chans: array[3, Channel[string]] | |
echoLock: Lock | |
proc echoTrue(chanId: int) {.thread.} = | |
let url = chans[chanId].recv() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template unpackInt*(s: Stream, format: string): int = | |
## Unpack one or more bytes into an ``int``. | |
## The format can be "b", "B" or endiannes | |
## followed by input type: "<I", ">h", "!H" | |
## | |
## .. code-block:: nim | |
## unpackInt("\x7f\xff", ">h") == 32767 | |
## | |
## ====== ====================== ==== | |
## symbol endianness size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
Iterable[T] = concept it | |
# items() iterator | |
for item in items(it): | |
type(item) is T | |
proc cycle*[T](s: Iterable[T], n: Natural): seq[T] = | |
when compiles(s.len): | |
result = newSeqOfCap[T](n * s.len) | |
else: |