00:00:00 --- log: started forth/17.03.21 00:05:03 --- join: proteusguy (~proteus-g@180.183.116.129) joined #forth 00:05:03 --- mode: ChanServ set +v proteusguy 01:11:41 --- quit: dual (Ping timeout: 246 seconds) 01:23:23 another beautiful evening 01:23:40 the birds are snoozing, the grass is freezing, and my computers are whirring away 01:24:02 I think I want to make a forth shell 01:24:49 I guess the original research that lead me to forth was in part because I was looking for a language to replace bash shell 01:28:21 --- join: true-grue (~true-grue@176.14.222.10) joined #forth 01:30:06 How do I put the " character inside of a string using s" ? 01:30:31 --- join: dual (~bonafide@cpe-74-75-153-119.maine.res.rr.com) joined #forth 01:50:50 --- join: gravicappa (~gravicapp@83.237.173.243) joined #forth 02:06:21 --- join: Keshl_ (~Purple@24.115.181.94.res-cmts.gld.ptd.net) joined #forth 02:06:24 --- quit: Keshl (Read error: Connection reset by peer) 02:46:55 --- quit: smokeink (Ping timeout: 264 seconds) 02:59:32 --- quit: proteusguy (Remote host closed the connection) 03:29:07 forth is just the most amazing theng owemgee 03:33:28 Thinking about it just makes me feel so happy 04:16:20 Is there a way to get a new variable address without defining it as a word 04:16:27 simply getting the new address on top of your stack 05:09:15 --- quit: reepca (Read error: Connection reset by peer) 05:18:07 yes 05:19:07 zy]x[yz: how do you spell your nickname btw? 05:19:34 I spell it z y ] x [ y z 05:20:19 that's very tiresome 05:20:39 s/spell/pronounce/ 05:20:55 oh, I don't pronounce it 05:21:12 it's a joke nick parodying someone from another channel who uses [xyzzy] 05:21:37 tbh your version looks way better 05:21:56 first I turned it inside out and then I moved the ] to make it symmetric 05:23:09 and you add one more x 05:23:26 no 05:23:56 so what is the word to do that zy]x[yz 05:24:19 John[Lisbeth], here and , 05:24:29 or allot 05:24:53 oh wait, sorry, really, x in center alone, my bad, not very concentrated (building lego right now at work) 05:25:33 yeah, and I typo'd that I moved the ]. really I swapped the x and the [ 05:25:50 here seems to work only that it wont give me a new pointer every time 05:26:15 am I attume here represents the next available memory slot? 05:26:18 *assume 05:26:31 yes, you have to use , or allot to actually advance the dictionary pointer 05:27:32 it really is as though you've spent exactly no time whatsoever to read about forth on your own 05:27:45 So for each new address i use up 8 memory slots? 05:28:14 you use up whatever you allocate 05:28:32 well when I run here , the new address is 8 cells ahead 05:28:41 or actually maybe not 05:28:49 1 cell is 8 05:35:05 : anonymous-variable here dup , ; 05:35:07 what a beauty 05:35:31 now I can make anonymous arrays 05:40:21 you want : anonvar here swap , ; 05:41:17 --- join: GeDaMo (~GeDaMo@212.225.82.133) joined #forth 05:41:43 stack undeflow 05:42:08 I need dup in fact 05:43:05 how much should I worry about just allocating lots of anonymous variables like that. Surely it would add up if an endless loop kept doing it 05:43:32 If I manage things it should not need garabge collection but for certain designs it would just keep growing and growing 05:52:04 if you use dup you're writing the address tbat was just returned by here to your new cell and leaving the number below it on the stack 05:52:51 --- join: proteusguy (~proteus-g@182.232.164.119) joined #forth 05:52:51 --- mode: ChanServ set +v proteusguy 05:54:21 if you don't want it initialized, it probably makes more sense to use allot 05:54:31 : anonvar here cell allot ; 05:55:02 : anonvar! here swap , ; ( initialized version ) 05:55:25 this channel is quite fond of the word 'allot' 05:56:15 https://i.imgur.com/ntG7Muz.png 05:57:01 : make-anonymous-array ( arraysize -- arraypointer ) anonymous-variable swap 2dup cells allot ! ; 05:57:20 Now that's what I call an array function 06:05:02 now I can nest arrays within arrays 06:05:17 --- part: Bunny351 left #forth 06:10:36 heh I can make a multidimensional array 06:11:19 which also gives me trees 06:11:24 more or less 06:11:30 fixed size trees 06:12:19 the problem is I cant nest arbitrary arrays because I have not implemented a way for the current array pointer it is working on is a pointer to an array of arrays or a pointer to an array of something else 06:14:08 if I knew ahead of time where in my nest of arrays my data would be and what it was supposed to be then I could do that, but I could not take an array written by someone else and know what was in it 06:14:49 If I end up deciding to implement a type system I will instead store a string with information about the array rather than try to invent types 06:15:22 store the string at index 1 of the array I guess 06:30:03 one interesting thing is if I have an array of size 20 and I fill the first 19 slots with metadata then that is like a variable with a single value but that I know alot about 06:30:59 https://en.wikipedia.org/wiki/Dope_vector 06:36:02 --- quit: proteusguy (Ping timeout: 260 seconds) 06:41:33 seems interesting 06:41:43 I'd have to see it implemented to know how it works though 06:48:27 --- join: proteusguy (~proteus-g@2405:9800:b408:bc31:4a51:b7ff:fe38:d966) joined #forth 06:48:27 --- mode: ChanServ set +v proteusguy 06:53:23 wow dynamic arrays are way less efficient than I thought 06:55:53 --- join: mtsd (4d6e3d64@gateway/web/freenode/ip.77.110.61.100) joined #forth 06:58:21 I guess it's not as bad in forth since you are just copying ints but if I made a really bootstrapped datastructure then it could get really expensive really fast 06:58:33 It makes me reconsider immutable datastructures 06:59:24 I guess when you think about it dynamic arrays only really give you push and pop, and the ability to assign to an index higher than is available 07:05:18 --- join: smokeink (~smoke@175.22.22.33) joined #forth 07:07:44 one thing you could do is create a sort of linked array rather than a linked list 07:08:08 it ensures that your dynamic array is not random access but it is still faster access than a linked list 07:08:35 to me that seems like a much nicer option than copying over the whole array into a new array 07:22:05 that whole dynamic arrays things really puts a hamper on my plans 07:22:32 I had thought there would be some magically good way in which it was done but nope 07:47:30 --- quit: mtsd () 07:54:49 I want to do something similar to : s"2 s" user text" an-additional-word ; 07:57:24 basically to make a version of s" which performs an additional word at the end 08:02:17 I still have trouble which words that have separate compile time and runtime definitions 08:02:28 and especially with words which behave like infix 08:13:14 --- join: neceve (~ncv@86.125.247.109) joined #forth 08:13:15 --- quit: neceve (Changing host) 08:13:15 --- join: neceve (~ncv@unaffiliated/neceve) joined #forth 08:28:32 --- quit: smokeink (Remote host closed the connection) 08:32:20 --- quit: neceve (Quit: Konversation terminated!) 09:49:07 John[Lisbeth]: what are you trying to do? 09:57:32 Well s" returns to me a poitner and the length of an array 09:57:51 and my arrays use a different format where index 0 is the length of the array 09:58:21 so my goal is to append a word which at the last minute creates a new array consisting of a pointer and a length 09:59:00 Why not just redefine s" to do what you want? 09:59:29 Although s" may already create a counted string which has the length in the first byte 09:59:40 Just so others can use s" as it was defined in ans, but I could create a new word based on teh dfinition of s" 10:20:41 John[Lisbeth]: does c" not do what you want? 10:30:21 seemingly not 10:31:02 at least if it does I don't know the syntax for it 10:34:21 It seems to in some way condnese a string down to a single int but it only works inside a word definition 10:40:27 John[Lisbeth]: c" only has compile time semantics in the standard; s" only does if you have the FILE extensions 10:45:47 This seems to be the definition of s" : s" [char] " parse s-buffer place s-buffer count ; 10:49:03 So I just have to trace back the definitions of those words until I understand them 11:17:26 --- quit: gravicappa (Ping timeout: 260 seconds) 11:50:07 --- join: luser1 (~luser1@h69-21-248-248.crlbnm.broadband.dynamic.tds.net) joined #forth 11:59:42 --- join: ACE_Recliner (~ACE_Recli@c-50-165-178-74.hsd1.in.comcast.net) joined #forth 12:00:58 --- join: gravicappa (~gravicapp@ppp83-237-161-161.pppoe.mtu-net.ru) joined #forth 13:10:53 --- quit: karswell (Read error: Connection reset by peer) 13:11:16 --- join: karswell` (~user@216.49.93.209.dyn.plus.net) joined #forth 13:29:34 --- quit: gravicappa (Remote host closed the connection) 13:32:59 --- quit: dual (Ping timeout: 246 seconds) 14:27:45 --- quit: GeDaMo (Remote host closed the connection) 14:31:36 --- join: reepca (~user@std-001.cune.edu) joined #forth 14:32:46 --- quit: reepca (Client Quit) 14:34:59 --- join: reepca (~user@std-001.cune.edu) joined #forth 14:40:26 --- quit: true-grue (Read error: Connection reset by peer) 15:30:28 --- join: Zarutian (~zarutian@168-110-22-46.fiber.hringdu.is) joined #forth 16:36:22 --- join: luser1` (~luser1@h69-21-248-248.crlbnm.broadband.dynamic.tds.net) joined #forth 16:42:30 --- quit: nighty (Quit: Disappears in a puff of smoke) 16:42:41 --- quit: luser1` (Remote host closed the connection) 17:04:27 --- quit: dys (Ping timeout: 240 seconds) 17:15:39 --- quit: Zarutian (Quit: Zarutian) 17:21:43 --- quit: ACE_Recliner (Ping timeout: 264 seconds) 17:22:05 http://dev.laptop.org/~quozl/tmp/mirror.png ... select all squares with street signs. none at all? ;-) 17:30:17 I think 2, 2 does, or it could be a lamp post. it's hard to tell 17:35:43 --- join: neceve (~ncv@unaffiliated/neceve) joined #forth 17:50:30 --- join: dual (~bonafide@subzeroup.core.rzwireless.net) joined #forth 18:25:24 --- join: nighty- (~nighty@d246113.ppp.asahi-net.or.jp) joined #forth 19:03:08 7 19:04:26 --- quit: dual (Ping timeout: 246 seconds) 19:06:22 --- join: dual (~bonafide@subzeroup.core.rzwireless.net) joined #forth 19:15:43 --- quit: luser1 (Remote host closed the connection) 20:46:54 --- join: ACE_Recliner (~ACE_Recli@c-50-165-178-74.hsd1.in.comcast.net) joined #forth 20:55:50 You've succeeded at CAPTCHAs when they filter out real humans. 21:05:41 --- quit: koz_ (Quit: WeeChat 1.7) 21:05:59 --- join: koz_ (~koz@121.99.240.58) joined #forth 21:25:31 --- quit: neceve (Quit: Konversation terminated!) 21:52:14 --- join: smokeink (~smoke@175.22.22.35) joined #forth 22:38:09 --- quit: dual (Ping timeout: 240 seconds) 22:39:58 --- join: dual (~bonafide@subzeroup.core.rzwireless.net) joined #forth 23:13:40 --- quit: X-Scale (Quit: HydraIRC -> http://www.hydrairc.com <- Like it? Visit #hydrairc on EFNet) 23:53:42 one good strategy I think is to leave an extra space at the end of an array for it to be a linked list 23:54:08 that way you can resort to using it as a linked list later on if you desire 23:59:59 --- log: ended forth/17.03.21