00:00:00 --- log: started forth/21.06.04 00:12:31 --- join: Bogen85_0 joined #forth 00:12:31 --- quit: Bogen85 (Read error: Connection reset by peer) 00:43:44 --- join: Glider_IRC_ joined #forth 00:46:43 --- quit: Glider_IRC__ (Ping timeout: 248 seconds) 01:05:55 --- quit: Bogen85_0 (Quit: Leaving) 01:59:06 --- quit: proteus-person (Remote host closed the connection) 02:00:23 --- join: proteus-guy joined #forth 03:36:42 Good morning 03:37:22 moin 04:30:16 In 1.5 hrs we have our next event.Imagine Jack Black if he were Thai playing Zeppelin & Sabbath... gonna be great! https://www.youtube.com/watch?v=1SbjA-yOx64 04:39:50 I'll try to tune in to it if we're not too busy at work :) 06:05:55 --- quit: Zarutian_HTC (Read error: Connection reset by peer) 06:06:07 --- join: Zarutian_HTC joined #forth 06:53:52 --- join: Bogen85 joined #forth 06:53:52 --- mode: ChanServ set +v Bogen85 08:34:11 --- quit: lonjil (Changing host) 08:34:12 --- join: lonjil joined #forth 08:41:32 --- quit: Zarutian_HTC (Ping timeout: 258 seconds) 09:11:32 --- join: Zarutian_HTC joined #forth 09:34:00 --- join: newuser|28 joined #forth 09:35:00 Hello I'm using gforth 64bit system, when trying to store a byte it overwrites next 7bytes also 09:35:21 Is there any way to write only 1 byte from stack to memory? 09:36:57 checking, should be some sort of c! for that, don't know gforth so I'm looking 09:38:25 that should be C! 09:39:18 yeah, I just verified on gforth, c! works for that 09:40:24 thank you 09:52:35 --- quit: newuser|28 (Quit: Connection closed) 09:56:52 --- join: epstein joined #forth 10:24:34 --- quit: Zarutian_HTC (Remote host closed the connection) 10:44:13 --- join: morbidb1rd joined #forth 10:48:19 --- quit: epstein (Ping timeout: 248 seconds) 10:58:42 --- join: sts-q joined #forth 10:58:51 --- quit: sts-q (Client Quit) 11:38:59 --- join: epstein joined #forth 11:41:22 --- quit: morbidb1rd (Ping timeout: 252 seconds) 11:42:01 --- join: morbidb1rd joined #forth 11:43:37 --- quit: epstein (Ping timeout: 258 seconds) 11:47:41 Happy Friday, folks. 11:48:05 Yes, as far as I know c! is fairly universal. 11:48:33 I'm including c!, w!, h! and ! (and obviously the correpsonding @ words) in mine. 11:49:53 In C printf has a lot of flexibility for printing different size things, but I won't need that in mind - things get printed from the stack, and once you get them onto the stack they're always 64-bits. It's the fetching and storing between stack and RAM that need that option. 11:51:02 --- join: crab joined #forth 11:54:39 --- join: epstein joined #forth 11:55:28 KipIngram, so then do you have a way to sign extend a byte loaded with c@ before printing? 11:58:34 --- quit: morbidb1rd (Ping timeout: 258 seconds) 12:01:08 Actually my c@ sign extends it. 12:01:55 Well I'm actually not sure. 12:02:09 seems like you would want it to be unsigned by default 12:02:09 Hang on. 12:02:28 Yeah - I'm not 100% sure what it's doing; I don't have a full ability to print numbers out yet. 12:02:38 I can infer from doing some ops and careful emits. 12:03:01 code "c@", cload 12:03:02 movsx rrTOS, byte [rrTOS] 12:03:06 next 12:03:06 do you have a way to pause and see the registers 12:03:11 Yeah, it's using movsx. 12:03:21 And you're right - I may want it to do something different. 12:03:44 Oh no - nothing that fancy. 12:03:49 Yet. 12:03:54 No debugger. 12:04:19 I have switched to using simulators and dont think i could ever go back 12:04:28 at least for assembly and sometimes forth 12:04:38 When I need to find a segfault I usually do it by moving an emit or a controlled exit forward until I get to it. 12:04:48 I should try sometime I guess. 12:04:53 I've never made the leap. 12:05:13 After a little while I start being able ot use more and more clever Forth ways of zeroing in on things. 12:05:13 ive never done x86 though so i dunno what options there are 12:06:40 In this case I just something like this: 12:06:45 variable beta 12:06:50 x:FF beta c! 12:06:55 beta c@ beta ! 12:07:04 And then looked at beta+1 byte. 12:07:33 what is x:FF? 12:08:42 0xFF basically? 12:09:21 Yeah. 12:09:35 In general I can say : and use any base I want. 12:09:45 x: and b: are just shortcuts for 16: and 2: 12:10:08 interesting 12:10:19 to frazzle folks add q as 4: as well 12:10:35 It works... well, all the way I guess. Digits are 0-9, A-Z, and then a-z, and I suppose on beyond z if I pushed past 62: 12:11:09 Upper and lower case letters are case insensitive below base 37, and then become case sensitive (as soon as 'a' is *needed*). 12:11:38 I know it's fairly useless. 12:11:53 But it required very little code to have that flexibility, and I thought it was cute. 12:12:17 ACTION changed his eForth to support 0x, 0b, 0o, and 0q instead of just the old $ notation 12:12:17 It scans digits initially in base 10, but if it runs into a : it just pushes the current number into the base slot and resets the accumulator to zero. 12:12:22 That's really all it took. 12:12:46 So literally 3-4 words of Forth to make it fully general. 12:14:46 --- quit: cbridge_ (Remote host closed the connection) 12:15:11 --- join: cbridge_ joined #forth 12:15:15 --- quit: cbridge_ (Remote host closed the connection) 12:15:25 --- join: cbridge_ joined #forth 12:27:58 Uses a stack frame to hold the base, the accumulator, some status bits (for remembering that's it's seen a - sign and being smart enough to reject "stupid" patterns and so on). 12:28:41 It's capable of converting floating point numbers, and in my last Forth it did, completely. I stopped slightly short of that this time, but it would be easy to extend. 12:29:09 It does not do double-precision integers. 12:33:45 --- quit: epstein (Remote host closed the connection) 12:33:58 --- join: epstein joined #forth 12:39:24 Howdy y'all 12:43:45 --- join: Glider_IRC__ joined #forth 12:44:29 I'd asked earlier about why we check whether something is a number in the main loop instead of treating anything we don't recognize as data 12:45:43 And I've had a thought that we could skip that step and do conversions to binary at the word level, since any word is going to know what its arguments should be and we avoid doing a check 12:46:14 i.e. : + NUMBER SWAP NUMBER ADD ; 12:46:41 but maybe that would add too much length to the definitions, idk 12:46:52 --- quit: Glider_IRC_ (Ping timeout: 258 seconds) 12:47:07 any thoughts? 12:47:46 sort of a 'lazy' forth 12:49:49 --- quit: cbridge_ (Remote host closed the connection) 12:50:00 --- join: cbridge_ joined #forth 12:50:21 which is how you get away with mixing hex numbers without prefixes with words that could be hex 12:52:22 anyway, NUMBER still has to do a check 12:53:06 right that's true 12:53:34 but you can look for things that aren't numbers at the same level without any extra syntax 12:54:12 strings etc, as long as you ensure they aren't in the dict 12:55:12 NUMBER would also have to be prepared to see numbers that are already converted though 12:55:29 since + will be leaving a converted number on the stack 13:31:15 The reason you check for a word first is so you can define 0 etc 13:32:08 Old forths had 0, 1, 2 defined as words to save space in colon definitions 13:32:25 And also your Forth is just more powerful if you can redefine literally any word 13:32:28 --- quit: epstein (Ping timeout: 252 seconds) 13:32:48 And it lets you define a word that might have been interpreted as a hexadecimal number like FACE 13:33:52 I am still agreeing with checking for a word first 13:33:52 I'm just delaying checking whether something is a number and converting 13:33:54 because I should be able to leave a string(probably underscore delimited) on the stack too without special words 13:34:05 and not just strings but any thing 13:34:38 we're still checking for words first so we retain that ability 13:36:39 --- quit: cbridge_ (Remote host closed the connection) 13:36:49 --- join: cbridge_ joined #forth 13:39:04 --- quit: gravicappa (Ping timeout: 252 seconds) 13:39:38 I'm suggesting that the main loop can just be: 1. read word 2. if word is in dictionary, execute word, check for stack overflow 3. else leave word on stack 13:40:07 if we expect words to decide whether something is a number or a string or a this or a that 13:40:58 I have several pre-defined number words as well. 13:41:12 0 1 2 4 8 16 -1 I think is my list. 13:41:43 Oh are we discussing what order to do things in? Word search / number conversion? 13:41:57 I like word search first, for the reason you said, veltas. 13:42:26 I am agreeing that word search goes first 13:42:30 The argument in favor of number conversion first is that otherwise you search the whole path before getting around to the conversion, whereas a word will normally fail the number test almost immediately. 13:42:52 But I think the power of letting anything be a word is more important, so I go with search first. 13:42:53 I'm saying we skip number conversion altogether, and expect words to do the conversion for themselves 13:43:12 Oh, hmmm. Well, ok - that's an idea. 13:43:26 That would eliminate the aforementioned inefficiency. 13:45:04 you could even do stuff like directly input "fish" "_taco" concat if we have : concat STRING swap STRING swap (rest) ; 13:45:19 numbers aren't the only conversions possible if you delay conversion 13:45:41 i should use all caps instead of mixing cases like that sorry 13:53:32 crab, where will you store the strings before they are evaluated? 13:54:33 they would just be a bunch of characters on the stack 13:55:32 STRING would be a word that first checks if something is a string(i.e. a valid address), and if it's not, creates a string with those contents then leaves the address on the stack 13:55:49 so they would be limited to 2 characters each on my 16 bit system? 13:56:18 or 4 characters if its 32 bit 13:57:22 idk how you came to that conclusion 13:58:46 use a variant of Infocom ZSCII! three chars per 16 bit cell 13:59:26 crab, how big are your stack items? 14:03:22 ah I see what you're saying 14:03:35 I will have to think some more about this then 14:04:05 if not strings though, other things will still be possible 14:04:13 chars for example 14:06:06 how will you tell the difference between things on the stack that are evaluated numbers and not evaluated? 14:08:43 NUMBER's first order of business should be to check whether something is already a number. Though that may be a bit difficult 14:14:37 you can pick a size like 16 bits or 32 or whatever and it will always be a number 14:14:55 so you would need a type system to tag whether something had been converted yet 14:16:57 --- quit: crab (Ping timeout: 258 seconds) 14:22:12 --- join: crab joined #forth 14:26:12 then perhaps words expect a converted number and you declare the type before you pass an argument if it is not already converted 14:26:12 i.e. 12 INT 18 INT + 14:26:12 move it outside the words 14:26:36 12 HEX 18 HEX + 14:26:57 crab: Putting unrecognized strings on a string stack or something is an interesting idea. 14:27:27 yeah, don't have to limit ourselves to two stacks that is true 14:27:36 That would extend the "language creating power" of the system, I t hink. 14:27:57 Oh, well, putting them on the main stack somehow is interesting as well. I just meant the general idea. 14:28:16 both approaches would be relatively cheap as well 14:28:59 --- join: epstein joined #forth 14:29:29 Sure. 14:29:40 Very easy to add that. :-) 14:33:42 --- quit: epstein (Ping timeout: 252 seconds) 14:36:41 If you then used quotes to allow containing spaces in strings you'd be able to deal with any type of input. 14:37:07 --- quit: crab (Ping timeout: 248 seconds) 14:38:02 When we were on our little Lisp discussion kick a few weeks ago I also decided it would be pretty easy to have a Lisp interpreter "live alongside" a Forth. 14:38:29 It would have its own memory pool it used, and there'd be ways to move information back and forth between the two "ecosystems." 14:40:20 It would just use the Lisp to interpret strings that began with ( 14:41:12 --- join: crab joined #forth 14:44:58 That reminds me… Has this been shared here? https://github.com/asrp/flpc 14:45:48 I thought of something similar to that lisp thing 14:47:09 just : ( ." )" pass-to-lisp-until ; 14:49:01 I'd also like to combine forth and smalltalk just cuz both are cool 14:49:08 but not sure how to make them coexist nicely 14:51:12 --- quit: cbridge_ (Remote host closed the connection) 14:51:23 --- join: cbridge_ joined #forth 14:53:47 Yes, I think Lisp and Forth could coexist very well. And yes - : ( ') WORD ->LISP ; would be almost all there was to it from the interpreter's point of view. 14:55:01 Well - scratch that. That would only parse up to the first ), and that's not good enough. There would at least have to be so parenthesis balancing involved. 14:55:09 s/so/some/ 14:55:48 A word to find the closing ) should be pretty easy. 14:58:59 fwiw I am interested in lisp + forth 14:59:21 We had a several day discussion about it a month, month and a half ago. 14:59:37 I imagine I will probably give that a try sometime. 14:59:59 But I want to think about string handling in my Forth first, so that when the time comes I integrate them as well as possible. 15:00:33 One of the things I really like about Python is its ability to dicker around with strings - take them apart, put them together, etc. etc. 15:00:50 I want a facility for that in my Forth that's as close to equally nice as I can get it. 15:01:07 that merely a library in lisp / scheme terms (but I do not know forth) 15:01:35 what do you think about openfirmware? I read that it was forth, with multiple ISA targets 15:03:24 it is called openbios nowadays https://github.com/openbios/openbios/ 15:03:35 Oh, I'm not familiar. I'll take a look. 15:05:35 --- quit: cbridge_ (Remote host closed the connection) 15:05:46 --- join: cbridge_ joined #forth 15:07:00 That looks interesting - I downloaded the IEEE doc. 15:07:20 Looks like it will take a little perusing to know what I really think. 15:07:23 Thanks for the link. 15:08:35 yw 15:09:33 ACTION played with OFW on an XO-1. Did a pong tutorial with it. 15:10:26 As for the Lisp connection, I'd probably not want to have to have a space after my opening (. Therefore I'd probably modify WORD to react to an opening ( regardless of what was immediately after it. 15:10:45 The down side of that would be that ( couldn't lead off any defined word, I guess. 15:11:10 And I use (word) quite a lot in my coding style. So maybe not. 15:11:41 They're usually not words I expect to type from the interpreter, but still, I'd want that code to compile right. 15:12:14 That's just been a choice. I could make those {word} instead. 15:12:56 I do that when most of the functionality is in (word) but it needs a touch of set up. 15:13:04 : FIND BL WORD (FIND) ; 15:13:07 etc. 15:13:32 And then (FIND) is a loop. 15:13:58 Though I'd usually code that like this: 15:14:15 : FIND BL WORD 15:14:34 : (FIND) ... ; 15:16:34 --- quit: cbridge_ (Remote host closed the connection) 15:16:45 --- join: cbridge_ joined #forth 15:16:49 --- quit: cbridge_ (Remote host closed the connection) 15:16:59 --- join: cbridge_ joined #forth 15:19:08 What do you think about the Forth wikipedia page? Is insightful / accurate? 15:19:10 https://en.wikipedia.org/wiki/Forth_(programming_language) 15:20:41 I've never really studied it. It looks like it's probably ok at least for the broad strokes. 15:21:50 It looks like it includes some ANS Forth bits that I particularly don't know; I've avoided some of the more modern stuff. 15:22:10 hmm why is that? 15:23:19 Oh, probably just because I learned Forth before they came about. But I think the standardization effort muddied the waters more than it helped. Just a personal taste t hing. 15:24:00 I regard Leo Brodie's "Thinking Forth" and Kevin McCabe's "Forth Fundamentals" as my favorite treatments. 15:24:28 Forth Fundamentals is out of print (at least I can't see volume 1 out there), but Thinking Forth is available online for free as a pdf. 15:25:27 The standard tries to obfuscate the internals of the system, and I just think the internals of Forth *matter* - one of the beauties of the langage is that you can do "under the hood" things that you can't do in most languages. 15:26:03 I don't want to knock the standard too much, though - they did what standards bodies do, and I guess that's ok. 15:26:39 I've got a copy of McCabe volume one - I keep meaning to look into producing a pdf from it. 15:26:59 Just haven't had the right block of spare time pop up yet. 15:27:30 It does a very thorough coverage of all the little nitty gritty details it takes to make a Forth system run. 15:27:58 I read it after having written my first Forth, and it made me very ashamed of that first effort. It was UGLY compared to how simple and clean a system can be. 15:29:24 Ok, probably it would be best just to open a Lisp string with a space-delimited ( 15:29:32 Avoids all the tradeoffs. 15:31:25 If you space delimit all of the ('s and )'s, you can get pretty close to implementing Lisp just in ). ( would leave a marker on the stack, the intervening words would just become stacked strings, and ) would do all the work. 15:32:02 But that would be pretty ugly. Just having ( re-route control to a different interpreter would be the way to go. 15:34:00 I haven't heard of this forth fundamentals 15:36:16 but this "Programming a Problem Oriented Language" paper is giving me a much better idea of how I'm going to go about writing my first forth 15:36:40 crab: link? 15:37:38 what does metacompilation mean in forth context? 15:48:35 --- quit: crab (Ping timeout: 248 seconds) 15:48:57 writing a forth implementation in forth 15:49:23 which is usually less magic than e.g. writing a metacircular interpreter for a Lisp 15:50:27 but you can sometimes still e.g. share the word header format between the host and target forth 16:18:56 --- join: crab joined #forth 16:28:32 colorforth.github.io/POL.htm 17:38:50 ty 17:41:11 no prob 18:01:24 KipIngram, would really love to get hold of a copy of McCabe I. :-) 18:14:35 remexre: Yes, and if you do (share the header format) it's generally easier to do the crosscompile. If you can search the target dictionary using the existing host dictionary tools, it's easier. 18:14:59 I.e., you want FIND to work on the target dictionary. 18:15:57 There are a handful of variables that contain critical system information - you point them into your target space and let it rip. 18:16:15 DP, CURRENT, etc. 18:16:24 CONTEXT. 18:18:24 --- quit: cbridge_ (Remote host closed the connection) 18:18:35 --- join: cbridge_ joined #forth 18:19:58 Oh, and in my case the target "base address." I can't actually change the base address pointer I use to convert my offsets to xt's, or my system would stop working. So I have to have an "execution base address" that never changes, and a "compile base address" that CAN change, if I want to compile to a target rather than to my own running system. 18:20:09 I thought about this pretty hard a couple of weeks ago. 18:20:20 It's exactly where I'm headed. 18:43:03 proteus-guy: I know; last time we talked about it I decided I was going to find a way to get it done. 18:43:31 I just need to look around for a good way - I don't want to take the book apart. 18:51:08 --- quit: crab (Ping timeout: 260 seconds) 19:08:33 KipIngram, well if you trust me - I've got a book scanner that fixes the warp and does OCR... ;-) I can scan and send it back to you undamaged. 19:11:26 --- join: crab joined #forth 19:17:04 What's the make and model of your scanner? 19:17:31 I don't even open my books all the way when I read them. I never press them out flat. 19:20:33 Oh, hmmm. 19:20:44 This one looks like it could be used in a very non-damaging way: 19:20:50 https://www.amazon.com/Vupoint-Solutions-Portable-Auto-Feed-PDSDK-ST470-VP/dp/B00I48M9PE/ref=as_li_ss_tl?s=electronics&ie=UTF8&qid=1518623792&sr=1-3&keywords=Vupoint+Magic+Wand+st470&linkCode=sl1&tag=thebestscanners-20&linkId=69b05b1782e36846e99ccd2dba948e4c 19:22:15 If I'm understanding how it works correctly - still reading. 19:22:47 Oh, no I'm not understanding it right. 19:22:51 The page has to go through that one, it seems. 19:23:02 Do they make any that you just slide over the page? 19:23:05 By hand? 19:23:11 KipIngram, https://ibb.co/gj9mrY5 https://ibb.co/BsFJpHH 19:25:10 This scanner you have to turn the page and lay the book open but it deals with the curvature through software. comes out quite good. 19:26:18 Ok, this one you can slide over the page: 19:26:21 https://www.amazon.com/I-R-I-S-458743-IRIScan-Hand-Held-Scanner/dp/B01NBL1UTL/ref=pd_di_sccai_6/137-3823159-9694145?pd_rd_w=ButPI&pf_rd_p=c9443270-b914-4430-a90b-72e3e7e784e0&pf_rd_r=YM6YK9FS8C2FFJTM0QTQ&pd_rd_r=937794ba-c2a0-4e56-8f7f-22966b5b980f&pd_rd_wg=Q52m7&pd_rd_i=B01NBL1UTL&psc=1 19:26:27 The third picture shows it being done. 19:26:45 I sure wouldn't fold a book around the way they are doing that magazine, but it looks workable. 19:27:30 That's gonna be a major PITA.:-) Mine you just click a foot controller button, it scans both pages and "flattens" them. Then you turn the page and click the button again. Can do a few pages a minute. 19:28:14 https://czur.com/product/shineultra 19:28:29 $200 on Amazon 19:30:38 --- quit: cbridge_ (Remote host closed the connection) 19:30:51 --- join: cbridge_ joined #forth 20:15:48 do you scan lots of books 20:17:29 crab, we use it mostly for capturing physical documents like invoices and contracts which are normally passed around in Thailand in paper form. But I did test it on a few books and it worked great. 20:19:31 ah gotcha 20:19:53 Thailand I know a guy who lived in Thailand 20:25:10 :-) Now you know two. haha 20:25:37 make that 3 ;) 20:29:35 haha 20:40:11 --- quit: cbridge_ (Remote host closed the connection) 20:40:24 --- join: cbridge_ joined #forth 20:54:35 what a day 20:54:47 I've tripled the number of Thailanders I know 21:49:40 --- quit: proteusguy (Ping timeout: 252 seconds) 21:55:48 --- quit: crab (Remote host closed the connection) 21:57:22 --- join: crab joined #forth 21:59:10 maw 21:59:24 maw dave0 21:59:32 maw crc 22:01:57 --- join: proteusguy joined #forth 22:01:57 --- mode: ChanServ set +v proteusguy 22:16:03 --- join: gravicappa joined #forth 22:51:17 -!- hosewiejacke(~hwj@i5C74281A.versanet.de) has left ##forth 22:51:46 --- quit: crab (Ping timeout: 258 seconds) 23:59:59 --- log: ended forth/21.06.04