any one
a) used a terminal ?
b) heard of “(gnu)readline” ?
im interested in the research/philosophical aspects of the command line
post linked above
(fwiw: less interested in (imho brain-dead) machine generated code )
it seams many technical details and historical tradeoffs
( line discipline !? )
have shaped the command line functionality of the less popular but more flexible operating systems
eg:feature’s of readline influence the address bar in browsers
and js-dev-console’s
(imho it would be relay something to have tw functionality to ‘work’ from within dev-console )
… might more insight into such history inform the ui/ux decisions of tomorrow
Beware, though: What you are about to see is not particularly elegant. In fact, the TTY subsystem — while quite functional from a user’s point of view — is a twisty little mess of special cases. To understand how this came to be, we have to go back in time.
fwiw the motivation/interest in a
usable prompt based interface
mostly stems from attempting to better understand
the connections betwixt constructs
which create the ui/gfx (mostly by attempting to alter and catastrophically braking things) =}
on some previous iteration (how time flys)
…NLS is (imho) interesting to compare with tiddly wiki
perhaps some similar demo should be recreated on multiuser-wiki!! ;D
anyway …i was trying to recall when the console.ui was an extension how could i forget firebug!
i sniped that and got some
uncaught exception(s): Linked List only accepts string values, not undefined $:/boot/boot.js:2515:10
=p
which makes me thunk of this succulent snippet i foraged from the depths of [[search-company-scrape-data]] ;- )
parse?/split tid/text with filter
each line with
{{{ [all[current]get[text]splitregexp[\n]] }}}
each line with substring
{{{ [all[current]get[text]splitregexp[\n]contains-string[substring]] }}}
each char
{{{ [all[current]get[text]splitregexp[]] }}}
presumably it would not be much of a stretch to create
link url/uri whatever handler that could
display sections from “#err/$:/boot/boot.js:2515:10”
though im surprised after a quick scan “commands”
is not included
PATH="./node_modules/.bin:$PATH"
tiddlywiki
usage: tiddlywiki [<wikifolder>] [--<command> [<args>...]...]
Available commands:
* commands: Run commands returned from a filter
...
tiddlywiki --commands "[[help]]"
Error: Missing command: help
perhaps what is (imho) missing could be provided by creating
the above missing command … (any hints?)
idk but perhaps it would be nice coherence
if similar route’s/functions could be called from api or cli or …
at least it might simplify documentation?
( :
/aaaahhhhhhh finaly
a few concepts/observations from sections from this wiki for some reason spring to mind … though tbh im not shore how much relevance any of it may or may not have …
in this or that
.context
=0
[mario:~] $
->tiddlywiki
usage: tiddlywiki [<wikifolder>] [--<command> [<args>...]...]
Available commands:
* build: Automatically run configured commands
* commands: Run commands returned from a filter
* editions: Lists the available editions of TiddlyWiki
* fetch: Fetch tiddlers from wiki by URL
* help: Display help for TiddlyWiki commands
* init: Initialise a new wiki folder
* listen: Provides an HTTP server interface to TiddlyWiki
<snip for readability - extra lines removed>
To get detailed help on a command:
tiddlywiki --help <command>
tiddlywiki --help init gives you this
[mario:~] $
->tiddlywiki --help init
Initialise an empty WikiFolder with a copy of the specified edition.
--init <edition> [<edition> ...]
For example:
tiddlywiki ./MyWikiFolder --init empty
Note:
* The wiki folder directory will be created if necessary
* The "edition" defaults to empty
* The init command will fail if the wiki folder is not empty
* The init command removes any includeWikis definitions in the edition's tiddlywiki.info file
* When multiple editions are specified, editions initialised later will overwrite any files shared with earlier editions (so, the final tiddlywiki.info file will be copied from the last edition)
* --editions returns a list of available editions
tiddlywik --help listen give you this
[mario:~] $
->tiddlywiki --help listen
Serves a wiki over HTTP.
The listen command uses NamedCommandParameters:
--listen [<name>=<value>]...
All parameters are optional with safe defaults, and can be specified in any order. The recognised parameters are:
* host - optional hostname to serve from (defaults to "127.0.0.1" aka "localhost")
* path-prefix - optional prefix for paths
* port - port number on which to listen; non-numeric values are interpreted as a system environment variable from which the port number is extracted (defaults to "8080")
<snip>
and so on. There is room for improvement. Eg: deprecated commands should not be listed anymore or they may be move to tiddlywiki --help legacy …
fwiw commands ruining in a terminal on linux will have access to readline-input features
(afaik) not to be confused with node cli api of the same name
node Readline | Node.js v25.1.0 Documentation which interfaces with terminal via standard io ect from within node scripts
Sorry about that one. It’s help says that. But honestly I do have no clue, what this one does. Most of the commands are used to build the TW distribution and those files have been built once in batch files and they are as they are at the moment. A day has only 24 hours and we need some sleep at night
PS C:\Users\Mario> tiddlywiki --help commands
Sequentially run the command tokens returned from a filter
--commands <filter>
Examples
--commands "[enlist:raw{$:/build-commands-as-text}]"
--commands "[{$:/build-commands-as-json}jsonindexes[]] :map[{$:/build-commands-as-json}jsonget<currentTiddler>]"
I see @Springer and @wiki_user wiki_user are trying perhaps to document the functions available in the browser like $tw.wiki.addToStory() which can be used in the console, in bookmarklets and even specially crafted links in a tiddler.
I recently ask an LLM to retrieve all such functions from the JavaScript code at tiddlywiki.com and it was very good at it, although not totally successful, with its usage examples. I did not share the results due to the rising animosity towards LLM’s (the communities loss if you ask me).
Keep in mind that within tiddlywiki you can open in story a non existent tiddler, the exact method needs checking, but this is an action way to create our missing tiddlers. I think, perhaps adding the title to the list field containing the storylist.
I am looking at this to create tiddler relationships that need extra data eg currency.
A hint at where I am with this;
It would be possible to create relationship tiddler titles that include both the relationship type source:type:target and include additional info to avoid the need to create the tiddler, ie the title is sufficient source:type:start:end:target where type could be spouse. It could open the title in the story where the user can either close or edit to add more information relating to that relationship, or lose it an rely on the “missing tiddler”
I may use :: as the delimiter for safety and search-ability.
but I need a way to indicate empty values eg; source::type::start::::target
now let us nerd out
Interesting, can we verify TiddlyWiki qualifies as a “Meta-circular evaluator” or “Self-interpreter” as it would be a nice complement to its Non-trivial “Quine” qualities? (quine discussed previously)
Consider also is it a Monad? (discussed previously)
I imagine its not a Total functional programming - Wikipedia In particular it is impossible to define a self-interpreter in a total programming language, which I think TiddlyWiki script is.
cd node_modules/tiddlywiki
cp ../.bin/tiddlywiki ./tiddlywiki2
then
"""
node --trace-exit ./tiddlywiki2
usage: tiddlywiki [<wikifolder>] [--<command> [<args>...]...]
Available commands:
"""
node can find module/boot.js
but not pass args
node --trace-exit ./tiddlywiki2 --command "[all[]]"
Error: Unknown command: command
(node:25269) WARNING: Exited the environment with code 1
at exit (internal/process/per_thread.js:172:13)
at $tw.utils.error (~/tw-test/node_modules/tiddlywiki/boot/boot.js:258:11)
at $tw.Commander.output ($:/core/modules/startup/commands.js:24:22)
at Commander.executeNextCommand ($:/core/modules/commander.js:89:10)
at Commander.execute ($:/core/modules/commander.js:61:7)
at exports.startup ($:/core/modules/startup/commands.js:31:12)
at $tw.boot.executeNextStartupTask (~/tw-test/node_modules/tiddlywiki/boot/boot.js:2628:10)
at $tw.boot.executeNextStartupTask (~/tw-test/node_modules/tiddlywiki/boot/boot.js:2626:21)
at $tw.boot.executeNextStartupTask (~/tw-test/node_modules/tiddlywiki/boot/boot.js:2626:21)
at $tw.boot.executeNextStartupTask (~/tw-test/node_modules/tiddlywiki/boot/boot.js:2626:21)
there are better environments than ones that all-ready carry to much ~state~ baggage around with them under normal operation
see also last link of first post
8|
i want to brake the wiki , to understand it better (perhaps from that perspective improve it)
but in a browser that is slow process
any you might loose *use these steps to cause N error*
its easyer to brake things (and learn from the experience) from terminal <3
=] press return