http://nim-lang.org/%|%Nim%|% (formerly Nimrod) is a statically typed, imperative programming language that tries to give the programmer ultimate power without compromising runtime efficiency. It is designed to rival C in execution speed. It supports soft realtime garbage collection on thread-local heaps and uses asynchronous message passing between threads. There are language features for parallelizing functions via a binding to [OpenMP]. It has system programming features such as direct access to memory. Pointers to garbage collected memory are distinguished from pointers to manually managed memory. It compiles to commented C code. The compiler can create standard shared libraries linkable from C programs. It can also be made to output JavaScript, C++ or Objective C. The Nim distribution contains an officially supported wrapper[https://github.com/nim-lang/tcl] for Tcl that makes calling Tcl code from Nim code easy. Example: ======none # Example to embed TCL in Nim import tcl, os const myScript = """puts "Hello, World - In quotes" """ myScript2 = """ package require Tk pack [entry .e -textvar e -width 50] bind .e { set e [regsub { *=.*} $e ""] ;# remove evaluation (Chris) catch {expr [string map {/ *1./} $e]} res append e " = $res" } """ FindExecutable(getAppFilename()) var interp = CreateInterp() if interp == nil: quit("cannot create TCL interpreter") if Init(interp) != TCL_OK: quit("cannot init interpreter") if tcl.Eval(interp, myScript) != TCL_OK: quit("cannot execute script.tcl") ====== [MJ]: The following example demonstrates starting Tk and registering a Nim procedure (call) for use in Tcl: ====== import os,tcl FindExecutable(getAppFilename()) let interp = CreateInterp() discard Eval(interp, "set env(TCL_LIBRARY) [file join [file dir [info nameofexecutable]] tclbridge tcl tcl8.6]") echo GetStringResult(interp) var result = Init(interp) if result != tcl.TCL_OK: quit("Could't load Tcl " & $GetStringResult(interp)) discard Eval(interp, "package require Tk") proc call(clientData: TClientData, interp: PInterp, argc: int, argv: TArgv): int{.cdecl.} = tcl.SetResult(interp, cstring("name called"), cast[TFreeProc](0)) return tcl.TCL_OK discard Eval(interp, "wm protocol . WM_DELETE_WINDOW exit") discard CreateObjCommand(interp, cstring("name"), cast[TObjCmdProc](call), cast[TClientData](0), cast[TCmdDeleteProc](0)) result = Eval(interp, "name") if result != tcl.TCL_OK: quit("Could't create command " & $GetStringResult(interp)) echo GetStringResult(interp) discard Eval(interp, "vwait forever") ====== <>Language