00:00:00 --- log: started forth/14.10.27 00:10:41 --- quit: proteusguy (Ping timeout: 265 seconds) 00:12:16 --- join: proteusguy (~proteusgu@180.183.9.108) joined #forth 00:12:47 proteusguy: Jonesforth is indirect threaded, the classic approach. 00:13:08 There's no reason I can think of to ever use indirect threading these days. Maybe someone can come up with one, though. 00:13:34 Typically, however, a modern Forth should be either direct threaded or subroutine threaded (depending on the cost of a function call). 00:13:57 Same for yourforth? 00:14:08 I haven't looked at yourforth very closely, so I don't know. 00:14:22 I seem to recall it being indirect, but I'm not certain. 00:14:33 --- join: samrat (~samrat@49.244.102.154) joined #forth 00:15:30 If I wanted to implement a small forth (ARM or x86) with the goal of having it fit in L1/L2 cache as much as possible so ultimately we're just memory i/o bound, what would be the threading model to go for or other architectural considerations to make? 00:15:36 ttmrichter, reviewed the pdf just now. yourforth is indirect threaded as well. 00:19:23 proteusguy: For really SMALL Forths you might want to go for a token threaded. 00:19:53 This is a case, however, where you really should implement it in all three ways (direct, subroutine, token) and see what it does. 00:20:02 token threaded could translated into byte code directly? 00:20:04 Because which is "best" depends a whole lot on your ISA. 00:20:38 Token threaded is where each word is translated into a "token" (roughly similar to byte code, yes) and the interpreter just reads a token and uses a lookup table to dispatch to the actual code. 00:21:55 So if you define : DOUBLE ( x -- x ) DUP * ; your compiler will generate a new threaded word that consists of the token for DUP and the token for * and give your new word DOUBLE a token. 00:22:49 The runtime, upon being directed to execute DOUBLE, would basically do jmp [table,DUP_TOKEN] followed by jmp [table,STAR_TOKEN]. 00:26:04 will they flatend the code when compiling? 00:26:57 in your example, i mean for DOUBLE, they fetch the primitive code of DUP and * and write into the DOUBLE's defination 00:27:10 so when people using DOUBLE, they dont need another 2 jump 00:42:39 --- quit: proteusguy (Ping timeout: 272 seconds) 01:27:18 --- quit: irsol (Ping timeout: 245 seconds) 01:29:14 --- join: irsol (~irsol@unaffiliated/contempt) joined #forth 01:44:25 --- join: xyh (~xieyuheng@125.94.36.169) joined #forth 01:45:57 --- quit: DGASAU (Read error: Connection reset by peer) 01:46:57 --- join: DGASAU (~user@p50993595.dip0.t-ipconnect.de) joined #forth 01:58:06 --- quit: DGASAU (Read error: Connection reset by peer) 01:59:04 --- join: DGASAU (~user@p50993595.dip0.t-ipconnect.de) joined #forth 02:06:12 --- join: Zarutian (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 02:10:39 --- quit: xyh (Ping timeout: 245 seconds) 02:27:43 yunfan: That's up to the compiler and is a common peephole optimization. 02:37:12 --- quit: DGASAU (Read error: Connection reset by peer) 02:38:12 --- join: DGASAU (~user@p50993595.dip0.t-ipconnect.de) joined #forth 02:44:23 --- quit: samrat (Ping timeout: 250 seconds) 02:45:58 --- join: proteusguy (~proteusgu@180.183.14.158) joined #forth 02:49:21 --- join: samrat (~samrat@49.244.94.232) joined #forth 02:58:03 --- quit: impomatic_ (Ping timeout: 256 seconds) 02:59:03 --- quit: impomatic (Ping timeout: 258 seconds) 03:00:20 --- join: impomatic (~chatzilla@92.77.125.91.dyn.plus.net) joined #forth 03:15:48 --- quit: samrat (Quit: Computer has gone to sleep.) 03:16:21 --- quit: DGASAU (Read error: Connection reset by peer) 03:16:22 --- join: samrat (~samrat@49.244.94.232) joined #forth 03:16:45 --- quit: samrat (Client Quit) 03:17:25 --- join: DGASAU (~user@p50993595.dip0.t-ipconnect.de) joined #forth 03:17:28 --- join: samrat (~samrat@49.244.94.232) joined #forth 03:17:29 --- join: true-grue (~grue@95-25-84-142.broadband.corbina.ru) joined #forth 03:17:31 --- quit: samrat (Client Quit) 03:25:02 --- join: xyh (~xieyuheng@125.94.36.169) joined #forth 03:33:52 --- quit: impomatic (Ping timeout: 255 seconds) 03:48:16 --- quit: xyh (Remote host closed the connection) 03:50:29 --- join: impomatic (~chatzilla@92.77.125.91.dyn.plus.net) joined #forth 03:52:50 --- join: xyh (~xieyuheng@125.94.36.169) joined #forth 03:57:47 --- quit: impomatic (Ping timeout: 245 seconds) 03:58:03 --- join: impomatic (~chatzilla@92.77.125.91.dyn.plus.net) joined #forth 04:05:24 --- join: impomatic_ (~chatzilla@92.77.125.91.dyn.plus.net) joined #forth 04:07:36 --- quit: impomatic (Ping timeout: 244 seconds) 04:07:49 --- nick: impomatic_ -> impomatic 04:22:26 --- join: protist (~javery@61.226.69.111.dynamic.snap.net.nz) joined #forth 04:28:24 --- quit: proteusguy (Remote host closed the connection) 04:55:01 --- join: proteusguy (~proteusgu@ppp-110-168-229-240.revip5.asianet.co.th) joined #forth 05:04:01 --- quit: ErhardtMundt (Ping timeout: 245 seconds) 05:07:37 --- join: ErhardtMundt (~quassel@93-43-71-119.ip90.fastwebnet.it) joined #forth 05:29:07 --- quit: xyh (Remote host closed the connection) 05:48:58 --- quit: dys (Remote host closed the connection) 05:52:12 --- join: samrat (~samrat@49.244.108.193) joined #forth 06:45:16 --- quit: Zarutian (Quit: Zarutian) 07:15:09 --- quit: samrat (Quit: Computer has gone to sleep.) 07:27:08 --- join: samrat (~samrat@49.244.108.193) joined #forth 07:36:33 --- join: vanila (~user@unaffiliated/vanila) joined #forth 07:43:25 --- quit: DGASAU (Read error: Connection reset by peer) 07:44:38 --- join: DGASAU (~user@p50993595.dip0.t-ipconnect.de) joined #forth 07:50:56 --- join: Zarutian (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 07:53:17 --- quit: protist (Quit: Konversation terminated!) 08:00:40 --- quit: samrat (Quit: Computer has gone to sleep.) 08:03:59 --- quit: DGASAU (Read error: Connection reset by peer) 08:05:08 --- join: DGASAU (~user@p50993595.dip0.t-ipconnect.de) joined #forth 08:07:28 --- quit: DGASAU (Read error: Connection reset by peer) 08:08:31 --- join: DGASAU (~user@p50993595.dip0.t-ipconnect.de) joined #forth 08:14:43 --- join: dys (~user@2a01:1e8:e100:8296:21a:4dff:fe4e:273a) joined #forth 08:17:12 --- join: samrat (~samrat@49.244.108.193) joined #forth 08:19:11 --- quit: DGASAU (Read error: Connection reset by peer) 08:20:32 --- join: DGASAU (~user@p50993595.dip0.t-ipconnect.de) joined #forth 08:27:29 --- join: impomatic_ (~digital_w@92.77.125.91.dyn.plus.net) joined #forth 08:42:08 --- join: nighty^ (~nighty@hokuriku.rural-networks.com) joined #forth 08:59:08 --- quit: proteusguy (Ping timeout: 245 seconds) 09:00:53 --- join: xyh (~xieyuheng@2001:250:3002:5550:6ea1:cc0f:bcb2:b187) joined #forth 09:12:59 --- join: proteusguy (~proteusgu@ppp-110-168-229-165.revip5.asianet.co.th) joined #forth 09:49:44 --- quit: joneshf-laptop (Remote host closed the connection) 10:57:37 --- join: DKordic (~user@93-86-50-229.dynamic.isp.telekom.rs) joined #forth 11:04:26 --- quit: xyh (Remote host closed the connection) 11:37:00 --- join: xyh (~xieyuheng@2001:250:3002:5550:6ea1:cc0f:bcb2:b187) joined #forth 11:40:50 --- quit: DGASAU (Remote host closed the connection) 11:41:05 --- join: kumul (~mool@adsl-72-50-86-25.prtc.net) joined #forth 11:42:25 --- join: DGASAU (~user@p50993595.dip0.t-ipconnect.de) joined #forth 11:47:37 --- quit: DGASAU (Remote host closed the connection) 11:49:18 --- join: DGASAU (~user@p50993595.dip0.t-ipconnect.de) joined #forth 11:51:39 have you guys read scientific forth yet? 11:52:01 scientific forth? a book ? 11:52:11 Jah 11:53:21 --- quit: samrat (Ping timeout: 244 seconds) 11:56:49 --- join: samrat (~samrat@49.244.104.143) joined #forth 11:59:54 hi 12:00:01 http://lpaste.net/113276] 12:00:03 http://lpaste.net/113276 12:00:07 can you help me port the macro to nasm? 12:01:51 --- quit: DGASAU (Remote host closed the connection) 12:03:24 --- join: DGASAU (~user@p50993595.dip0.t-ipconnect.de) joined #forth 12:04:03 code of jonesforth ? 12:04:07 yes 12:04:34 I once converted it to fasm 12:06:28 I worked with scientific forth code. 12:06:34 More than a decade ago. 12:06:41 Basically, it sucks a real lot. 12:06:45 It is a huge pile of code that is non-modular and non-reentrant. 12:07:21 vanila: and with my improvements, the "namelen" argument is removed :) 12:07:41 We submitted fixes to it, even. :) 12:07:43 DGASAU, so i'm guessing you then rolled up your sleeves, and fixed that right away! :) 12:07:48 hehehe. 12:07:56 xyh, neat :D 12:08:22 So much to the code of high quality. 12:08:42 how does forth handle modules? 12:08:42 vanila: you should read isforth's code, isforth is written in nasm, and try to convert it by yourself :P 12:08:46 i'm not at all aware of this aspect of it. 12:08:49 oh thank you! 12:10:19 Worse than C, actually. 12:10:19 vanila: and this is my macros :: https://github.com/cicada-language/cicada/blob/master/vm/x86-64/macro.inc 12:10:33 well, does it have to be that way? 12:10:46 there's nothing inherent that prevents that, correct? 12:10:57 There is. 12:10:57 xyh, cheers! :) 12:11:02 namely? 12:11:17 i guess i've never heard of modular assembly language either. 12:12:02 Very rigid code generation approach makes a lot of things hard to accomplish. 12:13:25 Basically, you have to reimplement all those features considered "useless" by Forth programmers. 12:14:12 if you just want a module system to protect your name space, then it is very easy to implement such thing in forth (3 lines of code) 12:14:45 Module system isn't about protecting name space. 12:15:41 DGASAU: how you view it ? 12:16:08 --- quit: kumul (Quit: Leaving) 12:16:20 You can look around a find a number of module systems that don't protect name space at all. 12:17:01 if you treat each forth as a module!... 12:17:02 *gasp* 12:17:04 no. 12:17:06 not possible. 12:17:31 The primary function of module system is to provide tools for abstraction and specialization. 12:17:47 yet OOForth exists, does it not? 12:18:39 What is written in it besides the usuall "OO" stuff? 12:19:09 i haven't the foggiest. never seen it before. 12:19:14 i simply know that it exists. 12:19:25 More importantly, 12:19:37 how hard is it to abstract a module away? 12:20:10 So far, all I have seen that OO approach requires that you redesign and rewrite your program or library from the ground up. 12:21:57 DGASAU: but in my view module is all about naming ... 12:22:14 bjorkintosh: OO is bad functional is better :P 12:22:40 yeah. 12:22:51 so what does FP forth look like? 12:24:01 bjorkintosh: http://www.kevinalbrecht.com/code/joy-mirror/forth-joy.html 12:24:21 xyh: that's very much restricted approach, it isn't much useful as such. 12:24:27 cool. 12:24:55 All you can achieve with it, is modularity in C fascion. 12:25:26 --- quit: samrat (Quit: Computer has gone to sleep.) 12:25:30 DGASAU, why's that exactly? 12:25:33 This is really uncool, since you have extra-linguistic support for C. 12:26:38 You cannot have, say, single FFT module and specialize it to single precision, double precision, and extended precision modules. 12:26:55 good. generics then. 12:27:01 problem? non-existent. 12:27:19 Have you tried implementing them in Forth? 12:27:26 haha. of course not :) 12:27:29 Have you tried using what you have implemented? 12:27:32 I did both. 12:27:52 what happened? 12:28:00 It is possible, but in general it sucks. 12:28:00 was there much weeping and gnashing of teeth? 12:28:37 fetch @ should be called 'lasso' 12:28:49 and store ! should be called nail 12:28:50 It's cool that I have implemented nearly half of generic modules from Ada. 12:29:11 It's not cool that all this has to be crammed into Forth syntax. 12:30:35 too low level for higher order concepts? 12:30:35 DGASAU: IMHO the problem is due to the lack of substitution semantic in Forth 12:32:39 xyh: no. 12:33:59 If you ignore reader syntax, semantics has no relation to the problem. 12:34:18 The problem is that you need more complex syntax. 12:36:15 When you simulate module specialization with one-word contractions for "begin specialization of that", "assign this to this", "rename that to that", and so on, 12:36:21 it becomes really horrible to read. 12:37:22 If you start optimizing the notation, you suddenly realize that you could have taken Lisp or ML from the very beginning. 12:41:51 --- quit: crc (Ping timeout: 272 seconds) 12:41:51 --- quit: aksatac (Ping timeout: 272 seconds) 12:41:51 --- quit: nox (Ping timeout: 272 seconds) 12:42:20 This is iimportant since you have to parameterize you modules with operations rather than types. 12:42:21 --- join: crc (sid2647@gateway/web/irccloud.com/x-mnfqriyqigtammrv) joined #forth 12:43:33 --- join: nox (sid3872@gateway/web/irccloud.com/x-enhcjzaryftaoagb) joined #forth 12:43:50 --- join: aksatac (sid12717@gateway/web/irccloud.com/x-maodnawijuggkkmu) joined #forth 12:45:18 So, you have to write extremely long code that does module specialization. 12:46:54 DGASAU: I can better design syntax for Forth to handle modules, Lisp use lisp-processing and lambda to implement modules. I have lambda in my implementation, I can pass the following test :: http://cicada-language.github.io/source-code/lambda.html 12:47:21 DGASAU: just pushed this page for you :) 12:49:01 DGASAU: ``dali'' is double-linked-list, ``wodili'' is wordy-list i.e. double-linked-list in which each element has a name. 12:50:04 I'd suggest that you learn parsing. 12:50:29 Once you understand something really basic like LL(1), 12:50:39 you'll understand that it takes so little amount of code, 12:51:37 that you can easily drop all your lexical quirks and have a lot saner language instead within the same amount of code. 12:52:57 Your code looks more like Smalltalk than Forth, BTW. 12:54:17 Implement simple grammar (about 10-20 rules, perhaps less even), and you'll have Smalltalkish syntax. 12:57:49 xyh: and once you learn L-attributed grammars, you'll discover a really huge space of technology that helps you make your code faster. 12:57:58 LL(1) is enough for most of well-designed PL's. 12:58:09 True. 12:58:30 I ll learn, thx for mention :) 12:58:37 In fact, you don't even need to learn LL(1). 12:58:42 Recursive descent parser is simple and powerful algorithm to implement parsers for such grammars. 12:58:56 You can learn simple recursive descent. 12:59:02 Or, equivalently, PEG. 12:59:16 Or, equiv., META II ;) 13:00:03 Whatever. 13:00:30 but how it still Forth ? parser for different code-blocks 13:00:30 Any of mentioned goes. 13:00:44 ``['' is just a word in my language, smalltalk and OO can not do this :P 13:00:46 Why do you want to stick to Forth? 13:01:00 DGASAU: Yes. The point is that you don't need all that Dragon book machinery. 13:01:23 Personally, I find Dragon book bad. 13:01:39 In fact, it is closer to being awful and horrible. 13:01:57 Then try Compiler Constuction by Wirth :) 13:02:46 about language implementation, Daniel Friedman's book is better 13:03:17 IMO, people from LR camp have lost the sense of reality. 13:04:55 I wish to go to the USA to learn from Dan Friedman, but the road is to hard for me :P 13:05:08 * DGASAU shrugs. 13:05:20 IIUIC, you're from China. 13:05:26 yes 13:05:36 You have some good university in there. 13:05:52 no good university IMO 13:06:20 Is Dan Friedman sort of kung-fu master or something? :) 13:06:21 It's not like living on Filipine isles. 13:07:10 xyh: you seem to make that mistake usual for people who haven't acquired higher education yet. 13:07:36 In general, it doesn't matter that much which university you attend. 13:08:21 You can take university rating from "The Times" or whoever composes it, 13:08:35 take two random universities from the first 200, 13:08:50 and you can easily have education of the same quality. 13:09:05 Or you can take two random universities from the second 200, 13:09:25 and you'll have education only slightly worse than the former, 13:09:28 if worse at all. 13:10:43 --- join: zmc (~zmc@74.120.24.85) joined #forth 13:10:44 The quality in higher education is determined by what and how _you_, _you_personally_ study there. 13:10:55 Read and experiment, do something practical, gather experience. Work on self-education. And someday you'll "beat" even Dan Friedman! :) 13:11:30 There're as many bad students in UCLA as in Peking uni. 13:11:44 What is the equivalent to .s for the floating point stack in gforth? 13:12:54 DGASAU: my experiences make me hate Chinese school. I love Chinese language, but I hate the education and politics. 13:13:04 xyh: The really harsh fact about higher education is that 13:13:27 xyh, what about reading friedman's books and papers? is that not sufficient? 13:13:28 after five years past graduation university graduate has nearly the same knowledge as the person who had professional training only. 13:13:30 i think he's near retirement. 13:13:54 xyh: in average, of course. 13:14:52 zmc: How about : .fstack fdepth if fdepth 0 do f. loop then ; (not tested) 13:15:05 xyh: thus, independently of dispersion and skew, this gives you enough chances to beat UCLA graduates. 13:16:53 true-grue: Wow, thanks. That works perfectly. I thought there was a pre-defined word to do that, and have been going crazy looking. 13:17:19 zmc: At least not in ANS standard, as far as I remember. 13:17:42 true-grue: I'm pretty sure it's not in ANS, I just read the spec. :D 13:17:49 ok :) 13:18:01 Thanks again! 13:18:03 \q 13:18:04 np! 13:29:00 DGASAU: this topic is a little heavy for me :) 13:29:04 I am think of wraping some wayland functions and providing a Forth based IDE programming lib for linux. (then write a WM or something) 13:30:06 is wayland a good operation ? 13:35:17 * option 13:36:19 s/IDE/GUI/ 13:36:34 xyh, xcb might be nice also http://hack.org/mc/projects/mcwm/ 13:52:36 --- quit: Zarutian (Quit: Zarutian) 13:52:58 vanila: have just tryed mcwm, it's cool :) you ever used xcb? meet this 600+ LOC WM :) :: https://github.com/Cloudef/loliwm 13:55:38 xyh, i liked mcwm but only use it for a few days - yes I programmed sokoban in xcb but i cant do more because it's hard 13:56:21 going to look into wayland! 14:05:47 --- join: Zarutian (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 14:24:21 --- quit: xyh (Remote host closed the connection) 15:16:45 --- quit: true-grue (Read error: Connection reset by peer) 15:51:59 --- join: joneshf-laptop (~joneshf@98.208.35.89) joined #forth 16:40:40 --- join: protist (~javery@199.225.69.111.dynamic.snap.net.nz) joined #forth 17:04:14 --- quit: klltkr (Ping timeout: 244 seconds) 17:27:01 --- join: klltkr (~klltkr@unaffiliated/klltkr) joined #forth 18:13:40 --- quit: zmc (Quit: leaving) 19:08:09 --- quit: vanila (Quit: Leaving) 19:28:20 --- quit: Zarutian (Quit: Zarutian) 19:29:16 --- quit: bluekelp (Ping timeout: 272 seconds) 19:31:45 --- quit: nighty^ (Quit: Disappears in a puff of smoke) 19:32:23 --- join: bluekelp (~bluekelp@2001:470:1:41:a022:9165:b6a1:21f5) joined #forth 19:32:23 --- mode: ChanServ set +v bluekelp 20:40:29 --- join: samrat (~samrat@49.244.79.1) joined #forth 21:29:47 --- quit: proteusguy (Remote host closed the connection) 21:31:18 --- part: DKordic left #forth 21:37:47 --- quit: samrat (Ping timeout: 258 seconds) 21:59:06 --- join: proteusguy (~proteusgu@180.183.14.158) joined #forth 22:12:33 --- join: samrat (~samrat@49.244.30.210) joined #forth 22:17:04 --- quit: samrat (Ping timeout: 260 seconds) 22:56:37 --- join: samrat (~samrat@49.244.42.178) joined #forth 23:34:11 --- join: xyh (~xieyuheng@2001:250:3002:5550:6ea1:cc0f:bcb2:b187) joined #forth 23:59:59 --- log: ended forth/14.10.27