00:00:00 --- log: started forth/18.12.12 00:50:44 --- quit: MrMobius (Read error: Connection reset by peer) 01:16:48 --- join: dave0 (~dave0@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 01:17:17 re 01:21:26 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 01:48:57 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 02:03:36 --- quit: ashirase (Ping timeout: 272 seconds) 02:07:27 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 02:19:35 --- quit: proteusguy (Ping timeout: 246 seconds) 02:51:57 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 04:05:35 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 04:18:22 --- join: proteusguy (~proteus-g@cm-58-10-154-223.revip7.asianet.co.th) joined #forth 04:18:22 --- mode: ChanServ set +v proteusguy 04:31:07 --- quit: pierpal (Read error: Connection reset by peer) 04:52:05 --- join: ncv_ (~neceve@86.127.177.21) joined #forth 04:52:05 --- quit: ncv_ (Changing host) 04:52:05 --- join: ncv_ (~neceve@unaffiliated/neceve) joined #forth 04:54:24 --- quit: ncv (Ping timeout: 250 seconds) 05:09:38 --- quit: ncv_ (Remote host closed the connection) 05:10:57 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 05:40:58 --- quit: verisimilitude (Remote host closed the connection) 05:47:17 --- quit: Zarutian (Read error: Connection reset by peer) 05:47:42 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 06:21:49 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 06:35:10 --- quit: pierpal (Quit: Poof) 06:35:29 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 06:42:53 --- quit: dave0 (Quit: dave's not here) 07:10:45 --- quit: ncv (Remote host closed the connection) 07:11:12 --- quit: rdrop-exit (Quit: Lost terminal) 07:13:35 --- join: ncv (~neceve@host165-120-111-163.range165-120.btcentralplus.com) joined #forth 07:13:35 --- quit: ncv (Changing host) 07:13:35 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 07:33:58 --- quit: tabemann (Ping timeout: 260 seconds) 07:38:14 --- quit: pierpal (Read error: Connection reset by peer) 08:00:09 --- quit: nighty-- (Quit: Disappears in a puff of smoke) 08:05:33 --- join: DKordic (~user@178-221-182-126.dynamic.isp.telekom.rs) joined #forth 08:16:17 --- quit: smokeink (Ping timeout: 268 seconds) 08:28:28 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 08:32:53 --- join: MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 08:35:31 --- quit: rdrop-exit (Quit: Lost terminal) 08:48:22 --- quit: lonjil (Ping timeout: 252 seconds) 09:10:12 bufufer 3 09:10:15 Ooops. 09:10:17 Sorry. 09:10:56 silly screen-user ;-) 09:17:59 alt-b 1 09:18:31 tmux ftw ;) 09:22:42 --- join: lonjil (~quassel@2a02:418:6050:ed15:ed15:ed15:e741:32d6) joined #forth 09:30:21 I'm quite happy with Terminator, thanks anyway ;-) 09:37:53 --- quit: ncv (Remote host closed the connection) 12:01:19 --- join: dys (~dys@tmo-100-83.customers.d1-online.com) joined #forth 12:12:22 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 12:19:50 --- join: verisimilitude (~user@2604:180:2:725::698a) joined #forth 13:19:09 --- quit: xek__ (Ping timeout: 240 seconds) 14:23:52 --- quit: ovf (Disconnected by services) 14:24:58 --- join: ovf (sid19068@gateway/web/irccloud.com/x-wlwdxpdvoaolmzhq) joined #forth 14:34:49 --- quit: nerfur (Ping timeout: 246 seconds) 14:38:54 --- join: nerfur (~nerfur@broadband-95-84-184-13.ip.moscow.rt.ru) joined #forth 16:36:56 --- quit: john_cephalopoda (Ping timeout: 268 seconds) 16:38:31 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 16:50:16 --- quit: pierpal (Ping timeout: 272 seconds) 17:29:38 --- join: dave0 (~dave0@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 17:29:51 hi 17:34:01 Hi dave0. 17:34:33 hi DKordic 17:44:33 --- join: tabemann (~tabemann@64.134.149.0) joined #forth 17:46:46 --- join: smokeink (~smokeink@42-200-116-132.static.imsbiz.com) joined #forth 17:54:27 --- quit: tabemann (Ping timeout: 250 seconds) 18:14:41 --- join: tabemann (~tabemann@h193.235.138.40.static.ip.windstream.net) joined #forth 18:16:50 --- quit: dddddd (Remote host closed the connection) 18:19:42 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 18:22:27 hey rdrop-exit 18:23:53 Good morning Tabemann :) 18:24:29 it's evening here, but same difference :) 18:25:41 US? 18:26:12 I've been looking at my code, and it doesn't seem too lengthy - most of the really long functions are ones in which I put each ELSE, THEN, REPEAT, UNTIL, and LOOP on its own line 18:26:14 yeah 18:27:16 well, most of it 18:27:53 there's some functions which are nested IF ELSE THEN after IF ELSE THEN, including CASE OF ENDOF ENDCASE stuff in there as well 18:28:42 and there's some functions which are short, but I'd be damned if I could understand how they work without going through the function word by word to figure out how it functions 18:29:12 My words are usually 1 to 3 lines long. The ones that are longer usually have some simple internal pattern. I've never implemted CASE. 18:29:13 --- join: groovy2shoes (~groovy2sh@unaffiliated/groovebot) joined #forth 18:30:11 I wonder what the median length in lines and the median length in words of my words 18:30:50 (the mean length in lines is probably quite a bit larger than 3... but mean isn't a robust statistic) 18:32:36 I've been lately trying to cut down my big words into smaller ones... but a lot of the time I don't understand how the big words work anymore, so I need to reverse engineer them before I can even factor them 18:33:43 I always have a block comment on the top line, then a blank line, and a blank line reserved at the bottom. 18:34:10 Therefore I can't have any definitions longer than 12 lines. 18:34:44 --- quit: proteusguy (Remote host closed the connection) 18:34:52 oh you're using blocks 18:35:45 That's the problem with long definitions, they take a lot of work to refactor. Best not to let definitions ever get long in the first place. 18:36:27 Yes, I enjoy coding with blocks. 18:36:38 I think of it as coding on index cards. 18:37:54 * can't have a definition longer than 13 lines. 18:41:23 right now as we speak I'm busy refactoring 18:41:38 Cool 18:43:38 Here's an example of a source block: 18:44:20 0 source Outer Interpreter - Compiler 18:44:21 1 18:44:21 2 : compile, ( ca -- ) 18:44:21 3 dup >link #inline ?dup if bmove, then; 18:44:21 4 & call32 32, ; compiled 18:44:23 5 18:44:25 6 variable 'compiler compiled 18:44:28 7 18:44:30 8 : compiler ( -- ? ) 18:44:33 9 compilation lookup 0= if number & literal then; 18:44:35 a dup immediate? if >code execute then; 18:44:38 b >code compile, ; compiled 18:44:40 c 18:44:43 d : compiler0 ( -- ) 'compiler references compiler ; compiled 18:44:45 e 18:44:48 f 18:47:11 I recently renamed "compile-only" to "compiled" in my new Forth 18:47:48 I figured that 18:48:05 * tabemann hasn't implemented compile-only 18:48:15 Here's the corresponding shadow block: 18:48:33 (which has resulted in my crashing attoforth when I forget that a word is compile-only) 18:48:42 0 shadow Outer Interpreter - Compiler 18:48:42 1 18:48:42 2 compile, Compile a call to a code address, if the definition 18:48:42 3 has a non-zero inline length simply inline the code 18:48:42 4 instead. 18:48:44 5 18:48:47 6 'compiler Holds the code address of the current compiler 18:48:49 7 routine. 18:48:52 8 18:48:54 9 compiler The default compiler. Attempts the compilation of the 18:48:57 a transient string by first treating it as a name and 18:48:59 b if that fails as a decimal number representation. 18:49:02 c 18:49:04 d compiler0 Resets the current compiler routine to the default 18:49:07 e compiler routine. 18:49:09 f 18:50:12 this is so much more minimal than my interpreter/compiler 18:51:26 That's just the compiler, I factored the interpreter separately, and also the outer interpreter into their own definitions. 18:53:13 Here's the interpreter: 18:53:30 0 source Outer Interpreter - Interpreter 18:53:30 1 18:53:30 2 : interpreter ( -- ? ) 18:53:30 3 interpretation lookup if 18:53:30 4 >code execute 18:53:32 5 then; number ; compiled 18:54:37 0 shadow Outer Interpreter - Interpreter 18:54:37 1 18:54:37 2 interpreter Attempt the interpretation of the transient string 18:54:37 3 treating it as a word name or a decimal number. 18:54:37 4 18:55:44 --- join: Insert_Coin (~insertCoi@h081217214054.dyn.cm.kabsi.at) joined #forth 18:56:34 yeah, my interpreter/compiler is one big function that does everything 18:56:46 it doesn't even attempt to be minimal 18:56:57 How many lines? 19:01:53 63 19:02:11 mind you it generates error messages and prints out errors when the stacks are out of range 19:02:36 and it handles parsing of not just integers, but floating point numbers and double cells 19:02:57 decomposition 19:03:00 it could benefit from some factoring though 19:04:39 You could move the printing of the error messages to the handlers for the those exceptions. 19:05:56 I use prefixes for number bases other than decimal, e.g. $ xxxx for hex, % xxxx for binary. 19:06:22 number parsing itself goes on in separate words 19:06:39 No floating point. 19:06:57 but just the logistics if invoking those words, and handling when they fail, goes on in the interpreter/compiler word 19:07:19 No double cells either as this particular Forth is 64 bit, it's the host end of my IDE. 19:09:27 Handling when those exceptions fail could be moved to the outer interpreter. 19:09:27 I mostly put in double cells because I plan on porting at some point to 32 bit archs like (non ARMv8-A) ARM 19:09:57 mind by interpreter I mean the outer interpreter 19:10:39 the inner interpreter is tight loop written in C 19:10:43 *a] 19:10:45 *a 19:11:41 The inner interpreter is your "next" or equivalent, that's not what I mean. 19:12:29 The outer interpreter is the to level interactive loop. 19:12:45 but yeah, I have as separate word QUIT that handles exceptions and calls REFILL and returns control to INTERPRET afterwards 19:12:55 What some interpretive languages call the repl IIRC 19:13:12 yeah, I have that 19:14:22 I prefer to use the name "restart" instead of QUIT. 19:15:17 "outer" is my outer interpreter, it calls either the interpreter or the compiler for incoming tokens. 19:16:48 my QUIT fetches input a line at a time, and calls INTERPRET which does the interpreting or compiling of that line, and catches whatever exceptions are raised within INTERPRET 19:17:35 and generates error messages for those exceptions - but not for ones from bad parses, which generate error messages before exceptions are raised 19:18:09 I see, I process input a token at time, similar to how LaForth did. 19:18:23 0 shadow Outer Interpreter - Core 19:18:23 1 19:18:23 2 'dispatch Holds the code address of the current processing 19:18:23 3 engine of the outer interpreter, typically either the 19:18:23 4 |interpreter| or the |compiler|. 19:18:25 5 dispatch Perform |'dispatch|. 19:18:28 6 19:18:30 7 outer The outer interpreter. Continuously parse tokens 19:18:33 8 from input and dispatch them to the outer 19:18:35 9 interpreter's current processing engine. 19:18:38 a 19:18:40 0 source Outer Interpreter - Core 19:18:43 1 19:18:46 2 variable 'dispatch compiled 19:18:48 3 19:18:51 4 : dispatch ( -- ) 'dispatch perform ;inline compiled 19:18:53 5 19:18:56 6 : outer ( -- n/a ) 19:18:58 7 token try dispatch intercept refresh recur ; compiled 19:19:01 8 19:21:19 "[" sets 'dispatch to "interpreter", and "]" sets it to "compiler". 19:22:12 "intercept" handles the exceptions 19:22:50 "refresh" resfreshes the terminal screen 19:23:48 "recur" jumps back to the beginning 19:25:28 "try" is similar but simpler to ANS "catch" 19:26:46 'dispatch is my alternative to having a STATE variable 19:27:03 you'd be absolutely appalled by my line editor 19:27:55 and I should rewrite it, because it's currently hard-coded for ANSI... 19:28:20 which'd probably make it even more complex, because then I'd have to code in a termcap or terminfo parser 19:30:37 This Forth uses lowest common denominator terminal codes, ECMA-48, I fall back on various DEC VT codes for a few things ECMA-48 doesn't cover, such as cursor shape and blinking. 19:32:54 I do some things "manually" so as not to depend on a large number of terminal control codes. 19:34:35 I use pretty much just straight ANSI except for two DEC codes I use for hiding and showing the cursor 19:34:49 I have to get ready for poker with my buds, chat again soon. Keep on Forthin' 19:35:04 --- quit: rdrop-exit (Quit: Lost terminal) 19:48:18 --- join: Insert_Coin_ (~insertCoi@h081217214054.dyn.cm.kabsi.at) joined #forth 19:51:53 --- quit: Insert_Coin (Ping timeout: 268 seconds) 20:10:29 --- quit: tabemann (Ping timeout: 240 seconds) 20:12:06 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 20:39:17 --- join: tabemann (~tabemann@2602:30a:c0d3:1890:a433:523c:27b8:b5c8) joined #forth 20:40:07 UNIX's termcap and terminfo nonsense is a complete waste of your time, tabemann. 20:40:28 Simply go with ECMA-48 and you'll not only target a real standard, but every modern terminal. 20:40:55 However, yes, many terminals are so deficient that they support hardly any of the particularly interesting control functions therein. 20:41:54 back 20:42:59 I really care about just something that supports every modern terminal emulator, not every terminal made 20:51:37 I do wish that ANSI had built-in support for hiding and showing the cursor 21:06:08 --- quit: dave0 (Quit: dave's not here) 21:13:32 I'll double check for you, since I have a printed and bound copy of the standard. 21:16:03 Right, there's no mode for that, unfortunately. 22:00:29 --- quit: Insert_Coin_ (Ping timeout: 240 seconds) 22:13:19 --- quit: pierpal (Ping timeout: 246 seconds) 22:14:06 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 22:21:03 --- join: dave0 (~dave0@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 23:13:04 --- join: nighty- (~nighty@b157153.ppp.asahi-net.or.jp) joined #forth 23:57:35 --- quit: dys (Ping timeout: 244 seconds) 23:59:59 --- log: ended forth/18.12.12