2024-04-17 00:19:36 hey baby, wanna have a good time? 2024-04-17 00:21:07 veltas: dope :) 2024-04-17 00:21:38 veltas: so you'd just change that to 6 bytes + 2 bytes for length 2024-04-17 00:21:53 hey baby, wanna have a good time? 2024-04-17 00:52:24 https://github.com/svofski/forth-roguelike/tree/master i find it weird a roguelike, like this, would be slow if written forth-y 2024-04-17 00:52:34 it seems the author did have an issue with it at the beginning 2024-04-17 05:25:13 lf94 great you read TF, indeed a wonderful book. TIL is also a very good book to read. 2024-04-17 05:25:39 https://www.amazon.com/Threaded-Interpretive-Languages-Design-Implementation/dp/007038360X 2024-04-17 05:25:43 you can find it in PDF online. 2024-04-17 05:25:45 free. 2024-04-17 05:26:28 https://archive.org/details/R.G.LoeligerThreadedInterpretiveLanguagesTheirDesignAndImplementationByteBooks1981 2024-04-17 05:29:11 I believe at a time I had 10 or so copies of this book, and TF as well, and many other books as well. I gave most of those 10 copies away. 2024-04-17 05:29:54 there was a time in the mid to late 90s where books like this were literally 50 cents or a dollar at abcbooks or such, ebay, craigslist, etc. 2024-04-17 05:30:14 shipping was media rate back then, not bend over rate. 2024-04-17 05:56:24 as I re-read it for the Nth time, I realize what an amazingly concise book TIL is. 2024-04-17 05:56:34 much like TIL and forth as well. 2024-04-17 08:44:08 there are math functions that have many parameters, all with some default value. Usually you may want to specify only 2 or 3 of them, leaving all other parameters as default. How the stack-based system of Forth solved this problem, across the decades and many Forth implementations ? 2024-04-17 09:30:40 rendar: I can't be that comprehensive but often an implied variable would be put in a VARIABLE like BASE 2024-04-17 09:30:50 Otherwise baked into the word name like 0= 2024-04-17 09:31:22 Some words accept different numbers of arguments depending on top values 2024-04-17 09:43:14 veltas, hmm, can you give me a practical example of that? 2024-04-17 12:16:40 rendar: if you mean named arguments as it's called in some languages where you can specify the height and width of a rectangle to draw but not the coordinates so it defaults to 0, 0 for example then no, you can't do that in forth 2024-04-17 12:17:21 you might create a structure in memory, use a word to fill it with default values, add your own values then pass the address of the structure 2024-04-17 12:22:46 i see 2024-04-17 12:23:46 in my forth impl. i was thinking to something like: 1.0 2.0 3.0 (main args) -5.0 $width -5.0 $height create-rect 2024-04-17 12:24:26 words which start with $ takes whatever there is on the stack and put that into an hash table, so in that example you'll get: 'width':-5.0 and 'height':-5.0 2024-04-17 12:25:01 then the create-rect words will check if that options hash table will have 'width' or not, to use the user specified width or the default one 2024-04-17 12:41:00 rendar The same way interrupts specify more then on parameter.  Push a pointer to the parameters to the stack. 2024-04-17 12:41:07 *one 2024-04-17 12:41:29 skvery, is that similar to my solution? 2024-04-17 12:43:21 is this chat room about programming? 2024-04-17 12:44:19 Quexs01: it's about the programming language Forth 2024-04-17 12:49:15 rendar: I've dabbled with using variables to pass in some data, as in http://forth.works/share/VznYe475bM.txt 2024-04-17 12:50:22 crc, that's interesting, is that a your Forth version? 2024-04-17 12:50:31 For most purposes that may benefit from this, I'm more likely to do as MrMobius suggests and create a structure with default values and pass a pointer to it 2024-04-17 12:50:53 rendar: yes, that's from one of my blocks in my konilo system 2024-04-17 12:53:06 interesting, so every word which starts with ! pop from stack and saves that variable has str->var, and @ does the opposite, reads str->var and push into the stack 2024-04-17 12:54:14 GeDaMo i see 2024-04-17 12:56:34 Quexs01: are you interested in Forth? Or do you have a more general programming question? 2024-04-17 12:57:44 rendar: yes, those are sigils for quick variable access 2024-04-17 12:58:00 crc, interesting! thanks 2024-04-17 13:09:16 GeDaMo 2024-04-17 13:09:33 Quexs01 2024-04-17 13:09:46 i am interested about adolf hitler and how ango establishment treats him like a whore 2024-04-17 13:09:55 :| 2024-04-17 13:09:55 anglo* 2024-04-17 13:10:00 yeah 2024-04-17 13:10:03 fuck you 2024-04-17 13:10:22 crc 2024-04-17 13:23:17 Yikes 2024-04-17 13:31:39 > then no, you can't do that in forth 2024-04-17 13:31:42 come on now ;) 2024-04-17 13:31:54 named parameters are definitely possible in forth. 2024-04-17 13:32:02 just not naturally given 2024-04-17 13:32:44 3 height 4 width 0 0 rect 2024-04-17 13:32:55 I'm sure this could be used to create some sort of structure 2024-04-17 13:33:00 whoops 2024-04-17 13:33:12 0 start_x 0 start_y 3 height 4 width rect 2024-04-17 13:33:31 this greatly complicates things, but, might be desirable 2024-04-17 13:33:53 "default parameters" is even more tricky like it's been said 2024-04-17 13:34:46 .{ 3 height , 4 width } rect 2024-04-17 13:35:03 then define rect to parse this structure and fill in the missing parameters within its definition 2024-04-17 13:35:26 veltas: come on, get on running my sha on zenv ;) 2024-04-17 13:35:33 i might try it on a commodore 64 forth 2024-04-17 13:35:35 in an emulator 2024-04-17 13:40:01 sorry for the delay; at work currently so was away from the computer 2024-04-17 13:40:29 crc: thanks :) 2024-04-17 13:44:35 lf94: Sounds like partial appllcation https://en.wikipedia.org/wiki/Partial_application 2024-04-17 13:45:09 But I can also see 'named parameters' being interpreted as the L-word 2024-04-17 13:45:40 thanks crc 2024-04-17 13:49:37 lf94: Sorry man super busy at the moment 2024-04-17 13:49:56 Unlikely to get it done, you can always do it yourself 2024-04-17 13:50:14 Commodore 64 Forth is a good idea too 2024-04-17 13:52:14 I'm poking you :) All good! 2024-04-17 14:17:41 mirth (https://github.com/mirth-lang/mirth), which is a higher level concat language, uses "named stacks" for named parameters, so you can have a structure "person" with "name" and "age" fields and build it like `10 >age "John Doe" >name make-person` 2024-04-17 14:18:06 and under the hood two stacks "name" and "age" are created and `make-person` takes from them 2024-04-17 14:25:11 neat 2024-04-17 14:25:34 oh yeah, i wanted to say 2024-04-17 14:25:55 when working with forth, im starting to actually appreciate not needing to think about variable names, and how things are passed all over :) 2024-04-17 14:26:14 i had to write the sha256 in rust while debugging; i actually found myself stuck a few times about how to name something or arrange something 2024-04-17 14:26:22 it was a "aha" moment for me 2024-04-17 14:31:38 Yes, the stack becomes something really appealing after a while. 2024-04-17 14:32:06 wow, i had the opposite experience. i find that i have to think of a lot more names, and struggle more to do so, in forth than i do in c 2024-04-17 14:32:19 The stack is implicitly "it" or "the thing we are working on" 2024-04-17 14:44:17 yes exactly. 2024-04-17 14:44:48 zelgomer: could you elaborate? i find that interesting 2024-04-17 14:44:58 I'm guessing he means for all the factored words 2024-04-17 14:45:05 oh 2024-04-17 14:45:32 it's no harder than coming up with function names 2024-04-17 14:45:54 maybe he's trying to come up with too descriptive names? 2024-04-17 14:45:55 I find it a bit harder but every language has tradeoffs 2024-04-17 14:46:06 I don't think Forth is exactly 'easy' 2024-04-17 14:46:17 imo because forth allows numbers and stuff in the name, it opens up more possibility for names 2024-04-17 14:47:02 Doesn't make it easier 2024-04-17 15:34:30 did I miss anything 2024-04-17 15:38:30 Yeah, it's true that Forth's flexiility can be dangerous if you're undisciplined. I guess the extreme example you sometimes see is something like : 1 17 ; I mean, none of us would ever do that, but Forth won't stop you. 2024-04-17 15:44:58 might be handy for testing 2024-04-17 15:52:02 that's true of any language though mostly. if you want "safety" you should just go with Coq or any language which completely separates you from the machine 2024-04-17 16:38:03 so I think I'm going to do two games in forth 2024-04-17 16:38:12 one is a gamification of note taking 2024-04-17 16:38:28 basically you keep a pet alive by feeding it notes, and keep it happy by recalling notes with it 2024-04-17 16:38:44 and your pet can take visual features from other pets if you share notes with others 2024-04-17 16:38:58 the second game will be an fps 2024-04-17 16:40:13 extremely simple; players are floating spheres that have 3 weapons of infinite ammo: shotgun, laser beam and laser ball (which you can blast with laser beam) 2024-04-17 16:40:32 only ever 2 players 2024-04-17 16:43:16 I like the note taker idea 2024-04-17 16:43:41 Note to self: feed pet 2024-04-17 16:43:46 Especially if it has cute animal imagery :P 2024-04-17 16:44:09 yea exactly :) 2024-04-17 16:47:54 lf94: Make sure you can't select water bears as a pet 2024-04-17 16:48:16 im going to make the animal somewhat generated 2024-04-17 16:48:33 What's wrong with water bears? :| 2024-04-17 16:50:32 GeDaMo: They are pretty hardy -- kind of defeats the purpose of feeding it notes 2024-04-17 16:50:41 https://en.wikipedia.org/wiki/Tardigrade 2024-04-17 16:51:04 I'm familiar with water bears :P 2024-04-17 16:53:20 I figured this would encourage me to take notes more often, but most importantly, not care how I format them :) 2024-04-17 16:53:48 recall prompts will be simple 2024-04-17 16:54:04 if the note is a single word: 1 to % of the word will be missing 2024-04-17 16:54:21 if the note is a sentence: 1 to 2 words will be missing 2024-04-17 19:42:44 "3 height 4 width 0 0 rect" feels so postscript :) 2024-04-17 19:43:12 postscript is a forth-like 2024-04-17 19:46:04 well aware, TY :) 2024-04-17 19:46:26 used to write drivers in PS, back in the late 80s, and early 90s. 2024-04-17 19:46:37 also PS code while doing a lot of view methods for NS/OS 2024-04-17 19:46:56 wonderful and natural to me, loved it. 2024-04-17 19:47:09 but I'm into RPN since the 41 came out. 2024-04-17 19:47:37 about late 79/80, loved that calculator, have a cx on my desktop. 2024-04-17 19:47:51 with card reader :) 2024-04-17 19:50:23 https://iili.io/J8c7Qgn.jpg 2024-04-17 19:50:49 was the upgrade from the 41C 2024-04-17 19:51:14 man, what a world that was to have that 'power' in your hands to write routines to formulas, store them on a card you could slide in and load, and all 'mobile' 2024-04-17 19:51:34 I think HP41 is still an engineers wet dream from yesteryear. 2024-04-17 20:01:38 Nah, HP42 or bust :P 2024-04-17 20:06:30 :) 2024-04-17 22:04:45 i totally love PostScript and i still plan to create a decent IDE for its development 2024-04-17 22:11:31 X-Scale: are you going to use Display Postscript for the UI? :P 2024-04-17 23:22:01 X-Scale: do you have any interesting PS programs to share, link to?