00:00:00 --- log: started forth/19.01.11 00:19:16 --- quit: dave0 (Quit: dave's not here) 00:35:47 revamped the shebang thing for rpany - has a very strict form now - if the script used defines a __main__ word, this is used after all the following args are handled - switches are words which are introduced by way of an optional __switches__ word 00:35:51 https://gitlab.com/lilo_booter/rpany/blob/master/bin/rpany-shell 00:36:37 $ ./bin/rpany-shell --calculator --prompt="calc> " 00:36:39 calc> words 00:36:41 % * ** + - . / abs acos acosh asin asinh atan atan2 atanh cos cosh e exp ln negate pi sin sinh tan tanh words 00:37:25 as in - lock down - you have a calculator - and that is all :) 00:47:55 fwiw, this is all about the 'domain specific language' thing - the stack parser presented to a user/process can be locked down entirely to the requirements of the domain - internally, it can use anything to satisfy the requirements 00:48:51 this should be a safe thing to expose at the end of a socket - no security holes 02:03:16 --- quit: ashirase (Ping timeout: 272 seconds) 02:07:36 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 03:19:02 --- join: dddddd_ (~dddddd@unaffiliated/dddddd) joined #forth 03:19:37 --- nick: dddddd_ -> dddddd 03:53:48 --- quit: dys (Ping timeout: 244 seconds) 04:14:28 --- quit: mark4 (Ping timeout: 252 seconds) 04:15:57 reepca, re:Advanced Squad Leader - you an old school wargamer? :-) 04:17:12 the_cuckoo, cudos on the progress! 04:17:39 proteusguy: thanks :) 04:33:09 * Zarutian thought he read "Advanced Squid Leader" first time around. Now, because he is watching a compilation of Japanese commercials on mobile games he has thought up a game premis. 04:34:44 basically, one is leading an army of cybernetically enhanced squids against minecraft players that has nearly exterminated their kind due to inksack collection 04:37:09 Whee~ 04:37:41 hahaha 05:12:38 Just got a simple menu system working, should be the basis of navigation within my OS 05:12:40 https://github.com/siraben/zkeme80/blob/044d80e617819abf0020b491546ededa9c1a03c8/bootstrap-flash3.fs#L150 05:12:43 https://imgur.com/a/GSI9lBj 05:14:18 Menu entries contain three things: a selector xt, a deselector xt and an "on click" xt 05:14:45 So it's easily extensible 05:15:41 Thoughts? 05:31:23 Stylish :D 05:36:45 I plan to boot up to a menu that gives the user options to power off the calculator, go into a REPL, see system info or run tests. 05:36:57 Maybe a 2x3 grid would work better, hm. 05:45:34 sorry to spam the link again, but i think the form this is taking is really lovely - https://gitlab.com/lilo_booter/rpany/blob/master/bin/rpany-shell - the vocabs used are described in the readme of the project 05:51:40 --- join: mark4 (~mark4@12.41.103.244) joined #forth 05:52:59 --- join: rdrop-exit (~markwilli@112.201.166.158) joined #forth 05:53:29 Proteusguy: Yes, I'm an old schoold board wargamer 05:54:59 rdrop-exit, same here. Lots of Avalon Hill and other box wargames. And AD&D & Traveller of course. 06:00:27 Me too SPI, AH, GDW, Yaquinto, VG, WEG, etc... On the RPG front mostly FGU titles. 06:01:42 Cool 06:04:39 Ever play 7-player Empires in Arms campaigns? 06:05:21 Only once, the original ADG edition, we never finished it. 06:05:48 Sold my AH edition about 10 years ago. 06:06:28 Well 120 turns is over 200 hours of game play. I think in college I got to 1812 once. I have 3 copies of the game and laminated maps. That was a big one with our group. Had the map setup for weeks in my bedroom. 06:07:59 Cool, we had World in Flames magnetized on the wall for a year or two. 06:08:52 Got tired of the holes in the rules. 06:09:20 I hosted the Asia-PAC ASL tournament a couple years ago in Manila. 06:09:34 Wow - how many players showed up? 06:10:00 25 or so. 06:10:34 Good turn out. I dabbled in ASL but most of the players in that scene were pretty hardcore about it and I'd get taken out quickly. 06:11:51 It is, overall I prefer operational level games. 06:12:21 I generally trend towards strategic level that also have significant economic and diplomatic aspects. 06:13:27 I've taken a break from wargaming for the last year or so, need to get back with my buds and start playing again. 06:13:51 Sorry Forthwrights for the off topic posts :) 06:13:55 My break has been over a decade but I have managed to get in some AD&D occasionally. 06:14:10 It's Friday.... we can slack. 06:14:34 :) 06:18:08 I sold off most of my games when I moved from San Francisco to France, and again when I moved from France to Manila. 06:18:32 Still have enough to last me the rest of my days though. 06:20:12 I miss the old Bay Area wargaming cons, and Origins, when it was still wargame oriented. 06:54:58 looking at the plotQuadBezierSeg function at http://members.chello.at/~easyfilter/bresenham.html I am trying to see if those doubles could just be fixed decimal point 06:59:18 Zarutian: You got a working Bresenham? 06:59:38 --- quit: mark4 (Quit: Leaving) 07:01:08 john_cephalopoda: the straight line? yeah, I just translated the C code version from that page into assemblerish Forth 07:06:44 --- quit: dave9 (Ping timeout: 246 seconds) 07:09:25 pretty sure you can do bresenham with just integers 07:10:24 you definitely can 07:10:33 can't you just add your xdist and subtract your ydist per step 07:10:43 until you get an overflow on y 07:11:01 then you move one more point, subtract ydist, continue 07:11:06 corecode: it is the Bézier curve segment one that I am looking at. 07:11:11 oh 07:11:19 fancy stuff 07:12:20 the pdf linked from that page has many variations on how to implement drawing these lines and shapes 07:14:22 --- join: Kumool (~Khwerz@adsl-64-237-235-188.prtc.net) joined #forth 07:14:47 Zarutian: that algorithm is different to the example I was looking at and makes the thought process much simpler 07:15:15 all the example code i'd seen had so much duplicate bloat 07:19:20 back 07:20:23 rdrop-exit, I moved wordlists, aside from the linked lists of words themselves, out of the core 07:21:02 and next thing up is implementing marker 07:26:53 --- quit: tabemann (Ping timeout: 260 seconds) 07:47:29 Cool 08:04:15 if true else false then <- always find this a bit clumsy for some reason - going to add ?{ true }:{ false } which gives a nice ?{ } for the if then case, and even the invert isn't that bad as ?{ }:{ false } 08:08:38 Similar to the control flow words from LaForth 08:13:33 the_cuckoo: I usually rdrop out of another word to avoid that 08:13:48 or `if true exit then false` 08:15:24 Me too, I use mostly `?;` and `0;` 08:16:06 I can't recall the last time I used else 08:23:14 yeah - it's a funny one - don't really know why if else then feels wrong other than a vague notion that else and then are the wrong way round i guess 08:23:40 else considered smelly 08:23:41 --- quit: proteusguy (Ping timeout: 258 seconds) 08:23:47 :) 08:24:10 http://wiki.c2.com/?ElseConsideredSmelly 08:27:08 that's why in my forth i called it OTHERWISE instead of ELSE 08:29:30 --- quit: Kumool (Quit: EXIT) 08:43:35 another non-conventional think i think.. pick - 0 pick is tos, 1 pick is over etc... but i have -1 pick as the very bottom, and 0 - depth as the top 08:45:21 The road to hell is paved with PICKs :) 08:46:24 1 2 3 .s <3> 1 2 3 ok 08:46:26 -1 pick .s <4> 1 2 3 -1 ok 08:46:32 rdrop-exit: :) 08:46:53 i don't get why gforth does that with the -1 pick 08:48:07 drop ok 08:48:09 -2 pick .s <4> 1 2 3 6395112 ok 08:48:11 huh? 08:48:21 PICK means your code could probably be far simpler 08:48:28 use the return stack more. 08:50:09 A stack is not an array 08:50:42 don't have one :) - not yet anyway - may add it for word definition as it's kinda nice there - but for iterating through n items in push order, i have a rather funky: 0 n do 0 i - roll . loop (and yes, that runs from n to 1) 08:51:36 oh i'm using it as one for sure :) - inverted as the 0 is the top of stack 08:52:39 but then, i have fixed size objects on my stack, so that works for me 08:52:51 =8-O 08:54:18 yeah - it's weird - the data stack is std::deque< boost::any > so no matter what the object is inside the any, the stack grows in a fixed way 08:57:46 but i guess that answers my original question - a normal forth stack wouldn't be that easy to navigate 08:58:27 but surely then a -ve pick should be an error? 09:03:02 --- join: dave9 (~dave@193.060.dsl.syd.iprimus.net.au) joined #forth 09:07:48 A stack machine's stack is not ncessarily in program addressable memory 09:11:01 --- join: dys (~dys@tmo-104-204.customers.d1-online.com) joined #forth 09:14:43 fair point 09:40:17 --- join: Kumool (~Khwerz@adsl-64-237-235-188.prtc.net) joined #forth 10:37:05 --- quit: rdrop-exit (Quit: Lost terminal) 10:40:24 --- join: proteusguy (~proteus-g@cm-58-10-154-246.revip7.asianet.co.th) joined #forth 10:40:24 --- mode: ChanServ set +v proteusguy 11:00:38 Overhauled boot sequence: https://github.com/siraben/zkeme80/blob/master/demo.gif 11:35:46 --- quit: gravicappa (Ping timeout: 246 seconds) 11:41:28 siraben, wow so old school! looks cool. 11:45:35 you make your own font or was that already existing? 11:52:00 that's pretty nice indeed :) 12:00:48 siraben, nice one 12:20:50 --- quit: X-Scale (Ping timeout: 245 seconds) 12:23:03 --- join: X-Scale` (~ARM@46.50.4.5) joined #forth 12:55:51 --- join: mtsd (~mtsd@94-137-100-130.customers.ownit.se) joined #forth 13:13:35 * Zarutian muses about bit-skip-vector trie struct for keeping lots of sha256 hashes 13:15:06 first cell is a bitmap of what nth hexdigits are actually present. (N being the current 'level/depth' into the hash being looked up) 13:15:57 --- quit: mtsd (Quit: WeeChat 1.6) 13:16:00 followed by offset pointers, to next level/depth, that are present or not per that bitmap 13:18:08 now, use this trie construct a 'compression' of a datablob by incrementally hashing the blob 4-8 bytes at a time 13:19:20 to decompress you bruteforce the first 4-8 bytes by looking if a matching hash exists in the trie 13:20:15 then you bruteforce the next 4-8 bytes of the blob and check if there is an hash for the blob so far 13:20:25 and so on 13:21:26 until no more hashes are found present in the trie, or the expect length of the datablob is reached 14:02:31 isn't the end result worse than a full sha256 brute force? 14:03:16 by the end you've still brute-forced the entire thing, except with some added intermediate steps 14:03:31 maybe i don't understand it. i don't have a strong cryptography background 14:05:18 I've been trying all morning to make a pun with the words "difficult" and "Diffie cult" but haven't found a good one yet. 14:06:20 "Crypto is too difficult? Join our Diffie cult!" or something. 14:09:24 zy]x[yz: the analogy is like those combination locks on briefcases 14:10:42 zy]x[yz: if you can find the first digit by ten tries and next by ten tries and so on to the fifth then you have done 50 tries instead of 100000 14:22:54 ah, yeah, i see that now. my storing intermediate steps you've defeated the avalanche effect where information is normally lost 14:23:00 s/my/by/ 14:26:02 --- quit: dne (Remote host closed the connection) 14:28:29 --- join: dne (~dne@jaune.mayonnaise.net) joined #forth 14:54:16 --- join: PSnacks (~PSnacks@p200300CB2704ABFC803B515519F4E611.dip0.t-ipconnect.de) joined #forth 15:03:08 --- quit: Kumool (Quit: EXIT) 15:08:18 --- join: Kumool (~Khwerz@adsl-64-237-235-188.prtc.net) joined #forth 15:54:02 --- quit: dys (Ping timeout: 244 seconds) 16:11:14 proteusguy: the OS logo is split up into 4 (8 by 8) chunks https://github.com/siraben/zkeme80/blob/87edca4e52a516c465b5b36017e86b708b4cdb12/bootstrap-flash1.fs#L52 otherwise I just reused https://github.com/KnightOS/kernel/blob/master/src/01/font.asm 16:11:33 Wasn't planning on making my own, hehe 16:12:58 the icons you see in the menu buttons are drawn by me 16:15:30 --- nick: bhodgins -> FatalNIX 16:26:46 Looks like Forth made the front page of HN again https://news.ycombinator.com/item?id=18885493 16:35:49 First comment is always someone complaining about how they can't understand bad code and applying that to the entirety of forth 16:38:52 Or they didn't have a book, blah-blah 16:41:15 WilhelmVonWeiner: I always get the urge with those twerps to put up something from Obfuscated C and complain that C is unreadable. 16:42:55 Any language is unreadable in the hands of a bad programmer 16:43:42 something I have noticed with many C inspired programming languages programmers is that what they consider a step is quite huge granularity wise. 16:45:28 About the only reason I really liked forth in the Long-Ago - which always peeved others - was the blockfile size.. It enforces decomposition. 16:46:00 \ 16:46:59 lets take an example: in C arr[idx] is thought as single 'step' but in Forth it is ( idx arr -- ) >R getArrItemSize * R> + @ 16:47:48 I've seen something like *x[foo++] before 16:47:48 you must mean idx[arr] 16:48:04 siraben: so? 16:48:36 PoppaVic: same difference, but you see what I am getting at 16:48:39 PoppaVic: it made me loathe trying to work with low level memory stuff like that, until I found Forth 16:48:54 @ and ! are really nice notations 16:49:00 Zarutian: I suspect you mean 'operation' perhaps when you say 'step'. 16:49:32 siraben: I get along fine with C - just keep the standard-whores away from me. I do like forth tinkering 16:49:37 PoppaVic: nope, I mean 'step' in the sense of unit of the programmers thinking. 16:50:06 Zarutian: oh, hell - yeah.. ##C has some funky term for that nowadays - always made me want to slap someone. 16:50:15 ?? points 16:50:27 something-points.. damn.. I can't recall it 16:50:56 Zarutian: I just think of what I am trying to reach/grab/stuff. 16:51:18 Maybe I'm partially to blame for the bad overview of Forth `: G ( R: tgt --) here r> r> swap >r dup >r - 1 cells / r> ! ;` 16:51:21 so what many C programmers do is do that full Forth sequence every time 16:51:39 instead of say making arr@ and arr! 16:52:02 Whatever floats their boat. 16:52:45 WilhelmVonWeiner: yeah, I figure yer the posterboy for "those needing to be beaten with a frozen salmon" 16:52:57 if you factor the array access into that you can actually spend two frontmost cells of the array as length and item size 16:53:23 WilhelmVonWeiner: let me guess, you have done a lot of mathematics 16:53:39 Zarutian: certainly there are multiple methodologies there, but folks have to learn somehow. 16:55:21 PoppaVic: yeah by reading Starting Forth and Thinking Forth and really think about what those two books say 16:56:13 I've even told C/php/ruby/perl/whatever folks about "thinking".. THey see "Forth", sneer, and go back to their trash 16:58:32 another thing I have noticed is that people with hands on electronics background are more likely to like Forth than various Algol68 syntaxed languages 16:59:37 probably they have written MCU code in assembly for various archs 17:00:13 (why? Because C/C++ compilers STILL produce crap code when targetting MCUs) 17:00:25 --- join: TheCephalopod (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 17:00:45 --- quit: john_cephalopoda (Disconnected by services) 17:00:47 --- nick: TheCephalopod -> john_cephalopoda 17:01:02 s/probably they/probably because they/ 17:02:08 Zarutian: lol, I'm just bad at coming up with names. 17:02:27 Well, if you are writing a small program for a "fat" mcu, go for it - get 'er doone... But, yeah: looking at the .S file makes you want to scream 17:02:34 WilhelmVonWeiner: oh, one of the hard problems of compsci, naming things. 17:02:57 PoppaVic: It's code to store the counted pattern matches in the started of a CREATEd data structure 17:03:25 WilhelmVonWeiner: seriously - too ugly and obtuse for me to care. 17:03:42 Don't know a better way to do it. Never bothered to make sata structures before, 17:04:15 x/sata/ c/data/ 17:05:08 PoppaVic: yeah, specially when one is targetting an MCU with 32KiBiInstr of Program memory but the compiler complains that it has run out of target-memory. 17:06:16 PoppaVic: turns out that the static text strings for the LCD display are copyed into wram before being sent out. 17:07:39 PoppaVic: meanwhile most assemblers just keep them in program memory and put in an accessor routine. (Gimme nth char of str x basically) 17:08:21 --- join: rdrop-exit (~markwilli@112.201.166.158) joined #forth 17:08:25 Yeah, some of the logic gcc used for the atmel stuff makes me want to hurt them. 17:08:44 happily, I found the 'naked' attribute and a few other stupidities 17:10:10 Zarutian: it's also irksome because a keystone facet of C has always been "never copy data if you can help it". So, accessing it from wherever it lives is almost always "better". 17:11:51 or the time when the compiler 'optimized' away the call to fast_memcopy() because it thought it had no effect when in fact it was setting up various special regs and initializing global variables that followed 17:12:22 it was a keystone facet of C, now it is "cache locality trumps all! YOLO!" 17:17:06 I have started to consider the first memory device that a cpu instruction fetch hits to be the program memory and same with load/stores to be the work memory 17:17:36 what most people call main memory nowdays I just look at as fast ramdisk 17:34:22 --- join: dave0 (~dave0@193.060.dsl.syd.iprimus.net.au) joined #forth 17:34:28 --- join: tabemann (~tabemann@h193.235.138.40.static.ip.windstream.net) joined #forth 17:34:48 hi 17:35:06 hey 17:35:54 I should implement MARKER for hashforth, now that I've moved much of the functionality for wordlist out of the core 17:36:34 *wordlists 17:44:02 Forth would be a great teaching language 17:44:33 What better way to teach how computers work than the entire system, top down? 17:45:28 At first I didn't like how Forth was devoid of safety checks, and that forced me to write code that was testable, modular and simple. 17:45:30 your assignments over the course of a semester would be to build a fully functional, multitasking forth implementation 17:45:54 How would I do multitasking on a Z80? 17:46:06 I have coroutines, I suppose 17:46:10 the simplest way is cooperative multitasking 17:46:15 each task gets its own stacks 17:46:15 Yeah 17:46:22 and they use PAUSE to switch tasks 17:46:35 you could switch entire register banks, too 17:46:43 The Z80 has shadow registers 17:47:00 I'm not currently using them for anything, but they're used to handle interrupts 17:47:26 all you really need are SP@, SP!, RP@, and RP! 17:48:23 saving and loading TOS-in-a-register would be handled by those already 18:12:28 --- quit: tabemann (Ping timeout: 250 seconds) 18:19:01 --- quit: PSnacks (Ping timeout: 250 seconds) 18:30:35 While on a real or FPGA-based stack machine, you could have built-in support for a small fixed number of cooperative tasks by having dedicating a pair of hardware stacks to each, and using a task selection register to switch between them. 18:33:41 e.g. on a stack machine with support for two tasks, the task selection register would be a single bit. 18:35:44 --- join: tabemann (~tabemann@2602:30a:c0d3:1890:7d04:1e92:6395:7db) joined #forth 18:35:54 Each stack would have its on bank of ip, sp, rp registers (optionally an extra rp for exceptions) 18:36:14 Or.... you could buy a 2nd processor! 18:36:31 or... Add more pixie-dust! 18:40:47 or go the Parallax Propeller route 18:44:34 PoppaVic: FPGAs are pixie-dust! :) 18:44:46 yeah, 18:45:53 My OS takes around 13.5 seconds (real time) to compile for the first time and then 0.424 seconds (real time) for subsequent recompiles 18:45:53 Well assuming only changes in the Forth layer 18:47:25 --- join: PSnacks (~PSnacks@p508BC31E.dip0.t-ipconnect.de) joined #forth 18:49:25 i was reading this on wikipedia https://en.wikipedia.org/wiki/Lua_(programming_language)#C_API it has an interesting way to interface with C... it uses a stack to call and return values to a C function.. very forthy 18:50:25 it's how C used to do it - slowly - before they usurped registers. 18:50:46 oh! 18:50:58 brb gotta do laundry 18:51:14 I feel for you 19:02:13 BTW, they now make a version of the 8-core Parallax Propeller with Forth in ROM 19:02:49 Parallax P2X8C4M64P 8-core 32-bit Realtime controller with Forth in ROM 19:07:15 There's some videos on the Parallax Youtube channel of them receiving the first test batch of chips 19:20:58 https://www.youtube.com/watch?v=x7-gGOBnk68&t=2094s 19:26:23 back 19:42:47 question 19:42:58 does MARKER typically reset the states of the stacks? 19:50:36 --- quit: dddddd (Remote host closed the connection) 19:51:00 tabemann: I don't believe ao 19:52:04 does it only reset the dictionaries and wordlists? 19:52:12 and the user space 19:53:24 IIRC, LAST and DP 19:53:55 More depending on the internal structure of your Forth 19:55:10 On a VM-based Forth you could just save and restore the VM image 19:55:18 yeah, my MARKER resets the dictionaries, wordlists, wordlist order, LATESTXT, and user space pointer 20:00:46 On a VM you can save a snapshot of the dictionary to disk and reload it later, taking care to shutdown any IO. 20:03:34 --- quit: PSnacks (Read error: Connection reset by peer) 20:04:00 --- join: PSnacks (~PSnacks@p200300CB272FF3FC18381BC7823A490C.dip0.t-ipconnect.de) joined #forth 20:06:06 except that hashforth is IO limited, to avoid encoding IO in the set of opcodes 20:06:13 it only has terminal IO 20:06:48 but yes 20:07:14 it would be easy to take a snapshot of hashforth's state and save it to disk 20:21:26 yes - marker seems to work 20:25:29 I need a better way of doing this 20:26:10 loading programs which aren't in assembled images into hashforth literally requires piping/redirecting in the code from elsewhere, and then no other user input is possible 20:40:59 hmm 20:42:00 --- join: gravicappa (~gravicapp@h109-187-2-216.dyn.bashtel.ru) joined #forth 20:43:49 On my umbilical host I store the source code in blocks. 20:44:38 The blocks are part of the VM image. 20:45:31 They all reside above a certain address: STORAGE 20:45:38 : block ( blk# -- a ) k STORAGE + ;inline 20:47:15 the thing is for me I'm regularly rebuilding my image, so I don't want to save code in the image itself that isn't getting rebuilt 20:47:26 maybe I can build forth code into the image 20:47:39 alongside the VM assembly code built into the image 20:52:15 When I lauch the VM executable, the VM loads a bin file from disk that contains everything. 20:52:39 * launch 20:55:25 Gotta walk the dogs, catch you all later 20:55:46 --- quit: rdrop-exit (Quit: Lost terminal) 21:23:15 --- quit: proteusguy (Remote host closed the connection) 23:59:59 --- log: ended forth/19.01.11