00:00:00 --- log: started forth/10.01.13 00:00:15 --- quit: Al2O3 (Read error: 60 (Operation timed out)) 00:02:00 hmm okay 00:02:14 The pad maybe? 00:02:45 PAD is really better choice. 00:02:53 certainly 00:03:05 okay, thanks :) 00:03:26 but i get the same result though 00:04:09 nevermind 00:04:30 Let's trace it. 00:04:46 ACCEPT will wait for user input. 00:05:20 "bl word" will read next word from the source. 00:05:31 "count type" will print what "word" left. 00:06:04 That's certainly isn't what you want. 00:06:32 hmm 00:07:37 --- join: Al2O3 (n=Al2O3@c-75-70-11-191.hsd1.co.comcast.net) joined #forth 00:10:00 maybe i should read up on "word" :) 00:10:11 No. 00:10:23 You should not read anything about "word". 00:10:35 It is obsolete. 00:11:33 xpololz: you're working on your calculator? 00:12:27 alex4nder, not really, i don't feel comfortable with whatever i'm doing now :/ 00:12:34 ah 00:13:49 xpololz: if you explain what you're trying to achieve, 00:13:50 maybe we'll give you valuable advices. 00:15:28 right now i'm actually just "playing around", trying to learn how to use these words 00:15:55 Better don't use neither ACCEPT nor WORD. 00:16:06 http://home.iae.nl/users/mhx/sf10/sf10.html 00:16:14 Leo Brodie's Starting Forth 00:16:24 working trough that book, thats where i got it from 00:16:33 SF is obsolete. 00:17:08 it's not obsolete. 00:17:17 I just read it again tonight. 00:17:22 At the very least it is archaic. 00:17:23 :/ obsolete? 00:17:44 :) 00:17:48 especially the last half is great. 00:18:11 "Diz iz one half" 00:18:13 I want to use gforth with mysql, are there some reference? 00:18:20 No reference. 00:18:42 Everything that requires FFI comes as is without any references. 00:19:25 I thought, maybe I can use system to write code to mysql 00:19:35 foxes: I don't have a reference specifically for mysql, but gforth's FFI works pretty well 00:19:37 Maybe you can. 00:19:48 Well ASau`` where do you think i should read about I/O ? 00:19:50 Well... 00:19:52 ASau, :) hi~ 00:20:06 My goal is making a calculator interpreter at the moment 00:20:08 alex4nder: that means that you didn't do enough with it. 00:20:17 alex4nder, FFI ? I will check it out :) 00:20:25 xpololz: FILE and FILE EXT word sets in dpANS. 00:20:32 ASau``: I implemented a full libc network interface with it.. that's something. 00:20:44 the FFI wasn't where I had problems. 00:20:48 which is why I wrote the interface. 00:20:54 alex4nder: I did that too, this doesn't count as "much". 00:21:05 ASau``: sure it does.. it exercises almost the entire FFI 00:21:17 So i need to 1) read an arbitrary string from the keyboard, and have it available as a string to my forth program, instead of letting the forth interpreter evaluate it 00:21:22 (I did that on Cygwin, FreeBSD 5, and NetBSD 3.) 00:21:30 2) dissect the string to process only one symbol at a time 00:21:35 alex4nder: it doesn't exercise callbacks. 00:22:08 ASau``: there's not much in libc that uses callbacks. ;) I'd say that's fringe. 00:22:46 xpololz: Lisp world tries to use internal REPL for those tasks. 00:23:11 There's not much happenning in Forth world, but there're similar tendencies. 00:23:26 E.g. I do it similar to Lisp. 00:23:36 I can write Lisp in any language :p 00:23:46 hang on, REPL ? :s 00:24:00 Yes, REPL. 00:24:22 See EXECUTE-PARSING 00:24:47 ok, i got the point 00:26:30 xpololz: it's pretty straight forward.. what I've found is that I end up writing new words, and then I realize there are existing words that already do what I want. 00:26:48 xpololz: but to get to the point where I learn about those existing words, I need to actually understand what I'm doing. 00:27:41 :) 00:27:49 try implementing a read-line word 00:28:12 Well, as i said i'm pretty new to Forth maybe i need to know more basics 00:28:21 let me show you can example 00:28:33 Better don't waste time reimplementing READ-LINE. 00:28:47 better to ignore ASau``. ;) 00:28:56 ASau``: you learn a language by learning the language. 00:29:07 it's not a waste if it causes you to learn. 00:29:09 Better to ignore alex4nder. 00:29:10 omg, who to listen to?? :s 00:29:15 haha 00:29:18 listen to whoever you want. 00:29:29 hehe :) 00:29:29 alex4nder: you learn language by using language not by learning it. 00:29:44 See Chomsky. 00:29:55 ASau``: exactly.. and a great way to learn Forth is to build Forth. reading a line is a pretty basic first thing. 00:29:57 He is world-famous linguist and you are not. 00:30:30 If you're building your English yourself, you don't learn English, 00:30:48 what you do is you build another language somewhat reminiscent of English. 00:31:10 I also find it kinda hard to know what stuff is "out of date" though some things seems to never change. 00:31:11 ASau``: you build up more complicated sentences with words.. your sentences might not be the same sentences as others commonly used. 00:31:16 When it comes to forth.. generally 00:31:40 ASau``: you learn new ways to express yourself.. as a child, most of your sentences don't follow common grammar. 00:31:46 alex4nder: sure, because English isn't my native language. 00:31:58 eventually you learn proper syntax/grammar, and you speak like everyone else. 00:32:02 but you start saying MAMA WANT FOOD 00:32:08 which is understandbale 00:32:12 er understandable 00:32:19 but not really the way an adult would speak. 00:32:28 can you really compare English to Forth in this case? 00:32:32 sure 00:32:38 beginner forth looks like MAMA WANT FOOD 00:32:41 xpololz: sure, Forth is just another language. 00:32:52 it's all structs, and people trying to copy C constructs 00:33:00 like giant nested conditionals 00:34:14 alex4nder: tell your argument about structs to Elizabeth Rather and Bernd Payzan. 00:34:16 :D 00:34:38 Anyways i want to see that example alex4ander were gonna show me :) 00:34:50 ASau``: haha, yah well.. everyone has an opinion. 00:35:14 I wonder how you're going to deal with that GEMM example. 00:35:40 xpololz: try it yourself.. you have the begin ... while .. repeat words, c!, +, and key 00:36:03 xpololz: create a buffer, and then read keys in until you get a newline. 00:41:27 alright :) 00:41:31 I'd say that you better concentrate on what you really want. 00:41:40 There's little point in reimplementing libc. 00:42:12 Note, that noone argues that you start learning C with reimplementation of libc functionality. 00:42:23 Sounds interesting though, and i also kinda believe that i have to understand how the words works before i really get to know the language 00:43:44 One of the reasons why i'm learning forth instead of C is because i want a deeper understanding of how things works. 00:44:23 You took wrong way then. 00:44:24 I have a little experience with C though. And i also want to learn about stacks. 00:44:57 haha 00:45:13 ASau``: what are you talking about? Forth is a great way to figure out how things work. 00:45:26 alex4nder: it is wrong way. 00:45:44 You don't learn how things really work, you learn how they work in Forth VM. 00:45:49 Hmm, you two don't agree on anything? :) 00:46:14 And modern CPUs are register-based machines. 00:46:36 ASau``: modern compilers compile Forth to work quite quickly on register-based machines 00:46:47 and twiddling bits on said machines is quite easy due to the interactive nature of Forth 00:46:57 xpololz: I guess not. 00:47:04 alex4nder: C is closer to register machines than Forth. 00:47:24 Is not all programming languages based on stack? also, i thought stack machine were pretty much in modern machines too. 00:47:25 ASau``: dude,. it's the same shit. C uses stacks, just in different ways. 00:47:40 C uses single stack. 00:47:44 yup 00:47:45 But this isn't the point. 00:47:48 your register usage is up to the quality of your compilation, with both C and Forth. 00:47:53 it makes no difference. 00:48:00 The point is that C is register-oriented rather than stack-oriented. 00:48:06 no it isn't. 00:48:11 Oh? 00:48:15 it's implementation agnostic. 00:48:34 Show me how you do all this "ROT AND ROLL" shit in C? 00:48:58 I allocate variables, which the compiler decides where to put. 00:49:00 C uses local variables 00:49:08 stack, register, whatever. 00:49:10 What are local variables? 00:49:20 C does not _require_ you to have a parameter stack 00:49:48 don't act silly. there are local variables in Forth as well 00:50:02 C has only a return stack, and that's the reason why you can pass arguments between function's and have local vs global variables.. ? 00:50:06 (not that i use them, but heh) 00:50:07 Well... Given some experience in FPL, you understand that you can do everything with continuations. 00:50:29 xpoloz: no, there are C implementations with multiple stacks. 00:50:46 okay, sorry did not know :P 00:50:48 segher: same way as there was Fortran on Lisp machines. 00:50:56 yeah 00:51:04 of course you can 00:51:45 the point is, Forth *requires* you to have (at least) two stacks, at least conceptually 00:51:46 Your argument sounds like arguing that Prolog is nice way to learn how things really work 00:51:56 i'm not saying that is a bad thing, mind 00:52:04 because you can use other ways to interpret it than classic WAM. 00:52:30 Oh, and WAM definitly can be run on commodity hardware. 00:52:39 WAM? 00:53:01 Is there not a stack machine in modern CPU's? 00:53:07 xpololz: no. 00:53:18 you can of course run anything on anything, as long as that second anything is turing-complete 00:53:55 it might not be a great fit though :-) 00:54:02 so, what is WAM? 00:54:12 xpololz: there's some support for stack operations but only 00:54:12 to the extent required for subroutines. 00:54:32 segher: look it up, there's only one meaning connected to Prolog. 00:54:45 Warren Abstract Machine. 00:55:10 oh, connected to prolog. i thought it was connected to continuations, i'm losing the thread here :-) 00:55:31 found it, thanks 00:56:13 I can build simpler example with Lisp and SECD. 00:56:20 Is it more comprehensible? 00:56:37 ASau``: there's extensive support for arbitrary numbers of stacks on many processors 00:56:44 e.g. ARM 00:57:01 "E.g." is bad here. 00:57:12 heh, some processors can use arbitrary registers as the _program counter_. now *that* is neat! 00:57:46 all true riscs can use (almost) any register as stack pointer. arm cannot. 00:57:56 alex4nder: "e.g." the number of stacks is limited by number of registers. 00:58:03 original arm could, but modern arm cannot 00:58:07 ASau``: you can swap registers quite easily. 00:58:15 so your stack is limited by RAM 00:58:22 as are the number of stacks 00:58:36 alex4nder: this doesn't get you outside of registers. 00:58:45 of course it does 00:58:56 point one reg to an array of stack pointers in memory 00:59:11 you could even stack your stacks. ; 00:59:12 ) 00:59:16 segher: this is same argument as with WAM above. 00:59:17 you can, yes 00:59:25 yes 00:59:31 This way you have unlimited number of stacks on i386. 00:59:54 that's how any OS works eh. and C threading libs, etc. 00:59:58 Sure, you can swap register with word in RAM. 01:00:09 the "standard" Forth task thing, as well 01:00:35 That doesn't make register-based machine stack-based one. 01:00:42 on register machines, registers are simply a small, direct-addressed, cache of memory 01:01:04 it doesn't _make_ it, but you can _emulate_ it 01:01:29 Same way as you emulate WAM or SECD. 01:01:33 the other way around as well of course 01:01:35 sure 01:01:42 You have Lisp Machines emulators. 01:01:45 now what is SECD :-) 01:02:00 There's only one meaning connected to Lisp. 01:02:05 lisp, okay 01:02:30 without any context, three- and four-letter acronyms are a bit hard to research ;-) 01:03:27 bedtime for me. ciao guys 01:05:27 later 01:18:39 --- join: kar8nga (n=kar8nga@jol13-1-82-66-176-74.fbx.proxad.net) joined #forth 01:18:53 --- join: nighty__ (n=nighty@210.188.173.245) joined #forth 01:19:18 * alex4nder yawns. 01:39:10 --- join: GeDaMo (n=gedamo@dyn-62-56-89-110.dslaccess.co.uk) joined #forth 01:53:03 --- quit: segher ("This computer has gone to sleep") 01:59:02 --- quit: alex4nder (Read error: 110 (Connection timed out)) 02:08:49 --- quit: nighty__ (Remote closed the connection) 04:14:31 --- quit: TR2N (Read error: 110 (Connection timed out)) 04:37:20 --- quit: GeDaMo ("Leaving.") 04:42:36 --- join: dandersen (n=dkcl@metabug/dandersen) joined #forth 04:57:43 Hm. 04:57:53 At the first glance it seems to work. 05:38:42 --- quit: kar8nga (Remote closed the connection) 05:50:14 --- quit: dandersen (Remote closed the connection) 06:35:14 --- join: kar8nga (n=kar8nga@jol13-1-82-66-176-74.fbx.proxad.net) joined #forth 06:56:55 --- quit: Al2O3 (Read error: 110 (Connection timed out)) 07:26:39 --- join: Al2O3 (n=Al2O3@c-75-70-11-191.hsd1.co.comcast.net) joined #forth 07:37:09 --- join: qFox (n=C00K13S@5356B263.cable.casema.nl) joined #forth 07:51:11 --- quit: ASau`` ("off") 08:01:39 --- join: PoppaVic (n=pops@adsl-99-150-132-96.dsl.sfldmi.sbcglobal.net) joined #forth 08:20:56 --- join: GeDaMo (n=gedamo@dyn-62-56-89-110.dslaccess.co.uk) joined #forth 08:56:17 --- join: Maki (n=Maki@dynamic-109-121-73-52.adsl.eunet.rs) joined #forth 08:58:29 --- quit: Al2O3 (Read error: 110 (Connection timed out)) 09:04:12 --- join: kleinjt (n=kleinjt@tarsonis.dhcp.rose-hulman.edu) joined #forth 09:04:55 If i have an ASCII string of data, how can i convert it into binary digits and put them on stack? 09:05:57 ?? 09:06:13 Do you mean string to number conversion? 09:07:48 --- quit: kar8nga (Remote closed the connection) 09:15:01 xpololz: Look up: >NUMBER, NUMBER?... 09:15:11 Asau yeah 09:15:35 xpololz: you likely want a copy of the ANS draft, too.. Most forths follow it to greater/lesser extent. 09:16:19 Okay, thanks guys, ill check it out :) 09:16:25 brb. 09:22:52 --- join: dandersen (n=dkcl@metabug/dandersen) joined #forth 09:36:36 xpololz: http://forth.pastebin.com/m297e665c 09:36:45 I just type smth like 09:36:49 manf '>NUMBER' 09:36:57 and it brings relevant section from the standard. 09:39:37 Hm? :S 09:40:23 Quick and dirty man(1) replacement. 09:44:57 hang on 09:46:55 --- quit: dandersen (Read error: 110 (Connection timed out)) 09:50:45 meh,, don't really know how to add that manual on linux, i'm used to windows :< 09:51:18 Fetch plain text version of dpans and adjust script. 09:53:13 too bad, that sorta' means you like play-doh, too ;-P 09:53:38 :( 09:56:24 ./forth/local/dpans No such directory. Pattern not found. 09:57:08 Fetch plain text version of dpans and adjust script. 09:57:31 The script is straightforward. 09:57:43 Dude, open the damned browser and find it. Get a copy for offline - or not. 10:03:15 --- join: xjrn (n=jim@astound-69-42-10-25.ca.astound.net) joined #forth 10:10:28 --- join: pgas` (n=user@ppp089210050084.dsl.hol.gr) joined #forth 10:14:22 --- join: kar8nga (n=kar8nga@jol13-1-82-66-176-74.fbx.proxad.net) joined #forth 10:17:01 --- join: segher (n=segher@84-105-60-153.cable.quicknet.nl) joined #forth 10:19:00 --- quit: Quartus` (Read error: 110 (Connection timed out)) 10:29:20 --- join: dandersen (n=dkcl@204.66.218.87.dynamic.jazztel.es) joined #forth 11:08:40 Well... This tree seems to balance itself. That's nice. 11:12:37 --- join: davec_ (n=tgunr@cust-66-249-166-12.static.o1.com) joined #forth 11:12:57 --- nick: davec_ -> Guest7125 11:14:33 --- quit: Guest7125 (Remote closed the connection) 11:15:03 --- join: tgunr_ (n=tgunr@cust-66-249-166-12.static.o1.com) joined #forth 11:17:18 --- join: proteusguy_ (n=proteusg@zeppelin.proteus-tech.com) joined #forth 11:20:17 --- quit: proteusguy (Read error: 110 (Connection timed out)) 11:28:32 --- join: TreyB (n=trey@adsl-76-247-247-96.dsl.hstntx.sbcglobal.net) joined #forth 11:40:17 --- quit: proteusguy_ (Client Quit) 11:41:03 --- nick: Snoopy_1711 -> Snoopy_1611 11:41:05 --- quit: kar8nga (Remote closed the connection) 11:54:46 --- join: alex4nder (n=alexande@wsip-72-215-164-129.sb.sd.cox.net) joined #forth 11:56:19 hey 12:12:07 How are you alex4nder? 12:12:42 Umbilical connection works now? 12:16:30 --- join: Snoopy_1711 (i=Snoopy_1@dslb-088-068-197-138.pools.arcor-ip.net) joined #forth 12:19:33 Maki: not yet.. I've been slacking on getting feedback to Stephen. 12:30:09 --- quit: Snoopy_1611 (Read error: 110 (Connection timed out)) 13:04:41 --- join: Al2O3 (n=Al2O3@c-75-70-11-191.hsd1.co.comcast.net) joined #forth 13:24:41 --- quit: xpololz (Read error: 113 (No route to host)) 13:24:45 --- quit: alex4nder (Read error: 60 (Operation timed out)) 13:33:43 --- quit: dandersen ("leaving") 13:38:51 --- join: Al2O3_ (n=Al2O3@c-75-70-11-191.hsd1.co.comcast.net) joined #forth 13:43:19 --- join: kar8nga (n=kar8nga@jol13-1-82-66-176-74.fbx.proxad.net) joined #forth 13:43:20 --- quit: ASau (Read error: 104 (Connection reset by peer)) 13:43:38 --- quit: pgas` (Read error: 113 (No route to host)) 13:47:29 --- quit: Al2O3 (Read error: 110 (Connection timed out)) 13:47:29 --- nick: Al2O3_ -> Al2O3 14:07:30 --- join: ASau (n=user@83.69.227.32) joined #forth 14:11:04 --- quit: qFox ("Time for cookies!") 14:15:20 --- join: alex4nder (n=alexande@dsl093-145-168.sba1.dsl.speakeasy.net) joined #forth 14:15:26 --- quit: alex4nder (Client Quit) 14:15:28 --- join: alex4nder (n=alexande@dsl093-145-168.sba1.dsl.speakeasy.net) joined #forth 14:15:33 hey 14:15:42 --- quit: alex4nder (Client Quit) 14:16:08 --- join: alex4nder (n=alexande@dsl093-145-168.sba1.dsl.speakeasy.net) joined #forth 14:17:12 --- join: JFLF (n=JF@150.203.5.197) joined #forth 14:27:43 --- quit: kar8nga (Remote closed the connection) 14:39:09 --- join: erider (n=chatzill@unaffiliated/erider) joined #forth 14:45:39 --- quit: erider (Read error: 104 (Connection reset by peer)) 15:15:30 --- join: erider (n=chatzill@unaffiliated/erider) joined #forth 15:22:36 --- quit: alex4nder (Read error: 110 (Connection timed out)) 15:25:36 --- quit: GeDaMo ("Leaving.") 16:02:36 --- join: TR2N (i=email@89-180-188-114.net.novis.pt) joined #forth 16:12:55 --- quit: Maki ("Leaving") 16:43:20 --- join: nighty__ (n=nighty@210.188.173.245) joined #forth 16:59:45 --- quit: JFLF ("Leaving") 17:12:35 --- join: JFLF (n=JF@150.203.5.197) joined #forth 18:05:08 --- quit: erider ("ChatZilla 0.9.86 [Firefox 3.5.7/20091221164558]") 18:17:39 --- quit: madgarden (Read error: 54 (Connection reset by peer)) 18:18:03 --- join: madgarden (n=madgarde@CPE001d7e527f89-CM00159a65a870.cpe.net.cable.rogers.com) joined #forth 18:43:15 --- join: xpololz (n=xpololz@90.80-203-124.nextgentel.com) joined #forth 18:58:09 --- quit: xpololz (Client Quit) 19:52:13 --- join: crc (n=charlesc@m795e36d0.tmodns.net) joined #forth 19:56:48 --- mode: ChanServ set +o crc 20:28:46 --- quit: nighty__ (Read error: 60 (Operation timed out)) 20:45:11 --- join: nighty__ (n=nighty@210.188.173.245) joined #forth 21:07:08 --- quit: tgunr_ ("Leaving...") 21:09:27 --- quit: crc (Read error: 60 (Operation timed out)) 21:19:00 --- quit: PoppaVic (Read error: 60 (Operation timed out)) 21:25:49 --- join: forther (i=62d2faca@gateway/web/freenode/x-utsmpqzgemhvzcjc) joined #forth 21:25:58 hi all 21:33:18 --- join: PoppaVic (n=pops@adsl-99-60-192-62.dsl.sfldmi.sbcglobal.net) joined #forth 22:13:57 --- quit: JFLF ("Leaving") 22:21:11 --- join: PoppaVic_ (n=pops@99.150.136.128) joined #forth 22:21:13 --- quit: PoppaVic (Nick collision from services.) 22:21:40 --- nick: PoppaVic_ -> PoppaVic 22:48:55 --- quit: forther ("Page closed") 23:06:27 --- join: kar8nga (n=kar8nga@jol13-1-82-66-176-74.fbx.proxad.net) joined #forth 23:42:23 --- join: madwork_ (n=madgarde@204.138.110.15) joined #forth 23:58:49 --- join: addled_ (n=adl@21.Red-81-38-155.dynamicIP.rima-tde.net) joined #forth 23:59:59 --- log: ended forth/10.01.13