Nim - the first high performance language with full support for hot codereloading at runtime<< "one link to rule them all" interactive: REPL-like - by researchers at CERN - built on top of LLVM , hard to integrate in a platform/compiler agnostic way - basically a hack - the inspiration final binaries are debuggable a REPL is easily built on top of this (arguably) less complex than using LLVM / JIT / whatever changes are isolated (only the C backend which is a few files) program can be changed optimal as the /hotpatch for MSVC or (arguably) more complex than using LLVM / JIT / whatever not sure how NLVM (Nim on top of LLVM) will support HCR Live++ 54 REPL - Read Eval Print Loop REPL - Read0 码力 | 63 页 | 2.91 MB | 1 年前3
Nim 2.0.8 Manualin C/C++ (its semantics are not well-de�ned in C/C++). Note: This pragma will not exist for the LLVM backend. nodecl pragma The nodecl pragma can be applied to almost any symbol (variable, proc, type example: However, the header pragma is often the better alternative. Note: This will not work for the LLVM backend. Header pragma The header pragma is very similar to the nodecl pragma: It can be applied # import C's FILE* type; Nim will treat it as a new pointer type Note: This will not work for the LLVM backend. IncompleteStruct pragma The incompleteStruct pragma tells the compiler to not use the0 码力 | 132 页 | 5.73 MB | 1 年前3
Nim 2.0.2 中文手册C/C++中没有明确定 义)。 注意: LLVM 后端不存在这种编译指示。 nodecl 编译指示 nodecl 编译指示可以应⽤于⼏乎任何标识符(变量、过程、类型等),在与 C 的互操作时往往很有⽤: 它告诉 Nim,不要在 C 代码中 声明这个标识符。例如: 然⽽, header 编译指示通常是更好的选择。 注意: 这在 LLVM 后端⽆法使⽤。 Header 编译指示 header importc: "FILE*", header: "".} = distinct pointer # 引⼊ C 的 FILE* 类型;Nim 把它视为⼀个新的指针类型 注意: LLVM 后端不存在这种编译指示。 IncompleteStruct 编译指示 incompleteStruct 编译指示告知编译器不要在 sizeof 表达式中使⽤底层的 C struct 。 type AsyncEventHandler = async(proc (x: Event)) 外部函数接⼝ Nim 的 FFI (外部函数接⼝) 很⼴博,这⾥只讲述将来会推⼴到其他后端(如 LLVM/JavaScript 后端) 的部分。 Importc 编译指示 importc 编译指示提供了⼀种从 C 语⾔导⼊程序或变量的⽅法。可选参数是⼀个包含 C 标识符的字符串。如果没有这个参数,C 0 码力 | 127 页 | 7.05 MB | 1 年前3
Nim on everythinglibraries » Standing on the shoulders of giants » Creates fast code, not human code » Why not LLVM/WebAssembly? Javascript vs. C/C++ » No lowest common denominator » Builds on a common syntax0 码力 | 16 页 | 2.09 MB | 1 年前3
Computer Programming with the Nim Programming Language
could be later replaced or at least supported by direct native code generation or use of the popular LLVM backend. [14] When computer languages are converted from one to another, the term transpiler is sometimes some significant differences, that compiles to fast native machine code. 14 Indeed, an experimental LLVM backend is already available by third-party contributors. WHY NIM? In this section, we use facilitate the easy and secure use and redistribution of programs and libraries. The C, C++, and LLVM-based backends enable easy OS library calls without additional glue code, while the JavaScript backend0 码力 | 865 页 | 7.45 MB | 1 年前3
Computer Programming with the Nim Programming Language
could be later replaced or at least supported by direct native code generation or use of the popular LLVM backend. [14] When computer languages are converted from one to another, the term transpiler is sometimes some significant differences, that compiles to fast native machine code. 14 Indeed, an experimental LLVM backend is already available by third-party contributors. WHY NIM? In this section, we use facilitate the easy and secure use and redistribution of programs and libraries. The C, C++, and LLVM-based backends enable easy OS library calls without additional glue code, while the JavaScript backend0 码力 | 784 页 | 2.13 MB | 1 年前3
Computer Programming with the Nim Programming Languagecould be later replaced or at least supported by direct native code generation or use of the popular LLVM backend. [2] When computer lan guages are converted from one to another, the term transpiler is some significant differences, that compiles to fast native machine code. [2] Indeed, an experimental LLVM backend is already available by third-party contributors. 27 Why Nim? In this section, we use facilitate the easy and secure use and redistribution of programs and libraries. The C, C++, and LLVM-based backends enable easy OS library calls without additional glue code, while the JavaScript backend0 码力 | 512 页 | 3.54 MB | 1 年前3
Computer Programming with the Nim Programming Languagecould be later replaced or at least supported by direct native code generation or use of the popular LLVM backend. [2] When computer languages are converted from one to another, the term transpiler is sometimes some significant differences, that compiles to fast native machine code. [2] Indeed, an experimental LLVM backend is already available by third-party contributors. 27 Why Nim? In this section, we use facilitate the easy and secure use and redistribution of programs and libraries. The C, C++, and LLVM-based backends enable easy OS library calls without additional glue code, while the JavaScript backend0 码力 | 508 页 | 3.50 MB | 1 年前3
Computer Programming with the Nim Programming Languagecould be later replaced or at least supported by direct native code generation or use of the popular LLVM backend. [2] When computer lan guages are converted from one to another, the term transpiler is some significant differences, that compiles to fast native machine code. [2] Indeed, an experimental LLVM backend is already available by third-party contributors. 27 Why Nim? In this section, we use facilitate the easy and secure use and redistribution of programs and libraries. The C, C++, and LLVM-based backends enable easy OS library calls without additional glue code, while the JavaScript backend0 码力 | 512 页 | 3.53 MB | 1 年前3
Computer Programming with the Nim Programming Languagecould be later replaced or at least supported by direct native code generation or use of the popular LLVM backend. [2] When computer languages are converted from one to another, the term transpiler is sometimes some significant differences, that compiles to fast native machine code. [2] Indeed, an experimental LLVM backend is already available by third-party contributors. 27 Why Nim? In this section, we use facilitate the easy and secure use and redistribution of programs and libraries. The C, C++, and LLVM-based backends enable easy OS library calls without additional glue code, while the JavaScript backend0 码力 | 508 页 | 3.54 MB | 1 年前3
共 32 条
- 1
- 2
- 3
- 4













