00:00:00 --- log: started forth/08.04.22 00:44:02 --- join: ecraven (n=nex@plc31-103.linzag.net) joined #forth 00:59:47 --- quit: proteusguy (Connection timed out) 01:00:40 --- join: proteusguy (n=proteusg@61.7.144.97) joined #forth 01:10:16 --- quit: arke (Read error: 110 (Connection timed out)) 02:26:36 --- quit: nighty^ (Remote closed the connection) 03:42:27 --- quit: ecraven ("bbl") 05:05:31 --- quit: snoopy_1611 (Read error: 131 (Connection reset by peer)) 05:10:22 --- quit: Snoopy42 (Read error: 145 (Connection timed out)) 05:20:50 --- join: ecraven (n=nex@plc31-103.linzag.net) joined #forth 08:15:40 --- quit: Quartus` ("used jmIrc") 08:15:56 --- join: Quartus` (n=Quartus`@205.205.50.2) joined #forth 09:04:08 --- join: JasonWoof (n=jason@c-65-96-165-155.hsd1.ma.comcast.net) joined #forth 09:04:08 --- mode: ChanServ set +o JasonWoof 10:25:41 --- join: ygrek (i=user@gateway/tor/x-08a889b91ea26c16) joined #forth 10:41:35 --- join: forther (n=forther@207.47.34.100.static.nextweb.net) joined #forth 11:31:52 --- join: Snoopy42 (i=snoopy_1@dslb-088-068-212-174.pools.arcor-ip.net) joined #forth 11:33:38 --- join: Maki (n=Maki@adsl-224-84.eunet.yu) joined #forth 11:46:43 --- join: arke (n=arke@p57A755E5.dip.t-dialin.net) joined #forth 11:46:44 --- mode: ChanServ set +o arke 12:24:09 There is no way to do circular function calls in forth, is there? 12:24:27 what's a circular function call 12:24:54 : foo ... bar ; : bar ... foo ; 12:25:03 defer bar 12:25:07 : foo ... bar ; 12:25:10 : bar ... foo ; 12:25:14 err 12:25:18 : (bar) ... foo ; 12:25:21 ' bar is (bar) 12:25:31 or maybe its ' (bar) is bar 12:25:33 Quartus` knows 12:26:52 You can do it via vectored execution, or - if you're crazy - by backpatching your compiled code. 12:38:59 --- quit: madgarden (Read error: 110 (Connection timed out)) 12:43:49 ya you prolly want vectored execution: http://www.forth.com/starting-forth/sf9/sf9.html (scroll down a page) 12:46:06 or what gnomon said.. something like [ here 0 , ] and then later use ! to store the thread of the word to that location 12:46:43 (later being before you run that word obviously) 12:53:32 --- join: TreyB_ (n=trey@74.203.168.157) joined #forth 12:55:03 so would be like : foo ... [ here 0 , ] ; : bar [ here ] ... ; swap ! (**untested**) 13:01:13 but ya use vectored exec unless the indirection is too inefficient 13:01:37 highly doubtful that it will be too inefficient with defer 13:02:02 ya prolly not.. keep it outta inner loopz etc 13:10:24 also if you need to do this many times, vectors are less space efficient 13:10:39 if your target has 4kb of ram, maybe 13:11:00 --- quit: TreyB (Read error: 110 (Connection timed out)) 13:46:12 don't use ! to patch a call 13:46:27 isn't there a standard word like RESOLVE 13:46:42 yeah, you've got a really unreliable method going there; might work on some erector-set Forth, but it's hardly portable 13:47:02 ya will depend on thread model 13:47:03 slava's method is what you want 13:47:09 defer bar 13:47:14 : foo ... bar ; 13:47:26 Quartus`: if you're concerned abotu the overhead of a deferred call you've alredy started off on the wrong track i think 13:47:29 : real-bar ... foo ; ' real-bar is bar 13:47:50 overhead? right. I don't disagree. 13:48:52 also will break if you use it in a loop : foo begin [ here 0 , ] again ; 13:49:14 If you're trying to optomize to the point where a defered word would matter, you'd probably do better to just inline the whole thing 13:54:01 Fractal, it's a bad technique front-to-back. 13:55:55 quartus - for this application i'd prolly agree.. tho i'm hesitant to call the technique unconditionally bad.. threads give you lots of opportunities not avail in other langs 13:56:56 if you mean a specific kind of threaded implementation, even then there are better methods 13:57:48 Better than stuffing placeholder values into memory and tagging them up later. Semantically meaningful ways, even. 13:58:20 well.. the technique should work with most types of threading I think.. you might have to use something other than ! tho 13:59:11 what type(s) of threading does quartus forth use? 13:59:21 and no offence but does anybody use palms anymore? :) 13:59:23 it's not portable; it's not readable; there are better alternatives. 13:59:33 Quartus Forth is a native-code generating system. 13:59:48 nice.. do you optimise? 13:59:55 To a point. 14:00:32 should try to dig up my IIIxe 14:03:27 --- quit: ygrek (Remote closed the connection) 14:04:55 prolly still has quartus installed :) 14:08:47 :) 14:09:01 * slava is fixing up the rss library 14:27:22 --- quit: Maki ("Leaving") 14:36:24 --- quit: forther ("Leaving") 15:04:41 --- join: tathi (n=josh@pdpc/supporter/bronze/tathi) joined #forth 15:04:42 --- mode: ChanServ set +o tathi 15:16:04 --- quit: ecraven ("bbl") 15:48:44 so.. you guys don't like relying on indirect/direct threading.. any thoughts on trans-word programming like : foo ... if ; : bar then ... ; (if conditional is false, branch to bar (not call it), with bar as an additional entry point) 15:48:57 ? 15:49:08 that's unreadable and uselesss 15:49:17 non-portable, confusing, and pointless. A parlour trick without any value. 15:49:40 what are the portability restrictions? 15:50:05 its disallowed by the standard 15:50:11 It is indeed. 15:50:26 ANS? 15:51:10 that's the one. 15:53:50 what is rationale for disallowing it? so ; can use control stack? 15:54:08 why would you want to do something like that? 15:54:09 The colon-sys and the control stack may both use the data stack. 15:54:18 Yes, why? It's daft. 15:56:26 just curious.. i have used this and similar techniques before, but obviously not in portable code 15:56:48 Not sure who you're trying to impress with peculiar technique, but it's very poor practice. 15:56:52 Used how? For what? 15:57:28 for sharing parts of threads between words 15:57:36 that's why you define a new word 15:57:44 define "thread"? 15:57:46 It's called 'factoring'. 15:57:59 i hope this wasn't in real code. otherwise i pity your coworkers 15:57:59 He's using 'thread' to mean a sequence of compiled code in a threaded forth, tathi. Confusing. 15:58:06 ah, ok 15:58:18 That was my first guess, but I wasn't sure. 15:58:18 sry what do you guys call that? 15:58:35 if you want to share a part of a word, define a new word with the shared part 15:58:45 Factoring. 16:07:52 that's what i do for a living :) 16:08:00 :) 16:23:19 anyways gotta run. thanks for your comments everyone! (PS. "unreadable" and "useless" are what python programmers say about lambda ;) peac30utz++ 16:26:23 yeah, but you probably don't know python, lisp or forth 16:47:49 --- join: madgarden (n=madgarde@bas2-kitchener06-1096751243.dsl.bell.ca) joined #forth 16:56:04 --- quit: madgarden (Read error: 104 (Connection reset by peer)) 17:43:33 --- join: madgarden (n=madgarde@bas2-kitchener06-1096751243.dsl.bell.ca) joined #forth 18:09:03 --- join: nighty^ (n=nighty@210.188.173.246) joined #forth 19:48:58 --- quit: JasonWoof ("bed") 21:56:00 --- quit: madwork (Read error: 110 (Connection timed out)) 22:10:14 --- join: Aardappel (n=Aardappe@cpe-24-175-70-30.tx.res.rr.com) joined #forth 22:15:27 so 22:15:55 I would say the hardest thing for non-forth programmers when they try forth is mentally picturing the stack as you read through code 22:16:19 it takes some practice to read stack code but then its pretty easy once you get accustomed to it 22:16:20 has there been any tool (editor? debugger?..) that helps with this somehow? visualizes it? 22:16:32 sure yeah 22:16:38 i have a tool which checks stack effect declarations for validity 22:16:54 though I must say with a lot of dups & swaps its easy to lose track 22:17:03 Then don't do so many. 22:17:07 dups and swaps are pretty simple 22:17:11 haha 22:17:35 I'm serious. 22:17:36 when you start having too much rot, tuck and so on it can be a problem and i try to simplify code or use locals if it becomes an issue 22:21:28 Aardappel: also debuggers which step through code and show the stack at each point are very common 22:22:24 ok 22:23:16 any editors? I guess they would have to do some analysis to know the shape of the stack at a particular point 22:23:34 i'm planning on working on that at some point 22:26:12 cool 22:26:31 do you work on a particular forth implementation or what 22:30:03 both Quartus and I have our own implementations :) 22:30:23 slava has his own language that looks a little like Forth if you kind of squint 22:30:28 Quartus sells his for money and I use mine at work 22:30:52 I give away a version, too. 22:32:35 cool 22:32:48 I've written a bunch of compilers 22:33:13 looking at making a stack based language with a more visual environment next 22:33:18 thank you 22:34:48 thats funny... looking on your site... I think I may have actually tried your forth waaay back on my palm 22:35:52 I see. 22:36:02 how visual of an environment are you looking for? 22:37:15 very visual 22:37:33 it would still be forth-like in the sense that it is a sequence of stack ops 22:38:18 but other than that, its a mouse driven editing environment, that uses lines to help view what the stack looks like at any point 22:40:49 here's a pretty old screenshot: http://factorcode.org/pics/new-ui-and-help.png 22:42:58 that looks extensive :) 22:43:09 I have heard of factor, but not looked into it yet 23:04:01 --- join: mdmorri1 (n=mdmorri1@user-1120gkv.dsl.mindspring.com) joined #forth 23:06:46 Their it's working now. 23:07:09 I just had to let it sit a few minutes. 23:08:55 mdmorri1: you were in ##forth formerly and now you're in #forth 23:09:05 Oh. 23:09:34 I got disconnected so I relogged in to the one I thought I was on. 23:10:09 I was wondering why the channel had so many more people on now. 23:10:28 so are you using os x 10.5.2? 23:11:13 Yes. 23:11:48 i think i've seen your bug before 23:12:14 Really? What exactly is the problem? 23:12:27 And is it going to do that every time I run it? 23:12:37 no, it seems rare 23:12:48 Cool. 23:14:34 i found a way to reproduce it on my imac 23:14:48 log in as two different users, start two copies of factor, switch users. one of the copies stops repainting 23:15:02 Wow. 23:15:36 I only have one account on my computer, so that isn't the only cause. 23:15:55 might be two different bugs, or two different ways of triggring the same bug 23:17:24 The cookbook says that this 23:17:25 : b a 1 + ; 23:17:25 : a 2 ; 23:17:25 b . 23:17:25 Has slightly different behaviour than Forth, but the only difference I see is that it makes you click on continue when you redefine a word. 23:18:03 you missed the first line in the copy/paste? 23:18:12 the difference is that when you redefine a word, all callers will use the new definition 23:18:15 Oh wait. It printed 3. 23:18:38 I can'r redefine words? 23:18:48 Oh. 23:18:49 you can 23:18:57 in forth, you can't redfeine words, you can only 'shadow' them. 23:19:02 in factor you can redefine words 23:19:54 Like on the Jupiter ACE only it always does it? 23:20:14 i'm not familiar with the ACE, sorry 23:20:18 i'm much too young 23:20:35 I am too, but I downloaded an emulator. 23:21:19 It is ITC and has a command that replaces all references to word x with a new word. 23:21:53 Obviously this isn't ITC, but it's the same effect. 23:22:39 If only I could remember the name of the word that did that. 23:22:58 Is their a way to merely shadow words? 23:26:08 Factor only makes use of one native thread, and Factor threads are scheduled co-operatively. C library calls block the entire VM. 23:26:30 It might have been OS X blocking the Factor thread. 23:26:51 I don't know why though. 23:29:06 i'm an idiot 23:29:11 i figured out the problem. 23:29:23 Cool, what is it? 23:29:41 its really stupid. i wasn't implementing the drawRect: callback at all. 23:29:48 os x has backing store and rarely calls that function 23:29:56 if you have a lot of video ram and not many apps open, it never gets called 23:30:03 because i never saw this on my g5 with a high-end video card 23:30:22 but when switching users it looks like the video ram contents are flushed 23:30:26 and i bet this is the problem you were having too 23:31:02 i should have tested on an old g3 with software rendering or something, then i'd see this straight away 23:31:52 I did have a bunch of programs running when the problem happened. 23:33:03 But I think I had closed most of the windows. 23:33:25 How much VRAM did your G5 have? 23:33:42 Because I have 256 Megs. 23:34:05 i think it had 256 23:34:17 i have 256 on my mac book and i've never seen it 23:34:40 I must of had more windows open than I thought. 23:34:42 i pushed a fix so if all unit tests pass there will be a new binary in about 2 hours 23:34:51 Cool. 23:34:58 So you wrote Factor? 23:35:13 yes 23:36:58 How do I use forget? 23:37:42 \ forget help 23:37:50 Thanks. 23:38:35 Word not found in vocabulary search path. 23:39:17 Nice Adventure reference. 23:39:25 You are in a twisty little maze of objects, all alike. 23:42:47 Oddly enough, I was writing an adventure description language. 23:42:58 heh 23:45:31 2 Hours you said? 23:52:36 Why can't TextEdit save regular text files? I thought it was the new Simple Text. 23:55:00 Oh, you have to make it plain text first. 23:59:59 --- log: ended forth/08.04.22