00:00:00 --- log: started forth/21.06.10 00:16:17 --- quit: gravicappa (Ping timeout: 258 seconds) 00:20:37 I forgot I was working little endian I got myself so confused 00:20:58 it's time for me to experience the programming hiccups of generations past 00:40:03 --- quit: cp- (Ping timeout: 258 seconds) 00:43:16 --- join: cp- joined #forth 01:38:33 --- join: gravicappa joined #forth 02:02:23 --- quit: crab (Ping timeout: 272 seconds) 02:46:02 --- join: Glider_IRC__ joined #forth 02:49:53 --- quit: Glider_IRC_ (Ping timeout: 272 seconds) 04:26:39 --- join: neuro_ joined #forth 04:27:18 Has anyone looked into how the 80s 8-bit home computer's BASIC interpreters were implemented? I wonder if they also did threaded token interpreters. 04:27:37 As in parse every BASIC line into a series of tokens, and when executing JUMP to their address. 04:36:18 --- quit: neuro_ (Ping timeout: 260 seconds) 04:50:57 --- join: neuro_ joined #forth 04:55:13 Well, BASIC wasn't postfix, so of course they had to have machinery to handle that. Given that everything was line # oriented I think your suggestion is a pretty good one. 04:56:51 ttps://en.wikipedia.org/wiki/Tiny_BASIC#Implementation_in_a_virtual_machine 04:58:55 --- quit: cbridge_ (Remote host closed the connection) 04:59:09 --- join: cbridge_ joined #forth 05:18:42 --- quit: futova (Quit: Bridge terminating on SIGTERM) 05:18:56 --- quit: jevinskie[m] (Quit: Bridge terminating on SIGTERM) 05:18:57 --- quit: jimt[m] (Quit: Bridge terminating on SIGTERM) 05:57:37 --- quit: xek_ (Remote host closed the connection) 06:01:29 --- join: xek joined #forth 06:02:19 ya the cool thing on some of those old basics is you could type in a line of source then recall it and it would look slightly different because the text representation was being reconstructed from the tokens 06:09:58 --- join: futova joined #forth 06:14:34 --- quit: futova (Remote host closed the connection) 06:17:41 --- join: futova joined #forth 06:22:11 --- quit: futova (Remote host closed the connection) 06:40:34 --- join: futova joined #forth 06:48:20 --- join: jevinskie[m] joined #forth 06:48:20 --- join: jimt[m] joined #forth 06:52:49 --- quit: neuro_ (Remote host closed the connection) 07:05:22 Oh, that is kind of fun. 07:47:48 mrmobius that souds like my see implementation in x4 07:47:56 decompiles the definition you want to see 07:48:09 see blah would so a colon definition for blah 07:48:34 Right. But I guess it loses any immediate words, right? 07:48:42 Just picks up the raw results of their actions? 07:53:33 no 07:53:40 if i do : foo do something ; immediate 07:53:45 and say see foo it gives 07:53:51 : foo do something ; immediate 07:54:01 if i do 0 constant blanh and say see blah it shows 07:54:03 0 constant blah 07:54:28 and it indents looping and conditional structures too 07:55:23 at one time i had a 99% functional debugger too that allowed you to visually single step code 07:56:03 verey nice display of variables the IP pointed to too. 07:56:06 No, I mean when you USE an immediate word for special compilation actions. 07:56:26 Like does see recover IF ... THEN, or does it show the jump form produced by IF and THEN? 07:56:32 oh you see the code thats generated in that case, not the code it came from 07:56:39 Right - that's what I meant. 07:56:46 yea that was a non issue for me 07:56:51 Really no way for it to be any different. 07:57:00 Unless you made see awfully smart. 07:57:14 when you decompile C and the decompilation shows a literal you dont see the definition of the constant use to set that literal 07:57:33 It would just have to "know" to reverse those things, on a case by case basis, and that would be a pain compared to its otherwise nice clean operation. 07:57:40 adding something like that in would make the code naturally run significantly slower 07:57:48 Yep. 07:57:55 it could handle create does words tho 07:58:04 : constant create , does> @ ; 0 constant foo 07:58:26 if you did a debug on foo it would single step through foo into the definition for constant 07:58:27 That's pretty cool. 07:58:40 decompiled the full definition for constnat but placed the IP on the @ 07:58:53 i need to redo all of that 07:59:08 All such things are still to be done on my current effort. 08:00:04 I'm not using immediate control words this time; those conditional return and conditional recurse words sort of obviated them. 08:00:15 And that reduces my reliance on immediate words a LOT. 08:00:38 A SEE word in my system, though, will need to check a header bit on each word to see if it has an offset following it. 08:00:56 All of the conditional recurse words have such an offset, aiming back at the start of the definition. 08:01:12 They're really conditional jumps, but I only ever jump to "start of def." 08:01:30 So I don't really need the offset value for decompilation, but I need to know to jump the decompilation process over it. 08:02:02 I need to check and make sure that (lit) has that bit set, since it also has a parameter cell following it. 08:04:05 --- quit: cbridge_ (Remote host closed the connection) 08:04:16 --- join: cbridge_ joined #forth 08:10:56 The real purpose of that bit is to direct the compiler to place an offset after the compiled cell, and that's not required to compile literals - they get a separate logic path through the compiler. But the bit can do double duty later for SEE, and for that purpose I need it on (lit) as well. 08:14:47 You know, I've realized that traditional Forth is missing something very useful. When I wrote that Python script to generate the source code for all those conditional words, I just ran the script and re-directed the output into a file, which I then "included" in the assembly source. 08:15:12 Later, when I can recompile my system stand-alone, I'll want to replace that Python with Forth code that generates the source for those words. 08:15:23 But Forth doesn't have any sort of "redirection" capability. 08:15:40 What I'd want that code to do would be to emit a stream of characters into a block or a series of blocks. 08:15:54 That's not really a traditionally available thing, so I need to think about how to do it. 08:16:23 All Forth output words go to the console - we're left to our own devices to write code that fills blocks with data. 08:17:11 I'll either need to do it that way - just copy bytes into place in the block, or invent some mechanism that lets me send regular output to blocks. 08:17:21 --- quit: Glider_IRC__ (Remote host closed the connection) 08:17:51 could you just make EMIT DEFERred 08:18:03 --- join: Glider_IRC__ joined #forth 08:19:22 Could, yes - that may be the best answer. In my system all words can be treated in that way. 08:19:39 I.e., DEFER isn't a "special feature." 08:19:59 I would say that is the right answer as far as I can tell right now. 08:20:36 That should have been obvious to me. :-( Thanks! 08:24:01 And I retract my critique - DEFER has long been part of Forth, and it solves that problem handily. So Forth IS able to do such things. 08:24:38 What I probably want to do "new" is wrap a bit of nice syntax around adjusting EMIT and restoring it when done. 08:48:14 --- join: crab joined #forth 08:59:45 if you're in posix the easiest way might be to pipe stdout 09:02:12 Afternoon stackers 09:05:30 Afternoon, crab. 09:05:53 cess11: I'd rather not rely on a native OS like that. 09:05:56 I won't always have one. 09:06:43 I'll write a little bit of code to manage output into a block, and take remexre's suggestion - I like that. 09:07:01 Obviously, my EMIT currently relies on the native OS - I use system calls. 09:07:15 But I'd like to limit that reliance to the few spots I already have it. 09:08:26 My EMIT actually does a 1-byte TYPE directly from the stack; it's TYPE that has the syscall in it. 09:10:26 --- quit: cbridge_ (Remote host closed the connection) 09:10:41 --- join: cbridge_ joined #forth 09:14:36 I am not sure yet how I will handle user input and disply for my gba forth 09:19:31 if you're rebuilding the system on bare metal you'll need to have hardware specific file IO anyway, no? 09:23:34 Yes, for sure. 09:23:40 Oh, well wait. 09:23:45 I'm not sure I understood you. 09:23:51 I'll have to implement BLOCK somehow, yes. 09:24:05 I'm planning to implement a file system on top of BLOCK. 09:24:10 So it would port to other platforms. 09:25:01 I use syscalls for keystroke in, character out, block read, block write. And on this particular system I use syscalls for memory allocation and console termios. 09:25:51 Linux won't give you a single character keyboard operation unless you diddle the termios into raw mode. 09:26:05 Otherwise it will retain control until you get an Enter. 09:37:24 i'm not sure i understand either, just thought that write syscall on fd 1 and then redirecting to whatever from the os seemed like a fairly easy way to move what you do in python into your forth if you're in a posix environment anyway 09:37:38 termios seems quite complex, never used it 11:51:51 --- quit: xek (Remote host closed the connection) 11:54:16 --- join: xek joined #forth 12:28:10 --- join: neuro_ joined #forth 12:37:29 --- quit: wineroots (Remote host closed the connection) 12:53:45 probablydance.com/2018/06/16/ is a good article 13:49:58 --- quit: gravicappa (Ping timeout: 240 seconds) 14:10:48 --- quit: crab (Ping timeout: 258 seconds) 14:30:52 Nice and interesting. 14:38:49 Oh, thanks crab - I like stuff like that. 14:46:06 --- join: Glider_IRC_ joined #forth 14:49:10 --- quit: Glider_IRC__ (Ping timeout: 240 seconds) 15:10:28 --- quit: Kumool (Read error: Connection reset by peer) 15:12:04 --- quit: neuro_ (Ping timeout: 245 seconds) 15:14:17 --- quit: xek (Remote host closed the connection) 15:15:41 --- join: xek joined #forth 16:00:49 Interesting article. The guy is very up front about his own lack of "high end expertise" with hash functions. Lots of folks wouldn't have been so forthright. 16:01:20 I think he took a pretty good common sense approach to his analysis, though - didn't seem bad at all. 16:59:10 maw 17:29:48 maw, dave0 17:50:19 mw KipIngram 17:50:59 maw* 18:32:35 --- join: crab1 joined #forth 19:17:26 --- quit: crc (*.net *.split) 19:17:27 --- quit: klys (*.net *.split) 19:17:29 --- quit: _0x1d3 (*.net *.split) 19:17:29 --- quit: a3f (*.net *.split) 19:17:29 --- quit: KipIngram (*.net *.split) 19:17:39 --- join: a3f joined #forth 19:17:53 --- join: KipIngram joined #forth 19:17:55 --- join: _0x1d3 joined #forth 19:18:16 --- nick: KipIngram -> Guest82693 19:18:26 --- join: crc joined #forth 19:18:26 --- mode: hostsailor.freenode.net set +ov crc crc 19:21:52 --- join: klys joined #forth 19:22:46 --- nick: Guest82693 -> KipIngram 19:22:56 --- mode: ChanServ set +v KipIngram 22:09:02 --- join: gravicappa joined #forth 22:18:34 --- quit: _0x1d3 (K-Lined) 22:18:34 --- quit: mjl (K-Lined) 22:18:34 --- quit: ovf (K-Lined) 22:18:34 --- quit: crc (K-Lined) 22:25:39 --- join: crc joined #forth 22:26:02 --- nick: crc -> Guest90388 22:26:55 --- mode: ChanServ set +v Guest90388 22:27:17 --- nick: Guest90388 -> crc 22:40:02 --- quit: lonjil (*.net *.split) 22:40:02 --- quit: fiddlerwoaroof (*.net *.split) 22:40:11 --- join: lonjil joined #forth 22:42:54 --- join: fiddlerwoaroof joined #forth 22:51:02 --- mode: ChanServ set +o crc 22:59:09 --- nick: proteusguy -> proteusguy-out 23:59:59 --- log: ended forth/21.06.10