00:00:00 --- log: started forth/15.02.21 00:25:23 --- join: MrMobius (~Joey@c-68-45-16-225.hsd1.nj.comcast.net) joined #forth 00:33:44 --- join: proteusguy__ (~proteusgu@183.89.209.151) joined #forth 00:35:22 --- quit: proteusguy (Ping timeout: 265 seconds) 00:41:46 --- join: xtalmath (~xtalmath@ip-81-11-190-39.dsl.scarlet.be) joined #forth 01:31:54 --- quit: impomatic (Ping timeout: 252 seconds) 01:34:28 --- quit: MrMobius (Ping timeout: 252 seconds) 01:36:07 Anyone ever encountered an AtMel MARC4 stack based 4-bit microcontroller? http://www.atmel.com/Images/doc4747.pdf I didn't know AtMel had such a thing (if it still exists). Has a qForth instruction set. The instruction set chapter is a good list of basic forth primitives for those trying to implement their own forth for the first time. 01:40:33 --- quit: proteusguy__ (Quit: Leaving) 01:40:48 --- join: proteusguy (~proteusgu@183.89.209.151) joined #forth 01:40:48 --- mode: ChanServ set +v proteusguy 01:42:50 --- join: true-grue (~grue@95-27-179-162.broadband.corbina.ru) joined #forth 01:54:20 --- join: MrMobius (~Joey@c-68-45-16-225.hsd1.nj.comcast.net) joined #forth 02:00:17 proteusguy: Nice catch! 02:09:26 --- quit: mnemnion (Remote host closed the connection) 02:10:00 --- join: mnemnion (~mnemnion@c-98-210-219-91.hsd1.ca.comcast.net) joined #forth 02:12:59 http://www.forth.com/starting-forth/sf11/sf11.html I am confused about how this page illustrates the difference between "defining" and "compiling" words, it gives CONSTANT as an example of the first (having both compile and runtime behaviours) and "contrasts" it with ." (also having both compile and runtime behaviours?!?) 02:19:51 What is the runtime behaviour of ." supposed to be? 02:20:36 AFAIK using ." at the interactor will give you behaviour ranging from "do nothing" to "crash the interpreter" depending on the Forth. 02:20:51 (GForth does nothing. Some of the embedded Forths I know will crash hard.) 02:21:59 the page claims "One example is the word .", which at compile time compiles a text string into the dictionary entry with the count in front, and at run time types it." 02:23:43 Eh? Never seen a ." that types the word. 02:23:53 I think they mean to the display 02:23:56 String, I mean. 02:24:02 Oh, wait. 02:24:04 Right. 02:24:05 My bad. 02:24:13 Sorry, brain damage on my part. 02:24:55 np, its just that they try to prepare for a difference between defining and compiling words, but then give examples of each but both examples have compile-time and run-time code... 02:25:04 Try this: 02:25:15 : test 55 constant test2 ; 02:25:45 Tell me what happens. 02:26:51 it says undefined word: test2 02:26:56 Right. 02:27:07 Because constant doesn't have compile-time behaviour, only run-time. 02:27:17 55 constant test2 02:27:19 That works. 02:27:27 yes tried that ok 02:27:37 At run-time it defines a new word (test2) binding it to code that pushes 55 onto the stack. 02:27:45 But at compile time it means nothing. 02:28:16 Whereas ." at run time prints the string and at compile time puts the string and its length onto the stack. 02:28:31 yeah I see, but then this was badly phrased on the page: "Using the defining word CONSTANT as an example, when we say 80 CONSTANT MARGIN we are executing the compile-time behavior of CONSTANT; that is, CONSTANT is compiling a new constant-type dictionary entry called MARGIN and storing the value 80 into its parameter field. But when we say MARGIN we are executing the run-time behavior of CONSTANT; that is, CONSTANT is pushing t 02:28:53 Agreed. 02:28:59 The book is good, but Brodie isn't perfect. :) 02:29:09 so when we say 80 constant margin, we are not really executing compile-time behaviour, but run-time behaviour 02:29:23 and this run-time behaviour compiles a new definition 02:29:52 Right. 02:29:54 ^ this correct? 02:29:56 k 02:30:38 which makes me wonder, how can I define a word that compiles a new word? 02:32:28 i.e. : mystrangewordinstallsnewword : newword tralala ; 02:33:01 That's later on in the book IIRC. 02:33:12 If not, just crack open a Forth and look at the source for : 02:33:44 In GForth you can do: 02:33:45 see : 02:33:55 Which will then make you go: 02:33:59 see (:noname) 02:34:07 Which will then ... you get the point. :) 02:34:55 yeah no clue what header and (:noname) are yet 02:35:53 so for the constant example 02:36:17 its not really compile and runtime, but rather runtime and 'instancetime' code ? 02:36:45 where DOES> indicates the instancetime portion? 02:36:46 That's one of those hazy areas that depends on implementation I think. 02:38:58 its like CONSTANT defines a new word with a static variable 02:39:18 Well, that's what constant acts like. 02:39:33 What it really does is defines a new word that pushes a constant onto the stack in code. 02:40:18 so somewhere in "see constant" I should find how it compiles a new word at runtime 02:41:26 Yes. 02:41:35 In GForth it's just a wrapper around (Constant) , 02:41:41 ttmrichter, yeah I thought you low power guys might be interested in that MARC4. Be excellent for low power crypto rfid or some other wireless app. 02:42:05 proteusguy: Or just a good reference for my FPGA-based Forth processor when (if) I get around to it. :D 02:43:39 ttmrichter, indeed - I had the exact same thought for a stack based machine to initially be implemented in FPGA. 02:43:50 ttmrichter: I was thinking about to what extent L1/L2 cache memory on modern processors are controllable, and if it would make sense to have the dictionary reside in cache memory at all times? 02:44:08 (in the context of forth as the OS) 02:45:25 xtalmath: The L1/L2 cache strategy and control on most chips are so buried beneath NDAs that there's no point in planning for them. 02:45:29 xtalmath, that's certainly a thought many of us have had (holding core forth structures in L1/L2 cache). ultimately it ends up resolving to "let's design a stack based cpu with local cache as an ASIC" or something. :-) it's a compelling idea. 02:45:33 But ... the dictionary in cache isn't much use. 02:45:54 You want the CODE in cache. 02:46:07 Having the pointers and flags and such in cache is a waste. 02:46:31 So you may want to instead just put the code into its own memory pool to keep the cache as purely code as possible. 02:48:15 "own memory pool" means like adjacent/close locations so a DRAM lines are cached when recalled? 02:48:45 yeah, I forgot that there was more than code in the dictionary for a moment 02:49:11 xtalmath: Yeah. 02:49:23 Have the navigation parts of the dictionary in a different memory block. 02:51:41 can BOCHS provide info on simulated cache misses? 02:52:10 No idea, but I doubt it. 02:52:20 As I said, caching strategies and architectures are NDAed to the hilt. 02:52:35 ok 02:54:47 oh, lol, I skipped over how constant creates a new dictionary entry on that page 03:00:29 so normally : mynewword some runtime words CREATE some more runtime words DOES> some instancetime words ; and optional IMMEDIATE to say that the runtime words are in fact compiletime words? 03:01:48 and CREATE enters a new definition? can multiple CREATE and DOES> pairs be used inside a single word definition to define multiple words upon execution? 03:03:55 ok I think im starting to get it 03:26:18 wow that is just crazy, how BEGIN UNTIL/REPEAT and DO LOOP work as mere words like another, only IMMEDIATE 03:27:21 so one never really extends the compiler word : but with IMMEDIATE flags : becomes a modular compiler ... 03:28:57 is it possible to list all words which are marked IMMEDIATE? 03:50:18 --- join: Zarutian (~Adium@168-110-22-46.fiber.hringdu.is) joined #forth 03:53:09 hmm peephole-compile, 03:59:01 sounds naughty 04:00:28 --- quit: Zarutian (Remote host closed the connection) 04:09:31 --- quit: true-grue (Read error: Connection reset by peer) 04:12:47 --- join: impomatic (~chatzilla@87.113.239.117) joined #forth 04:21:25 --- join: DKordic` (~user@178-221-102-238.dynamic.isp.telekom.rs) joined #forth 04:22:58 --- quit: DKordic (Ping timeout: 250 seconds) 04:56:46 do blind people have rulers with braille to measure things? 05:21:52 --- join: kumul (~mool@adsl-72-50-85-186.prtc.net) joined #forth 05:22:54 --- quit: darkf (Quit: Leaving) 05:30:48 --- quit: bedah (Ping timeout: 264 seconds) 05:55:02 --- join: nighty-_ (~nighty@hokuriku.rural-networks.com) joined #forth 05:55:48 --- join: bedah (~bedah@g224075200.adsl.alicedsl.de) joined #forth 06:08:03 --- quit: fantazo (Quit: Verlassend) 06:20:23 --- join: saml_ (~saml@cpe-24-102-97-97.nyc.res.rr.com) joined #forth 06:25:33 --- join: xyh (~xieyuheng@222.58.94.77) joined #forth 06:27:25 --- quit: mnemnion (Read error: Connection reset by peer) 06:27:25 --- join: mnemnion_ (~mnemnion@c-98-210-219-91.hsd1.ca.comcast.net) joined #forth 07:15:31 --- join: protist (~javery@225.236.69.111.dynamic.snap.net.nz) joined #forth 07:25:29 --- quit: xyh (Remote host closed the connection) 07:28:36 --- join: sexy-hunkman (d1069359@gateway/web/freenode/ip.209.6.147.89) joined #forth 07:37:06 --- quit: sexy-hunkman (Ping timeout: 246 seconds) 07:41:47 --- quit: impomatic (Ping timeout: 246 seconds) 07:42:25 --- join: impomatic (~chatzilla@87.113.239.117) joined #forth 07:46:55 --- join: sexy-hunk (d1069359@gateway/web/freenode/ip.209.6.147.89) joined #forth 08:01:51 --- quit: xtalmath (Quit: Leaving.) 08:25:46 --- quit: sexy-hunk (Ping timeout: 246 seconds) 09:18:12 --- join: chouser (~chouser@c-68-44-5-241.hsd1.nj.comcast.net) joined #forth 09:28:26 --- join: karswell (~user@201.67.208.46.dyn.plus.net) joined #forth 09:38:33 --- quit: proteusguy (Remote host closed the connection) 09:46:18 --- quit: protist (Quit: Konversation terminated!) 09:50:51 --- quit: chouser (Ping timeout: 250 seconds) 10:00:31 --- join: chouser (~chouser@c-68-44-5-241.hsd1.nj.comcast.net) joined #forth 10:31:20 --- join: true-grue (~grue@95-27-179-162.broadband.corbina.ru) joined #forth 11:00:42 --- join: _spt_ (~jaat@host-89-242-46-149.as13285.net) joined #forth 11:00:42 --- quit: _spt_ (Changing host) 11:00:42 --- join: _spt_ (~jaat@unaffiliated/-spt-/x-5624824) joined #forth 11:02:35 --- join: ZioFork (~guru@2a02:8084:a180:1480:5e93:a2ff:fea2:6077) joined #forth 11:10:12 --- quit: mnemnion_ () 11:11:35 --- join: mnemnion (~mnemnion@c-98-210-219-91.hsd1.ca.comcast.net) joined #forth 12:31:21 --- quit: saml_ (Ping timeout: 250 seconds) 13:04:16 --- quit: _spt_ (Ping timeout: 255 seconds) 13:25:17 --- quit: ZioFork (Ping timeout: 252 seconds) 13:31:46 --- quit: mnemnion (Remote host closed the connection) 13:32:20 --- join: mnemnion (~mnemnion@c-98-210-219-91.hsd1.ca.comcast.net) joined #forth 13:40:43 --- quit: mnemnion (Ping timeout: 255 seconds) 14:14:54 --- join: ZioFork (~guru@2a02:8084:a180:1480:5e93:a2ff:fea2:6077) joined #forth 14:20:38 --- quit: karswell (Ping timeout: 264 seconds) 14:51:20 --- quit: kumul (Ping timeout: 250 seconds) 15:13:35 --- join: mnemnion (~mnemnion@ardent.static.monkeybrains.net) joined #forth 15:22:54 --- quit: true-grue (Read error: Connection reset by peer) 15:38:55 --- quit: nighty-_ (Remote host closed the connection) 16:13:34 --- quit: bedah (Remote host closed the connection) 16:15:50 --- quit: mnemnion (Remote host closed the connection) 16:34:08 --- quit: ZioFork (Quit: WeeChat 1.1.1) 17:00:04 --- join: kumul (~mool@adsl-72-50-86-186.prtc.net) joined #forth 17:05:22 --- quit: krainboltgreene (Ping timeout: 246 seconds) 17:06:09 --- join: saml_ (~saml@cpe-24-102-97-97.nyc.res.rr.com) joined #forth 17:11:26 --- join: xtalmath (~xtalmath@ip-81-11-190-39.dsl.scarlet.be) joined #forth 17:28:13 --- quit: xtalmath (Quit: Leaving.) 17:48:31 --- join: darkf (~darkf___@unaffiliated/darkf) joined #forth 17:52:28 --- join: mnemnion (~mnemnion@c-98-210-219-91.hsd1.ca.comcast.net) joined #forth 18:32:14 --- join: karswell (~user@182.13.199.146.dyn.plus.net) joined #forth 19:44:14 --- quit: chouser (Ping timeout: 245 seconds) 19:59:18 --- quit: malyn (Ping timeout: 244 seconds) 19:59:53 --- nick: ]sgDAvIFn -> malyn 20:01:22 --- join: chouser (~chouser@c-68-44-5-241.hsd1.nj.comcast.net) joined #forth 20:05:29 --- join: malyn_ (~malyn@unaffiliated/malyn) joined #forth 20:07:09 --- quit: malyn_ (Client Quit) 20:13:57 --- join: malyn_ (~malyn@unaffiliated/malyn) joined #forth 20:17:00 --- quit: malyn (Disconnected by services) 20:17:00 --- nick: malyn_ -> malyn 20:17:19 --- join: VvDLdFcLm (~malyn@server.strangegizmo.com) joined #forth 20:22:41 --- quit: chouser (Ping timeout: 250 seconds) 20:59:27 --- join: protist (~javery@225.236.69.111.dynamic.snap.net.nz) joined #forth 21:18:28 --- quit: kumul (Quit: Leaving) 22:31:15 --- quit: saml_ (Remote host closed the connection) 23:29:56 --- join: fantazo (~fantazo@089144212070.atnat0021.highway.a1.net) joined #forth 23:52:03 --- quit: mnemnion (Remote host closed the connection) 23:59:56 --- quit: fantazo (Ping timeout: 256 seconds) 23:59:59 --- log: ended forth/15.02.21