00:00:00 --- log: started forth/18.12.27 00:21:09 siraben: What architecture? 00:21:27 ttmrichter: Z80, TI-84+ calculator 00:26:08 Ah. 00:26:20 So the Flash in question is serial Flash? 00:26:56 What do you mean by that? 00:33:25 it's the flash, the fastest ram alive :-) 00:41:10 siraben: How do you access the Flash? Is it part of the Z80 or is it external? 00:41:19 ttmrichter: Oh it's external 00:41:25 If external, do you access it with parallel or serial interface? 00:41:31 Through ports http://wikiti.brandonw.net/index.php?title=83Plus:Ports:06 and http://wikiti.brandonw.net/index.php?title=83Plus:Ports:04 00:41:38 It's a little tricky, hm. 00:42:48 Oh. They're using the parallel memory bus and some kind of paging scheme? Fun. 00:46:57 --- quit: pierpal (Ping timeout: 250 seconds) 00:56:42 ttmrichter: current status https://github.com/siraben/zkeme80 00:57:00 I had to write my own assembler too because current ones weren't satisfying my needs 00:57:18 you can see the GIF and screenshot there 01:02:08 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 01:17:25 Ah, by reading port 6 documentation I found a way to load in a flash page to address 0x4000 to 0x7fff 01:19:24 --- quit: pierpal (Ping timeout: 250 seconds) 01:34:21 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 01:39:08 --- quit: pierpal (Ping timeout: 268 seconds) 01:45:03 Perfect. Another 16384 bytes to play with! 01:47:42 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 02:03:16 --- quit: ashirase (Ping timeout: 246 seconds) 02:09:10 --- join: ashirase (~ashirase@modemcable098.166-22-96.mc.videotron.ca) joined #forth 02:12:29 --- quit: pierpal (Read error: Connection reset by peer) 02:13:06 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 02:17:59 --- quit: pierpal (Ping timeout: 268 seconds) 02:18:41 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 03:02:51 --- join: [1]MrMobius (~default@c-73-134-82-217.hsd1.va.comcast.net) joined #forth 03:05:50 --- quit: MrMobius (Ping timeout: 245 seconds) 03:05:50 --- nick: [1]MrMobius -> MrMobius 03:10:02 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 04:14:14 --- join: xek (~xek@apn-37-248-138-80.dynamic.gprs.plus.pl) joined #forth 04:54:35 That sure is a lot of bytes, because I now can incorporate the ANS test suite (with some non-standard modifications) https://github.com/siraben/zkeme80/blob/011ac94c0bff601569290ba96f24f521f40ad307/bootstrap-flash1.fs#L302 05:00:23 siraben: I've never seen use of IMMEDIATE like that. 05:00:32 Like where? 05:00:48 : IMMEDIATE ; 05:01:09 Ah I should change it, because it's from jonesforth, another implementation 05:01:11 Not standard, too. 05:01:38 Oh, I see. Does it act the same as regular IMMEDIATE then? 05:02:18 IMMEDIATE is not immediate, by the standard 05:02:27 Ok I fixed it locally, will push later 05:02:37 Yeah it's the same as IMMEDIATE otherwise 05:07:37 I took a quick look at Jonesforth once, don't recall why but I found it very odd. 05:08:08 Maybe it's too non standard 05:08:27 It was the first Forth I read, and I'm trying to get back to "standardness" 05:10:13 I don't mind non-standardness at all, I think some of the design decisions seemed odd. 05:11:18 Could you give an example? 05:11:28 I found the semantics of KEY quite odd 05:15:20 Unfortunately, I don't remember the details, I didn't spend much time looking it over. 05:16:22 Hm should I consider adding signed numbers? 05:18:07 It's a calculator, are you going to be doing much maths? 05:20:15 Not really, is it hard to implement signed numbers? 05:21:27 Maybe much later I'll implement the IEEE 754 floating point standard 05:24:57 You mean signed integer multiplication and division? 05:25:38 Yeah 05:25:47 How essential is it anyway? 05:26:39 Depends on your application needs. 05:27:27 "Good Forth minimizes the number of conditional statements. The minimum is zero. I can say `: 5X X X X X X ; : 20X 5X 5X 5X 5X ;` This is just as good as a loop." 05:27:30 LOL 05:27:41 I need to make a webpage of Chuck Quotes 05:29:29 5 times X 05:29:56 Personally I find the smudge bit to be a nuisance 05:30:12 I don't use one 05:30:24 Smudge bit? 05:31:08 Smudge bit makes the word visible or invisible 05:31:52 Ah, the "flag" 05:31:54 Before you've defined a word it has the smudge bit set, so it can't call itself and a redefinition can all the old version 05:31:59 *call 05:32:01 It's from FIG-Forth 05:32:05 Right 05:32:38 Writing assembly was a huge PITA, it's a relief to be able to move quickly with Forth again 05:32:52 Oh I bet 05:33:17 Trying to figure out how to implement 2OVER for the Z80 05:33:47 I've never felt sold on 2OVER 05:34:12 Yeah, when do you need to use it? 05:35:02 when you have `a b c d` and you want `a b c d b` but you get `a` anyway 05:37:21 2OVER is useful when you're dealing with doubles, woudn't really be needed on a 64 bit system for example. 05:37:56 But could come in handy on a smaller bitwidth system. 05:38:06 ah yeah, that makes sense 05:38:10 thanks for enlightening me 05:38:38 :) 05:41:45 rdrop-exit: Yeah, kind of like mine. 05:42:08 For these stack words I'd really like to generate them instead of writing them 05:42:59 You could do what eForth does 05:43:14 What does eForth do? 05:44:04 I did an experiment a while back with arbitrary stack permutations using only r> >r and swap https://paste.debian.net/plain/1057584 05:44:05 Write them at first in high-level Forth, only rewrite them in assembly later when you need the speed up 05:44:24 Ah, I see. 05:44:52 It's what makes eForth easy to port, IIRC only 31 primitives 05:45:37 I can't seem to find a link, hm. 05:46:21 You can port it quickly to a new platform by implementing the 31 primitives in assembly, or directly in machine code. Then take your time rewriting the rest once your Forth is already up. 05:47:12 Do you have a link to it? 05:47:30 How does it deal with endianess, 16 vs 32 vs 64 bit, etc? 05:48:58 just a sec 05:51:21 It doesn't seem like C.H. Ting maintained his URL 05:52:56 Try the internet archive? 05:53:03 append web.archive.org/web/ in front 05:53:39 ok checking 05:56:36 I remember Ting having a more recent website 05:56:40 Can't seem to find it 05:57:11 I found it, brb 05:58:53 Huh why does ( A comment)1234 evaluate to nothing according to the standard? 05:59:11 T{ ( A comment)1234 -> }T 05:59:12 T{ : pc1 ( A comment)1234 ; pc1 -> 1234 }T 05:59:15 This is the last snapshot I could find of C.H. Ting's site 05:59:19 http://web.archive.org/web/20150416005144/http://offete.com:80/ 05:59:58 Huh doesn't seem to link to a download 06:00:11 But eForth is very common, I think many people have ported it to different architectures, probably some on Github 06:01:09 Not sure if I should make ( standard conforming 06:01:22 http://www.exemark.com/FORTH.htm 06:01:49 7. eForth, It's Ting's book on it 06:01:52 one of many perhaps 06:02:32 The overview PDF: http://www.exemark.com/FORTH/eForthOverviewv5.pdf 06:04:07 Here's a Z80 version: https://github.com/lispnik/eforth/blob/master/z80efort/READ.ME 06:05:49 The standard is brain damaged 06:07:04 rdrop-exit: oh wow 06:07:14 Thanks for the Z80 link 06:07:22 Yeah some parts of the standard are stupid 06:08:52 The input part of my Forths is non-standard, I use word at a time execution, similar in spirit to LaForth. 06:09:47 I've taken the approach of having a word which is the "handler". So it could be arbitrary code reading from the keyboard via a prompt, via a string etc. 06:11:24 I don't wait for a carriage return, I execute each word as it comes in. 06:12:15 instead of waiting for a linefull of input. 06:16:48 Is memory address alignment important for the Z80? 06:16:59 I think words that read ahead like VARIABLE and CREATE are anti the spirit of Forth 06:17:21 like, parsing for a token 06:17:38 then so are WORD 06:17:54 Doubt it 06:18:35 this would also kill S" and " and ( and... 06:18:56 Yeah, it's why I like Retro. 06:19:02 * PoppaVic facepalms... 06:19:17 I don't see why you'd facepalm a reasonable statement 06:20:07 `'This_is_a_string s:put` is equivalent to `S" This is a string" TYPE` without S" reading ahead 06:20:34 There always has to be some reading ahead 06:22:07 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 06:26:42 I think you can get away without it. 06:26:59 Impossible 06:28:29 I don't think ColorForth reads ahead. 06:29:15 Colorforth has an editing environment built-in 06:29:28 I don't think RetroForth reads ahead. 06:29:48 Oh, I see what you mean. 06:30:17 That's not really what I'm thinking of by reading ahead, you mean like, parsing an input file or block? 06:31:28 Take the example you gave, how does 'this_is_a_string work? 06:32:39 The parser reads the string ` 'this_is_a_string `, checks the first character for the prefix ` ' `, and then uses the word ` prefix:' ` to interpret the remaining string (`this_is_a_string`) as a string and act accordingly 06:34:39 ok, and how does prefix: now where the string ends? 06:35:07 * PoppaVic chuckles 06:35:08 : GI5 BEGIN DUP 2 > WHILE DUP 5 < WHILE DUP 1+ REPEAT 123 ELSE 345 THEN ; 06:35:13 The standard says 1 GI5 -> 1 345 06:35:18 but I get 123 257 06:35:21 Can anyone reproduce? 06:35:40 It's a zero-terminated string iirc 06:36:23 It's weirdly nested too 06:36:30 Not from the keyboard it isn't 06:36:48 rdrop-exit: can you reproduce that? 06:36:48 I don't see your point. 06:38:42 I mean the parser reads the current space-delimited word and then stores it as a zero-terminated string, if prefixed with the char ' 06:39:45 The point is that you don't know the end of an input string until you've reached it, same as with any other method 06:40:14 "look ahead" 06:40:15 I'm thinking of "parsing the current token" as "reading ahead" 06:40:21 The dogs are acting up, have to walk them. Will catch up later. Nice chatting. 06:40:27 I'm thinking of "VARIABLE POINT" as reading ahead 06:40:36 because the parser looks at the enxt word in the input stream 06:47:27 --- quit: Zarutian (Read error: Connection reset by peer) 06:47:52 --- join: Zarutian (~zarutian@173-133-17-89.fiber.hringdu.is) joined #forth 06:51:27 in the standard retro builds, parsing ahead will only work for code entered via the keyboard, and only under the rre and repl interfaces 06:52:17 what do you define as parsing ahead? 06:52:30 variable foo 06:52:35 https://bpaste.net/raw/f1fec2a5c50a 06:53:00 Assembly written in Forth and the disassembly of the genereated executable. 06:53:02 didn't know you can do that in Retro. 06:53:56 Works with 'retro -i' and 'retro-repl', but only for code entered via the keyboard 06:54:48 :variable s:get var ; ? 06:55:02 yes 06:56:24 makes sense, again not really what I'm thinking of as reading ahead though. Maybe I should've said "prefix words" or something. 06:57:23 --- join: Kumool (~Khwerz@adsl-64-237-235-60.prtc.net) joined #forth 07:21:39 I'm quite content not having words that read ahead. Makes things a bit more consistent overall. 07:25:38 --- quit: X-Scale (Quit: HydraIRC -> http://www.hydrairc.com <- Now with extra fish!) 07:38:02 --- quit: Kumool (Ping timeout: 268 seconds) 07:58:52 --- join: Kumool (~Khwerz@adsl-64-237-233-61.prtc.net) joined #forth 08:07:12 --- quit: Kumool (Ping timeout: 244 seconds) 08:19:25 --- join: dys (~dys@tmo-121-107.customers.d1-online.com) joined #forth 08:19:34 --- join: Kumool (~Khwerz@adsl-64-237-239-141.prtc.net) joined #forth 08:22:18 --- quit: rdrop-exit (Quit: Lost terminal) 08:22:57 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 08:33:32 --- quit: Kumool (Ping timeout: 268 seconds) 08:34:55 --- join: Kumool (~Khwerz@adsl-64-237-236-74.prtc.net) joined #forth 10:39:36 --- log: started forth/18.12.27 10:39:36 --- join: clog (~nef@bespin.org) joined #forth 10:39:36 --- topic: 'Forth Programming | logged by clog at http://bit.ly/91toWN | If you have two (or more) stacks and speak RPN then you're welcome here! | https://github.com/mark4th' 10:39:36 --- topic: set by proteusguy!~proteus-g@cm-134-196-84-89.revip18.asianet.co.th on [Sun Mar 18 08:48:16 2018] 10:39:36 --- names: list (clog pierpal dys Zarutian dddddd xek MrMobius ashirase john_cephalopoda libertas DKordic the_cuckoo PoppaVic corecode moony APic djinni cheater tabemann dave9 reepca +KipIngram jedb_ jhei nighty- rprimus zy]x[yz malyn izabera nerfur ovf lonjil FatalNIX nonlinear irsol jn__ catern phadthai WilhelmVonWeiner pointfree sigjuice siraben @crc carc rann jackdaniel Guest13462 jimt[m] pointfree[m] bb010g Lord_Nightmare amuck rpcope ttmrichter cratuki dne diginet2) 10:39:36 --- names: list (lchvdlch mstevens ecraven +bluekelp vxe yunfan C-Keen newcup dzho koisoke) 10:48:37 --- join: Kumool (~Khwerz@adsl-64-237-232-202.prtc.net) joined #forth 10:55:47 --- quit: Kumool (Ping timeout: 250 seconds) 11:02:57 --- join: Kumool (~Khwerz@adsl-64-237-236-246.prtc.net) joined #forth 11:08:02 --- quit: Kumool (Ping timeout: 244 seconds) 11:10:59 john_cephalopoda: looks good so far. 11:20:26 --- join: tbemann (~androirc@mobile-166-170-221-143.mycingular.net) joined #forth 11:28:19 crc: Thanks! 11:28:34 Have you tried running what I coded yet? :p 11:29:37 --- join: Kumool (~Khwerz@adsl-64-237-239-122.prtc.net) joined #forth 12:06:19 --- quit: dys (Ping timeout: 246 seconds) 12:14:36 --- quit: tbemann (Ping timeout: 250 seconds) 12:57:02 not yet; I don't have an ANS forth on any of my primary boxes to test with 13:21:27 : OP_RND DUP FF AND 4 AND !VX ; \ chosen by fair dice roll. Guaranteed to be random. 13:22:08 CAn't be bothered to setup rand as of now, so I'm slipping in a classic programmer joke 13:31:08 --- quit: pierpal (Ping timeout: 246 seconds) 13:39:49 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 13:54:55 --- quit: pierpal (Ping timeout: 244 seconds) 13:57:10 WilhelmVonWeiner: Maybe open /dev/urandom if available and get some from there? ;) 14:03:24 --- join: dave0 (~dave0@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 14:03:46 hi 14:04:25 Hi dave0. 14:04:40 hi DKordic 14:05:26 john_cephalopoda: `4` is multiplatform :^) 14:13:15 crc: re the latest version of nga (with 'devices'): you expected to have more than 32 distinct instructions? if no then you could have packed six per 32 bit cell. Beats me what you would do with the two bits left over though. 14:13:32 I was talking to him about this a while ago 14:14:09 Packing instructions doesn't seem to save much because a lot of the time, at least 2 instructions per word end up being NOP 14:15:47 so better off with each cell above 32 in value being a call to that address then? 14:29:45 doesnt bother me in the slightest though 14:30:57 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 14:31:43 --- quit: pierpal (Read error: Connection reset by peer) 14:41:18 --- join: dys` (~dys@tmo-098-145.customers.d1-online.com) joined #forth 14:58:02 Zarutian: I don't plan to add any additional instructions 15:07:55 --- quit: Kumool (Ping timeout: 245 seconds) 15:16:11 --- quit: dys` (Ping timeout: 250 seconds) 15:16:41 It might be interesting to allow for using 2 bits to indicate a call, with a 30 bit address in the rest of the cell 15:17:21 you could use 1 bit for that 15:17:45 I won't be attempting this in the foreseeable future; too many other projects already under way 15:18:35 WilhelmVonWeiner: true. I could use the other for a 'lit' 15:19:15 Then you'd only be able to push 30 bit ints. 15:19:39 use the regular lit if you need additional range 15:20:20 this would mostly help with code density around calls. 15:21:18 might be better to use one bit for call, one for ccall, and both for jump, within a 30-bit range 15:21:51 * crc makes some notes for future explorations 16:12:52 --- nick: jedb_ -> jedb 16:19:29 --- quit: john_cephalopoda (Ping timeout: 250 seconds) 16:21:20 --- join: john_cephalopoda (~john@unaffiliated/john-cephalopoda/x-6407167) joined #forth 16:27:01 --- join: learning_ (~learning@4.35.154.131) joined #forth 16:42:41 --- quit: learning_ (Remote host closed the connection) 16:48:32 --- join: learning_ (~learning@4.35.154.131) joined #forth 16:49:01 --- quit: learning_ (Read error: Connection reset by peer) 16:49:58 --- join: learning_ (~learning@4.35.154.131) joined #forth 16:50:25 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 16:56:25 --- join: xek_ (~xek@apn-37-248-138-80.dynamic.gprs.plus.pl) joined #forth 16:56:49 --- quit: xek (Ping timeout: 240 seconds) 16:59:31 --- join: xek (~xek@apn-31-0-23-80.dynamic.gprs.plus.pl) joined #forth 17:01:15 --- quit: xek_ (Ping timeout: 245 seconds) 17:06:00 --- join: xek_ (~xek@apn-37-248-138-80.dynamic.gprs.plus.pl) joined #forth 17:06:23 --- quit: xek (Ping timeout: 246 seconds) 17:31:58 --- quit: learning_ (Remote host closed the connection) 17:56:35 --- quit: dddddd (Remote host closed the connection) 17:59:10 Yay, just got coroutines to work. 18:00:23 http://paste.debian.net/plain/1057723 18:01:03 Should get something like http://imgur.com/suTf288l.png 18:11:49 hey 18:21:00 --- join: learning_ (~learning@4.35.154.131) joined #forth 18:44:48 --- quit: dave0 (Quit: dave's not here) 18:49:53 --- quit: learning_ (Remote host closed the connection) 19:18:21 hi tabemann 19:31:09 --- join: proteusguy (~proteus-g@49.230.15.251) joined #forth 19:31:09 --- mode: ChanServ set +v proteusguy 19:32:46 siraben: looks good 19:44:45 crc: d:words but no d:see ? 19:46:55 * Zarutian is trying to figgure out how file:exists? unix:popen and unix:pclose work. Or more plainly how the nga device for those is 19:49:50 crc: btw some of the documentation in retro/doc is out of date 19:56:06 Working on the documentation update for the next release (January) 19:56:49 no d:see, there is a disassembler in the examples (doesn't new I/o instructions yet) 19:58:21 --- join: rdrop-exit (~markwilli@112.201.164.82) joined #forth 20:00:06 file:exists? Takes a string with the file name, returns true (-1) if it exists, or false (0) if it does not 20:00:16 crc: I am looking at your latest tar ball 20:00:29 crc: yeah, I am curious how it is implemented 20:00:37 The 2018.8 release, or the nightly snapshot? 20:01:46 it has RETRO12_2018-12-21_161442_14e53637a8 directory inside it 20:02:01 so probably latest snapshot I guess 20:04:15 Ok, so file:exists? is defined in interfaces/io_filesystem.forth 20:04:18 :file:exists? (s-f) 20:04:18 file:R file:open dup n:-zero? 20:04:18 [ file:close TRUE ] 20:04:18 [ drop FALSE ] choose ; 20:05:35 right, so file:open returns a zero handle if the file doesnt exists? 20:05:44 Yes 20:06:45 The others are in interfaces/io_unix_syscalls.c with wrappers in interfaces/io_unix_syscalls.forth 20:07:40 * Zarutian takes a look 20:07:58 The unix:popen and unix:pclose are in lines 50-102 20:08:45 Basically modeled after the file:open C part, but using the unix functions popen() and pclose() 20:09:44 iirc, once opened, the normal file words operate on the piped process as if it were a standard file 20:09:48 hmm... I could use that to talk to netcat to get tcp socket functionality 20:14:45 --- quit: xek_ (Ping timeout: 250 seconds) 20:22:55 I 20:23:16 I've not used the unix: words very much 20:23:26 posix, methinks 20:24:01 --- quit: proteusguy (Ping timeout: 246 seconds) 20:25:07 PoppaVic: pretty much 20:36:50 --- join: proteusguy (~proteus-g@49.230.15.251) joined #forth 20:36:50 --- mode: ChanServ set +v proteusguy 20:38:38 --- join: dave0 (~dave0@47.44-27-211.dynamic.dsl.syd.iprimus.net.au) joined #forth 20:39:28 re 20:43:06 https://forthworks.com/share/ce8c1008b502674366f4d3b724105011 is an updated autopsy w/support for the new i/o instructions and a few bug fixes. The diassembler in it is the closest thing I currently have to a 'see' word. 21:26:12 back 21:26:14 hey guys 21:38:24 --- join: dys (~dys@tmo-102-118.customers.d1-online.com) joined #forth 21:53:58 --- quit: jedb (Ping timeout: 250 seconds) 21:55:16 --- join: jedb (~jedb@199.66.90.113) joined #forth 22:35:21 --- quit: pierpal (Quit: Poof) 22:35:40 --- join: pierpal (~pierpal@95.239.223.85) joined #forth 22:48:01 Hello Forthwrights :) 22:49:43 hi rdrop-exit 22:50:11 Hi jn__ 23:59:59 --- log: ended forth/18.12.27