Skip to content

Instantly share code, notes, and snippets.

Danil Yarantsev Yardanico

Block or report user

Report or block Yardanico

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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
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
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)
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
View gist:7a042bf55895a7cb763a03c72ebd52b6
HTTP/1.1 200 OK
Server: nginx
Date: Fri, 20 Oct 2017 19:12:15 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
X-Powered-By: Express
X-Server-ID: apps-01
View ddd.nim
import macros
macro doNothing(input: untyped): untyped =
echo treeRepr input
result = input
echo input.toStrLit
echo "hello world"
You can’t perform that action at this time.