00:00:00 --- log: started forth/07.02.22 00:57:22 I'm trying to implement a custom loop with Ficl the for seems to be wrong, or breaks something further down the line : for here >r ; immediate compile-only : next here r> - .s ; immediate compile-only ( the next is unfinished but will probably use (branch) ) What am I doing wrong? 01:02:18 I should be pushing onto the data stack I guess for the immediate word for, rather than the return stack, because ; uses the return stack, right? 01:09:56 --- join: TreyB (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 01:40:05 I'm still working on the same problem. I got a little further :) http://rafb.net/p/EsJnhZ80.html (branch) from my reading of the C code does a relative jump using the next data after it in the dictionary. 01:40:39 does> really confuses me, and I've read the Forth Programmer's Handbook repeatedly. I'm not seeing exactly how it works yet. I'm not even sure if this is a good place for it. 01:51:00 --- quit: imaginator ("sleep") 02:00:12 : for postpone >r here ; immediate 02:01:25 : next lit postpone r> postpone 1- postpone dup postpone >r ?branch postpone rdrop ; 02:02:35 : lit ( x -- ) \ compile code to load x onto the stack at runtime (not immediate) 02:03:36 : ?branch ( addr -- ) \ compile a conditional branch to addr. compiled code has this effect: ( true/false -- ) 02:04:06 I don't know if LIT or ?BRANCH exist in your forth, or what it'd take to write them, but they are what you need 02:07:18 hmm... I guess you could do "postpone literal" instead of "lit" above 02:07:46 I could never understand why LITERAL would be immediate 02:14:07 --- join: TreyB_ (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 02:14:08 --- quit: TreyB (Read error: 131 (Connection reset by peer)) 02:14:29 --- quit: JasonWoof ("off to bed") 02:35:47 --- join: [Shain] (i=steve@adsl-75-18-176-68.dsl.pltn13.sbcglobal.net) joined #forth 02:38:00 --- quit: Shain (Read error: 104 (Connection reset by peer)) 02:46:39 --- quit: TreyB_ (Read error: 145 (Connection timed out)) 02:47:37 --- join: TreyB (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 02:57:56 --- join: TreyB_ (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 03:03:13 --- quit: TreyB (Read error: 145 (Connection timed out)) 03:03:22 --- quit: TreyB_ (Read error: 131 (Connection reset by peer)) 03:03:23 --- join: TreyB (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 03:04:06 --- join: frunobulax (n=mhx@EPE-PC029.ele.tue.nl) joined #forth 03:06:40 --- quit: frunobulax (Client Quit) 03:27:12 --- quit: TreyB (Read error: 145 (Connection timed out)) 03:27:12 --- quit: madwork (Read error: 54 (Connection reset by peer)) 03:35:05 --- join: SergPenguin (n=knoppix@195.16.50.165) joined #forth 03:45:06 --- quit: SergPenguin ("Leaving") 03:59:43 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 03:59:43 --- mode: ChanServ set +o tathi 04:54:24 good morning 04:56:37 good morning 04:57:52 whats shaking? 04:59:23 I stopped playing around with Linux distros and am working on my Forth again 04:59:32 how goes the bot? 05:00:40 I finished my socket library in C but I'm having a problem with my read wrapper function 05:02:47 tathi: and the bot won't connect to the server. I looked at it and crc looked at it and we can't figure out why it would connected 05:04:09 huh. 05:04:36 it timeout 05:04:46 for some odd reason 05:05:32 can I see the code again? 05:05:55 you sure can 05:09:09 tathi: http://retroforth.com/paste/?id=289 05:30:37 how are read and write defined? 05:30:50 3 (int) libc read read ( fd addr u -- u' ) 05:30:51 ? 05:33:44 you know what, forget it. 05:34:18 I'm not interested in teaching you basic C. 05:34:51 tathi: ok ?? 05:35:13 It is rather a difficult approach, trying to learn English by reading a French book on the subject, when you speak neither German nor French. 05:35:20 Nor English. 05:35:32 erider: sorry, but there are just so many things wrong with this code I don't know where to start. 05:35:56 no worries thanks 05:36:49 German? 05:37:01 You take my meaning. 05:37:20 nope sorry 05:37:22 If you don't know Forth, and don't know C, a project involving knowledge of both is a particularly foolish place to start. 05:37:29 ya 05:37:45 --- join: timlarson_ (n=timlarso@65.116.199.19) joined #forth 05:38:12 then where should one start? 05:38:53 And I no C I may not be a master at it but I do have a working knowledge of the language 05:39:02 no you don't 05:39:19 I don't? 05:39:28 you don't know enough about it to try and interface with it from another language. 05:39:55 I interface with lua all the time 05:40:02 you didn't know what a null-terminated string was 05:40:05 I just not to familiar with forth 05:40:15 I suspect you're trying to use read() and write() on a FILE* 05:40:31 Forth doesn't use null-terminated strings at all. That's a C thing. 05:41:23 ok and I don't see where you are going with this 05:42:56 I'm giving examples of where your knowledge about C isn't sufficient to do what you're trying to do. 05:43:54 if you want to shit on my this morning then just do that. Do say I can't start coding with forth and C and then give no suggestions where to start. I'm trying to learn forth because I think it would but a useful language. but I want to code something useful 05:44:30 Oh, sorry. 05:45:01 It is best to learn Forth by learning Forth. Rarely is something useful produced out of the gate. 05:45:50 crc: look at the code as well and tried some different things and he couldn't get it working either. So are you saying he doesn't know C and forth? 05:46:10 If you want to do an IRC bot, install ucspi-tools and do 'tcpclient irc.freenode.net 6667 gforth mybot.fs', and use type and accept to read and write. 05:46:42 er, write and read 06:14:32 --- part: erider left #forth 06:21:38 --- join: TreyB (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 06:26:12 --- quit: Quartus_ (Read error: 145 (Connection timed out)) 06:32:18 --- join: TreyB_ (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 06:41:11 --- quit: TreyB (Read error: 145 (Connection timed out)) 06:45:12 --- join: madwork (n=foo@204.138.110.15) joined #forth 06:49:42 --- join: TreyB (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 06:53:53 --- quit: TreyB_ (Read error: 145 (Connection timed out)) 07:14:57 --- quit: [Shain] (Read error: 110 (Connection timed out)) 07:18:43 --- join: edrx (n=Eduardo@201.5.11.131) joined #forth 07:19:06 --- quit: tathi ("leaving") 07:30:25 --- join: TreyB_ (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 07:38:44 --- quit: TreyB (Read error: 145 (Connection timed out)) 07:38:49 --- join: TreyB (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 07:43:52 --- quit: TreyB_ (Read error: 145 (Connection timed out)) 07:46:42 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 07:46:42 --- mode: ChanServ set +o tathi 07:55:01 --- quit: TreyB (Read error: 145 (Connection timed out)) 08:07:19 --- join: virl (n=virl@chello062178085149.1.12.vie.surfer.at) joined #forth 08:40:51 --- quit: edrx (Remote closed the connection) 09:45:05 --- join: TreyB (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 10:34:00 --- join: iano (n=iosgood@gw-pdx.extensis.com) joined #forth 11:27:42 --- quit: iano () 11:44:07 --- join: iano (n=iosgood@gw-pdx.extensis.com) joined #forth 12:56:49 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 13:06:04 --- join: JasonWoof (n=jason@c-71-192-30-169.hsd1.ma.comcast.net) joined #forth 13:06:04 --- mode: ChanServ set +o JasonWoof 13:29:36 --- quit: tathi ("brb") 13:29:47 --- join: madwork_ (n=foo@204.138.110.15) joined #forth 13:29:57 --- quit: timlarson_ ("Leaving") 13:36:44 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 13:36:44 --- mode: ChanServ set +o tathi 13:38:04 --- join: imaginator (n=George@georgeps.dsl.xmission.com) joined #forth 13:46:31 --- quit: madwork (Read error: 110 (Connection timed out)) 14:28:55 --- join: edrx (n=Eduardo@200.217.105.133) joined #forth 14:46:39 --- join: Snoopy42 (i=snoopy_1@dslb-084-058-184-031.pools.arcor-ip.net) joined #forth 14:48:27 --- join: Quartus_ (n=Quartus_@209.167.5.1) joined #forth 14:48:27 --- mode: ChanServ set +o Quartus_ 15:14:13 --- part: edrx left #forth 16:21:36 --- join: arke (n=chris@pD9E06B5F.dip.t-dialin.net) joined #forth 16:21:36 --- mode: ChanServ set +o arke 16:23:41 --- quit: arke (Client Quit) 16:28:49 --- join: arke (n=chris@pD9E06B5F.dip.t-dialin.net) joined #forth 16:28:49 --- mode: ChanServ set +o arke 16:32:40 hi 16:33:07 hey 16:34:18 ho 16:42:58 hi 16:44:11 Did that one already. (suggestions: ha, he, herk, heya, hola) 16:44:39 :) 17:01:11 if I have an immediate word (branch-final) that does a relative jump with the bytes following it, what's the best way to say write (branch-final) and a fixed offset to a word in dictionary-space so that it loops forever? 17:05:36 anyone know? I've searched google but I must be searching for the wrong thing. I can't just use see to figure out how other looping words work in Ficl, because most are implemented in C. 17:11:31 :( 17:20:36 --- quit: imaginator (".") 17:37:27 karqwoc 17:38:15 heh. Cat on keyboard 17:39:18 how are you? 17:42:24 --- quit: madgarden (Read error: 104 (Connection reset by peer)) 17:42:46 --- join: madgarden (n=madgarde@bas2-kitchener06-1096668571.dsl.bell.ca) joined #forth 18:04:32 --- join: edrx (n=Eduardo@201.5.12.188) joined #forth 18:11:58 --- join: Shain_mobile (n=chatzill@m2f0e36d0.tmodns.net) joined #forth 18:12:15 --- quit: Shain_mobile (Client Quit) 18:23:06 --- quit: tathi ("leaving") 18:40:20 --- quit: iano (Read error: 110 (Connection timed out)) 19:11:53 --- join: iano (n=iosgood@sub26-46.member.dsl-only.net) joined #forth 19:13:02 --- quit: iano (Client Quit) 19:42:00 --- quit: virl (Remote closed the connection) 22:03:39 --- join: TreyB_ (n=trey@cpe-66-87-192-27.tx.sprintbbd.net) joined #forth 22:19:58 --- quit: TreyB (Read error: 110 (Connection timed out)) 22:49:01 --- quit: slava () 23:25:05 --- quit: edrx (Remote closed the connection) 23:59:59 --- log: ended forth/07.02.22