00:00:00 --- log: started forth/19.01.07 00:39:59 --- join: xek (~xek@apn-31-0-23-83.dynamic.gprs.plus.pl) joined #forth 01:00:16 ANNOUNCEMENT ABOUT ANNOUNCEMENTS! If you have a project you want listed in the channel header (preferably one that actually works somewhat), I'm happy to post a link to it in the header so people can check it out. 01:00:58 --- join: mahmudov (~milisman@5.176.32.74) joined #forth 01:05:48 <`presiden> do you mean in the /TITLE? 01:05:53 yes 01:09:25 --- quit: mahmudov (Remote host closed the connection) 02:03:07 --- quit: ashirase (Ping timeout: 272 seconds) 02:07:30 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 02:15:14 --- quit: pierpal (Ping timeout: 246 seconds) 02:37:06 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 02:49:52 finally implemented CATCH and THROW and used it to implement backtracking 02:49:53 https://gist.github.com/siraben/a2dcee02217ba4a8f7b213ab7db4db81 02:50:29 * siraben uploaded an image: Screenshot_2019-01-07_17-46-28.png (1058KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/hjRdKmmywFRjPcTJuDThcpjI > 02:51:44 failure is your exception handler doing it's job? 02:52:25 not sure what I think of "BEGIN-CHOICES 1 MAYBE 2 MAYBE 3 MAYBE 4 END-CHOICES" 02:52:45 Yeah it tries each possibility but each one signals "failure" 02:52:48 --- quit: pierpal (Quit: Poof) 02:52:50 Otherwise it would stop 02:53:07 So one could possibly use this to do problems like the 8 queens problem 02:53:07 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 03:05:18 Kumool (when you return): what the hell do you mean by x// 03:05:28 good morning forth gang 03:07:00 Hi Herr Von Weiner 03:08:00 --- quit: proteusguy (Remote host closed the connection) 03:11:00 rdrop-exit: what's up matey 03:11:31 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 03:12:44 Took a short nap, didn't get enough sleep over the weekend 03:15:11 whenever I nap I start to get more occurances of deja vu 03:15:31 Me too, dinner's going to feel like breakfast 03:25:03 --- join: proteusguy (~proteus-g@cm-58-10-154-246.revip7.asianet.co.th) joined #forth 03:25:03 --- mode: ChanServ set +v proteusguy 03:37:34 so what do i have to implement to make my forth secure? 03:37:45 something about testing stacks 03:38:14 Siraben: Using a high-level ANS Catch is slow, plus it gets the xt stack. 03:38:20 and i guess disable , and make ! test for access permissions? 03:39:31 Corecode: run it in a sandbox 03:40:12 Correction>Siraben: Using a high-level ANS Catch is slow, plus it gets the xt from the data stack. 03:40:21 rdrop-exit: of course, it's just a curiosity 03:53:15 well, i'd like the forth kernel to be the sandbox 03:56:41 I would imagine that to maximize security you would need to separate the development environment from the runtime environment. 03:57:18 why? 03:57:19 --- quit: Keshl (Quit: Konversation terminated!) 04:02:55 --- quit: proteusguy (Ping timeout: 245 seconds) 04:10:38 so i was thinking if i remove , i can prevent writing custom data to threads 04:10:59 To control and constrain the execution of your application. 04:11:11 then execute would have to verify that the argument is really a thread 04:12:17 and ! may only write to data, and not threads 04:17:20 ? 04:17:29 what's the question? 04:18:36 I'm not getting what you're trying to accomplish 04:19:29 i want to run "untrusted" code 04:20:21 corecode: Every program could be just an input to the kernel. You pass a memory area to the kernel and tell it "This is my forth code, please interepret it". 04:20:35 The kernel translates that into tokens and executes those. 04:20:47 yea, text input 04:21:29 redefine all memory words to abort if called in various areas of memory, including their own 04:21:51 Then provide a sandboxed runtime environment which limits the damage that can be caused by the untrusted code. 04:22:55 yea that's why i say, disable , and make ! check the destination, make execute check the argument for being an XT, make stack operations check space, make EXIT check for a thread 04:23:14 what else? 04:23:42 Start with what you are willing to allow 04:24:09 And only allow those actions 04:24:12 define words and execute them 04:24:28 Too general 04:24:35 yes your suggestion is too general too 04:30:00 rdrop-exit: how about https://gist.github.com/siraben/4b1648c311df16829874b6c08ecba150 04:30:45 How do I abstract the ' ... , pattern 04:31:19 I just define : ', ' , ; 04:31:23 corecode: Don't forget "EXECUTE". If you allow your program to change the entry address of a word, you could write code to memory and jump there. 04:31:24 Dinner's on the table, catch you later. 04:31:47 and then : ranged: ( --) ' 0 ?do >r r@ execute r> loop drop ; 04:32:03 and then ` n ranged: ', word1 word2 word3` 04:32:28 john_cephalopoda: i mentioned execute before 04:32:37 corecode: Also Return Stack operations. If you can push an address onto the return stack and return, then the program will jump there. 04:33:01 that's what i meant with have EXIT check for a thread 04:33:16 How do you want to check that? Canaries? 04:33:29 that's the question 04:33:42 have the data range (allot) separate? 04:34:04 Right, non-executable memory might work... 04:34:20 but you don't want IP to point to the name of a word 04:34:39 WilhelmVonWeiner: I mean I do a lot of ' foo , 04:34:42 You could still jump around and possibly execute code in the code segment that should be abstracted away. 04:34:51 ' foo , or ['] foo , 04:35:12 Hn 04:35:13 Hm 04:36:04 hm i guess i need , to build data content 04:36:34 i guess , then is HERE ! 1 CELLS HERE +! ? 04:36:46 uhm no 04:37:05 1 CELLS UP +! 04:37:27 Not sure how to make this structure into a word: : 1-10 0 BEGIN 1+ DUP 11 < WHILE SUCC REPEAT DROP FAIL ; 04:37:35 I want to do "1 10 RANGE" instead 04:38:00 And btw SUCC and FAIL are immediate words which compile some code into the current definition 04:38:05 : SUCC ' R@ , ' ENTER , ; IMMEDIATE 04:38:06 : FAIL ' R> , ' DROP , ' EXIT , ; IMMEDIATE 04:38:28 shouldn't that be [']? 04:38:53 Shouldn't what be what 04:38:59 your ' be ['] 04:39:05 corecode: he probably has state smart tick 04:39:06 Ah yeah it should be... 04:39:11 aha 04:39:12 WilhelmVonWeiner: yep 04:39:19 okay 04:39:44 https://github.com/siraben/zkeme80/blob/6402469eb6a7ec8bcd4fe92673a6c9ca3f53964e/bootstrap-flash1.fs#L40 04:39:47 so : SUCC POSTPONE R@ POSTPONE ENTER ; IMMEDIATE 04:40:01 no 04:40:08 need to get rid of my old ['] because it's redundant and broken, hm. 04:40:14 he's storing the xt of R@ into HERE 04:40:21 Yeah 04:40:33 how is mine different? 04:40:44 yours postpones the execution of those words 04:40:46 Your POSTPONE doesn't have the same semantics 04:41:01 his puts the xt in memory at the location of HERE 04:41:15 but R@ is not immediate 04:41:21 Exactly 04:41:25 That's why POSTPONE is not the same as ' R@ , 04:41:44 Well I mean it wouldn't matter if it were immediate 04:41:45 that's why POSTPONE R@ translates to ['] R@ COMPILE, 04:42:35 : test ['] R@ [ here ] literal ; test 1 cells - @ execute 04:42:58 https://github.com/corecode/forth/blob/master/x86.fs#L456 04:42:59 There should be a Forth bot here 04:43:02 running gforth 04:43:45 siraben: thought about it, but gforth would be hard to lock down 04:43:59 :) 04:44:04 back to my question :) 04:44:33 WilhelmVonWeiner: what's your test? 04:44:46 that one puts the xt of R@ on the stack 04:46:14 WilhelmVonWeiner: how hard? 04:48:17 Anyone have a suggestion on how to make 04:48:19 : 1-10 0 BEGIN 1+ DUP 11 < WHILE SUCC REPEAT DROP FAIL ; 04:48:29 into : 1-10 1 10 RANGE ; 04:48:30 ? 04:48:44 what do you mean by into? 04:49:03 I'm making a word RANGE which makes that code for me 04:49:40 so you're asking how to make RANGE 04:49:57 how would you use RANGE? 04:50:09 Like shown in 1-10 04:50:21 : 1-10 1 10 RANGE ; 04:50:31 what does that do? 04:50:34 But with the same semantics as above 04:50:39 What the 1-10 does 04:51:02 oh dear lord 04:51:21 use words 04:52:14 ok i'm going to try 04:52:17 it puts a whole load of R@ and ENTER / R> EXIT in the data area 04:52:42 how would you use 1-10? 04:53:17 https://gist.github.com/siraben/4b1648c311df16829874b6c08ecba150 04:54:32 Through the magic of messing with the return stack it looks as if 1-10 generates the numbers from 1-10, then //2 filters the even ones before passing it to DUP . 04:54:35 multiple times 04:56:05 oh wow 04:56:07 interesting 04:56:48 so you're basically returning early from the caller 04:57:08 In a sense, yeah. 04:57:09 cute 04:57:38 But I'm trying to make it as convenient as RANGE 04:59:06 yea i didn't know RANGE 04:59:34 It's kind of like python's range() I suppose 04:59:51 just that it allows you to modify the control flow? 05:00:07 yeah 05:00:14 huh this is harder than I thought 05:00:18 so range needs to be immediate 05:00:26 I need to be able to make anonymous words, I think. 05:00:35 why? 05:00:46 i haven't come across the need for :NONAME 05:01:13 Not sure. Well here's the problem: if I did : 1-10 1 10 RANGE ; the problem is that RANGE can't get 1 or 10 out 05:01:21 It would have to be a defining word 05:01:29 like this 1 10 RANGE ONE-TO-TEN 05:01:35 aha 05:01:42 So RANGE takes 1 and 10 off the stack and defines ONE-TO-TEN 05:02:42 because otherwise your return stack is off by one? 05:02:54 if range is a normal word 05:05:36 not sure what you mean 05:05:41 huh this isn't working https://ptpb.pw/SvYP 05:05:55 siraben: there's already a RANGE word? 05:06:00 There isn't 05:06:07 I'm making my own abstraction 05:06:10 for this backtracking thing 05:06:21 what's wrong with the one I shared, one sec 05:07:17 : RANGE: ( n m --) ' ROT ROT SWAP ?DO >R R@ EXECUTE R> LOOP DROP ; 05:07:39 So how do I use that? 05:11:50 1 10 RANGE: 05:12:23 how does your ' work 05:12:28 I might have to postpone it then, hm 05:12:37 reads the next word in the input stream, as tick is supposed to 05:12:49 ok 05:13:37 WilhelmVonWeiner: so it's ['] :)? 05:13:38 this is interpreted, though. I think you'd have to POSTPONE ['] to use RANGE in a definition 05:14:11 updated gist, my RANGE works now https://gist.github.com/siraben/4b1648c311df16829874b6c08ecba150 05:14:43 do you not have DO LOOP? 05:14:48 I do 05:14:51 why ' 1+ , instead of POSTPONE 1+ ? 05:14:53 Oh I don't have a ?DO 05:15:22 Because ' 1+ , compiles 1+ into HERE whereas 1+ just stops it from running in the current definition of RANGE if it was immediate 05:15:30 you can ignore ?DO if you know you won't accidentally n n DO as opposed to m n DP 05:15:33 s/DP/DO 05:15:55 no, POSTPONE 1+ will do ['] 1+ COMPILE, 05:16:24 into the current word 05:16:31 which is RANGE 05:16:38 Not into the word that RANGE is defining, like 1-10 05:16:53 hmmm 05:17:02 no 05:17:08 what 05:17:11 how do i test it 05:17:30 Test what 05:18:37 the difference between ' 1+ COMPILE, and ['] 1+ COMPILE, and POSTPONE 1+ 05:19:41 because 1+ is not immediate, my POSTPONE does a ['] 1+ LITERAL POSTPONE COMPILE, 05:19:44 basically 05:20:07 which of your words is standard conforming? 05:20:12 I should change my ' then to save headaches 05:20:32 POSTPONE ['] COMPILE, LITERAL should all be AMS 05:23:17 Hm 05:23:33 back 05:24:09 --- quit: pierpal (Quit: Poof) 05:24:26 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 05:25:46 i might be wrong tho 05:25:51 https://github.com/corecode/forth/blob/master/x86.fs#L456 05:26:29 I have two different ticks 05:26:33 so do i 05:27:06 cool 05:28:10 What does ?DO do? 05:28:11 : ' ( -- ca ) interpretation defined >code ; 05:28:11 : ^ ( -- ca ) compilation defined >code ; 05:28:11 : ['] { -- } ( -- ca ) ' & literal ; directive 05:28:11 : [^] { -- } ( -- ca ) ^ & literal ; directive 05:28:14 I haven't implemented it 05:28:44 how does it differ from DO 05:29:07 i don't think i have ?DO 05:29:39 it seems to do the same thing 05:29:39 hm 05:29:45 oh wait it doesn't 05:29:58 : foo do i . loop ; vs : foo2 ?do i . loop ; 05:30:05 ?do skips the loop if the limit and start args are equal 05:30:08 If I do 10 10 foo I get an infinite loop 05:30:20 10 10 foo2 doesn't 05:30:21 I see 05:33:44 --- join: proteusguy (~proteus-g@cm-58-10-154-246.revip7.asianet.co.th) joined #forth 05:33:44 --- mode: ChanServ set +v proteusguy 05:38:43 Huh I'm having trouble implementing it 05:39:55 : ?DO DUP <> IF POSTPONE DO THEN ; IMMEDIATE 05:39:56 maybe? 05:40:20 no 05:40:21 not at all 05:40:22 haha 05:40:27 yeah lol 05:40:45 The equality check is at runtime 05:42:22 There are a couple ways to implement, I compile a primitive. 05:42:28 : ?do { -- a1 1 } ( lim x-- )( r: -- {ip lim ini}| ) 05:42:28 & (?do) mark 1 ; directive 05:43:26 i need to fix my meta-compiler to actually compile differently 05:43:35 so that i don't have to implement the control flow stuff in the metacompiler 05:43:47 right now i need to implement it in both the kernel and the metacompiler 05:44:18 In my Forth (?do) is a primitive that does the runtime action of ?do 05:44:39 my do is very small 05:46:18 : do { -- 0 } ( lim x-- )( r: -- ip lim x) 0 & (do) ; directive 05:50:08 rdrop-exit: what does { } do in your forth 05:50:20 comments for compilation vs runtime? 05:50:54 Exactly, I use { ... } as the comment for the compile-time action 05:51:23 ?do { -- a1 1 } ( lim x-- )( r: -- {ip lim ini}| ) 05:51:44 The { -- a1 1 } is the comment for the compile-time action 05:51:59 ( lim x -- ) is the data stack comment for the runtime action 05:52:24 ( r: -- {ip lim init}| ) is the return stack comment for the runtime action 05:52:33 thought so, good shout 05:53:47 :) 05:54:41 Just updated by gist, check line 31 https://gist.github.com/siraben/4b1648c311df16829874b6c08ecba150#file-small-backtrack-fs-L31 05:54:57 Any guesses what it does before I reveal? 05:55:09 Well the name gives it away, haha 05:55:17 :) 05:55:44 Here's a picture anyway 05:55:45 * siraben uploaded an image: subsets.png (1095KB) < https://matrix.org/_matrix/media/v1/download/matrix.org/GGOJWfMGfzJRJreTUgQDpPuK > 05:56:27 This is cool stuff, only took a couple of primitives to get surprisingly sophisticated backtracking 05:56:44 No global state needed, too! 05:56:51 Apart from the return stack, of course 05:59:07 cool 05:59:39 And the word .{} executes exactly 2^n times if there are n words in the "set", which is exactly how many times it needs to 06:00:48 If anyone wants to see more examples, I was inspired by http://www.complang.tuwien.ac.at/anton/euroforth/ef99/gassanenko99b.pdf 06:03:01 Okay, I got a weird issue... 06:03:14 https://bpaste.net/show/44404d6ca6f6 06:03:33 Why does it suddenly stop to recognize "MAT1" after I run M:ZERO? 06:09:36 This doesn't make any sense... 06:14:40 What do you mean by "stop to recognize"? 06:22:19 it's writing past the end of the allocated memory for the matrix 06:23:31 siraben, nice progress! Feels great to get something working, eh? :-) 06:25:40 john_cephalopoda: add a CELLS before the ALLOT in MATRIX 06:25:52 john_cephalopoda, I think that's the most sample "working" forth code I've ever seen in this group that wasn't part of a forth implementation! :-) 06:28:13 --- quit: xek (Remote host closed the connection) 06:28:39 --- join: xek (~xek@apn-31-0-23-83.dynamic.gprs.plus.pl) joined #forth 06:31:44 --- quit: rdrop-exit (Quit: Lost terminal) 06:36:23 proteusguy: it sure does! 06:36:43 Still a long way to go. It's a nice incremental process. 06:44:31 crc: Oh, duh, thanks. 06:48:10 --- quit: pierpal (Read error: Connection reset by peer) 06:49:56 proteusguy: I also got this code: https://thecutecuttlefish.org/gol.html https://thecutecuttlefish.org/mandelbrot.html 06:50:31 Conway's Game of Life and a Mandelbrot set viewer (with sixel support and farbfeld export). 06:51:01 --- join: Kumool (~Khwerz@adsl-64-237-236-42.prtc.net) joined #forth 06:53:25 hm, how do i implement IF, because it uses POSTPONE, and POSTPONE uses IF 06:53:51 you can implement IF without POSTPONE 06:55:46 (i.e., what does the definition of IF look like after POSTPONE executes?) 06:56:13 --- part: Kumool left #forth 06:56:18 yea well 06:56:24 but that's not nice :) 06:57:22 that's forth for you 06:57:42 it's just in my metacompiler 07:01:44 if it's in your metacompiler then what's the problem? POSTPONE should come from the host dictionary and you can use that to implement the target dictionary IF 07:16:45 yes 07:17:17 this is where forth gets too confusing for my tiny brain tbh 07:17:49 i get really confused once host words and target words start appearing on the screen at the same time 07:20:57 john_cephalopoda, what forth you run this stuff on? 07:21:58 With my commit to zkeme80 I'm signing off for the night. Bye all! 07:22:25 good night 07:24:32 proteusguy: gforth 07:24:55 proteusguy: Trivial to port to pforth. I can run the mandelbrot set viewer on my phone. :D 07:25:21 cool 07:26:31 john_cephalopoda: hm I wonder if it can be ported to my forth 07:26:42 On an ARM microcontroller I would use a bitbanding formula to address sixels. 07:27:03 oof you have floating point, I don't have that yet. 07:28:17 Here's an example of a mandelbrot set without floating point 07:28:18 https://github.com/tgvaughan/forth.jl/blob/master/examples/mandelbrot.4th 07:28:52 huh it needs signed numbers too 07:28:59 * siraben shrugs 07:31:29 --- quit: tabemann (Ping timeout: 268 seconds) 07:50:32 --- join: Kumool (~Khwerz@adsl-64-237-236-42.prtc.net) joined #forth 07:59:33 FF AND 9E = if op_skp else op_sknp then ; 07:59:39 sorry wrong window 08:23:32 corecode: Stashing, fetching, and storing the scope of words is very useful for meta and cross compilation https://hub.darcs.net/pointfree/forth-bind 08:24:43 BIND may solve namespacing woes 08:25:01 I just added a gforth implementation 08:35:32 https://forthworks.com/share/655ff24e985e1dbb1576305b62308fa7 is a retro implementation of bind 08:37:47 what's with the arbitrary address? 08:38:51 it's a pastebin 08:38:56 (is my guess) 08:39:28 no, in his definition of bind, lol 08:39:42 oh. do we talk about code here? 08:40:54 bit of a waste of time really 08:41:20 let's talk more about politics - man, my guys are way more smart and logical than your guys 08:41:51 my guys keep fucking me over despite the platform i voted for them based on 08:43:50 crc: Cool! Mind if I add it to the collection? 08:47:40 The originator of the BIND word had his forth continue to use the last bound scope for definitions compiled thereafter, until the scope is bound to somewhere else again. 08:54:32 pointfree: feel free to add it 08:55:35 WilhelmVonWeiner: there's no arbitrary address. 1793 is the opcode value for a LIT/JUMP/NOP/NOP instrution bundle 09:04:30 Hmm, I really would like to have Bresenham. 09:04:31 I now realize I hadn't tested these bind ports with more than literal numbers. Whoops 09:05:32 shows the importance of exhaustive testing 09:17:15 --- join: dys (~dys@tmo-080-214.customers.d1-online.com) joined #forth 09:35:55 I should add a network interface to my pastebin. It currently only works for files already on my server 09:51:45 Has my brain stopped working? HEX FFFF 12 RSHIFT . should give me F right? 09:52:20 no 09:52:29 that 12 isn't in decimal 09:53:01 AAAAAAAAAAAA 09:53:07 AAAAAAAAAHHHHHHHHHHHHHHHH 09:53:30 thanks 09:53:46 np 09:57:17 john_cephalopoda: you got that link http://members.chello.at/~easyfilter/bresenham.html ? If so then you can browse through the pdf and re-implement the algorithms in Forth 10:03:29 --- quit: dave0 (Quit: dave's not here) 10:11:01 Zarutian: Yeah, wikipedia also lists it quite well. 10:11:44 does POSTPONE 1 seem reasonable? 10:12:07 it would mean that i'd have to implement testing for a number 10:14:56 make 0 and 1 constants 10:15:07 that's a thing people do for some reason 10:16:24 it has space savings if you're writing literal 0s and 1s all over the place 10:16:46 --- join: Keshl (~Purple@24.115.185.149.res-cmts.gld.ptd.net) joined #forth 10:31:39 --- quit: X-Scale (Ping timeout: 268 seconds) 10:34:17 --- join: X-Scale` (~ARM@31.22.203.76) joined #forth 10:34:49 --- nick: X-Scale` -> X-Scale 10:35:45 Yeah, you use 1/2 the space to lose 2x the speed 10:37:28 why would you lose speed? 10:38:03 call CONSTANT to call 0 LITERAL 10:38:34 think of the mechanics involved, '2' is a rough number 11:23:58 --- quit: gravicappa (Ping timeout: 250 seconds) 11:56:08 so what would POSTPONE 2 do 11:56:37 i guess it should do ['] (LITERAL) , 2 , 11:57:21 my problem is that i don't want to call >NUMBER in POSTPONE 11:58:31 corecode: POSTPONE and ['] do completely different things 11:58:54 postpone is one of the goddamnedest words 11:59:27 "sometime later, when this current word is invoked, we will invoke the following word" 11:59:46 it's like a twisted variant of a macro 12:02:54 It reminds me of the coolness (way back) if strings submitted to EXECUTE; and then the wars that arose over the idea, state, and assorted other wtf. 12:13:42 POSTPONE does ['] ... COMPILE, for immediates, no? 12:14:45 https://github.com/corecode/forth better now 12:15:17 gforth compiles POSTPONE 2 as 2 LIT, 12:23:43 --- join: mtsd (~mtsd@94-137-100-130.customers.ownit.se) joined #forth 12:43:23 --- quit: mtsd (Quit: WeeChat 1.6) 13:11:48 --- quit: xek (Ping timeout: 260 seconds) 13:14:02 --- quit: dddddd (Ping timeout: 250 seconds) 13:42:44 Oof, I kinda dislike Bresenham. 13:49:20 oh man i just can't wrap my head around POSTPONE 1 13:50:23 AHA! 13:50:28 gforth doesn't support it 13:52:22 --- quit: crc (Quit: ZNC 1.6.6 - http://znc.in) 13:55:43 corecode: thus? 13:55:45 1 constant 1 ok 13:55:45 : delay1 postpone 1 ; immediate ok 13:55:45 : test delay1 . ; ok 13:55:45 test 1 ok 13:56:48 meh 14:00:04 --- join: crc (~crc@li782-252.members.linode.com) joined #forth 14:18:12 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 14:42:03 --- mode: ChanServ set +v crc 14:42:11 --- mode: ChanServ set +o crc 14:59:54 --- quit: dys (Ping timeout: 268 seconds) 15:00:54 john_cephalopoda: hmm? why the dislike? I find these algorithms pretty nifty specially because you do not have to do floating point arithmetic. 15:12:05 I just have no clue what to do with all those variables. 15:12:44 Is there something like local variables in Forth? 15:14:01 <`presiden> gforth has { iirc 15:15:28 define yourself a few words to PICK (or whatever) from the stack; push N cells; pop N cells when done. Same can be done over on the RS. Could even create a special stack. 15:23:19 john_cephalopoda: you are using too many items on the stack. 15:23:37 this is why you factor into many short definitions, to keep your stack manageable 15:23:52 and avoid code duplication, to help you factor, to keep your stack managable 15:57:46 --- quit: Croran_ (Quit: No Ping reply in 180 seconds.) 15:58:58 --- join: Croran (~quassel@2601:601:1801:6dde:a024:a39a:633c:7ee8) joined #forth 16:03:39 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 16:07:47 --- quit: john_cephalopoda (Ping timeout: 252 seconds) 16:07:49 --- quit: pierpal (Ping timeout: 240 seconds) 16:09:47 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 16:13:59 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 16:15:42 john_cephalopoda: yes look at the LOCALS section of the standard 16:16:03 I believe it's somewhat debated 16:17:54 it was heavily debated - and the standard and gforth disagree 16:32:20 so locals are a compile time thing basically defining constants for picking? 16:32:43 hm no, that can't work 16:33:16 "can't" is such a strong word. 16:33:35 You define some variables and undefine them at the semi basically 16:33:51 implementing that is your problem - hence, the locals stack 16:35:05 aha extra stack 16:35:27 and EXIT clears the locals stack 16:35:39 okay 16:35:49 hm 16:35:51 no 16:36:22 how does that work with non-local returns 16:36:51 dude, seriously: look at gforth source or the standard.. It might even exist in PFE. 16:37:34 much more interesting to think about it yourself 16:48:45 --- join: rdrop-exit (~markwilli@112.201.166.158) joined #forth 17:52:03 --- join: tabemann (~tabemann@h193.235.138.40.static.ip.windstream.net) joined #forth 18:12:50 --- quit: tabemann (Ping timeout: 246 seconds) 18:28:37 --- quit: dddddd (Remote host closed the connection) 18:56:04 --- join: dave0 (~dave0@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 18:56:37 hi 19:00:39 Hi Dave0 19:04:24 hi rdrop-exit 19:18:38 --- quit: rdrop-exit (Quit: Lost terminal) 19:52:36 --- join: tabemann (~tabemann@2602:30a:c0d3:1890:7d04:1e92:6395:7db) joined #forth 20:07:25 --- join: rdrop-exit (~markwilli@112.201.166.158) joined #forth 20:10:33 --- quit: dave0 (Quit: dave's not here) 20:15:56 --- quit: pierpal (Quit: Poof) 20:16:13 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 20:36:55 --- join: gravicappa (~gravicapp@h109-187-254-198.dyn.bashtel.ru) joined #forth 20:38:57 --- quit: Kumool (Quit: EXIT) 20:40:04 --- quit: proteusguy (Remote host closed the connection) 20:54:07 --- join: proteusguy (~proteus-g@cm-114-109-129-168.revip13.asianet.co.th) joined #forth 20:54:07 --- mode: ChanServ set +v proteusguy 21:06:02 --- quit: proteusguy (Remote host closed the connection) 21:11:15 --- join: proteusguy (~proteus-g@cm-114-109-129-168.revip13.asianet.co.th) joined #forth 21:11:15 --- mode: ChanServ set +v proteusguy 21:13:31 back 21:26:33 --- join: dys (~dys@tmo-108-180.customers.d1-online.com) joined #forth 21:41:01 Is there a compression algorithm that allows searching? 21:41:19 I'm looking into making a language dictionary 21:42:45 --- quit: proteusguy (Remote host closed the connection) 21:53:03 limpel-zev? 21:53:48 Huffman coding? 21:53:57 ...a bench vise? 22:10:14 siraben: length + CRC32? 22:10:39 Something space efficient 22:10:50 if you use CRC16, that gets you down to three bytes per word 22:11:07 tabemann: isn't CRC an error detecting code? 22:11:24 it's a non-cryptographic hash 22:11:38 it's originally intended as an error correcting code 22:12:00 but the question I have is, can you come up with something better 22:12:26 A trie, perhaps? 22:12:31 Or huffman encoding 22:12:49 Well tries would allow search 22:13:06 are tries space-efficient though 22:13:26 Not really 22:13:34 What about trees? 22:13:37 Or heaps 22:15:34 those are big data structures with lots of pointers 22:15:40 they're fast 22:15:56 but for you, space is probably more important than speed 22:16:25 I'd be more likely to go for huffman encoding 22:16:40 one other idea is to restrict the character set that can be used for words 22:17:42 if you use six bits per character, four characters take up only three bytes *before* any compression 22:18:00 (and yes, back way in the day many computers did use six bits per character) 22:18:16 Ah because I don't need 128 possible characters for a dictionary 22:18:25 six bits seems enough 22:18:33 Suffix trees/arrays 22:20:33 I wouldn't bother though 22:20:54 --- quit: rdrop-exit (Quit: Lost terminal) 22:37:00 when all else fails: tether it ;-) 22:51:39 Implementing ?DO seems to be a bit challenging 22:51:49 I think I'm not branching right 22:52:05 --- quit: dys (Ping timeout: 245 seconds) 22:57:01 I hated that thing.. always used DO and implemented FOR/NEXT 23:03:46 Why do you hate it? 23:06:49 --- quit: pierpal (Read error: Connection reset by peer) 23:27:08 --- join: proteusguy (~proteus-g@110.164.217.65) joined #forth 23:27:08 --- mode: ChanServ set +v proteusguy 23:32:58 --- quit: proteusguy (Ping timeout: 268 seconds) 23:45:55 --- join: proteusguy (~proteus-g@110.164.217.65) joined #forth 23:45:58 --- mode: ChanServ set +v proteusguy 23:54:31 --- quit: proteusguy (Ping timeout: 250 seconds) 23:59:59 --- log: ended forth/19.01.07