00:00:00 --- log: started forth/13.03.13 00:00:00 --- quit: epicmonkey (Ping timeout: 258 seconds) 00:01:19 DocPlatypus: since there's live people here, may i ask you some forth impl relevant question ? 00:01:28 sure 00:01:34 yunfan: Puzzle out, not read. :) 00:02:41 my question is , i heard that COMPILER just find the WORD from the dictionary one by one? 00:03:20 if it is so, is there any morden optimation for this looking action? 00:03:51 for me , what i could thought directly is to set a hash table as the cache 00:04:21 or set a LRU cache for the word looking , just like l1cache in cpu 00:05:17 that's over my level 00:05:19 I've never tried to write my own Forth 00:05:48 i am tring to understand the whole things and then just like you write my own one 00:05:49 --- quit: Nisstyre-laptop (Quit: Leaving) 00:06:45 yunfan: There's not enough words in a typical dictionary for there being any percentage in using a hash table or the like. 00:06:52 You COMPILE words once. 00:06:58 When running you don't use the dictionary. 00:08:38 ttmrichter: ok got it. then that's why we should insist using global static reference in forth? 00:10:24 I'm not sure what you mean here, but if it's what I think, then yes. Could you expand? 00:11:18 i just saw the concept in retro's document 00:11:36 show you a example, 00:16:36 ttmrichter: http://codepad.org/EFmwvnJ2 check this snippet 00:17:23 ttmrichter: the guess word would hold the reference of the first `get-age` word 00:19:53 oh , the term is "Hyperstatic Global Environment" in crc's document for retroforth 00:22:51 Ah. I see what you mean. 00:22:55 hey. 00:23:12 As in although you've "redefined" the get-age word, the guess word is still using the old definition? 00:23:22 That's a feature, not a bug. :D 00:23:30 Indeed the (in)famous three-line module system relies on this. 00:23:51 module system? 00:24:08 A Modula-* style module system for Forth. 00:24:18 huh. haven't encountered that one yet. 00:24:20 ttmrichter: then is it in forth standards? 00:24:23 Written in three lines of ... I think it was FIGForth. 00:25:21 yunfan: try this: http://codepad.org/duPvve2c 00:25:45 tangentstorm: 00:25:46 that might not actually work. i didn't check the docs but i *think* it works 00:25:47 : INTERNAL ( --> ADDR) CURRENT @ @ ; 00:25:48 : EXTERNAL ( --> ADDR) HERE ; 00:25:48 : MODULE ( ADDR1 ADDR2 --> ) PFA LFA ! ; 00:26:05 A full, nestable Modula-style module system for Forth. 00:26:27 It would take some modification for modern Forths, but it's still doable and still in three lines. 00:26:27 tangentstorm: tring that 00:27:16 what did pfa and lfa do? 00:27:36 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 00:27:45 I honestly don't recall any longer. :( 00:27:49 It's been too many years. 00:28:49 Basically the technique involves making the dictionary jump over the internal part. 00:28:57 tangentstorm: tried that in gforth, would got error at the 7 line 00:29:01 So "INTERNAL" stores the current place in the dictionary. 00:29:19 EXTERNAL stores the next bit. 00:29:32 link field address maybe 00:29:47 MODULE rethreads the dictionary to jump over the words defined in the INTERNAL ←→ EXTERNAL zone. 00:29:51 And yes, that rings a bell. 00:29:55 yunfan: that's retro. gforth has a way to do it too 00:30:06 Ah, here it is. 00:30:20 how does current @ @... oh stores it on the stack. 00:30:58 then i got how they impl class 00:31:06 i think the vocabularies form a linked list, which makes sense. 00:31:10 LFA points to the next word down in the dictionary. 00:31:26 cfa = code, lfa = link, pfa = parameter then 00:31:30 it only need to store the class's begin offset in the dictionary and the end 00:31:58 Something like that, yes. 00:32:37 yunfan: in retro, each definition begins with two no-ops. this is enough room to put the instructions: JUMP 00:32:37 so you could make a word which could leave two offset in the stack , one is start, another is end, 00:32:47 Code Field Address, Link Field Address and ... Parameter sounds wrong. 00:32:54 I'm not sure about the PFA right now. 00:33:20 it was a guess, since it's a parameter being passed to the code 00:33:49 usually the CFA points to something like "run this assembly instruction" or "interpret these compiled forth words" or "put constant data on stack"... 00:33:59 Yes. CFA is that. 00:34:08 So for a compound word, it points to the interpreter loop. 00:34:09 tangentstorm: so it could be changed in runtime by replacing the first 2 no-ops to JUMP ? 00:34:16 For an integral word it points inside its own space. 00:34:40 yunfan: yes, exactly. it's called revectoring. other forths support this too. 00:35:35 i've heard the argument/parameter address called the data field address, too though, so maybe there's another thing i don't know about 00:36:28 tangentstorm: what's the overhead of a clasical nagro vm? 00:37:29 i think if redis could accept lua inside, why not why forth, after all, its really a sensitive of size and ram usage in redis 00:39:15 not sure what you mean, yunfan 00:40:06 oh i see what you're asking 00:40:20 tangentstorm: redis is the most popular key-value store in web domain 00:40:35 --- quit: dto (Remote host closed the connection) 00:41:12 tangentstorm: at the beginning, they just make commands in c directly like `get` `set` `incr` `append` 00:41:13 retro is very small. it only has 32 core operations, plus a small core library in the devices 00:42:01 tangentstorm: but as it become popular, people keep on move more and more logic on it, so they need to support more and more needs on manipulating the data item 00:42:23 tangentstorm: then they decide to make lua inside, you know lua? 00:42:33 i know lua, yes 00:43:24 now redis's user could write lua code and store it in some code fields in redis, and the next time they could call a cmds EVAL to got the results 00:43:54 those lua code could access other data store in redis by the api from redis system 00:44:29 in my opinion, lua vm's own overhead is too big than some compination of simple cmds 00:44:59 so i am considering using forht instead of lua for redis 00:45:19 huh. that's an odd choice especially when the system already supports everything you need for a forth. 00:45:48 looking at http://redis.io/commands ... it almost looks like an assembly language for data... 00:46:51 tangentstorm: yes, but when people need a new cmds like : first got key1; and then got key2; compare them, store the bigger one to key3; return key3; 00:47:08 tangentstorm: you cant just make a cmds to fits the needs like the above case 00:47:33 so they import lua as a solution 00:48:11 the same things happend in nginx 00:48:41 they need more flexiale for the configuare at the beggining 00:48:44 well. in a way i can understand that, since a lot more people use lua than forth... But it's a lot of overhead when they already support lists and simple tokenization and command processing. 00:49:10 and then they need to do some simple but frequencely things in the configure file, so they import lua 00:49:27 huh. 00:50:09 tangentstorm: yes, lots of people use lua than forth, but you dont need people know the code if they just use cmd EVAL 00:51:05 just like add a new cmd to the system, but not written in c, and if you write forth code forth them, its like to updating firmware for the redis server, none of the user's buseness :] 00:51:09 I think this is a smart idea. 00:51:23 your idea, i mean. 00:51:31 tangentstorm: i have wrote a article in my blog about this 00:51:32 of switching to forth. 00:51:41 where's your blog? 00:51:50 tangentstorm: by that i call the server as a ADT server 00:51:57 tangentstorm: its in chinese :[ 00:53:06 tangentstorm: would written it in english this weekend, and see if i could add extra thoughts 00:53:22 ttmrichter: shouldn't it be : MODULE ( ADDR1 ADDR2 --> ) PFA ! LFA ! ; ? 00:53:32 oh 00:55:45 tangentstorm: and i think we could use forth in nginx too :] 00:56:15 never used nginx 00:56:39 the last company i work, which use lua in nginx for check session job for each incomming http request 00:57:38 its a simple and frequencely job, so this job's overhead is much lower than to run the lua vm itself 01:00:38 Huh. I've always run apache (used to run a web hosting company)... nginx looks neat too. 01:00:45 I guess I'm behind the times. :) 01:01:27 ," he said, in a #forth channel on IRC.... :) 01:01:32 tangentstorm: Not that I know of, no. 01:01:44 It's been a while since I read the article, though. I may have mistyped. 01:01:46 so pfa must consume an address 01:02:04 * ttmrichter needs to find a FIG-Forth implementation source somewhere. 01:03:15 there are a bunch in pdf 01:03:21 on the fig forth site 01:03:33 yep 01:03:48 the stands pdf file's page number scared me 01:04:19 the stands? 01:04:22 Ah, yes. I'll grab the PDP-11 one. 01:04:59 the standard description document, dpans94? 01:05:13 * ttmrichter spits at dpans94... 01:05:15 ;) 01:05:18 oh 01:05:52 * tangentstorm was picturing stephen king's 'the stand' which is even longer, but more fun to read. 01:07:01 i think what yunfan just described with people adding stuff to redis is exactly what happened to forth 01:07:06 is there a short version of those standards? 01:08:08 i haven't found one. the older standards are much more compact. 01:10:43 err, then how poeple claim their own forth is FIG-FORTH compatible? do there really readed the whole standards' document? 01:11:10 fig is really really old 01:11:36 it goes: chuck moore -> few other people -> fig -> forth 79 -> forth 83 -> ans 01:11:36 i saw the new standards draft 01:11:46 seems like fig211? 01:12:45 http://www.forth200x.org/forth200x.html 01:12:57 yes that it 01:13:28 isnt ansi forth's pdf another gaint document? 01:14:41 IIRC, my favourite Forth was either '79 or '83. 01:14:45 Probably '79. 01:14:47 But not sure. 01:14:59 ANSI "Forth" is ... ugh. 01:15:06 To me it kind of misses the point of Forth. 01:16:27 dpans94 is ansi forth ... right? 01:16:33 so which guys are using ansi forth nowadays? 01:16:37 yes 01:16:51 yeah, i think fig forth is relatively small 01:17:04 i mean.. it was being used on systems with 4k of ram. 01:17:34 and maybe a 360K floppy disk or something ;) 01:18:37 nowaday, i still would try forth on suck limitation, if i dont care waste of MB ram, i might choose lisp familly or other morden scripting language 01:19:52 Random story: I was thinking about what size to make a storage blocks to waste as few resources as possible. 01:20:48 like depending on the size of your record, you might not be able to fit an integer number of records in the storage space 01:20:54 it could be efficient in mobile app development 01:20:57 so there'd always be blocks left over. 01:21:03 er bytes left over. 01:21:07 which is still size sensitive 01:21:12 --- join: epicmonkey (~epicmonke@host-224-60.dataart.net) joined #forth 01:21:35 so i was thinking... what if you made the container size use a lot of different prime factors 01:21:41 like get all the small prime numbers. 01:21:56 2 3 5 7 11 13, etc.. 01:22:22 or just all the small numbers in general... 01:22:31 then? 01:22:51 well because then the container would be more likely to divide evenly into your record size. 01:23:27 turns out some of the early number systems were base 12 or base 60 01:23:39 like 12 hours in the day, 60 minutes in an hour 01:23:46 360 degrees in a circle. 01:23:52 tangentstorm: a new rehashing solution! 01:23:53 360 k on a floppy drive. 01:24:19 12 can divide evenly into 1 2 3 4 6 01:24:26 add 5, and you get 60 01:24:43 if i were you , i would try the fibonacci way 01:24:51 360 divides evenly into every number < 12 except 7 and 11 01:24:54 tangentstorm: Fibonacci numbers are a better choice for that. 01:25:15 ttmrichter: we though on the same point :] 01:25:25 Indeed we did. 01:25:28 Must be right, then. :D 01:26:21 i'm not seeing the fibonacci connection yet... i just thought it was interesting that all the old floppy disks follow this pattern, instead of using a power of 2 01:26:50 Fibonacci numbers are one of the most efficient partitioning schemes for memory managers. 01:26:56 because this solution require not state keep 01:27:16 even though the actual locations on disk would surely be addressed with binary addressing. 01:27:24 * ttmrichter hunts down the reference. 01:27:34 if you use fibonacci or your prime solution, this require they to hold the previouse states 01:28:56 or its just a common way they heard from their leader, who heard from his own leader , ... :[ 01:29:55 Ah! Found it! 01:30:01 LFA: Link Field Address 01:30:07 CFA: Cold Field Address 01:30:12 NFA: Name Field Address 01:30:19 cold? no way. code, surely. 01:30:23 PFA: Parameter Field Address 01:30:30 Code. Yes. My fingers are cold. 01:30:31 :P 01:30:32 haha 01:33:49 NFA might caught misunderstanding if you talk with CS graduate 01:35:49 the whole thing causes confusion for me 01:35:56 caused anyway. 01:36:50 the address is the value in the field. 01:37:32 i think in modern usage outside of forth, if you talk about a field address it would be like a pointer to the field on some object or something. 01:40:09 That's what these mean too, tangentstorm. 01:40:17 CFA is "Address of Code Field". 01:40:19 Etcs. 01:40:45 is the iTV corporation that chunk used work for come from apple? 01:41:16 haha i don't think so ;) 01:42:18 ttmrichter: i mean in forth, the dictionary entry is a record with four addresses pointing to where the fields are, elsewhere in ram 01:43:10 Ah, yes. 01:43:21 whereas in c++ you might create a class with these four members., and if you took the address of the field it would be a pointer into the class, pointing to these pointers 01:44:12 Like in c you have & as the "address of" operator... or @ in pascal 01:44:50 so that had left me a little mystified for a while. 01:45:36 but i guess future programmers coming from java and ruby and python won't have that problem... they'll just have to learn what an address is :) 01:46:40 well i come from python :] 01:47:28 but dont worry about that, if people comes to forth from python, i think they have already knew c and other low level things 01:48:48 * tangentstorm wrote some python yesterday... 01:48:57 actually i used python as my main language since 1.52 up until i started getting back into forth, but i thought this was kind of cool: 01:49:05 https://gist.github.com/tangentstorm/5140789 01:50:03 there's a guy who hangs out in #retro who's making a new stack language called saiwa that combines elements of forth and joy and array programming languages like apl/j/k 01:50:09 i live on python :] 01:50:18 what do you think of my code there, then? :) 01:50:45 will check 01:51:16 but i prefer list comprehension style code which are not accept by #python 01:52:28 I don't hang out in #python much. But I'm not a big fan of pep-8 in general. 01:52:52 anyway, i'd better get back to work here. 01:52:56 --- nick: tangentstorm -> tangentwork 01:54:40 well i try my best to keep balance between pep8 and my persional fancy 02:36:09 --- join: djinni_ (~djinni@li125-242.members.linode.com) joined #forth 02:36:32 --- quit: djinni (*.net *.split) 02:45:28 --- join: newcup (newcup@peruna.fi) joined #forth 03:07:03 --- quit: epicmonkey (Ping timeout: 258 seconds) 03:20:10 --- join: epicmonkey (~epicmonke@host-224-58.dataart.net) joined #forth 06:29:27 --- join: Fox78 (~fox@124.193.192.43) joined #forth 06:35:23 --- quit: Fox78 (Quit: 暂离) 06:41:03 --- join: chen_ (~chen@112.91.181.22) joined #forth 07:03:08 --- quit: chen_ (Read error: Connection reset by peer) 07:08:30 --- join: chen_ (~chen@112.91.181.22) joined #forth 07:54:25 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 08:14:24 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 08:24:02 --- join: Tod-Work (~thansmann@50-202-143-210-static.hfc.comcastbusiness.net) joined #forth 08:26:55 --- quit: dto (Remote host closed the connection) 08:31:46 --- quit: chen_ (Quit: 离开) 09:04:35 --- quit: epicmonkey (Ping timeout: 260 seconds) 09:39:54 --- quit: kumul (Ping timeout: 264 seconds) 09:53:15 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 11:11:16 --- nick: tangentwork -> tangentstorm 11:15:23 --- quit: DocPlatypus (Quit: Leaving) 11:33:54 --- quit: kumul (Ping timeout: 264 seconds) 11:36:33 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 11:40:09 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 11:56:20 --- quit: kulp (Ping timeout: 255 seconds) 11:58:05 --- quit: dto (Remote host closed the connection) 12:01:17 --- join: Onionnion (~ryan@adsl-68-254-161-22.dsl.milwwi.ameritech.net) joined #forth 12:08:17 --- join: kulp (~kulp@unaffiliated/kulp) joined #forth 12:10:25 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 12:13:05 --- quit: dto (Remote host closed the connection) 12:16:55 --- quit: kulp (Ping timeout: 264 seconds) 12:17:11 --- join: DocPlatypus (~skquinn@98.195.26.149) joined #forth 12:19:25 --- join: epicmonkey (~epicmonke@188.134.41.112) joined #forth 12:19:56 --- join: kulp (~kulp@unaffiliated/kulp) joined #forth 12:27:18 --- join: _spt_ (~steven@host-92-12-216-48.as43234.net) joined #forth 12:27:18 --- quit: _spt_ (Changing host) 12:27:18 --- join: _spt_ (~steven@unaffiliated/-spt-/x-5624824) joined #forth 12:31:17 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 12:38:30 --- join: nighty^ (~nighty@static-68-179-124-161.ptr.terago.net) joined #forth 13:03:48 --- join: impomatic (~digital_w@87.115.125.6) joined #forth 14:10:24 --- join: JDat (JDat@89.248.91.5) joined #forth 14:15:50 --- quit: Nisstyre (Ping timeout: 255 seconds) 14:29:50 --- join: Nisstyre (~yours@oftn/member/Nisstyre) joined #forth 14:36:26 --- quit: dto (Remote host closed the connection) 14:58:37 --- quit: kumul (Quit: Leaving) 15:00:45 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 15:36:34 --- quit: JDat (Quit: schlafen!) 15:37:58 --- quit: epicmonkey (Ping timeout: 258 seconds) 15:46:13 --- join: kumool (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 15:47:56 --- quit: kumul (Ping timeout: 260 seconds) 15:48:24 --- quit: _spt_ (Ping timeout: 252 seconds) 15:49:02 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 15:52:08 --- quit: kumool (Ping timeout: 272 seconds) 15:56:13 --- quit: Tod-Work (Quit: Leaving) 16:01:15 --- join: ncv (~quassel@unaffiliated/neceve) joined #forth 16:19:25 --- quit: nighty^ (Remote host closed the connection) 16:24:20 --- quit: Onionnion (Quit: Leaving) 16:50:40 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 16:52:30 --- join: mark4 (~mark4@1.sub-70-195-66.myvzw.com) joined #forth 16:52:30 --- mode: ChanServ set +o mark4 17:00:54 --- quit: ncv (Remote host closed the connection) 17:27:46 --- quit: kumul (Ping timeout: 272 seconds) 17:36:07 --- join: nighty^ (~nighty@static-68-179-124-161.ptr.terago.net) joined #forth 17:38:31 --- quit: nighty^ (Excess Flood) 17:39:11 --- join: nighty^ (~nighty@static-68-179-124-161.ptr.terago.net) joined #forth 17:46:42 --- quit: dto (Remote host closed the connection) 18:52:57 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 18:53:02 --- quit: cataska (Ping timeout: 255 seconds) 19:00:33 --- join: kumool (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 19:03:24 --- quit: kumul (Ping timeout: 272 seconds) 19:05:32 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 19:08:28 --- quit: kumool (Ping timeout: 272 seconds) 19:29:49 --- quit: nighty^ (Remote host closed the connection) 19:39:50 --- join: RodgerTheGreat (~rodger@71-13-215-142.dhcp.mrqt.mi.charter.com) joined #forth 20:07:53 damn, google wants to shutdown GR 20:07:55 --- join: cataska (~user@210.64.6.233) joined #forth 20:08:08 GR? 20:19:24 --- join: Onionnion (~ryan@adsl-68-254-161-22.dsl.milwwi.ameritech.net) joined #forth 20:28:30 --- quit: Onionnion (Quit: Leaving) 21:07:42 ttmrichter: google reader 21:08:22 --- join: kumool (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 21:11:20 --- quit: kumul (Ping timeout: 272 seconds) 21:13:16 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 21:16:24 --- quit: kumool (Ping timeout: 272 seconds) 21:17:47 --- quit: mark4 (Ping timeout: 252 seconds) 21:20:53 --- join: dto (~user@pool-96-252-62-13.bstnma.fios.verizon.net) joined #forth 21:27:15 --- quit: dto (Remote host closed the connection) 21:27:48 --- quit: kumul (Ping timeout: 272 seconds) 21:35:13 --- join: kumul (~mool@c-76-26-237-95.hsd1.fl.comcast.net) joined #forth 21:36:06 --- quit: kumul (Client Quit) 21:52:17 --- quit: RodgerTheGreat (Quit: RodgerTheGreat) 22:07:51 --- join: mark4 (~mark4@1.sub-70-195-66.myvzw.com) joined #forth 22:07:51 --- mode: ChanServ set +o mark4 23:06:43 weak! 23:06:57 i'd better get my bookmarks out of there 23:30:57 tangentstorm: the excape user get the alternative service newsblur down :[ 23:32:38 i should revive linkwatcher.com 23:32:51 it was the first blog aggregator before there even were feeds 23:33:22 i just planning to roll my own 23:34:01 in forth, probably? :) 23:34:33 nope, i might trying clojure which would save my time 23:34:46 cool 23:35:02 i have developing same service for my ex-company using python 23:35:24 that made me angry with the current rss standards 23:35:39 there's so many unstandard impl 23:35:56 atom is a lot nicer 23:39:45 yep but so many ugly impl, the most ugly is they dont have a rule on date format! 23:41:03 huh 23:41:47 tangentstorm: do you like the former share button in GR? 23:41:48 hi all 23:41:58 hi backer 23:42:16 yunfan: i used it once or twice i guess. i haven't used gr in a while 23:42:19 hey tangentstorm 23:42:55 oop 23:59:02 --- quit: mark4 (Remote host closed the connection) 23:59:59 --- log: ended forth/13.03.13