2022-08-02 06:54:23 I posit that a dictionary should be implemented as a balanced binary search tree or a resizable array not as a linked list 2022-08-02 06:59:22 lisbeths: mine is a stack! 2022-08-02 06:59:58 I guess I don't know what a stack is 2022-08-02 07:01:46 um 2022-08-02 07:01:50 this is forth! 2022-08-02 07:31:07 lisbeths: if the dictionary is a stack, defining a new word would push the xt onto the dictionary stack 2022-08-02 07:32:23 lisbeths: to find a word, you would have to scan the dictionary stack from most recently pushed all the way to the start of the stack 2022-08-02 07:33:33 find would treat the dictionary stack like an array 2022-08-02 07:35:04 note it preserves forth's requirement that new words are found in preference to old words 2022-08-02 10:27:50 lisbeths: The only real constraint on how the dictionary is implemented is that *sometimes* you want to guarantee that if you re-define a word you will find the latest definition (at least within your search path). 2022-08-02 10:28:08 Beyond that, you can really use whatever data structure you want. 2022-08-02 10:28:42 It's also possible to use a hashing type algorithm; I suspect that GForth does exactly that, though it may be used "on top" of a linked list, as an "accelerator." 2022-08-02 10:28:50 I have lately fallen in love with ocaml/haskell style curried syntax 2022-08-02 10:29:04 forth syntax can be curried 2022-08-02 10:29:10 Falling in love is fun. 2022-08-02 10:29:10 there would there be other considerations, though... 2022-08-02 10:30:08 Imagine building a set of words that were turing complete such that you wouldn't need to input numbers ever again 2022-08-02 10:30:23 like, you typically want the location of the executable code itself not changing, so you don't have to update all the definitions that point to executable code 2022-08-02 10:30:57 It is fast to rewrite an array compared to walking a long linked list over and over 2022-08-02 10:30:59 Yeah, but that's not really to do with the *dictionary* is it? The dictionary is just how you find the cfa's. 2022-08-02 10:31:05 And yes - the CFAs shouldn't change. 2022-08-02 10:31:23 do you know what a combinator is? 2022-08-02 10:31:40 Not formally, no. Maybe in some vague fuzzy way. 2022-08-02 10:31:48 swap is a combinator 2022-08-02 10:31:56 Ok. 2022-08-02 10:32:02 A "rearranger"? 2022-08-02 10:32:03 Also, since the dictionary is (usually) only used during compilation, one has to ask if it makes sense to have to add a bunch of extra code to manage balancing or resizing the dictionary 2022-08-02 10:32:09 Something that makes permutations? 2022-08-02 10:32:24 something to consider for a Forth for MCs 2022-08-02 10:32:29 lispmacs[work]: Indeed - totally agree. 2022-08-02 10:32:38 Most of the time compile time isn't a terribly important thing. 2022-08-02 10:32:42 combinators either act postfixedly infixddly or prefixedly. they take arguments and leave behind some transformed output in their place in the sytnax tree 2022-08-02 10:32:48 I guess it could be in some situations. 2022-08-02 10:33:07 My impression is that when Chuck compiled his chip design system he frequently rebuilt the entire thing. 2022-08-02 10:33:14 when most people talk about combinators they are talking about pure combinators meaning immutable stateless words 2022-08-02 10:33:28 He did a bunch of stuff to accelerate compile time, but it was probably a unique need. 2022-08-02 10:33:42 chuck is interested in low power chips right now so he needs a purely reversible forth this I can prove 2022-08-02 10:33:44 pretty sure ycombinators are where hackers go to talk about news 2022-08-02 10:33:59 the y combinator is part of the lambda calculus 2022-08-02 10:34:03 Yes, I know about the theoretical power considerations of reversibility. 2022-08-02 10:34:10 That's fascinating stuff. 2022-08-02 10:34:23 the stirling and kestrel combinators when combined with swap nip tuck etc are turing complete 2022-08-02 10:34:43 Ok. You're way out of my knowledge domain here; I've heard all these terms before, but I'm not able to actually "work with them" effectively. 2022-08-02 10:34:53 combinators are one of the few computer systems which may gain the benefit of being able to be purelu reversible 2022-08-02 10:35:12 thats because I deal with high level abstract programming not low level microcontroller programming 2022-08-02 10:35:18 My training is really in hardware. I've dipped into software quite a lot over the years, but I'm a "hack" on that front. 2022-08-02 10:35:37 In cloud computing the hardware is kept from us 2022-08-02 10:35:43 Right. 2022-08-02 10:35:56 the closest we can get is we can rent a virtual machine with an fpga 2022-08-02 10:36:15 The thing is, though, current power consumption levels are nowhere NEAR that theoretical limit. 2022-08-02 10:36:23 We're not even close, at least not in the mainstream. 2022-08-02 10:36:27 I study in part highly portable systems like forth and lisp. Systemd with few parts that a human can memorize 2022-08-02 10:36:56 Yeah - the reason I like Forth is because it's simpe enough for one person to deploy from the ground up, all by themselves. 2022-08-02 10:37:00 That doesn't describe systemd at all ;) 2022-08-02 10:37:08 systems 2022-08-02 10:37:19 Oh - typo. 2022-08-02 10:37:48 a language like forth should in theory be easier to audit for aerospace naval and military industrial purposes 2022-08-02 10:38:00 systemd might blow that minimal forth memory requirement, a little 2022-08-02 10:38:28 Forth doesnt just produce small filesizes it produces source code files with less text 2022-08-02 10:38:31 That doesn't mean reversible computing isn't worth studying - it's always worth understanding the limits of what's possible. 2022-08-02 10:39:08 In the future we may be forced to use purely reversible forths because the quantum computers may get so good and cheap 2022-08-02 10:40:18 I suspect when quantum computers become cheap we will be wrong on every count about what it'll be like 2022-08-02 10:40:51 except that everything ever encrypted over previous decades will be laid bare. That should be a reckoning. 2022-08-02 10:41:26 we can store an environment in a single pointer in the stack. It can be a balanced binary search tree with all my program data 2022-08-02 10:41:53 I can design forth words that take this pointer as their one argument and leave this pointer as their one output 2022-08-02 10:42:17 This is one of many ways to encode combinators using forth 2022-08-02 10:43:11 combinators allow for very high level abstractions without using much system resources, but they are slow to program with 2022-08-02 10:43:49 Sure - quantum computing has to be reversible. I have my doubts about quantum computers "displacing" regular computing; I think it will find its place in particular applications, where it makes sense. 2022-08-02 10:44:10 I suppose it it turns out to be TRULY possible to make quantum computers dirt cheap that might change, but it seems unlikely to me. 2022-08-02 10:44:28 Dangerous thing to make predictions about. 2022-08-02 10:45:21 That sounds interesting, but it's just so far from the type of thing I play with that I don't think I really have anything worth saying about it. 2022-08-02 10:46:09 I clicked at some point to the idea that you CAN regard Forth as a functional language if you want to, just by saying that each word takes "the state of the system" as its input and produces a new system state as its output. 2022-08-02 10:46:28 That just has quite a lot of inefficiency in it, though, so it's a very different type of system. 2022-08-02 10:48:11 I think the biggest beneficiaries of quantum computing will be materials science, chemical engineering, drug design, and so on. Stuff that profits fron excellent modeling of molecular systems. 2022-08-02 10:48:34 And the payoffs in those areas might turn out to be enormous. 2022-08-02 10:49:08 I don't expect to ever use a quantum computer to watch a movie or check my email, though.