Skip to content

Instantly share code, notes, and snippets.

👑
Hunting arcs and orcs

Danil Yarantsev Yardanico

👑
Hunting arcs and orcs
  • Russia
View GitHub Profile
View gist:33ac27d190b0c0a56787c4e23a706db3
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%
View gist:14b46fb435965d8ddfb88beb9bb9d480
./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
View lol.nim
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)
View gist:34c7cc4be173786359386eb2a465ce8d
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
View log.txt
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
View gist:7422b7c80ae945387538b7ced59cc1aa
/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
View thr.nim
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()
View asda.nim
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
View wrong.nim
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:
View tat.nim
import macros, tables
macro echoType(x: typed): untyped =
let impl = x.symbol.getImpl()
# we're called on some type
if impl.kind == nnkTypeDef:
echo "type ", toStrLit(impl)
# we're called on a variable
else:
You can’t perform that action at this time.