00:00:00 --- log: started forth/09.01.07 00:26:13 --- quit: gogonkt`1 (Read error: 104 (Connection reset by peer)) 00:29:30 --- join: gogonkt`1 (n=info@218.13.58.99) joined #forth 00:33:43 --- quit: JasonWoof ("off to bed") 00:43:02 --- quit: madgarden (Remote closed the connection) 01:06:14 --- join: snowrichard (n=richard@12.169.182.169) joined #forth 01:10:56 --- quit: snowrichard (Client Quit) 01:11:04 --- join: snowrichard (n=richard@12.169.182.169) joined #forth 01:11:30 --- quit: snowrichard (Client Quit) 01:14:02 --- join: richard (n=richard@12.169.182.169) joined #forth 01:14:07 --- nick: richard -> Guest73611 01:16:19 --- quit: Guest73611 (Client Quit) 02:20:24 --- join: snowrichard (n=richard@12.169.182.169) joined #forth 02:20:27 hello 02:26:51 --- quit: snowrichard ("Leaving") 03:28:00 --- quit: aguai (kornbluth.freenode.net irc.freenode.net) 03:29:35 --- join: aguai (n=aguai@122-116-183-8.HINET-IP.hinet.net) joined #forth 03:31:04 --- quit: nighty__ (Client Quit) 04:30:35 --- join: snowrichard (n=richard@12.169.182.169) joined #forth 04:54:44 --- nick: nxt -> lasts 05:35:06 --- quit: snowrichard ("Leaving") 05:52:19 --- join: snowrichard (n=richard@12.169.182.169) joined #forth 06:04:35 --- quit: snowrichard ("Leaving") 08:20:23 --- join: gogonkt`2 (n=info@218.13.57.104) joined #forth 08:24:09 --- join: tathi (n=josh@dsl-216-227-91-166.fairpoint.net) joined #forth 08:24:10 --- mode: ChanServ set +o tathi 08:31:58 --- quit: gogonkt`1 (Read error: 110 (Connection timed out)) 08:57:03 --- join: NorthStar (i=email@89.180.135.172) joined #forth 08:57:23 --- join: qFox (i=C00K13S@132pc222.sshunet.nl) joined #forth 08:58:17 --- nick: NorthStar -> X-Scale 09:20:27 --- quit: TreyB ("leaving") 09:20:33 --- join: TreyB (n=trey@74.203.168.157) joined #forth 09:39:18 --- join: GeDaMo (n=gedamo@dyn-62-56-77-42.dslaccess.co.uk) joined #forth 10:02:52 --- join: xjrn (n=jim@c-24-7-31-66.hsd1.ca.comcast.net) joined #forth 10:26:14 --- join: joelr1 (n=joelr1@22.Red-83-53-201.dynamicIP.rima-tde.net) joined #forth 10:26:16 good day 10:26:42 how do i clear the forth interactive buffer in emacs, when using gforth.el 10:27:29 rea 10:27:47 read ~.el source code... 10:28:59 right, great 10:29:16 haha 10:45:42 I just don't use inferior-forth. 11:18:58 --- quit: grub_booter (Remote closed the connection) 11:20:13 --- join: mark4 (n=mark4@wsip-98-191-97-24.ph.ph.cox.net) joined #forth 11:22:44 how do you clear the stack? is there a way instead of typing .......... 11:23:35 clearstack 11:23:36 ok 11:23:41 --- quit: joelr1 () 11:31:20 --- quit: gogonkt`2 ("leaving") 11:32:41 sp0 @ sp! ? 11:32:58 im assuming that sp0 is a variable giving the bottom of stack address 11:33:22 i usually just type ... lol 11:34:27 he answered his own question and left 11:34:42 didnt see him leave 11:34:44 :/ 11:35:02 has he been in here before? 11:35:19 last couple of days 11:35:57 this is annoying. i440r is me at home. i /whois i440r and get my ip and try ssh to it and get no route to host 11:36:50 /whois i440r 11:37:09 Won't that be your ISPs IP address? 11:37:48 it should be the ip address of my connection TO my isp 11:40:43 ive ssh'd home this way before but i think my isp is now firewalling ssh TO that address 11:41:03 and web too. i should be able to http to there too 11:41:17 "For your own protection" 11:41:33 ya. :/ 11:42:09 maybe they would open it up for me. probably want to make it a commercial account tho and charge me more or something 11:44:31 Maybe you could open an ssh server on another port number 12:08:47 --- join: tarbo (n=me@unaffiliated/tarbo) joined #forth 12:17:02 --- join: JasonWoof (n=jason@c-66-31-44-71.hsd1.ma.comcast.net) joined #forth 12:17:02 --- mode: ChanServ set +o JasonWoof 12:20:27 --- quit: tarbo ("leaving") 12:21:03 --- join: tarbo (n=me@unaffiliated/tarbo) joined #forth 12:36:51 --- quit: malyn ("Disconnecting from stoned server.") 12:37:16 --- join: malyn (n=malyn@unaffiliated/malyn) joined #forth 13:06:43 --- quit: X-Scale (Read error: 60 (Operation timed out)) 13:28:10 --- join: X-Scale (i=email@89.180.236.189) joined #forth 14:23:03 --- quit: GeDaMo ("Leaving.") 14:29:36 --- quit: mathrick (Read error: 113 (No route to host)) 15:05:48 --- quit: xjrn (Remote closed the connection) 15:25:18 --- quit: qFox ("Time for cookies!") 16:32:51 --- join: nighty__ (n=nighty@210.188.173.245) joined #forth 16:38:42 --- join: xjrn (n=jim@c-24-7-31-66.hsd1.ca.comcast.net) joined #forth 16:46:34 --- quit: xjrn (Remote closed the connection) 17:25:19 --- quit: tathi ("leaving") 17:36:30 --- quit: gogonkt`` (Read error: 110 (Connection timed out)) 17:45:14 --- join: _abc_ (n=Peter@bas3-toronto06-1177889843.dsl.bell.ca) joined #forth 17:53:58 --- join: gogonkt`` (n=info@124.64.183.170) joined #forth 18:00:05 <_abc_> hi all 18:00:07 <_abc_> i am new here 18:00:19 <_abc_> is there a parser in forth that outputs forth ? 18:00:42 <_abc_> i.e. lex+yacc equivalent (not full blown of course) 18:03:03 cat? 18:03:39 _abc_: what do you want to do? 18:04:38 <_abc_> JasonWoof, just play with algebraic input to forth parsers written in forth 18:04:40 the "forth parser" can be modified by the forth program, so generally you can't have a very complete forth parser without it executing the forth code 18:04:48 <_abc_> see how the shunting yard is done in forth 18:05:32 <_abc_> i would like to do it without modifying the forth parser proper 18:05:51 <_abc_> read from a stream, convert to ipn, compute or store for later 18:06:13 what's that got to do with forth? 18:07:53 <_abc_> JasonWoof, well is there a shunting yard implementation in forth ? 18:08:03 <_abc_> and further, a parser generator one ? 18:08:14 what's a shunting yard? 18:09:18 <_abc_> omg 18:09:18 <_abc_> http://en.wikipedia.org/wiki/Shunting_yard_algorithm 18:09:42 oh, it's for converting infix to rpn 18:10:07 I'm sure people have written parsers for infix math 18:10:40 sorry, I'm not real knowledgeable on the terminology 18:11:01 you said ipn... is that the same as rpn? 18:16:55 so to write a shunting yard program you write a function that can read a token 18:17:12 then you write a recursive function that pushes/pulls the stacks and knows about precedence 18:17:52 I can't think how it'd be implemented particularly differently in forth than other languages 18:18:39 <_abc_> it does not need to be recursive, it can be flat and use some stacks or lists to store what is necessary 18:19:01 <_abc_> but i want to see how it's done, not write it myself 18:19:18 <_abc_> to compare complexity, editability, size etc with other implementations 18:19:24 ahh the 2nd stack is what makes it so you don't have to recurse. I see 18:19:53 <_abc_> actually there are like 3 stacks in it if you need to handle parens and functions 18:19:57 i would use the return stack for the operator stack myself, looks like an interesting thing to try implement 18:20:13 <_abc_> i suspect that there is a very neat way to do it in forth 18:20:26 <_abc_> using the natively available features 18:20:38 ok i gtg home :) 18:20:41 cu l8er 18:20:43 I think you'd need some practice coding in forth before you could judge whether forth code is editable/readable 18:20:50 <_abc_> is tehre a way to use an addtional stack in forth or does one have to implement it using native functions ? 18:21:15 <_abc_> JasonWoof, don't worry about it, I have some, it's just not my favorite language, that's all 18:21:22 <_abc_> plus I am a little rusty at forth 18:21:42 don't think most forth implementations will just give you another stack on request 18:21:46 stacks are easy to write though 18:22:55 variable stack-a here 400 allot stack-a ! 18:23:43 : stack-push stack-a @ ! 4 stack-a +! ; : stack-pop -4 stack-a +! stack-a @ @ ; 18:24:03 <_abc_> sure that's what I meant by writing it 18:24:37 'course you could factor it out a bit if you wanted more than the one stack :) 18:25:37 <_abc_> sure 18:26:26 <_abc_> how would you implement an exception ? f.ex. in the above to signal stack overflow ? return a flag on top of the stack popped value and have the caller test it ? 18:28:17 : stack: create here 4 + , 400 allot ; : push 4 over +! @ ! ; : pop dup >r @ @ r> -4 +! ; 18:28:21 something like that 18:28:24 then you can do: 18:28:27 stack: numbers 18:28:32 stack: symbols 18:28:36 2 numbers push 18:28:45 char * symbols push 18:28:53 numbers pop . 18:28:57 symbols pop emit 18:28:58 etc 18:29:06 <_abc_> ok 18:29:24 <_abc_> so i was mostly right, it ends up being small and handy 18:29:27 <_abc_> in forth 18:29:49 I think well written forth code ends up being nice and compact 18:30:06 trouble with forth usually comes in when you need to do something complex that forth doesn't come set up to do 18:30:11 like dealing with xml or something 18:30:35 <_abc_> JasonWoof, well, a proper parser generator tool would help a lot with that 18:30:44 at least that's troublesome for me, since I don't know what's out there in terms of already-written code you can use 18:30:55 I don't think so 18:30:56 <_abc_> hm 18:31:12 <_abc_> usually one learns how to use lex+yacc while studying cs. 18:31:16 I don't see the value of parser generators 18:31:22 <_abc_> there are equivalents in any language 18:31:29 I didn't go to school for programming 18:31:42 <_abc_> JasonWoof, it removes the 'complex' part from f.ex. parsing xml and many other things 18:31:52 I taught myself as one of my courses in highschool 18:32:20 <_abc_> e.g. a shunting yard algorythm is in fact a tiny state machine if the type generated by a parser generator like yacc 18:32:25 forth is usually not used to glue together loads of libraries and make some huge do-everything program 18:32:37 <_abc_> *of 18:33:02 you can't define forth syntax with so that yacc can yarse it 18:33:14 <_abc_> why not ? 18:33:23 because you create parsing words all the time 18:33:26 like "create" above 18:33:33 <_abc_> one of the first tests done on a pg is that it can compile itself (its own grammar) 18:33:48 what's pg? 18:34:11 <_abc_> and the pg will create an abstract set of routines (words) and a set of number tables that control the state transitions 18:34:17 <_abc_> pg is parser generator 18:36:24 I don't understand why I'd want a parser generator 18:38:13 in general forth can't be parsed by something that just parses and doesn't exacute forth code because: forth code executes during the parsing phase 18:38:34 <_abc_> f.ex. assume you have a forth controlled box that needs to accept algebraic input from a user and also small programs. like the equations of a pid controller or such. so the user may input like: Y=0.5*x+sin(y) 18:38:50 the forth parser built into forth reads the source code up to the first whitespace, then executes that 18:39:01 then reads in to the next whitespace, and executes that 18:39:07 <_abc_> well that is what you do not want in this case 18:39:32 --- join: madgarden (n=madgarde@CPE001d7e527f89-CM00159a65a870.cpe.net.cable.rogers.com) joined #forth 18:39:38 f.ex. means "for example"? 18:40:03 <_abc_> you read character by character and tokenize the input and pass it to the parser (which is generated by a pg). the output can be correct forth code that can be stored as such and executed when the box is doing its control job, for example 18:40:11 <_abc_> JasonWoof, yes 18:40:39 <_abc_> what's the forth word for split ? 18:40:46 ahh, I'm used to seeing "eg" 18:41:40 I'm not familiar with any string manipulation extensions 18:42:12 I've managed to mostly avoid doing text mangling in forth 18:42:26 and when I have it's mostly been dealing with it one character at a time, as it's typed 18:43:02 <_abc_> imho learn about state machines it is worth your while 18:43:29 dynamic memory management is not real common. There's often an ALLOCATE and a FREE but I'm not aware of anything in the specs that uses them 18:43:40 what state machines? 18:43:46 * JasonWoof looks under his bed 18:43:52 <_abc_> moore mealy and more 18:44:12 * _abc_ would look on wikipedia instead ... 18:44:28 oh, sorry read you wrong 18:44:35 thought you said "learn about the state machines" 18:44:54 I think I know about state machines 18:46:08 ahh, is the same as FSM 18:47:38 I have a hard time getting interested in stuff like this in the absence of some actual real-world problem to be solved 18:48:20 eg if I'm writing AI for baddies in a video game I'll think about FSMs 18:49:09 if I'm charged with parsing expressions like Y=0.5*x+sin(y) I'd choose between writing it mostly from scratch, or seeing if I can find and download something 18:49:43 and since I like coding, and don't much like research I'd probably choose to just write it 18:50:07 writing it has the advantage that I learn coding from experience 18:50:40 and I don't have to worry about the horrible situation where the boss-man asks for a change that would require me to completely restructure the code I downloaded 18:51:01 which would be a nightmare, requiring me to learn the whole thing inside and out 18:51:19 and it would have been easier to just write it myself in the first place, because then it'd be smaller, simpler, and I'd already know it inside out 18:55:08 <_abc_> do you build a new screwdriver for each job ? no ? pg is a tool like a screwdriver. there are others. find them and learn how to use them. this takes time but it is worth it. 18:55:31 I know that PGs exist 18:56:35 If I ever find myself needing to parse some new, complex syntax for which there doesn't already exist code to parse, I'll consider using a PG 18:56:56 <_abc_> that's the idea 18:57:11 <_abc_> you only need to learn how to use it once 18:57:26 hope not 18:57:30 hopefully I never have to learn it 18:58:04 don't think parsing complex syntax is a very worthwhile activity very often 18:58:10 and hopefully I never run into it 18:58:47 _new_ complex syntax that is 18:58:56 most existing complex syntaxes already have parsers 19:00:00 <_abc_> look, there are 4 or 5 things without which you will not go very far in programming. those would be stream escaping, regular expressions, parsing and concurrent programming locking. 19:00:41 <_abc_> most of the other things you can figure out from books when needed. but these you really need to know day or night. 19:00:52 <_abc_> in any programming language you use. 19:01:06 Phew... I launched Ratpoison, but I made it back alive. 19:01:12 Never been there before. ;) 19:01:18 <_abc_> what's that ? 19:01:24 A window manager. 19:01:32 Really minimalist. 19:01:43 <_abc_> ah, ok, i remember. the one with only kb control 19:01:46 _abc_: what the hell are you doing here? 19:01:52 <_abc_> hmm ? 19:01:52 Yes. 19:02:00 <_abc_> fishing for ideas about parsers in forth ? 19:02:13 stream escaping is crap 19:02:17 do it when you're required to 19:02:21 <_abc_> JasonWoof, explain that question O.o 19:02:29 but if you're making the protocol yourself don't go encoding stuff just so you can decode it later 19:02:38 <_abc_> JasonWoof, proper stream escaping is strongly related to state machines and regexps 19:02:42 Amen brother! 19:02:46 forth doesn't have most of the stuff you just listed as essential 19:02:53 <_abc_> uhh 19:03:15 <_abc_> madgarden, which brother ? 19:03:19 _abc_: by stream escaping you mean... putting \ before stuff? 19:03:32 JasonWoof, sorry _abc_ ;) 19:04:07 <_abc_> no things like properly being able to store retrieve and send arbitrary data over any interface (such as a call interface to a function and anything else) 19:04:27 ok 19:05:00 I'm used to "escaping" meaning adding in extra characters throughout data so you can tell that the character right after the inserted one doesn't have a special meaning (such as end of string) 19:05:20 which is something I avoid where possible 19:06:03 <_abc_> well that is one way to do it but consider a stream with characters coming one at the time, and you send \\\a\\, the receiver gets \\\a\ and then waits and waits and ... 19:06:08 it's convenient for people, since in some contexts there is no other way to input a string which can contain arbitrary data 19:06:09 <_abc_> it is not so simple. 19:06:26 <_abc_> and after that it gets complicated 19:06:29 but it's a really really bad idea to have a computer encode data that way so it can be read by another computer/program/function 19:07:05 <_abc_> JasonWoof, th key is not to encode it but to *mark* it in a way that is then transparent for the other side when reading 19:07:06 you should never _send_ data encoded like that 19:07:26 right, like [length][data] 19:07:47 <_abc_> ok, that's the Pascal string convention, it's a good step 19:07:59 it's called length encoding 19:08:22 I'm sure it was around long before pascal 19:09:20 <_abc_> now add to that that some protocols do not pass certain characters (like \0 and EOF). so after setting the length you must ALSO escape such funny characters AND adjust the length 19:09:30 <_abc_> and this goes on and on 19:09:39 no 19:09:44 I refuse 19:09:49 <_abc_> :) 19:09:58 why the hell would 19:10:01 I? 19:10:37 if you have to have computer programs conversing over some communication medium that cannot send bytes, you first fix it so it can transmit bytes 19:11:16 <_abc_> well, yes, if you are rich. otherwise not. 19:11:28 you can do it in software 19:11:59 <_abc_> we were talking about software ... 19:12:14 if you're forced to have your programs communicate over e-mail or something, you build in a layer that encodes and decodes e-mail 19:12:39 this layer makes it so that the data received matches exactly the data sent 19:13:01 <_abc_> yes, that's what we were 'building' here :) 19:13:01 handling all the weird things that happen to your data when it's sent via e-mail 19:13:27 we are? why? 19:14:19 why can't we do something fun? 19:15:45 guess my point is that if you're forced to communicate with some legacy protocol or something that can't store/send your data without mangling it, you write a layer to fix that 19:16:14 you make yourself an API that takes data, and deals with the encoding/decoding neccesary to use the lagacy protocol without letting it change your data 19:20:02 eg for work I'm generally working with php/mysql 19:20:33 it's bloody stupid to convert the data I want to sent/receive to/from the disk into a human-readable programming language 19:20:40 but that's how it works 19:21:57 so I fixed the data storage problem by making myself an API that does take arbitrary binary data, and stores/retreives it 19:22:05 dealing with the stupid encoding BS of SQL 19:22:43 then I can do db_insert('table_name', 'col1,col2,col3', $foo, $bar, $baz); 20:05:38 <_abc_> JasonWoof, you do that in MySQL with funny character sets and your database is history 20:05:56 huh? 20:06:14 <_abc_> MySQL has some character encoding issues 20:06:25 ok 20:06:33 haven't lost any databases yet 20:06:35 <_abc_> so $foo $bar $baz had better be escaped 20:06:37 _abc_: you don't write parser generator in Forth usually. 20:06:45 _abc_: duh 20:06:50 <_abc_> ASau, I agree, i was just looking :) 20:06:54 that's the whole point I've been making 20:07:02 It is the same as you don't do MVC in Common Lisp. 20:07:07 <_abc_> hehe 20:07:09 I write an api that deals with the stupid legacy protocol, which includes escaping 20:07:20 <_abc_> ok, you are da man 20:07:30 There're natural things, which you do or do not. 20:09:17 Though you can program in shift-reduce terms, or use ready BNF tools. 20:26:28 <_abc_> ok, n8 20:26:31 --- part: _abc_ left #forth 21:28:11 --- quit: madgarden (Remote closed the connection) 21:38:34 --- join: madgarden (n=madgarde@CPE001d7e527f89-CM00159a65a870.cpe.net.cable.rogers.com) joined #forth 21:45:03 --- quit: preflex (Read error: 60 (Operation timed out)) 21:46:14 --- quit: madgarden (Remote closed the connection) 22:30:34 --- join: ygrek (i=user@gateway/tor/x-e4bd54f01229d513) joined #forth 22:39:16 ok, I'm coding on an AGPL project now, do "telnet termcast.org" if you'd like to watch 22:39:32 send me a /msg here if you'd like to tinker with setting up a free software VoIP connection with me to be my backseat driver 23:32:10 --- part: X-Scale left #forth 23:59:59 --- log: ended forth/09.01.07