00:00:00 --- log: started forth/04.03.22 00:07:07 --- quit: Serg () 00:20:22 --- join: crc (crc@1Cust136.tnt1.levittown.pa.da.uu.net) joined #forth 00:33:04 anyone know how old chuck is? 00:34:08 66? 00:38:31 kc5tja, did you want people interested in FBKestrel to mail you, to get approximate numbers? 00:40:50 --- quit: ayrnieu (Read error: 104 (Connection reset by peer)) 01:04:50 --- join: Serg (~z@212.34.52.142) joined #forth 01:07:19 Approximate numbers for what? 01:07:27 Pricing? 01:07:49 For now that is the best way; however, when such numbers become available, I will release them on my website. 01:08:09 Damn, it's late!! I need to get going here pretty soon. :/ 01:08:19 * kc5tja got wrapped up in reading information on the PL/M and PL/I languages. 01:14:18 kc5tja, approximate number of people interested 01:18:57 Ahh, well, yes, definitely. Market research is always a critical component of any business endeavor. 01:21:10 looked at colorforth again today 01:21:15 the interface still boggles the mind 01:22:17 think I might wuss out and try one of the qwertified derivatives 01:23:36 well, it doesn't boggle the mind. I just find it quite hard to fluently use a the keyboard layout 01:23:38 * kc5tja nods 01:23:43 Well, I have to get to bed. 01:23:48 * kc5tja has work and school tomorrow. 01:23:54 damn timeshift ! 01:23:58 --- quit: kc5tja ("THX QSO ES 73 DE KC5TJA/6 CL ES QRT AR SK") 01:43:02 * Serg is screwing brains w/ W2K inet gate 01:55:26 sounds dangerous 02:03:03 i try to install it 02:03:20 after few crashes, it's partition table was madman's paint 02:04:12 i washed it w/ zeroes and attempt from scratch 02:06:28 --- quit: Serg () 02:43:54 --- quit: crc (Nick collision from services.) 02:43:54 --- quit: ASau (Read error: 104 (Connection reset by peer)) 02:44:42 --- join: crc (crc@1Cust218.tnt1.levittown.pa.da.uu.net) joined #forth 03:25:12 --- join: Downer (~Pen@host213-122-34-1.in-addr.btopenworld.com) joined #forth 04:05:12 --- join: qFox (C00K13S@cp12172-a.roose1.nb.home.nl) joined #forth 05:18:12 --- join: ASau (~asau@158.250.48.196) joined #forth 05:25:46 --- quit: hovil ("Leaving") 05:26:47 --- quit: Downer ("brb") 05:55:29 --- join: Herkamire (stjohns@c-24-62-120-109.ne.client2.attbi.com) joined #forth 05:59:41 Dobryjj vecher, Herkamire! 05:59:54 Privet. :) 06:00:12 God kvaell. 06:00:25 It's not evening yet :) 06:00:54 5:01 --> Evening. 06:01:20 privet 06:01:32 5.00 is morning! 06:01:33 ;) 06:02:11 It's another "5:00". ;) 06:05:50 --- join: ayrnieu (julian@65.169.246.30) joined #forth 06:06:03 Dobryjj vecher, ayrnieu! 06:07:01 terve ayrnieu 06:12:43 [15:01:30] 5.00 is morning! 06:13:03 Gy! 06:13:09 4-lines editor. 06:14:09 How do you like it? 06:31:54 --- join: proteusguy (~proteusgu@workstations.pinnaclesports.com) joined #forth 06:32:08 Dobryjj vecher, proteusguy! 06:57:05 --- quit: crc () 07:00:35 --- join: Downer (~Pen@host213-122-144-57.in-addr.btopenworld.com) joined #forth 07:17:27 --- quit: I440r (Read error: 104 (Connection reset by peer)) 07:37:23 qFox. How do you like another "Hacking FIG Forth" tour? 07:37:39 How would you like?.. 07:38:06 I've got a fresh idea. 07:41:40 yay 07:41:41 :p 07:41:57 Well. 07:42:06 The main idea is this. 07:42:24 Initially you've got bare bone system. 07:42:38 You have practically nothing. 07:42:47 uhu 07:42:51 But you have underlying DOS. 07:43:00 Though you can't access it. 07:43:06 not directly 07:43:17 Well. 07:44:01 You have initial plain binary COM file, which is simple memory dump. 07:44:20 When you define new words, you change memory. 07:44:33 with you so far.. 07:44:42 So why not to dump memory in another plain binary COM file? 07:45:17 So why not dump memory to another plain binary COM file? 07:45:23 mmmm 07:45:56 you mean write from one area to the other in the memmory? 1 on 1 to a com file? 07:46:07 Yes. 07:46:28 so expand the fig forth, and save it.. 07:46:29 You get another plain binary COM file with _extended_ Forth dictionary. 07:46:49 i havnet worked with files yet in forth 07:46:53 so i wouldnt know how 07:46:58 No matter. 07:47:04 but i suppose it should be possible, if that theory is correct 07:47:14 I've done this many times. 07:47:17 :) 07:47:30 ok, so if this isnt anything new...whats the hack? 07:47:48 The problem is to express solution in as little words as possible. 07:47:57 thats always the problem :p 07:48:16 but atm i dont even know how to open a file for read/write/whatever 07:48:26 so i dont think i'm the right target for htis practice 07:48:27 It seems I've achieved less than one screen. 07:48:57 qFox. We need only two DOS API functions: CREAT and WRITE. 07:48:57 uhm, i dont know, but opening files for writing shouldnt be long 07:49:11 and copying one area of the memmory to a file shouldnt be much 07:49:14 so why is it so big? 07:49:53 You've forgotten about low level coded primitives. 07:50:36 Another problem is that Forth restores dictionary state from so called "boot up parameters." 07:50:45 Hence you need to change them. 07:50:51 yes but if you use that.... oh right 07:53:25 Actually you need to change initial DP value and initial LATEST. 07:54:47 OK. Are you interested in this? 07:55:10 i'll follow your lead, but you are warned that i have very little experience with this 07:56:32 Well. 07:56:39 How the stuff works. 07:58:57 When you've run FORTH.COM it does register initialization, copies initial values to USER variables. 08:00:01 You have initial values (in boot parameters area) for these variables: 08:00:14 S0 R0 TIB WIDTH WARNING FENCE DP VOC-LINK 08:00:24 k 08:01:17 When your dictionary grows, you get different DP and VOC-LINK values. 08:01:39 dp = datapointer, voc-link is dictionary offset? 08:02:13 DP is for "dictionary pointer", voc-link is for linked list of vocabularies. 08:02:21 : HERE DP @ ; 08:03:52 : HERE DP @ ; HERE MSG # 4 OK 08:04:03 i guess that means it already existed 08:04:06 No. Do not do it. 08:04:13 oh heh 08:04:27 I just show how it's implemented. 08:04:30 k 08:05:00 HERE is done as it has been defined like : HERE DP @ ; 08:05:27 ok 08:05:42 You see why you have to change initial DP. 08:06:14 because the dicionary is bigger..? 08:06:21 when you use the custom one i mean 08:06:22 Right. 08:07:16 BTW. You have VLIST word. 08:07:29 It lists vocabulary. 08:07:47 Like WORDS in ANS or "83". 08:08:09 You also have +ORIGIN word. 08:08:17 heh 08:08:18 ok 08:08:30 what does that do? 08:08:58 It adds constant displacement. 08:09:12 0 +ORIGIN is the start of Forth system image. 08:09:34 Well. 08:10:00 like hte offset where the forth system starts in the memmory? 08:10:02 Let's suppose we have defined FIN as the latest word. 08:10:15 Right. 08:10:32 winforth doesnt recognize it, but thats not fig anyways 08:10:45 ok with you so far 08:10:46 :) 08:11:13 When FIN is least recently defined word, LATEST gives its NFA. 08:11:43 You can print this word with ID. 08:11:47 LATEST ID. 08:12:01 ID. ( nfa -- ) 08:12:18 prints word name. 08:12:33 word name at that memmory location? 08:12:41 Right. 08:12:52 ok and what if there's no definition at that location? 08:13:06 It prints what it finds. 08:13:12 Well. 08:13:26 How you save you new DP. 08:13:53 Initial DP is located at: DECIMAL 30 +ORIGIN 08:14:18 whats in the first 30 bytes? 08:14:18 Hence you need: HERE DECIMAL 30 +ORIGIN ! 08:15:13 There're another boot parameters, two jump commands, current system version etc. 08:15:20 k 08:15:59 When system boots up it sets FORTH vocabulary as CONTEXT and CURRENT 08:16:33 Any other vocabularies are referred from FORTH one. 08:17:04 (If you have not hacked your dictionary at low level that's absolute true.) 08:17:14 CURRENT is the vocabulary where words are added to you define with : ,and CONTEXT is.... i dont know.. ? 08:17:36 CONTEXT is searched first when you interprete word. 08:17:44 ah ok 08:18:02 so yo ucan have multiple vob's loaded, and he'll search all of them? 08:18:09 You may define word in CURRENT voc. but look into CONTEXT 08:18:20 ok 08:18:31 Well. 08:19:41 Other boot parameters concern memory layout: bottoms of stacks, user area address and start of disk buffers area. 08:19:48 So we don't need them. 08:19:55 ok 08:20:18 But you have changed FORTH vocabulary. 08:20:58 And system forgets everything when reboots (see COLD word). 08:21:15 yea, i understand 08:21:17 So you have to update corresponding parameter. 08:21:44 To do this means: 08:22:05 a) swithing CONTEXT to FORTH vocabulary; 08:22:26 b) extracting latest word of CONTEXT voc.; 08:22:42 c) updating boot parameters. 08:22:47 --- join: networm (~networm@L0656P14.dipool.highway.telekom.at) joined #forth 08:23:04 but isnt CONTEXT automaticly set to FORTH voc? 08:23:35 Code: FORTH CONTEXT @ @ DECIMAL 12 +ORIGIN ! 08:23:39 or does it have at least two voc's by default? 08:23:46 the forth and the user one, or something... 08:24:11 Automatically FORTH is set as CONTEXT and CURRENT at boot. 08:24:45 so why do we need to switch CONTEXT to FORTH? 08:24:48 But you may define as many vocabularies as you have memory. 08:25:32 If you have another CONTEXT at that time, you don't get latest word in _FORTH_ voc. 08:25:42 ok.. 08:28:19 You get latest word for you CONTEXT voc. 08:28:26 Well. 08:28:58 After you've updated these two boot parameters you can bravely save memory dump to COM file. 08:29:58 ok, understood 08:30:49 Now how to save. 08:31:07 Let's take a break. 08:31:11 --- join: rO| (~JBouncer@pD9E59C89.dip.t-dialin.net) joined #forth 08:31:13 :) 08:33:34 let me try to recap, see if i got everything right... CONTEXT is the first vocabulary that forth looks up words in. CURRENT is the vocabulary where newly defined words will be added into. +ORIGIN is the offset where the FORTH system starts in the memmory. 30 +ORIGIN is the offset of the first word of the FORTH vocabulary. 08:34:21 and here simply puts the address of the dp on the stack 08:39:09 First approximation. OK. 08:39:16 Well. 08:40:06 To see how it works in reallity you can do this. 08:40:06 1. Define several words and 08:40:06 call WARM 08:40:16 2. Define several words and call COLD 08:40:50 See difference in VLIST results. 08:41:30 3. Define several words, change initial DP and initial LATEST (see above), call COLD. 08:41:42 See difference in VLIST result. 08:42:26 That's how boot parameters influence on system. 08:43:45 first WARM then COLD? i would think the other way around.... COLD indicating the system isnt booted yet, WARM when its done... 08:44:13 Order of 1 and 2 does no matter. 08:44:24 oh 08:44:42 That're examples. 08:45:16 You can see in reality, why I was explaining all these. 08:46:14 ok 08:49:05 Well. 08:49:10 Now DOS. 08:49:42 First rule for Intel machine code: Intel machine code is _octal_. 08:49:56 Not hexadecimal, but _octal_. 08:50:12 That's why I will use octal numbers. 08:50:22 DECIMAL : OCTAL 8 BASE ! ; 08:50:38 k 08:51:39 Well. You know that DOS API call is interrupt service. 08:51:54 yes, and that ints are slow 08:51:56 :) 08:52:19 We need: load registers, call for interrupt, save registers. 08:52:46 Of course we will load registers from stack. And save them back there. 08:52:52 uhu 08:53:37 Registers: AX CX DX BX SP BP SI DI ,--- from 0 to 7. 08:53:51 Or: AL CL DL BL AH CH DH BH 08:54:06 why not just ax bx cx dx... 08:54:10 3 bits for registed in op code. 08:54:22 oh thats what you just said, lol sorry 08:54:29 It's longer to explain. 08:55:35 PUSH command is 12Q, POP command is 13Q. 08:55:45 ? 08:55:50 is digit for register. 08:55:53 oh ok 08:55:53 See above. 08:56:14 120Q is for PUSH AX, 130Q is for POP AX. 08:56:35 What else we need. 08:56:46 PUSHF is 234Q. 08:56:54 INT is 315Q 08:57:04 DOS intr. is 41Q. 08:57:49 MOV.B , is 26Q 08:58:01 MOV.W , is 27Q 08:58:10 Immediate operand follows. 08:59:02 Declaring primitive words is done like I explained yesterday. 08:59:12 : CODE CREATE SMUDGE ; 09:00:11 HEX ( exception ) : NEXT E9 C, ( your NEXT address ) HERE 2+ - , ; 09:01:57 --- join: wossname (wossname@HSE-MTL-ppp77708.qc.sympatico.ca) joined #forth 09:03:24 CODE (CREAT) ( create DOS file ) OCTAL 121 C, 132 C, 264 C, 74 C, 315 C, 41 C, 230 C, 234 C, NEXT 09:04:12 I.e.: cx pop dx pop 74 # ah mov 41 int ax push pushf next 09:04:35 : NAME BL WORD HERE COUNT OVER + 0 SWAP C! ; 09:04:57 : CRE NAME 0 CREAT IF ." DOS ERROR # " . ABORT THEN ; 09:05:21 Now you can create as many files as you have free file handles. 09:05:30 CRE filename 09:05:38 returns file handle. 09:06:15 --- quit: Downer (Read error: 60 (Operation timed out)) 09:07:14 And I've forgotten: 09:07:22 : CREAT (CREAT) 1 AND ; 09:08:16 ye 09:08:16 :) 09:09:25 --- join: Downer (~Pen@host213-122-144-57.in-addr.btopenworld.com) joined #forth 09:10:01 why the 1 AND btw? 09:11:38 Well. 09:12:12 You have carry flag set when error, but other flags are set of reset inpredictably. 09:12:38 When you PUSHFed, you have carry flag as the least significant bit. 09:12:45 oh ok 09:13:25 Well, writing is easier as you need not to deal with file name. 09:14:03 CODE (WRITE) 133 C, 131 C, 132 C, 264 C, 100 C, 315 C, 41 C, 230 C, 234 C, NEXT 09:14:23 ( addr cnt fh -- cnt/err 0/1 ) 09:14:53 : WRITE (WRITE) 1 AND ; 09:15:14 To dump Forth you: 09:15:45 0 +ORIGIN HERE OVER - ( file handle ) WRITE . . 09:16:21 First printed number should be 0, second one should be equal to HERE 0 +ORIGIN - . 09:17:12 "Altogether now!" :) 09:18:13 If you do everything right, you're able to run extended Forth. 09:19:49 hmmm crash. wasnt that B88 my NEXT addr? 09:20:36 No. 09:20:43 You have 159. 09:21:00 HEX 159 ? should give AD 09:21:24 gives me ... crap 09:21:37 HEX 159 ? -7453 OK 09:21:46 Oi. 09:21:52 HEX 159 C@ . 09:21:58 should be AD 09:22:04 yep 09:22:05 :) 09:24:18 still crashes, except it restarts fig now, rather then closing it 09:25:21 Reread what you typed in. You can decompile all machine code. 09:34:24 My does not. 09:34:35 FORTH CONTEXT @ @ DECIMAL 12 +ORIGIN ! 09:34:36 HERE DECIMAL 30 +ORIGIN ! 09:34:36 : CODE CREATE SMUDGE ; 09:34:37 HEX : NEXT E9 C, 128 HERE 2+ - , ; 09:34:37 : OCTAL 8 BASE ! ; 09:34:38 CODE (CREAT) OCTAL 121 C, 132 C, 264 C, 74 C, 315 C, 41 C, 230 C, 234 C, NEXT 09:34:38 : NAME BL WORD HERE COUNT OVER + 0 SWAP C! ; 09:34:40 : CRE NAME 0 (CREAT) 1 AND IF ." DOS ERROR # " . ABORT THEN ; 09:34:42 CRE 22MAR04.COM . 09:34:44 CODE (WRITE) OCTAL 133 C, 131 C, 132 C, 264 C, 100 C, 315 C, 41 C, 230 C, 234 C, NEXT 09:34:46 : WRITE (WRITE) 1 AND ; 09:34:48 : WHOLE 0 +ORIGIN HERE OVER - ; 09:34:50 WHOLE 5 WRITE . . 09:35:06 You have to change 128 in NEXT to your 159. 09:36:52 um 09:36:59 i think i just borked up my keyboard 09:37:01 or somethjing 09:37:29 nm 09:43:24 Actually I mistyped 3 times: 09:43:25 : CODE CREATE SMUDGE ; 09:43:26 HEX : NEXT E9 C, 128 HERE 2+ - , ; 09:43:26 : OCTAL 8 BASE ! ; 09:43:27 CODE (CREAT) OCTAL 131 C, 132 C, 264 C, 74 C, 315 C, 41 C, 120 C, 234 C, NEXT 09:43:28 : NAME BL WORD HERE COUNT OVER + 0 SWAP C! ; 09:43:28 : CRE NAME 0 (CREAT) 1 AND IF ." DOS ERROR # " . ABORT THEN ; 09:43:29 CODE (WRITE) OCTAL 133 C, 131 C, 132 C, 264 C, 100 C, 315 C, 41 C, 120 C, 234 C, NEXT 09:43:31 : WRITE (WRITE) 1 AND ; 09:43:33 : WHOLE 0 +ORIGIN HERE OVER - ; 09:43:35 : SAVE WHOLE CRE WRITE IF ." DOS ERROR # " . ELSE . THEN ; 09:43:37 FORTH CONTEXT @ @ DECIMAL 12 +ORIGIN ! 09:43:39 HERE DECIMAL 30 +ORIGIN ! 09:43:41 SAVE 22MAR04.COM 09:43:54 This works. 09:44:06 woah 09:44:17 what forth needs is a published magazine 09:44:38 and you could stick all this shit in it, and we could rush home to power up our dinky basic machines and type in the code 09:44:47 that would be :cool: 09:46:11 i think the problem with forth now 09:46:14 is that its old 09:46:19 and because of that 09:46:34 there are still quite alot of forth programmers that know all kind of tricks 09:46:37 so to come up with something new 09:46:43 is probably impossible 09:47:35 "There's nothing new in this. 09:47:37 computer science is always creating new stuff 09:47:46 Because there's nothing new at all." 09:47:54 at the least, the magazine could show how to fit every new thing in a screen ;l 09:48:38 I've written 4 line editor today. 09:55:54 --- quit: networm (Read error: 113 (No route to host)) 10:11:02 --- join: networm (~networm@L0649P20.dipool.highway.telekom.at) joined #forth 10:13:51 --- quit: wossname ("brb") 10:14:48 if i include a file, how do i make sure i dont include the same header file over and over again? 10:15:35 something like in C, #ifndef HEADER_INCLUDED #define HEADER_INCLUDED .... #ENDIF 10:16:16 but i'm not sure how to skip it from processing the file 10:17:02 qFox: put the #endif at the bottom of the file 10:17:20 thats c. or is it the same style in forth? 10:17:33 oh 10:17:35 :) 10:17:40 try NEEDS 10:17:55 checks if a file is loaded and loads it if not? 10:18:03 iirc 10:18:07 tnx :) 10:18:21 might not be a standard word. but check for it 10:18:21 yay 10:18:25 works for winforth 10:19:07 gonna continue on that set game ;) 10:19:18 :) 10:22:47 --- quit: proteusguy (Read error: 54 (Connection reset by peer)) 10:22:56 --- join: proteusguy (~proteusgu@workstations.pinnaclesports.com) joined #forth 10:43:50 --- join: MrReach (~spam@209.181.43.190) joined #forth 10:44:29 --- quit: MrReach (Client Quit) 10:48:16 qFox: what sort of graphics will your set game have? 10:50:43 --- join: _proteus (~proteusgu@65.166.249.10) joined #forth 10:52:15 --- quit: fridge (orwell.freenode.net irc.freenode.net) 10:52:15 --- quit: ChanServ (orwell.freenode.net irc.freenode.net) 10:52:15 --- quit: proteusguy (orwell.freenode.net irc.freenode.net) 10:52:15 --- quit: SDO (orwell.freenode.net irc.freenode.net) 10:52:15 --- quit: l0C0 (orwell.freenode.net irc.freenode.net) 10:52:15 --- quit: chandler (orwell.freenode.net irc.freenode.net) 10:52:16 --- quit: ayrnieu (orwell.freenode.net irc.freenode.net) 10:52:16 --- quit: Downer (orwell.freenode.net irc.freenode.net) 10:52:16 --- quit: hefner (orwell.freenode.net irc.freenode.net) 10:52:24 --- quit: ASau () 10:52:36 i honestly have no idea yet. i was thinking about how to do that, but seeing as i cant seem to get a dos display mode where i can control pixels myself, i'll have to do it via the windows sdk, but i dont know anything about it yet.... so thats gonna be a long way 10:52:54 of course i have a character output, but thats not very practical for the game 10:53:44 --- join: hefner (~hefner@pool-151-196-19-248.balt.east.verizon.net) joined #forth 10:54:18 --- quit: hefner (orwell.freenode.net irc.freenode.net) 10:54:52 Set table: 10:54:52 / 1 2 3 4 10:54:52 A 1212 2131 2123 1321 10:54:52 B 3333 1331 2211 3112 10:54:52 C 1311 2121 2132 3231 10:54:52 --- join: fridge (~fridge@dsl-203-33-165-6.NSW.netspace.net.au) joined #forth 10:54:53 --- join: chandler (~chandler@64-145-60-36.client.dsl.net) joined #forth 10:57:37 --- quit: chandler (Killed by fontana.freenode.net (Nick collision)) 10:58:13 --- join: chandler_ (~chandler@64-145-60-36.client.dsl.net) joined #forth 10:58:15 --- join: ChanServ (ChanServ@services.) joined #forth 10:58:15 --- join: proteusguy (~proteusgu@workstations.pinnaclesports.com) joined #forth 10:58:15 --- join: l0C0 (loco@bor.gs) joined #forth 10:58:15 --- join: SDO (~SDO@68.170.20.253) joined #forth 10:58:15 --- join: chandler (~chandler@chandler.registered.freenode) joined #forth 10:58:15 --- mode: irc.freenode.net set +o ChanServ 10:58:28 --- join: ayrnieu (julian@65.169.246.30) joined #forth 10:59:06 --- quit: ayrnieu (Remote closed the connection) 10:59:07 --- quit: proteusguy (Success) 10:59:09 --- quit: chandler (Connection reset by peer) 10:59:10 --- join: hefner (~hefner@pool-151-196-19-248.balt.east.verizon.net) joined #forth 11:00:47 --- join: ayrnieu (julian@65.169.246.30) joined #forth 11:04:04 SET! 11:04:33 1C, 2B, 4A 11:04:46 :p 11:04:53 neat 11:05:07 but this is a bit harder, or at least unusual, compared to the images version 11:05:20 yeah, it's way harder for me to find sets 11:06:27 --- quit: warpzero (orwell.freenode.net irc.freenode.net) 11:06:42 SET! 11:06:58 2A, 2B, 4C 11:09:12 --- join: warpzero (~warpzero@dsl.142.mt.onewest.net) joined #forth 11:12:10 --- nick: chandler_ -> chandler 11:49:48 --- join: Downer (~Pen@host213-122-29-243.in-addr.btopenworld.com) joined #forth 12:09:26 --- join: Mark4 (~Mark4@64.47.44.254) joined #forth 12:10:22 --- nick: Mark4 -> I440r 12:10:35 --- mode: ChanServ set +o I440r 12:22:38 --- quit: Downer ("brb") 12:23:52 --- quit: I440r ("Leaving") 12:40:24 --- nick: _proteus -> proteusguy 12:48:56 --- quit: rO| (Read error: 60 (Operation timed out)) 13:08:46 --- quit: SDO (Read error: 104 (Connection reset by peer)) 13:39:20 SET! 13:39:34 1A, 1B, 2C 14:04:10 --- quit: networm ("Client exiting") 14:27:54 haha 14:28:18 / 1 2 3 4 14:28:18 A 3232 3112 1211 2311 14:28:18 B 1332 1122 2131 3312 14:28:18 C 1331 1113 3231 3311 14:28:21 :p 14:28:38 i'm still working on the code to find the sets, being distracted so its not going fast ;) 14:29:48 what does CELLS do again? appearantly i mixed it up with CELL so the outcome wasnt quite what i expected :p 14:30:09 CELLS doesnt do anything visual for winforth 14:30:16 (and is code..) 14:44:19 --- quit: proteusguy (Read error: 113 (No route to host)) 14:44:21 --- join: proteusguy (~proteusgu@workstations.pinnaclesports.com) joined #forth 14:57:27 --- join: chandler_ (~chandler@64-145-60-36.client.dsl.net) joined #forth 14:59:33 --- quit: chandler (Nick collision from services.) 14:59:40 --- nick: chandler_ -> chandler 14:59:50 --- join: kc5tja (~kc5tja@66-91-231-74.san.rr.com) joined #forth 14:59:57 --- quit: kc5tja (Client Quit) 15:00:03 --- join: kc5tja (~kc5tja@66-91-231-74.san.rr.com) joined #forth 15:00:27 --- mode: ChanServ set +o kc5tja 15:03:12 --- join: skylan (~sjh@vickesh01-4960.tbaytel.net) joined #forth 15:08:49 --- quit: proteusguy (Read error: 113 (No route to host)) 15:09:48 --- join: proteusguy (~proteusgu@workstations.pinnaclesports.com) joined #forth 15:16:02 qFox: : CELL 4 ; : CELLS CELL * ; 15:16:18 CELL is the number of bytes in a stack item 15:16:27 so on palm pilot, CELL is 2 15:16:53 yes but appearantly its the behaviour of CELLS to not put anythign on the stack if there isnt anything on it in the first place 15:16:59 no error either 15:17:02 (in winforth) 15:17:25 does winforth usually give you an error for stack underflow? 15:17:34 normally yes 15:17:37 not for CELLS 15:17:43 weird 15:17:59 .s empty ok 15:17:59 cells ok 15:17:59 .s empty ok 15:18:01 CELLS should not add a stack item. 15:18:12 replace it 15:18:14 sorry 15:18:48 sounds like a bug. probably some optomization in CELLS does not check stack depth because it does not change the stack depth 15:19:34 maybe, it confused me 15:41:46 3B 3C 1C 15:46:59 --- join: matt_ (1000@adsl-64-160-166-15.dsl.snfc21.pacbell.net) joined #forth 15:47:05 --- nick: matt_ -> Sonarman 15:54:03 Maybe CELLS in winforth is defined as : CELLS DEPTH IF CELL * THEN ; 15:54:08 so as to prevent stack underflow. 15:54:16 I don't know winforth, so I don't know. 15:54:25 But that being said, I now have to cruise -- time to go to work. >:( 15:54:28 yea probably 15:54:39 see cells 15:54:39 CELLS IS CODE 15:54:39 401540 8D1C9D00000000 lea ebx, 0 ( "400000" : 0xFFBFFFFC ) 15:54:39 [ebx*4] 15:55:40 --- quit: kc5tja ("THX QSO ES 73 DE KC5TJA/6 CL ES QRT AR SK") 16:24:27 --- join: blockhead (default@dialin-224-tnt.nyc.bestweb.net) joined #forth 16:31:39 --- quit: proteusguy (Read error: 54 (Connection reset by peer)) 16:32:10 --- join: proteusguy (~proteusgu@workstations.pinnaclesports.com) joined #forth 16:41:21 --- join: Sonarman_ (1000@adsl-67-113-234-164.dsl.snfc21.pacbell.net) joined #forth 16:41:45 --- quit: Sonarman (Nick collision from services.) 16:41:47 --- nick: Sonarman_ -> Sonarman 16:42:29 20:47 < ASau> I don't know anyone who likes FCBs. 16:42:29 20:48 < I440r> ugh no 16:42:29 20:48 < I440r> fcb's are horrible 16:42:29 20:48 < ASau> kc5tja. NO! 16:42:29 20:48 < ASau> kc5tja. DOS 2.0 has file handles API. 16:42:32 20:48 <@kc5tja> ASau: SO DOES CP/M 86! 16:42:38 what are FCBs? 16:43:12 never mind, sorry 16:51:18 fcbs? ... oh: file control blocks. Dang. That brings back memories of my old z80 CP/M system, :D 16:52:39 :) 16:53:49 * blockhead learned about fbcs when I was typoing in a program for file undeletion. 16:55:51 --- join: imaginator (~George@georgeps.dsl.xmission.com) joined #forth 17:11:05 http://www.1112.net/lastpage.html 17:13:59 Hi Forth'ers 17:14:52 hi 17:15:39 hi 17:19:08 'nn all 17:19:14 --- quit: blockhead ("Client Exiting") 17:21:27 * imaginator was outside playing, after reaching the "Last Page" 17:23:03 --- join: tathi (~josh@pcp02123722pcs.milfrd01.pa.comcast.net) joined #forth 17:45:12 ok someone please clear up my confusion. if a word expects 3 parameters, 1 2 and 3 to be on the stack, and 1 should be the TOS, whats the proper stack description? 17:46:38 is it ( 1 2 3 -- ) or ( 3 2 1 -- ) 17:47:12 ( 3 2 1 -- ) 17:47:22 and for output? when 1 is tos? 17:47:46 i mean result, return, whatever.. 17:48:41 ( -- 3 2 1 ) ? 17:50:13 yes 17:50:18 oki :) 17:57:14 --- quit: proteusguy (Read error: 113 (No route to host)) 17:58:12 --- join: proteusguy (~proteusgu@workstations.pinnaclesports.com) joined #forth 18:00:48 --- quit: proteusguy (Read error: 54 (Connection reset by peer)) 18:02:15 --- join: proteusguy (~proteusgu@workstations.pinnaclesports.com) joined #forth 18:04:29 --- quit: proteusguy (Connection reset by peer) 18:04:51 hi all 18:05:33 --- join: proteusguy (~proteusgu@workstations.pinnaclesports.com) joined #forth 18:06:14 hi slava 18:09:16 hello slava 18:11:56 --- join: I440r (~mark4@64.3.99.130.ptr.us.xo.net) joined #forth 18:13:37 --- quit: proteusguy (Read error: 113 (No route to host)) 18:14:01 --- join: proteusguy (~proteusgu@workstations.pinnaclesports.com) joined #forth 18:14:37 --- quit: tathi ("leaving") 18:20:25 can i safely do a loop in a loop without screwing up? 18:20:40 10 0 do 10 0 do 10 0 do loop loop loop 18:21:04 and is the counter in each loop still i ? or... 18:21:22 and... how do you get the i from the other loops? :p 18:24:44 ok you can 18:24:58 and you get the i by putting it on the stack before entering the next loop? :) 18:25:06 --- join: ayrnieu_ (julian@65.169.246.30) joined #forth 18:25:24 --- quit: ayrnieu (Remote closed the connection) 18:27:57 qFox: you can nest loops 18:28:01 i is from the innermost loop 18:28:20 some forths have J wich is lik I but from the next loop out. 18:28:32 some forths have K which is the third loop out etc... 18:28:36 k 18:30:46 is there any forth where you can write something like : some-word << hello world >> execute ; 18:30:50 if you can, you're probably better of factoring more, so you don't have to use J or K 18:30:54 and have << ... >> push an XT of the code inside those 18:31:11 Herkamire, how do you pick good names for factors? 18:31:31 factoring? 18:31:33 I just try to think of something that makes sense 18:31:47 oh breaking up code thing? 18:31:51 if it really doesn't do anything helpful except help you implement xxx, then I usually name it -xxx 18:32:40 i use xxx* for a more lower-level form of xxx that possibly takes additional parameters 18:32:56 and sometimes [xxx] (i know this has diff. meaning in forth) 18:33:07 [xxx] for custom control strucutres that help impl. of word xxx 18:33:48 this is for checking for a match, which is the straightforward approach imo. 3 loops for each card... 1 2 3, 1 2 4, 1 2 5, etc 18:33:57 checking for a set, i should say 18:34:34 qFox: you mean checking if there is a set anywhere on the board? 18:34:37 yes 18:34:49 basicly just check each card combination 18:35:15 right 18:35:23 you're storing a card in one cell right? 18:35:24 it probably wont be very fast, but it wont have to be done very often so thats ok 18:35:26 yep 18:35:43 i hope i can safely asume that a cell is 4 bytes? 18:35:46 on most systems..? 18:36:10 on desktops and laptops 18:36:14 not on PDA 18:36:25 i can live with that :p 18:37:59 i'll just have three loops, one for each card positition, and check for all equal or odd 18:38:36 continue with next loop if neither are encountered, at the end of checking, make sure all 4 properties are equal/odd 18:38:41 and do some output 18:39:21 although you dont need to check at the end since you'll continue if neither were encountered so... 18:39:47 why three loops? 18:39:52 three cards 18:39:53 I only see why you'd want/need two 18:40:24 oh, you're right 18:40:28 12 cards, 3 cards per check, 1 2 3, 1 2 4, 1 2 5 ... 1 3 4 18:40:46 although i'm positive there's a entirely different approach to this problem 18:40:54 faster/easier/shorter one 18:41:05 what are you going to do if there's no match? 18:41:11 but optimization comes later :p 18:41:38 well the odds on that are very small, but if soo, display a message about the rarity and shuffle and deal again 18:42:27 0.1% 18:42:44 hm 18:42:47 is it 12 or 15 cards? 18:43:09 ohj 18:43:15 right 18:43:38 so if after 12 cards no set was made, you deal another 3 cards, and if even THEN no set is made, ... 18:43:43 well sod that, i'll do that later :p 18:43:55 for now, if there's no set at 12 cards i'll deal again 18:47:46 hm 18:47:49 i just realized 18:48:07 that i could do things a bit easier, by just referencing the cards on the table by their number 18:48:30 rather then actually copying the properties to the array that contains "cards on the table" 18:48:44 just card x from the deck 18:49:15 and a variable that holds how many cards have been taken from the deck so far (so starting at 12, incrementing every time one card is taken... etc) 18:56:19 --- quit: Sonarman (Read error: 60 (Operation timed out)) 19:03:03 interesting 19:03:13 is it possible to have 15 cards with no match? 19:03:17 yes 19:03:19 0.1% 19:03:31 how'd you calculate that? 19:03:33 (according to http://www.reed.edu/~mcphailb/applets/set/ , i havent done the math myself) 19:03:34 :p 19:03:37 i cheat 19:03:57 nah its just probability 19:05:43 cool 19:05:52 #math ;) 19:06:06 those folks can explain it much better then i could 19:06:19 its all in my head, but dont ask me to explain... 19:08:03 --- join: arke (~Chris@wbar8.lax1-4-11-099-104.dsl-verizon.net) joined #forth 19:08:23 hi 19:08:25 :) 19:09:18 hiya 19:11:53 --- join: Sonarman (1000@adsl-67-113-234-67.dsl.snfc21.pacbell.net) joined #forth 19:12:08 hi matt 19:12:18 hi chris 19:12:38 :) 19:12:41 (: 19:13:02 69 19:13:20 ok, lets go 19:16:29 Herkamire> can i manipulate the i of the outer loops? 19:20:17 anyone know what SMUDGE does in FIG? 19:20:50 * qFox points at ASau 19:21:23 qFox: you could probably build your own looping constructs 19:21:23 i would have asked him if he were here :) 19:21:26 sonarman - the same thing it does in other forths? temporarily bastardizes the new colon-definition so that you can refer to previously defined colon-definitions of the same name. 19:22:21 ah, thanks ayrnieu. how long does it remain "bastardized"; in other words, how do you get to the new colon definition? 19:22:51 Well the word ; unsmudges the last colon definition 19:23:04 ok, thanks 19:24:56 fractal - I think that you should have said 'legitimizes' rather than 'unsmudges' 19:26:06 What is the theory behind how Moore's latest Forth works? 19:26:19 IIRC in the video I watched he said that ; was like a return. 19:26:36 Er well ya whatever the word is in the forth you're using. Personally I don't see any reason for the whole smudging myself... If you do absolutely need to use a previously defined word, there are ways around it 19:27:03 : myword' myword ; : myword ... myword' ... ; 19:27:05 and so on 19:28:02 imaginator - Moore's colon-definitions live in a contiguous word-space of N named entry points and M exit points. 19:28:47 imaginator - I prefer it =) since it makes it natural to produce 'safe' and 'raw' versions of words. 19:29:22 : safe-/ dup 0= if freak-out-and-die ; then : / (/) ; 19:29:47 oh, I see. 19:30:35 : hello-world s" world" : hello-you ." Hello, " type [char] ! emit CR ; 19:30:54 s" imaginator" hello-you 19:31:40 That's wild. :) 19:32:45 eh????? 19:32:47 ??? 19:32:47 ?? 19:34:04 ayrnieu_, is there a ; missing in hello-world? 19:34:16 madgarden - no. 19:34:34 well... where is hello-you defined? 19:34:40 madgarden: he said: "contiguous word-space of N named entry points and M exit points." 19:34:57 Ohh... 19:34:59 madgarden - right after I define hello-world -- please read back a bit to get the context 19:35:19 So it's like a weird multiple entry-points thing going on. 19:35:28 chaining word definitions 19:35:42 in Color Forth my : there would have a different color, so you wouldn't have to worry about whether I meant to compile a call to it into the hello-world or to call it interactively or whatnot. 19:35:52 Right. 19:35:55 Neato. 19:36:39 * arke doesn't get it 19:37:04 arke, hello-world executes "hello-world" followed by "hello-you". 19:37:13 hello-you just executes "hello-you' 19:37:24 They both share a ; 19:37:35 two : definitions, one ; between them. 19:38:10 looking only at that, yes, you see two entry points -- the first supplying a default argument. 19:39:58 --- quit: proteusguy (Read error: 54 (Connection reset by peer)) 19:40:06 --- join: _proteus (~proteusgu@workstations.pinnaclesports.com) joined #forth 19:40:36 eh... 19:41:09 so something like : set-base base : ! (!) ; 19:41:14 (lame example) 19:44:23 --- quit: ayrnieu_ ("Changing server") 19:44:26 --- join: ayrnieu (julian@65.169.246.30) joined #forth 19:44:40 eh... 19:44:40 so something like : set-base base : ! (!) ; 19:44:41 (lame example) 19:45:03 I've often thought that using some syntax like this might make Forth code more intuitive: 19:45:07 foo :bar 19:45:07 10 :constant: fred 19:45:07 variable: bob 19:45:23 how does this work? 19:45:54 The colon indicates where the arguments are coming from (if they exist). 19:46:13 :bar takes the argument that comes before. 19:46:32 :constant: takes argument before and after (parsing a token) 19:46:45 variable: only parses. 19:46:54 parsing words really add a whole new dimension to forth 19:47:03 Yes, and they can make the code confusing. 19:47:16 I think, at least, all parsing words should have a colon appended to them. 19:47:25 10 constant: foo 19:47:33 This would appeal to many non Forthers I think. 19:47:47 It's obvious that the text that follows is associated with constant: 19:47:49 yeah, I think parsing words make forth way cooler, and more confusing 19:47:57 my forth doesn't have parsing words. it's more like colorforth 19:48:27 RPN is easy to learn and understand. It's the random mixing of RPN and parsing that messes people up. 19:48:31 I also like the multiple entry points thing, but unfortunately, it doesn't work on PPC 19:48:46 Herkamire: why? 19:48:49 madgarden: yeah, people regularly come in here confused about parsing words 19:48:55 imaginator: PPC does not have a CALL instruction 19:49:26 That multiple entry points is a cool idea. I've made note of that for later. :) 19:49:26 i don't have parsing words 19:49:26 Why can't you just jmp to some memory? 19:49:39 * imaginator is probably going to port some assembly code to PPC, so ... 19:50:04 I guess I don't see why you would need a call. 19:50:16 imaginator: you can jump, but you (in most cases) need to push the return stack when you enter a word 19:50:21 : for single token parsing, and " ..." or ( ...) for non-whitespaced strings. 19:51:05 on a PPC native forth you put branch to the begining of a definition. At the begining of definitions you compile some instruction to push the return stack 19:51:15 i had a syntax idea 19:51:17 I think that Forth is held back by its ancient "syntax". The old standards damn it somewhat. It could use a makeover in that respect. 19:51:19 : { >r ; 19:51:21 : } r> ; 19:51:46 the syntax is fine, but parsing words can be confusing. 19:51:54 madgarden: I get the impression that Moore thinks the same. 19:52:00 Yep. 19:52:03 slava: that's part of the syntax 19:52:09 me too 19:52:17 colorforth doesn't have parsing words right? 19:52:21 I use { and } for vocabulary stuff sometimes. 19:52:27 or most of the things I dislike about ans forth 19:52:31 everybody seems to have their own concept of how to improve forth, hence we have n implementations in #forth alone 19:52:42 namespace blah 19:52:43 blah{ ... } 19:52:57 madgarden, how does that work? 19:53:00 (yes, blah has a { appended to the name when created) 19:53:10 Well, it's just a vocabulary stack. 19:53:14 blah{ pushes a dynamic extent scope that is popped when } appears? 19:53:15 interesting 19:53:21 blah{ pushes the vocab, } pops it. 19:53:26 So I can do stuff like this: 19:53:27 i have something very similar! 19:53:55 foo bar math{ + * } 19:54:12 And you'd also define "methods" for a vocabulary this way... 19:54:17 namespace math 19:54:17 @bits-and-pieces 19:54:27 math{ 19:54:27 : + ... ; 19:54:27 : * ... ; 19:54:27 } 19:54:36 $bits-and-pieces [ "value of x is " print $x print ] bind 19:54:46 "value of global x is " print $x print 19:54:57 yours allows word definitions in the namespace? 19:55:02 I don't do anything with namespaces at this point. I just do prefixes 19:55:05 i have 2 different namespaces 19:55:09 1 global for words 19:55:09 Yea. That's standard Forth, really. 19:55:19 and arbitrary many ones for variables 19:55:21 My namespaces are dead simple. 19:55:42 the word namespace is really just symbols; a symbol is an internalized name, that maybe holds a pointer to a word definition. 19:56:19 madgarden, do you implement OO in this way? 19:56:22 Each word entry has a field for which vocabulary it belongs to. When searching the dictionary using the vocabulary stack, this field is matched to selected vocabs. 19:56:26 madgarden, where each instance has its own namespace? 19:56:39 slava, sure it could be used that way. 19:56:47 how would the code look? 19:56:53 You'd have to pass around a "this" 19:57:00 an XT? 19:57:03 for a blah{ word? 19:57:29 I mean, if it was to be used as OO methods. They'd need something to operate on, an object... an XT or address, etc. 19:58:20 I've been thinking of something like: Object obj obj : incr 1 + . obj set 'var' 123 19:58:30 Objects data would be seperate from the methods... like modules. 19:58:32 So, obj would have a builtin : compile symbol. 19:59:04 imaginator, you'd be tying data and words together in an object? 19:59:09 yes 19:59:53 Each object would have a field pointing to a seperate dictionary then, for method lookup? 19:59:57 The idea behind my OO design is that having an object is almost like having a separate namespace within the global. 20:00:09 Right. 20:00:24 --- quit: _proteus (No route to host) 20:00:37 I haven't decided whether to use a separate dictionary or just concat methods and variables to the object name. 20:00:56 That's basically what I was getting at with my namespace. Such namespaces made immediate. 20:01:30 Do the methods need to be tied to the data? Seems to be more complicated than is necessary. 20:04:19 Maybe it is more complicated. 20:04:56 The object would have to access its own dictionary at compile time as well. 20:05:29 So, all objects would have to have compile time and runtime semantics. 20:05:35 It would be costly. This is part of why I haven't done it yet. 20:05:37 (I think, if I understand you correctly) 20:06:25 Well, code is inlined usually, and it's all relocatable, so it would probably be compile time. 20:07:08 Maybe I'm not seeing the runtime specific semantics this would impose. 20:08:35 Fun, my mom is editing grades over the Internet, and the dialogs popup "Javascript error ... Would you like to debug?" She says yes, because she wants the bugs gone. 20:08:48 Hehe. 20:09:43 Oooh... 20:09:51 Tell me what this syntax means: 20:09:54 foo. bar. 20:09:54 10 constant: fred 20:09:54 variable: bob 10 baz bar. 20:11:22 invoke foo, invoke bar, define fred as a constant of 10, define a variable bob that contains 10 baz and invokes bar. ? 20:11:42 Not quite. 20:11:48 constand and variable behave normally. 20:11:56 constant 20:12:06 : indicates parsing ahead... constant: fred 20:12:17 . indicates a word with no return values. foo. 20:12:37 So, the flow of the data through the program is rather obvious. 20:12:43 Compare... 20:12:46 foo. bar. 10 constant: fred variable: bob 10 baz bar. 20:12:54 foo bar 10 constant fred variable bob 10 baz bar 20:13:21 --- quit: qFox ("if at first you dont succeed, quit again") 20:14:17 If Forth "words" are supposed to make readable "sentences" then this kind of syntax makes them more sentence-like. 20:14:39 In my Forth variables are used via set and get. 20:15:01 10 'a' set 20 'b' set 20:15:02 So get and set instead of @ and ! 20:15:14 10 a ! 20 b ! 20:15:17 What's the difference? 20:15:23 then: 'a' get emit.char (prints 10) 20:15:42 Well, my get and set expect a string on the stack. 20:15:43 a @ emit.char 20:15:45 change : to begin-colon-definition :) 20:15:56 slave, how about word: 20:16:11 imaginator, ahh Ok. So hash-tabled variables, like Lua? 20:16:36 yes, but eventually they will use a 4-bit association engine which my machine code prototype uses. 20:16:41 That's more like a trie from what I've been told. 20:16:56 trie? 20:16:59 Then set.pointer and get.pointer will be used for building structures. 20:17:08 any MIPS people here? 20:17:17 Men In Pink Suits? 20:17:27 no :) 20:17:29 MIPS 20:17:30 :P 20:17:36 the absolutely sweetest processor ever 20:17:41 madgarden: http://www.xmission.com/~georgeps/var/trie_playground.c 20:17:44 Not I. 20:18:27 imaginator, want to give me a quite overview? 20:18:46 It uses the values of the chars as paths. 20:18:49 Rather than hashing. 20:18:58 No collisions can occur, and it's faster than a b-tree. 20:19:07 quick=quite. I am all typoey tonight. 20:19:16 What if two strings are the same? 20:19:24 Then they map to the same node. 20:19:29 struct trie_s *ar[16]; 20:19:29 int val; 20:19:29 } Trie; 20:19:51 16 is pow(2,4) 20:20:03 So, say we have the string ABC 20:21:05 A = 65 we take the lower bits by doing 'A' & 15 20:21:19 That gives us 1 20:21:36 So, we use ar['A' & 15] and change our node pointer to match. 20:21:55 Ahh. 20:21:57 Oh, and we also allocate another node if it points to NULL 20:22:27 The higher bits we get with ar['A' >> 4'] and then do the same. 20:22:50 It ends up making a map through the memory pointers to the very end, and then we fill in val (which in my latest is a void *). 20:23:12 Interesting. 20:23:34 I might have to play with that. 20:23:45 :) 20:24:40 My first implementation I called a "Pig structure" because the pointer array for each node was 256 or pow(2,8) (for 8 bits). 20:24:47 Heh. 20:25:09 With the 4-bit version more nodes are shared, and fewer overall pointers are created. 20:25:36 I'd maybe even mess with a 2-bit version. 20:25:41 The cost is a little more computing for ar['A' & 15] and ar['A' >> 4] vs. ar['A'] 20:27:39 2 bits is closer to what some people do with tries. 20:27:48 I wonder how this compares overall to a standard hash table. 20:28:08 * madgarden is not too knowledgable in the data structures stuff. 20:28:10 Well, with hashing you may never have a perfect hash (at least not with good speed). 20:28:24 So, collisions occur, and then you must allocate ->next nodes. 20:28:34 or store in near bucket. 20:28:46 Right. Hmm. 20:28:52 How about memory usage? 20:28:57 trie seems a bit more hefty. 20:29:17 Ficl and Tcl both have algorithms that analyze their hash tables and recreated if it would improve performance (collided buckets). 20:29:35 Well, it uses more memory, but I don't mind :) 20:30:10 How much more though? I'd like to see a graph or something. :P 20:30:47 It depends on the number of values stored/associated. 20:31:44 --- join: proteusguy (~proteusgu@workstations.pinnaclesports.com) joined #forth 20:32:56 And whether more paths are reused. 20:33:07 68 bytes for a system with 4 byte pointers would be used per node. 20:33:15 408 bytes for "ABC" and then another 68 for the root. 20:33:27 A MB is pow(2,20 = 1048576 20:34:44 So around how many entries would that be? 20:35:40 entries? 20:37:26 keys 20:38:03 "ABC" is 6 path nodes. In a hash table it would be one key. 20:38:50 Well what do you call the "ABC" bit then? :) 20:39:06 The string? 20:39:27 So how many strings (guesstimate) would fit into your 1M. 20:39:43 It would be 1 string. 20:39:55 1MB for 1 string? 20:39:56 oh, I don't know how many would fit in 1M 20:40:06 Oh. 20:40:10 no, 476 for that "ABC" string. 20:40:29 But some strings may follow the same path as the A or B or C. 20:40:42 Right. 20:41:06 * imaginator wonders how he could accurately measure the number that would fit in 1 MB 20:41:09 So if you wanted to get the most bang for your buck, you'd use variables like AAA, AAB, AAC, etc. :P 20:41:24 yes 20:41:37 and making them all upper/lower case would help too. 20:41:47 I'd probably do a random string generation test. 20:42:07 Well, when/if you do I'd like to see the result :) 20:42:16 Multiple passes, see how many each pass takes to fill up 1M of memory, then average the results out. 20:42:38 Heh, it's your damn trie! ;P 20:42:46 I like the idea though, if it's not too bloaty. 20:43:13 ;P 20:43:15 Like say, 250K for 1000 strings wouldn't be too shabby. 20:43:31 So what did you think of my super duper Forth syntax idea? Seems so obvious to me. 20:44:19 Well, I mostly work with LISP-like languages and C, so Forth is somewhat foreign to me even though I'm building my own. It isn't so obvious to me. 20:44:54 But a programmer can learn to use almost anything. 20:44:59 :) 20:45:01 Yep. 20:45:19 Forth just lacks context in its code. That's the main problem I see. 20:45:42 context ? 20:45:43 That's why I have set and get instead of @ fetch and ! for store. 20:45:46 If a word isn't well described, then the program can be hard to decipher. 20:46:08 @ and ! are perfect 20:46:13 Well yea, that's an example, though at least @ and ! are quickly learned, unlike new word definitions. 20:46:36 I440r: %%#*##&**#!@ 20:46:45 ;P 20:46:45 I440r, did you see my syntax ponderings earlier? 20:47:40 I can read ! and @, but I like set and get. I also understand the view that "If you use them often, you will remember." 20:58:44 er no 20:58:50 i was sorta elsewhere lol 20:59:20 OK, I'm gone, but take a peek real quick: 20:59:24 ( Simple but descriptive syntax for parsing words and no stack-result words ) 20:59:25 foo. bar. 20:59:25 10 constant: fred 20:59:25 variable: bob 10 baz bar. 21:01:28 I440r: best processor in the world, in your opinion? 21:01:37 hmmm 21:01:39 8051 21:01:40 :) 21:01:46 ack :) 21:01:50 try again 21:04:24 hmmm 21:04:30 nope 21:04:32 8051 21:04:34 definatly :) 21:05:30 naaaaaaah 21:05:31 not even close 21:05:34 MIPS my friend :) 21:11:50 --- nick: hefner -> hefzzz 21:17:35 --- quit: proteusguy (orwell.freenode.net irc.freenode.net) 21:17:35 --- quit: ayrnieu (orwell.freenode.net irc.freenode.net) 21:17:35 --- quit: warpzero (orwell.freenode.net irc.freenode.net) 21:17:35 --- quit: ChanServ (orwell.freenode.net irc.freenode.net) 21:17:35 --- quit: arke (orwell.freenode.net irc.freenode.net) 21:17:35 --- quit: chandler (orwell.freenode.net irc.freenode.net) 21:17:35 --- quit: l0C0 (orwell.freenode.net irc.freenode.net) 21:18:06 --- join: hovil (~hovil@CommSecureAustPtyLtd.sb1.optus.net.au) joined #forth 21:18:32 --- join: ChanServ (ChanServ@services.) joined #forth 21:18:32 --- join: proteusguy (~proteusgu@workstations.pinnaclesports.com) joined #forth 21:18:32 --- join: ayrnieu (julian@65.169.246.30) joined #forth 21:18:32 --- join: arke (~Chris@wbar8.lax1-4-11-099-104.dsl-verizon.net) joined #forth 21:18:32 --- join: chandler (~chandler@chandler.registered.freenode) joined #forth 21:18:32 --- join: warpzero (~warpzero@dsl.142.mt.onewest.net) joined #forth 21:18:32 --- join: l0C0 (loco@bor.gs) joined #forth 21:18:32 --- mode: irc.freenode.net set +o ChanServ 21:31:22 --- join: ASau (~asau@158.250.48.196) joined #forth 21:31:30 Dobroe utro! 21:38:10 dobryjj vecher 21:50:02 --- quit: arke ("Leaving") 21:56:38 --- join: Serg (Serg_Pengu@212.34.52.140) joined #forth 22:01:56 Privet, Serg 22:02:07 hi 22:02:25 Kak dela? 22:03:01 i bought a CD of MP3 proggies to convert my files into lower bitrate for player... 22:03:08 none did it well, dhamn ! 22:03:30 Hm. 22:03:35 so i had to dig for my old CD-R backup and find Winamp w/ MP3-write plugin ;)) 22:03:40 There should exist free ones. 22:03:58 Maybe, sox. 22:03:59 it did, perfectly ! 22:04:19 so now i have all the Scorpions in my 128M NEXX-3 player ;)) 22:04:32 32kB/s 22:05:07 yesterday i rised from dead my inet gateway at work 22:05:35 NAT? 22:05:37 it does gatind ;)) but Mdaemon glitches slightly 22:06:01 no, WinGate+Mdaemon+Sygate personal firewall 22:06:11 OK. 22:06:25 Fine. 22:06:42 No, I think GPRS is not needed. 22:06:52 Now,.. 22:06:53 * Serg will like OpenBSD more, but it has to provide networked HASP key 22:07:12 GPRS + dialup at home, XDSL at work ;) 22:07:27 Ah... 22:08:23 A ja sobralsja v aspiranturu. 22:08:33 damn XP does not cope w/ my Siemens M50, saying 'DTR low' 22:08:42 and 'CTR low' 22:09:05 hardware hackers say i need to short some pins in COM port connector 22:09:35 Maybe you've low power? 22:09:44 That's strange. 22:10:04 ASau: education sucks at this time in this cuntry ;((( did it help many losers w/ 'engineers' diplomes ? 22:10:17 I'm not engineer. 22:11:27 And organic chemistry research is payed good enough. 22:11:48 'business' (at margin of crime) rules, EDU sucks by our nowdays life 22:12:43 It depends on your will. 22:13:19 If you want risky life, you go to "business." 22:13:57 If you want another life, you go another way. 22:14:04 i gonna go "middle way" like buddhists say : 22:14:32 invest in being "tuff" and "agile", but... 22:14:56 --- join: kc5tja (~kc5tja@66-91-231-74.san.rr.com) joined #forth 22:15:06 --- mode: ChanServ set +o kc5tja 22:15:23 not rip tons of bucks and go to far, restrict self to middle-class income level ;)) 22:15:50 I don't think you succede. 22:16:08 Try. 22:17:08 ASau: Thank you very much for the information on PL/I. It was very educational. 22:17:59 Hi kc5tja 22:18:11 * kc5tja has decided to use Oberon as the basis of the Kestrel's alternative programming language instead of Forth. The implementation difficulties for the two appear to be about the same, and a lot more people who are familiar with home computing are more familiar with Pascal than with PL/I or PL/M. 22:18:41 imaginator: Hello. 22:18:43 There's an educational dialect, so called XPL. 22:18:55 It was published in book. 22:19:06 Sorry, I can't recall authors. 22:19:16 kc5tja: does Oberon have interactive compilation? How dynamic of a language is it compared to Forth? 22:19:35 imaginator, it's classic compiled p.l. 22:19:36 ASau: Yeah, I haven't researched that yet. But Oberon isn't too hard to implement. It and PL/M have *very* similar overall structure, so considering how similar the two are, I had to go with Oberon. 22:20:17 imaginator: Oberon, the language, is like C in that compilation is not interactive. However, its modularity provides vastly more interactivity during development than C does. 22:20:31 But it still doesn't compare with Forth for interactivity. 22:21:33 I'm calling my Oberon dialect Charon though, which gives me the flexibility to evolve the language independently of Oberon proper. 22:23:07 --- quit: Sonarman ("bye") 22:25:11 kc5tja, try looking at Algol-68. 22:25:57 It is more "prefix". 22:26:27 You know type before you create variable. 22:26:51 When reading left to right and not looking ahead. 22:27:32 Of course, it's huge enough, but you don't need everything. 22:27:49 Well, same thing in Oberon; variables must be declared before used. 22:28:00 No. 22:28:44 I mean this: [1:10] INT A 22:29:06 Ahh, so that would define an array then? 22:29:07 vs.: array(1..10) of int. 22:29:12 * kc5tja sees. 22:29:42 Although, I'd look rather silly resurrecting Algol for this computer. 22:29:44 :) 22:29:53 And Algol-68 is more close to Forth nature. 22:29:55 PL/* is awkward enough for most people, it seems. :) 22:30:30 Well, remember this alternative language environment is for people who are not interested or who actively eschew Forth (as a few gave ample hints towards me about). 22:30:36 Every BEGIN ... END has (may have) return value. 22:32:20 Then why not BASIC? 22:34:39 BASIC will be offered as well. However, BASIC is interpreted. 22:34:46 It offers no means of producing compiled applications. 22:35:22 kc5tja, BASIC is FORTRAN in main part. 22:35:45 Yes, I know this. 22:35:46 You can eliminate parts which require interpreting. 22:36:06 And you'll get FORTRANoid p.l. 22:36:10 Compiled. 22:37:05 I'd rather offer a "real" programming language than stick with compiled BASIC though. 22:37:57 Compiled BASIC still needs its run-time environment to be carried along too, as BASIC is garbage collected. 22:38:24 Make it more FORTRAN. 22:38:30 Use static allocation. 22:39:01 But, I don't see why garbage collection. 22:39:26 I can't recall one existed. 22:40:23 I recall only "Out of memory" error message. 22:40:39 * imaginator doesn't remember BASIC being garbage collected 22:40:56 Arrays are allocated explicitly and freed the same way. 22:41:11 * imaginator remembers accidental loop (memory exceeded) lockup 22:41:36 Strings are allocated implicitly but they can't be longer than 256 bytes. 22:42:27 BASIC is very garbage collected. 22:42:55 You've never had a BASIC system just halt dead while running some compute-intensive application (especially one that involved strings), to pick up later again a few seconds later? 22:43:50 * kc5tja has observed this behavior with TRS-80 BASIC and Commodore 64 BASIC. Commodore 128 had a vastly superior garbage collector (it was actually concurrent!), so it never really halted the system. 22:44:38 Also, BASIC wouldn't be BASIC if it were more Fortran and more static. 22:44:49 The whole point of BASIC was to move away from Fortran's static declarations. 22:57:41 --- quit: Herkamire ("Good work. Sleep well. I'll most likely kill you in the morning.") 22:59:49 I don't think you need GC. 23:00:02 Memory allocation is just semi-automatic. 23:00:45 You create variables on request, but never free memory till special request. 23:04:37 ASau: Variable space is never freed; only compacted. 23:04:44 And only when it runs out of space. 23:05:03 Once a variable instance is created, it's there forever. 23:05:08 (until you enter NEW) 23:05:27 This is, at the least, the behavior of C64 BASIC and C128 BASIC. 23:05:32 So, suppose I have: 23:05:38 A$="Hello" 23:05:48 That creates a new variable descriptor and string containing Hello. 23:06:13 Then, if I say, A$=A$+" World!", it will create a *new* A$ descriptor in memory, leaving the original present in memory. 23:06:33 But becase the latter A$ is more recent, any reference to A$ will result in the "Hello World!" string, not the original. 23:07:31 till it run out of mem ? 23:07:38 When garbage collection occurs, variables with the same name are compacted over by memmove()ing (basically) the most recent portions of the descriptor data over the old data. 23:07:58 Since this is an O(n^2) way of doing things, it can take up to several minutes on machines like the Commodore 64. 23:08:21 Serg: Generally, yes, it will *completely* exhaust memory before invoking the compactor. 23:09:00 heh, why not just allocate N bytes for every string var and not fsck brains ? 23:09:08 or implement ring buffer 23:09:08 Commodore 128 BASIC is a notable exception: it was widely hailed as a major advancement in 8-bit BASICs because it had a concurrent compactor(!!). It compacted one variable evern couple of VSYNC interrupts. 23:09:25 Serg: Because it's not right. 23:09:51 Serg: If I set A$="Serg", and later on I find that A$ suddenly contains "Foo" without my changing it explicitly, well, that can have major repercussions. 23:10:09 we waste ram, if we gone to end we circle to beginning.... 23:10:23 Serg: That's not correct behavior. 23:10:30 And is highly undesirable. 23:10:39 It's what MachineForth does. 23:10:41 if we run into var still used, we 'compact' it 23:10:51 imaginator: No it isn't. 23:10:54 The registers wrap around. 23:11:14 imaginator: The *REGISTERS* wrap around (and even then, *ONLY* on the P21 and P18 series CPUs). 23:11:27 imaginator: Strings are not registers, and registers are not string variables. 23:11:39 see, let's '.' is waste var, and 'u' is good var: 23:11:51 ...u...u....u..n 23:11:54 :) ok 23:12:11 at N, we need to insert but we hit end of ram, so we do: 23:12:15 But the concept applies to all data types, not just strings. 23:12:25 N..u...u....u... 23:13:12 next, let's say we need to allocate _really_long string of 5 dots, but we have only 2 be4 next used var, see ? 23:13:22 so ve compact _one_ used var: 23:13:35 Nu.....u....u... 23:13:50 voila, we made room for new long string ! 23:14:19 NuNNNNNu....u... 23:14:21 got idea ? 23:15:09 and no garbage collection ;)) 23:16:17 http://www.kuro5hin.org/story/2004/3/17/93442/8657 23:16:21 What are you talking about, no garbage collection? 23:16:27 What do you think garbage collection *IS*? 23:16:32 That is just incremental compaction! 23:17:06 however, I do like it; it's much faster than what the Commodore 64 used. 23:17:25 But to say it's not garbage collection would be lying. 23:18:24 kc5tja: heh, do you like my algorithm ? 23:18:58 Serg, how do you suggest to fight against fragmentation? 23:19:18 as i shown - defrag on demand 23:19:29 Well. 23:19:40 if not enough room to place next var, defrag to make room 23:19:48 Compaction is easier than reallocation. 23:19:59 ? 23:20:33 To allocate memory you only increase heap pointer. 23:21:25 can't wait to get home 23:21:28 When you reallocate memory, you need find free memory range and mark it. 23:21:43 the monitor for my a2000 arrived today 23:23:33 Wikibooks is dedicated to developing and disseminating free, open content textbooks and other classroom texts. 23:23:43 If only educational institutions would take them up on that. 23:30:06 --- quit: Serg () 23:55:24 Sorry, was helping out with household chores 23:59:59 --- log: ended forth/04.03.22