2023-08-13 00:24:44 I like it. 2023-08-13 00:26:21 The conversation above seems to touch a bit on "orthogonality" in instructions sets. It's nice because it at least opens hte door to the possibility of a systematic and automatic type of operation. Even though in Forth we usually don't do it that way - in all those conditional words of mine there's a lot of orthogonality, but it's implemented by just having all the words in the dictionary as individual 2023-08-13 00:26:23 things. 2023-08-13 00:26:38 The automation shows up in that Python source generator. 2023-08-13 00:26:45 It's just a little set of nested loops. 2023-08-13 01:21:39 I actually meant to say "orthogonality" in that last sentence, instead of "automation." It's just that Forth "buries" that orthogonality by having independent definitions for all of the words, regardless of that similarities. 2023-08-13 01:22:07 But then of course that's part of how it can be so "generically powerful." 2023-08-13 02:23:41 Isn't orthogonality when words all do what combinations of the others couldn't? 2023-08-13 02:24:30 Or am I thinking too mathematically? 2023-08-13 02:58:36 Although I tend to see it used in a hand-wavy fasion like "highly orthogonal" 2023-08-13 02:59:03 Like a Forth kernel tends to be "highly orthogonal" but technically you could create some words from others 2023-08-13 03:05:44 is it all global in forth? 2023-08-13 03:15:42 how do forth create variables in memory 2023-08-13 03:15:56 : var_name 143 ; 2023-08-13 03:16:11 is like that? 2023-08-13 03:26:42 siesta: that would be more like CONSTANT 2023-08-13 03:27:22 how about variable? 2023-08-13 03:27:40 is it a long code? 2023-08-13 03:28:37 in my forth i do : var_name LIT [ here 0 , ] ; here swap ! 1 cells allot 2023-08-13 03:28:56 siesta: it compiles a pointer to memory i allot'ed 2023-08-13 03:29:12 to set it to a number do var_name 143 ! 2023-08-13 03:29:45 my forth doesn't have DOES> 2023-08-13 03:30:03 standard usages are: def: VARIABLE foo write: foo 10 ! read: foo @ . 2023-08-13 03:30:25 oh, 10 foo ! sorry.. 2023-08-13 03:30:36 oh right i got it backwards too :-p 2023-08-13 03:31:41 siesta: There are many methods for scope 2023-08-13 03:31:58 : var_name 143 ; can work as a variable, if 143 is a read/writable address. 2023-08-13 03:32:30 siesta: You can remove all definitions after a point so do 'temporary' or 'local' words like that 2023-08-13 03:32:52 siesta: You can use wordlists/vocabularies to create 'packages' with 'private' words 2023-08-13 03:33:15 siesta: Lots of forths have local variables that end scope at the end of a colon definition 2023-08-13 03:33:44 That's a feature of Forth 2012 and the latest drafts of Forth 200x anyway 2023-08-13 03:34:32 there are too many forth implementations 2023-08-13 03:34:48 Well that's one advantage of standards 2023-08-13 03:35:03 Most of the 'big' forths have local variables 2023-08-13 03:36:36 It might be better to ask about some specific code, and how it might be improved 2023-08-13 03:36:47 can i save forth's enviroment like in lisp? 2023-08-13 03:37:01 Depends on the Forth 2023-08-13 03:43:26 But at the same time for lots of simple programs it's easier and best to just use globals 2023-08-13 03:44:44 yeah i like the simplicity of camel forth 2023-08-13 03:45:19 its a forth in DOS TASM 2023-08-13 03:49:42 oh i think jonesforth does variables similar to me except the space is before the definition... 1 cells allot : var_name literal ; 2023-08-13 03:49:51 that is simpler than my code 2023-08-13 03:50:53 i use a forward reference 2023-08-13 03:51:45 why jonesforth is so popular in forth world? 2023-08-13 03:53:05 siesta: i like it because it explains what's happening as it builds the forth... it is great for beginners 2023-08-13 03:54:08 sort of "hands on" 2023-08-13 03:54:50 camel forth is easy too 2023-08-13 03:55:51 cool, i haven't tried it 2023-08-13 03:56:19 may be no one uses DOS any more 2023-08-13 03:58:34 https://www.camelforth.com/news.php 2023-08-13 03:59:11 im using the 8086 version 2023-08-13 04:22:25 all i can make is this thingy https://github.com/rald/pbrain/blob/master/pb.c 2023-08-13 04:25:12 its a procedural brainfuck 2023-08-13 04:31:46 Yeah probably because of the platform 2023-08-13 06:09:38 oh, they left 2023-08-13 06:09:55 it ought to be fairly easy to build jonesforth for MS-DOS, even on 16-bit machines 2023-08-13 07:41:44 veltas: Orthogonality is more like when all combinations of a set of things "work" exactly the way you'd expect them to. 2023-08-13 07:42:25 That's different to my understanding of orthogonal 2023-08-13 07:42:47 Well, that's not really a "mathematical" definition. In mathematics orthogonality means that all the possible inner products of pairs formed from a set of things is zero. 2023-08-13 07:43:35 In computer science is more like saying you don't have "missing combinations" in a matrix of functionality. 2023-08-13 07:45:09 What I meant by it was that in my conditional words I have a set of conditional cases, a set of (signed, unsigned), a set of (with implicit 0, without implicit 0), and a set of "actions" and I can put them together any way I want - all the resulting words are there. 2023-08-13 07:45:29 Oh, and also a set of (with . prefix, without . prefix). 2023-08-13 07:46:19 So I wind up with 6*3*2*2*2 = 144 words in that set. 2023-08-13 07:47:10 I've gradually accumulated a fair body of source code, since I started using these. At some point I can probably scan it all and find out which ones I don't use, and I could purge them if I wanted to. 2023-08-13 07:49:20 And then I'd say it wasn't an orthogonal set of words anymore. 2023-08-13 07:52:33 Orthogonal really means you can't 'reproduce' one in the set from the others 2023-08-13 07:53:11 Yes - they're linearly independent. That's a consequence of the inner products being zero. 2023-08-13 07:53:26 You could also just say they're all at 90 degree angles with one another. 2023-08-13 07:54:51 If you could reproduce one with a combination of the others, then you wouldn't need that one in order to span the space. 2023-08-13 07:55:52 The reason I say this is because you can define orthogonality without inner product rule you give 2023-08-13 07:56:16 Yeah, I guess these are all tightly interrelated concepts. 2023-08-13 07:56:31 The "inner product" thing is jibberish when talking about programming 2023-08-13 07:56:38 You can start in different places and then prove the others. 2023-08-13 07:56:58 Yes. That's why I said it was used differently in computer science. 2023-08-13 07:57:50 I mean, it's ever so slightly related if you squint - you could say that specifying a source register has nothing to do with specifying a destination register, and those have nothing to do with specifying an operation. 2023-08-13 07:58:02 Three distinctly different aspects of an instruction. 2023-08-13 07:58:38 One of the pieces gives you no info on what the other pieces might be. 2023-08-13 08:00:24 I imagine that "fuzzy" similarity might be why they chose that particular word for the CS usage. 2023-08-13 08:02:04 The definition I'm familiar with is that of an "orthogonal instruction set" 2023-08-13 08:03:02 Yes; that's how I think of these conditional words. It's a group of instructions, and it has that orthogonality trait. 2023-08-13 08:03:06 Well abstract algebra is a conspiracy to force these fuzzy similarities and make everyone complain about it 2023-08-13 08:03:28 Loosely speaking I just think of it as meaning that I can regard those words as having "pieces" and I can put them together in any combination. 2023-08-13 08:03:45 All the abstract algebra pros I've met are either highly restrained geniuses or insane 2023-08-13 08:04:50 That does seem to be a thing. 2023-08-13 08:05:10 All of these math things we discussed here are ideas from linear algebra. 2023-08-13 08:05:29 Linear algebra guys aren't quite as strange as abstract algebra guys. :-) 2023-08-13 08:06:02 Orthogonality is the abstraction of perpendicularity 2023-08-13 08:06:10 Yeah. 2023-08-13 08:06:25 I guess it doesn't ONLY show up in linear algebra. 2023-08-13 08:06:48 Linear algebra is one of the math areas that's quite important in science and engineering. 2023-08-13 08:07:09 gordonjcp: I don't think it would be too trivial to convert JonesForth to 8086 2023-08-13 08:07:24 But maybe it's easy to run 32-bit in DOS? I wouldn't know 2023-08-13 08:07:39 Kind of fun that we have both SmithForth and JonesForth. 2023-08-13 08:07:54 JonesForth is what I'd recommend 2023-08-13 08:08:23 I would guess it is both more accessible and fruitful (in the useful ways) but everyone is interested in different things 2023-08-13 08:09:06 What does JonesForth normally run on? 2023-08-13 08:10:44 You know, I'm not sure "orthogonal" is really the same idea as linear independent. It's a special case of linear independence. 2023-08-13 08:11:12 In a 3D system I could give you a set of three linearly independent vectors none of which were orthogonal to one another. 2023-08-13 08:11:32 It's really an abstraction of the idea of perpendicularity. 2023-08-13 08:11:56 Orthogonal things are linearly independent, but not necessarily vice versa. 2023-08-13 08:21:42 Yes but any linearly independent set can be used as a basis for a subspace, and then they'd be orthogonal under that basis 2023-08-13 08:22:10 So they're very much related concepts 2023-08-13 08:26:42 Well I don't know if that's true for all Hilbert spaces but it's true for what you're thinking about, I am already bored typing this out 2023-08-13 09:51:48 crc do you still program with a phone? 2023-08-13 09:52:30 I have to buy a phone, and I wonder if I'll be happy with a unihertz titan pocket 2023-08-13 09:52:54 it has a physical keyboard so I wonder if it will be usable for programming 2023-08-13 09:53:25 https://www.amazon.es/Unihertz-Pocket-Smartphone-Android-Unlocked/dp/B09J4TPZDD 2023-08-13 09:53:57 crc do you think you would be able to use that phone for programming? 2023-08-13 09:54:58 I still have the gpd micro pc, but I can understand why you like the phone for programming 2023-08-13 09:55:15 phone data + wifi is kind of nice 2023-08-13 09:55:39 but I don't want to carry a wireless keyboard everywhere 2023-08-13 09:56:26 also you only use raw termux, did you try more stuff? 2023-08-13 09:56:44 I use termux + andronix which makes for a fake debian and lets me apt install stuff from the debian arm repo 2023-08-13 09:57:24 some limitations because the phone isn't rooted, like I can't bind to port 80 2023-08-13 09:58:12 but I think I can enjoy it a lot if I'm able to program with that phone, I can make web applications that can work as native applications on the phone, and if I need backend the server can be on the phone itself with termux 2023-08-13 10:30:42 veltaS: Sure. Your basis doesn't *have* to be orthogonal. Linear independence is enough. Orthogonality just brings some further coneniences, and then normalizing the unit vectors brings further conveniences. 2023-08-13 10:31:54 There's a formal process called Gram-Schmidt for taking any set of vectors that span syour space and extracting an orthonormal basis from them. 2023-08-13 10:32:29 Of course there's an infinite number of such orthonormal systems. 2023-08-13 12:34:29 veltas: yes. I use an s22 ultra, running under raw termux. 2023-08-13 12:35:17 I've dabbled a bit with other distros under android, but not done much under this 2023-08-13 12:36:38 I've been considering getting a phone with a keyboard, but haven't done so yet. 2023-08-13 12:37:21 I think it'd be usable, though my RSI issues would likely be a limiting factor for me 2023-08-13 12:38:24 (I used to do programming on a Blackberry under a ssh connection and using a RetroForth Java midlet a decade ago) 2023-08-13 12:42:41 vms14 that was 2023-08-13 12:43:09 I also use termux, I've got a Pixel Pro 6 I bought second hand for nothing 2023-08-13 12:43:20 I just have regular android 2023-08-13 12:44:21 Just something to do if indisposed at work, or if I want SSH access out of the house 2023-08-13 13:30:43 Yes, vms14, sorry 2023-08-13 13:31:21 I don't really do web development, so can't make any comment on the suitability for that 2023-08-13 13:35:41 I've done work with a number of languages under Termux (other than Forth, this would include assembly, C, C#, Common Lisp, Kotlin, Swift, Go, and Nim); it's quite fine for terminal applications. 2023-08-13 13:36:45 For graphical stuff, I've used SDL under a distro installed with andronix and a VNC connection to the system. Only limited use there though; I spend almost all my time in a shell. 2023-08-13 13:37:17 in the town, where I was born, lived a man, who coded C... 2023-08-13 13:56:57 No problem 2023-08-13 13:58:16 thrig: ...we're all writing in a 70's systems language, a 70's systems language, a 70's systems language... 2023-08-13 13:59:55 terminals are also kinda 70s 2023-08-13 14:01:45 Honestly I like C more than most mainstream languages so I don't see the issue with it being old 2023-08-13 14:01:57 But I was just playing along 2023-08-13 14:30:09 Yeah, I feel the same. C is really still the most prominent language in the world, so it's obviously not age alone that is the criterion. 2023-08-13 14:37:26 If anything age is a good thing, tried and tested 2023-08-13 14:37:47 Well age and widespread usage indicates it's at least a plausible language for development 2023-08-13 14:38:28 I think C's strong in ways people don't appreciate, it's not just "too big to fail" 2023-08-13 18:21:47 Yeah - I agree. I've always liked it, honestly. Just never had a lot of opportunity to work with it. The minute I found it, though, it leapt ahead of other languages I'd worked with (mostly FORTRAN and Pascal). 2023-08-13 18:22:01 Basic. 2023-08-13 18:22:07 I'd take C over all of those. 2023-08-13 18:22:31 In a lot of ways I'd take C over Python - I just like what I can do quickly with Python given it's package ecosystem. 2023-08-13 18:23:20 But Python is alright too - I have nothing against it really, other than it being kind of slow. For the "glue" part of applications, though, that's not really a problem. 2023-08-13 18:29:15 prototyping languages differ from things you maybe want to support for longer or not be terribly slow 2023-08-13 18:41:20 Crc veltas i was afk 2023-08-13 18:41:27 Reading from the logs 2023-08-13 18:41:49 Never tried the graphical stuff with andronix 2023-08-13 18:41:53 I just wanted a shell 2023-08-13 18:42:08 But id go for a web app instead 2023-08-13 18:42:26 Still I have to rewrite again my toy lang, now in js 2023-08-13 18:42:40 But I'd like to add types, which also means oop 2023-08-13 18:42:59 And still wonder what if I use a lisp syntax instead 2023-08-13 18:43:20 I'm mainly pushing lists on the stack and evaluating them 2023-08-13 18:44:02 Veltas why you bought a pixel 6 for nothing? 2023-08-13 18:55:44 Did you plan to use it with some keyboard 2023-08-13 19:54:30 thrig: Yeah, that's true. And the thing is most of those heavy lifting Python packages like numpy are themselves implemented in C. So you can write even serious numerical applications in Python and you'll wind up spending most of your time in the C code anyway - the low performance of the Python won't hurt you much. It's a good synergism. 2023-08-13 19:55:02 or fortran... 2023-08-13 19:55:39 Yes - apparently even these days it's still often the best choice for highest performance on number crunching.