00:00:00 --- log: started forth/19.02.08 00:00:54 --- join: dys (~dys@tmo-120-233.customers.d1-online.com) joined #forth 00:14:51 --- join: [1]MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 00:15:24 --- quit: dys (Ping timeout: 244 seconds) 00:17:19 --- quit: MrMobius (Ping timeout: 250 seconds) 00:17:19 --- nick: [1]MrMobius -> MrMobius 00:34:13 --- join: mtsd (~mtsd@94-137-100-130.customers.ownit.se) joined #forth 00:46:13 --- join: xek (~xek@apn-37-248-138-83.dynamic.gprs.plus.pl) joined #forth 00:54:25 I just had an interesting idea. 00:55:08 The dictionary words are stored as a linked list, but with two pointers: One "kernel" pointer and one "user" pointer. 00:56:58 When searching a word from kernel-mode, it uses the complete kernel linked list, which gives you all the words. When searching a word from user mode, the user pointer is used, which only lets you access specific words. 00:57:27 --- join: [1]MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 00:58:14 When running EXECUTE, the dictionary is checked for that token. If it isn't in the dictionary, the caller apparently tries to build some gadget or otherwise fiddle with code that shouldn't be directly executed. 00:58:53 yes 00:58:58 That way, a separation of user words and kernel words, plus a safe implementation of EXECUTE would exist. 01:00:00 --- quit: MrMobius (Ping timeout: 245 seconds) 01:00:01 --- nick: [1]MrMobius -> MrMobius 01:00:01 (Without the need of building some facade for users or doing complex bound checks) 01:00:56 --- join: X-Scale` (~ARM@85.59.43.5.rev.vodafone.pt) joined #forth 01:02:37 --- quit: X-Scale (Ping timeout: 246 seconds) 01:02:37 --- nick: X-Scale` -> X-Scale 02:04:38 --- quit: ashirase (Ping timeout: 252 seconds) 02:07:02 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 03:36:40 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 03:55:36 hi 03:56:40 john_cephalopoda: not just execute, also return 04:05:41 Returning is an issue. One could use a shadow stack or make the return stack unwritable, offering a "secondary stack" for things you'd usually use R for. 04:06:02 "meh" 04:06:10 yea i had thought about this before 04:06:20 i don't remember what my solution was 04:55:33 --- quit: mtsd (Quit: WeeChat 1.6) 05:33:06 --- join: john_metcalf (~digital_w@host86-169-226-30.range86-169.btcentralplus.com) joined #forth 06:18:13 --- join: rdrop-exit (~markwilli@112.201.168.172) joined #forth 06:20:18 I remember Starflight, it's one of the handful of computer games I've played. I remember reading an interview of one of the developpers a few years back. 06:22:38 Good evening Forthwrights :) 06:24:57 --- quit: dave0 (Quit: dave's not here) 06:37:08 Hey rdrop-exit 06:38:09 Hi John 06:52:27 --- quit: john_metcalf (Quit: http://corewar.co.uk) 07:09:13 does anyybody stream or make videos of forth programming? 07:09:18 i could learn by watching it 07:09:51 lol 07:10:12 millennials, man 07:14:50 rain1: you could learn by doing it 07:15:01 hey guys 07:15:53 rdrop-exit, look at the architecture docs for hashforth again 07:16:44 now no mention of word names, flags, or next values is present 07:16:50 one that I've seen lately was dvTI3KmcZ7I I think, not really a tutorial 07:17:10 err https://www.youtube.com/watch?v=dvTI3KmcZ7I 07:17:34 (there is still a mention of a word count, because it needs to know how big of a token table to alllocate out of the specified block of memory size) 07:25:54 Hi travisb, what do you by "token table", why is it needed? 07:28:19 --- quit: travisb (Ping timeout: 240 seconds) 07:46:34 --- quit: rdrop-exit (Quit: Lost terminal) 07:51:40 --- quit: Zarutian (Ping timeout: 245 seconds) 07:52:05 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 07:53:20 --- join: MickyW (~MickyW@p5492671E.dip0.t-ipconnect.de) joined #forth 07:58:27 --- quit: MickyW (Quit: Leaving. Have a nice time.) 08:04:07 Hello all 08:04:19 how goes it 08:04:23 hi 08:04:34 i want to try my forth cpu 08:04:56 --- quit: PoppaVic (Ping timeout: 250 seconds) 08:16:50 --- join: PoppaVic (~PoppaVic@unaffiliated/poppavic) joined #forth 08:25:50 what's stopping you 08:26:09 oh! I know! Mime Wall! 08:27:14 WilhelmVonWeiner: i need to figure out how to wire up gpio in the fpga so that i can observe the cpu running 08:27:46 why not use some kind of simulator 08:27:58 yea in the simulator i can run instructions 08:30:52 colorforth is so annoying. the keyboard thing is so, so annoying. 08:31:10 I love the intent but the keyboard thing is absolutely mental 08:38:10 --- quit: nighty- (Quit: Disappears in a puff of smoke) 09:43:37 I never really liked his "color" fixation - and his kbd madness is known: he really wants a multi-button clicker, I swear. (Might as well use voice). 09:52:33 I don't mind the colors, though I prefer to keep a textual representation of my source. 09:53:31 Well, some folks have color-issues; some also fight with the damned termwin - chroma, etc - you can get blind, (I remember green and amber screens too well). 09:55:51 there are ways around these issues. (I tend to think of the prefixes in my forth as being similar to the colors, and I've seen colorforth code rendered using font attributes like bold and italics instead of colors) 09:59:51 what can I read online to understand the forth way better? 10:00:20 Starting Forth 10:00:29 "way better" or "forth way"? ;-) 10:00:41 The only Forth book Chuck thinks accurately gets the spirit of Forth across 10:01:26 Except, it requires you still have your system-docs around, since it was written against Polyforth. 10:02:02 You certainly should own a copy of Starting Forth; I also like Thinking Forth. 10:02:18 I Nah, Forth Inc republished it online, for SwiftForth 10:03:06 cool. I also have FIG docs around, Forth79, F-pc, F-83 books. All I have for gforth is the info-file. 10:04:27 forth way 10:04:55 is that a "no" to Starting Forth? 10:05:41 i got the pdf 10:05:43 thanks 10:05:43 WilhelmVonWeiner: Hmm? I've had a hardcover since the 80's - and the SF book in hardcover as well. 10:06:03 i meant to rain1 10:14:57 --- quit: Keshl (Read error: Connection reset by peer) 10:15:16 --- join: Keshl (~Purple@24.115.185.149.res-cmts.gld.ptd.net) joined #forth 11:05:51 rain1: wjat 11:05:58 rain1: what are you up to? 11:24:30 --- quit: pierpal (Read error: Connection reset by peer) 11:24:46 --- join: pierpal (~pierpal@host132-240-dynamic.52-79-r.retail.telecomitalia.it) joined #forth 11:55:19 --- quit: gravicappa (Ping timeout: 240 seconds) 12:09:22 --- join: twinshadow (~Adium@c-73-169-238-182.hsd1.wa.comcast.net) joined #forth 12:09:51 --- part: twinshadow left #forth 12:23:44 does anyone know of a quick tutorial for the dev environment setup used in the youtube video by 12:23:47 jephthai 12:23:48 ? 12:24:22 I really like his setup but am not familiar with mecrisp yet - but it's exactly what i wanted to mess with when i tried making my own stm32 forth on an m4 (?) demo board 12:24:59 i was using some open jtag etc etc on OSX and it was years ago and I do not remember. hoping things are easier and pretty established now 12:25:17 also a system on a board for under $4 is amazing! 12:29:01 bluekelp: Maybe some jeelabs mecrisp forth articles https://jeelabs.org/article/ 12:29:02 They seem to be a hub for the mecrisp forth community 12:32:12 bluekelp: I should try this Folie tool for mecrisp https://jeelabs.org/article/1718b/ 12:56:09 thank you! 13:00:54 --- join: pagnol (~me@p54BE8B45.dip0.t-ipconnect.de) joined #forth 13:02:47 is there something like a 'forth by example'? I would like to learn some forth but the textbooks I saw have a lot of prose talking about alls sorts of things and it just bores the hell out of me 13:03:37 for example the one I'm looking at explains at length what it means to 'compile' a program 13:03:43 *right now 13:07:16 there's jonesforth, which i found extremely useful for understanding the fundamentals in the beginning, but just be aware that it has some minor inconsistencies to it which don't necessarily reflect traditional forth 13:07:52 in other words: i think jonesforth is a good resource for explaining how forth works, but a terrible resource for explaining forth conventions 13:08:43 zy]x[yz, thanks, I'll take a look 13:10:43 that's interesting 13:27:23 yes - jonesforth is wonderful. i learned so much by reading through it. 13:28:26 Starting Forth is great for getting to know how to use forth but my attempt at creating a forth after reading it lead me to a very ineligant solution. 13:28:26 aside from reading through it, i would even encourage you to build your own along with it, but experiment with a slightly different implementation so that yours isn't just a copy-and-paste of jonesforth 13:37:01 --- join: dys (~dys@tmo-116-186.customers.d1-online.com) joined #forth 13:54:47 --- join: dave0 (~dave0@193.060.dsl.syd.iprimus.net.au) joined #forth 13:55:05 hi 13:57:38 nobody say anything. maybe he'll go away 14:00:30 dave is like a t-rex 14:08:06 dave0, HI DAVE 14:08:46 dave0, to what use have you been putting your mad forth skillz lately? 14:10:28 --- quit: Croran (Quit: No Ping reply in 180 seconds.) 14:11:04 i don't have mad forth skilllz yet :-( 14:11:20 i'm still a newbie :-p 14:11:40 --- join: Croran (~quassel@2601:601:1801:6dde:a024:a39a:633c:7ee8) joined #forth 14:13:16 dave0, are you starting out 14:13:19 ? 14:13:38 what resources are you using 14:15:25 i've been going a while 14:16:25 pagnol: jonesforth, brad rodriguez, lbforth, the 2012 standard 14:16:38 i just downloaded a bunch of forths and had a look :-) 14:16:51 oh gforth too 14:17:13 I would recommend Lina Forth instead 14:17:19 also make sure to read Starting Forth 14:17:36 * dave0 googles 14:20:24 The ANS standard is a nice ressource, too. 14:20:35 starting forth is so wordy 14:21:13 oh lina for linux 14:21:18 It's the best Forth book 14:21:38 you will learn about thinking in a Forth-oriented way 14:21:47 pagnol: It's like most programming books. They start wordy, telling you tons of stuff about things you already know and at some point they start explaining something new, but you never reach that point. 14:22:07 "you never reach that point" 14:22:28 john_cephalopoda, I used paul grahams book to learn lisp a while back and it's not like that 14:22:32 Forth isn't just another c-style syntax for a c-like language on c-oriented hardware 14:22:58 You have to start from the fundamentals 14:23:35 otherwise you can write mandelbrot with variables but not utilising the stack 14:24:24 pagnol: Maybe I just read through the wrong books. There's some extremely thick books about C++, that start by explaining what a "char" and an "int" are, and how you add stuff. Eventually, after like half the book, they suddenly get into really complex stuff. 14:24:39 I will give starting forth a second chance 14:25:06 if you think it's getting too easy, skip ahead - but do all the exercises 14:25:21 there's an online version on Forth Inc's website 14:25:30 WilhelmVonWeiner: Forth is a language. A language can be used in many ways. Only using variables and not using the stack (at least not much) might be the "wrong way" in the eyes of some, but it is syntactically and semantically correct Forth and a computer can work with that. 14:25:44 ignore the chapter on the block editor though 14:26:00 being "syntactically and semantically correct" doesn't mean "good" 14:26:38 What is "good"? 14:27:00 As long as the code is readable and maintainable, I'd call a program "good". 14:27:47 Just because a program isn't written like somebody in the 70s imagined it should be written doesn't mean it's the wrong or bad way. 14:28:57 pagnol: For embedded forth there are the noforth project tutorials http://home.hccnet.nl/willem.ouwerkerk/egel-for-msp430/egel%20for%20launchpad.html 14:30:20 never seen this before, looks interesting 14:52:47 is there anyone here who writes forth code for a living? 14:54:49 does living to write Forth code count? kekeke 14:56:50 no, sorry 14:58:11 "How to get a job in the extremely profitable, emerging forth industry - a practical guide". That will be a bestseller. 14:58:28 I used Forth for a consulting project once, and at National Instruments I based the "os" of an outboard peripheral box to allow old closed Macintoshes to talk to peripherals on Forth. 14:58:41 So for a couple of brief periods I could claim I was writing Forth for my living. 14:58:48 Those were both a LONG time ago, though. :-) 14:58:58 KipIngram, did anyone else know what you were doing? :-) 14:59:06 Yes. 14:59:22 The client on the consulting gig, and my boss and coworkers at NI. 14:59:41 One of the NI software guys harassed me about it, but couldn't do anything about it. 15:00:30 how did forth make it easier to accomplish what you were hired to do? 15:00:35 assuming that it did 15:01:55 I slipped in some lisp in a project at work, perhaps one day I will succeed at doing the some with forth 15:02:04 Well, at NI I was very young and don't know that it was really the best approach. It was a good fit for the consulting gig, though - the Forth was running on a PC that lived in a pick and place machine. It had originally been designed to run via a DOS application, and the customer wanted to be able to drive it from Windows boxes. 15:02:23 The Forth provided an excellent "scripting" language. 15:03:18 I replaced the console connection with a network socket; the Windows machine just talked to it via that socket, and could push source definitions over to "package functionality" that could then be invoked with just a one-word command. 15:03:45 So it served as an *extensible* scripting language. 15:04:33 I didn't create the Forth - it was pforth. 15:04:53 But pforth has a great license - basically says "do any damn thing you please." 15:05:27 I guess that was 15-16 years ago. 15:06:03 I was 40 or so and the women still turned their heads my way. Doesn't happen as often these days. :-) 15:06:50 At least not the ones I enjoy looking back at. 15:08:25 I'm not sure what happened with the box at NI. I left there and went to graduate school. 15:08:40 The next guy may have immediately trashed it. 15:08:42 you must be so much better-looking than me, I'm 28 and it doesn't often happen to me 15:09:33 you returned to uni at age 40? 15:09:44 No - 40 was the consulting project. 15:09:55 The NI gig was... 1986/87. 15:09:59 ah 15:10:10 I was 24. 15:10:15 ok sorry 15:10:53 No worries. But hey - I'll tell you a secret. The best years for getting attention from women run from 33 or so up to early / mid 40's. 15:10:59 So you still have the best in front of you. 15:11:22 how come 15:11:42 I thought my life was basically over at least in that regard 15:11:58 Uh... women notice men that are established and prosperous, and that usually happens later on. 15:12:09 No way man. 15:12:13 Seriously. 15:12:16 I'm not kidding you. 15:12:31 I really didn't expect such profound wisdom when I typed /join #forth 15:12:36 Women that reach their mid 30's or so without landing a man start to get a bit itchy. 15:12:44 Hah hah. 15:12:51 Well, whether it's "profound" or not... 15:13:34 Anyway, slightly off topic. But don't throw in the towel - you'll see. 15:13:48 I don't know you, but whatever "level you're at," it will be better then than now. 15:14:09 speaking of throwing in the towel, I'm going to marry this year 15:14:17 unlucky 15:14:19 kekeke 15:14:31 just kidding enjoy it mate 15:14:46 Ah, well, excellent. 15:15:14 Gotta run - got dinner with friends. 15:15:20 bye 15:15:20 Take care guys. 15:15:29 thanks for the new outlook 15:15:35 you gave me ;-) 15:15:38 :-) 15:15:47 Sure thing - my pleasure. 15:16:18 I don't know if you know Jordan Peterson - he's gotten prominent lately. Canadian psychologist. 15:16:31 controversial figure 15:16:44 generally spot on 15:16:50 In one of his lectures he mentioned this - he said "there's almost nothing the world values more than a young woman." Then a minute later he said "there's almost nothing the world values less than a young man." 15:16:59 But that just toally turns around the other way later on 15:23:15 Yuck, "find" wants a counted string... 15:33:52 Loeligers book is also excellent for "ah-HAH!" 15:41:16 I can only find a book on git 15:41:36 ah you probably mean Threaded Interpretive Languages by R. G. Loeliger? 15:41:37 try amazon 15:41:40 Yes 15:41:47 Excellent book. 15:42:22 PoppaVic, what did you get out of it? 15:45:01 betweem that and Brad, you get a clue about the damned inner-interpreters, (and I can grok z80 easier than x86) 15:45:36 inner-interpreters? 15:46:54 You've got a pile of reading to do ;-) 15:48:31 I only decided to look into forth yesterday 15:50:07 pagnol: what's your "usual" program language? 15:50:48 mostly python, node... 15:51:08 at least at work 15:51:52 we've begun using purescript, too 15:53:30 and we're using postgrest, so I find myself writing a lot of plpgsql, too 15:53:35 which I have mixed feelings about 15:54:03 dave0, you? 15:55:16 c 15:55:26 i write almost everything in c 15:55:46 Forth is an eye-opener 15:55:53 in what way? 15:56:36 Forth is totally different to c and it makes sense 15:57:43 in what way different 15:57:45 c is rigid and inconsistent 15:58:58 c is really hard to write correct programs 15:59:27 forget about writing a c compiler heh 15:59:36 but in forth it's so simple 16:00:25 i'm still a newbie so i find it hard to juggle the stack :-( 16:00:41 i'm not convinced that ever gets any easier 16:01:45 zy]x[yz: how long have you been doing forth? 16:02:20 2 huge stengths with forth is it's extensible and it's interactive 16:02:26 c just can't do that 16:03:05 how do you extend forth? 16:03:11 i believe python is interactive, so you might not be very impressed with that... but extensible... forget about it! 16:03:49 I've been using common lisp too 16:03:52 pagnol: every time you create a word you extend the language 16:04:26 aren't you 'extending' the language the same when you define a function in c? 16:04:35 *way 16:04:36 dave0, i've been playing with it as a curiosity as a time killer for about two years. i've never actually done anything significant or productive with it 16:04:55 forth allows you to add not only "functions" but also compilers. 16:05:59 I'm not sure I can appreciate the significance of this 16:06:08 brb coffee 16:07:17 pagnol, the sales pitch is that rather than trying to make your problem fit into the constraints of the language, for allows you to design a language to better describe the problem space 16:07:39 that's what they all say, especially lispers 16:07:55 (i'm just repeating what i've heard. i won't say that's been my experience) 16:08:00 ok 16:08:55 i haven't used lisp, but forth really does give you more direct control over what's compiled than anything else i've seen 16:09:44 it's a fun idea, but it comes at a cost. the mantra with forth is bare-minimum simplicity, so it imposes a significant burden on the user 16:13:13 pagnol: i thought of an example... say you write a function to compute the nth fibonacci number... in Forth you can use that word WHILE you're compiling, but in c, you can only use it when you actually run the program 16:15:27 you can execute words at compile time 16:15:39 like macros in other programming languages? 16:16:01 i believe lisp does it.. but not c 16:16:09 yes 16:16:49 how do you tell the compiler that something should be run at compile time rather than at runtime in forth? 16:17:06 a word 16:17:13 I have to get used to the terminology 16:18:00 you don't have to 16:18:31 well 16:18:34 --- quit: xek (Ping timeout: 246 seconds) 16:18:38 you might mean immediate 16:19:08 or switching from compile to interpret back to compile with [ ] 16:19:11 if you just want to execute a word outside of the definition of another word, you don't have to do anything 16:19:50 if you want to define a word which does something when it's parsed during the compilation of another word, then that's an immediate word 16:20:55 pagnol: you might do : test [ 123 456 * ] literal . ; 16:21:16 pagnol: that would compute 123*456 and compile it into the word 16:21:29 same as : test 56088 . ; 16:21:39 . is print number 16:22:14 also as an example, if and then are immediate words that compile branching words 16:32:24 hmm... 16:33:53 hi 16:34:02 hi 16:35:13 this channel is more lively than I expected 16:35:56 because forth is an old language? 16:36:10 not primarily because of its age 16:36:21 It's been vastly improved over the last year or three. 16:36:27 the common lisp channel for example is bursting with people 16:36:37 the language or the channel? 16:36:46 #forth 16:38:20 pagnol: so are you starting with forth programming? 16:39:12 corecode, after having been carrying the intention in my mind for many years, I decided to begin this weekend 16:39:44 cool 16:39:47 what about you 16:39:55 i did that just before christmas 16:40:04 decided to implement my own forth kernel 16:40:13 sounds ambitious 16:40:13 haven't programmed so much forth yet 16:40:24 it's not so difficult, as it turns out 16:42:49 'forth kernel' means a forth compiler or an operating system kernel? 16:43:11 I'm not familiar with forth lingo 16:44:55 the thing that runs the forth 16:45:04 it's a compiler and runtime in one 16:45:06 usually 16:52:19 --- quit: john_cephalopoda (Ping timeout: 240 seconds) 16:54:19 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 17:44:46 and interpreter 17:44:50 and potentially OS too 17:46:22 Traditionally, it IS the OS - everything else is considered a "hosted" system. 18:08:09 --- join: rdrop-exit (~markwilli@112.201.168.172) joined #forth 18:12:06 And if you go down even further, even your CPU(s) is/are Forth chip(s). 18:12:34 Good morning Forthwrights. 18:17:29 what is this witchcraft 18:17:51 joining the channel and immediately adding to a conversation that took place before you joined 18:17:52 :)) 18:18:37 I usually try to catch up using the logs just before I log on. 18:18:58 what are you the nsa 18:19:01 he's a SNEAK! 18:19:14 Quick! It's the NARCS! 18:19:24 I could tell you, but ... 18:19:30 am i being detained 18:20:12 #forth is now my morning coffee routine 18:21:28 It's a refreshing change from clf 18:30:00 --- join: [1]MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 18:32:47 --- quit: MrMobius (Ping timeout: 250 seconds) 18:32:47 --- nick: [1]MrMobius -> MrMobius 18:39:09 uselessnet lost my interest long ago.. And google made it worse - which is hard to imagine, given the trolling-twits that long-roamed it. 19:01:12 --- join: travisb (~travisb@rrcs-162-155-170-75.central.biz.rr.com) joined #forth 19:02:36 --- nick: travisb -> tabemann 19:08:09 --- quit: rdrop-exit (Quit: Lost terminal) 19:08:41 --- join: rdrop-exit (~markwilli@112.201.168.172) joined #forth 19:10:08 hey 19:10:18 Hi tabemann 19:10:29 I got rid of the names, flags, and last bits of wordlist support from the VM 19:11:02 names only exist in that a word table may be optionally passed to the VM to aid in displaying names during tracing 19:11:08 *name table 19:11:46 (but that's not necessary, because without it it will still display token numbers in the tracing) 19:14:57 Passing a name table to the VM sounds strange to me, is that the "token table" you mentioned earlier? 19:15:48 hmm, a token-table would just be a vector from ID# to actual code. 19:15:49 there's still a token table, but now all it contains is a native code pointer, a data pointer, and a TTC code pointer, with no mention of names or flags or like 19:16:13 PoppaVic, exactly 19:17:12 Why is this token table needed? 19:17:21 the name table is just an array of name pointers and name lengths, used so the VM can map from tokens to human readable names - this is not part of the VM, and is managed by the application running on top of the VM 19:17:43 rdrop-exit: I'm fairly sure it's part & parcel of his VM behind the scenes. 19:17:59 rdrop-exit, because the VM runs TTC code 19:18:00 jump-table shitzu 19:18:36 tabemann: a table isn't a necessity, (is I believe the counterpoint). 19:19:07 I think there's a fundamental confusion on the TTC aspect 19:20:07 the tokens are indices into the token table, from which the code pointer is executed 19:21:14 and if the code pointer points to enter, enter begins execution of TTC code pointed to by the TTC code pointer 19:21:31 I sinply think those details are behind the Wizards Curtain 19:22:32 You're doing TTC twice then 19:23:37 how so? tokens are indices into an array, from which actual pointers to native code are gotten, which are then called 19:24:13 it's like ITC except array indices are used rather than word header addresses 19:26:37 The *internal* threading of a VM is TTC. 19:27:12 * PoppaVic chortles 19:27:21 i.e. the tokens of the VM are its opcodes, it's a virtual machine. 19:27:31 the inside of a VM is no one outside the VM's business 19:27:33 https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html 19:28:44 That's unrelated to the threading used by the Forth on top of the VM, SRT most likely. 19:29:29 the forth "on top of" is the application. The VM is still the VM ;-) 19:29:53 in this VM primitives and colon words differ only in that all colon words have the same code pointer, to ENTER 19:30:11 From the perspective of the Forth running on the VM the tokens of the VM are the opcodes of the CPU it's running on. 19:30:36 * it's being the Forth in question 19:31:04 so you want more levels of abstraction? 19:31:21 No, less. 19:32:02 in this VM creating a word simply adds an entry to the token table, which can be invoked like any other token 19:32:02 ] 19:32:35 * PoppaVic chortles 19:32:39 whereas you are proposing creating a CALL token which takes an argument to call 19:33:36 Look at it this way, the primitives of a Forth are in the native code of the machine it's running on. If the Forth is running on top of a virtual machine then the primitives are written in the native code of the virtual machine. 19:35:11 I disagree, lightly: the prims can be written in the tokens; secondaries are still lists No need to expose the native-code. Recompile the damned VM for that. 19:35:51 Well in the case of a VM, the tokens are the native code of the machine. 19:36:00 correct. 19:36:23 you want a Forth layer with its own primitives where the primitives themselves are written in VM opcodes, whereas I want a Forth layer where its primitives are primitives of the VM itself and are written in the implementation language of the VM (C or assembly) 19:36:26 e.g. DUP is a VM machine instruction 19:36:37 rdrop-exit: yes 19:36:43 NOT a primitive from the perspective of the Forth 19:37:12 it means the VM becomes a sort of forth-processor-emulator. All to the good. 19:37:52 Yes, it's a portable virtual machine, 19:38:17 rdrop-exit: [.$][dup][next] 19:38:20 with my VM of course someone could write a Forth on top of it which does not expose the underlying VM, but that would be wasteful performance-wise 19:38:44 performance-wise, I'd write it in C and drop the mike. 19:38:57 ..if I was torqued, I'd find the assembler. 19:40:16 You can write the VM in C, sure. There's a spec, when porting the VM to a new platform the implementor is free to use whatever he wants. 19:40:29 yup 19:40:41 this is like if Sun had written Java such that the javac didn't compile code for the JVM but rather for a separate Java implemntation which then was written in JVM instructions 19:41:16 Happily, I never compare with jaba - unless I want to speak of fat, bloated pigs. 19:42:03 What? The JVM doesn't care what development environment was used to generate the bytecodes, it just runs them. 19:42:24 yes, I know 19:42:27 Many languages generate Java opcodes so they can run on the JVM. 19:42:37 my point is that javac directly outputs JVM bytecode 19:42:52 Don't conflate the development environment and the runtime environment. 19:43:18 my point is the runtime environment is the JVM - not a language layer on top of it 19:43:57 Exactly 19:44:31 And we're doing the equivalent 19:45:19 for hashforth I implemented all the Forth specific stuff in VM assembly that runs on top of it, or in Forth which is interpreted/compiled by the code in VM assembly 19:45:35 The JVM is a bytecoded virtual machine, it's native code is the bytecode (i.e. tokens) 19:46:04 but at the same time the VM primitives are directly callable - there aren't Forth primitives that call VM primitives which are otherwise hidden from the user 19:46:38 when one executes DUP one is directly executing the VM primitive 19:47:09 When one is executing DUP one is executing the DUP opcode of the VM 19:48:08 I would assume DUP is an opcode in any stack machine 19:48:48 It's even an opcode in the JVM IIRC 19:49:03 most VMs are stack machines 19:50:25 right, but unlike a Forth machine they usually don't separate the data and return aspects 19:50:54 yes 19:51:20 or at least they don't expose the return stack for general access 19:52:12 So lets say the Forth you have running on the VM is Subroutine Threaded, and I define: 19:52:58 : test dup dup dup ; 19:55:53 In SRT the compiler lays down the three DUP opcodes 19:56:52 my VM could be actually programmed in a subroutine-threaded fashion, but it would be inefficient because it has no actual CALL opcode, so you'd have to do (LIT) >R BRANCH , and it wouldn't properly relocate the code 19:58:05 it is optimized for TTC usage 19:58:36 colon would lay down a secondary, I presume DUP is a primitive of entry/exit and DUP token; so now you lay down three CALLS to the DUP primitive 19:59:53 I think rdrop-exit is saying that with SRT/NCI DUP would be inlined so there'd be no CALLs to it 20:00:39 sounds like a magic compiler, since inlining words is certainly not std; and inlining the "assembler" isn't either. 20:01:17 Which is not to say you can't write such a beast - it's just Not An Issue. 20:02:20 Yes, only a pure SRT Forth would make a call to a DUP primitive, most would inline it. 20:02:40 Since it is an single instruction of the CPU. 20:03:21 Most SRT Forths are actually SRT/NCI 20:04:07 The inlining opens up the possibility of peephole optimization. 20:05:25 well, it's beyond the scope of my interest/skills, but I can see it working - just not "forth" to me 20:06:51 It's what Chuck does (in his own special ways) 20:07:32 Chuck is waiting for his Wand to arrive from Diag-on Alley. 20:08:15 that I did not parse 20:08:46 Another way to look at it is that the Forth doesn't know it's running on, or compiling code for, a virtual machine. From the perspective of the Forth it's just a target chip, like any other. 20:09:04 yup 20:10:05 If your portable VM becomes super popular, any existing Forth could target it. 20:11:55 For example I could take my Forth and port it to your VM, or I could just write a cross-compiler/assembler that targets your VM, or both. 20:13:10 It's like a JVM that's better suited to running Forth than the actual JVM. 20:13:53 bbiab 20:13:59 --- quit: dddddd (Remote host closed the connection) 20:14:14 the main defining architectural decisions with my VM is that it has a data stack and a return stack and that it is TTC from the user's perspective (even though the VM could internally transpile the TTC code to native machine code) 20:15:34 Like I said, you're doing TTC twice 20:17:21 I have to walk the dogs, catch you all later. Keep on Forthin' 20:17:31 --- quit: rdrop-exit (Quit: Lost terminal) 20:18:12 I don't get how I'm doing TTC twice! rather it's that opcodes and user-defined tokens exist in the same namespace 20:21:34 offs, https://stackoverflow.com/questions/44014281/dissassembly-of-forth-code-words-with-see -- I'll be goddamned if that isn't the exact problem.. wtf sudo. 20:22:52 --- join: pagnol_ (~me@p54BE8803.dip0.t-ipconnect.de) joined #forth 20:26:28 --- quit: pagnol (Ping timeout: 244 seconds) 20:26:29 --- join: gravicappa (~gravicapp@h109-187-219-85.dyn.bashtel.ru) joined #forth 20:43:48 --- quit: tabemann (Ping timeout: 268 seconds) 20:52:42 --- join: whisky (~whisky@64.189.131.108) joined #forth 20:56:06 --- join: travisb (~travisb@2600:1700:7990:24e0:f928:da5c:c249:1b0a) joined #forth 21:06:51 --- nick: travisb -> tabemann 21:59:12 --- quit: whisky (Quit: WeeChat 2.3) 22:05:11 --- join: whisky (~whisky@64.189.131.108) joined #forth 22:43:13 --- quit: dys (Ping timeout: 246 seconds) 23:10:57 rain1, https://www.youtube.com/watch?v=mvrE2ZGe-rs is a great video that demonstrates a correct approach to building apps with forth. That is, every app is a little DSL trying to get out! ;-) 23:15:17 --- join: dys (~dys@tmo-118-83.customers.d1-online.com) joined #forth 23:59:59 --- log: ended forth/19.02.08