textisenough's Avatar

textisenough

@textisenough

software dev, husband. documenting journey of creating a no bs notes/todo app

114
Followers
2
Following
10
Posts
03.11.2024
Joined
Posts Following

Latest posts by textisenough @textisenough

The 30 minutes timelapse for that bit of work with the redo.

04.11.2024 10:24 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

And now we've got basic redo as well.
I need to work on making the cursor position more intuitive after undoing, it jumps to unexpected spots rather often.

04.11.2024 10:20 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 1

Experience using #odinlang, a language with no garbage collection (manual memory management) is that it's not that difficult. Odin makes it rather easy to keep track of and not mess up.

04.11.2024 08:17 ๐Ÿ‘ 3 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Preview
Odin Programming Language

Anybody else interested in #odinlang odin-lang.org on ๐Ÿฆ‹ ? Let's be friends! I'm new here but I don't see much about one of my favorite topics.

04.11.2024 08:09 ๐Ÿ‘ 2 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Video thumbnail

1.5 hours of making a performant notes/todo app.
How long it took me to implement undo and then refactor to prepare for redo, and remove some arbitrary code barriers.

04.11.2024 07:52 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
Video thumbnail

Basic undo implemented, every time the text is edited it takes a snapshot of the pieces, and the current snapshot is kept track of.
Next is redo, and deleting undo history when we start typing again.

04.11.2024 07:00 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 1

1 hour timelapes of working on that memory stuff (already at 57 hours btw)

03.11.2024 17:18 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0

Now I attempt again the idea of implementing an undo with the piece table.

I'm thinking the piece table already has the pieces, instead of throwing them away and rebuilding them constantly, I think I'll just keep copies around of the pieces array and move backwards/forwards for the undo/redo.

03.11.2024 16:32 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0
macOS Activity Monitor showing textisenough app running with a memory usage of 40.7 MB.

macOS Activity Monitor showing textisenough app running with a memory usage of 40.7 MB.

All right I think I've handled the important memory leaks..stable ~40 MB now.
Fun journey of learning how to write memory safe Odin.
It's actually not that hard. Why are people afraid of languages with manual memory management?

03.11.2024 16:21 ๐Ÿ‘ 0 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 1
Soft-wrapping a Piece Table to draw with Raylib, in Odin - Eduardo Lavaque's Blog

Implementing soft-wrapping in a piece table friendly way is not the most straightforward thing to do, so when I figured out something decent I wrote about it.
greduan.com/blog/2024/10...

03.11.2024 10:43 ๐Ÿ‘ 1 ๐Ÿ” 0 ๐Ÿ’ฌ 0 ๐Ÿ“Œ 0