--- Log opened Mon May 29 00:00:26 2017 |
00:12 | <~Vornicus> | are you harfing my buzz |
00:13 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
00:14 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code |
00:14 | | mode/#code [+o Reiv] by ChanServ |
00:20 | <@celticminstrel> | Hrh. |
00:20 | <@celticminstrel> | ^Heh |
00:40 | | RchrdB [RchrdB@Nightstar-8hs1fe.cable.virginm.net] has joined #code |
01:29 | | himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has joined #code |
01:29 | | mode/#code [+o himi] by ChanServ |
02:29 | <&ToxicFrog> | I think I'm going to end up implementing my own Forth in C at this rate @.@ |
02:29 | <@celticminstrel> | ? |
02:30 | <@himi> | Deliberately? |
02:30 | <&ToxicFrog> | Well, I want to run Forth on Arduino |
02:30 | <~Vornicus> | go forth and forthinate |
02:30 | <&ToxicFrog> | But all of the existing implementations have...issues |
02:30 | <@himi> | Ah |
02:30 | <&ToxicFrog> | FlashForth doesn't actually boot on it (at least, not the provided binaries, I haven't tried building it from source yet) |
02:31 | <&ToxicFrog> | The three-instruction forth assumes you have a forth on the host that understands how to assemble for the target |
02:31 | <&ToxicFrog> | YAFFA saves everything in RAM rather than EEPROM, so by the time the core dictionary is loaded you have like 100 bytes left over for both stacks *and* any user-defined words |
02:32 | <~Vornicus> | yaffa cakes |
02:33 | <&ToxicFrog> | And with the exception of YAFFA everything is implemented in asm for a different but hopefully equivalent Atmel chip |
02:34 | <~Vornicus> | how much ram does an arduino have anyway |
02:34 | <&ToxicFrog> | Depends on the board |
02:35 | <&ToxicFrog> | But this one has 2k RAM, 16k EEPROM |
02:35 | <~Vornicus> | That is ... three orders of magnitude less than I had assumed. |
02:35 | <&McMartin> | I don't think it's a coincidence interest in hobbyist retrocoding is up |
02:35 | < Mahal> | there's (three?) varieties of Arduino, IIRC |
02:36 | <&ToxicFrog> | (waaaay more than three) |
02:36 | < Mahal> | I'm only familiar with three hardware models, then :) |
02:36 | < Mahal> | by "familiar" read "used to copilot discussing three", but those might be his pet models |
02:37 | <&ToxicFrog> | (wikipedia says 17, but of course it's open source, and there's a huge number of arduino-compatible variants made by other orgs) |
02:37 | < Mahal> | Of course |
02:38 | <&ToxicFrog> | AFAIK pretty much all of them are based on the ATMega or ATTiny microcontrollers, though |
02:40 | < ion> | All the microcontroller boards I have that are "arduino compatable" are some kind of ARM variant, but at least half of them work with the arduino IDE via some existing project |
02:45 | <@himi> | Almost all Arduinos are 2k RAM and 16 or 32k EEPROM - the other differences are clock speed and voltage and the like |
02:46 | <@himi> | And all (aside from the much bigger ones) are either ATMega16 or ATMega32 based |
02:46 | <&ToxicFrog> | Sorry, I kept saying EEPROM when I meant to say flash. I'm not sure what the practical distinction is. |
02:47 | <@himi> | The differences are all basically external - the whole point of an Arduino is to pull a decent number of the pins from the chip out and into a format which lets you put them on a breadboard or similar |
02:57 | <&McMartin> | On a slightly different note: TF, have you worked with FORTH before? I've only poked at syntaxes before invariably concluding that I should be using something else... |
02:57 | <&McMartin> | ... but that "something else" has always been asm, so my criteria are clearly a bit weird there |
02:59 | <~Vornicus> | I never used forth but I have used postscript. it was refreshingly strange, especially as I started to actually use stack manipulation directly |
04:20 | | Jessikat` is now known as Jessikat |
04:40 | | RchrdB [RchrdB@Nightstar-8hs1fe.cable.virginm.net] has quit [[NS] Quit: Leaving] |
04:52 | | Jessikat [Jessikat@Nightstar-evf2i5.dab.02.net] has quit [[NS] Quit: Bye] |
05:06 | | himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds] |
06:11 | | celticminstrel is now known as celmin|sleep |
06:53 | | Kindamoody[zZz] is now known as Kindamoody |
07:05 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code |
07:05 | | mode/#code [+o himi] by ChanServ |
10:29 | | Kindamoody is now known as Kindamoody|afk |
10:57 | <~Vornicus> | https://gitlab.com/esr/open-adventure |
10:57 | <~Vornicus> | attn: McMartin |
11:07 | <&McMartin> | I guess it's OK he did that, but the lineage of that code is quite long at this point and I have a preferred edition anyway~ |
11:08 | <&McMartin> | (Graham Nelson's Inform 6 port, which properly simulates a number of the weirder mechanics in a better way than others) |
11:08 | <&McMartin> | (Mostly involving a certain emerald the size of a plover's egg) |
11:10 | <&McMartin> | ISTR that the original original sources were found in someone's attic in tape form years back |
11:11 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
11:24 | <&ToxicFrog> | McMartin: I haven't, but I enjoyed postscript a lot and want to learn forth, and since it's well suited for microcontrollers this seemed like a good way to do it |
11:24 | <&ToxicFrog> | What I have ended up with instead is design notes towards a forthoid written in C that supports anonymous functions~ |
11:32 | <&McMartin> | Heh |
11:32 | <&McMartin> | Forth saw a lot of use as a self-hosting HLL on the old microcomputers. |
11:32 | <&McMartin> | Starflight was written in Forth. |
11:34 | | * ToxicFrog nods |
11:34 | <&ToxicFrog> | I've heard it described as "the ultimate low-level language" on the grounds of its tininess, flexibility, and ease of bootstrapping |
11:35 | <&ToxicFrog> | I suspect what I'm going to end up with is something that only vaguely resembles ANSI Forth but is still a Forth in spirit. |
11:36 | <&McMartin> | When I was poking at HLLs for C64 I came across descriptions of easily a dozen Forths, most of which included special library words for commanding the hardware. |
11:38 | | * ToxicFrog nods |
11:39 | <&ToxicFrog> | IIRC, ANS Forth mandates (equivalents of) peek, poke, memset, and a few others |
11:39 | <&McMartin> | A couple of Cs, too, but that had some excitement when self-hosting because PETSCII does not have curly brases |
11:49 | <&McMartin> | *braces |
11:52 | <&McMartin> | What's your actual use case for the chip/board itself? |
12:56 | <&ToxicFrog> | McMartin: I don't have one, which is a problem; I'm hoping inspiration will strike by the time I have the forth working. My "test project" is just going to be a dial-controlled tone generator. |
13:03 | <&McMartin> | Literally why I own no Atmel systems >_> |
14:11 | <&ToxicFrog> | Heh. |
14:12 | <&ToxicFrog> | I have this as a side effect of some other stuff; I needed a nice wood case I could fill with switches and LEDs for Alex and the easiest way to get one in the right form factor was to get it with an arduino in it |
14:12 | <&ToxicFrog> | But it seems like I should be able to do *something* interesting with it. |
15:31 | <&ToxicFrog> | I think I just had an insight |
15:31 | <&ToxicFrog> | I was wondering how the stack works considering that stack entries are variable-length |
15:32 | <&ToxicFrog> | Like, a typical forth will have (at least) char, machineword, and pointer types |
15:32 | <&ToxicFrog> | And of course the answer is "chaos reigns" |
15:32 | <&ToxicFrog> | A function that takes two ints and pushes a char will pop the top (sizeof(int)*2) bytes from the stack and push one byte |
15:33 | <&ToxicFrog> | If those bytes did not in fact represent two ints TOO BAD |
15:36 | <&ToxicFrog> | ...except that can't possibly be correct, because there are stack-manipulation functions like dup. |
15:36 | <&ToxicFrog> | Hrm. |
15:38 | <&ToxicFrog> | Oh, ahahahahaha |
15:38 | <&ToxicFrog> | There are separate functions for manipulating wide values |
15:39 | <&ToxicFrog> | Like, there's a one-cell (16bit) and two-cell (32bit) number representation, but there's a restricted subset of functions capable of operating on two-cell numbers, starting with 2 (e.g. 2dup) or D (e.g. d+) |
15:41 | <&ToxicFrog> | This also means that printing the stack is, effectively, impossible |
15:41 | <&ToxicFrog> | Since you have no idea how to interpret the contents of each stack slot, and only upper or lower bounds on how many distinct values (as opposed to how many bytes of data) are actually on the stack. |
17:43 | | celmin|sleep [celticminst@Nightstar-qsoi6k.dsl.bell.ca] has quit [Ping timeout: 121 seconds] |
17:45 | | celticminstrel [celticminst@Nightstar-jb792f.dsl.bell.ca] has joined #code |
17:45 | | mode/#code [+o celticminstrel] by ChanServ |
18:49 | | * ToxicFrog implements addition, print, peek, and poke: |
18:49 | <&ToxicFrog> | ] 1 2 + . 0 ? |
18:49 | <&ToxicFrog> | 3 |
18:49 | <&ToxicFrog> | make: *** [Makefile:13: run] Segmentation fault |
18:49 | <&ToxicFrog> | Of course, since this is running on amd64, trying to peek 0 is illegal~ |
18:51 | | * jeroud is busy writing a compiler for one of the few things on coursera that is still useful. |
18:53 | <&jeroud> | http://www.nand2tetris.org |
18:54 | | * abudhabi buys a dozen rubber duckies. |
18:57 | <&jeroud> | The intermediate VM language (between the native machine language and the "high level" Java-ish thing you (mostly) write actual programs in) is a pretty straightforward stack-based thing. |
18:57 | <&jeroud> | Rather more verbose than a Forth, but somewhat simpler. |
20:13 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
20:13 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
20:40 | | Kindamoody|afk is now known as Kindamoody |
23:54 | | Kindamoody is now known as Kindamoody[zZz] |
--- Log closed Tue May 30 00:00:28 2017 |