2021-06-17 00:33:37 how difficult is it to implement regex? 2021-06-17 00:34:41 not sure yet. I have some reference stuff printed out for review, but it 2021-06-17 00:34:59 it's not a high priority target 2021-06-17 00:36:07 yea that would be pretty low on my priorities untill i absolutely needed it :) 2021-06-17 00:36:16 i would do a BNF parser first :) 2021-06-17 00:36:21 ACTION likes bnf 2021-06-17 00:37:11 I don't use BNF, regex would be more useful to me 2021-06-17 00:59:25 BNF is a good way to describe a protocol but regex is good for searching 2021-06-17 00:59:53 maw 2021-06-17 01:26:07 mark4: BNF parser in Forth: https://github.com/siraben/meta-yacc 2021-06-17 01:45:13 I've never seen BNF used in a text editor 2021-06-17 02:24:22 @skeptics, if this isn't a hostile takeover, I don't know what universe you're living in now: http://techrights.org/wp-content/uploads/2021/06/fsf-channel-canceled.txt 2021-06-17 02:24:36 "2021-06-13 06:44:26 root sudo su", priceless 2021-06-17 02:25:02 crab: used in what capacity? 2021-06-17 03:38:23 mark4: (int16_t)0xFFFF is (as a signed value) -1, a negative value is converted to unsigned by taking it away from 1+MAX i.e. becomes 0xFFFFFFFF. Converting to larger signed it retain 2021-06-17 03:38:42 So if you want to not have weird stuff cast to uint16_t first 2021-06-17 03:39:10 In C really every use of signed numbers should be justified, there are many caveats and complications 2021-06-17 03:40:51 In C, when an integer argument shorter than int is passed, it gets promoted to int automatically. So printf (..., (int16_t)x) ends up being the same as printf (..., (int)x). 2021-06-17 04:31:03 Is REFILL meant to read one line into TIB every time it's called? 2021-06-17 04:48:58 Yes 2021-06-17 04:49:36 And it's worth pointing out most words don't use REFILL, if they parse something it needs to be on the same line 2021-06-17 04:49:55 If a word uses REFILL it should really be documented 2021-06-17 07:23:48 Yeah; the way I've always done it is INTERPRET just goes until it parses and executes NULL from the input buffer. I usually make TIB 256 bytes, but LOAD will use a block buffer instead, which is 4096 b 2021-06-17 07:25:04 I use QUERY (which uses EXPECT) to refill TIB. 2021-06-17 07:30:31 Eventually I'll integrate a command history functionality into Query - I had that on my last one but haven't done it yet on this one. 2021-06-17 07:32:19 Last time I had a fixed size buffer for that, but this time I think I want to let prior command lines accrue on disk, so the history will just grow until I reset it. I've found command history to be on 2021-06-17 07:35:29 Unrelated, but I find myself thinking about an ability to inline any word definition (either as marking that definition as inline, or only when compiling that word in), and also abil 2021-06-17 07:40:22 I think the best way to do inlining in a very simple forth is just using POSTPONE or whatever equivalent in the word and make it IMMEDIATE 2021-06-17 12:53:39 Hey, calculator guys. I've had my TI-84 sitting here for a while, and a month or two ago I downloaded the Forth app we discussed here. It looks like it runs "as an app" on the calculator so to speak. 2021-06-17 12:54:05 It would provide the primary keystroke processing and so forth, and have algorithms for the various functions, etc. etc. 2021-06-17 13:03:07 KipIngram, is that the one siraben made? I thought that replaced everything 2021-06-17 13:03:15 KipIngram: yes I have 2021-06-17 13:03:23 https://github.com/siraben/zkeme80 2021-06-17 13:03:44 however I never did complete the shell 2021-06-17 13:03:47 it boots, runs tests and has a simple menu at the home screen 2021-06-17 13:04:15 KipIngram, i was thinking this week about converting the HP-42 firmware to run on a TI-83 2021-06-17 13:04:44 i wont live to be 200 years old though so you could tackle that one since ill never have enough time :) 2021-06-17 13:07:13 -!- ChanServ changed mode/#forth -> +o ChanServ 2021-06-17 13:08:45 -!- ChanServ changed mode/#forth -> +o ChanServ 2021-06-17 13:10:17 (not that it would take you that long, i just have other stuff i wanna try to do first) 2021-06-17 13:28:45 -!- ChanServ changed mode/#forth -> +o ChanServ 2021-06-17 13:33:02 siraben, how do you get the really basic stuff like writing characters or reading buttons? 2021-06-17 13:36:30 without the ROM in place 2021-06-17 13:36:55 Oh, you've got the HP-42 firmware? 2021-06-17 13:37:06 You mean the 42S, or was there also a 42? 2021-06-17 13:37:11 I had a 42S for a while. 2021-06-17 13:37:34 I regarded it as a more powerful calculator than my 41 CV, but I "enjoyed" my 41 CV more. 2021-06-17 13:37:41 MrMobius: I can link to the asm source 2021-06-17 13:38:03 It's just interrupts 2021-06-17 13:38:25 or poll loops 2021-06-17 13:38:27 https://github.com/siraben/zkeme80/blob/master/src/keyboard.scm 2021-06-17 13:38:42 warning: mix of lisp and asm lol 2021-06-17 13:39:34 display routines: https://github.com/siraben/zkeme80/blob/master/src/display.scm 2021-06-17 13:43:49 The project is in maintenance mode". I still build it almost monthly to check everything still works, but I haven't written Z80 asm like I did two years ago 2021-06-17 14:08:58 siraben, right i just meant what was your strategy. i was wondering myself how to figure it out in a kosher way without copy and pasting any of the ROM 2021-06-17 14:09:05 KipIngram, only 42S 2021-06-17 14:09:38 MrMobius: what do you mean without copy pasting any of the ROM? 2021-06-17 14:09:54 this completely overwrites the flash chip with my OS 2021-06-17 14:10:18 there might be microcode in other modules but I wouldn't know about it, the calculator's boot process is dependent on flash contents 2021-06-17 14:10:20 siraben, if your firmware completely replaces the ROM, you cant jump into the ROM to read keys or write to the screen, so you have to figure out how to do it in your own code. how did you figure that out? 2021-06-17 14:10:49 MrMobius: yeah, you have to send raw bytes to the I/O ports 2021-06-17 14:10:58 I copied it from other open source projects: 2021-06-17 14:11:12 KipIngram, good point. i dont have the 42S ROM and I dont think it's online though I havent looked hard since I dont think im allowed to have it. the 48 ROM and a bunch of others are freeware now but HP d 2021-06-17 14:11:20 https://www.ticalc.org/archives/files/fileinfo/442/44227.html (an OS that boots to a smiley face) 2021-06-17 14:11:24 siraben, gotcha 2021-06-17 14:11:36 and some numerical routines from https://github.com/KnightOS/kernel 2021-06-17 14:12:13 KipIngram, there are instructions for having your 42 beam out its own rom to a 48 if you still have the 42 2021-06-17 14:12:48 that being said, TI-OS is OK in places but garbage in others 2021-06-17 14:13:06 e.g. their BASIC dialect is comically slow and inexpressive 2021-06-17 14:15:13 interesting 2021-06-17 14:15:35 ive wondered about how i would make my own BASIC for my calculator using a 6502 2021-06-17 14:15:50 i think you could do some small amount of opitmizing and speed things up some 2021-06-17 14:16:04 apparently the 68k TI calcs do some smart things 2021-06-17 14:16:29 yeah, I don't know if/when I'll need another scientific calculator other than the 84 2021-06-17 14:16:37 fun times while I had it 2021-06-17 14:17:48 Oh, I loved my 41CV. Fun times indeed. It's really where I first learned to program. 2021-06-17 14:18:50 So it's no wonder Forth appealed to me immediately - being as steeped in RPN as I was. 2021-06-17 14:51:16 I *finally* have the minimal non-libc dependent version of my VM working on openbsd :) 2021-06-17 14:52:13 gratz! 2021-06-17 14:52:21 that's no small feat. 2021-06-17 14:52:38 how do you handle something like a C FFI? 2021-06-17 14:53:13 no FFI yet 2021-06-17 14:53:45 interesting, how do you interface with the outside world. I hate that part. 2021-06-17 14:53:49 openbsd isn't very friendly to not using libc 2021-06-17 14:53:58 I've finally got it working with system calls 2021-06-17 14:54:21 oh so you just allow syscalls? 2021-06-17 14:56:10 maw 2021-06-17 15:07:08 imode: not exactly 2021-06-17 15:07:22 the vm in this case is using syscalls 2021-06-17 15:07:38 I can expose them to the Forth via a virtualized i/o model 2021-06-17 15:07:42 ahhhh. 2021-06-17 15:07:44 (in the rib 2021-06-17 15:07:53 yeah that seems to be the way to go.. virtualized I/O is how scheme does it. 2021-06-17 15:08:01 in the libc-backed version, I expose some of them 2021-06-17 15:08:19 all of my models use virtualized i/o devices 2021-06-17 15:08:29 it works out pretty well 2021-06-17 15:15:56 have a ti-83 and possibly an 82 as well 2021-06-17 15:16:33 seems to exist a forth for the 83 that can run as a 'flash app' 2021-06-17 15:17:15 not sure what that means, i assume it's not an overwrite of the os it already has 2021-06-17 17:03:54 Is anyone here familiar with https://forth.neocities.org/bootstrap/ and in particular, the macro DP in forth.c? I'm not really sure why it's used when printf() is used on it's own elsewhere 2021-06-17 17:05:59 used for enabling/disabling printf() for debugging 2021-06-17 17:07:27 just change the (0) to (1) or some other true value to compile in the printf() 2021-06-17 17:08:54 OH 2021-06-17 17:09:18 omg i feel so silly for not thinking "oh, debugging" 2021-06-17 17:14:49 thats very cool 2021-06-17 17:28:29 hi, does the maintainer of http://krue.net/avrforth/ happen frequent this channel? 2021-06-17 17:57:11 lispmacs[work]: not that I recall 2021-06-17 18:03:24 I don't see anything in a quick scan of my logs 2021-06-17 18:22:51 Maybe a dumb/obvious question but, when keeping the primitive count to a minimum, all the non-primitive words that are needed for the outer/text interpreter need to be "assembled" ri 2021-06-17 18:24:49 And by "assemble" I mean for an indirect threaded code something like "DW PAD, HLD, STORE" etc. 2021-06-17 18:26:22 neuro`: pretty much, yes 2021-06-17 18:27:34 well the core words needed by INTERPRET basically 2021-06-17 18:27:41 Right 2021-06-17 18:28:54 which could be quite small if you are willing to have a restrictive Forth dialect at the start 2021-06-17 18:40:53 This SOFTNET stuff would have benefitted from ideas in http://cap-lore.com/Economics/DSR/SilkSec.html or vice versa 2021-06-17 18:42:22 (see https://www.icg.isy.liu.se/publications/SOFTNET.pdf ) 2021-06-17 18:46:46 eyy someone noticed the SOFtNET stuff 2021-06-17 18:53:23 I think this is an intersection of Mobile Software Agents and networking 2021-06-17 18:54:12 stuff like AmbientTalk and SmartMessage might also be adjecent to this 2021-06-17 19:01:53 ( https://en.m.wikipedia.org/wiki/AmbientTalk and https://web.njit.edu/~borcea/papers/sm01.pdf ) 2021-06-17 19:03:11 re maw 2021-06-17 19:07:10 imode: enough reading material for you? ;-) 2021-06-17 19:08:05 maw dave0 2021-06-17 19:08:43 maw crc 2021-06-17 20:07:12 Zarutian_HTC: what the hell. 2021-06-17 20:07:19 Zarutian_HTC: I've been reading over that exact paper. 2021-06-17 20:07:41 which one? 2021-06-17 20:07:45 been messing with the concept of mobile agents applied to mobile forth code. 2021-06-17 20:07:51 "Smart Messages". 2021-06-17 20:08:19 oh, neat 2021-06-17 20:12:07 in that case I do encaurage you to read the SilkSec one, plus perhaps the entire contents of the DSR directory it is in 2021-06-17 20:13:21 mostly for the purposes of secure seperation & co-operation, and to prevent DoS due to over (ab)use 2021-06-17 20:14:59 will do. the latter can be accomplished by resource restrictions. 2021-06-17 20:15:26 the hardest part of mobile agent code is migrating the state of a program. smart messages are interesting. 2021-06-17 21:33:34 imode: smartmessage idea: encode the code part as an endpoint of a Delay&disruptionTolerantNetwirking bundle endpoint 2021-06-17 21:33:57 s/wirk/work/ 2021-06-17 21:38:02 my current view is wrapping up all of the state of a program into a quotation that can be ported around and evaluated to "unpack" it.