Commit Graph

765 Commits

Author SHA1 Message Date
Kartik K. Agaram c21cefa888 idiom: table.insert for appending
Stop using arr[#arr+1].
2022-03-18 20:55:07 -07:00
Kartik K. Agaram a05f713dc1 graphviz: tweak data structure slightly
A node's edges contain an associative array of target nodes rather than
a linear array.

This way we automatically dedup edges when we load multiple graphs.
2022-03-18 18:02:07 -07:00
Kartik K. Agaram 03a3883555 graphviz: read multiple .dot files
It's useful to be able to import dependencies for multiple packages at
once, so that we can see common dependencies.
2022-03-18 17:58:25 -07:00
Kartik K. Agaram 824705f770 fix a warning 2022-03-18 17:49:26 -07:00
Kartik K. Agaram 7586b773d9 graphviz: sketch of the dashboard 2022-03-18 17:40:18 -07:00
Kartik K. Agaram 06615231ae graphviz: done parsing directed graphs
This is mostly what I want since I'm interested in parsing the output of
debtree.
2022-03-18 17:09:47 -07:00
Kartik K. Agaram 7dc0928f52 graphviz: show error when lacking permissions 2022-03-18 10:43:48 -07:00
Kartik K. Agaram 29d53c21ac graphviz: don't interpret substrings as regexes 2022-03-18 10:43:48 -07:00
Kartik K. Agaram 0374e82aa5 show current definition being edited
This serves two purposes:
- Things get confusing if function being defined doesn't match the
  definition name. Displaying the current definition helps diagnose this
  situation.
- We're already able to see callers at a glance even if the cursor is
  below the fold. The name of the current definition is arguably more
  important in that situation.
2022-03-18 10:39:56 -07:00
Kartik K. Agaram af8d3addd2 stale references to caller 2022-03-18 10:39:56 -07:00
Kartik K. Agaram 6c85513499 beginnings of a parser for .dot files
I'm following https://graphviz.org/doc/info/lang.html. Just tokenization
so far.
2022-03-18 10:39:56 -07:00
Kartik K. Agaram 4a90a28a15 fake to stand in for start_reading in tests 2022-03-18 09:24:53 -07:00
Kartik K. Agaram 5c42b1de32 break.tlv: nascent live-updating stack language
Joint work with Sumeet Agarwal. In the process we discovered several
bugs in our fake window helpers for tests. Thanks Sumeet!

Previous prototypes:
  - https://archive.org/details/akkartik-2min-2020-12-06
  - https://merveilles.town/@akkartik/105759816342173743
2022-03-17 23:36:15 -07:00
Kartik K. Agaram 56f1b97b9c sandbox os.remove 2022-03-17 15:38:50 -07:00
Kartik K. Agaram 1d3101507e fix some warnings 2022-03-17 00:15:16 -07:00
Kartik K. Agaram f9fc4a3d58 file handles vs file objects, ugh 2022-03-17 00:01:36 -07:00
Kartik K. Agaram 5380817ce6 function names from globals rather than debug info
This reclaims all the slowdown in sieve.tlv, and it also is now smart
enough to detect calls to global bindings that pass through variables.

On the flip side, we lose names for non-globals. But that's not very
useful anyway in Teliva's context.

This is still not enough to detect callers through coroutines
(intervening anonymous functions), though.
2022-03-16 23:53:08 -07:00
Kartik K. Agaram 76d1dda240 bring back hack when caller is main
Partially undoes commit f2d29c22f8.
2022-03-16 23:45:42 -07:00
Kartik K. Agaram 785dfaa1ec cache function names
This brings down the slowdown in sieve.tlv from 50% to 25% (15s).
2022-03-16 23:45:38 -07:00
Kartik K. Agaram 155f6a8027 standardize some names 2022-03-16 21:48:41 -07:00
Kartik K. Agaram fffcc8b9ab stop running task.scheduler by default
sieve.tlv is 50% slower (18s vs 12s) with the new function call
instrumentation.
2022-03-16 21:38:34 -07:00
Kartik K. Agaram d6554919b1 delete dead code 2022-03-16 21:28:58 -07:00
Kartik K. Agaram ef5195dee9 simplify function call instrumentation
src/ldo.c now has a minimal diff with Lua 5.1.

It might be a bit slower than it was before, but not noticeably so..

This approach doesn't support indirect calls.
2022-03-16 21:19:19 -07:00
Kartik K. Agaram 182408ec54 drop a header 2022-03-16 20:33:28 -07:00
Kartik K. Agaram ed5efcd8a0 drop a forward decl 2022-03-16 20:31:43 -07:00
Kartik K. Agaram 709cc25130 start cleaning up function call instrumentation
It's a mess. I calculate call-graph depth one way and calculate caller
names another way. At least one of the ways fails to work with indirect
calls. Hopefully the other way works?
2022-03-16 20:29:50 -07:00
Kartik K. Agaram b9c187d259 stop using tasks in start_reading/start_writing
We just need queues/streams for file I/O. No need to complect
concurrency concerns with them.
2022-03-16 17:03:38 -07:00
Kartik K. Agaram ab89be1ed3 Teliva's been broken 2 days while I mess with docs 2022-03-15 16:00:08 -07:00
Kartik K. Agaram 2662b1afed . 2022-03-14 18:37:56 -07:00
Kartik K. Agaram 5e976554dd drop the lfs library
I can't feel confident about its sandboxing story yet. And if we can't
build a file navigator, what are we even doing with it.
2022-03-14 17:26:13 -07:00
Kartik K. Agaram 6f5f6849dd . 2022-03-14 17:23:38 -07:00
Kartik K. Agaram babaa235b1 update link to manual 2022-03-14 16:46:05 -07:00
Kartik K. Agaram 2b81ded335 typo 2022-03-14 16:35:24 -07:00
Kartik K. Agaram 06a5e841d1 doc: curses 2022-03-14 11:47:15 -07:00
Kartik K. Agaram a8df25c497 doc: flesh out tasks and channels 2022-03-14 09:56:41 -07:00
Kartik K. Agaram b571a342d7 doc: correct and flesh out json 2022-03-14 09:32:38 -07:00
Kartik K. Agaram 1eb37f220d typo 2022-03-14 07:59:41 -07:00
Kartik K. Agaram 4e89474820 document functions that are sandboxed 2022-03-13 17:45:10 -07:00
Kartik K. Agaram 6133cfa524 drop docs for 2 functions removed from Lua 2022-03-13 17:39:57 -07:00
Kartik K. Agaram b68405fe31 delete debug library
There's security issues here, and they're subtle. Dropping for now until
I or someone else finds a need for them.
2022-03-13 17:36:01 -07:00
Kartik K. Agaram 776d9f9032 standard markup 2022-03-13 17:32:53 -07:00
Kartik K. Agaram 7c843c0b8a . 2022-03-13 17:31:28 -07:00
Kartik K. Agaram e67e61a063 one more highlight 2022-03-13 16:49:04 -07:00
Kartik K. Agaram 4e6ea0adad rudimentary docs for libraries added to Teliva 2022-03-13 16:46:46 -07:00
Kartik K. Agaram ee7f893a7e drop string.dump, clean up docs around it 2022-03-13 14:41:41 -07:00
Kartik K. Agaram 35a6794386 rip out most references to C and userdata in docs 2022-03-13 14:19:08 -07:00
Kartik K. Agaram 23e7cf9c52 starting to spend some time improving docs 2022-03-13 14:01:13 -07:00
Kartik K. Agaram 1017e80fe5 less confusing error when apps get past main 2022-03-13 12:12:19 -07:00
Kartik K. Agaram 6ece3bb664 toot-toot.tlv: scrolling 2022-03-12 09:06:12 -08:00
Kartik K. Agaram cebe9abffe more extensive deletions from the Lua manual
I'm trying to represent where Teliva borrows from Lua, but without
making it seem identical.

Please support the Lua project!
2022-03-10 23:36:22 -08:00