00:00:00 --- log: started forth/18.01.02 00:54:18 --- quit: bedah (Quit: quitting) 02:12:19 --- join: dys (~dys@2003:5b:203b:100:6af7:28ff:fe06:801) joined #forth 02:23:10 --- quit: dddddd (Remote host closed the connection) 03:35:06 --- join: ncv (~neceve@unaffiliated/neceve) joined #forth 04:00:55 --- join: gravicappa (~gravicapp@h62-133-162-9.dyn.bashtel.ru) joined #forth 04:07:05 --- join: proteus-guy (~proteus-g@184.22.249.226) joined #forth 05:59:53 --- join: lijero (~lijero@unaffiliated/lijero) joined #forth 06:05:50 yunfan: it looks interesting. I haven't actually played it yet, but spent some time looking over the docs. 06:07:26 yunfan: it'd be feasible to do a 16-bit ngaro + retro11 image on it, except for the time limit (20ms is not much, even less so when emulating another processor). 06:10:25 crc: which game is this, please? 06:10:44 Zarutian_PI: https://muchassemblyrequired.com/ 06:12:59 thanks 06:13:02 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 06:55:15 crc: actually i mean we could make a similar game using your nagro vm :D 06:55:45 crc: i dont think that guys's platform is performance for massive players 06:58:27 ah dangit I meant to have a look at that during my time off and forgot 07:04:17 is nga ngaro? 07:04:23 http://forthworks.com/nga 07:04:49 oh nope. just needed to read the page to answer my own question. :) 07:05:15 tangentstorm: mo; it's a newer vm that I'm using now 07:07:08 crc: talking about VMs, I found DCPU-16's HW or I/O interface quite neat as it supports cheap discoverability and extensibility. 08:01:28 --- quit: jedb_ (Ping timeout: 248 seconds) 10:17:06 --- quit: ncv (Ping timeout: 252 seconds) 10:48:38 --- quit: dys (Ping timeout: 250 seconds) 11:47:28 --- quit: gravicappa (Ping timeout: 252 seconds) 12:06:31 --- quit: proteus-guy (Ping timeout: 255 seconds) 12:06:55 --- join: proteus-guy (~proteus-g@2405:9800:bc10:1ca:b0db:9a:249a:a5af) joined #forth 14:12:43 Anyone feel like teaching a newbie some forth? I'm a newbie and I want some help learning how to do it right 14:13:55 I'm working on a "connect four" game and i'd like some guidance (some help knowing where I'm doing stuff right & wrong). Here's the code https://github.com/jsalzbergedu/helloforth/blob/master/hello.f 14:25:14 if you exposed the address of the array directly (or if you're willing to use "0 board" to get the base address) you could replace your reset-board with just ": reset-board 0 board 45 cells erase ;" which looks pretty nice. Also, I'm not sure why you have 45 cells in your board array - 7 columns and 6 rows should mean 42 cells, right? 14:27:06 also, recall that your array starts at 0, so for an array of size 45, the highest element should be 44. However in reset-board, your loop goes until just before 46 - that is, to 45, so a cell past the last element gets set to 0 also, which could cause problems. 14:32:59 I like the amount of comments 14:36:35 in veiw-row (obligatory comment about the inconsistent spelling of view...) note that "tuck" is equivalent to "swap over". So line 47 is equivalent to "i swap swap over get-i-j". 14:40:27 reepca: tyvm! 14:46:16 also, I think there's a bug in veiw-row. The "board @" in line 48 shouldn't be there - get-i-j gets you the value at (i, j), which seems to be what you want, but then you do "board @", so the only values you're actually going to be seeing are the ones for the first 3 cells, since the only possible values at (i, j) should be 0, 1, and 2. 14:52:32 note that instead of hardcoding 120, 111, etc, you can put "[char] x", "[char] o" etc. In gforth you could further simplify it to 'x' and 'o', but that uses recognizers which complicate the syntax a bit. 14:54:18 --- join: jedb (~jedb@2605:80:19:2::5e) joined #forth 14:55:23 also, you could replace zero-branch, one-branch, and two-branch with a short-and-sweet lookup table. "create >visual-table 32 c, char x c, char o c, : >visual >visual-table + c@ ; 15:09:51 When you do something like 1 chars allot, does that allocate space for 1 char or for 2? 15:10:10 1. 15:25:27 also, with board-chars, you've got the length mixed up: a 192 long string has a highest-index of 191, not the other way around. The length we give the array is the length of the string, not the highest-index. The highest-index is never really explicitly used, we just use it when reasoning about whether loop bounds should be inclusive/exclusive (with a do loop it's exclusive, so you always stop before the length of the string. So a with 15:25:27 a string of length 20, a do loop will go up to and finish the loop with i = 19, and then stop without i ever being 20). 15:33:28 your back-two is often referred to as -rot, though it's not technically in the standard. 15:34:34 and the common way of implementing it I've seen is as : -rot rot rot ; 15:42:32 also, ! writes a full cell, while c! only writes one character. Depending on the endianness of the system, using ! in chain-char might be an obvious problem or a non-obvious problem, but a problem either way. 15:52:31 also, chain-char can be written a bit more simply if we wait until after storing to increment. : chain-char over board-chars c! 1+ ; 16:13:49 another "swap tuck" => "swap swap over" => "over" in 173 16:27:09 also, won't the 0th row get written twice (causing you to write past the end of board-chars) in board-to-char-array? 16:41:13 I think you could save yourself a lot of trouble if instead of making a string containing the entire board you had print-board just directly print it. 16:50:58 --- join: cheater (~cheater@unaffiliated/cheater) joined #forth 16:54:06 hi 17:06:01 o/ 17:51:02 --- quit: karswell_ (Read error: Connection reset by peer) 19:09:04 --- join: Gromboli (~Gromboli@static-72-88-80-103.bflony.fios.verizon.net) joined #forth 19:10:14 --- quit: jcob (Ping timeout: 256 seconds) 19:41:12 --- quit: dddddd (Remote host closed the connection) 20:08:52 --- join: dys (~dys@tmo-113-120.customers.d1-online.com) joined #forth 20:46:47 --- quit: proteus-guy (Remote host closed the connection) 20:59:56 --- quit: lijero (Remote host closed the connection) 21:16:08 reepca: are there any forth made russian blocks game? 21:16:37 no clue, what do you mean by "russian blocks"? 21:18:30 reepca: well i might use the wrong name, but isnt that the most popular game ever in handheld device 21:19:11 reepca: you play with blocks , they drop by time and when the fit a line in horizon, the whole line will dispear and you get credits point 21:19:16 ahh, tetris. 21:19:53 yes, sorry for the wrong name 21:20:06 I think I remember hearing about someone implementing that in forth, but I can't remember who or where, sorry. 21:20:18 no worry 21:21:03 a quick search does reveal this though: http://compgroups.net/comp.lang.forth/i-wrote-tetris-for-my-forth-os/1258777 21:22:42 forth os , oops 21:30:24 --- quit: APic (Ping timeout: 250 seconds) 21:40:02 --- join: APic (apic@apic.name) joined #forth 22:01:20 --- quit: Gromboli (Quit: Leaving) 22:17:25 --- join: gravicappa (~gravicapp@h62-133-162-75.dyn.bashtel.ru) joined #forth 22:27:02 --- join: nighty- (~nighty@s229123.ppp.asahi-net.or.jp) joined #forth 23:46:00 --- quit: dys (Ping timeout: 248 seconds) 23:59:59 --- log: ended forth/18.01.02