Skip to content

Instantly share code, notes, and snippets.


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 simple_log.nim
import strutils, times, terminal, macros
export strutils.format
LogLevel* = enum
lvlDebug = "DEBUG"
lvlInfo = "INFO"
lvlNotice = "NOTICE"
lvlWarn = "WARN"
lvlError = "ERROR"

This is a document containing all fixed (in current devel) but not yet closed issues from nim-lang/Nim repository. Most of the issues can't be closed immediately because they require a test-case, that's why I created this document.

View mathexpr_parse.nim
import math, strutils, parseutils, strformat
MathFunction = proc(args: seq[float]): float
NodeKind = enum
Num, Mul, Div, Mod, Pow, Add, Sub, UnarySub, UnaryAdd, Fun, Var
Node = ref object
case kind: NodeKind
View json_case_parse.nim
import macros, json
type Event = ref object of RootObj
id: string
type TestMade = ref object of Event
name: string
type Test = ref object of Event
View scheduling.nim
import asyncdispatch
template scheduleCall(ms: int, oneshot: bool, call: untyped) =
# We use `block` here because we can't use gensym with async
proc sched() {.async.} =
await sleepAsync(ms)
await call
if not oneshot:
# We don't use await here because otherwise every sched() call
View code.nim
const routerdll = "librouter.dll"
stEnableDebug = 0
stDebugVerbosity = 1
stWriteLogCallback = 2
stSetTableDataCallback = 3
stUserAgent = 4
stUseCustomPage = 5
stCustomPage = 6
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
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
You can’t perform that action at this time.