00:00:00 --- log: started forth/06.10.27 00:26:18 --- join: zpg (n=user@user-5440eceb.wfd80a.dsl.pol.co.uk) joined #forth 00:39:50 --- quit: Cheery ("Download Gaim: http://gaim.sourceforge.net/") 00:42:13 --- join: Cheery (n=Cheery@a81-197-19-23.elisa-laajakaista.fi) joined #forth 01:50:44 --- quit: segher (Nick collision from services.) 01:50:58 --- join: segher (n=segher@dslb-084-056-129-107.pools.arcor-ip.net) joined #forth 01:55:23 --- nick: arke_ -> arke 02:42:49 --- join: vatic (n=chatzill@pool-162-84-156-148.ny5030.east.verizon.net) joined #forth 02:50:55 --- quit: neceve_ (Read error: 145 (Connection timed out)) 02:51:16 --- join: fission (n=fission@pdpc/supporter/active/fission) joined #forth 02:52:59 hi 02:56:52 --- join: neceve_ (n=claudiu@unaffiliated/neceve) joined #forth 03:45:59 --- quit: Bushmills ("Terminated with extreme prejudice - dircproxy 1.0.5") 04:08:58 afternoon gents. 04:10:14 hi 04:10:23 though it's early morning (or late evening for me) 04:11:34 --- join: virl (n=virl@chello062178085149.1.12.vie.surfer.at) joined #forth 04:11:50 hi fission, virl 04:13:29 --- quit: neceve_ (Read error: 145 (Connection timed out)) 04:20:37 --- join: neceve_ (n=claudiu@unaffiliated/neceve) joined #forth 04:24:43 --- join: crest_ (n=crest@p54895F0E.dip.t-dialin.net) joined #forth 04:35:26 --- quit: crest__ (Read error: 110 (Connection timed out)) 05:21:03 i quite like this -- my reverse-list code (it does slightly more than one might expect) -- http://ezil.sourceforge.net/latest/rl.html 05:21:19 preserves type information, but is non-destructive. 05:46:53 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #forth 05:47:05 --- join: nighty_ (n=nighty@sushi.rural-networks.com) joined #forth 09:13:44 --- log: started forth/06.10.27 09:13:44 --- join: clog_ (n=nef@bespin.org) joined #forth 09:13:44 --- topic: 'Welcome to #forth. We discuss the Forth programming language and a variety of technical subjects. Introduction: http://tinyurl.com/kvawv | Starting Forth: http://tinyurl.com/rm7pq | Thinking Forth: http://tinyurl.com/nsy4j | Gforth compiler: http://tinyurl.com/s8uho | ANS/ISO Forth Standard doc: http://tinyurl.com/nx7dx | http://quartus.net/search | Paste: http://forth.pastebin.ca' 09:13:44 --- topic: set by Quartus on [Tue Oct 24 17:49:49 2006] 09:13:44 --- names: list (clog_ ASau Snoopy42 Ray_work nighty_ timlarson_ crest_ neceve_ virl fission zpg virsys arke cmeme timlarson TreyB jcw Zarutian @Quartus_ @JasonWoof nanstm @crc madwork larsb I440r ohub @Quartus nighty ccfg madgarden clog lukeparrish juri_ warpzero) 09:30:00 --- join: snowrichard (n=richard@12.18.108.162) joined #forth 09:31:18 hi 09:33:16 --- quit: snowrichard (Client Quit) 09:38:39 --- quit: madwork (Read error: 104 (Connection reset by peer)) 09:39:46 --- join: profit (i=azekePro@82.200.251.139) joined #forth 09:40:37 --- join: madwork (n=foo@204.138.110.15) joined #forth 09:41:00 Privet! 09:41:45 Hi, ASau. 09:42:00 Ty na rabote ili kak? 09:42:12 I'm at home. 09:42:17 OK. 09:43:45 Do you know, how hard is implement fork-exec in WinNT environment? 09:44:33 I've written vfork-execvp wrapper to run commands from Gforth. 09:45:17 --- quit: clog (Connection timed out) 09:45:18 --- nick: clog_ -> clog 09:45:20 I'm more UNIX-oriented, though you know it is interesting to use SPF too. 09:45:36 Don't ask me.. I'm not very good at it. I mean deep core thing and et al. 09:46:00 Alright. 09:47:15 ASau, why don't you use russian room on forth.spb.ru? 09:47:49 Because I've heard of it for first time now. 09:47:50 We're gatherring there each evening. 09:47:58 I see... 09:48:24 Lemmesee... 09:48:37 There russian forth-related forum, and forum has its own channel... 09:48:44 http://fforum.winglion.ru/ 09:51:04 I don't like forums. 09:51:06 Konnichi wa! 09:51:08 forth.spb.ru 09:51:08 09:51:08 Sorry, site is under construction. Please visit later... 09:51:23 USENET is distributed. 09:52:57 http://fforum.winglion.ru/to_irc.htm 09:53:11 Web interface for irc-channel. 09:54:58 --- join: forther (n=forther@c-67-180-209-27.hsd1.ca.comcast.net) joined #forth 09:55:37 profit: You mean Java. I don't like coffee. 09:56:36 Allright then.. No go.. 09:58:06 Well, I think irc.spb.ru is from IRCNet or of that kind. 10:07:52 I was told, that somebody was asking about SEAforth simulator in here 10:10:18 hi forther. I don't recall who that was, but I'm interested. I'm also working so i'm in and out. 10:11:23 I think I can answer some of these 10:19:08 maybe that was me.. 10:19:21 but that was perhaps weeks ago.. 10:20:22 I just heard about on another forth channel 10:20:24 it's nice that intellasys put the opcodes on the website 10:20:49 actually the source of the simulator is more informative 10:21:28 yeah it is.. but it's also very confusing 10:21:47 when you can understand 100% of it, then you get my respect 10:22:19 what exactly is confusing? 10:24:10 it's unreadable at a lot of places 10:27:53 --- join: I440r_ (n=mark4@67.135.84.40) joined #forth 10:29:37 forther: another forth channel? 10:29:57 yes, but it's in russian 10:30:19 Russian evening? 10:30:45 Host & port, please? 10:30:59 + coding. 10:31:05 utf.rusnet.org.ru:7770 10:31:12 utf 10:31:15 --- join: snowrichard (n=richard@12.18.108.162) joined #forth 10:31:22 #forth 10:34:53 hi 10:35:12 saddly, I don't know the language. :( 10:35:19 hi snowrichard :) wb 10:35:50 found a #hercules channel on here about the emulator I'm using, but there's only 1 person there and he/she's away 10:36:04 :0 10:38:07 its really windy today 10:39:08 you don't know which language? 10:41:16 Russian obviously. 10:41:56 Ray_work: you can try to speak English, though I don't know if it can help. 10:45:32 :) 10:56:24 --- quit: snowrichard ("Leaving") 11:16:37 --- join: erider (n=erider@unaffiliated/erider) joined #forth 11:47:34 List stuff: http://forth.pastebin.ca/224003 12:01:32 Quartus interesting 12:01:55 Bit more concise than the last one. 12:01:56 its shaping into lisp like stuff 12:03:10 The lists aren't typed, so it's not Lisp, just lists. 12:03:16 Quartus what are you working on with these words 12:03:54 I built an associative array facility on top of them, and a memoization facility on top of that. 12:05:05 for anything special or just for fun 12:05:38 I'm writing a book on Forth. 12:06:56 ah I see some you want to cover all the bases 12:07:59 In part, to show different language and data-structure concepts and how they can be implemented. 12:11:46 Quartus so you decided to use a lisp like notation with car and cdr hmm interesting Q you maybe a moonlighting lisp guy :) 12:12:46 I find they parse better than 'first' and 'rest', which don't always mean 'first' and 'rest'. car and cdr are more ambiguous tags for the first and second elements in a cons. 12:15:57 Speaking of, I think I'll rename these words so the list words indicate that they take a list argument: http://forth.pastebin.ca/raw/225096 12:15:58 [car|cdr]--->[car|cdr]---->[car|cdr]---->[nil] 12:16:00 --- join: vatic (n=chatzill@pool-162-84-156-148.ny5030.east.verizon.net) joined #forth 12:16:16 oops: http://forth.pastebin.ca/225096 12:17:08 erider, that's not right; you can't cdr from a car. 12:17:57 huh? 12:19:16 No guarantee the car is itself a cons. 12:20:42 you have a box lst = [car 1 2 3|cdr 4 5 6 ]--> (car lst) = (1 2 3) cdr = (4 5 6) if you have a list (1 2 3 (4 5 6)) 12:20:46 (cdr (car (cons 1 2))) -> *** - CDR: 1 is not a list 12:21:31 oops ((1 2 3) (3 4 5)) 12:23:09 You can set up a cons of two lists, but you can't in the abstract assume you can cdr into any car. 12:24:06 the car and cdr are one cell that has two halves 12:24:46 One cons. Two associated elements. 12:26:05 (car '(1 2 3)) = 1 (cdr '(1 2 3)) = (2 3) 12:26:19 Yes. 12:26:30 [2 3] --> nil 12:26:52 so you have 2 and 3 and it still points to nil too 12:27:10 What notation is [x y]? Not clisp. 12:27:11 nil being an empty list () 12:27:21 I know 12:27:48 thats is to represent cons cell :) 12:28:53 (cons 2 3) does not point to anything. 12:29:12 The resulting cons, that is. It's got 2 in its car, 3 in its cdr. 12:29:33 It's (2 . 3) 12:29:36 car removed the first item with not really. it did remove anything but it shows the first element and the cdr show the remaining 3 elements the 2 3 and nil list 12:29:49 s/with/well 12:30:12 car and cdr don't remove anything from a cons, they just retrieve it. 12:30:20 I know 12:30:31 that what I just said :) 12:30:48 sorry if it doesn't make sense 12:30:49 (cons 2 3) does not point to nil in any way. 12:31:13 you all was have a nil 12:31:28 that represents an empty list ie () 12:31:50 In a list context, yes. A (cons 2 3) is not a list, it's a cons'd pair. 12:32:26 if you have items in a list and you retrieve the items you will leave the empty list correct? 12:32:44 Retrieval is not removal. Do you mean remove? 12:33:04 no I mean retrieval 12:33:06 --- quit: ASau (Read error: 104 (Connection reset by peer)) 12:33:15 Retrieving items from a list does not empty the list. 12:33:46 whats the last item to retrieve in a list? 12:33:52 --- join: ASau (n=user@195.98.180.4) joined #forth 12:33:56 Whatever the last item is. 12:33:58 the list itself right 12:34:06 No. 12:34:08 no 12:34:11 the nil list 12:34:25 nil indicates the end of a list. 12:34:33 correct 12:35:05 but the cdr retrieves that as well right 12:35:13 Fire up clisp, show me how you can get nil out of (cdr (cons 2 3)) or (car (cons 2 3)) 12:35:25 ei. (car '(1 2 3)) = 1 (cdr '(1 2 3)) = (2 3) 12:35:43 (2 3) = 2 3 () 12:36:19 (2 3) is not (cons 2 3). That's what I was asking you a page up -- what is [2 3] supposed to indicate? You said it was to represent a cons cell, (cons 2 3). 12:36:38 ah lol 12:36:47 A cons cell is not a list. 12:36:54 sorry I thought we were talking about a list 12:37:22 So again, you cannot arbitrarily cdr into a car; the car may or may not be a list. 12:37:38 but cons is used to construct a list 12:38:02 cons can be used to construct lists, but it can just as easily produce any pair, as in (cons 2 3), which is in no way a list. 12:38:18 true 12:38:38 but I thought we were talking about a list 12:38:40 Try (cdr (car (cons 1 2))) 12:39:22 that well not work 12:39:50 Correct. So [car|cdr]--->[car|cdr]---->[car|cdr]---->[nil] is not right. 12:40:53 no I'm was representing a list 12:40:59 of car and cdr 12:41:31 ie ((1) (2) (3) ()) 12:41:47 that was a list 12:42:09 That's a list containing 1 2 3 and an empty list. (1 2 3) does not contain an empty list. 12:42:46 --- quit: virl (Read error: 104 (Connection reset by peer)) 12:42:46 because if you start to use caar or cadr etc.. then you will follow the cells to retrieve the item wanted 12:43:02 Actually ((1) (2) (3) ()) is a list containing four lists. 12:43:28 and the list itself 12:43:31 ( ) 12:43:32 --- join: virl (n=virl@chello062178085149.1.12.vie.surfer.at) joined #forth 12:43:48 its a list of four 12:43:55 It's a list containing four lists. 12:44:10 and it last thing is the empty list 12:44:24 right 12:44:29 The fourth list is an empty list. That's a different animal from (1 2 3) or even (1 2 3 ()) 12:44:32 but whats the last item 12:44:44 the list right 12:45:01 No. ((1) (2) (3) ()) does not contain a reference to itself. 12:45:12 if you get the last item its going to be (()) right? 12:45:32 The last list in ((1) (2) (3) ()) is (), not (()) 12:45:33 --- quit: forther ("ChatZilla 0.9.61 [Mozilla rv:1.7.8/20060926]") 12:46:06 hi 12:46:09 hi zpg 12:46:13 New list code up. 12:46:15 * erider is firing up sbcl or wait chicken 12:46:18 hey Quartus, yeah just looking 12:46:26 http://forth.pastebin.ca/225096 12:46:42 oh, newer 12:46:49 neat, see my reverse-list? 12:47:01 I don't think so. 12:47:11 http://ezil.sourceforge.net/latest/rl.html 12:47:24 clone-cons preserves type information while ensuring reversal is non-destructive. 12:48:25 so, copy-cons. 12:49:08 yes 12:54:02 zpg, does your reverse-list make a new list? 12:59:14 #;4> (define *lst* '((1) (2) ())) 12:59:14 #;5> (cddr *lst*) 12:59:14 (()) 12:59:14 #;6> 12:59:30 yes. 13:00:55 #;6> (car(cddr *lst*)) 13:00:55 () 13:00:55 #;7> 13:01:27 Yes. (()) and () are not the same thing. 13:01:50 --- join: forther (n=mic@c-67-180-209-27.hsd1.ca.comcast.net) joined #forth 13:02:36 :) ok maybe we are saying the same thing but I'm explaining it wrong 13:03:13 * erider searchers for a representation on line to explain 13:03:23 A list containing a NIL list is not the same thing as an empty list. 13:03:37 Or, if you like, a list containing an empty list is not the same thing as an empty list. 13:04:05 ok its may english then :) cool 13:04:26 ok I'm talking about nil list :) 13:05:15 '((1) (2) (3) ()) is not the same as '(1 2 3 ()) or '(1 2 3) 13:05:37 * erider still thinks that Q is a closet lisp guy :) 13:05:51 hehe. 13:05:51 I know a little lisp; I've never written anything of substance in it. 13:05:54 hi Quartus. 13:05:58 Hi Ray_work. 13:06:08 I know a bunch of languages. It think it's foolish not to. 13:06:38 Funny, I only know one spoken language, but so many programming. 13:06:53 * erider thinks that Q like lisp a little more than others ;-) 13:07:09 Ray_work: Learn Russian. 13:07:20 I should. I like the way it sounds. 13:07:42 I like the neat characters that I don't recognize by any means. 13:07:47 Ja russkij by vyuchil tol'ko za to, chto im razgovarival Lenin. 13:07:55 :) 13:08:51 Ray_work: spanish is sexier :) 13:09:10 hell, German is. 13:09:22 Klingon is. :) 13:09:28 I agree. I am learning some from all of the undocumented workers around here. Texas you know. 13:09:39 Quartus :) 13:09:49 lol 13:10:03 Quartus forth is very sexy. Might make me some money. 13:10:30 Good deal. 13:10:39 There's a klingon version, actually. 13:10:45 And a German, and a Russian. 13:10:50 And Spanish. 13:10:52 And several others. :) 13:11:14 Portuguese? 13:11:22 Yes. 13:11:37 great! 13:12:54 "divisão por zero em operação de ponto flutuante" 13:13:05 Portuguese? 13:13:15 "How do I love thee? Let me count the ways." 13:13:53 Que Otimo! 13:14:04 Well, knowing English it is not hard to understand error messages. 13:15:00 I can't display the russian here, it's in another codepage. 13:15:49 Quartus do you use scheme or lisp? 13:16:06 erider, not for any serious purpose. 13:17:51 any reason why? 13:19:22 I also don't use fortran, snobol, apl, pascal, logo, cobol, or rexx for any serious purpose, though I know them. 13:22:40 do you feel that you can produce faster in forth than the others 13:24:35 Probably. I've never timed it. The Forth code comes out better. 13:27:22 Q what do you think about O'caml 13:28:51 --- quit: timlarson_ ("Leaving") 13:29:04 Pure functional approaches to programming don't appeal to me much. 13:29:53 hmm so haskell is not a language that you would like 13:31:06 I don't dislike it, I just wouldn't choose it for real-world development. 13:31:37 haskell a language which I tried to understand. Somehow I don't like the approach of not thinking in well known ways but in mathematical ways 13:31:43 * erider is interested to hear why Q thinks that way 13:32:54 erider, have a look at the wikipedia article on quicksort in haskell. 13:33:30 the short, clean, pretty implementation in haskell is, unfortunately, the slowest possible one. 13:34:09 The abstractions available in a pure-functional language do not map particularly well to real computers. 13:34:23 --- join: scott_ (n=scott@dialup-4.242.120.69.Dial1.Seattle1.Level3.net) joined #forth 13:34:29 despite their aesthetic mathematical appeal. 13:34:52 I don't think so. 13:35:36 hmm 13:35:40 Abstractions has no direct connection with "real computers". 13:35:58 Quartus_: sorry, on and off. yes it does, non-destructive new list 13:36:12 note the initial nil in the definition. it begins consing copied cells to a new list and returns its head 13:36:18 If you look at realisation, you'll see FL is perfectly 13:36:18 fitted to real computers. 13:36:21 zpg, suggest ( list1 -- list2 ) then 13:36:47 * zpg nods 13:37:00 Especially to modern ones, with their buses and multi-step queues. 13:39:42 i still like kay's definition of smalltalk as a communication medium. 13:40:14 all programming languages are communications media. 13:42:53 it depends on the emphasis of the language. some seem to place emphasis on instructing the machine what to do in terms of mechanical processing. smalltalk models this communication at a more abstract concept level 13:43:09 --- join: ASau` (n=user@195.98.180.4) joined #forth 13:45:14 that's a muddy way of saying -- which way is the communication biased? 13:46:22 Quartus_: a question for you -- Forth and C are both (roughly) a few decades old -- where do we go from here? 13:47:36 zpg, let me get back to you on that. 13:47:52 :) as in, 'give me 10 years' or 'give me time to think'? 13:48:47 some of each :) 13:49:42 :) 13:57:23 --- quit: scott_ ("Ex-Chat") 13:59:26 --- quit: Ray_work (Read error: 104 (Connection reset by peer)) 13:59:49 --- quit: ASau (Read error: 101 (Network is unreachable)) 14:01:25 --- join: ScottHGN (n=scott@dialup-4.242.120.69.Dial1.Seattle1.Level3.net) joined #forth 14:01:37 test 14:01:59 tst 14:04:12 Q what languages do you think one should have in their tool box 14:04:44 erider, I'm on the road, tied up. Back in a bit. 14:05:32 ok 14:27:12 good evening 14:27:20 hi crc 14:28:18 hi crc 14:28:27 erider, to be a good programmer you need to learn as many different languages as you can. 14:30:17 and I mean 'different', not just all Algol-derivatives. 14:30:19 Quartus do you have a good list 14:30:45 thats mainly all languages 14:31:18 --- join: jackokring (n=jackokri@static-195-248-105-144.adsl.hotchilli.net) joined #forth 14:32:28 so Assembly, C, Forth, Lisp, Lua is a ok list? 14:32:54 Non-algol: lisp, forth, smalltalk, apl or j, for instance. 14:33:32 assembly isn't one language; learn a few of those. 14:34:09 for different processors? 14:34:25 --- quit: ASau` (Read error: 113 (No route to host)) 14:34:29 m4 or another complete macro-processor, also good. 14:35:01 we should one start? pick one and learn it and use it for a year or two or bounce around 14:35:23 s/we/where 14:36:51 It's a question of understanding the structures, abstractions, and concepts, and being able to cross-apply them to a given problem. 14:37:58 so one should practise different languages at the same time? 14:39:26 if that works for you. Learning is an individual process. 14:40:55 --- join: Bushmills (n=l@wpc3131.amenworld.com) joined #forth 14:42:19 By learn, I mean learn what's different about each language, and how to leverage it. Don't learn just how to write in a C style in APL or Forth, for instance. 14:43:01 it's the old adage about how if all you have is a hammer, every problem looks like a nail. Have more mental tools. 14:43:23 hmm 14:43:32 yes. stones can be used to drive nails, too :) 14:44:00 And they gather moss, unless they roll. 14:44:43 a pair of tweezers are not very functional. rubbish. takes too long to drive the nails in with them. 14:45:11 --- quit: ScottHGN ("Ex-Chat") 14:45:38 for real-world work, I have a personal preference for languages in which the abstract machine is similar to the actual machine. 14:46:20 Quartus why do people fight tooth and nail "no pun intended" about their language of choice? 14:47:52 Intellectual territorialism, I think. Most so-called programmers know only part of one language, and it was hard for them to understand, so they feel threatened or potentially marginalized any alternate approach. 14:49:47 while I would say forth is hard to follow for me right now but I'm not going to kill someone if they don't use the language I like lol 14:49:52 there's an epiphany to be had in realizing that the map is not the territory; moreover, there's more than one useful map. 14:51:32 erider, that's good. Try not to kill anyone, good advice generally. :) 14:51:43 a lot of the languages look alike in syntax 14:52:36 true 14:54:26 I like lisp and the way it looks 14:54:45 and the syntax is easy 14:55:18 but I'm don't think its the tool for a lot of jobs 14:55:58 --- join: jackokring[1] (n=jackokri@static-195-248-105-144.adsl.hotchilli.net) joined #forth 14:59:53 Quartus have you every used lua? 15:03:04 --- quit: jackokring (Read error: 113 (No route to host)) 15:08:56 hi Quartus_! I'm working with pipes in gforth and gnuplot and am curious what the best way to send a line feed would be. Sort of: s" \n" fid write-file 15:09:25 --- quit: Quartus_ (Read error: 104 (Connection reset by peer)) 15:14:28 --- join: Quartus_ (n=Quartus_@209.167.5.1) joined #forth 15:14:28 --- mode: ChanServ set +o Quartus_ 15:20:38 Quartus: hi Quartus_! I'm working with pipes in gforth and gnuplot and am curious what the best way to send a line feed would be. Sort of: s" \n" fid write-file 15:20:53 --- quit: jackokring[1] (Read error: 113 (No route to host)) 15:21:31 hey. create lf 10 c, ... lf 1 chars fid write-file 15:22:17 I'd call that LF actually. 15:23:21 s\" \n" is a Gforth thing. 15:23:56 erider, no. 15:23:57 Quartus: cool! mine was much cruder, but in the ballpark: variable nl 10 nl ! nl 1 fid write-file ... 15:24:00 --- join: jackokring (n=jackokri@static-195-248-105-144.adsl.hotchilli.net) joined #forth 15:24:07 huh? 15:24:15 vatic, don't think yours would work. Would depend on endianness. 15:24:20 ah ok you are talk about the lua 15:24:21 erider, re lua 15:24:27 Quartus: yeah, but the the gforth thing isn't prtable. ;-) 15:24:34 vatic, unless you write a s\" 15:24:43 portable/potable 15:25:14 Quartus: huh? s\" is ANS? 15:25:19 No. 15:25:25 But it can be written in ANS. 15:26:09 Quartus: I'm happier with your create LF 1 c, 15:26:17 10 c, 15:26:34 oops! right 10 c, 15:27:02 In some regards s\" \n" is more portable. 15:27:28 How so? 15:27:34 \n may be one or two characters. 15:28:18 Quartus: ah yes... CRLF 15:28:39 Quartus did you use CREATE instead of VARIABLE? 15:28:43 I did. 15:29:28 Quartus: oops! WHY did you use? 15:30:03 It's simpler. 15:31:13 In terms of what's written, or internally, or both? 15:32:34 Both, I think. 15:33:08 Ok. Thanks for your help! 15:33:22 Always enlightening... :-) 15:34:11 Sure :) 15:34:13 Keep a-forthing. 15:35:42 Quartus: I'm not looking back, thanks to you! ;-) 15:35:44 --- quit: jackokring (Read error: 113 (No route to host)) 15:37:39 --- part: forther left #forth 15:38:03 Glad to hear it! :) 15:39:17 --- join: forther (n=forther@67.180.209.27) joined #forth 15:40:36 --- quit: zpg (Read error: 104 (Connection reset by peer)) 15:41:44 --- join: zpg (n=user@user-5440eceb.wfd80a.dsl.pol.co.uk) joined #forth 15:46:24 --- join: jackokring (n=jackokri@static-195-248-105-144.adsl.hotchilli.net) joined #forth 15:52:27 --- join: snowrichard (n=richard@12.18.108.162) joined #forth 15:52:47 hello 15:53:13 hey Snoopy42 15:53:14 damn 15:53:15 hey snowrichard 15:53:26 never hear from snoopy 15:56:13 so how are you? 15:56:27 Not bad. You? 15:56:53 kind of in a manic cycle. just took my meds so I can try to sleep tonight 15:57:32 stayed up last night watching movies and trying to program an assembler 370 example. 15:57:55 You have a 370 for which you need to write software? :) 15:58:03 emulation of course 15:58:08 hercules 15:58:52 I was just going through some books, found a BAL book. 15:59:08 I've download the Pom and the assembler manual 15:59:27 I once was forced to write in it. 15:59:58 I had 2 classes in it. I was writing macros in the first course and that wasn't even covered in that course 16:00:20 Yes, it's not complex, just clanky. 16:02:00 the second class spent a lot of time on packed decimal arithmetic which most people would have done in COBOL 16:02:25 and a little bit on floating point. 16:02:32 The 370 supports packed BCD because of COBOL, I think. 16:02:39 A chicken-and-egg deal. 16:03:20 but it did make you think about scaling numbers so you didn't overflow the fields 16:03:26 There are still bcd operators in the latest & greatest *ium chips, which amuses me. 16:04:07 6502 had a decimal mode flag 16:04:20 True. 16:05:02 which if you didn't preset to the proper state, your cassette tapes timing would be off and they wouldn't read ;) 16:05:44 on the kim-1. bit-banger cassette output 16:05:55 On the C64, too. 16:07:40 --- quit: erider (Read error: 104 (Connection reset by peer)) 16:08:02 --- join: erider (n=erider@unaffiliated/erider) joined #forth 16:08:33 it still amuses me how a multimillion dollar Navy system for ASW was disabled by a $50 cassette drive going out. 16:08:44 Quartus do you run forth code on outside files or system environment stuff. ie SysAdmin functions 16:08:59 I don't SysAdmin presently, erider, except my own stuff. 16:09:22 thats what I mean 16:09:27 --- quit: jackokring (Read error: 110 (Connection timed out)) 16:09:44 What do you mean, 'on outside files'? Are there 'inside files'? :) 16:09:50 do you do housekeeping stuff with for like controlling scripts 16:10:29 I have some scripts in Forth, some in Perl, some in Awk, some in .cmd, some in bash. 16:10:30 do you do housekeeping stuff? like controlling scripts 16:13:17 I just have been looking at some of the forth postings and they just seem internal to forth or the source code only but I wanted to ask you if you used it for external thingys outside the forth environment or text interpreter 16:13:33 Yes. 16:13:57 Most useful software interacts with the outside world in some way. 16:15:56 brb 16:18:06 k 16:19:37 --- quit: snowrichard ("Leaving") 16:41:57 --- part: Bushmills left #forth 17:06:31 --- join: zpg` (n=user@user-5440ce4e.wfd78a.dsl.pol.co.uk) joined #forth 17:13:41 --- quit: zpg (Read error: 148 (No route to host)) 17:23:38 --- part: profit left #forth 18:20:27 --- quit: cmeme (Connection timed out) 18:24:39 --- join: cmeme (n=cmeme@boa.b9.com) joined #forth 18:42:23 --- quit: forther ("Leaving") 19:14:42 --- quit: vatic ("*poof*") 19:20:32 --- join: slava (n=slava@CPE0080ad77a020-CM000e5cdfda14.cpe.net.cable.rogers.com) joined #forth 19:20:32 --- mode: ChanServ set +o slava 19:20:37 greetings luddites 19:20:42 THINK !!! 19:37:01 hi all 19:38:47 what is the | in forth? 19:38:48 can't talk, busy THINKing. 19:38:58 FOOLS !!! 19:40:33 in retro we use it for a comment. 19:41:21 If you mean what is the OR operator in Forth, it's OR. 19:58:37 http://xkcd.com/c138.html 19:59:43 its also used in various forths to create headerless definitions i believe 20:11:36 n 0 < if is this n less than 0 or zero less than n? 20:11:56 I use | in a BNF module to indicate alternative productions. 20:12:16 5 0 < -> false -5 0 < -> true 20:13:07 or so left to right cool! 20:13:16 you can try these things out, you know. 5 0 < . -> 0 20:13:24 -5 0 < . -> -1 20:14:00 -1 = true right? 20:14:04 Yes. 20:14:14 true . -> -1 20:14:30 any non-zero :) 20:14:46 < and the other comparison words all return a well-formed flag, all 1 bits or all 0 bits. 20:15:28 question 20:15:48 why do I have to dup the stack with using if 20:16:07 You don't. 20:16:11 ie dup 0 < if do something endif ; 20:16:17 IF consumes an item on the stack. You don't have to DUP it unless you need to use it again. 20:16:19 You only dup it if you wish to preserve the value you're tetsing against. 20:16:29 And it's not endif. 20:17:50 its not 20:18:05 that what it is in the gforth manual 20:18:11 so it's more convenient and efficient to use dup on a consuming function than drop on a non-consuming word? 20:19:03 Somewhere I thought I read that endif was a synonym for then, and was (in their minds) the preferred form. Like erider said, I think that was in the gforth manual. 20:19:07 THEN is the Standard word, and it's the one Moore came up with. ENDIF is aliased to THEN in gforth, as a nod toward FIG, which only had ENDIF. 20:19:39 even charles moore says, you need an OpSys 20:19:56 FIG Forth was the only divergence. PolyForth had THEN, miniForth had THEN, microForth had THEN, Forth-79 had THEN, Forth-83 had THEN, Standard Forth has THEN. 20:20:11 iForth has ENDIF 20:20:31 iForth is only compatible with iForth. 20:20:33 gforth you can use ENDIF 20:20:35 Forth's use of THEN clashes with the way it is used in most other languages. 20:21:02 Forth's use of IF clashes with the way it is used in most other languages. 20:21:14 I like ENDIF it makes sense 20:25:40 --- quit: nanstm (Read error: 110 (Connection timed out)) 20:26:12 THEN is being used in a directly opposite way though. IF is just slightly different due to the fact that we are using the stack to pass arguments. 20:26:48 : endif postpone then ; immediate 20:28:45 It is being used in a different way, not an opposite way. IF do-something THEN carry-on is just as valid, grammatically, as if condition then do-something . It simply has a different meaning. 20:28:50 erider: From the compiler's perspective, it needs a way to tell it how many bytes to jump over when IF is not true. That is what THEN (or ENDIF) does. 20:32:21 Quartus: Yes, it's gramatically valid. But when used as a computer term, it has to have a more rigid meaning. The "carry-on" is implied, making it a slightly more complex statement for people to pick up on. It presents a slightly bigger challenge for new users, who have a lot on their plate to get used to already. 20:32:39 why should every language try to be like C? 20:32:47 It has a perfectly rigid meaning within Forth. It has no meaning in C. 20:33:02 You're thinking of BASIC, and I can see no reason Forth should resemble BASIC. 20:33:49 forth should resemble english 20:34:19 why? 20:34:28 if it want to be a high level 20:34:32 As I just showed, IF do-something THEN continue is just fine English. 20:34:34 Well, BASIC was what I was first exposed to as a programmer, at a very young age. Because of this, Forth's difference made it harder for me. I doubt I am alone in this. 20:34:39 ENDIF is not an English word of any kind. 20:34:40 for abstraction reasons 20:34:52 Forth is not english. 20:35:00 thats why chuck doesnt like "endif" 20:35:04 so all languages should resemble BASIC, which was obsolete when it was released in 196x? 20:35:10 It sure ain't. But if you're looking for closeness to English, THEN is closer to the bulls-eye. 20:35:18 we could so THENCONTINUE ... 20:35:38 test a condition. if it is true do this, else do that and then do the other 20:35:39 If a BASIC programmer is really going to weep over THEN being used differently, he's pretty much declared himself unable to proceed. 20:35:41 closer in terms of vagueness and complexity? I agree... 20:35:51 if/else/then in the FORTH and ENGLISH useage order 20:35:57 endif is more defined 20:36:16 is telling the programmer that the if statement if done 20:36:27 s/is/it 20:37:07 then would me do me that something else is going to happen 20:37:29 mean* 20:38:00 Bah. 20:38:04 It's all in what you get used to. 20:38:11 Once you use it for a couple days, it doesn't make no never mind. 20:38:36 Best you get used to the industry standard; you'll have a better time reading other people's code, and they yours. 20:38:52 It is an unnecessary burden on new users. The established community has no reason to care, unless they want more new users. 20:39:14 again, why should forth be like basic? 20:39:19 If they're losing people over THEN vs ENDIF because it's "too complicated", probably don't want those users anyway. 20:39:25 java has } instead of endif, and millions of programmers 20:39:59 It's a 5-second burden for BASIC users, and it is perhaps the very smallest conceptual hurdle that a BASIC programmer will have to jump in order to step into the 1970s and beyond. 20:40:29 The reason languages lose (or don't gain) users is because of shitty documentation and arrogant twits in ##(language) 20:41:18 I agree with the shitty documentation piece 20:41:21 stupid grammatical constructs don't repel potential new users? 20:41:28 No. 20:41:30 Look at Python. 20:41:34 why is THEN stupid? 20:41:41 the only argument you've presented so far is that "its not like BASIC" 20:41:46 who cares about BASIC? 20:42:03 I do. Because is't what I first learned. 20:42:16 Not because it rocks as a language or anything. 20:42:29 so the first language you learned defines the way you think? 20:42:30 It's a part of my *existing* computing vocabulary. 20:42:37 Then you have a burden to overcome. Changing the language to accomodate your particular damage would be the wrong move. 20:42:43 it must be pretty lame to think in BASIC then. 20:43:15 I don't think in it anymore. But when I first learned Forth, it was a barrier. 20:43:24 what gforth is using endif 20:43:37 and that is what is in the manual 20:43:46 learning a functional or OOP language for the first time requires a leap 20:43:52 does this mean we should only ever use procedural languages? 20:44:03 and this even give a fix if its not define in your implementation 20:44:12 Not a real *hardship* so much as a *nuisance*. I'd *way* rather focus on picking up stack usage and other *important* stuff with my valuable time than worry about stupid terminology issues. 20:44:14 Gforth defines a number of aliases. That one is a FIG holdover. 20:44:21 : endif postpone then ; immediate 20:46:02 lack of libraries is a bigger concern for beginners than minor syntax issues anyway 20:46:09 indeed 20:46:14 ??? 20:46:53 werty? 20:47:15 Sorry, just channeling for a minute :) 20:47:39 Seriously, I don't see why libraries would even be an issue for a beginner. 20:47:50 if the beginner wants to, eg, write a web application 20:47:50 It's all about the grammar and how hard it is to pick up. 20:48:12 Umm they make it into a CGI? 20:48:40 i'm talking about a web app that does more than display 'hello world'. 20:48:49 you'd want database persistence, form validation, etc 20:48:58 or what if your newbie wants to do graphics. 20:49:05 They'd use something else, more likely. But that wouldn't repel them from learning the language for it's own sake. 20:49:15 Neither would THEN. 20:49:19 a lot of people don't want to learn languages for their own sake. 20:49:23 the ones that do won't mind THEN. 20:49:40 erider and I do. 20:49:56 It's not *stopping* us, granted. 20:50:41 Marcel Hendrix has redefined a whole bunch of words to better suit his particular preferences in iForth. Not new words, just different names. This drives me UP THE WALL. I skip right over his sources. 20:51:09 Quartus: You're right. To really make it better, we'd have to enact a new standard. 20:51:13 well isn't that what factoring is all about to be able to make words to put in plain english 20:51:27 that is the abstraction piece 20:51:46 Abstraction and factoring is not about making your sources read like English. Good names should be readable, but you're not trying to reproduce English grammar and syntax. 20:52:00 #define BEGIN { 20:52:04 #define END } 20:52:21 #define var(name,type) type name 20:52:22 lukeparrish, your definition of 'better' is 'more like BASIC', which would meet with considerable resistance. 20:52:24 :) 20:52:34 C macros 20:52:59 some people think factor's conditionals are weird: [ ... ] [ ... ] if 20:53:11 More like any more widely existing terminology is generally helpful. 20:53:56 COBOL and FORTRAN are more widely existing than any BASIC. If you're going to argue that widely-used terminology should be duplicated in Forth, start with what is widely-used, and not just with your own parochial preferences. 20:54:01 1 2 or . = 3? 20:54:14 yes 20:54:36 why? 20:54:37 Languages have to be learned. I grew up in a generation that was provided C64s and Apple IIs as little kids. 20:54:47 because when you bitwise or 1 and 2, you get 3. 20:55:06 NOT knowing Basic would be diffifult for any computer-literate person my age. 20:55:12 i grew up with hypercard, but despite its weird english-like syntax, i also managed to learn java, lisp, scheme, prolog, forth, and various assemblers. 20:55:13 erider, consider the binary: 2 base ! 1 10 or . -> 11 11 decimal . -> 3 20:55:19 and c, obj-c 20:55:37 Forth is not a dialect of BASIC. 20:56:40 is there some way to download something on windows? 20:56:44 we've got a URL 20:56:57 JasonWoof, what do you mean? 20:56:58 it's a binary file (movie) and the browser flips out if we go to it 20:57:03 uh, click the link? 20:57:05 just want to download the file at the url 20:57:11 right-click? 20:57:18 1 3 or . = 3 20:57:25 maybe alt-click 20:57:45 despite hypercard, i don't freak out if a new language i'm learning uses assignment syntax different from "set x to 5" 20:57:48 erider, again, the equivalent in binary: 2 base ! 01 11 or -> 11 which is 3 20:58:11 what link? I don't have a link, I have a URL 20:58:22 do I have to make a freaking website to download the thing? 20:58:35 JasonWoof -- possibly it can't be downloaded. Is it a video stream? 20:58:46 which browser? 20:59:00 netscrape 20:59:09 haven't used that in years 21:00:22 slava: Those were english grammar and words mapped to computer logic. They weren't obviously a computer language. They probably made a different impression on you than BASIC did on me. 21:01:01 If you have Cygwin installed (proper *nix utilities for Windows), wget is available. 21:01:22 If it's just a stream URL, you'll download a handful of bytes and stop. 21:02:59 In BASIC, = does double duty; it assigns values to variables, and also means 'equals'. At some point in your fledgling programming career, you had to learn that it meant both, depending on context. Perhaps you'd have liked to define EQUALS to mean = to make it easier -- but BASIC didn't provide that facility. You got over it. 21:04:11 Quartus: I more had to get over the fact that other languages insisted on using two different forms of equals. 21:04:33 Because you'd been forced by BASIC to assume that one symbol would do double-duty depending on context. 21:04:36 Kids these days. 21:04:41 YOU had ='s. 21:04:48 In my day, all we had was CMP and JNE 21:05:00 java newbies get endlessly confused between == and the equals() method 21:05:17 like, why is "foo" == "foo" false? 21:06:01 "why does if ($i=$j) always come out as true?!?" 21:06:20 * lukeparrish learned perl 21:06:30 But it doesn't always. 21:06:34 Depends on what's in $j 21:06:37 so you mastered perl syntax, one of the crappiest ever, yet forth's THEN gives you problems? 21:06:41 The problem in both BASIC and C is that = is used for assignment, which is inappropriate. 21:06:49 := ? 21:07:01 Anything. := is at least a differentiation. 21:07:12 It's BNF for assignment, at any rate. 21:07:43 begin code flag while code repeat 21:07:45 Pascal, too. 21:08:01 it always made sense to me. "make this true: foo=bar" 21:08:06 Frankly, I make the mistake of using = in place of == about once a year. It's not that big a deal. 21:08:12 Quartus what loop is the one the you guys use the most 21:08:38 erider, it depends on the circumstance. Do you need a counted loop, an exit at the top, an exit in the middle, or an exit at the bottom? 21:09:21 perl's curly braces somehow did the job for my basic-addled mind. 21:09:27 begin/while/repeat does any of the last three, though begin/until is often used for exit-at-the-bottom. do/loop (and +loop) is for counted loops. 21:09:45 an exit at the top 21:10:09 Then: begin while do-something repeat 21:11:59 Python was okay, except the lack of brackets gave me vertigo. And what are tupples supposed to be again? 21:12:20 lists of objects 21:12:35 But lists are something else... 21:13:35 Is tupple an english word? Where the heck did it come from? 21:13:43 tuple 21:13:50 tuples in python are immutable lists, basically 21:13:59 with some syntax so you can do stuff like (x,y)=(3,10) to assign several vars at once 21:14:51 'tuple' is a word from mathematics 21:15:19 And they used it to be cool? 21:15:32 its a common term in many languages actually 21:15:41 ml, haskell and factor among others 21:15:50 it's akin to sextuplet and quintuplet 21:16:29 at some point a programming language cannot name everything with elementary school terminology 21:16:30 So "pairing" with more than two. 21:17:03 like i said, especially when you get into FP, OOP or declarative programming, you have to name certain abstractions 21:17:05 Is it pronounced tooplet or tup-let? 21:17:11 tup-le 21:17:15 or tup-ell 21:17:31 Programming Barbie says "tuples are complicated!" 21:17:43 so more like tupple. 21:17:49 yeah 21:17:55 But not spelled like that. 21:18:02 sets of two have a number of different words that predate arithmetic: pair, couple, deuce, brace, etc. 21:18:02 * slava sighs 21:18:08 I've always heard it pronounced "too-pool" 21:18:18 i think saying "too" is wrong 21:18:21 i've always heard "tu" 21:18:49 How do you pronounce 'quintuplets'? Same rules apply. 21:18:53 toop-ul seems cooler than tup-ul 21:19:17 Especially with only one p. 21:20:17 With two p's, tupple would be obviously have a short u. With only one, it's not so obvious. 21:20:29 Tuple is pronounced like couple. 21:21:15 * jcw pronounces "quintuplets" as "should have aborted" 21:21:25 :) 21:21:39 just watch out for Quznos, he might start quoting verses from the Book. 21:21:50 Let's hope not. 21:22:15 Couple seems like it should have a long o. But that's impossible, so it should be the u. 21:22:43 * lukeparrish will fill in for Quiznos if necessary. 21:22:49 If you're going to pronounce tuple 'toople', be prepared to say 'quintooplets', too, and also prepare to be openly mocked. 21:23:05 Ok, will do. 21:25:50 Hmm. So Tuple is the generic form of Triple, Quadruple, etc. 21:26:08 Quadruple is long u. 21:26:34 * lukeparrish hates english sometimes. 21:26:43 Damn French ruined it. 21:26:45 Y'all want to switch to esperanto with me? 21:26:58 Slightly different etymology, tuple derives from French adoption of Latin words. 21:27:16 It's easier to blame the French. 21:27:42 Anyone who likes mimes and Jerry Lewis deserves our contempt. 21:27:42 wow that recursive example it crazy hard to understand 21:28:00 erider, only you know what recursive example you're talking about. 21:28:24 : fac1 ( n -- n! ) recursive 21:28:24 dup 0> if 21:28:25 dup 1- fac1 * 21:28:25 else 21:28:25 drop 1 21:28:26 endif ; 21:28:56 I'm not playing ball with Mr. Endif. Grow up and hang with the big boys, already. 21:29:06 heh 21:29:51 lol 21:29:54 But endif is so keeeute! It reminds me of the Old Days and C64's blue background... 21:30:11 that is the example out of the manual 21:30:28 No way, pal. If you can deal with { and } you can deal with THEN. If BASIC is holding you back, it's holding you back across the board; you don't get to be selective about it. So step up. 21:30:50 : fac1 ( n -- n! ) recursive 21:30:50 dup 0> if 21:30:50 dup 1- fac1 * 21:30:50 else 21:30:50 drop 1 21:30:50 then ;; 21:30:57 oops 21:31:30 : fac1 ( n -- n! ) 21:31:30 dup 0> if 21:31:30 dup 1- fac1 * 21:31:30 else 21:31:30 drop 1 21:31:31 then ; 21:32:00 Ok, that's antiquated in a couple of ways. The first was ENDIF, the second is 'recursive'. Neither FIG, 79, 83 or the Standard have RECURSIVE as a word. 83 and the Standard have RECURSE, which calls the current definition. 21:32:04 IF-THEN-DO-THIS: ;THEN-CONTINUE will be my new pair of forth words! 21:33:44 : fac2 ( n -- n! ) 21:33:44 dup 0> if 21:33:44 dup 1- recurse * 21:33:44 else 21:33:44 drop 1 21:33:45 then ; 21:34:02 Now you're cooking with goose fat. 21:35:24 FIG had 'smudge', which was the abominal opposite of the equally-abominable 'recursive'. 21:36:47 ok 21:36:57 what's the point of recurse? 21:37:07 recurse calls the current word recursively. 21:37:20 i know, but why don't forths just add the current word to the search order right after : ? 21:37:23 very hard understand 21:37:44 Because that makes it painful to redefine a word in terms of its previous definition. To accomodate that very behaviour, FIG had SMUDGE. 21:37:56 why would you redefine in terms of the previous definition? that's confusing 21:38:05 It's not uncommon. 21:46:47 --- join: zpg`` (n=user@user-514d7663.l2.c2.dsl.pol.co.uk) joined #forth 21:51:47 There's other logic behind it, for instance -- An incomplete definition should not be executed. SMUDGE and RECURSE are ugly kludges that refer to a specific dictionary implementation, and the standard does not require a specific dictionary implementation. HIDE and REVEAL would also require the ability to flip findability for the definition under construction. Etc. 21:52:05 wow I wonder if someone has made a hexieditor program in forth 21:52:14 factor has a hex dumper 21:52:36 Gforth has the Standard DUMP as well. 21:52:59 s" hello" dump -> A0501D8: 68 65 6C 6C 6F - hello 21:53:01 * erider has found the dump 21:58:13 Also, RECURSE allows for recursive anonymous definitions. 21:58:48 o/` Quaerite primum ... 21:59:37 prayer, fission? 22:00:07 yup 22:00:13 chant 22:00:18 * erider wants to learn all about create, cells and variable 22:00:37 * erider allot too 22:01:54 --- quit: zpg` (Read error: 113 (No route to host)) 22:15:32 --- join: arke_ (n=Chris@pD9E07D93.dip.t-dialin.net) joined #forth 22:18:05 Also with RECURSE you can create defining words that make recursive words. 22:20:13 hi 22:20:19 hi zpg 22:20:50 hey Quartus 22:22:35 --- nick: zpg`` -> zpg 22:23:44 sleep might be an idea soonish ... 6:30 here 22:23:53 Why still up? 22:25:40 watched both Bourne films. had some coffee, rambling discussions and a few Go games. 22:26:19 The new ones with the bridge-troll Damon? 22:26:59 indeed, Bourne {Identity, Supremacy} 22:27:17 Those would have put me out like a light. :) 22:33:44 heh 22:34:22 Perhaps you have more regard for Damon's acting talent (it pains me to even type that) than I do. I think he's got all the charisma of a cricket bat. 22:35:25 --- quit: arke (Read error: 110 (Connection timed out)) 22:36:33 i quite liked the pacing of B. Identity, Damon wasn't terrible. 22:37:07 And soon you can drink a coffee toast to the rosy dawn. :) 22:41:29 gn all 22:41:35 --- quit: erider ("I don't sleep because sleep is the cousin of death!") 22:51:12 take care, time for me to collapse m'thinks 22:51:25 --- quit: zpg ("night (morning)") 23:59:07 --- quit: slava () 23:59:59 --- log: ended forth/06.10.27