00:00:00 --- log: started forth/06.11.22 00:34:03 --- quit: arke (Read error: 110 (Connection timed out)) 01:49:17 --- quit: nighty ("Disappears in a puff of smoke") 02:25:25 --- join: Cheery (n=Cheery@a81-197-54-146.elisa-laajakaista.fi) joined #forth 03:59:55 --- join: arke (i=Chris@x140.vpn.hrz.tu-darmstadt.de) joined #forth 03:59:55 --- mode: ChanServ set +o arke 04:07:05 --- join: slava_ (n=slava@74.101.199.42) joined #forth 04:08:20 --- quit: segher ("Reactor leak") 04:12:52 morning 04:13:07 Hey 04:13:38 --- quit: slava (Read error: 110 (Connection timed out)) 04:20:44 --- quit: arke (Read error: 110 (Connection timed out)) 04:39:02 --- join: virl (n=virl@chello062178085149.1.12.vie.surfer.at) joined #forth 05:10:15 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #forth 05:15:19 --- join: arke (i=Chris@x112.vpn.hrz.tu-darmstadt.de) joined #forth 05:15:19 --- mode: ChanServ set +o arke 05:36:41 --- join: zpg (n=user@user-514d7663.l2.c2.dsl.pol.co.uk) joined #forth 05:45:37 --- quit: Cheery (Read error: 104 (Connection reset by peer)) 05:45:46 --- join: vatic (n=chatzill@pool-162-84-178-20.ny5030.east.verizon.net) joined #forth 05:46:42 --- join: Cheery (n=Cheery@a81-197-54-146.elisa-laajakaista.fi) joined #forth 06:09:28 good morning its raining cats and dogs here :( 06:13:47 slava_: ping 06:18:16 --- join: Ray_work (n=Raystm2@199.227.227.26) joined #forth 06:19:29 Top o' the mornin' to ya! 06:29:51 good morning its raining cats and dogs here :( 06:32:13 --- quit: zpg (Read error: 110 (Connection timed out)) 06:32:50 --- join: zpg (n=user@user-514d7663.l2.c2.dsl.pol.co.uk) joined #forth 06:40:36 --- nick: slava_ -> slava 06:40:37 --- mode: ChanServ set +o slava 06:43:15 Good morning slava. 06:43:28 erider, wish it was here. We could use it. 06:43:29 slava_: ping 06:43:58 its bad Ray_work 06:44:18 it have been raining non-stop for two days now 06:45:03 Yikes. Where are you? Seatle? 06:46:50 North Carolina atm 06:47:28 but we need to drive back up to Maryland for turkey Day 06:50:16 erider: pong 06:51:19 hi slava I asked in #ubuntu and they say that I should have opengl on my system already 07:16:55 --- quit: arke (Read error: 110 (Connection timed out)) 07:35:16 --- quit: virl (Read error: 104 (Connection reset by peer)) 07:43:57 --- join: JasonWoof (n=jason@c-71-192-26-248.hsd1.ma.comcast.net) joined #forth 07:43:57 --- mode: ChanServ set +o JasonWoof 07:59:24 --- nick: crest_ -> Crest 08:17:06 --- join: arke (n=Chris@pD9E05AD8.dip.t-dialin.net) joined #forth 08:17:06 --- mode: ChanServ set +o arke 08:26:57 --- join: jackokring (n=jackokri@static-195-248-105-144.adsl.hotchilli.net) joined #forth 08:52:30 --- quit: zpg (Read error: 110 (Connection timed out)) 09:36:02 --- quit: cmeme (Remote closed the connection) 09:40:10 --- join: cmeme (n=cmeme@boa.b9.com) joined #forth 09:40:12 --- quit: cmeme (Remote closed the connection) 09:41:12 --- join: cmeme (n=cmeme@boa.b9.com) joined #forth 09:56:51 --- quit: vatic ("*poof*") 09:57:53 --- quit: cmeme (Read error: 104 (Connection reset by peer)) 09:59:10 --- join: cmeme (n=cmeme@boa.b9.com) joined #forth 09:59:11 --- quit: cmeme (Remote closed the connection) 10:00:11 --- join: cmeme (n=cmeme@boa.b9.com) joined #forth 10:00:49 --- quit: cmeme (Read error: 104 (Connection reset by peer)) 10:01:53 --- join: cmeme (n=cmeme@boa.b9.com) joined #forth 10:01:54 --- quit: cmeme (Remote closed the connection) 10:02:55 --- join: cmeme (n=cmeme@boa.b9.com) joined #forth 10:21:59 --- join: timlarson__ (n=timlarso@65.116.199.19) joined #forth 10:23:33 --- quit: timlarson_ (Read error: 60 (Operation timed out)) 10:24:19 --- join: neceve (n=claudiu@unaffiliated/neceve) joined #forth 10:24:57 --- join: arke_ (n=Chris@pD9E05AD8.dip.t-dialin.net) joined #forth 10:26:36 --- quit: arke (Read error: 104 (Connection reset by peer)) 10:44:25 --- quit: neceve (Remote closed the connection) 10:48:28 --- nick: arke_ -> arke 10:49:29 --- join: neceve (n=claudiu@unaffiliated/neceve) joined #forth 10:54:58 --- join: Snoopy42_ (i=snoopy_1@dslb-084-058-189-048.pools.arcor-ip.net) joined #forth 10:59:51 --- quit: slava () 11:03:19 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 11:03:22 --- nick: Snoopy42_ -> Snoopy42 13:25:44 --- quit: erider (Read error: 110 (Connection timed out)) 13:26:02 --- join: erider (n=erider@unaffiliated/erider) joined #forth 13:32:31 --- quit: timlarson__ ("Leaving") 13:38:53 --- join: marble (n=glass@cpc1-bolt6-0-0-cust18.manc.cable.ntl.com) joined #forth 13:49:00 --- join: Jim7J1AJH (n=jim@onnz.net) joined #forth 13:57:48 --- part: Jim7J1AJH left #forth 14:20:41 --- quit: Cheery ("Download Gaim: http://gaim.sourceforge.net/") 14:27:39 --- join: erider_ (n=erider@unaffiliated/erider) joined #forth 14:35:17 --- quit: erider (Read error: 110 (Connection timed out)) 14:35:35 --- nick: erider_ -> erider 14:52:44 --- join: erider_ (n=erider@unaffiliated/erider) joined #forth 14:53:49 --- quit: erider (Read error: 110 (Connection timed out)) 14:54:52 --- nick: erider_ -> erider 14:58:27 --- quit: jackokring (Read error: 110 (Connection timed out)) 14:59:44 Ray_work: ping 15:07:46 --- quit: Ray_work (Read error: 104 (Connection reset by peer)) 15:18:50 --- join: Snoopy42_ (i=snoopy_1@dslb-084-058-189-048.pools.arcor-ip.net) joined #forth 15:21:31 --- join: nighty (n=nighty@sushi.rural-networks.com) joined #forth 15:25:35 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 15:25:58 --- nick: Snoopy42_ -> Snoopy42 15:26:08 --- join: zpg (n=user@user-514d7663.l2.c2.dsl.pol.co.uk) joined #forth 15:41:26 --- join: Raystm2- (n=NanRay@adsl-69-149-63-251.dsl.rcsntx.swbell.net) joined #forth 15:54:26 --- quit: Raystm2 (Read error: 110 (Connection timed out)) 16:34:27 --- quit: marble (".") 16:47:42 --- join: twobitsprite (n=someonee@cpe-075-177-191-014.nc.res.rr.com) joined #forth 16:47:51 hello 16:49:04 would you all say forth code would be easy to generate and manipulate programatically? 16:52:44 I'm asking because I am aiming to play with some genetic programming models, and I need a language which can be easily generated and manipulated, and I first looked into PostScript, but Forth seems promising too... 16:52:46 any thoughts? 16:56:37 hmm... well its obviously not a very popular subject of conversation... :P 16:58:11 twobitsprite: hi 17:00:09 erider: hey :) 17:02:05 erider: what implementation of forth for x86/Windows do you recommend for learning? 17:04:05 I'm trying to learn it myself 17:04:23 twobitsprite: :) you picked the night before a holiday to ask your questions. Many of us may be traveling. 17:04:38 --- nick: Raystm2- -> Raystm2 17:06:10 Genetic programming model? 17:06:24 hi Raystm2 17:06:26 Raystm2: true I suppose... I'm not a big holiday person, so that didn't occur to me 17:07:03 Hey erider. Good day so far? 17:07:16 Raystm2: yeah... as in, generate a bunch of random programs, and run them all. Take those programs which best solve the problem and "breed" them resulting in new programs. Rinse, repeat. 17:07:35 It's a form of AI 17:07:38 yeah btw crc wrote me and said that he was having some problems with his dsl 17:08:02 Thanks erider. 17:08:08 twobitsprite: neat! 17:08:30 http://en.wikipedia.org/wiki/Genetic_programming 17:08:55 also he sent me an updated toka 17:09:21 Anyways, so I need to find a language that's easy to generate semi-random programs, and easy to splice into peices for "breeding" etc... while also being relatively fast and powerful 17:09:32 he said that he would be on when they fix the problem 17:10:09 twobitsprite: if your looking for a language that gets right close to the metal, can create languages that pertain directly to the problem domain, is fast and extreamly powerful in the right hands... Ya, Forth. 17:10:32 Raystm2: sweet... now, where do I start? :) 17:11:16 I'm on x86/win32... I need to find a good implementation mostly for playing around with. I want to get familiar with the language first, so I need something interactive for the time being 17:11:25 twobitsprite: Critics have argued that it is theoretically impossible, but more research is needed 17:11:49 erider: argued that what is theoretically impossible? 17:11:58 erider: GP? 17:12:00 Win32forth is good. gforth as well. 17:12:31 yes 17:12:59 erider: how is GP impossible? Perhaps you are misunderstanding what I am talking about... GP is used all the time to solve complex problems 17:13:56 the is what the webpage you just posted said 17:15:11 erider: ahh, you are taking that statement out of context... they are referring to meta-genetic programming 17:17:01 Raystm2: ok, so I have downloaded gforth... now I need a good tutorial... any suggestions? 17:18:06 I have strong programming experience with a variety of programming paradigms, so I don't need anything that'll talk down to me, just something to get me used to the syntax and structure of Forth programs... 17:18:40 http://ftp.complang.tuwien.ac.at/forth/gforth/Docs-html/ 17:18:56 You'll have a hard time finding Forth tutorials that talk down to you, trust me. 17:19:19 Even Starting Forth is pretty quick. 17:20:42 http://www.theforthsource.com/guide.html 17:23:30 I'll see how the gforth tutorial does... thanks erider 17:24:02 http://forth.sourceforge.net/test/mlg/website/forthlinks/rev0.html 17:24:15 Razor-X: yeah, I doubt many people come to Forth right off the bat 17:24:33 twobitsprite: I suggest first "Starting Forth" followed by "Thinkiing Forth" then "Programming Forth" all online. 17:25:03 I haven't read Programming Forth. Hmm. 17:26:05 I'll check them out... 17:26:21 for now, however, I've started the gForth tutorial, and I already have some questions :) 17:26:44 the gForth tutorial is asking me to enter "0 0 !" into gForth, but it complains when I do... stack underflow 17:26:59 er... "Invalid memory address" 17:27:00 Heh. I didn't try out all the examples. 17:27:12 http://ftp.complang.tuwien.ac.at/forth/gforth/Docs-html/Crash-Course-Tutorial.html#Crash%20Course%20Tutorial 17:27:37 ohh 17:27:38 twobitsprite: ask your questions, please, but I suggest "Starting Forth" for anybody not even remotely familure with Forth. It's that different. 17:27:44 I suggest Starting Forth, in fact. It seems beginner-ish, and it is a bit, but the course is laid out extremely well for those versed in programming. 17:27:48 I just finished reading the page... I guess it's supposed to mess up :P 17:28:10 :) ya that's a crash to show you a crash if mem servs. 17:28:15 ok, ok... I'll read that :P 17:28:18 :) 17:29:14 http://home.iae.nl/users/mhx/sf.html 17:29:24 The end lessons are tough though. 17:29:49 Like learning about pointers the first time over screaming ``I don't understand! I can't dereference cabinets!!!'' 17:29:53 then http://thinking-forth.sourceforge.net/ 17:30:16 then http://www.mpeltd.demon.co.uk/arena/ProgramForth.pdf 17:30:24 should last the weekend, I suppose. 17:30:44 What is Programming Forth about? 17:31:09 twobitsprite: you wont need all that to get started, obviously, but it's good to have when you do have a question and no one is around. 17:31:26 Razor-X at the risk of sounding flipant... :) 17:31:37 It's about Programming Forth. :) 17:31:43 What you say?! 17:32:15 Raystm2: I thought you liked thinking forth 17:32:31 i haven't heard of starting forth 17:32:41 o_O 17:33:03 hmm... I don't really have to program in all caps, do I? 17:33:09 I read the beginning of Thinking Forth, and didn't like it all that much. 17:33:12 I yell at my computer enough... 17:33:28 twobitsprite: If you want to look like you're from the 70's, it's more fun. 17:33:34 lol 17:33:46 what's the modern convention? 17:34:04 In gForth anyways, no. 17:34:26 ya, twobitsprite; no 17:34:57 ok... so you all use lowercase? is there any kind of convention for, i.e., capitalizing functions, or anything? 17:35:13 erider: "Starting Forth" was the online book I recommended to you when you were really doing some neat things with forth but kept asking newbie type questions. You promissed to read it. :) 17:35:45 I read the thinking forth book 17:36:35 wait is it the one with the F that one creates? 17:36:56 twobitsprite: you will find that all words in Forth _are_ functions. Some would use caps for ANS STANDARD WORDS and lower for their own or verse visa. 17:37:14 ( Large letter F ) 17:37:14 : STAR [CHAR] * EMIT ; 17:37:14 : STARS 0 DO STAR LOOP ; 17:37:14 : MARGIN CR 30 SPACES ; 17:37:14 : BLIP MARGIN STAR ; 17:37:14 : BAR MARGIN 5 STARS ; 17:37:16 : F BAR BLIP BAR BLIP BLIP CR ; 17:37:31 hehe. :) 17:37:38 Yeah, the blocks. 17:38:02 yeah I read that one then :) 17:38:04 you have to start somewhere... and with forth the best way to start is from the very begining, it's that different, isn't it erider. 17:38:27 yeah completely 17:38:33 Yeah. I agree. 17:38:41 its a head banger 17:38:43 Although it's quick to learn. 17:38:44 Oh twobitsprite do a /topic and get all those great links that Quartus put up. 17:38:53 Well, it was easier for me to grasp than Lisp. 17:38:58 not for me 17:39:04 Oh. 17:39:07 Ya Razor-X me too. 17:39:09 lisp was easy to learn 17:39:11 Lisp was a real head-banger for me. 17:39:38 Might be that it's bigest problem is it is so very simple that it escapes people who've learned other langs first. 17:40:20 Lisp took me a total of 40 hours. 17:40:22 I think it is that one has the thing about almost every detail 17:40:28 Forth took more like 4. 17:40:41 s/the/to 17:41:04 are we talking syntax? 17:41:17 No. Style too. 17:41:24 s/ng a/nk a/ ? 17:42:57 * erider is just not getting it 17:43:41 * erider pick C# over java in class and is pick C# up fairly easy 17:44:02 I've had only one real programming class in my life, heh. 17:46:38 I had a programming class in '74. I wrote in BASIC a program to print out a Snoopy on spreadsheet on a H/P mainframe dinosaur++. 17:46:55 really I just can't see the real world application of forth like some other languages 17:47:11 Hard disks drives as large as a washing machine. 17:47:32 lol 17:47:47 erider: that's because, where forth is used in the real world is in places that you may never see. 17:48:09 NASA space vehicals, cars, embeded electronics... 17:48:41 You'd have to be working for the firms that build and program those computers to _see_ most of the forth in the world. 17:49:24 wait they say that they use python :) 17:50:02 Forth is for programmers. Languages like Python and C# and Java is for protecting the programmer from himself. 17:50:22 What's ASM? 17:50:33 yeah? 17:50:47 erider. NASA does use Python. mostly in the webservers and web services. 17:50:55 (I agree with you, but was hoping for a humorous response.) 17:51:08 I can handle assembly easier than forth 17:51:16 Really? o_O 17:51:20 I can't. 17:52:29 hehe ASM is for "Real Programmers" ala ESR's story of Mel. I think that's the name of the guy. 17:52:49 yeah in assembly I don't have to do all the stack fiddling in my head I can move one thing from one area to another 17:52:50 But forth is a better ASM so... 17:53:12 If you factor correctly, how is stack acrobatics difficult? 17:53:39 It's not. erider just hasn't built the imagination required yet. He needs practice. 17:53:47 Ah. 17:53:48 its not but its how to put together for me 17:54:05 s/how/hard 17:54:31 I tend to work ``I have a plan up Step 12, at which point I'll let intuition handle it'' in all programming languages. 17:54:37 and I have to get use to some of the cryptic thingys 17:57:14 for instances how does one figure this out 17:57:19 : fib 0 1 17:57:23 begin 17:57:38 dup >r rot dup r> > 17:57:45 while 17:57:57 rot rot dup rot + dup . 17:58:04 repeat 17:58:12 drop drop drop ; 17:58:56 okay erider, we can take that step by step. 17:59:08 first it takes a number on the stack... 17:59:28 in scheme its easy to read 17:59:44 (define (fib n) 17:59:48 its easy to read in forth as well, just need practice. 18:00:01 (cond ((= n 0) 0) 18:00:05 In Haskell, it's not, if you use Haskell's infinite lists. Same if you use streams in Scheme. 18:00:13 :) 18:00:17 ((= n 1) 1) 18:00:36 (else (+ (fib (- n 1)) 18:00:54 (fib (- n 2)))))) 18:02:27 the are completely different one in almost plain english and the other is in space language 18:03:01 you think that lisp/scheme is plain english? 18:03:12 you had to learn to read that lisp 18:03:32 you have to hold lots of things in your mind as you read it. 18:03:46 one thing for every set of parens. 18:04:02 but they are thing that you see normally 18:04:24 dup >r rot dup r> > is crazy 18:04:47 what does dup do? 18:05:09 and you have to go word by word to follow the stack to figure out what going on 18:05:21 --- join: Snoopy42_ (i=snoopy_1@dslb-084-058-189-048.pools.arcor-ip.net) joined #forth 18:05:24 that is true. 18:05:47 so if you have to do that just to read it how can you think of that in forth 18:05:49 but you rarely have to keep more then 3 things in mind on the stack. 18:05:58 so what does dup do? 18:06:42 you I have to dup because the conditionals are destructive 18:06:50 s/you/yes 18:07:02 okay that's why but what does it do? 18:08:09 but that gets confessing with you have to rot and swap values then you don't know if you dup the wrong think so it take attention to details 18:08:35 Yes, programming does take attention to detail. 18:08:56 it take the TOS and make a copy and puts them on the stack 18:09:05 The stack is a very simple thing. First in -- Last out. 18:09:17 yes 18:09:24 ok so what is >r? 18:09:26 in assembly its a simple thing 18:09:43 this is an abstraction of assembler. 18:09:47 push to return stack 18:09:51 yes. 18:10:00 rot? 18:10:37 thats the three item on the stack and puts it at TOS 18:10:46 erider: do you want to write the entire assembler function for an action or would you rather reference it by it's label? 18:10:55 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 18:11:10 --- nick: Snoopy42_ -> Snoopy42 18:11:14 Raystm2: what do you mean? 18:11:40 in assembler we use labels to jump to the code that performs an action. 18:11:41 oops s/the/take 18:12:10 Forth words are like these labels. 18:12:58 ROT stands for the assembler instruction, ( in many forths) that moves the second and third items up the stack and puts the first in the third slot. 18:13:04 I don't see them as subroutines but I know that they are 18:13:34 ya. 18:14:04 rot (a b c -- b c a ) 18:14:38 rot ( a b c -- c a b ) 18:15:12 c is first on the stack. Why? cuz a and b got there first. 18:15:54 a goes on, b goes on, c goes on, then rot puts c in a's place and moves a to b and b to c. 18:16:35 the top of the stack is to the right. 18:16:36 a b c rot == b c a 18:16:57 wait, now i'm confused. :) 18:17:57 it take the three item and puts it on the TOS 18:18:09 yikes sorry erider. 18:18:22 you know more about it then me so you lead the class now. :) 18:18:38 ya a b c -- b c a 18:18:50 take the third item and rotate it up to the first. 18:19:04 take items 2 and three and move them down 1 18:19:33 I play with forth at least once a day but I'm not at the level to read anything with the language 18:19:42 ya. 18:19:55 s/read/write 18:20:17 well, you havn't quit, there is hope :) 18:20:30 I haven't 18:20:59 but I'm a little frustrated 18:21:29 I'm trying to get the loops down 18:21:30 You only fail at something if you quit. Well, I suppose there are things that can't be done. Hit a Nolan Ryan fastball comes to mind... 18:21:42 cool. 18:21:49 I'm still not getting them completely 18:22:12 I think I got the for-next one down 18:22:14 in colorForth there is one basic loop and one basic conditional and that conditional is not stack consuming. 18:22:47 really 18:22:47 in other forths there are every type of loop that you find in every other language. 18:23:15 ya erider. colorForth is so very simple that even forthers have a hard time with it. 18:23:20 you only need three 18:23:22 :) 18:23:28 maybe 18:23:45 you only need one and you can either make that work or turn it into the other three. 18:23:47 foreach style and while 18:24:01 and maybe a do-until 18:24:23 which one it that 18:24:24 yikes i lie again. 18:24:50 is* 18:24:56 cF has two. Words that have the name of the word before a semi-colon are re-entrant recursive. 18:25:07 for instance... 18:25:20 : name does-this-thing-over name ; 18:25:35 recursive 18:25:49 how do you clear the stack 18:25:49 ? 18:25:58 clearstack 18:26:00 twobitsprite: which lang? 18:26:04 oh gforth. 18:26:06 ya 18:26:26 or . 18:26:40 Raystm2: what do you mean "which lang"? is that different between interpreters? 18:26:54 twobitsprite: clearstack 18:27:02 erider thanks 18:27:28 no worries 18:27:40 ya, If mem serves win32forth doesn't have clearstack and I had to define it once so that my progy worked in both win32 and g. 18:28:32 Raystm2: there are something confessing like >in or in> 18:28:39 wow... reversing the order of three things on the stack is tuff... (don't tell me though :P) 18:29:09 and I haven't got the hang of r> >r 18:29:23 nevermind, got it :) 18:29:31 twobitsprite: erider also said that if you just want to clear the most recent thing entered on the stack you can use a . <-- that period is called dot and it prints a number from the stack to the display, 18:29:54 twobitsprite: I just started to use { } 18:29:54 Raystm2: yeah, I saw that in the book already, thanks though :) 18:29:56 but if you are not running a display then it's like dev nul. 18:30:18 Raystm2: i.e., in a program its like drop? 18:30:37 yes. 18:31:08 erider: ya those > before and after a word used to confuse me as well. 18:31:22 Raystm2: How do you define clearstack? Is there a word that tells you whether there's another element in the stack or not? 18:31:24 :) 18:31:55 I see them in a word a "TO" >r from stack TO RETURN r> from RETURN to STACK 18:32:39 Razor-X I used depth as both variations of Forth had it already defined. 18:33:02 Aha. 18:33:19 I suppose with out depth you can take the start Stack pointer and save it somewhere and then just go back to the start pointer. 18:33:20 Mind any typos. I'm field-testing my new for-purposes-of-being-silent keyboard :P. 18:33:29 Uggh. And my slow typing speed. 18:33:35 haha, :) 18:34:20 I love my IBM Model M to death. 18:34:45 But, there are hours by miaj gepatroj that I'm not legally allowed to be awake. 18:34:58 So this is for those times :). 18:34:58 Razor-X: the fun thing about that clearstack was that i had to learn to also drop the depth that gets added to the stack in both cases, empty vs. something on it. 18:35:01 depth? 18:35:11 erider: Try it in a Forth now ;) 18:35:22 depth returns the number of items on the data stack. 18:35:40 .s uses depth to tell you the stack count. 18:36:33 its counts the items on the stack and puts the result on the TOS 18:37:57 yes. isn't it funny. It gives you the count but the count is wrong because unless you do something with that count, there is one more item on the stack then the count says. :) 18:38:46 Yeah, heh. 18:38:50 of course, you would normally do something with that count... 18:38:54 so if you wanted to clearstack you would : testclear depth 0 do drop loop ; 18:38:54 ? 18:39:01 : my-clearstack depth 0 do drop loop ; 18:39:06 Yeah. 18:39:20 Try it out in a Forth instead of asking us ;) 18:39:32 I did :P 18:40:02 depth dup if for drop next then drop ; 18:40:16 yikes missed the exit 18:40:44 Mmf. Yours is complicated. 18:40:49 : clearstack depth dup if for drop next exit then drop ; 18:41:16 Raystm2: ok you are doing the retro thingy :) 18:41:23 not all forths have do 18:41:31 Oh? 18:41:32 they all have for 18:41:36 I didn't know that. 18:41:59 gforth has do 18:42:10 but I'm not sure if for 18:42:19 they all have for 18:42:28 retro would use " ;then" instead of exit. 18:42:59 gforth doesn't have ;then but it has then 18:43:22 --- quit: neceve (Remote closed the connection) 18:43:34 retro with Quartus' new ANS loaded could use exit. 18:43:50 so "do" take two items from the stack? 18:43:58 I suppose any ANS forth could use do. 18:44:03 yes 18:44:10 the count and the limit 18:44:20 Yup. do uses the return stack. 18:44:37 *also uses 18:44:38 I'm shaky at best 18:49:57 Raystm2: question 18:50:14 : test .s >r >r . r> r> .s ; 18:50:33 1 2 3 test <3> 1 2 3 1 <2> 2 3 ok 18:51:02 where did that "1" come from on the TOS 18:53:15 . 18:53:16 hi 18:53:56 you pushed the three to return, then the 2 then you printed the 1 then you popped the 2 then the 3 and you were left with that. 18:54:00 hi zpg :) 18:54:13 hey ray 18:54:15 up early or late? 18:54:31 late. no, he's asking why the first .s returns <3> 1 2 3 1 18:54:34 or rather, prints 18:54:35 it's not, 18:54:42 it's printing <3> 1 2 3 18:54:45 it doesn't sorry erider 18:54:46 and then you're printing 1 with the . 18:54:51 try 18:55:14 : test .s >r >r cr . cr r> r> .s ; 18:55:19 nice 18:55:34 ok 18:55:52 note that . consumes the top of the stack. so if you wish to print out the TOS for debug purposes, dup first 18:55:53 as in 18:55:59 : test .s >r >r cr dup . cr r> r> .s ; 18:56:03 zpg: a bit of the blind leading the blind here so... :) 18:56:15 also nice. 18:56:46 cool! I see it now 18:56:50 i need to be up early, but fancied a brief sojourn in #forth 18:56:51 :) 18:57:11 erider: yeah, it was just a display issue. i find it's often convenient to surround item's i'm printing with ==> <== just to be clear 18:57:23 :) 18:57:58 *__* 18:58:06 indeed, whatever you fancy 18:58:14 but outputting newlines is useful for clarifying input 18:58:25 thanks 18:59:03 : peek dup ." ==> " . ." <==" ; 18:59:07 3 peek ==> 3 <== ok 18:59:20 etc. 19:00:05 I see 19:00:42 but I'm not sure why we need to keep dup the stack 19:01:19 huh? 19:01:25 if your stack is 1 2 3 19:01:30 dup will give you 19:01:31 1 2 3 3 19:01:48 since "." consumes the TOS, that'll take (and print) "3" 19:01:52 leaving "1 2 3" 19:02:00 the original stack condition therefore preserved. 19:02:16 I see 19:02:53 erider: now print the 2 with out destroying its position on the second .s. 19:03:05 ok I was talking to Raystm2 about trying to solve problems in forth 19:03:23 erider: oh you mean, generally? 19:03:30 yes 19:04:20 Well, I suppose zpg said it. You didn't want to remove that 3 from the stack when you printed it, so you dup it. 19:04:22 i agree, it's a bit of a pain in the butt. 19:04:30 like factorial for instance 19:04:33 if you didn't mind removing the item then don't dup. 19:06:22 ah I see how to do the 2swap now 19:06:34 how? 19:10:08 you would use the >r r> operators 19:10:33 * Raystm2 has an u2swp \ under 2swap that leaves the top of stack and 2swaps the next 4 items. I use it in an implimentation of The Towers of Hanoi in colorForths. 19:11:45 That way I can keep all the addresses of each ring on the stack and I have keys set to swap rot u2swp and move them up down left and right. 19:11:48 erider: i take it you're thinking of ": my2swap rot >r rot r> ;" ? 19:12:51 to be honest no ;( 19:12:59 well try it 19:13:03 and think ==> 19:13:04 1 2 3 4 19:13:09 1 2 3 r: 4 19:13:14 2 3 1 r: 4 19:13:25 oops 19:13:26 I haven't worked it out but I was thinking that I have to use >r >r 19:13:30 i never get these clarifications right 19:13:33 1 2 3 4 19:13:45 1 3 4 2 19:13:52 1 3 4 r: 2 19:13:57 3 4 1 r: 2 19:14:01 3 4 1 2 19:14:05 :) 19:14:24 hopefully that makes sense 19:14:43 Sure it does. Well done, sir! :) 19:15:04 heh 19:15:09 like watching a forth work as you entered them. 19:15:11 well, my string< is ugly and doesn't work 19:15:26 erider: we could write a descriptive definition actually 19:15:42 really? 19:15:46 * Raystm2 reads >r as push and r> as pop. 19:15:49 : my2swap .s rot .s >r .s rot .s r> .s ; redefined my2swap ok 19:15:53 1 2 3 4 my2swap <4> 1 2 3 4 <4> 1 3 4 2 <3> 1 3 4 <3> 3 4 1 <4> 3 4 1 2 ok 19:16:05 you'll have to imagine the >r and r> in that example 19:16:09 hold on a sec though 19:17:22 erider, see all those .s that's just like puting printf statments in your c code. 19:17:57 you can build a .s that turns on and off so that you can test your code as you go. 19:18:02 yeah but then get confusing too :) just like earlier 19:18:23 s/then/they 19:19:53 Raystm2: on && off? 19:20:42 * Raystm2 doesn't quite understand the question. Thats a c and operator, no? 19:21:04 oh how to build one? 19:21:14 variable debug-mode ok 19:21:15 : stack. debug-mode @ if .s then ; ok 19:21:15 stack. ok 19:21:15 1 debug-mode ! ok 19:21:17 I use one in RxChess to turn on and off the stack. 19:21:19 stack. <0> ok 19:21:51 : blah 1 2 stack. 2drop ; ok 19:21:51 blah <2> 1 2 ok 19:21:51 0 debug-mode ! ok 19:21:51 blah ok 19:21:57 yes 19:22:24 i'd not redefine .s if i were aiming for debug stack printouts 19:23:13 not sure how Raystm2 went about it. 19:23:52 ya, dont redefine it, just use the stack. word that zpg just did and you can put stack. anywhere you want the stack to print when debugmode is on. 19:24:59 zpg: what do you use forth to do on a normal day to day 19:25:31 http://retroforth.org/projects/darcs/RxChess/RxChess.forth 19:25:32 i find it makes for good breakfasting, 19:25:44 though often i opt for muesli. 19:26:00 it's a bit spread out in that code, but if you want to see it... 19:26:02 a day by day decision i have to make. weighs on the soul. 19:26:31 haha :) 19:26:33 no kidding. 19:26:51 erider: seriously though -- i'm just tinkering in it for the time being. a few things irritate me greatly, and i lean towards languages with more data-structures built in. 19:26:58 I don't think i've ever had muesli. 19:27:32 for example, i have to write some string comparison code, string< and string> -- no biggy, but i seem run into this problem every other thing i want to do -- implement core functionality before getting to the crux of the problem. not sure whether this will prove to be too much overhead in the long run. 19:27:45 *for every other.. 19:28:02 having said that, i have some working code that uses an associative array built atop my list code, which works nicely. 19:28:20 ah I see so no one here use it as a SysAdin language to move and delete, edit files or run webservers 19:28:21 string comparison stuff that i wrote works well -- counted and paired string comparison code. 19:28:32 erider: i wouldn't dream of it. 19:28:56 not that i do that stuff anyway, mind. but i'd opt for a language with a dedicated toolbelt already built in. 19:29:55 I see 19:29:59 erider: while all those things are possible, most forthers are of the mind that if a problem is already solved... And besides, forth would have to be as large as windows to be as ubiquitous. 19:30:07 i also find constant stack manipulation might be a hurdle that proves irritating after a while. i know that factoring helps, but even so. 19:32:17 the stuff i do is concept-orientated, nothing low-level or embedded. as such, i tend to favour abstract layers to communicate the task as efficiently as possible in terms of me:computer, not in terms of computational efficiency. the latter isn't really a concern, especially in 2006. given that, and looking at my string< definition, it's a little frustrating. on the other hand (again, flip-flop we go) a wrote the equivalent of the lisp 19:32:17 code (member x a-list) in 10 mins, albeit rather badly. you CAN check whether a string is present in a list though. 19:32:22 ok then what would you guys say one should you forth for on a given day 19:32:52 so in my code, as it stands, you'd create a list as follows ==> { this is a list of tokens} and check whether a string is in there like this s" is" { this is a list of tokens } member? 19:33:13 which is pretty nice to work with once the bare essentials have been written. 19:33:22 erider: i don't follow. 19:33:28 and -- 19:34:17 ok then what would you guys say one should use forth for 19:34:19 Raystm2: 'late' is becoming 'early' -- 5-6 hours sleep isn't too promising. 19:34:40 --- quit: zpg ("ERC Version 5.1.3 (IRC client for Emacs)") 19:35:21 --- join: zpg (n=user@user-514d7663.l2.c2.dsl.pol.co.uk) joined #forth 19:35:37 oops 19:35:51 ok then what would you guys say one should use forth for 19:36:04 zpg: that rocks that you are using emacs ;) 19:36:06 well, that's a sign. erider -- i'll leave you in the capable hands of people who know something about forth. i've only been hacking it for a short time; it's enjoyable, different, interesting. 19:36:16 erider: always my friend. 19:37:07 that needs a comma 19:37:50 zpg: whats interesting about forth to you? 19:38:09 simplicity, extensibility, stack-orientation. 19:38:17 i have a bucket of gripes too. 19:38:40 simplicity? hmm 19:38:44 well exactly 19:38:47 a dual-edged sword. 19:39:07 computationally, it's very simple. programmatically, i'm not so sure. 19:39:15 i don't think the simplicity scales well 19:39:22 but others would no doubt disagree. 19:39:40 :) 19:40:26 what i failed to note above was how impressed i was by the cleanliness of implementing lists in forth. even with my clumsy code. 19:41:29 really? zpg do you do and parse text from text file? 19:41:33 but for word-based syntactically-simple programming, i'd suggest Smalltalk as a great case in point. forget the MVC/GUI stuff, you can write: 19:42:03 myObject isKindOf Array ifTrue: [ Transcript show: 'Well, so it is!' ] ifFalse: [ Transcript show: 'Nope. ]. 19:42:04 gst is interesting 19:42:21 i think that'll parse. 19:42:44 erider: no, it's all programmatic at the moment. written on the Palm. 19:42:59 you can say 1 2 3 4 4 make-list 19:43:02 oh! 19:43:14 you don't have forth on computer? 19:43:16 or s" hi" s" there" s" erider" 3 make-slist \ as in, make string-list 19:43:26 or that {} syntax i mentioned earlier. 19:43:27 yes, gforth. 19:43:47 ah ok and you use gst too? 19:43:48 the code works in both. 19:44:02 no, i never liked gst. i found that without a class browser, smalltalk was unwieldy. 19:44:12 i used Cincom's VisualWorks and Squeak 19:44:34 ah hmmm 19:44:42 * erider has gst 19:44:59 if you're interested in smalltalk and haven't tried other implementations, then ditch gst and check out VW or Squeak 19:45:08 gst isn't really smalltalk. 19:45:27 that is, smalltalk is not a base language, it's a dedicated environment. gst won't give you that. 19:45:42 I can seem to get Squeak running on my system 19:45:47 linux? 19:46:13 there is something truely wrong with my graphic stuff 19:46:17 and yes linux 19:46:47 yeah, it should run pretty easily. anyway, i have to head to bed otherwise i'll be even more stupified than usual tomorrow. 19:46:54 I can't run factor either 19:47:13 ok good night 19:47:17 thanks for your time 19:47:22 night, good luck with forth. 19:47:24 you're welcome. 19:47:33 night Raystm2, all. 19:47:43 --- quit: zpg ("ERC Version 5.1.3 (IRC client for Emacs)") 19:53:12 lol... : "2 4 ; 2 . 4 ok" :) 19:56:23 : 2 dup 2 = if 3 else 2 then ; 19:56:30 0 2 2 + . 5 ok 19:57:50 --- join: Snoopy42_ (i=snoopy_1@dslb-084-058-189-048.pools.arcor-ip.net) joined #forth 20:06:17 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 20:06:19 --- join: Snoopy42 (i=snoopy_1@dslb-084-058-189-048.pools.arcor-ip.net) joined #forth 20:07:11 --- quit: Snoopy42_ (Read error: 145 (Connection timed out)) 20:11:08 --- join: matju (n=matju@70.55.165.49) joined #forth 20:40:55 --- join: crc (n=crc@pdpc/supporter/active/crc) joined #forth 20:40:55 --- mode: ChanServ set +o crc 20:40:58 --- quit: crc (Read error: 104 (Connection reset by peer)) 20:49:23 --- join: crc (i=crc@pdpc/supporter/active/crc) joined #forth 20:49:23 --- mode: ChanServ set +o crc 20:49:27 --- part: Razor-X left #forth 20:49:30 --- join: Razor-X (n=user@user-11faaoj.dsl.mindspring.com) joined #forth 20:51:30 Hey. 20:52:04 hi 20:52:10 How are things? 20:52:33 pretty good 20:54:21 This is good. 20:54:52 my dsl connection is not operational though :( 20:55:28 There is always something. 20:57:07 yup 20:57:26 at present I'm using a windows box with AOL dialup 20:57:31 slow, but it works 20:58:58 I've had to waste two days compensating for the stupidity of others, myself. Tiring business. :) 21:14:03 --- join: crest_ (n=crest@p548947DC.dip.t-dialin.net) joined #forth 21:21:12 --- quit: Crest (Read error: 110 (Connection timed out)) 21:34:50 --- join: arke_ (n=Chris@pD9E05CA3.dip.t-dialin.net) joined #forth 21:51:55 --- quit: arke (Connection timed out) 22:00:01 --- quit: nighty ("Disappears in a puff of smoke") 22:33:41 --- nick: arke_ -> arke 22:35:52 --- quit: crc () 23:59:59 --- log: ended forth/06.11.22