Absytree: Text editor (and tree based language framework) in Nim

2024-07-03 Thread nimaoth
well, both I guess. When you open a file the scroll offset starts at 0 so the first line is at the top, but the editor also tries to keep a gap between the cursor and the edge of the screen, so every time the cursor moves it scrolls so the cursor is somewhere in the center of the screen. But I'l

Absytree: Text editor (and tree based language framework) in Nim

2024-06-30 Thread nimaoth
I finally decided to do a new release (0.2.1), which brings too many updates to list them all. [Repo](https://github.com/Nimaoth/Absytree) The most important thing is that the editor is now actually usable. I've been using it for the last few months now and it has been a lot of fun. My cu

Best REGEX library for targeting both JS and C

2024-03-07 Thread nimaoth
Also nlvm supports wasm out of the box afaik ()

Best REGEX library for targeting both JS and C

2024-03-07 Thread nimaoth
anything in pure nim that compiles to c can also compile to wasm. There is a github repository which contains an example config.nims file for compiling to wasm, but I can't find that right now. But I used it in my own project aswell, so you can just copy that (<https://github.com

Best REGEX library for targeting both JS and C

2024-03-06 Thread nimaoth
I guess should work

Parser combinators experiment causes Error: "cannot instantiate return:type"

2024-01-26 Thread nimaoth
I think you could store the varargs in a local seq and then capture that import std/sequtils proc either*(parsers: varargs[Parser]): Parser = let parsers = parsers.toSeq return proc (input: string): ParseResult = for p in parsers: let res

Absytree: Text editor (and tree based language framework) in Nim

2024-01-13 Thread nimaoth
What's currently implemented is a basic projectional editor, where the AST gets converted to another tree (cell tree) which can be rendered and edited. The edits to that get applied to the underlying AST. There's currently no advanced projections like e.g. tables or color pickers, but it can re

Dynamic Typing in Nim

2024-01-12 Thread nimaoth
I've done something similar for my plugin system, except with JSON. I use a macro to create a wrapper function for any nim function which then takes a JsonNode and returns a JsonNode and does the conversion. The code ain't pretty but maybe it helps: (<https://github.com/Nimaoth/

Absytree: Text editor (and tree based language framework) in Nim

2024-01-07 Thread nimaoth
Did you run nimble setup?

Absytree: Text editor (and tree based language framework) in Nim

2024-01-07 Thread nimaoth
Yes, it basically contains a text editor and a projectional editor

Absytree: Text editor (and tree based language framework) in Nim

2024-01-06 Thread nimaoth
Thanks for trying it out, and thank you for the your great libraries. I also planned on creating pull requests for those at some point, but haven't gotten to it yet

Absytree: Text editor (and tree based language framework) in Nim

2024-01-05 Thread nimaoth
Hi, I think it's time to share the text editor I've been working on for a while: <https://github.com/Nimaoth/Absytree> You can try the online demo here: <https://nimaoth.github.io/AbsytreeBrowser/> It also runs natively on the desktop and in the terminal (althouth the term

Enhancing Nim vtable implementation vs subtype checking

2023-12-21 Thread nimaoth
Can the method for the subtype still be defined in a different module to the base type? Or does the method only need to be in the same module as the type of the first paramater?

Hello `nph`, an opinionated source code formatter for Nim

2023-12-13 Thread nimaoth
I like the idea. Just tried it on a few files on my project, so here is some feedback: 1. I think the 88 character limit is way to low. Personally my requirement for the character limit is that I can view two files next to each other (mainly for diffing), and I can easily fit up to 140 charac