00:00:00 --- log: started forth/19.07.06 00:05:36 --- join: dys (~dys@tmo-108-161.customers.d1-online.com) joined #forth 00:11:19 --- quit: karswell (Read error: Connection reset by peer) 00:54:25 --- join: proteusguy (~proteusgu@101.109.39.197) joined #forth 00:54:26 --- mode: ChanServ set +v proteusguy 00:57:30 --- quit: dys (Ping timeout: 268 seconds) 02:04:24 --- quit: proteusguy (Ping timeout: 258 seconds) 02:13:33 --- join: john_metcalf (~digital_w@host31-54-142-171.range31-54.btcentralplus.com) joined #forth 03:06:03 --- join: dys (~dys@tmo-111-122.customers.d1-online.com) joined #forth 03:36:26 --- quit: john_metcalf (Ping timeout: 246 seconds) 03:51:54 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 07:12:59 --- join: gravicappa (~gravicapp@h109-187-239-230.dyn.bashtel.ru) joined #forth 09:42:54 --- quit: dave0 (Quit: dave's not here) 11:37:18 --- quit: gravicappa (Ping timeout: 244 seconds) 11:40:59 --- quit: ashirase (Quit: ZNC - http://znc.in) 11:56:15 crc: you mentioned not having a good place to stop disassembling CODE words -- what I'm probably going to do is keep track of all the jump target addresses, and end at the first NEXT that isn't followed by a jump target addr 11:56:46 er wait, they're gone 12:19:03 --- quit: rdrop-exit (Quit: Lost terminal) 12:43:55 --- quit: MrMobius (Quit: I love my HydraIRC -> http://www.hydrairc.com <-) 12:51:57 --- join: mtsd (~mtsd@94-137-100-130.customers.ownit.se) joined #forth 12:57:46 --- join: MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 13:15:02 --- quit: mtsd (Quit: Leaving) 13:30:44 remexre: I don’t have NEXT (my forth is stc/nci) 13:31:55 isn't your NEXT just RET (or JMP LR, or...) then? 13:34:10 Essentially, yes. But not all words end in a RET, and words may have more than one RET within them 13:36:24 wrt more than one RET, that's what my trick is meant for; in theory you should always jump to the instruction after a RET, right? 13:36:28 and which words don't? 13:44:17 hey guys 13:44:25 There’s quite a few of the primitives that don’t end with a ret; apart from that, it depends a lot on whether or not tail call elimination is being used 13:45:10 what I did with hashforth (and with attoforth) is put a special non-executable marker at the end of words 13:45:46 hashforth is TTC and attoforth is ITC and the marker in both is null 13:46:10 remexre: jumping to an instruction after a ret would be the only way to get to it, right? 13:46:24 If you didn't, it would never be executed. 13:46:38 Yeah, that's my thinking 13:46:51 crc: fair, I didn't think of tail-call 13:52:35 it's not that troublesome. I have a disassembler which meets my needs; it's just not as convenient for others as something like SEE 13:55:11 tabemann: I don't restrict what values a user can put into a definition, so I can't really have a marker value 14:37:06 --- quit: dys (Ping timeout: 244 seconds) 15:25:12 --- join: Croran (~quassel@2601:601:1801:6dde:524:5afa:f2b6:5d98) joined #forth 15:26:26 someone was talking about having a word like : foo R> DROP ; to bail out of a word -- what was the name of it? 15:30:52 remexre, are you thinking of QUIT which resets the stacks ? 15:32:37 no, just as an analogue for LEAVE 15:32:51 I can check my IRC logs, I think this was from a discussion of implementing ELSE 15:33:26 someone stated that they considered ELSE to be a misfeature, since you should just have this primitive and split your definitions up sufficiently 15:33:44 LEAVE -> Leaves current innermost loop promptly 15:34:04 foo -> leaves the current word promptly 15:34:06 thats from the Forth I use 15:34:18 oh lol it was rdrop-exit 15:34:27 kinda fitting from the nick :P 15:34:37 and apparently CASE, not ELSE 15:34:38 a small hint ;-) 15:34:50 yes I recall that discussion 15:35:38 Im a big CASE user myself, I dont care how inefficient it is, I'm a user not a Forth writer 15:36:30 I like CASE in concept, but I've never actually implemented it (nor used it) 15:37:57 because I'm not a real programmer I always go for code readability over code efficiency and I find CASE much easier than nested IF THEN's but sometimes they have to be used 15:38:57 lol, because I'm a functional programmer, I agree for 80% of my code 15:39:34 with a knarly 20% with incomprehensible types designed by dutch mathematicians under the influence of psychedelics :P 15:39:56 I ised a CASE statement a few days ago in my word2ihex Word just handle two different types of Word input 15:41:25 mathematicians are awesome, my maths is shocking, my worst area. Probably why I do electronics :) 15:42:34 bacl 15:42:37 yeah, I'm just mostly annoyed at how a lot of cool Haskell constructions are impenetrable until you read a blogpost describing the right way to think about it, and then it's obvious 15:42:57 and then of course I'm like "why the heck isn't this insight in the docs" 15:43:31 I've found case to be pretty useful at times 15:43:45 I don't get rdrop-exit's objections to ELSE 15:44:00 (to me ELSE is a fundamental building block of computing) 15:44:05 --- quit: jedb (Ping timeout: 246 seconds) 15:45:04 tabemann, welcome back! and I have read a few articles by Forth purists regarding their disdain for CASE 15:45:31 as for Haskell - a certain sort of Haskell I get intuitively, but another sort of Haskell (when it starts getting into lenses or it tries to act dependently typed) confuses me thoroughly 15:45:52 Yeah, I just "got" lenses a couple days ago 15:46:21 I don't get the arguments against CASE - the alternatives are many nested IF-ELSE-THENs or jump tables, neither of which I find to be superior 15:46:39 (the insight I'm complaining about is that they're using continuation passing style with effects in the continuation) 15:47:19 yes CASE underlyingly is many nested IF-ELSE-THENs internally, but it results in much neater code a the user level 15:56:18 * crc is happy to not be a purist (I have no issue using a CASE type construct where it makes the code clearer) 15:57:18 Forth purism really annoys me at times 16:00:58 For most purposes, clarity outweights speed or measures of purity. 16:01:27 I can understand why Forth people become purists, I think Forth inspires that because it's the ultimate clay, one can mold whatever they like 16:01:33 mould ! 16:01:38 hmm 16:02:38 tp: Apparently "mold" and "mould" are the AE and BE form of the same word. 16:03:23 And both can mean a negative shape that you can use to form something or the fungi that grow on rotting things. 16:04:53 as a Australian I'm a user of both AE and BE hence my vacillation between the spelling 16:05:20 a 'negative' shape ? 16:06:19 ah yes a concave shape used to hold a liquid like substance such as polyester resin 16:06:58 but then a artist may mould clay with his/her hands to make a statue ? 16:07:38 or a Forth user may mold a Word ? 16:10:21 john_cephalopoda, does your surname indicate that you 'see clearly' by any chance ? ;-) 16:16:38 --- quit: john_cephalopoda (Ping timeout: 252 seconds) 16:30:17 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 16:31:20 tp: You mean the "cephalopoda" part? 16:32:41 It is actually the name of a class of animals which contains squids, cuttlefish and similar https://en.wikipedia.org/wiki/Cephalopoda 16:39:13 --- quit: dddddd (Remote host closed the connection) 17:06:24 h'lo folks. 17:07:31 well Cephal-o-poda literally means head-feet (hausfætla in Icelandic) if what I know of latin and such language is any good indication. 17:08:21 tp: negative shape? is that like from film negatives (when those were still used)? 17:09:11 tp: here is a riddle for you regarding names. My lastname and surname are not the same, can you guess why? 17:09:59 tp: and another question regarding Australia: seen any roos lately? 17:12:51 Zarutian, I had a pet roo once, theyre quite a friendly alien 17:15:34 john_cephalopoda, Ive always been interested in the Human eye, which like all other mammals has a flawed design, namely that the blood vessels feeding the retina are *in front* of the retina requiring the eye be rapidly moved to-and-fro so the brain can remove the blood vessels from our vision. The only group of creatures with blood vessels behind the retina are the Cephalopod 17:15:56 +s 17:18:55 Zarutian, because you're Chinese ? 17:44:50 hey guys 17:45:03 hey tabemann 17:47:02 tp: nope. Because they arent the same concept. Lastnames in Icelands are usually patronymical while surnames are 'family' or linage names. 17:47:44 aha! 17:49:50 oh yeah, those interesting Viking type names! 18:02:26 was once traveling with my family to UK when I was young (but still had my own passport) and I swear that the passport customs officials must have been briefed on, to them, wierd patronymical system used in Iceland 18:03:44 the guy even did a pretty good aproximation of "Góðan daginn" for a british bloke. 18:04:06 I'm sure you're right, the Icelandic patronymical system has always seemed weird but very interesting to me 18:04:42 maybe he had encountered other Icelanders ? 18:05:30 probably, many Icelanders travel to and fro UK. Some of them at regular basis. 18:06:42 talking about passports. I had it from a rather globe trotting acquentice of mine that there are two 'sizes' of passports. 18:07:08 that is, how many pages there are in them 18:07:24 makes sense 18:07:34 the regular that most people have seen and the one that has twice as many 18:07:35 one page was enough for me so far 18:08:13 the latter is usually for airline and cargo pilots and such 18:08:25 makes sense 18:09:15 regarding 'roos' not lately but Ive seen hundreds, shot a few and eaten them all, and raised one (like a pet) over 3 years once 18:09:32 or globe trotter like my acquentice. He got it without asking but the offical/beurocrat that handing it to him said 'try to make this one last' 18:09:40 hahah 18:10:01 like there is a worldwide shortage of passports ? 18:10:02 reason why he was renewing his passport? no empty pages. 18:10:36 more like his was 'used up' 18:11:09 --- join: rdrop-exit (~markwilli@112.201.174.189) joined #forth 18:11:26 Good morning Forthers 18:11:45 c[] 18:11:45 g'day CASE hater ;-) 18:11:52 ? 18:12:11 good ${timeOfDay} to you, rdrop-exit 18:12:30 rdrop-exit, don't you dislike the use of CASE statements ? 18:13:25 I use case statements in C, but not in Forth 18:13:48 Not that I dislike them, more that I don't find I need them. 18:13:51 tp: havent looked at the Forth equiv of switch statement. Do they compile down to jump tables or just binary search nested conditional branches? 18:14:18 Depends on the Forth 18:16:34 rdrop-exit, oh, sorry I must be confusing you with another irc'r 18:16:35 I have written a (do_jmp_table) word in eForth but hadnt bothered yet to implement the switch case compiling words 18:16:38 If I want a jump table, I just code a jump table. If I want early exits, I just code early exits. 18:17:08 pretty much same here. 18:17:30 A CASE statement is usually just a place-holder for one of those two, I prefer to just directly code what I need. 18:20:50 I don't have a jump table compiling word, I just code up the factors. 18:27:47 well, the (do_jmp_table) I wrote is pretty much like (BRANCH) only it is followed by a length cell and that many cells of destination addresses. 18:28:20 0 shadow Host UI - Viewport - Editor - Key Handling 1|2 18:28:20 1 18:28:20 2 editor-controls The editor ASCII control character key bindings. 18:28:20 3 18:28:20 4 editor-control The editor key binding for ASCII control 18:28:22 5 character . 18:28:25 6 18:28:27 pops and uses the TOS as and index into that table then. 18:28:27 7 editor-react Perform the editor reaction to an incoming byte. 18:28:30 8 18:28:40 f 18:28:41 0 source Host UI - Viewport - Editor - Key Handling 1|2 18:28:41 1 18:28:41 2 33 cells buffer editor-controls 18:28:41 3 18:28:43 4 : editor-control ( ctrl -- a ) 18:28:45 5 ctrl-normalize cells editor-controls + ; 18:28:48 6 18:28:50 7 : editor-react ( b -- ) 18:28:53 8 dup ctrl? if editor-control perform then; input ; 18:28:55 9 18:29:27 s/and/an/ 18:30:17 That's the jump table for the editor's control key handling 18:30:50 if that index is higher than number of entries then the execution follows at the first cell after the table. 18:31:04 rdrop-exit: what does ctrl? look like? 18:31:18 just a sec... 18:31:49 5 18:31:49 6 ^notation? Is an ASCII caret notation character? 18:31:49 7 18:31:49 8 ctrl? Is an ASCII control character? 18:31:49 9 18:32:00 5 18:32:01 6 : ^notation? ( x -- -1|0 ) byte ? byte _ between ;inline 18:32:01 7 18:32:01 8 : ctrl? ( x -- -1|0 ) ~ctrl ^notation? ;inline 18:32:01 9 18:32:46 5 18:32:47 6 ~ctrl Control toggle. Translate a control character to the 18:32:47 7 corresponding caret notation display character or 18:32:47 8 vice-versa. The caret notation characters are the 33 18:32:47 9 characters in the range $ 3f-5f: 18:32:49 a ?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ 18:32:51 b 18:32:54 5 18:32:57 6 : ~ctrl ( ^c|ctrl -- ctrl|^c ) $ 40 xor ;inline 18:32:59 7 19:02:25 --- join: jedb (~jedb@185.128.24.51) joined #forth 19:08:18 --- join: tbemann (~androirc@2600:380:c547:f323:c55b:47a0:4df:632) joined #forth 19:12:23 I am not sure if what I smell is fireworks or the lake 19:18:14 --- join: dave0 (~dave0@069.d.003.ncl.iprimus.net.au) joined #forth 19:22:34 blame it on yhe dog 19:23:26 there is no dog here 19:24:50 it should be about 7 minutes until the official fireworks start 19:25:42 Speaking of dogs, have to walk mine. Catch you all later. :) 19:26:02 see ya 19:37:38 --- quit: tbemann (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )) 19:48:54 --- quit: cantstanya (Ping timeout: 260 seconds) 19:52:04 --- join: cantstanya (~chatting@gateway/tor-sasl/cantstanya) joined #forth 19:54:47 --- quit: Zarutian (Ping timeout: 248 seconds) 19:55:29 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 20:30:23 --- join: karswell (~user@cust125-dsl91-135-5.idnet.net) joined #forth 20:37:44 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 20:46:23 My Forth's got cooperative multitasking and I'm adding heap allocation; would it be reasonable to make an OOM instead block the process? 21:16:38 --- join: gravicappa (~gravicapp@h109-187-239-230.dyn.bashtel.ru) joined #forth 21:43:55 --- join: Fex (~Fex@47.137.245.208) joined #forth 21:46:35 I'm writing a custom forth vm and I was wondering about what you guys would prefer for parameter order 21:46:45 specifically for the list/dictionary words 21:47:26 to push something to a list, there is a push function ( n l -- ) that takes an object, the list, and adds it to the end of the list 21:47:38 does this make sense, or would ( l n -- ) be better? 21:51:30 --- quit: karswell (Remote host closed the connection) 21:51:58 --- join: karswell (~user@cust125-dsl91-135-5.idnet.net) joined #forth 22:01:34 ( n l -- ) would be my preference 22:03:28 crc, that's kinda what I've been doing, the parameters are ( ... l -- ... ) for lists and ( ... d -- ... ) for dictionaries 22:03:47 brb 22:03:52 --- quit: Fex (Quit: Leaving) 22:04:31 --- quit: dave0 (Quit: dave's not here) 22:42:27 --- join: Fex (~Fex@47.137.245.208) joined #forth 22:52:19 back 22:52:38 OOM? 22:53:17 I agree with crc 22:57:00 what is OOM? 22:59:05 I probably wouldn't code so generic a function 23:02:34 The first thing that comes to mind is Out-of-Memory :) 23:06:12 I was referring to something someone else said before you came in, Fex 23:06:53 I made OOM in hashforth return a boolean, and then made a wrapper around that, if returns FALSE, which raises an exception 23:07:52 (there is at least one case I have found where I want to silently catch OOM because I am dynamically expanding a buffer preemptively) 23:08:20 (i.e. doubling the size of a buffer when it is half-full - I don't want to make it full if that triggers OOM, because buffer isn't full yet) 23:08:23 --- quit: tp (*.net *.split) 23:08:24 --- quit: remexre (*.net *.split) 23:12:46 --- quit: sigjuice (*.net *.split) 23:12:47 --- quit: dbucklin (*.net *.split) 23:18:25 --- join: sigjuice (~sigjuice@2604:a880:1:20::83:6001) joined #forth 23:18:25 --- join: dbucklin (~dbucklin@ec2-18-221-180-137.us-east-2.compute.amazonaws.com) joined #forth 23:18:46 --- join: tp (~Terry@mecrisp/staff/tp) joined #forth 23:18:47 --- join: remexre (~nathan@x-160-94-179-186.acm.umn.edu) joined #forth 23:22:38 wb 23:24:06 I would personally make OOM an exception or an error code (and have a wrapper that triggers an exception) 23:24:13 --- join: tabemann_ (~tabemann@2600:1700:7990:24e0:d9d1:c915:3acf:e2a7) joined #forth 23:24:25 --- part: tabemann_ left #forth 23:25:17 --- nick: tabemann -> Guest89442 23:27:03 --- join: tabemann (~tabemann@2600:1700:7990:24e0:d9d1:c915:3acf:e2a7) joined #forth 23:29:11 --- quit: Guest89442 (Ping timeout: 276 seconds) 23:29:47 --- quit: tabemann (Remote host closed the connection) 23:32:45 --- join: Fexx (~Fex@47.137.245.208) joined #forth 23:33:22 --- quit: Fex (Read error: Connection reset by peer) 23:36:39 --- join: tabemann (~tabemann@2600:1700:7990:24e0:11f0:2c3d:3e23:1718) joined #forth 23:43:13 --- quit: Fexx (Quit: Leaving) 23:45:39 out of memory 23:51:33 I'd say an exception is better than blocking 23:51:42 because a task may want to trap OOM 23:52:25 fair 23:52:44 actually, what I do is have two functions - one that returns TRUE/FALSE, and another one that wraps that one which throws an exception if it returns FALSE 23:53:09 I named them ALLOCATE and ALLOCATE! 23:53:30 I'm doing an all-exceptions-kill-the-task model 23:53:43 erlang-inspired 23:53:53 in hashforth exceptions only kill the task if uncaught 23:54:13 the reason being that in many cases I want to clean up after an exception 23:54:28 so I catch the exception, do my cleanup, and throw it again 23:55:02 also, because in the main thread I don't want exceptions to kill it 23:55:31 s/thread/task 23:55:44 the only cleanup I'm doing is unrooting GC things 23:55:55 I'm using forth as a compile target for a GC language 23:57:00 to me not doing cleanup only makes sense in a functional language 23:57:33 in a pure functional language I mean 23:59:59 --- log: ended forth/19.07.06