00:00:00 --- log: started forth/11.01.12 00:02:38 --- join: martinhex (~mjc@93-97-29-243.zone5.bethere.co.uk) joined #forth 00:58:53 Got a bunch of FORTH stuff, given to me to 'mind' about 10 years ago. Anyone want it? 01:01:29 What is it exactly? 01:08:04 --- join: qFox (~C00K13S@5356B263.cm-6-7c.dynamic.ziggo.nl) joined #forth 01:17:20 FORTH stuff, need to look into it, but its historically important. 02:22:49 --- quit: gogonkt (Ping timeout: 255 seconds) 02:24:24 --- join: gogonkt (~info@183.27.206.149) joined #forth 03:54:39 --- quit: saper (Read error: Operation timed out) 03:56:18 --- join: saper (saper@wikipedia/saper) joined #forth 05:20:37 --- join: MayDaniel (~MayDaniel@unaffiliated/maydaniel) joined #forth 05:32:58 --- quit: Judofyr (Remote host closed the connection) 05:37:39 --- quit: MayDaniel (Read error: Connection reset by peer) 06:10:13 --- join: nighty__ (~nighty@x122091.ppp.asahi-net.or.jp) joined #forth 06:47:28 --- join: Judofyr (~judofyr@cC694BF51.dhcp.bluecom.no) joined #forth 07:05:59 --- quit: Deformative (Ping timeout: 240 seconds) 07:18:20 --- join: Deformative (~Joseph@caen-cse-141-212-202-137.wireless.engin.umich.edu) joined #forth 07:23:17 --- join: MayDaniel (~MayDaniel@unaffiliated/maydaniel) joined #forth 08:19:15 --- quit: Fox78 (Ping timeout: 260 seconds) 09:01:28 --- quit: MayDaniel () 09:08:54 --- quit: Judofyr (Remote host closed the connection) 09:40:54 --- join: Judofyr (~judofyr@cC694BF51.dhcp.bluecom.no) joined #forth 11:02:37 --- quit: scj (Ping timeout: 265 seconds) 11:05:21 --- join: ygrek (debian-tor@gateway/tor-sasl/ygrek) joined #forth 11:08:35 --- join: scj (scj@mycrosoft.us) joined #forth 11:42:39 --- join: Judofyr_ (~judofyr@cC694BF51.dhcp.bluecom.no) joined #forth 11:44:44 --- quit: Judofyr (Ping timeout: 276 seconds) 11:52:34 http://sprunge.us/hYIG is a block editor for retro; it's non-standard (using 1600 character sized blocks) 11:53:03 16x100? 11:54:20 20x80, it looks like. 11:59:00 Sized to fit on an old "standard" 25x80 terminal, I assume. 11:59:44 I wonder how much time it has to pass to get rid of Hollerith card memories. 12:00:01 Heh. 12:00:25 crc: at the top, looks like you have "z exit RxE" in the comments twice. 12:02:08 so I do; thanks 12:02:14 tathi: correct on the size 12:03:08 Better do it 4096 = 128 x 32. 12:03:38 --- quit: Deformative (Ping timeout: 240 seconds) 12:03:39 At least it fits new disk block. 12:04:12 crc: You're using square brackets for anonymous code blocks now? 12:04:18 tathi: yes 12:04:31 --- join: impomatic (~chatzilla@86.241.112.87.dyn.plus.net) joined #forth 12:04:40 Hi :-) 12:04:50 Hi 12:04:56 ASau: disk block sizes are irrelevant to me; the blocks are stored in the image file 12:04:58 hi impomatic 12:05:25 crc: convert from square brackets to braces. :) 12:05:46 Then it will look like c, postscript, sh and so on. 12:05:58 Bind and dominate :D 12:06:36 Hrm. Guess I haven't played with Retro in a while. 12:06:43 I can *almost* read the code. :) 12:07:04 Is it better not to use ?dup ? I seem to remember someone didn't like it, but not why. 12:07:08 --- join: Deformative (~Joseph@caen-eecs-141-212-212-254.wireless.engin.umich.edu) joined #forth 12:07:23 I'm using it in : factorial ?dup 0= if 1 else dup 1- recurse * then ; 12:07:29 I wonder how much Smalltalk crc smoked for "ifTrue". 12:07:58 * impomatic just bought a book on Smalltalk :-/ 12:08:07 impomatic: "?dup 0= if" is rather idiomatic construct. 12:09:12 I use ": case: postpone over postpone = postpone if postpone drop ; immediate" 12:09:41 then it is ": factorial 0 case: 1 case; 1- recurse * ;" 12:10:01 : case; postpone exit postpone then ; immediate 12:10:35 * ASau notes that it isn't effective way to calculate factorial in Forth. 12:10:38 Is this better? : factorial dup if dup 1- recurse * else 1+ then ; 12:10:52 No. 12:11:34 impomatic: nothing wrong with `?dup 0= if` 12:11:50 Hmmm... I was just going to use it as an example :-) 12:12:14 Use "loop" or decrementing loop, if you have one. 12:13:02 I'd normally use look, but I was trying to create a simple example of recursion 12:13:04 ASau: one less key to hit for square vs curly brackets 12:13:19 crc: that depends on layout. 12:14:11 true enough. 12:31:20 --- nick: Judofyr_ -> Judofyr 12:37:24 for a recursive fib, I use : factorial dup 1 = if; dup 1- factorial * ; 12:38:34 O(n) space, same O(n) time only with larger constant factor. 12:38:50 crc: doesn't that fail for 0 factorial ? 12:39:29 BTW, how do you both handle overflows? 12:39:50 I don't. It's just an example of recursion. 12:40:29 retro crashes if there's an overflow 12:40:40 impomatic: : factorial 0; dup 1 = if; dup 1- factorial * ; 12:40:48 takes care of the 0 factorial issue 12:41:06 crc: what does it return for 0? 12:41:13 nothing 12:41:19 which is wrong. 12:41:28 0! = 1 12:41:46 ASau: I only use this for a benchmark; I wouldn't use a recusive factorial for any real purpose 12:43:09 * ASau shrugs. 12:45:45 : dup 1 = if; dup 1- * ; 12:45:45 : factorial dup 0 = [ 1+ ] [ ] if ; 12:46:03 if you want a correct answer for 0 factorial 12:48:40 It's like benchmarking NOPs. 12:49:11 how so? 12:50:25 What is the point in benchmarking known-incorrect code? 12:51:48 the benchmarks are used to compare relative performance differences between various vm implementations 12:52:34 Don't you have real code for that purpose? 12:53:05 What's the point in comparing behaviour of VM on _random_ artificial examples? 12:54:55 I only did a few comparisons to answer a request. http://rx-core.org/dev/corpse/article/36 was the results. Personally, I only benchmark code if performance is a significant factor; which (for me) is rare 12:57:05 Have you tried optimising SBCL builds? 12:58:56 not yet 13:07:14 --- quit: Deformative (Ping timeout: 276 seconds) 13:09:12 "Forth is the most outdated unreadable piece of junk mankind has ever come up with. 13:09:12 I mean Common Lisp is ten thousand trillion times more readable than Forth. 13:09:12 In 2011 it is hilarious to assume Forth has a legitimate role outside of the castle 13:09:12 where a mad king in medieval times first invented it." 13:09:32 source? 13:10:29 comp.lang.lisp 13:10:54 ok 13:11:26 So true, given the quality of mainstream Forth code. 13:11:34 * crc will note here that the common lisp implementation of the vm (http://sprunge.us/OFKJ?cl) took longer than the others to write, due to the headache of looking at the parenthesis 13:16:35 crc: Fortran programmer can write Fortran in any language. 13:18:52 that's true of many languages 13:21:13 I don't see what requires looking at parentheses there. 13:21:29 The code is boringly straightforward. 13:21:41 As if converted from Fortran automatically. 13:23:48 crc: http://www.lispworks.com/documentation/HyperSpec/Body/m_case_.htm 13:25:34 This alone would have saved enough typing or copy-paste work. 13:29:33 thanks, this should prove helpful when I revisit it later on this year 13:41:38 all of the vm implementations I've written are (initially) based mainly on a C implementation 13:43:21 --- join: fantazo (~fantazo@178-191-160-215.adsl.highway.telekom.at) joined #forth 13:48:11 crc: http://forth.pastebin.com/25Td0ETc 13:59:13 --- join: Deformative (~Joseph@caen-cse-141-212-202-137.wireless.engin.umich.edu) joined #forth 13:59:30 crc: even this way: http://forth.pastebin.com/Xi5vU85S 14:04:27 --- quit: qFox (Quit: Time for cookies!) 14:07:25 --- quit: Judofyr (Remote host closed the connection) 14:09:39 crc: and even this way: http://forth.pastebin.com/KUK42Sux 14:11:23 --- quit: nighty__ (Quit: Disappears in a puff of smoke) 14:25:09 --- quit: ygrek (Remote host closed the connection) 14:28:54 --- quit: Deformative (Ping timeout: 260 seconds) 14:31:52 --- part: impomatic left #forth 14:33:05 ASau: I can't get any of the patches to apply 14:33:33 * ASau sighs. 14:33:43 Get real programming tools somewhere. 14:34:18 crc: http://forth.pastebin.com/F2eQJqbv 14:35:06 Oh, damn. Another fortranish loop. 14:37:27 crc: http://forth.pastebin.com/NQLDCyCM 14:45:45 much improved; thank you 14:46:42 can I commit this to the repo? 14:47:01 Sure. 14:47:11 That's not all. :) 14:47:23 you have more? 14:47:32 Sure. 14:47:54 You write (- smth 1) (+ smth 1) instead of (1+ smth) (1- smth). 14:48:29 http://forth.pastebin.com/KWsdLx4f 14:51:29 http://forth.pastebin.com/XHgPx5Ne 14:52:35 --- join: Deformative (~Joseph@caen-cse-141-212-202-137.wireless.engin.umich.edu) joined #forth 14:53:23 thanks; these changes are in the repo now 14:56:13 --- join: dnm (~dnm@li97-254.members.linode.com) joined #forth 15:06:54 --- join: fantazo_ (~fantazo@178-190-236-169.adsl.highway.telekom.at) joined #forth 15:08:04 Synced. 15:08:10 More changes: 15:08:11 http://forth.pastebin.com/pHwTssCg 15:10:59 --- quit: fantazo (Ping timeout: 272 seconds) 15:11:11 with that I get errors relating to the use of LET: 15:11:15 >> clisp vm/retro.lisp 15:11:15 *** - LET: illegal variable specification (AREF MEMORY IP) 15:13:05 extra parentheses needed, sorry :) 15:14:27 http://forth.pastebin.com/KResiDXb 15:14:53 see also changes in load-image and around. 15:16:19 that works; and is now committed 15:24:04 It looks still awful, but at least not as awful as before. 15:24:25 Certainly closer to usual Lisp style. 15:28:32 Now Lisp implementation takes the least size :D 15:28:40 very true 15:29:11 With some quirks it can be improved further. 15:29:55 E.g. after applying some MACROLETness. 15:30:06 macrolet? 15:31:10 http://www.lispworks.com/documentation/HyperSpec/Body/s_flet_.htm 15:36:12 --- quit: Deformative (Ping timeout: 240 seconds) 15:47:37 crc: http://forth.pastebin.com/YKRbSZG1 15:50:57 commited; very nice 15:55:54 --- join: Deformative (~Joseph@205-36.adsl.umnet.umich.edu) joined #forth 16:21:58 crc: last for today http://forth.pastebin.com/5K8t2akq 16:27:06 tested and committed; thank you very much for this 16:35:05 --- join: JoshGrams (~josh@dsl-216-227-95-5.fairpoint.net) joined #forth 16:35:05 --- quit: tathi (Read error: Connection reset by peer) 16:35:37 --- nick: JoshGrams -> tathi 16:39:00 --- join: Fox78 (~fox@123.118.145.132) joined #forth 18:02:45 --- quit: probonono (Ping timeout: 248 seconds) 18:03:23 --- join: probonono (~User@unaffiliated/probonono) joined #forth 18:37:39 --- quit: tathi (Quit: leaving) 19:12:38 --- quit: cataska (Quit: leaving) 19:27:56 --- join: cataska (~cataska@210.64.6.233) joined #forth 19:29:32 --- join: luptenschteiner (~User@unaffiliated/probonono) joined #forth 19:29:38 --- quit: probonono (Ping timeout: 248 seconds) 19:30:22 --- nick: luptenschteiner -> probonono 19:51:16 --- join: parolang (~user@216.19.14.55) joined #forth 20:28:52 --- quit: parolang (Ping timeout: 276 seconds) 20:37:32 --- join: luptenschteiner (~User@unaffiliated/probonono) joined #forth 20:37:52 --- quit: probonono (Ping timeout: 248 seconds) 20:38:28 --- nick: luptenschteiner -> probonono 20:57:41 --- join: parolang (~user@216.19.14.55) joined #forth 21:00:03 --- quit: fantazo_ (Remote host closed the connection) 21:27:19 --- quit: parolang (Ping timeout: 240 seconds) 22:21:25 --- quit: Al2O3 (Read error: Connection reset by peer) 22:22:09 --- join: Al2O3 (~Al2O3@c-67-190-8-92.hsd1.co.comcast.net) joined #forth 22:22:17 --- quit: Al2O3 (Client Quit) 22:26:38 --- join: parolang (~user@216.19.14.55) joined #forth 23:59:59 --- log: ended forth/11.01.12