nimscripter
nim
nimscripter | nim | |
---|---|---|
3 | 11 | |
142 | 66 | |
- | - | |
5.2 | 9.0 | |
about 2 months ago | 9 months ago | |
Nim | Nim | |
MIT License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
nimscripter
-
NIR: Nim Intermediate Representation
> What does this mean? There's a runtime VM or compile time VM?
Compile time VM. It's used to run macros / templates / concepts. You can also run most code at compile time in a `static` block except for stuff that needs C calls. You can also compile the VM into a program and use it as a runtime VM (see https://github.com/beef331/nimscripter) which I do in my GUI lib. NIR should enable the compile time VM to run faster too, and possibly use JIT'ed code.
- Purpose of NimScript vs nim
-
Finally. Embed
Checkout Nim! It does much of what you describe and its great. The core language is fairly small (not quite lua simple but probably ML comparable). It compiles fast enough that a Nim repl like `inim` is useable to check features and for basic maths, though it requires a C compiler, but TCC [4] works perfectly. Essentially Nim + tcc is pretty close to your description, IMHO. Though I'm not sure TCC supports non-x86 targets.
I've never used it but Nim does support some hot reloading as well [3]. It also has a real VM if you want to run user scripts and has a nice library for it [1]. Its not quite Lua flexible but for a generally compiled language its impressive.
Recently I made a wrapper to embed access to the Nim compilers macros at runtime [2]. It took 3-4 hours probably and still compiles in 10s of seconds despite building in a fair bit of the compiler! It was useful for making a code generator for a serializer format. Though I'm not sure its small enough to live on even beefy m4/m7 microcontrollers. Though I'm tempted to try.
1: https://github.com/beef331/nimscripter
nim
-
Twitter Clone in 60 lines of Nim
Twitter Sources and Hello World Sources
- Mono: A Simple UI/Web/Desktop/Mobile Framework Written in Nim
-
File Explorer in 20 lines of Nim | Mono UI
No Network, no JS, no Client, no Server, no API. Write plain Nim code, and Mono UI will turn it into fluid interactive web UI.
-
Purpose of NimScript vs nim
There's no sense to use NimScript. Just run plain Nim as nim -r play.nim and disable compiler outputs to avoid noise in terminal.
-
Mono, Nim Web Framework
Something like mix of Svelte and Phoenix LiveView. # Features - Reactive, like Svelte, with compact and clean code. - Stateful Components. - Bidirectional data binding to inputs. - Multiple UI instances with shared memory updated automatically. - Fast initial page load. - SEO friendly. - Flexible deployment: Server, Browser, Desktop, Mobile. # Example Source of [Todo App Example](https://github.com/al6x/nim/blob/main/mono/examples/todo.nim) ```Nim import base, mono/core # Model -------------------------------------------------------------------------------------------- type TodoItemState* = enum active, completed TodoItem* = ref object text*: string completed*: bool Todo* = ref object items*: seq[TodoItem] proc id*(self: TodoItem): string = self.text
-
Mono, Web UI for Nim, high productivity, simple and clean code
Source of Todo App Example
-
Invisible DB Driver / ORM without a single cool feature [experiment]
It's just a conversion of a tuple into SQL `where` statement https://github.com/al6x/nim/blob/main/postgres/db_tablem.nim#L135
- RPC in 10 and REST API in 5 lines of Nim
-
Twitter in 100 lines of Nim, Interactive UI with no JS
I added description how it works in readme, please check it out, there are answers about forms and chat https://github.com/al6x/nim/tree/main/web#readme
What are some alternatives?
incbin - Include binary files in C/C++
norm - A Nim ORM for SQLite and Postgres
pyker - Python tool to convert files from a directory tree into a C header file.
keep - Keep helps you manage Notes
pl_mpeg - Single file C library for decoding MPEG1 Video and MP2 Audio
Mono - Mono open source ECMA CLI, C# and .NET implementation.
execfs - Proof of concept userspace filesystem that executes filenames as shell commands and makes the result accessible though reading the file.
cdecl - Nim helper for using C Macros
langserver - The Nim language server implementation (based on nimsuggest)
vscode-nim
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
NimForUE - Nim plugin for UE5 with native performance, hot reloading and full interop that sits between C++ and Blueprints. This allows you to do common UE workflows like for example to extend any UE class in Nim and extending it again in Blueprint if you wish so without restarting the editor. The final aim is to be able to do in Nim what you can do in C++