00:00:00 --- log: started forth/21.04.19 00:09:57 --- join: xek joined #forth 00:26:08 --- quit: proteus-guy (Ping timeout: 240 seconds) 00:39:30 --- join: proteus-guy joined #forth 01:49:20 --- join: bb010g_ joined #forth 01:49:31 --- quit: bb010g_ (Client Quit) 01:50:03 --- join: bb010g joined #forth 02:11:48 --- quit: xek (Remote host closed the connection) 02:16:04 --- join: xek joined #forth 02:31:02 Well, I'm now kind of fascinated with the internals of Lisp. I ran across a package out there called PicoLisp. The documentation essentially says that the goal of the package was "the simplest possible virtual machine." And it makes reference to early versions of the product as having been more Forth-like; it explicitly says that. But it says that the Lisp approach turned out to have the simplest VM. 02:31:04 Well, THAT got m attention. 02:31:26 Plus I keep seeing all these commentaries by people implying that learning Lisp was some sort of borderlinen religious experience for them. 02:31:52 I don't know that I'll become a big time Lisp programmer, but that's enough for me to want to have a deeper understanding. Pushes my "me too" button. 02:32:35 PicoLisp seems a bit unstable though. It says right in the docs that it's easy to make it segfault - they seem to have taken a "don't do that" approach to the things that will cause that. 02:32:42 But then I discover that this: 02:32:48 ((+ -) 3 4) 02:32:53 returns -1, but 02:32:58 ((- +) 3 4) 02:33:02 segaults. 02:33:07 Segfaults 02:33:34 That seems a tad... "inconsistent" to me. After seeing the first result, I expected 7 from the latter. 02:33:54 And before runningn either one I expected (7 -1) or (-1 7). 02:51:24 --- join: Zarutian_HTC joined #forth 02:53:38 --- join: gravicappa joined #forth 03:06:33 --- quit: dave0 (Ping timeout: 245 seconds) 03:08:35 --- join: dave0 joined #forth 03:29:53 One comment I have about Picolisp is that it seems to be trying to be everything. 03:30:04 It has OO extensions. It has database extensions. And so on. 03:30:13 I'm really interested in the fundnamental list processing logic. 03:30:22 The Lisp "heart and soul" stuff. 03:30:33 The rest is kitchen sinking as far as I'm concerned. 03:37:45 --- quit: Zarutian_HTC (Remote host closed the connection) 04:01:22 Oh, and it also tries to provide "the semantics of Prolog, with the syntax of Lisp." 04:01:34 Like I said - a "Swiss Army Language." 04:02:04 Which means that the original goal - for it to be "as simple as possible" - was almost certainly not achieved. 04:03:28 It does have a description of the internal representation of things, though. Everythingn is made of 16-byte cells, so that automatically gives you four bits in the LSB nibble that you don't need for addressing. They use those as tag bits to distinguish the different things cells can be. 04:04:08 It's described in an odd way, though - they still talk about them as though they are address bits, and say things like "for symbols the pointer points to the middle of the cell" - I think I'd just forget about them being adjacent to the address and treat them as tag bits. 04:06:46 --- join: Regenaxer joined #forth 04:10:18 Memory management is described well. Very simple - just a mark and sweep garbage collection when necessary. 04:10:37 Probably could be made more efficient by intelligently releasing things instead of just abandoning them. 04:14:12 KipIngram, ((+ -) 3 4) is an interesting idea 04:14:43 When they mentioned "maps" for iteration it led me to expect something of the sort I described. 04:14:55 List of functions - apply them all to the same arguments. 04:15:02 And get a list of outputs. 04:15:04 Nope 04:15:04 Seems natural. 04:15:11 Right - nope. 04:15:22 It's just what I expected; I was wrong. 04:15:27 The CAR of the list is taken as a function 04:15:29 I'm not sure yet what it's actually doing. 04:15:40 But isn't the CAR of the outer list (+ -)? 04:15:40 (+ -) gives the value of '-' 04:15:54 Oh, I see. 04:16:00 But (- +) negates the value of + 04:16:09 so a negative pointer 04:16:10 It evals the list BEFORE applying to the args. 04:16:16 right 04:16:31 * KipIngram is a beginner on Lisp. 04:17:25 Ok, that explains the segfault quite well. 04:17:51 You perhaps mean 04:17:52 : (mapcar '((F) (F 3 4)) '(+ -)) 04:17:52 -> (7 -1) 04:19:14 The "description of the internal representation of things" is in a file doc/structures 04:19:23 Ok, that's the effect I was going for, but I really can't say that what you just typed seems "intuitive" in any way. 04:19:59 F is just a dummy there, right? 04:20:12 --- join: andrei-n joined #forth 04:20:16 Successively replaced by + and -? 04:20:34 F is the function parameter 04:20:43 The quotes prevent evaluation of those lists. 04:20:45 ((F) ...) is a function 04:20:50 right 04:21:19 Without that last quote it would evaluate that (+ -) to - just like in my original case? 04:21:39 yes 04:22:16 I'm not particularly all hot here to learn Lisp, though I am a little. I just saw "simple VM" and wanted to understand more. :-) 04:22:20 I like simple VMs. 04:22:23 the value of the symbol '-' is a function pointer 04:22:24 : - 04:22:25 -> 25843260304 04:22:37 so (+ -) gives the same 04:23:08 Ok. So if I took that number and parsed the bottom four bits I'd find it qualifed in whatever way it describes those pointers as working. 04:23:22 The simple VM referst to the internal strucwure. The single cell for everything 04:23:46 bottom four bits: correct :) 04:23:49 Well, the VM to me would be the bit of code that rips around those structures. 04:24:07 yes 04:24:22 you know "next" in Forth 04:24:27 Yes. 04:24:31 in pil it is a little more involved 04:24:37 number -> number 04:24:43 symbol -> value 04:24:43 It felt like they were claiming it was simpler. 04:24:49 lisw -> call fun 04:24:53 Simpler than their earlier language which was "forth like" 04:25:19 It was a Lisp with RPN 04:25:36 (fun a b) was a b fun 04:25:45 but with those cells 04:25:47 Forth achieves its simplicity by using CFA's that point to different functionalities. 04:26:03 I suppose truthfully you'd need to consider all of the CFA target code "part of the machine" too. 04:26:08 And not JUST next. 04:26:46 Certainly at least docol, dovar, etc. 04:26:58 Maybe we cheat a little by not counting all the primitives. 04:27:58 Forth is of course a lot simpler 04:28:15 But among Lisps PicoLisp is probably the simplest 04:28:30 not in terms of code, but in terms of *concepts* 04:29:22 I was a bit put off by that first thing I tried not working, but I see now what I was overlooking. 04:30:00 The (+ -) just *happened* to evaluate to something that would work there. 04:30:16 :) 04:30:35 You could look a little at https://software-lab.de/doc/tut.html 04:30:56 Yeah, I've got that open. Just haven't started wading through it yet. 04:31:03 ok 04:31:05 My damn 'n' key is driving me crazy. 04:31:19 It's repeating - I'm getting a lot of double-n's that keep making me back up. 04:31:21 the 'n' key? 04:31:25 ah :) 04:31:27 On my Mac keyboard. 04:31:51 I was supposed to get a "computer refresh" this year at work, but they've used the pandemic as an excuse to suspend that temporarily. 04:32:16 Maybe I just need a can of compressed air to blow it out good 04:32:36 Good luck! 04:33:19 Yeah - hey, thanks for the overview; very helpful. 04:33:28 welcome! 04:33:51 I was a really big Forth fan 04:34:04 KipIngram: does your boss happen to have a working keyboard that looks exactly like yours? 04:34:05 but neglected it over the years 04:36:45 ha! Just remembered, I started to write a mock forth in PicoLisp a few years ago: https://software-lab.de/forth.l 04:36:56 Just for fun 04:40:32 --- quit: andrei-n (Ping timeout: 260 seconds) 04:46:13 lispmacs: Hahahahahah 04:46:20 It's the computer's built-inn. 04:46:40 innnnnnnn ;) 04:46:47 Regenaxer: I'm a huge Forth fan, and have messed with it off and on ever since college. 04:46:56 Ugh. 04:46:57 See?? 04:46:58 cool 04:47:08 I can't catch all of them. 04:47:50 I've tried to take good care of it - I have an overlay that I keep on the keyboard to keep gunk out of it. 04:47:58 Perhaps set some param for key repeat? 04:48:09 And to at least give me a fighting chance if I ever spill on it. 04:48:16 Yes, I can investigate that. 04:48:22 --- quit: bb010g (Quit: Connection closed for inactivity) 04:48:45 But I think the problem is switch bounce. 04:49:35 Ok, I slowed down the repeat setting. Maybe it will help. 04:49:48 yeah 04:50:06 If it's just that the key is a little sticky and isn't letting go as fast as it should, then that might solve it. 04:50:19 That seems as likely as bounce. Maybe more likely. 04:51:03 Regenaxer: I'm currently working on a Forth written in nasm assembly. 04:51:26 Not in itself? 04:51:32 It's "beginning to become operational." Just implemented number conversion. 04:51:40 That is the goal - to be able to meta compile itself. 04:51:46 ok 04:51:50 That's where my roadmap goes. 04:52:12 I used Laxen/Perry back then, ported it to 6809 CPU 04:52:23 I LOVED the 6809 04:52:27 Great little processor. 04:52:33 Very clean, very orthogonal. 04:52:36 yes, very nice 04:52:52 It's what I had the good fortune to learn assembly on. 04:53:12 And wrote my first Forth for. 04:53:16 That one was horrid, though. 04:53:22 I didn't know anything about Forth internals. 04:53:27 I just made it "work right." 04:53:40 Later when I learned how most Forth systems go together, I was rather ashamed of it. 04:53:56 :) 04:54:25 I did that on a little TRS-80 Color Computer, using the EDTASM module. 04:54:48 Upgraded the thing to 64k myself, and used the upper 32k as a ram disk. 04:57:13 Oh, oops. I changed the wrong setting. I didn't mean to change repeat speed - I needed to change "Delay Until Repeat." 04:57:26 But right now I turned repeat off completely. 04:57:52 I can't remember the last time I *wanted* key repeat. 05:02:25 --- join: andrei-n joined #forth 05:09:59 --- join: f-a joined #forth 05:14:21 --- quit: MrMobius (Read error: Connection reset by peer) 05:15:18 --- join: MrMobius joined #forth 05:19:04 --- join: f-a_ joined #forth 05:21:33 --- quit: f-a (Ping timeout: 240 seconds) 05:22:45 --- quit: f-a_ (Client Quit) 05:23:00 --- join: f-a joined #forth 05:34:09 Bummer. 05:34:20 Even turning key repeat off altogether doesn't eliminate my problem. 05:46:26 --- part: Regenaxer left #forth 05:46:29 --- join: Regenaxer joined #forth 06:17:51 --- quit: andrei-n (Quit: Leaving) 06:22:52 https://lispcast.com/bootstrapping-mindset/ 06:22:59 --- part: f-a left #forth 06:24:54 Good podcast. I listened to almost all episodes 06:26:09 picolist sounds interesting, and interesting example of KipIngram's mistake, I was wondering if that was really valid! 06:26:19 picolisp* 06:27:12 yeah, both ((+ -) ...) and ((- +) ...) are valid, just that the second one crashes ;) 06:30:41 Well, thinking of it as the negative of a pointer maks that very intuitive (that it will crash). 06:31:34 That link I shared is mostly about web stuff, but at the beginning it has some nice thoughts that touch on what we do in Forth. 06:55:01 --- join: tech_exorcist joined #forth 07:04:51 --- quit: wineroots (Remote host closed the connection) 07:08:16 --- quit: jess (Ping timeout: 622 seconds) 07:18:58 veltas: One nice thing about PicoLisp is that it's available in the Ubuntu 16.04 package repositories. 07:27:20 yes, but very old 07:27:45 True. 07:28:47 So, a thought occurs to me. All of my "internal addresses" in my Forth are represented in 32-bit cells, but my data cells (on the stack, in variables, etc.) are 64-bit. I could fairly easily add some degree of list handling similar to that in Lisp by putting the CAR and CDR pointers in halves of a 64-bit cell. 07:28:56 Then that could live very happily on the Forth stack as a single item. 07:29:14 Any word that wanted to could decide to treat it in that way. 07:29:27 It could even offset into an altogether separate section of RAM if I wanted it to. 07:30:07 In theory it ought to be possible to have Lisp-like stuff annd Forth-like stuff just exist side-by-side in there. 07:31:15 The issue of tag bits exists, though - I guess you'd need tag bits in both pieces, so that might bring me down to 28 bits per for the actual address. 07:32:56 And since my pairs would be 8 bytes total instead of 16, only three bits per would naturally offer themeselves. Might not be enough to cover what they did in Picolisp. 07:36:48 --- join: Zarutian_HTC joined #forth 07:44:18 32-bit PicoLisps used also only 3 tag bits 07:44:34 Ah, ok. 07:44:41 They are no longer really maintained though 07:44:56 Well, if I did something like this I'd do it myself. 07:45:00 You could take a look at MiniPicoLisp 07:45:19 But the structure docs would be intneresting to peruse. 07:45:47 Having the cell look like a single item to Forth seems like a nice feature. 07:46:24 in https://software-lab.de/miniPicoLisp.tgz there is also a doc/structures file 07:47:27 mini builds on 32 and 64 bit systems 07:47:42 (the other picolisps are arch-dependent) 07:47:56 Newer and current ones are all 64 bit 07:48:24 except ErsatzLisp which is in Java (limited a bit, like mini) 07:48:34 Aw man. Quote from a paper I'm reading: " It seems to me that there have been two really clean 07:48:36 consistent models of programming so far the C model and the Lisp model" 07:48:43 What about the Forth model? That's high ground. 07:48:49 No one appreciates Forth. :-( 07:48:55 I do :) 07:49:05 Present company excepted. 07:49:16 true 07:49:35 It's like this amazing little jewel just lying there on the ground, and people just walk right by it. 07:55:42 --- join: WilhelmVonWeiner joined #forth 07:59:59 It also occurs to me that in my system, which has a pointer to the parameter field instead of the parameter field itself follow the CFA pointer, I more or less already have this dual pointer structure going on. 08:00:06 Pointer to code, followed by pointer to data. 08:00:15 CFA/PFA instead of CAR/CDR. 08:02:33 This is the paper that quote came from: 08:02:35 http://languagelog.ldc.upenn.edu/myl/llog/jmc.pdf 08:04:06 He points out that McCarthy boiled it down to seven items: quote, atom, eq, car, cdr, cons, and cond. So does that really mean if I implemented those seven things I could build up an aribtrary Lisp system from there? 08:04:54 I guess it would be missing syntax sugar, like '? Everything would have to be fully written out? 08:06:47 You also need 'set' if you don't want to be purely functional 08:07:35 I never cared about *such* minimal systems, I care about practical usability 08:15:33 --- quit: Zarutian_HTC (Ping timeout: 240 seconds) 08:25:35 time for bed! nite all 08:26:01 Good night! 08:26:10 --- quit: dave0 (Quit: dave's not here) 08:32:45 --- join: Zarutian_HTC joined #forth 09:30:51 --- quit: Zarutian_HTC (Ping timeout: 246 seconds) 09:43:53 --- join: wineroots joined #forth 09:54:03 --- quit: kiedtl (Changing host) 09:54:03 --- join: kiedtl joined #forth 09:56:13 KipIngram: those words by themselves do not I think give you any way to interact with abitrary memory or to make i/o system calls 10:04:27 --- quit: gravicappa (Ping timeout: 252 seconds) 10:19:46 --- join: DKordic joined #forth 10:43:16 That's a good point. 11:09:45 --- join: spoofer_ joined #forth 11:12:50 --- quit: spoofer (Ping timeout: 265 seconds) 11:22:07 --- join: gravicappa joined #forth 11:31:40 What are some good resources/papers regarding optimizations that could be performed on FORTH/stack-based code? 11:59:33 --- join: Zarutian_HTC joined #forth 12:00:42 all of Chuck Moore's stuff 12:00:55 there is a superoptimiser for F14a code as well out there 12:10:50 One issue I have with Picolisp is that it's fairly non-standard. 12:11:21 No lambda, for one thing. I feel like for my very first forray into it, I probably should work with a standard version. 12:11:52 I mean, it's fine for poking around. But if I'm really going to roll up my sleeves, I want to know I'm somewhere close to the main tent. 12:12:16 If you want lambda, do (setq lambda quote) 12:13:41 eg.: 12:13:42 : (setq lambda quote) 12:13:42 -> 23985324346 12:13:46 : (mapcar (lambda (X Y) (* 2 (+ X Y))) (1 2 3) (4 5 6)) 12:13:48 -> (10 14 18) 12:14:54 You should discuss such things in #picolisp, it is off-topic here 12:53:27 --- quit: gravicappa (Ping timeout: 268 seconds) 13:04:55 --- quit: sts-q (Remote host closed the connection) 13:09:01 --- join: sts-q joined #forth 13:22:39 Yeah; we had a bit of a lisp kick a couple of days ago, but best to let it go I guess. 13:26:24 ((lambda (x) (cons x '(b))) 'a) 13:26:28 Ooops. 13:26:34 Sorry about that guys. 13:27:40 I heard a talk by cm on the ga144 last week 13:27:50 recent? 13:28:04 i kind of wrote the whole thing off years ago when i found out how much memory each core has but the talk got me curious again 13:28:10 WilhelmVonWeiner, i dont think so 13:28:15 KipIngram: I don't mind. #forth seems more like a community than about a particular language. 13:28:37 Well, but that's the kind of thing where if even one person is bothered it's best to do it right. 13:28:39 I don't mindn either. 13:29:06 seems you can somehow supply instructions from the memory of one core to another 13:29:17 I agree re: the community thing. 13:29:31 Oh, Chuck's Greene Arrays chip could do that. 13:29:55 The cores could execute an instruction stream from a message queue, I think. 13:30:06 is there a speed penalty? 13:30:17 I don't know. 13:30:28 He was real proud of how fast the thing was. 13:30:33 And how low power. 13:30:38 i dont think ive ever met anyone who has written anything for that chip 13:30:40 But I don't know numbers. 13:30:52 Right, and you still haven't. 13:31:02 I thought it looked fascinating, but never sprung for the kit. 13:31:03 MrMobius: I did at university, on the uhh simulator 13:31:08 that comes in ArrayForth? 13:31:10 he mentions that in the talk. 600mips fwiw 13:31:18 I got the impression he was hoping to hit military applications. 13:31:41 KipIngram: hoping to hit anything they could, bespoke military and some huge LED panels iirc 13:31:54 WilhelmVonWeiner, hmm, the simulator works without the board? also, isnt the imput dvorak or something absurd? 13:32:25 i honestly think there is very little application for something like that. it seem extrememly unflexible 13:39:01 --- quit: ovf (Ping timeout: 260 seconds) 13:40:59 i think arrayforth 3 is qwerty.. 13:41:12 colorforth is dvorak definitely. 13:41:27 --- join: ovf joined #forth 13:51:16 does somebody know of a word I can copy to do make inputting a large amount of memory data more concise? I.e., instead of typing $5274 , $4000 , $538d , $4000 I could type C { $5274 $4000 $538d $4000 } or something 13:51:47 or W { ... } I meant, for word 13:52:18 lispmacs[work], you can certainly make a word like that 13:53:36 MrMobius: in principle, but was wondering if somebody had a snippet of code already I could copy 14:13:24 using what, gforth? lispmacs[work] 14:15:42 i mean you can just compare DEPTH before and after 14:22:47 WilhelmVonWeiner: flashforth 14:23:12 well, not too important - i just inserted the version using `,' 14:28:09 the depth thing would be totally easy though 14:30:41 WilhelmVonWeiner: i do not know what you mean, but would be glad to look at an example 14:35:23 lispmacs[work]: I don't think there is such a word that's extant, but surely we could come up with something. You just need something like the compiler handling of literals, without actually inserting the (lit) handler. 14:36:19 Because that's more or less what happens to a stream of numbers when you're in compile mode, except they alternate with (lit). 14:37:15 I take it you want this is a selected range of memory, not "into the dictionary"? 14:39:12 lispmacs[work]: something like ` : { sp@ s0 @ - 2/ ( store this depth value somewhere) ; ` 14:39:34 --- quit: wineroots (Remote host closed the connection) 14:39:50 and then `: } sp@ s0 @ - 2/ ( fetch depth and diff, then loop , that many times) ; ` 14:40:37 WilhelmVonWeiner, but then you have to worry about stack depth 14:40:55 what I am doing now is `create arrayname $5274 , $4000 , $538d , ...' 14:41:21 if solution creates a large stack then it is not worth the bother 14:41:28 you could use parse-name to grab the next space delimited thing. make sure the first one is "{" then use number or whatever the gforth equivalent is to convert that. keep looping until you hit "}" with parse-name 14:42:26 MrMobius: that makes sense. it seems simple enough in principle I figured somebody else would have done it already. 14:43:07 well, maybe I implement it later. I don't really care about the source code density that much so probably isn't worth the bother 14:43:09 i dont think parse-name is part of flashforth 14:43:16 compiled density is another matter 14:44:28 idk why you care about stack depth really when you clean it up immediately 14:45:06 : W parse-name "{" compare if begin parse-name 2dup "}" compare not while number , repeat else abort then 14:45:09 ; 14:45:14 untested but something like that 14:50:07 MrMobius' solution was along the lines of what I was looking for. Maybe give that a trying during my next lunch break 14:51:50 it might just be parse in flashforth 14:53:06 oh that is how parse works 14:53:09 i was thinking of uhh 14:53:26 like a gforth one that parses a word and looks for it in the dictionary then returns that xt 14:53:33 ' 14:53:35 ? 14:53:48 not that 14:54:21 Oh, ok, so you do want it to go into the dictionary. 14:55:25 You could write a word that runs find until it succeeds. Each time it fails, run NUMBER , 14:55:40 Use any word in the dictionary as a termination. 14:56:21 You'd have to flesh out the details; I don't know exactly how FIND and NUMBER work on your system. 14:57:07 You could define } so that it will be found, and then use { for the working word. Then you'd get that C-like behavior { n1 n2 n3 } 14:57:35 And when you're done you've cleaned the } out of the way, and interpretation will pick up right after it. 14:57:37 KipIngram, why not just do it the way I posted? searching the entire dictionary until you fail for every value wastes a huge number of cycles 14:57:56 I haven't read everything I missed yet. 14:59:05 --- quit: tech_exorcist (Quit: tech_exorcist) 14:59:12 I just read far enough to find the answer to my question about the dictionary. :-) 14:59:22 hehe 15:05:26 --- join: actuallybatman joined #forth 15:42:27 gforth version - https://pastebin.com/GRfET6YS 16:01:42 --- join: X-Scale` joined #forth 16:03:59 --- quit: X-Scale (Ping timeout: 252 seconds) 16:03:59 --- nick: X-Scale` -> X-Scale 16:10:42 --- join: X-Scale` joined #forth 16:12:01 --- quit: X-Scale (Ping timeout: 265 seconds) 16:12:01 --- nick: X-Scale` -> X-Scale 16:45:45 https://mvanier.livejournal.com/2897.html 16:52:03 --- join: jedb__ joined #forth 16:53:15 --- nick: jedb__ -> jedb 16:55:42 --- quit: jedb_ (Ping timeout: 246 seconds) 17:30:25 Arghhhhhh. 17:30:34 Burned my hamburger buns. :-( 17:30:42 Looks like I'm headed for the corner store. 18:25:58 --- join: boru` joined #forth 18:26:01 --- quit: boru (Disconnected by services) 18:26:03 --- nick: boru` -> boru 18:43:13 --- quit: jedb (Quit: Leaving) 18:43:43 --- join: jedb joined #forth 19:35:38 i like burned toast :) 19:35:56 --- join: dave0 joined #forth 19:49:29 --- quit: sts-q (Ping timeout: 252 seconds) 19:53:06 --- join: wineroots joined #forth 19:55:58 --- join: sts-q joined #forth 20:04:47 --- quit: dave0 (Quit: dave's not here) 21:43:46 --- quit: nitrix (Quit: Genius is one percent inspiration and ninety-nine percent perspiration) 21:45:54 --- join: nitrix joined #forth 21:49:08 --- join: xek_ joined #forth 21:51:48 --- quit: xek (Ping timeout: 265 seconds) 22:27:53 --- join: dave0 joined #forth 22:40:53 --- join: gravicappa joined #forth 23:09:52 --- quit: mtsd (Quit: Leaving) 23:53:39 --- quit: actuallybatman (Quit: leaving) 23:59:59 --- log: ended forth/21.04.19