Wishlist: Ideal UI library for Nim

2023-06-27 Thread Nerve
I am continually reminded of how performant and flexible GPU-rendered custom GUIs have been for the programs that adopt them, primarily Blender and Godot. They spin up an OpenGL/Vulkan window and render totally custom widgets, and can construct exactly the GUI they want, when they need to. It's

Wishlist: Ideal UI library for Nim

2023-07-07 Thread Nerve
Meta just announced a new high-level graphics library simialr to SDL and GLFW called IGL, it's meant to interface to any number of lower-level APIs and be maximally multi-platform:

Nim boilerplate

2023-10-11 Thread Nerve
The lengths to which people go to preserve extreme levels of OO abstraction and inheritance baffles me. I've found zero use for any of it in the real world. I'm going to be "that guy" and suggest that Nim's objects map to structs fairly closely for a reason, and that maybe learning to simplify y

Nim boilerplate

2023-10-11 Thread Nerve
Projection.

Nim's equivalent of kwargs

2024-04-09 Thread Nerve
I use `JsonNode` for my dynamic type, it works great for a `kwargs` standin. I usually name it `options`, but for sake of consistency I named it `kwargs` here. I use it all over an in-production tool at work, with permission to share: import std/json import std/strformat

Sum types, 2024 variant

2024-04-16 Thread Nerve
Taking inspiration from F# is always a great idea. One issue is going to be the meaning of `:`. I think in variant type definitions, it should always be followed by a type and there should never be a code block, while when pattern matching, it should always be a code block and never a type. May

simpleargs - Dead simple CLI parsing.

2024-07-02 Thread Nerve
I'd argue that the 80% use cases for CLI parsing are covered by just a few items. We want to know: * If our command or subcommand was a given thing. * What a positional argument was. * What an option with input was, with a default fallback. * If a flag was present. Most of Nim's CLI pa

simpleargs - Dead simple CLI parsing.

2024-07-05 Thread Nerve
Thanks all. I respect the alternatives, but I like the blaringly obvious style of my procs. I try to avoid a lot of hidden control flow when I can. I do use macro-heavy hidden-flow stuff when appropriate like nimja and Datamancer (formulas can be a trip), but this is one scenario where I don't t