00:00:00 --- log: started forth/08.07.14 00:13:17 --- join: kar8nga (n=kar8nga@AMarseille-151-1-51-224.w82-122.abo.wanadoo.fr) joined #forth 00:37:49 --- join: ASau (n=user@84.253.85.38) joined #forth 00:48:27 --- part: kar8nga left #forth 00:50:31 --- join: qFox (i=C00K13S@234pc222.sshunet.nl) joined #forth 01:36:32 hmm, got my forth able to switch betwen token-threaded and direct-threaded with a #define 01:36:38 now to add subroutine-threaded 01:54:11 --- join: jamc (i=vv0p2md6@90-231-88-54-no84.business.telia.com) joined #forth 02:14:30 --- join: ramkrsna (n=ramkrsna@unaffiliated/ramkrsna) joined #forth 02:57:47 --- join: kar8nga (n=kar8nga@AMarseille-151-1-51-224.w82-122.abo.wanadoo.fr) joined #forth 03:34:32 --- part: kar8nga left #forth 04:26:15 --- join: fwiffo (i=none@unaffiliated/fwiffo) joined #forth 04:40:59 --- quit: aum ("Leaving") 04:49:10 --- join: kar8nga (n=kar8nga@AMarseille-151-1-51-224.w82-122.abo.wanadoo.fr) joined #forth 05:17:33 --- join: pozic (n=Pozic@unaffiliated/pozic) joined #forth 07:02:02 --- quit: Deformative (Remote closed the connection) 07:02:09 --- join: Deformative (n=joe@c-68-62-76-160.hsd1.mi.comcast.net) joined #forth 07:18:35 --- quit: Raystm2 (Read error: 110 (Connection timed out)) 07:27:14 --- join: Deformati (n=joe@c-68-62-76-160.hsd1.mi.comcast.net) joined #forth 07:28:00 --- quit: Deformative (Remote closed the connection) 08:02:59 --- quit: ecraven ("bbl") 08:19:31 --- quit: jamc ("rcirc on GNU Emacs 23.0.60.1") 08:41:38 --- join: gnomon_ (n=dsl@CPE0050eb372bdb-CM000f9f776f96.cpe.net.cable.rogers.com) joined #forth 08:53:10 --- quit: gnomon (Read error: 110 (Connection timed out)) 09:10:14 --- quit: pozic ("leaving") 09:26:50 --- join: gnomon (n=dsl@CPE0050eb372bdb-CM000f9f776f96.cpe.net.cable.rogers.com) joined #forth 09:36:54 --- quit: gnomon_ (Read error: 110 (Connection timed out)) 09:42:17 --- join: iano (n=iosgood@sub26-46.member.dsl-only.net) joined #forth 09:42:35 --- quit: iano (Remote closed the connection) 10:31:22 --- join: ecraven (n=nex@plc31-103.linzag.net) joined #forth 10:37:33 --- join: ASau` (n=user@79.111.36.90) joined #forth 10:45:38 --- join: JasonWoof (n=jason@c-65-96-161-30.hsd1.ma.comcast.net) joined #forth 10:45:38 --- mode: ChanServ set +o JasonWoof 10:47:10 --- join: Maki_ (n=Maki@adsl-224-84.eunet.yu) joined #forth 10:48:31 Dobryj vecer, Maki_. 10:48:59 Dobra vecer ASau :) 12:01:11 --- quit: ASau` (Read error: 110 (Connection timed out)) 12:16:30 --- part: kar8nga left #forth 12:51:17 --- join: ASau` (n=user@79.111.37.165) joined #forth 13:39:59 --- join: aum (n=aum@60-234-243-247.bitstream.orcon.net.nz) joined #forth 14:35:53 --- quit: qFox ("Time for cookies!") 15:01:26 --- join: forther (n=forther@207.47.34.100.static.nextweb.net) joined #forth 15:14:13 --- quit: Maki_ ("Leaving") 15:21:08 --- join: Raystm2 (i=Ray@unaffiliated/raystm2) joined #forth 15:21:44 --- quit: forther ("Leaving") 15:22:02 --- quit: ecraven ("bbl") 16:46:43 --- nick: modesto_ -> modesto 16:59:53 --- quit: fwiffo (Remote closed the connection) 17:04:14 --- quit: Raystm2 (Read error: 113 (No route to host)) 18:02:27 --- nick: Deformati -> Deformative 19:31:08 --- join: si1verkey (n=si1verke@74-130-4-107.dhcp.insightbb.com) joined #forth 19:34:04 hello, anyone? 19:37:09 hi 19:37:51 hi aum 19:38:12 Do you tolerate complete noobs? 19:38:29 of course 19:39:27 I have a question trying to pass proper reference to a string to write-line in win32forth on an xp machine 19:40:22 si1verkey: what's the stack comment for write-line? 19:42:36 addr len filehandle, my problem is how to store the string. I put create atext ," I hope this works " using the comma-quote. Then I tried to use atext @ to supply first arg to write-line 19:42:43 oh, it's an ANS word 19:42:49 ( c-addr u fileid -- ior ) 19:42:58 yes 19:43:32 what's ," do? 19:44:12 let me flip to Forth App...Techniques page... 19:44:21 you might want s" 19:44:40 my forth has ," but I'm not sure what it does 19:46:34 ," seems funky 19:46:35 try using s" 19:46:40 I tried s" but maybe did not experiment enough. I'm hazy on allot -ing for a string. Or rather how to use the variable after 19:46:56 doesn't create a variable 19:47:03 advantage of s" is that you don't have to allot manually 19:47:19 : foo s" hellow there!" ; 19:47:43 foo .s 298374918234 13 OK 19:47:58 s" allots the string for you, and gives you ( -- addr len) 19:48:09 variable fd 19:48:10 ... 19:48:32 s" #!/bin/bash" fd @ write-line 19:48:45 Seems so clear, so I could put foo @ 14 handle write-line ? 19:48:58 no 19:49:03 --- join: Al2O3 (n=Al2O3@71.33.245.81) joined #forth 19:49:15 foo returns an address and a length 19:49:20 14 is extra cuz len is already on stack? 19:49:28 what? 19:49:38 foo puts an address and a length on the stack 19:49:54 bl hellow there! is 14 in length 19:49:55 : foo ( -- addr len) s" bamph" ; 19:50:11 word not found: there! 19:50:27 sorry, parser head 19:50:37 as in s" hellow there!" 19:50:48 s" hello world" gives addr len 19:51:01 exactly what you need to pass to write-line (sans the fd) 19:51:36 if you'd like to pass a static string to write-line, you can do it with s" like so: 19:51:47 s" hello" fd write-line 19:52:09 just any short string at this point. Let me try it and I'll be back? 19:52:26 check the stack as you go 19:52:33 hit .s to see the stack 19:52:41 an address will look like a very long (possibly negative) number 19:54:05 trying to paste what I've been fload-ing 19:54:32 : APEN s" a.txt" r/w open-file cr dup ." ior is " . cr ; 19:54:33 variable ahndl 19:54:35 : AWORKs? 0 = if ahndl ! then ; 19:54:37 : atext s" I hope this works " 19:54:38 : AWRITE atext @ ahndl @ write-line ; 19:54:39 : ACLOSE ahndl @ close-file cr ." ior is " . cr 19:56:23 ok, I can see several problems: 19:56:39 1) APEN leaves garbage on the stack (the FD and ior) and doesn't set ahndl 19:57:01 2) AWORKs? makes no sense to me 19:57:10 3) atext is missing ; at the end 19:57:18 (as is ACLOSE) 19:57:42 4) AWRITE must not have a @ after atext 19:58:02 after atext is called you have an address and a count on the stack, makes no sense to fetch 19:58:44 stack empty after aworks? though, but I'm listening. corrected missing ; and next one was bad paste here., ok I am trying... 19:59:09 try working directly in the interpreter 19:59:22 write and run your stuff directly in there. once you get something right, paste it into your file 19:59:42 if you're working with unfamilliar words, check the stack after each word you type 19:59:56 then you can see what is happening 20:00:05 first two lines work, built as you say, interactively 20:00:07 and using win32f.. stack display 20:00:32 if win32forth doesn't dispaly the stack automatically when you press enter, you can tell it to by executing .s 20:00:59 type all this on seperate lines like I do: 20:01:04 s" a.txt" .s 20:01:08 r/w .s 20:01:12 open-file .s 20:01:16 drop .s 20:01:21 ahndl .s 20:01:22 ! .s 20:01:54 when it breaks I get ACCESS VIOLATION (not shouting, caps are what I see) 20:02:02 playing catch up ... 20:02:39 if you want, you can paste me your whole document, eg here: http://rafb.net/paste/ 20:04:40 that was whole thing. a.txt just has the "mary has a little lamb.." string that Sam Falvo had in his OTS video LOL 20:06:31 ok, so how do you use it? 20:06:41 can I see the corrected version? 20:07:41 : AOPEN s" a.txt" r/w open-file cr dup ." ior is " . cr ; 20:07:43 variable ahndl 20:07:44 : AWORKs? 0 = if ahndl ! then ; 20:07:46 : atext s" I hope this works " ; 20:07:47 : AWRITE atext ahndl @ write-line ; 20:07:49 : ACLOSE ahndl @ close-file cr ." ior is " . cr ; 20:07:50 @ after ahndl also not needed? 20:08:10 needed 20:09:33 oh, I see, you're passing the ior from aopen to aworks? 20:10:02 ok, how do you use it? 20:10:09 yes, "factoring" 20:10:45 SUCCESS!! 20:10:47 --- quit: aum ("Leaving") 20:12:01 so now all I have to do is use file-position and some file length word to get text to append instead of prepending. Thanks, problem was simpler than I tried to make it! 20:12:22 you had several bugs 20:12:28 can I suggest a change in your method? 20:12:50 aworks?is used immediately after aopen YES SUGGEST AWAY I WILL HEED 20:13:01 it is very weird to have your "if" inside "aworks?" 20:13:11 usually words ending with a question mark answer a question 20:13:20 ie they return a boolean 20:13:25 ah yes bad style 20:13:28 you want your program to go something like this: 20:13:56 : main aopen if ." couldn't open file" bye then main2 ; 20:14:18 or, I think you can do abort" 20:14:32 yes I have played with abort" 20:14:47 yeah, that's cooler 20:14:54 : main aopen if abort" couldn't open file" then main2 ; 20:15:27 also, this is a very good time to get in the habbit of writing stack comments 20:15:40 true 20:15:56 stack comments make it feasable to find bugs, and to use words you've written more than an hour ago 20:16:36 and feasable for others to follow ! 20:17:13 You don't archive this like the cF version? 20:18:59 someone else does 20:19:33 FnFC? 20:20:24 eh? 20:20:27 clog is the logger bot 20:20:33 http://tunes.org/~nef/logs/ 20:21:40 a link at the top of my chatzilla when I joined. I have a lot to learn but I'm hooked on Forth paradigm. Even put a stack class in excel vba to use for indenting some cheezy "meta programming" 20:22:47 welcome aboard 20:24:10 You're one of my many heroes, if I can say that without sounding like a ... something. I've been reading forth links and books for over a year. But not noodling enough 20:25:33 Even have DSForth on my old Cassiopeia E125 LOL didn't pay for it so have no documentation 20:27:44 So hopefully I won't try the patience of the members too much. I'll looks in logs first. Maybe there is a noob-specific channel like the off-topic channels 20:28:24 I'm signing off, Thanks again! 20:28:32 --- part: si1verkey left #forth 20:29:54 --- quit: Al2O3 () 22:28:06 --- quit: JasonWoof ("off to bed") 22:29:58 --- join: craigoz (n=craigo@202.63.56.72) joined #forth 23:20:04 --- quit: gnomon (Remote closed the connection) 23:20:16 --- join: gnomon (n=dsl@CPE0050eb372bdb-CM000f9f776f96.cpe.net.cable.rogers.com) joined #forth 23:34:03 --- join: ecraven (n=nex@140.78.42.115) joined #forth 23:59:59 --- log: ended forth/08.07.14