IRC Log - 2025-05-20 - ##forth

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