2025-05-20 00:07:12 forthBot: -1 NUM-TO_BIN CR 2025-05-20 00:07:12 Unknown word: NUM-TO_BIN 2025-05-20 00:07:37 forthBot: LOAD "ini.fth" ` 2025-05-20 00:07:37 Fichier chargé 2025-05-20 00:07:41 forthBot: -1 NUM-TO_BIN CR 2025-05-20 00:07:41 Unknown word: NUM-TO_BIN 2025-05-20 00:07:56 forthBot: -1 NUM-TO-BIN CR 2025-05-20 00:07:56 -1 2025-05-20 00:08:03 haha 2025-05-20 00:19:55 or on MIPS for example where you can load a smaller sign extended constant and load -1 in one instruction like 1 2025-05-20 00:20:30 free -1 for everyone! 2025-05-20 00:27:02 you get a -1 and you get a -1 and you get a -1! 2025-05-20 00:43:14 forthBot: 123456789123457 PRIME? 2025-05-20 00:43:32 forthBot: 123456789123457 PRIME? . 2025-05-20 00:43:32 1 2025-05-20 00:43:54 chez moi trus c'est not equal a zero 2025-05-20 00:45:37 tout ce qui n'est pas equal a zero est true 2025-05-20 01:00:32 c'est ne pas un prime dANS Forth 2025-05-20 01:00:56 sorry, my French is... rust 2025-05-20 01:11:02 Environment for vms14 inactive, freeing... 2025-05-20 01:43:52 forthBot: SEE FRIME? 2025-05-20 01:43:52 SEE: Unknown word: FRIME? 2025-05-20 01:44:26 forthBot: LOAD "ini.fth" 2025-05-20 01:44:27 Fichier chargé 2025-05-20 01:44:30 forthBot: SEE FRIME? 2025-05-20 01:44:30 SEE: Unknown word: FRIME? 2025-05-20 01:44:43 forthBot: SEE FPRIME? 2025-05-20 01:44:43 : FPRIME? DUP 2 < IF DROP 0 EXIT THEN DUP 2 = IF DROP 1 EXIT THEN DUP 2 MOD 0 = IF DROP 0 EXIT THEN DUP SQRT 3 DO DUP I MOD 0 = IF DROP 0 UNLOOP EXIT THEN 2 +LOOP DROP 1 ; 2025-05-20 01:45:34 forthBot: 123456789123457 FPRIME? 2025-05-20 01:45:40 forthBot: . 2025-05-20 01:45:41 1 2025-05-20 01:45:54 forthBot: 123456789123457 FPRIME? . 2025-05-20 01:45:55 1 2025-05-20 01:47:43 forthBot: 1 PRIME? 2025-05-20 01:47:49 . 2025-05-20 01:48:09 forthBot: . 2025-05-20 01:48:10 0 2025-05-20 01:49:00 forthBot: 1 127 << 1 - PRIME? . 2025-05-20 01:49:00 1 2025-05-20 01:52:06 forthBot: 127 3457 * 129 2377 * PGCD . 2025-05-20 01:52:07 1 2025-05-20 01:52:42 forthBot: 127 3457 * 129 2378 * PGCD . 2025-05-20 01:52:42 1 2025-05-20 01:53:01 forthBot: 127 127 * 127 2378 * PGCD . 2025-05-20 01:53:01 127 2025-05-20 01:53:31 forthBot: 127 367 * 127 2378 * PGCD . 2025-05-20 01:53:31 127 2025-05-20 01:55:48 forthBot: 2378 PRIME-FACTORS .S 2025-05-20 01:55:48 2 29 41 2025-05-20 01:55:49 <3> -1 -1 1 2025-05-20 01:56:14 forthBot: CLEAR-STACK 2025-05-20 01:56:17 forthBot: 2378 PRIME-FACTORS .S 2025-05-20 01:56:17 2 29 41 2025-05-20 01:56:18 <0> 2025-05-20 02:01:13 hello soweli_iki 2025-05-20 02:05:48 hello 2025-05-20 02:14:40 forthBot: 123456789123457 PRIME-FACTORS .S 2025-05-20 02:14:44 123456789123457 2025-05-20 02:14:44 <0> 2025-05-20 02:15:13 forthBot: 123456789123457 2 * PRIME-FACTORS .S 2025-05-20 02:15:16 2 123456789123457 2025-05-20 02:15:17 <0> 2025-05-20 03:48:10 Environment for anthk_ inactive, freeing... 2025-05-20 04:15:16 Environment for cleobuli_ inactive, freeing... 2025-05-20 08:52:15 MrMobius: Not free https://github.com/hansfbaier/mecrisp-quintus/blob/main/mecrisp-quintus-source/common/comparisions.s#L22 2025-05-20 08:52:54 Although it's free on 0< 2025-05-20 08:53:08 But not faster, I'm assuming 0< would work the same for 1 with a logical shift 2025-05-20 08:53:30 But 0= et al there's work to make it -1 2025-05-20 08:54:06 Next time I do some Forth stuff I'm going to try FORTH-79, it seems easier to write one too 2025-05-20 10:13:19 veltas: there aren't many forth-79 systems out there for Unix and such 2025-05-20 10:34:19 Fortunately they're easy to write 2025-05-20 10:36:15 yes, or maybe use a jupyter ace emulator and write a tape (there's the -S flag for fast code parsing) with the missing functions 2025-05-20 10:36:35 I think the official manuals cover a good chunk 2025-05-20 10:37:18 IMO not much point using emulators for Forth 2025-05-20 10:38:25 there's libforth from the same author as subleq+eforth 2025-05-20 10:39:36 and jonesforth in C 2025-05-20 10:41:08 libforth comes with an editor 2025-05-20 10:44:07 no doubles (32 bit numbers as integers), and for floats you might borrow them from eforth's functions 2025-05-20 10:44:40 the author plans to enable a soft float library for libforth, he might just do that 2025-05-20 10:47:03 I tend to avoid C forths, although libforth seems to have nice documentation 2025-05-20 10:47:24 subleq-eforth too, and the muxleq one, in the forth file 2025-05-20 10:47:28 and embed, from the same author 2025-05-20 10:47:54 altough embed it more f83/ans94 2025-05-20 10:52:18 Native Forths are good, because if you don't like assembly you only need a small kernel anyway 2025-05-20 10:54:12 you would use blocks right? 2025-05-20 10:59:03 Blocks are good for I/O 2025-05-20 10:59:13 And source management 2025-05-20 10:59:37 No reason not to support files on a PC though 2025-05-20 11:06:46 sometimes I'd love sdl2 bindings for pforth 2025-05-20 11:07:13 the same way jimtcl has them with ease (WIP) 2025-05-20 11:10:52 Probably easy to add though 2025-05-20 11:11:02 I wonder if SDL3 is ready for use? 2025-05-20 11:15:18 idk, but on jimtcl 2025-05-20 11:15:32 https://github.com/msteveb/jimtcl 2025-05-20 11:15:41 not forth but it's an interesting mini-tcl 2025-05-20 11:25:03 crc and I found it a bit of a pain to get SDL working nicely for the graphical ilo VM 2025-05-20 11:25:36 It was hard to get it to perform as well as the X implementation 2025-05-20 11:25:57 There are a few things in SDL, which might include 'surfaces', which actually aren't a good idea to use 2025-05-20 12:02:52 btw, there's a forth for the UXN virtual machine 2025-05-20 12:03:51 http://www.call-with-current-continuation.org/uf/uf.html 2025-05-20 12:07:15 vms14: What do you think about this? https://www.theguardian.com/commentisfree/2025/may/20/barcelona-summer-tourism-locals-city 2025-05-20 12:07:27 And anthk_ too, don't know who's where 2025-05-20 12:07:55 anthk_: Yeah the creator of UXN visits this channel sometimes 2025-05-20 12:10:51 I don't care, I live up in the Atlantic =) 2025-05-20 12:11:16 today I have nice weather but overall it can be chilly here... 2025-05-20 12:11:29 so not many tourists there, but yes, BCN and the Mediterranean are overcrouded 2025-05-20 12:16:24 on forth, I tried dusk os/collapse OS 2025-05-20 12:17:52 collapse OS it's fine but it shows up the stack at hex 2025-05-20 12:19:16 It's hexadecimal by default? 2025-05-20 12:19:25 Or only hex and no decimal/ 2025-05-20 12:19:27 ? 2025-05-20 12:20:11 hex by default on .S 2025-05-20 12:20:17 . dumps decimal I think 2025-05-20 12:20:44 veltas actually I have no idea if it's true 2025-05-20 12:21:30 it's close to Forth 79 I guess 2025-05-20 12:21:56 uh, no do word? 2025-05-20 12:22:38 and no words/vlist 2025-05-20 12:22:42 it makes no sense, we need tourists 2025-05-20 12:24:32 I often doubt things in Guardian opinion pieces 2025-05-20 12:25:12 You have to read between the lines when reading papers, and it reads to me like a sort of masochistic tourist anxiety piece 2025-05-20 12:25:41 I hate the way Brits act in Spain and Portugal sometimes, but I don't doubt the touristy places need that traffic to survive so they might resent them but it's not good if we all stop going there 2025-05-20 12:26:02 Personally I prefer to go on holiday in UK so I'm of no value to the Spanish economy 2025-05-20 12:27:21 as if Spain was just the Mediterranean... 2025-05-20 12:27:33 because UK it's just about London right? 2025-05-20 12:27:48 also BCN is damn huge 2025-05-20 12:28:02 Tourism to survive? In the 2nd most industrious city in Spain after Madrid? 2025-05-20 12:28:06 I doubt it 2025-05-20 12:28:29 barcelona makes a lot of money from tourists 2025-05-20 12:28:35 not survive, but live better 2025-05-20 12:28:54 I don't think the city wants to loose money 2025-05-20 12:29:28 and people in Barcelona, especially young people tends to be open minded 2025-05-20 12:29:40 old people is a bit racist though 2025-05-20 12:30:54 but barcelona has mixed races all over the place 2025-05-20 12:30:54 By tourist places I mean more like areas that are basically tourist hotspots, not the whole of BCN 2025-05-20 12:31:09 the only thing that I know is that you can get robbed and scammed easily 2025-05-20 12:31:10 I avoid places like BCN because the sun is racist against me, I am way too fair to go to really sunny places 2025-05-20 12:31:27 I just burn, almost as if I was ginger but I'm not, I just burn really easily 2025-05-20 12:31:30 And have lots of moles 2025-05-20 12:31:50 So doctor's orders, stay out of the sun 2025-05-20 12:32:20 I never get burnt, I just go to the water whenever I'm dry 2025-05-20 12:33:12 Sounds lovely 2025-05-20 12:33:28 I went to BCN once and the sand looks like it has tiny specs of gold in it 2025-05-20 12:33:39 Supposedly it really does but I didn't know if it was fool's gold or whatever at the time 2025-05-20 12:33:49 barceloneta actually is a very dirty beach 2025-05-20 12:35:14 Sorry it wasn't actually BCN, I think it was further south 2025-05-20 12:35:29 go to sitges xd 2025-05-20 12:35:38 the gay city 2025-05-20 12:35:42 Given I am used to the North Sea, I have to say the Med seems much cleaner 2025-05-20 12:35:49 they will welcome you 2025-05-20 12:37:22 What are you trying to say? :P 2025-05-20 12:38:17 I was joking 2025-05-20 12:38:44 there is a nudist beach there 2025-05-20 12:39:56 I never wanted to travel, if I had to travel I would choose japan or china 2025-05-20 12:40:32 the only countries that get my interest 2025-05-20 12:43:41 in the north here it's odd 2025-05-20 12:44:03 if you dare to bath as in the Mediterranean, bad news, it can be crazy in autumn 2025-05-20 12:44:39 with the climate change, temps are warmer, but I'm worried because Winters can be extreme too 2025-05-20 12:45:05 and with the Atlantic humidity, I am far mor confortable in Continental Spain at 3C (dry climate) 2025-05-20 12:45:11 than 10 in the Atlantic Coast 2025-05-20 12:45:20 s,mor,more 2025-05-20 12:45:56 here once we had 43C, it was hell, kinda like >35C in Southern Asia 2025-05-20 12:46:00 you know what I mean 2025-05-20 12:46:28 43C in the inner Spain it's roasty/itchy but bearable, just drink lot of water 2025-05-20 12:46:36 43C in the North felt like a damn sauna 2025-05-20 12:46:47 like staying in front of a bakery oven 2025-05-20 12:47:05 I might write a silly function in Forth 2025-05-20 12:47:39 temps over 20 feel like +5, temps below 20 feel -5 2025-05-20 12:49:04 : ntemp dup 20 < if 5 - else 5 + then ; ok 2025-05-20 12:59:41 :p 2025-05-20 13:10:51 btw veltas if you come to bcn and you are not welcome you can tell me and I'll welcome you 2025-05-20 13:10:51 :D 2025-05-20 13:31:27 https://www.youtube.com/watch?v=o8NiE3XMPrM 2025-05-20 13:40:52 veltas: is "bcn" Barcelona? 2025-05-20 13:41:00 oops, I meant vms14 again 2025-05-20 13:42:09 I hope it's barcelona or I've had a very confused conversation 2025-05-20 13:43:35 MrMobius: the efficiency issue is not loading the constant -1, but rather implementing a comparison operator like 0= or <, which on many architectures is easier to get a 1 or 0 out of than a -1 or 0 2025-05-20 13:43:42 possibly because of the influence of C 2025-05-20 13:45:20 the RISC-V `sltiu` instruction is one example of this, but amd64 and i386 have it too, with setne/seta/setlt etc. 2025-05-20 13:49:09 veltas: I didn't realize it was possible to display anything with SDL without using surfaces, but I guess Vulkan, Metal, and OpenGL are ways to do so? 2025-05-20 13:50:55 uh, the RISC-V `sltiu` instruction veltas linked 2025-05-20 13:57:36 sometimes I envy Martin Gardner as a recreational Mathematician 2025-05-20 13:58:35 he didn't past beyond calculus in HS, and yet if he knew Forth he would have been very productive 2025-05-20 13:58:58 but he know about Conway and so on; he might been aware, for sure 2025-05-20 14:00:22 I don't think Forth would have necessarily increased Gardner's productivity 2025-05-20 14:00:36 he was certainly a huge influence on my childhood 2025-05-20 14:00:51 semi-mine in teen ages 2025-05-20 14:02:37 in my case I did algebra better on computers than on paper 2025-05-20 14:03:12 I hated the notation on Math, but I loved the puzzles and games 2025-05-20 14:03:57 it's certainly possible to write a CAS (computer algebra system) in Forth but I don't know of one 2025-05-20 14:04:10 and I still do; the best ones are the ones which make you think laterally 2025-05-20 14:04:19 eh, not CAS, but the Forth Scientific Library it's close 2025-05-20 14:04:27 a CAS is kind of squarely in the middle of Things Garbage Collection Is Good For 2025-05-20 14:04:34 it would be lighter than Maxima and any common lisp for sure 2025-05-20 14:04:38 even sbcl 2025-05-20 14:05:02 and in a sense Forth is Lisp without garbage collection 2025-05-20 14:05:19 the Forth Scientific Library is for calculations, not algebra 2025-05-20 14:05:21 the reverse it's true to, Forth is Lisp without needing gc 2025-05-20 14:05:23 ah, true 2025-05-20 14:05:48 but it has neccesary number sets 2025-05-20 14:05:55 right. but if your application kind of inherently needs GC, Forth gets a lot less appealing 2025-05-20 14:05:58 such as complex numbers 2025-05-20 14:06:45 something like XLISP might be a good fit for a lightweight CAS 2025-05-20 14:07:00 vms14: is "bcn" Barcelona? 2025-05-20 14:10:51 xentrac: it is 2025-05-20 14:10:51 aha 2025-05-20 14:11:02 and VLC = valencia 2025-05-20 14:12:22 I like to use VLC on my phone to watch videos 2025-05-20 14:12:51 this is a sort of CAS I hacked together in Python in half an hour one day: http://canonical.org/~kragen/sw/dev3/diff.py 2025-05-20 14:13:19 with sectorlisp you have a miniCAS 2025-05-20 14:13:49 sadly not the same with sectorforth 2025-05-20 14:13:57 which is seriously handicappeed 2025-05-20 14:14:01 a somewhat more elaborate one I spent a few hours on is http://canonical.org/~kragen/sw/dev3/alg.py 2025-05-20 14:14:26 https://github.com/cesarblum/sectorforth 2025-05-20 14:14:42 giving how forth it's bootstrapped, it would support integer aritmethic OOTB, but it doesn't 2025-05-20 14:14:45 a demo screencast of alg.py is https://asciinema.org/a/389974 2025-05-20 14:15:08 it doesn't have integer primitives 2025-05-20 14:15:33 also as I'm using a shitty n270 netbook, I prefer to use dosbox-x instead of qemu 2025-05-20 14:15:35 it's faster 2025-05-20 14:18:46 what's n270? 2025-05-20 14:18:54 aaand the openbsd folks disabled the dynamic core, damn it 2025-05-20 14:18:57 ATOM n270 2025-05-20 14:19:08 aha, amd64? or i386? 2025-05-20 14:19:12 the reason on the port makefile: it needs w^x 2025-05-20 14:19:14 i386 2025-05-20 14:19:26 who cares, /usr/local it's wxallowed :| 2025-05-20 14:19:38 I will rebuild dosbox-x in a VM and that's it 2025-05-20 14:20:02 dynami core = much faster x86 emulation 2025-05-20 14:20:22 W^X doesn't necessarily prevent you from using runtime code generation if it's on a per-page basis 2025-05-20 14:20:24 I could boot the forth floppy almost at pentium MMX speeds 2025-05-20 14:20:25 yes 2025-05-20 14:20:26 I know 2025-05-20 14:20:32 but the maintainers did it wrong 2025-05-20 14:20:35 you can generate code on a page and then make it executable but not readable 2025-05-20 14:20:45 /usr/local it's wxallowed, who cares 2025-05-20 14:20:49 it works fine 2025-05-20 14:21:04 oh, I didn't understand that term before. thanks for explaining 2025-05-20 14:21:24 just place /usr/local/share/doc/pkg-readmes/dosbox-x stating that you need wxallowed (the default partition scheme under OpenBSD for /usr/local) and that's ti 2025-05-20 14:25:13 anyway I was going to say that you could probably use a Forth that comes in the form of a Linux or OpenBSD executable 2025-05-20 14:25:26 it should be pretty easy to get it below 4K 2025-05-20 14:25:57 for an indirect-threaded Forth (though create does> requires some kind of trickery) 2025-05-20 14:32:22 I use pfroth 2025-05-20 14:32:24 pforth 2025-05-20 14:32:39 but I like to test small forths 2025-05-20 14:33:10 on sectorforth, once you can bootstrap stuff from some external block/file, you get the same power as lisp 2025-05-20 14:33:34 uhm, sectorforth uses nasm, maybe I can run it *under* DOS 2025-05-20 14:33:49 by setting up the loading point at 0x100 2025-05-20 14:36:12 anthk_ did you add c bindings to pforth? 2025-05-20 14:37:12 why do you use pforth over gforth? 2025-05-20 14:37:19 or why you dislike gforth 2025-05-20 14:37:54 I saw someone here also preferring pforth 2025-05-20 14:38:55 gforth doesn't build on 32 bit 2025-05-20 14:38:58 at least under openbsd 2025-05-20 14:39:11 I like how easy is to add bindings to c libraries in gforth, except when I have to add more flags 2025-05-20 14:39:34 c-function initscr initscr -- void 2025-05-20 14:40:04 it uses stack notation, which is cool 2025-05-20 14:40:04 c-function mv move n n -- void 2025-05-20 14:41:25 we should list all the forth implementations in some place 2025-05-20 14:41:41 there are tons 2025-05-20 14:41:49 yeah, I was thinking about that 2025-05-20 14:41:59 maybe the ones that are used the most or interesting 2025-05-20 14:42:08 I still coudln't 'fix' the m*/ issue with eforth+subleq 2025-05-20 14:43:07 pforth has a better prompt 2025-05-20 14:43:20 3 4 ok 2025-05-20 14:43:20 Stack<10> 3 4 2025-05-20 14:43:51 gforth's C FFI has a hard time with passing structs by value 2025-05-20 14:44:05 I have to rewrite my toy lang and make it a bit more inspired in forth 2025-05-20 14:44:29 like having a state flag and stop abusing lists and symbols also remove the syntax sugar I guess 2025-05-20 14:44:54 I have pforth and eforth+muxleq as a toy because I can compile it even under XP machines 2025-05-20 14:44:57 with min-c 2025-05-20 14:45:10 not an speed demon, but it's fine under muxleq 2025-05-20 14:45:11 the host language will be perl or js, so they have garbage collection and no memory access 2025-05-20 14:45:21 perl is damn slow for muxleq :| 2025-05-20 14:45:24 the stack will be able to take any type not just numbers 2025-05-20 14:45:35 I prefer forth as is 2025-05-20 14:45:49 I do not wish to fake memory but I would like to find a middle ground between forth and those implications 2025-05-20 14:45:52 once I tried Joy and it was an LSD blend between Forth and Lisp 2025-05-20 14:46:11 mine is like a reversed lisp 2025-05-20 14:46:25 so almost TCL 2025-05-20 14:46:40 it has lexical scope lambdas closures, inner definitions can be nested and can evaluate lists as code and create a lambda 2025-05-20 14:47:11 a colon word is actually { env: {}, code: [] } and you can mess with both 2025-05-20 14:47:33 also inner definitions will inherit from the parent 2025-05-20 14:47:51 it is just too different from forth and I failed to capture forth's simplicity 2025-05-20 14:48:40 but I do not want to fake memory because it does not make sense 2025-05-20 14:50:52 to me muxleq was amazing; add two lines of code, convert your subleq vm in C to something close to an 8mhz machine 2025-05-20 14:50:53 you could also describe PostScript as a blend between Forth and Lisp 2025-05-20 14:50:54 as I said, is not speedy, but it will run everywhere 2025-05-20 14:51:21 anthk_: hmm, that ounds appealing; what's muxleq? 2025-05-20 14:51:39 xentrac: subleq with multiplexing 2025-05-20 14:52:11 https://howerj.github.io/subleq.htm 2025-05-20 14:52:25 https://github.com/howerj/muxleq 2025-05-20 14:52:35 subleq->muxleq two lines in C, literally 2025-05-20 14:53:11 well, three 2025-05-20 14:53:11 } else if (c & 0x8000 && c != n) { 2025-05-20 14:53:12 u16 mc = m[c & 0x7FFF]; 2025-05-20 14:53:43 on eforth, I edited subleq.fth and I generated a new dec image 2025-05-20 14:53:54 with floats, do...loop, a better SEE word and so on 2025-05-20 14:54:02 hmm, it bitwise multiplexes bits from memory words a and b? 2025-05-20 15:01:39 if c doesn't state an I/O instruction < 0 2025-05-20 15:01:46 multiplex whatever a and b do? 2025-05-20 15:02:10 under subleq, neg values under a and b are special cases 2025-05-20 15:02:17 get input, store input I think 2025-05-20 15:03:32 subleq is too esoteric, I understood the Z80-like for the GB better :p 2025-05-20 15:03:53 ah wait I forgot, <0 at C is halt 2025-05-20 15:08:17 ah 2025-05-20 15:10:00 words from the config with float and more: https://termbin.com/6nce 2025-05-20 15:11:14 as it's softfloat, you can edit the makefile and set CFLAGS to -O3 -ffast-math 2025-05-20 15:12:12 the syntax for floats it's like this 2025-05-20 15:12:16 200 f 37 f f/ f. 2025-05-20 15:13:10 it has blocks in memory, but I coudn't save them 2025-05-20 15:15:56 if you want a "new.dec" image 2025-05-20 15:16:10 so you don't have to wait 2025-05-20 15:16:18 https://termbin.com/omaj 2025-05-20 15:24:40 I don't really get the pnit of subleq and muxleq 2025-05-20 15:24:57 point? 2025-05-20 15:27:56 Yeah 2025-05-20 15:29:13 simple vm 2025-05-20 15:31:05 I think you mean 'short' VM, but I don't get point of that 2025-05-20 15:31:18 Because konilo e.g. is a lot longer but is much more simple, I think most would agree 2025-05-20 15:31:22 subleq sits amongst a variety of esolangs to demonstrate an extreme end of what computing means 2025-05-20 15:32:33 people argue a lot about the affordances of programming languages, talk a lot of crap about "minimalism" but with subleq et al you really do get a minimal instruction count 2025-05-20 15:33:27 it is the reductio ad absurdam of minimal computing 2025-05-20 15:33:40 Indeed, minimalism isn't the same as minimal 2025-05-20 15:33:44 there are worse examples based on lambda calculus 2025-05-20 15:33:51 ACTION shrugs 2025-05-20 15:34:29 ACTION sits back to watch everyone make arguments that demonstrate the arbitrary nature at work 2025-05-20 15:35:51 how's konilo? 2025-05-20 15:36:52 Just generally stuff about the nature of programming languages tends to be a waste of time, IMO 2025-05-20 15:37:02 Use what works 2025-05-20 15:37:37 lol 2025-05-20 15:37:47 uh, sigils like erl? 2025-05-20 15:37:49 perl 2025-05-20 15:37:56 anthk_: You'd have to ask crc, who uses it for day-to-day stuff 2025-05-20 15:38:21 "what works" has an element of individual taste, but since programming is for people, it is a social question 2025-05-20 15:38:21 anthk_: my vm is much longer than subleq/muxleq (30 instructions), but most of the implementations are pretty concise. See https://konilo.org/latest/ilo.c for one in C 2025-05-20 15:38:26 forthBot: LOAD "ini.fth" 2025-05-20 15:38:26 Fichier chargé 2025-05-20 15:38:34 forthBot: EURO 2025-05-20 15:38:34 7 20 5 27 2 9 12 2025-05-20 15:38:51 167 millions a l'euromillion ce soir 2025-05-20 15:39:24 forthBot: will gives you the good combine 2025-05-20 15:39:24 Unknown word: will 2025-05-20 15:39:24 Unknown word: gives 2025-05-20 15:39:25 Unknown word: you 2025-05-20 15:39:25 Unknown word: the 2025-05-20 15:39:26 Unknown word: good 2025-05-20 15:39:26 Unknown word: combine 2025-05-20 15:39:30 lol 2025-05-20 15:39:39 Can you stop spamming chat please 2025-05-20 15:39:43 see also the whole notion of "write only" languages: Things written in a way that serves the expressive needs of the person who writes them originally, but not people who might need to adapt them for their own downstream uses. 2025-05-20 15:40:06 In practice I find Forth to be surprisingly readable 2025-05-20 15:40:26 Surprising because I don't anticipate it to make sense in a year, even my own code, and yet all the code I find I seem to be able to understand 2025-05-20 15:40:34 veltas: I agree, the sokoban example it's many times simplers than a C one 2025-05-20 15:40:40 And I think this is because it's hard enough to write that you have to make it friendly in first place 2025-05-20 15:40:41 no need to ged mad with ncurses 2025-05-20 15:40:42 veltas: congratulations 2025-05-20 15:41:41 the forth isn't standard, but is pretty compact & is simple in design. It uses about ~2500 words of memory for the basic system (excluding memory used for various temporary things & buffers), with 258 words defined 2025-05-20 15:41:42 I know some guy wanting to flash some Arduino with EForth 2025-05-20 15:41:47 but IDK which is the best one 2025-05-20 15:41:50 dzho: Thanks mate 2025-05-20 15:42:08 I'm glad someone congratulated me for Forth's readability, it's about time 2025-05-20 15:42:32 veltas: I'm congratulating the thoroughness of your solipism 2025-05-20 15:42:45 cleobuli_: you really need to fix the bug where a single line of input can generate six lines of error messages 2025-05-20 15:43:02 idk if the eforth from chochain has i2c support or not 2025-05-20 15:43:29 in order to drive LCD screens 2025-05-20 15:44:01 veltas: I think subleq is interesting because you can implement some version of it with a relatively small number of transistors 2025-05-20 15:44:21 I told him that a DOS boot image with MINA and some serial adapter it would be as usable 2025-05-20 15:44:24 but not as power friendly 2025-05-20 15:44:30 ACTION has run konilo on a variety of systems, ranging from an 8088 w/384K of RAM, a Mac II, and a wide variety of increasingly modern systems 2025-05-20 15:44:38 dzho: I don't really see how what I said was solipsistic, please bear in mind the /topic 2025-05-20 15:45:17 dzho: what on Earth makes you think veltas is a solipsist‽ 2025-05-20 15:45:38 I'm not sure I've ever met a real solipsist 2025-05-20 15:47:06 "I can read what I wrote even though I didn't try to make it readable" is a self-centered position. 2025-05-20 15:47:50 I obviously don't know veltas so I don't know what veltas "is" but this line of discussion has that nature in my view. 2025-05-20 15:48:17 where on earth did you get the idea that solipsism has something to do with being self-centered? 2025-05-20 15:48:27 The whole point of something like this IRC channel is to discuss things with each other, to compare notes and the like. 2025-05-20 15:48:34 I mean I suppose in a literal sense solipsism is centered on the self 2025-05-20 15:48:47 but it has nothing to do with the conventional meaning of "self-centered" 2025-05-20 15:48:58 https://en.wiktionary.org/wiki/solipsism <-- definition 2, for reference 2025-05-20 15:49:27 interesting, I hadn't heard of this definition 2025-05-20 15:49:33 seems to be new 2025-05-20 15:50:52 lol, perfect 2025-05-20 15:51:08 A solipsist wouldn't care about maintainability 2025-05-20 15:51:10 well, maintainable by whom? 2025-05-20 15:51:27 if your metric is the person who wrote it, then how maintainable is it? 2025-05-20 15:51:42 sometimes that's the only metric you have access to 2025-05-20 15:52:02 I mentioned my code and also others, because I observe even code I wrote is hard to read sometimes after many sleeps 2025-05-20 15:52:08 comments are free 2025-05-20 15:52:11 And I think this rings true with most programmers 2025-05-20 15:52:13 yeah 2025-05-20 15:52:16 and pfroth comes with a builting help 2025-05-20 15:52:45 anthk_: how do you invoke it? 2025-05-20 15:52:46 welcome back, logbot ;-) 2025-05-20 15:52:59 xentrac: S" HELP" ENVIRONMENT? 2025-05-20 15:53:12 help tuck 2025-05-20 15:53:19 help open-blockfile 2025-05-20 15:53:23 0 2025-05-20 15:53:39 so maybe my copy is built without it 2025-05-20 15:54:02 maybe 2025-05-20 15:54:34 help tuck 2025-05-20 15:54:34 /usr/local/include/pfe/core-ext.h: 2025-05-20 15:54:35 */ 2025-05-20 15:54:35 ok 2025-05-20 15:54:45 that looks nice 2025-05-20 15:55:05 but wait, why is pforth showing you things from /usr/local/include/pfe? 2025-05-20 15:55:15 heh 2025-05-20 15:55:55 Might as well if the docs are in headers already 2025-05-20 15:55:58 Save space 2025-05-20 15:56:01 maybe it pick ups frm here? 2025-05-20 15:56:35 are you sure you aren't accidentally running pfe instead of pforth? 2025-05-20 15:57:46 pfe is symlinked to pfe-forth 2025-05-20 15:58:00 and pfe-exec to pfe-exec-forth 2025-05-20 15:58:23 sure, but none of that has to do with pforth 2025-05-20 15:58:31 which is a different Forth implementation 2025-05-20 15:58:45 pkg contents https://termbin.com/5qgt 2025-05-20 15:58:54 it's pfe, but wasn't it called pforth too? 2025-05-20 15:59:04 that's a pfe package 2025-05-20 15:59:05 no 2025-05-20 15:59:14 tt.4th is nice btw 2025-05-20 15:59:58 ah 2025-05-20 16:00:23 In anthk_'s defence, they're both called "Portable Forth" 2025-05-20 16:00:31 true! 2025-05-20 16:00:34 The confusion is understandable 2025-05-20 16:00:47 love me some ancient sourceforge 2025-05-20 16:01:32 PFE was the first Forth I ever used 2025-05-20 16:01:49 0.9.14 2025-05-20 16:02:24 I recently hacked it to build on current Linux, which was mostly a question of undoing its dependence on GCC features that don't exist anymore 2025-05-20 16:03:24 and in one case a Linux kernel feature that doesn't exist anymore, "uselib" 2025-05-20 16:05:08 so I just built PFE 0.33.71 and, yes, it does have help, even though pforth doesn't 2025-05-20 16:06:30 it has a block editor but once I flush it, sometimes launching edit-blockfile tell's me that the file doesn't exist 2025-05-20 16:07:13 I see that tt.4th has suffered some damage from the switch to Microsoft Windows fonts where ' is vertical 2025-05-20 16:07:21 but it still works even if the help looks bad 2025-05-20 16:08:49 I wonder what's wrong with the block editor? 2025-05-20 16:11:28 Probably missing an UPDATE somewhere 2025-05-20 16:13:34 would that cause it to tell you the file doesn't exist? 2025-05-20 16:15:56 I guess not 2025-05-20 16:16:03 Maybe a block mapping/config issue 2025-05-20 16:18:28 anthk_ so pfe is what you really use, not pforth? 2025-05-20 16:19:13 veltas I'm curious about the readability of forth btw, this is in part why I think I have failed to capture the essence of forth by adding too much syntax 2025-05-20 16:19:29 at the end the beauty of forth is that there is no syntax, just words 2025-05-20 16:19:42 I have removed that beauty in my abomination 2025-05-20 16:20:45 I sometimes blame rpn, but I know forth can be used for complex and large codebases, so it must be my fault instead xd 2025-05-20 16:21:04 you get the same thing in human languages where it really sucks to learn the "hard" ones but you appreciate it in the end because it removes ambiguity. the "easy" ones are fun at the beginning but the ambiguity really sucks later 2025-05-20 16:22:14 but for readability I can only think about the washer example 2025-05-20 16:22:26 I did not see more readable code in forth xd 2025-05-20 16:22:32 lol 2025-05-20 16:23:07 I only see: dup swap rot c! @c + ! 2025-05-20 16:23:27 I assume the readability comes when you abstract those words 2025-05-20 16:23:31 The WASHER code "looks" readable, but most Forth doesn't look like that 2025-05-20 16:23:53 But my definition of readable is I can navigate and understand the bits I need to change it, or to understand what it's doing 2025-05-20 16:24:06 It doesn't mean necessarily I can read it as easily as a book though 2025-05-20 16:24:12 also even the simple WASHER code would be tricky to modify if you didnt know which were words and which were variables and what does what to the stack 2025-05-20 16:24:15 I might have to think about it 2025-05-20 16:24:34 Exactly, the WASHER example is contrived 2025-05-20 16:24:50 It's fun but contrived, rarely can you write code like that 2025-05-20 16:26:21 also, does WASH always do the same thing or do we wash harder or longer sometimes? if you do, then SPIN may need to take that into account. does WASH put anything on the stack then for SPIN to consume? does RINSE depend on what WASH did? 2025-05-20 16:27:02 these arent unsolvable problems but that's where the write only comment comes from I think since you dont have that in C for example 2025-05-20 16:27:03 veltas do you have some code to show that you consider somewhat readable? 2025-05-20 16:27:37 obviously I do not know forth properly so I will not understand it, but maybe I can see and even learn something 2025-05-20 16:29:02 I'm a bit busy but why don't you suggest some code that's hard for you to read and I'll have a look? 2025-05-20 16:29:12 You can contradict me or maybe we'll learn something together 2025-05-20 16:29:42 Can you think of Forth code you'd like to understand? 2025-05-20 16:29:43 nah I just wanted to see your point of "is I can navigate and understand the bits I need to change it, or to understand what it's doing" 2025-05-20 16:29:56 vms14: a *lot* of people have had trouble using Forth in complex and large codebases 2025-05-20 16:30:01 I mean gforth source 2025-05-20 16:30:53 The most readable parts of gforth are Forth code, the worst parts are the C stuff 2025-05-20 16:31:25 I should get used to read forth code I guess 2025-05-20 16:31:50 I tend to dislike looking at code and with forth is kind of hard because there are no rules 2025-05-20 16:32:03 plus I have to really learn it properly first 2025-05-20 16:32:10 vms14: here's the longest Forth program ive written. no claims on readability: https://github.com/JoeyShepard/robot-game/blob/master/forth/RobotGame/main.f 2025-05-20 16:32:43 test/tt.4th from PFE is pretty readable 2025-05-20 16:32:54 oh I like how you define your own extensions of forth first 2025-05-20 16:33:05 well, test/tt.fs 2025-05-20 16:33:31 : empty-pit deep 0 do wide 0 do empty j i pit 2c! 2025-05-20 16:33:31 loop loop ; 2025-05-20 16:34:02 : show-help \ --- ; display some explanations 2025-05-20 16:34:02 30 1 at-xy ." ***** T E T R I S *****" 2025-05-20 16:34:03 etc. 2025-05-20 16:34:57 MrMobius: That's what I'd call "C-style" Forth, but it looks approachable 2025-05-20 16:35:51 Games often end up having massive nested functions of logic, some people don't like that but that's just how the code ends up, better to write the code than worry about how nested it is 2025-05-20 16:36:25 that depends in part on what your debugging facilities are ;) 2025-05-20 16:36:26 veltas: that's fine. I stayed away from the idea of lots of short definitions to claw back a little performance but it was still pretty slow 2025-05-20 16:36:58 agreed. nesting is not always a disfunction 2025-05-20 16:37:04 I think unless the factoring makes 'sense', converting to lots of short definitions can make it *harder* to read 2025-05-20 16:37:39 it definitely can 2025-05-20 16:37:53 however! it makes it much easier to test interactively 2025-05-20 16:37:59 especially if you don't have a single-stepping debugger 2025-05-20 16:38:15 it's huge 2025-05-20 16:40:08 vms14: I don't know if I would characterize my own code as readable, but veltas did: http://canonical.org/~kragen/sw/dev3/wmaze.fs 2025-05-20 16:40:19 he might even still think it's readable 2025-05-20 16:40:36 MrMobius in which forth does it run? 2025-05-20 16:40:48 vms14: TaliForth2 2025-05-20 16:41:26 wmaze.fs is not "C-style" Forth, for comparison 2025-05-20 16:41:32 vms14: you can play with an emulated version in your browser if you like: http://calc6502.com/simulators/TaliForth2/main.html 2025-05-20 16:41:47 here's the game http://calc6502.com/RobotGame/TaliForth2/main.html 2025-05-20 16:41:59 veltas: why isn't it C-style Forth? 2025-05-20 16:42:59 MrMobius ok I was looking at http://calc6502.com/RobotGame/summary.html 2025-05-20 16:45:10 I see how the maze program is forth style 2025-05-20 16:45:19 lots of words and most of them are about a line 2025-05-20 16:47:00 IIRC I wrote it mostly interactively 2025-05-20 16:47:35 testing each word, or two or three words, after writing them 2025-05-20 16:49:54 so I can use taliforth to create web apps? 2025-05-20 16:50:24 vms14: not really. it runs on old 6502 processors. I just made a javascript 6502 emulator to run it in a browser 2025-05-20 16:51:29 it's so cool that you have embedded an emulator and a forth in it on the browser 2025-05-20 16:51:35 and made a game with it 2025-05-20 16:54:16 thanks. I had a lot of fun 2025-05-20 16:54:22 you just have to jump in and do it :) 2025-05-20 16:59:09 I miss some z-machine interpreter written in forth 2025-05-20 16:59:32 there's one in postscript but just for z3 version 2025-05-20 16:59:35 the Z-machine is an interesting design 2025-05-20 16:59:42 and there's one for gforth but without save/restore 2025-05-20 17:02:00 I think the overhead of emulating a vm on 16 bit CPU's (and semi 32 like the m68k) would be a bit taxing on Forth itself 2025-05-20 17:02:32 maybe I'm wrong and, for instance, LINA under DOS emulating a ZMachine under a 386 could be really fast too 2025-05-20 17:02:55 lina -> ciForth 2025-05-20 17:04:15 isnt Z-machine text only? speed might not matter too much 2025-05-20 17:05:07 yep, but some (very few) games have times 2025-05-20 17:05:12 and ofc there's tetris for the zmachine 2025-05-20 17:05:17 s,times,timers 2025-05-20 17:05:31 Z-machine version 6 has some graphics 2025-05-20 17:05:39 yep, but almost none plays these 2025-05-20 17:06:21 infocom games (almost all of them are z3), modern ones are z5, like spellbreaker and such 2025-05-20 17:06:35 and modern ones are z8, community freeware 2025-05-20 17:06:40 oh, I didn't realize 2025-05-20 17:06:42 anchorhead it's nice 2025-05-20 17:06:50 and spider and web (tangle.z8) 2025-05-20 17:07:10 does z8 support the Z-machine version 6 graphics stuff? 2025-05-20 17:07:16 I think not 2025-05-20 17:07:39 on the zmachine, once you implement 3-5-8 under forth you could play these games anywhere 2025-05-20 17:08:01 and the zmachine has been ported to anything, but forth it's in more places 2025-05-20 17:11:12 MrMobius "One of the really interesting things was figuring out why Forth is so much slower despite Forth fans claiming it's much better than C." 2025-05-20 17:11:22 why it is so much slower than c? 2025-05-20 17:13:21 and how is C in rand8(5) (which I do not know what it is) faster than even assembly? 2025-05-20 17:13:44 https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8wvkQGUgeXuk7w2wzU4yNJcFYhYPR7KPzxKRG1Dy6Cv2FJjXUvDu8VyeAMVxnyg-gEq3_VZx8WYUnfm6lEY2oOef7fRqOytKkI4jsBw-x_WZtP7U2UmnDGoetgnSqE_GJ0cX6bG2MSaBv/s753/RobotGame_results2.png 2025-05-20 17:14:00 vms14: for one aspect, C compilers generally do a lot more optimization than do Forth compilers 2025-05-20 17:14:04 vms14: lots of reasons really for it being slower although I always have to point out that im not saying this to say Forth is bad or you shouldnt use it 2025-05-20 17:14:18 yeah I know, I'm just curious 2025-05-20 17:14:30 vms14: for the rand8 function which generates a random 8 bit number iirc, the C compiler was better because it generated better assembly than I did 2025-05-20 17:14:35 I do not have interest in forth because of performance anyways 2025-05-20 17:14:41 right 2025-05-20 17:14:54 some languages are even slower than forth and still very useful 2025-05-20 17:15:20 vms14: Forth is sort of like shell scripting for assembly-language subroutines 2025-05-20 17:15:49 vms14: there's the overhead of dispatching threaded code which is big speed hit even if you like on the 6502 you have no cache 2025-05-20 17:16:24 on 8 bit systems like that you lose speed by having a 16 bit stack since you cant drop to faster 8 bit operations without a whole second set of primitives 2025-05-20 17:17:30 it also depends a lot on the architecture. on the 6502 for example you can really improve performance by using the X and Y registers wisely but there's no concept of that in Forth. FWIW, C compilers also tend to struggle with those two registers too 2025-05-20 17:17:46 the 6502 is not really designed for C 2025-05-20 17:19:04 on other architectures where you have more registers, everything on the stack is bottlenecked through the top of the stack. you cant have a bunch of different registers doing different things like in assembly 2025-05-20 17:19:43 well, the Forth virtual machine itself has several registers 2025-05-20 17:19:49 which is also why you may end up with lots of DUP SWAP ROT etc stack juggling when the equivalent assembly might eliminate all of that by just using a different register 2025-05-20 17:20:13 top of stack, stack pointer, program counter, return-stack pointer, user pointer 2025-05-20 17:20:28 yeah swap rot and all the stack management words will be hard to optimize 2025-05-20 17:20:44 you should keep track of all the elements and then decide 2025-05-20 17:20:57 there are Forth compilers that take a C-compiler-like approach to that 2025-05-20 17:21:11 that's true but even still you have registers left unused in a lot of forths. zeptoforth iirc has several just doing nothing unless you want to write a word in assembly to use them 2025-05-20 17:21:22 yeah 2025-05-20 17:22:03 anyway, ive made people angry lots of times by saying these things so emphasizing again that I dont mean Forth shouldnt be used 2025-05-20 17:22:29 people get their egos tied up in crazy things 2025-05-20 17:27:10 I guess it's that they were told otherwise and you make them cry 2025-05-20 17:27:30 because most forth books start telling how fast forth is 2025-05-20 17:28:25 I guess optimizing assembly code must be a fun challenge 2025-05-20 17:28:47 it is 2025-05-20 17:29:12 I suspect most Forth books are targeted at BASIC programmers 2025-05-20 17:29:44 I saw a bit of basic recently and it's a bit weird 2025-05-20 17:29:51 it's not a forth problem imo. humans in general often cant separate facts from arguments 2025-05-20 17:30:55 data 1,2,3... read a,b but the if is cool since you jump wherever you want 2025-05-20 17:30:55 if a<5 70 2025-05-20 17:31:05 if a<5 then 70 2025-05-20 17:31:20 or if a<5 goto 70 2025-05-20 17:31:27 you need a keyword there 2025-05-20 17:32:22 I did not look more than that actually 2025-05-20 17:32:30 I disliked what I saw 2025-05-20 17:32:53 yeah, BASIC is not a tasteful design 2025-05-20 17:33:00 what it is is accessible 2025-05-20 17:33:19 I understand why c had success then 2025-05-20 17:33:27 c is much better than that 2025-05-20 17:33:33 much 2025-05-20 17:34:44 BASIC was my first language and I really loved it. the line number nonsense was option by that point 2025-05-20 17:34:52 some folks in BYTE magazine thought C was a nothingburger and pascal was the future 2025-05-20 17:35:26 Pascal did have its merits 2025-05-20 17:39:24 Environment for cleobuli_ inactive, freeing... 2025-05-20 17:39:27 it took me many years to appreciate the different orientation behind its design; why var parameters rather than pointers, for example 2025-05-20 17:40:16 Wirth's objective was for it to be both "safe", like BASIC and JS, and efficient, like C 2025-05-20 17:40:51 so you would never have to waste time deciphering hex dumps of memory and disassembling your program to debug it 2025-05-20 17:41:30 ML actually achieved what he was after, but not until years later 2025-05-20 17:47:38 (not machine learning. ML as in SML or OCaml.) 2025-05-20 18:50:51 didn't the z80 do 16 bit operations with some opcodes? 2025-05-20 20:19:38 One point I'd make about performance is that regardless of lang, you basically need to break out assembly or nearly-assembly in order to write the absolute fastest code 2025-05-20 20:19:47 And if you don't you'll be off by orders of magnitude 2025-05-20 20:19:59 And that's the case from newest to oldest archs 2025-05-20 20:20:17 Mostly because of SIMD today, you can get a lot closer with vector extensions in e.g. GCC 2025-05-20 20:20:27 AVX has shaken that up even more 2025-05-20 20:20:50 Especially if it's a short piece of code operating on a very large piece of data 2025-05-20 20:21:06 But for lots of code that is hard to narrow down the 'hot spots' then a C compiler is probably best 2025-05-20 20:52:54 meh, we need the opposite; simple, low power computing 2025-05-20 20:55:45 do we? 2025-05-20 20:56:10 i don't think it's worth going below 64 bits for end user machines 2025-05-20 20:56:33 because while not all tasks require 4GB+ of ram, some do 2025-05-20 20:56:54 similar for compute and graphics performance 2025-05-20 20:57:15 (yes you can support >4GB on 32 bit but it's fucking miserable) 2025-05-20 20:57:22 (we ditched segmentation for a reason) 2025-05-20 21:00:19 i had a apple 2 with 128k card on 8 bit computeur 2025-05-20 21:00:41 some vendor gives 1 mo cards for apple II 2025-05-20 21:05:15 amby: 32-bit CPU is good enough for that, physical addresses are larger 2025-05-20 21:06:27 what if a single task needs more than 4GB? 2025-05-20 21:06:48 Maybe use paging 2025-05-20 21:07:02 uh 2025-05-20 21:07:10 ok so right] 2025-05-20 21:07:23 you can't address more than 4GB with only a 32 bit pointer 2025-05-20 21:07:58 Much less than 4GB in practice 2025-05-20 21:08:15 a program wants to see a big linear address space and not have to worry about manually moving segments around 2025-05-20 21:08:30 so if that program wants to use more than 4GB of ram, it kinda needs a pointer width bigger than 32 2025-05-20 21:08:33 which means 64 2025-05-20 21:09:18 There are situations like this for sure 2025-05-20 21:09:39 there's PAE, but, TBH, Forth users are experts on tuning down requeriments and factorising stuff 2025-05-20 21:10:51 any remotely modern os is already doing paging 2025-05-20 21:10:51 There are problems that inherently need more than 32-bit addresses 2025-05-20 21:11:15 btw yesterday people wanted a Forth 79 forth 2025-05-20 21:11:16 https://t3x.org/t3xforth/ 2025-05-20 21:11:19 Sometimes Forth is about simplifying requirements, but sometimes it's about doing more for less 2025-05-20 21:11:45 if you're a crazy forth user then by all means try to get by with as few transistors as possible 2025-05-20 21:11:55 but if you want software to just work, stick to 64 bit 2025-05-20 21:12:02 I knew about t3x, but not t3xforth 2025-05-20 21:12:40 amby: 32-bit is a good sweet spot for most programs, combined with a 64-bit OS and you can run 64-bit when you need it 2025-05-20 21:12:52 32 bit for software, yeah 2025-05-20 21:12:59 A lot of C programs just run outright slower if you build them for 64-bit 2025-05-20 21:13:03 but you can't get 64 bit sometimes on 32 bit hardware 2025-05-20 21:13:05 Use more memory etc 2025-05-20 21:13:52 You can, just not as a static virtual memory map 2025-05-20 21:14:26 you want a nice linear address space 2025-05-20 21:15:04 Depends what you're doing 2025-05-20 21:15:41 A lot of problems involving more than 4GB of data don't require mapping the whole thing in virtual memory at once, e.g. outputting massive files 2025-05-20 21:15:53 but it's a hell of a lot easier if you can 2025-05-20 21:16:15 you can just go "yeah sure this array is 6GB in size" and it just works 2025-05-20 21:16:34 There's Forth code that does exactly that, on a machine with 64K of RAM 2025-05-20 21:16:45 It just hides the details of paging 2025-05-20 21:16:51 additionally having a 64 bit address space means you essentially never run out of virtual address space 2025-05-20 21:17:33 you can have multiple forth-style heaps and never have to worry about them colliding 2025-05-20 21:17:52 Depends what assumptions you make, you'll quickly run out of 48-bit addresses 2025-05-20 21:17:58 veltas: you can't hide paging like that on a modern machine though 2025-05-20 21:18:36 not without making every memory access a syscall 2025-05-20 21:18:44 which is unacceptable for performance 2025-05-20 21:18:57 Caching though 2025-05-20 21:19:07 do you understand how virtual memory works? 2025-05-20 21:19:24 A little bit, I mean I wrote a boot loader that runs in cache memory by abusing TLBs 2025-05-20 21:19:32 Before DDR is initialised 2025-05-20 21:20:05 so how are you gonna transparently handle accesses above 2^32 virtual on a machine that physically cannot make those accesses 2025-05-20 21:20:09 And worked on firmware DDR tests for over 4GB of RAM with a 32-bit x86 2025-05-20 21:20:38 i'm not denying that you can address more than 4GB physical on a 32 bit machine 2025-05-20 21:20:43 32-bit CPUs can have larger than 32-bit physical addresses 2025-05-20 21:20:52 but by definition you can't address more than 4GB virtual 2025-05-20 21:21:04 and if a program wants more than 4GB of virtual memory, it can't 2025-05-20 21:21:12 Not statically, but if you change the map you can 2025-05-20 21:21:39 and so we're back to manually swapping stuff in and out 2025-05-20 21:21:50 which is the entire thing we're trying to avoid 2025-05-20 21:22:04 But it's okay if it's the OS doing it right? 2025-05-20 21:22:08 the os isnt 2025-05-20 21:22:19 It is if you access it as a file 2025-05-20 21:22:22 the os is swapping things between physical memory and disk 2025-05-20 21:22:35 Files don't have to be on disk 2025-05-20 21:23:26 a user program should never have to care about physical addresses 2025-05-20 21:23:48 a user program should see all its data nicely laid out in a virtual address space big enough to hold it all 2025-05-20 21:25:22 What I'd say is that there are always problems bigger than your address space, so don't be too allergic to coping with e.g. very big files 2025-05-20 21:39:12 I like talking about how I can use 4GB+ memory in a 32-bit program. From my 64-bit laptop with 2GB of RAM. 2025-05-20 21:40:40 the t3x guy it's amazing 2025-05-20 21:40:56 it did a forth, t3x (kinda like pascal) and a tiny lisp working under DOS, Unix and CP/M 2025-05-20 21:41:33 and it has a nice block editor too 2025-05-20 21:41:47 it can be bootstrapped from DOS too, and maybe itself 2025-05-20 21:45:05 I'm thinking about how to do a FORTH-79 for x86-64 2025-05-20 21:49:21 Thinking because it assumes 16-bit cells, not sure what the best way to handle that in x86-64 is 2025-05-20 21:49:44 C compiler seems to prefer doing 32-bit ops and truncating only when absolutely necessary, and ABI seems to support that 2025-05-20 21:50:51 Latency tables indicate slightly worse performance for 16-bit sized operands 2025-05-20 22:16:42 Get started and scale your business with FORTH-79. Act with confidence now, lead with vision tomorrow. Unite AI, data, apps, and platform to help you adapt, innovate, and move forward. Subscribe to FORTH-79 today. 2025-05-20 22:44:32 veltas: compiling t3x (v7) looks harder than I tought :p 2025-05-20 22:47:18 everything from this page looks great, not just the Forth environment https://t3x.org/index.html 2025-05-20 22:56:22 still, if I were the author, I'd bundle a compiling script for t3x so it can be compiled from unixen 2025-05-20 22:56:37 not just to install t3x with odd directories 2025-05-20 22:56:55 but bootstrap a simple one aside of t3xforth 2025-05-20 22:57:04 and then it would compile t3xforth itself 2025-05-20 23:26:07 well, I've got to run under unix with its own vm 2025-05-20 23:27:59 double numbers have commas 2025-05-20 23:36:46 lisp books from a guy named nils 2025-05-20 23:36:58 damn now I realized 2025-05-20 23:37:11 and it had a book on a robot called cons 2025-05-20 23:45:06 lisp is just a huge cons job 2025-05-20 23:45:28 I tried lisp, both scheme and cl 2025-05-20 23:45:53 I did SICP until the last of the first chapeter, and CL the book prior to PAIP 2025-05-20 23:45:56 can't remember its name 2025-05-20 23:47:19 ah, gentle introduction to symbolic computation 2025-05-20 23:48:13 I prefer Forth because it's far faster, even if the current common lisps did astounding improvements on speed