2023-12-08 00:21:10 well today was pretty much a colossal failure 2023-12-08 00:22:19 wrote a bunch of code, spent a lot of time scratching my head, in the end decided this approach is all wrong and deleted most of it 2023-12-08 01:06:05 anyone tried running forth on an esp32? 2023-12-08 02:30:44 I'll be working on getting one of mine running on this esp32 thing in the near future: https://www.tindie.com/products/lilygo/lilygo-ttgo-vga-v14-controller/ 2023-12-08 02:57:19 Wow - that's an awfully neat looking little gadget. 2023-12-08 03:04:18 It's pretty nice. Very compact. I hooked it up to a couple of LCD VGA displays from various years (oldest being about 12 years, newest was purchased about six months ago) and the demo firmware displayed correctly on all of them. 2023-12-08 03:04:37 How does one develop on it? 2023-12-08 03:04:44 I need to get a ps/2 keyboard & mouse before I can really do much with porting my stuff to it. 2023-12-08 03:04:50 What's it take to "tool up"? 2023-12-08 03:06:51 there's a C toolchain readily available; I'm going to be looking for assembly resources 2023-12-08 03:08:37 https://dl.espressif.com/github_assets/espressif/xtensa-isa-doc/releases/download/latest/Xtensa.pdf has some notes on the ISA 2023-12-08 04:42:05 you can also write for them in the arduino IDE - though i think that sticks a RTOS somewhere in there 2023-12-08 04:42:14 or some sort of additional code at any rate 2023-12-08 04:42:34 crc, assembly eh? interesting. 2023-12-08 05:50:47 Assembly makes writing a "best Forth" easier. You get to decide what the registers do, and they do it without any compiler code mucking about behind your back. 2023-12-08 05:51:34 I looked at the esp32 docs; it has 16 registers, which is just enough for the stuff I do with them. 2023-12-08 10:33:05 I think eforth works in esp32 2023-12-08 10:35:27 there's a lot of interest im svfig 2023-12-08 10:40:20 also some of the newer esp32s are not xtensa 2023-12-08 13:24:44 I'm not really worried about the "best forth" part; my forth runs on a virtual machine, so I just need to implement that. 2023-12-08 19:04:58 So, what exactly characterizes a funnel shifter? My wild guess is that it somehow achieves an arbitrary shift by concatenating power-of-two bit count shifts based on the bits of the count specification? 2023-12-08 19:05:34 I.e., it has the hardware connections to do any 2^n shift, but not arbitrary n shifts? 2023-12-08 19:05:55 That does seem like a reasonable middle ground between single bit shift and barrel shifting. 2023-12-08 19:08:52 Ah, I found some info on them here: 2023-12-08 19:08:53 http://people.ee.duke.edu/~jmorizio/ece261/classlectures/arithcircuits2.pdf 2023-12-08 19:09:10 And my wild guess looks totally wrong. 2023-12-08 19:12:50 So, is there perhaps a C library that gives you a routine that will take from you a string representing an x86_64 assembly language instruction, and will return to you an array of bytes for the encoding of that instruction? 2023-12-08 19:13:18 That seems like something that ought to exist. 2023-12-08 19:18:07 maybe something in capstone or somesuch? 2023-12-08 19:19:16 Looks like maybe there is: 2023-12-08 19:19:18 https://intelxed.github.io/ref-manual/ 2023-12-08 19:20:15 Doesn't look like it works exactly as I described, but it seems to do the basic job. 2023-12-08 19:20:50 also, unfortunately not written in C (but if you're linking to a library who cares if it's written in C++): https://asmjit.com/ 2023-12-08 19:20:53 Anyway, this C emulator/generator I've talked about - at some point I'm going to need to add the actual vm implementation to the image. 2023-12-08 19:21:04 And it seems like a tool like this could help with that (for x86 targets). 2023-12-08 19:21:13 C++ can be annoying to compile and annoying to link to 2023-12-08 19:21:15 Thanks. 2023-12-08 19:22:17 thrigh: it's possible to make compiling and linking to code written in C terrible too 2023-12-08 19:22:22 thrig* 2023-12-08 19:23:39 sure, but it's easier to get "special" compile times and unusable symbols from C++ 2023-12-08 19:24:01 fair enough 2023-12-08 19:26:08 and I've seen a bunch more "there's no compiler for that yet" due to C++23 or whatever than for folks using too-modern C 2023-12-08 22:23:09 what do you guys like for max column width when writing forth? 2023-12-08 22:24:06 i know classic worth was 64 columns. when i write c i try to target 80. thinking of splitting the difference and restricting myself to 72 2023-12-08 22:34:55 something less than the 80 the terminals are set to, anyways 2023-12-08 23:17:01 40 chars 2023-12-08 23:33:23 I usually limit myself to 64 chars max, but start to squirm a little if a defition get longer than 45 characters or so. 2023-12-08 23:33:49 I use the shortest names I can, though, so if you're a longer name person that would probably come in more like 64. 2023-12-08 23:34:27 I lived in the "block = 16 64-char lines" world long enough to get it kind of burned in. 2023-12-08 23:34:27 orthodoxy from other programmers is to wrap at 120 or even more columns for modern languages 2023-12-08 23:34:46 I despise wrapped lines for program source.