00:00:00 --- log: started forth/16.12.06 00:35:26 --- quit: mnemnion (Remote host closed the connection) 01:12:11 --- join: John[Lisbeth] (~user@2601:601:8f01:a6a0:5c5:6f8b:9dc7:f2c6) joined #forth 01:26:06 --- quit: John[Lisbeth] (Remote host closed the connection) 01:30:27 --- join: John[Lisbeth] (~user@2601:601:8f01:a6a0:5c5:6f8b:9dc7:f2c6) joined #forth 03:20:18 --- quit: clog (^C) 03:20:18 --- log: stopped forth/16.12.06 03:20:29 --- log: started forth/16.12.06 03:20:29 --- join: clog (~nef@bespin.org) joined #forth 03:20:29 --- topic: 'Forth Programming | logged by clog at http://bit.ly/91toWN | http://forthworks.com/forth/standards/DPANS/ | www.greenarraychips.com' 03:20:29 --- topic: set by crc!uid2647@gateway/web/irccloud.com/x-gafmfbjdyglmxbls on [Sun Nov 13 16:58:08 2016] 03:20:29 --- names: list (clog true-grue proteus-guy pdewacht karswell` groovy2shoes fiddlerwoaroof DKordic pointfree M-jimt cantstanya APic bluekelp_ mark4 DocPlatypus backer DGASAU impomatic_ Quozl` dzho Keshl zy]x[yz rpcope reepca djinni nerfur dys jeremyheiler ovf X-Scale phadthai dograt carc nighty- Vendan newcup ggherdov`__ koisoke _longines segher ids1024 irsol +crc taij33n eldre yunfan rprimus diginet2 gordonjcp npr) 04:02:30 --- join: nighty (~nighty@s229123.ppp.asahi-net.or.jp) joined #forth 04:22:05 --- join: ricky_ricardo (~rickyrica@2601:240:4203:ecb0:35d8:9d26:248e:c1b9) joined #forth 06:38:22 --- quit: groovy2shoes (Ping timeout: 256 seconds) 07:06:20 --- join: rgrinberg (~rgrinberg@24-246-56-85.cable.teksavvy.com) joined #forth 07:25:38 --- join: [X-Scale] (~ARM@48.53.158.5.rev.vodafone.pt) joined #forth 07:26:51 --- quit: X-Scale (Ping timeout: 248 seconds) 07:26:57 --- nick: [X-Scale] -> X-Scale 07:46:51 --- quit: ggherdov`__ () 07:48:08 --- join: ggherdov`__ (sid11402@gateway/web/irccloud.com/x-qxavxridoxtolvgu) joined #forth 08:12:23 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:e954:7a1b:30d0:a2bf) joined #forth 09:23:25 --- join: proteusguy (~proteus-g@84.202.6.241) joined #forth 09:23:25 --- mode: ChanServ set +v proteusguy 09:30:03 --- quit: mnemnion (Remote host closed the connection) 09:52:49 --- join: mnemnion (~mnemnion@104.6.70.118) joined #forth 09:57:05 --- quit: mnemnion (Ping timeout: 245 seconds) 10:01:25 --- join: mnemnion (~mnemnion@104.6.70.118) joined #forth 10:02:11 --- join: workp (~workp@host-92-25-126-252.as13285.net) joined #forth 10:09:52 Anybody know any decent tutorials on vocabulary usage? It seems like most of the texts out there reference them (or talk about their implementation), but don't actually coverage usage. 10:10:29 I'm making my way through "Threaded Interpreted Languages" and they just briefly covered it. 10:10:39 the Jupiter Ace manual has a pretty good section on it 10:11:46 --- join: Zarutian (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 10:14:17 Found it. Thanks! http://maben.homeip.net/static/S100/jupiter/software/Jupiter%20Ace%204000%20Forth%20Programming.pdf 11:34:42 --- quit: rgrinberg (Remote host closed the connection) 11:35:23 --- quit: APic (Ping timeout: 248 seconds) 11:36:44 --- join: APic (apic@apic.name) joined #forth 12:06:10 ricky_ricardo, vocabularies are not really rocket surgery 12:06:38 writing an assembler for arm? vocabulary arm arm definitions 12:07:08 create new vocabulary called arm. add arm to context, make all new definitions go into arm 12:07:08 : the-assembler lots of code here ; 12:07:16 @mark4 Couldn't seem to pull out that much out of the info I was finding. 12:07:36 yea documentation is either totally lacking or totally confusing 12:07:58 the purpose of a vocabular is to create what other languages call a name space 12:08:12 They were all explaining the underlying implementation, which was good, but I think the docs I was finding came from a time when more people were using FORTH 12:08:52 Eg: They explained CONTEXT, what it was, how it worked, etc, but they seemed to assume the reader already knew how to access / use the vocabularies. 12:08:58 if you have 5 different assemblers you can have them all resident at the same time. one in each voc vocabulary arm vocabulary 8051 vocabulary avr vocabulary mips 12:09:09 now yoy can add and remove them from context at will 12:09:55 context is just a list of vocabularies that will be searched at compile time. thers an order to them so top of context is searched first 12:10:03 --- quit: DocPlatypus (Ping timeout: 248 seconds) 12:10:04 this is important where for example 12:10:26 you have the forth word 'and' and an assembler word 'and' 12:11:35 there is a vocabulary called root which contains all the vocabulary manipulation words 12:11:51 it has a word called "only" this word removes every single vocabulary from context except root 12:12:19 root is also where vocabularies themselves are created so when you say vocabulary foo a new word called foo is compiled into the root vocabylary 12:12:30 to add a voc to context just invoke its name 12:12:43 only forth <--- context is now forth and top and root next 12:13:04 only forth also foo this takes some explaining, my forth does not have the word also 12:13:45 so. only removed everything from context except root. forth added itself to top of context also duplicated top of context so now you have 12:13:47 forth 12:13:48 forth 12:13:49 root 12:14:04 foo then added itself to top of context REPLACING top of context 12:14:09 my forths dont work that way 12:14:15 so now you have 12:14:16 foo 12:14:17 forth 12:14:18 root 12:15:08 only forth also foo definitions <--- definitions makes top of context "current" 12:15:21 the current vocabulary is the one that all new definitions go into 12:16:25 --- join: ASau (~user@netbsd/developers/asau) joined #forth 12:17:34 Oh, neat. Always interesting to see that most of the "problems" I thought FORTH had were already solved. 12:18:04 I was wondering how it could be possible to create a large application with only one dictionary namespace. This makes sense, especially "only" 12:18:32 theres also "previous" which simplhy drops the top of context 12:18:33 dont do 12:18:36 only previous 12:18:37 lol 12:19:16 --- join: DocPlatypus (~skquinn@c-73-6-60-72.hsd1.tx.comcast.net) joined #forth 12:19:24 when you type "blah [enter]" forth searches each vocabluary thats in context for a word called blah 12:19:34 if its in more than one vocabulary it stops on the first one it finds 12:20:03 --- join: impomatic (~impomatic@host81-136-106-55.range81-136.btcentralplus.com) joined #forth 12:20:12 --- quit: impomatic_ (Ping timeout: 268 seconds) 12:20:26 in my forths are is no also word. when i say only forth compiler foobar i get 12:20:27 foobar 12:20:29 compiler 12:20:31 forth 12:20:58 if i then say forth again in a normal forht it would be forth compiler forth. mine works different 12:21:01 forth 12:21:03 foobar 12:21:05 compiler 12:21:12 i.e. forth got rotated out to top of context 12:21:46 sometimes tho, you want to be able to add a vocabulary to context and later remove it but if it was already there you dont want to remove that one too 12:22:10 you might have a module load that messes with context but you want it to leave context exactly how it was when it was loaded 12:22:49 normal forths allow the same voc to be in context more than once, mine dont. so if this module adds foo, bar and bam to context it can then remove foo bar and bam from context when its done 12:23:00 if any of those were already in context when its done they still will be 12:23:25 my forths do something slightly more complex but less cluster fsck to my mind 12:23:29 i can create a new context 12:23:35 context: my-coontext 12:23:41 my-context 12:23:57 my context is now THE context and is a copy of the one it replaced 12:24:07 i can now do only forth foo bar bam 12:24:18 and im not messing with the previous context stack 12:24:25 when im done i just discard my context stack 12:24:49 i have a stack of context stacks called contexts 12:25:01 but thats MY forths, not anyone elses 13:14:00 --- join: rgrinberg (~rgrinberg@24-246-56-85.cable.teksavvy.com) joined #forth 13:45:43 mark4: are vocabularies traditionally threaded together by a vocabulary stack? 13:51:49 ok well 13:52:21 ok ill explain the INSIDE details of how a vocabulary works. Ill be describing how mine are internally but I think its how all/most are 13:52:31 a vocabulary first of all is just a word like any other 13:52:55 but its an array. the array is of N cells where N is a power of 2. 8/16/32/64 etc 13:52:59 mine are all 64 cells 13:53:24 theres an extra 65th cell at the end which is a link to the previously defined vocabulary 13:53:38 the purpose of the other 64 ill explain below 13:54:30 but each voc is voc1[64 cells][null] voc2[64 cells] [&voc1] voc3[64 cells][&voc2] 13:54:58 now. when voc1 is in context and you do :foo 10 0 do lots of stuff here loop ; 13:56:14 "foo" is the name of the word you are defining. forth compues a hash for "foo" and ands it with (in my case) 63 00011111 if my memory serves me correctly 13:56:24 the result of that is an index into the vocabulary 13:56:38 when FOO is created it is linked to THAT thread of the vocabulary 13:56:57 to do this, the word header for foo is created. each word header has 13:57:04 1: a pointer to the previous word in the thread 13:57:20 2: a name field (including count byte with lex bits for immediate/alias etc) 13:57:32 3: a pointer to the code associated with this word 13:58:31 so. to link "foo" into the thread. hash foo, read the cell within the voc at that index. compile THAT as the new word headers LFA (link field address). compile the new words NFA (name field address) and then compile the current dictionary pointer address as the words CFA pointer. 13:59:07 now all the new code you lay down at "here" will be pointed to by the new header 13:59:24 find also uses the hash 13:59:28 when you do 10 foo 13:59:41 foo is parsed in and passed to find so it can search context 14:00:06 foo is hashed and that hash value is used to select ONE thread of each vocabulary to be searched. the SAME thread for each voc 14:00:28 if you have 400000 words in a vocabulary and they are all chained on the same thread you have a long thread to walk to find your word 14:00:54 by hasing and selecting one of 64 threads those 400000 words can be searched much faster 14:01:16 the thread selection elimninates a HUGE portion of that vocabularies definitions from the search 14:01:40 seems complexificated but really its all very simple, so simple even I can understand it lol 14:02:33 does my explanation help? 14:03:03 you CAN simplify each vocabluar to [one cell thread][one cell link to previous vocab] 14:03:18 and not do hashed searches at all 14:03:32 the purpose of hashing is to speed up compiation, it does nothign to run time 14:03:52 with one thread it might take 10 seconds to compile something that would compile in .0001 of a ssecond otherwise 14:03:55 meh. 15:06:27 --- quit: true-grue (Read error: Connection reset by peer) 16:05:15 --- quit: dys (Ping timeout: 260 seconds) 16:09:47 --- quit: nighty (Quit: Disappears in a puff of smoke) 16:22:52 --- quit: workp (Ping timeout: 258 seconds) 16:24:36 --- join: workp (~workp@host-92-25-126-252.as13285.net) joined #forth 16:30:55 --- quit: workp (Ping timeout: 258 seconds) 16:39:27 --- quit: Zarutian (Read error: Connection reset by peer) 16:40:11 --- join: Zarutian (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 16:40:38 --- join: Zarutian_ (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 16:40:39 --- quit: Zarutian (Read error: Connection reset by peer) 16:40:39 --- nick: Zarutian_ -> Zarutian 16:40:59 --- quit: DocPlatypus (Ping timeout: 248 seconds) 17:29:51 --- join: DocPlatypus (~skquinn@c-73-6-60-72.hsd1.tx.comcast.net) joined #forth 17:29:52 --- quit: DocPlatypus (Max SendQ exceeded) 17:35:00 --- join: DocPlatypus (~skquinn@c-73-6-60-72.hsd1.tx.comcast.net) joined #forth 17:37:05 --- join: neceve (~ncv@unaffiliated/neceve) joined #forth 17:39:46 --- join: nighty (~nighty@d246113.ppp.asahi-net.or.jp) joined #forth 17:42:16 --- join: nal (~nal@adsl-72-50-86-40.prtc.net) joined #forth 17:58:22 --- quit: mnemnion (Remote host closed the connection) 18:22:32 --- join: mnemnion (~mnemnion@71.198.73.193) joined #forth 18:24:17 --- quit: ricky_ricardo (Remote host closed the connection) 18:27:16 --- quit: mnemnion (Ping timeout: 256 seconds) 18:28:59 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:e453:7b1:13eb:283d) joined #forth 18:35:42 --- join: saml_ (~saml@cpe-24-102-97-97.nyc.res.rr.com) joined #forth 19:04:58 --- quit: Zarutian (Quit: Zarutian) 19:11:07 --- join: ricky_ricardo (~rickyrica@2601:240:4203:ecb0:35d8:9d26:248e:c1b9) joined #forth 19:33:43 --- quit: mnemnion (Remote host closed the connection) 19:48:24 --- quit: rgrinberg (Remote host closed the connection) 20:13:23 --- quit: nal (Quit: WeeChat 1.4) 20:16:07 --- quit: proteusguy (Ping timeout: 246 seconds) 20:33:24 --- quit: ricky_ricardo (Quit: No Ping reply in 180 seconds.) 20:34:10 --- join: mnemnion (~mnemnion@71.198.73.193) joined #forth 20:34:46 --- join: ricky_ricardo (~rickyrica@2601:240:4203:ecb0:35d8:9d26:248e:c1b9) joined #forth 20:39:46 --- quit: mnemnion (Ping timeout: 260 seconds) 20:40:26 --- quit: saml_ (Quit: Leaving) 20:47:30 --- join: yiimi (~yiimi@unaffiliated/yiimi) joined #forth 20:55:21 --- join: dys (~dys@ip-109-44-3-121.web.vodafone.de) joined #forth 20:59:50 --- quit: yiimi (Quit: leaving) 21:01:01 --- quit: neceve (Quit: Konversation terminated!) 21:06:50 --- quit: karswell` (Ping timeout: 268 seconds) 21:15:47 --- quit: ggherdov`__ (Ping timeout: 260 seconds) 21:15:47 --- quit: carc (Ping timeout: 260 seconds) 21:15:48 --- quit: crc (Ping timeout: 260 seconds) 21:16:42 --- quit: proteus-guy (Ping timeout: 268 seconds) 21:16:44 --- join: ggherdov`___ (sid11402@gateway/web/irccloud.com/x-lcoaohqmmbaxkvci) joined #forth 21:18:00 --- quit: ggherdov`___ (Excess Flood) 21:18:36 --- join: ggherdov`___ (sid11402@gateway/web/irccloud.com/x-sngrvstqlfxxwwhf) joined #forth 21:19:23 --- join: crc (uid2647@gateway/web/irccloud.com/x-lwhiswntxcafcuhp) joined #forth 21:29:15 --- join: proteus-guy (~proteusgu@node-xt9.pool-125-24.dynamic.totbb.net) joined #forth 21:30:42 --- join: malyn (~malyn@54.201.34.233) joined #forth 22:10:37 --- quit: ASau (Read error: Connection reset by peer) 22:13:01 --- join: mnemnion (~mnemnion@71.198.73.193) joined #forth 22:17:37 --- quit: mnemnion (Ping timeout: 250 seconds) 22:29:16 --- join: backer_ (~backer@cowbell.employees.org) joined #forth 22:30:43 --- quit: backer (Ping timeout: 244 seconds) 22:33:24 --- quit: fiddlerwoaroof (Ping timeout: 244 seconds) 22:34:05 --- join: fiddlerwoaroof (~fiddlerwo@unaffiliated/fiddlerwoaroof) joined #forth 22:38:42 --- join: mnemnion (~mnemnion@2601:643:8102:7c95:e453:7b1:13eb:283d) joined #forth 23:59:59 --- log: ended forth/16.12.06