00:00:00 --- log: started forth/21.05.17 02:21:32 --- join: xek joined #forth 03:13:50 --- quit: wineroots (Remote host closed the connection) 03:46:03 --- quit: mtsd (Ping timeout: 240 seconds) 03:50:11 --- join: mtsd joined #forth 03:53:31 --- join: f-a joined #forth 06:25:05 --- quit: Zarutian_HTC (Ping timeout: 268 seconds) 06:41:14 --- join: tech_exorcist joined #forth 07:53:54 --- quit: f-a (Read error: Connection reset by peer) 07:58:08 --- join: f-a joined #forth 08:05:25 --- quit: mark4 (Remote host closed the connection) 08:05:45 --- join: mark4 joined #forth 08:06:33 --- quit: gravicappa (Ping timeout: 240 seconds) 08:23:12 --- join: gravicappa joined #forth 10:25:50 --- join: actuallybatman joined #forth 10:29:20 --- join: Zarutian_HTC joined #forth 10:33:01 --- quit: f-a (Read error: Connection reset by peer) 10:33:21 --- quit: actuallybatman (Ping timeout: 265 seconds) 10:33:50 --- quit: Zarutian_HTC (Ping timeout: 265 seconds) 10:35:25 --- join: f-a joined #forth 10:48:19 --- quit: f-a (Read error: Connection reset by peer) 10:52:18 --- join: f-a joined #forth 11:02:25 --- quit: f-a (Read error: Connection reset by peer) 11:06:11 --- join: f-a joined #forth 11:19:03 --- quit: proteus-guy (Ping timeout: 240 seconds) 11:20:25 --- mode: ChanServ set +v mark4 11:31:39 --- join: proteus-guy joined #forth 11:40:37 --- quit: mtsd (Quit: Leaving) 11:49:06 --- join: pbaille_ joined #forth 11:51:54 --- quit: pbaille (Ping timeout: 240 seconds) 11:52:26 --- quit: pbaille_ (Remote host closed the connection) 11:53:02 --- join: pbaille joined #forth 12:01:01 --- join: pbaille_ joined #forth 12:04:03 --- quit: pbaille (Ping timeout: 240 seconds) 13:51:06 --- quit: pbaille_ (Remote host closed the connection) 13:51:45 --- join: pbaille joined #forth 13:56:20 --- quit: pbaille (Ping timeout: 252 seconds) 13:59:03 --- quit: gravicappa (Ping timeout: 240 seconds) 14:22:27 --- quit: proteus-guy (Ping timeout: 260 seconds) 14:34:33 --- join: proteus-guy joined #forth 14:38:38 --- join: pbaille joined #forth 14:43:03 --- quit: pbaille (Ping timeout: 260 seconds) 15:00:49 --- join: pbaille joined #forth 15:02:05 --- quit: f-a (Read error: Connection reset by peer) 15:05:33 --- quit: tech_exorcist (Ping timeout: 268 seconds) 15:06:45 --- join: f-a joined #forth 15:12:07 KipIngram, in your exit-based-programming forth, how do you like to handle errors? do you have a throw/catch, or do you return status codes, or what? 15:12:58 i tend to dislike throw/catch things, but handling return statuses in forth is tedious. i wonder if your conditional return paradigm makes it less tedious 15:17:58 Well, at the moment I haven't added any error handling beyond the usual errors that Forth checks for, and the normal Forth response is to print out some location information (block, line, col) and an error message and return to the interpreter. 15:18:32 That all works, and the system is restored to the state it had before the keyboard line that contained the error began interpreting. 15:18:51 If you mean how do I deal with user input errors in general in my applications, I really don't do much of that. 15:19:15 I have a sort of throw/catch mechanism that I added to this one I'm working on now. 15:19:24 But it's not necessarily for use only in case of error. 15:19:51 I used it when my FIND code found the desired word. There it is way down at the bottom of three nested searches, and it has your winning word. 15:20:07 I used the mechanism for it to "leap back up" to the top of the code stack in one shot. 15:20:31 So if you look at most of that code, it's only handling the case where the word isn't found. When I do find the word I hop over all of it. 15:20:46 I use this syntax: 15:21:14 In an outer word you use this construct: ... <| ... ... |> ; 15:21:29 Then many layers of software deep, you can put other copies of |> 15:22:04 if it hits one of them, it will continue to execute as if nothing has happened, but it's removed a bunch of stuff from the stacks, and the next ; will be equivalent to the ; after the first |} 15:22:19 I'm sorry. {| ... |}, not angle braces. 15:22:47 Both data and return stacks are resored to the upper state - the only thing you get from down below is the TOS item that's cached in a register. 15:22:51 So yuo can return one result. 15:31:05 so : baz ." baz1" |} ." baz2" ; : bar ." bar1" baz ." bar2" ; : foo ." foo1" {| bar |} ." foo2" ; prints "foo1 bar1 baz1 baz2" 15:36:04 Well, hang on. 15:36:25 Look here: 15:36:27 https://pastebin.com/t289RZ77 15:36:36 That's my actual find, which is working and vetted. 15:37:16 go tit 15:37:33 I have a linked list of vocabularies - variable PATH gets me to it's start. Each of those list entries has a linked list of word names. And each word name is a string of characters. I thought it was a very compact bit of code for searching such an elaborate structure. 15:38:26 Down in line 11 is where you've found the right word. So the |} there, with the word pointer in the TOS register, uses |} to jump all the way back up to line 2. 15:38:57 If the word doesn't exist then you'll bubble your way back up as you hit the end of lists - you run out of stuff to search. 15:39:25 The { ... } without the | in the name are different - that's my stack frame mechanism. 15:39:44 Inside the { } I can use words s0 s1 s2 s3 s4 to access particular stack items. 15:39:49 The ones that were on top a { 15:39:52 at { 15:40:08 omg i like that 15:40:14 I LOVE that. 15:40:28 that's huge 15:40:29 That one thing has almost eliminated stack diddling from my code. 15:40:40 it's unbelievably simple locals 15:41:01 The } takes a parameter It restores the stack to the level it was at {, and then removes n more items, where n is the passed parameter. 15:41:13 Eliminates a lot of "cleanup" work in words. 15:41:15 yeah } is x86 leave 15:41:35 Feel free to plagiarize. 15:41:50 yeah this may have singlehandedly rekindled my interest in forth 15:42:21 Oh wow - well, I hope so. I honestly believe that these little htings have improved the system, and have improved my written code. 15:42:32 You should try out conditional returns too. 15:44:15 still on the fence about that. like i said earlier, i don't really like try/catch. maybe it's ptsd from tcl but i'm hesitant about callees that can influence state or control flow in the caller 15:44:51 i suppose in forth it's different because you view a collection of words as more tightly coupled than you generally do in other languages 15:49:16 --- part: f-a left #forth 15:50:52 I understand. 15:51:02 And that's exactly what those things do - it's their purpose. 15:51:21 In fact, when you call some of my words there's no guarantee you ever see control come back at all. 15:51:32 Some of my words will double return right back over you. 16:00:14 --- quit: pbaille (Ping timeout: 252 seconds) 16:10:12 It's almost like a conditional call (the single level returns, at least). Except you do pay the call/return price. But functionally it's exactly the same as a conditional call with the "logically reversed" condition. 16:23:01 --- join: pbaille joined #forth 16:27:34 --- quit: pbaille (Ping timeout: 240 seconds) 16:36:16 --- join: schuldt joined #forth 16:36:32 --- quit: schuldt (Client Quit) 16:36:34 --- join: dave0 joined #forth 16:37:57 maw 16:41:34 --- join: pbaille joined #forth 16:43:17 Hey dave0 16:44:12 hey KipIngram 16:45:48 --- quit: pbaille (Ping timeout: 240 seconds) 17:08:18 --- quit: proteus-guy (Ping timeout: 260 seconds) 17:20:11 --- join: proteus-guy joined #forth 17:36:10 --- quit: dave0 (Quit: dave's not here) 18:23:07 --- join: Zarutian_HTC joined #forth 18:35:45 --- join: boru` joined #forth 18:35:48 --- quit: boru (Disconnected by services) 18:35:50 --- nick: boru` -> boru 19:22:05 --- quit: sts-q (Ping timeout: 268 seconds) 19:22:45 --- join: sts-q joined #forth 19:47:31 --- join: dave0 joined #forth 19:54:46 --- quit: Zarutian_HTC (Ping timeout: 268 seconds) 20:10:20 --- join: Zarutian_HTC joined #forth 20:19:13 --- join: pbaille joined #forth 20:23:59 --- quit: pbaille (Ping timeout: 265 seconds) 20:52:44 --- join: gravicappa joined #forth 21:22:04 --- join: pbaille joined #forth 22:17:25 --- join: audioburn joined #forth 22:18:27 --- part: audioburn left #forth 23:38:37 --- quit: proteus-guy (Ping timeout: 268 seconds) 23:50:53 --- join: proteus-guy joined #forth 23:59:59 --- log: ended forth/21.05.17