Commit Graph

28 Commits

Author SHA1 Message Date
Kartik K. Agaram 5021298090 Merge lines.love 2023-08-31 00:13:43 -07:00
Kartik K. Agaram 6e54ad55d9 yet another set of bugfixes
The key API change I'd underestimated: opening a file used to return nil
on failure, and now returns false.
2023-08-30 23:52:25 -07:00
Kartik K. Agaram da21512440 bugfix: drawings in source editor
Broken since 2022-09 X-(

Scenario:
* switch to source editor
* draw a line
* wait 3 seconds

Before this commit the app would crash and then fail to restart until
you deleted the created .lua file from save dir.

This is not the first time I've confused Lua's files and LÖVE's
droppedFile objects. Just never rely on multiple args in file:write().
2023-05-30 00:02:09 -07:00
Kartik K. Agaram a68647ae22 Merge lines.love 2022-09-26 15:24:51 -07:00
Kartik K. Agaram d1dd3e441f fix support for absolute paths in Windows 2022-09-26 15:19:47 -07:00
Kartik K. Agaram f2c8f06819 Merge lines.love 2022-09-11 08:36:33 -07:00
Kartik K. Agaram 9a41c7c176 more correct absolute path detection 2022-09-11 08:31:05 -07:00
Kartik K. Agaram e0f750913f Merge lines.love 2022-09-05 12:47:27 -07:00
Kartik K. Agaram 528c64d690 support drawings in the source editor 2022-09-05 11:29:39 -07:00
Kartik K. Agaram 1a6f533e2c dedup points while loading drawing from disk 2022-09-03 19:24:40 -07:00
Kartik K. Agaram e1c5a42f31 editing source code from within the app
integrated from pong.love via text.love:
  https://merveilles.town/@akkartik/108933336531898243
2022-09-03 14:13:22 -07:00
Kartik K. Agaram 39b2c849c4 Merge lines.love 2022-08-23 15:50:01 -07:00
Kartik K. Agaram aeaa7d150c helper: file_exists 2022-08-23 15:04:30 -07:00
Kartik K. Agaram a655c2113c bring back a level of wrapping
Many projects will require the ability to add metadata to lines, so
let's not drop that.
2022-08-15 11:00:35 -07:00
Kartik K. Agaram 9d792a203b new fork: rip out drawing support 2022-08-14 09:20:14 -07:00
Kartik K. Agaram 48162b9816 have file API operate on state object 2022-07-25 19:56:39 -07:00
Kartik K. Agaram 3dccd7f81a stop pretending globals are local
One advantage of this approach: we don't end up with multiple lexical
scopes containing duplicates of the same modules.
2022-07-11 22:11:58 -07:00
Kartik K. Agaram 8d00da889d better error message
akkartik/lines.love#1
2022-07-05 14:02:52 -07:00
Kartik K. Agaram 15acc38da9 test: autosave after any shape 2022-06-14 22:06:08 -07:00
Kartik K. Agaram fbad3dd205 avoid some string concatenations
file:write can write multiple args one after another; no need to
concatenate them first.

I'm starting to pay attention to memory usage after the experience of
turning off the JIT.
2022-06-10 07:14:45 -07:00
Kartik K. Agaram 26033f40f1 ignore 'deleted' shapes when saving to disk 2022-05-30 15:26:31 -07:00
Kartik K. Agaram f49e2fd104 typos 2022-05-25 17:07:06 -07:00
Kartik K. Agaram fa103ca2e8 couple more tests
Along with the App helpers needed for them.
2022-05-25 12:59:12 -07:00
Kartik K. Agaram 37f1313b16 first successful pagedown test, first bug found by test
I also really need to rethink how people debug my programs. My approach
of inserting and deleting print() takes a lot of commitment. I need my
old trace-based whitebox testing idea. However, in my past projects I
never did figure out a good framework for tweaking how verbose a trace
to emit.

Perhaps that's too many knobs. Perhaps we just need a way to run a
single test with the most verbose trace possible. Then it's just a
matter of having the trace tell a coherent story? But even if the trace
stays out of program output in that situation, it's still in the
programmer's face in the _code_. Ugh.

Current plan: ship program with maximum tests and zero commented-out
prints. If you want to debug, insert prints. This is better than
previous, text-mode, projects just by virtue of the stdout channel being
dedicated to debug stuff.
2022-05-23 08:17:40 -07:00
Kartik K. Agaram 46d4c4de10 first test! 2022-05-22 23:17:06 -07:00
Kartik K. Agaram bb9e23a638 support for naming points
There's still an absence of affordance showing when you're in naming mode.
2022-05-21 14:03:06 -07:00
Kartik K. Agaram 10c961855a bugfix: rectangles and squares are now saved 2022-05-21 08:28:34 -07:00
Kartik K. Agaram de495ae0f1 several more modules
This is probably not ideal; let's see how it goes..
2022-05-17 21:34:55 -07:00