00:00:00 --- log: started forth/20.04.01 00:21:27 --- join: webchat9 joined #forth 00:21:52 hello, how to define a word that skips input ;till the end of file ? (comment till end of file) 00:37:56 --- join: xek joined #forth 01:19:34 Welcome webchat9. By refactoring the word that imports from a file? 01:43:44 --- join: rdrop-exit joined #forth 01:45:38 webchat9, in most Forth's QUIT will bring you back to the outer interpreter loop 01:45:54 * Forths 02:05:31 nice, thanks 02:06:47 my pleasure 02:18:12 --- quit: webchat9 (Remote host closed the connection) 02:19:35 --- join: webchat9 joined #forth 02:19:53 https://pastebin.com/bTzLaSVa Now I want to make something like "nested comments" . THat code is buggy but it's not obvious where the bug is. I tried to use swiftforth's "Single-step debugger" https://www.forth.com/swiftforth/ but it doesn't work (it's either a demo version limtiation or I didn't do it well.. I evaluated [DEBUG : 2X DUP + 02:19:54 ; DEBUG] 4 DEBUG 2X \ didn't work ) . Also installed vfx forth but no idea how to debug with it. I'm thinking of reading 4th's debug.4th ( breakpoint debugger ) lib and try to implement it in the forth I'm using (win32 spf-forth ) . any suggestion? 02:26:00 https://pastebin.com/LLXa9XGy (* anything *) \ gives memory exception 02:31:37 --- join: klys joined #forth 02:34:47 --- quit: WickedShell (Remote host closed the connection) 02:35:12 true nestable comments are not trivial, they require keeping track of the nesting level 02:50:26 --- quit: cartwright (Ping timeout: 240 seconds) 02:50:57 --- quit: rprimus (Ping timeout: 256 seconds) 02:51:05 --- join: rprimus joined #forth 02:54:01 --- join: cartwright joined #forth 03:09:44 --- join: dave0 joined #forth 03:11:18 ATM I use ""[if]"" for nested comments for a lack of a better one. 03:12:35 I use blocks so the issue doesn't really come up 03:26:48 how to define a word that silences all the text output from already defined words? 03:33:10 depends on the Forth, if your Forth has a vectored emit, revector emit 04:00:23 --- quit: rdrop-exit (Ping timeout: 265 seconds) 04:02:49 --- join: rdrop-exit joined #forth 04:43:13 --- quit: Zarutian_HTC (Read error: Connection reset by peer) 04:43:44 --- join: Zarutian_HTC joined #forth 04:56:24 --- quit: rdrop-exit (Ping timeout: 256 seconds) 05:01:15 --- join: rdrop-exit joined #forth 05:16:19 --- quit: webchat9 (Ping timeout: 240 seconds) 05:18:17 --- join: dddddd joined #forth 05:19:06 --- quit: iyzsong (Quit: ZNC 1.7.1 - https://znc.in) 05:35:21 --- quit: rdrop-exit (Quit: Lost terminal) 06:18:17 --- quit: jpsamaroo (Quit: ZNC 1.7.4 - https://znc.in) 06:18:27 --- join: jpsamaroo joined #forth 06:30:24 --- join: ryke joined #forth 06:33:57 --- quit: mtsd (Ping timeout: 240 seconds) 06:35:10 --- join: webchat9 joined #forth 07:00:33 --- quit: ryke (Quit: ryke) 07:24:46 --- quit: cartwright (Ping timeout: 240 seconds) 07:26:48 --- quit: tabemann (Ping timeout: 240 seconds) 07:28:19 using QUIT as comment-til-eof is not good (in my case) because I use a loop to repeatedly load a sourcefile. If the sourcefile has QUIT then the loop will also quit 07:28:41 any solution / idea ? 07:28:59 --- join: cartwright joined #forth 07:32:44 : \z 0 PARSE 2DROP ; IMMEDIATE \ tried this but doens't work well 07:35:07 --- nick: DKordic -> S-Jack 07:56:05 --- quit: dave0 (Quit: dave's not here) 08:05:27 ah, windows encoding problems; forgot that spf wants winows style line endings 08:37:34 : \z BEGIN 0 PARSE 2DROP REFILL NOT UNTIL ; \ this one seems to work well 09:52:01 --- join: actuallybatman joined #forth 10:31:06 --- quit: jpsamaroo (Remote host closed the connection) 10:39:34 * Zarutian_HTC reads about new Huawei phones having ""USA"" chips in them and wonders when country-siloing goes the way of the divine rights of kings. 11:06:47 --- quit: Zarutian_HTC (Ping timeout: 256 seconds) 11:12:35 --- join: Zarutian_HTC joined #forth 11:13:59 --- join: john_cephalopoda joined #forth 11:14:00 Hi 11:14:58 hi 11:15:03 g'day 11:18:10 I found some pretty neat collection of Forth-related stuff at https://users.ece.cmu.edu/~koopman/stack.html 11:18:33 Like a copy of the RTX2010 processor handbook and similar. 11:20:10 * Zarutian_HTC recalls J1 verilog core exist at https://excamera.com/sphinx/fpga-j1.html 12:23:35 --- quit: john_cephalopoda (Remote host closed the connection) 12:24:01 --- join: john_cephalopoda joined #forth 12:36:42 --- quit: djinni (Quit: Leaving) 12:39:28 --- join: djinni joined #forth 12:49:57 --- quit: webchat9 (Ping timeout: 240 seconds) 13:01:01 I got an Arduino Uno lying around. Any recommendations for a nice AVR-8 Forth? 13:01:25 amforth ? 13:01:41 eforth ? 13:01:59 flashforth ? 13:13:03 Hmm... 13:17:40 --- quit: xek (Ping timeout: 265 seconds) 13:40:12 --- quit: actuallybatman (Ping timeout: 264 seconds) 14:05:21 --- quit: john_cephalopoda (Read error: Connection reset by peer) 14:05:34 --- join: john_cephalopoda joined #forth 14:12:02 --- quit: john_cephalopoda (Ping timeout: 250 seconds) 14:12:37 --- join: john_cephalopoda joined #forth 14:16:22 --- quit: gravicappa (Ping timeout: 250 seconds) 14:20:20 --- join: WickedShell joined #forth 14:36:55 --- join: actuallybatman joined #forth 14:43:48 --- quit: john_cephalopoda (Ping timeout: 264 seconds) 14:45:21 --- join: cox joined #forth 14:45:34 --- join: john_cephalopoda joined #forth 14:50:33 Installation seems a bit tricky for all of them. Welp. 14:51:05 maybe it's the avr bit that makes it hard ? 14:51:34 someone working with AVR? 14:53:22 I have actually tried writing an AVR assembler in a Forth dialect before, but their opcode encoding is all over the place. 14:53:50 i HAVE written an avr assesmbler in forth :) 14:53:54 oh 14:54:18 this is mark4 btw, i created a new account on my laptop to do all the work in for the company im working for right now 14:54:21 cox communications 14:54:42 and i found avr encoding to be quite nice :) 14:55:35 --- nick: cox -> mark4 14:56:32 "0001 11rd dddd rrrr" where r and d are registers... Lots of bit shuffling. 14:57:12 There are some common patterns, but I didn't really have the time to generalize them. 14:58:19 yes i had a word to split bits apart within a byte so you could turn 00001111 into 11000011 or put any number of bits any number of bits higher up :) 14:59:23 Oh, that's a neat idea. 14:59:55 http://dpaste.com/0TAFMNH 15:00:02 I've written an x86 assembler, which went way smoother. It's not trivial, but they avoid shuffling bits around. 15:00:02 thats my never released avr forth assemblker 15:00:04 assembler 15:00:28 http://dpaste.com/1SFPB8X 15:00:41 and thats the definition file for the 32u4 15:00:53 create a definition file for ANY device and that assembler should work 15:01:00 and its NOT bass ackwards 15:01:13 the asm is normal asm looking not forth ish 15:01:45 --- quit: crc (Ping timeout: 260 seconds) 15:01:52 So you write "r10 r11 adc"? 15:01:59 no 15:02:03 Uuh, "adc r10 r11" 15:02:04 adc r10, r11 15:02:11 the COMMA is needed for the destination register 15:02:19 thats what tells me its the D reg not the S reg 15:02:39 also a local label facility 15:03:02 L0: through L9: define local lables and L0 through L9 reference them 15:03:13 you can reference locals across definitions or turn that off if you dont like it 15:03:32 false !> glocals \ turn global locals off 15:03:36 or off> glocals :) 15:03:38 --- join: dzho_ joined #forth 15:03:38 --- join: veltas_ joined #forth 15:04:15 --- join: crc joined #forth 15:04:34 mark4: That sounds cool. How do you resolve forward references? Two-pass? One-pass with backpatching? 15:04:43 ONE pass 15:05:23 well. you define a coded definition between code foo and end-code a check is done at end-code to make sure there are no undefined forwards i think 15:05:31 yea 15:05:47 oh >L0 >L9 are FORWARD reference to a local 15:06:01 so you can literally define L0 through L9 multiple times in the same definition 15:06:07 beq L0 15:06:10 bne >L0 15:06:26 first is a branch back to L0: second is a branch forward to L0: 15:06:44 Here's some x86 assembler that I wrote in the RETRO Forth dialect: https://cuttle.space/tmp/rasc.html 15:06:58 --- quit: jn__ (Ping timeout: 272 seconds) 15:07:07 oooh 32 bit! 15:07:24 x4 never had an assembler :( 15:07:42 It is single-pass with backpatching. Not very advanced, but I can create executables with it. 15:07:49 thats what i do 15:07:53 i PREFER not very advanced 15:08:13 i need an assembler for x4 written in the x4 dialect of forth 15:08:25 x4 is now 20 years old omg 15:08:30 --- quit: diginet2 (*.net *.split) 15:08:30 --- quit: dzho (*.net *.split) 15:08:31 --- quit: veltas (*.net *.split) 15:08:32 and still no meta compilation 15:09:57 Let me upload some example code for the assembler. 15:10:11 https://cuttle.space/tmp/print.html 15:10:42 look in my sources at the definiton and explanation for the word asm> its forth black magic :) 15:12:54 --- quit: Zarutian_HTC (Read error: Connection reset by peer) 15:13:14 --- join: Zarutian_HTC joined #forth 15:14:17 --- join: [1]MrMobius joined #forth 15:14:29 --- quit: MrMobius (Ping timeout: 256 seconds) 15:14:35 --- nick: [1]MrMobius -> MrMobius 15:14:50 does retro have a rep word? 15:14:50 Hah, it really is :D 15:14:57 10 rep foo 15:15:17 run the word foo 10 times 15:15:31 it really is what? 15:15:46 oh - black magic yea 15:15:46 It's called "times". 15:16:14 #10 [ foo bar baz ] times 15:16:38 It's relatively far from ANS Forth. 15:17:10 the ans forth standard does not describe the forth language but a language of the same name. i would however say the same of colorforth lol 15:18:00 A lot of things are done with prefixes. Numbers got the # prefix. You can also define own prefixes. Example (n:put is like ANS '.'): #10 #12 + n:put 15:18:21 Bbiab. 15:18:28 --- nick: dzho_ -> dzho 15:18:49 dzho were you the guy that emailed me from china wanting an avr forth? 15:19:09 mark4: no 15:26:16 --- quit: mark4 (Quit: Leaving) 15:31:14 --- join: diginet2 joined #forth 15:38:24 Getting late. Bye. 15:38:27 --- quit: john_cephalopoda (Quit: Leaving) 16:23:18 --- join: jedb_ joined #forth 16:26:24 --- quit: jedb (Ping timeout: 264 seconds) 16:34:48 --- join: dave0 joined #forth 17:31:49 --- join: tabemann joined #forth 18:49:43 --- quit: lonjil (Remote host closed the connection) 18:53:08 --- join: lonjil joined #forth 18:55:22 --- join: boru` joined #forth 18:55:25 --- quit: boru (Disconnected by services) 18:55:28 --- nick: boru` -> boru 19:00:11 --- quit: lonjil (Remote host closed the connection) 19:00:24 tpbsd: I got flash erasure working for zeptoforth on stm32f407 19:00:53 cool, 'll try it out 19:01:11 was it a drama ? 19:01:22 it was a stupid bug 19:01:30 arent most of them ? 19:01:33 yes 19:02:16 i think my ratio of stupid to real bugs is about 500:1 19:02:31 wait a second 19:02:36 I have to fix something 19:02:56 no problemo 19:12:00 --- join: lonjil joined #forth 19:17:30 --- quit: dave0 (Quit: dave's not here) 19:33:19 back 19:33:21 made my fix 19:33:33 cool 19:35:36 one key thing with cornerstones on the stm32f407 is don't use very many 19:35:53 because they are extremely expensive memory-usage-wise 19:36:00 i havent used any yet 19:36:20 because all of flash is divided up into just 12 sectors to erase 19:36:29 k 19:36:45 the first four sectors are 16K, the fifth sector is 64K, the rest are 128K 19:37:33 instead of all being 16k ? 19:37:40 I had to make the dictionary start at $8000 because otherwise flashing the whole dictionary would mean flashing the kernel 19:37:45 yes 19:37:49 ugh 19:38:11 whats it like in your L model ? 19:39:24 2K sectors 19:39:27 much nicer 19:39:51 definitely 19:40:18 so basically, don't use cornerstones except to enable erasing everything other than the core libraries 19:40:34 this was painful by the sounds, I should have just bought a L like you have 19:40:46 except I dont use the M4's 19:41:39 well it was nice just to motivate myself to work on a port of zeptoforth 19:42:23 good practice if it catches on 19:42:34 youll get asked for other versions 19:42:58 I might have to accumulate a stash of different boards 19:43:04 just tell em to mail you a board and youll work on it 19:43:15 lol 19:43:24 get the requester to send you a board, thats what people do 19:43:32 I sent matthias a F0 Disco 19:43:54 a board is nothing to pay for a Forth port 19:44:49 I can foresee the day someone wants an F0 port 19:45:14 once I told matthias a board was in the mail he created a port from the specs and emailed it to me before my board reached him and it worked first time 19:46:04 maybe, they may also want a NXP or a SAM port 19:46:16 there are cortex-m4's in everything 19:46:35 matthias wont do SAM becaus eteh flash blocks are too large 19:46:55 atmel 'samxxx" 19:46:57 erase blocks or write blocks? 19:47:06 write blocks I think 19:47:21 theyre pretty big 19:47:25 yeah, big write blocks would be intolerable 19:47:37 thats the problem with the SAM models 19:47:53 the f407 has the advantage of having really small write blocks (not even blocks per se) 19:48:28 but it's the erase blocks that are so large ? 19:48:38 yes 19:48:42 I rarely use cornerstones anyway 19:48:49 but that's less important 19:49:19 once words are tested I put them in flash 19:49:28 I develop in ram 20:09:40 tabemann, do you have a list of error messages you generate ? 20:10:05 ok 20:10:05 over action-sysick-start ! unable to parse: art 20:10:05 ok 20:10:05 -1 swap action-systick-delay ! sta ok 20:10:30 du schedule-curren @ unable to parse: du 20:10:44 3 pick action-systick-delay @ u>= or and stack underflow 20:11:45 oops hangon thats my fault I think 20:14:54 stupid error I loaded the files in the wrong order after automating it 20:15:25 all ok now :) 20:17:31 --- join: rdrop-exit joined #forth 20:40:50 --- join: Zarutian_HTC| joined #forth 20:40:50 --- quit: Zarutian_HTC (Read error: Connection reset by peer) 21:44:44 --- join: gravicappa joined #forth 21:55:54 --- join: webchat9 joined #forth 22:05:57 --- quit: dddddd (Ping timeout: 265 seconds) 22:57:14 --- join: aaaaaaaa joined #forth 23:01:12 --- quit: webchat9 (Ping timeout: 264 seconds) 23:25:09 --- join: mtsd joined #forth 23:34:13 --- join: jn__ joined #forth 23:56:16 --- quit: reepca (Read error: Connection reset by peer) 23:56:54 --- join: reepca joined #forth 23:59:59 --- log: ended forth/20.04.01