2024-05-09 01:46:32 always nice to read 'newer' old stuff https://users.ece.cmu.edu/~koopman/forth/hopl.html 2024-05-09 01:49:26 and a long list of other fun reads https://www.forth.org/tutorials.html 2024-05-09 03:52:30 i'm thinking of doing something. can't decide whether i like it or not. 2024-05-09 03:55:21 instead of each file creating its own private vocabulary for words it doesn't want to leak, and then unlinking the private vocab word at the end, i'm thinking of having a single vocabulary in the forth vocabulary called "local", and then load will manipulate it so that it's empty at the start of each file and then restored to its previous value after the end of the file 2024-05-09 03:56:55 so then any file can just do "also local definitions" and create words there willy nilly and they're automatically made unreachable before load returns 2024-05-09 03:59:02 things like this, though. it's hard to know where the line should be between "clear and explicit" versus "convenient and magic" 2024-05-09 05:36:18 might have to dig up the old and dated dsp board for the NeXT cube and get this to work. https://forth.org/library/eforth_SOC/eforth_SOC_source/eForth1/EFORTH56.ZIP 2024-05-09 05:36:23 that would be a hoot. 2024-05-09 05:36:41 haven't booted the cube I kept in decades/ 2024-05-09 06:32:18 Wow, that's an oldie for sure. 2024-05-09 06:32:41 I've got a couple of super old laptops lying around, but nothing so novel as a NeXT cube. 2024-05-09 09:51:27 I like HOPL papers 2024-05-09 09:51:40 Lua's got a great one 2024-05-09 10:16:27 That HOPL article on Forth is very succinct, a good overview/perspective 2024-05-09 10:40:04 Am I the only one who looked at DataView in JavaScript and said "this is just a pointer"? 2024-05-09 15:17:29 no, similar thoughts :) 2024-05-09 15:43:50 By similar you mean you saw how pointers worked in C and thought "this is just a DataView"? :P 2024-05-09 15:45:01 There's a usecase for Forth on the web, potentially, as an IDE that can be sent to anyone in a few packets assuming a small wasm-based implementation 2024-05-09 15:45:38 I think that's how I get my foot in the door anyway, not sure what use is to be had in that direction, but it's a start 2024-05-09 15:46:31 WAForth isn't too small, but it does look like quite a performant implementation. I don't know if that's what they intended but apparently it's comparable to gforth on some archs 2024-05-09 15:47:08 wasm... maybe chromium can run that, with some special flags set, maybe? 2024-05-09 15:47:19 There's an advantage for Forth here that generating good wasm *might* be easier than most normal architectures 2024-05-09 15:48:18 https://developer.mozilla.org/en-US/docs/WebAssembly#browser_compatibility 2024-05-09 15:57:33 wasm just uses a stack and does the register assignment for you so that probably helps 2024-05-09 15:59:28 The difficulty is the stack usage seems to be fixed size for a function, so I don't really see how best to leverage it 2024-05-09 15:59:50 I think WAForth just kept a stack pointer as argument to every function and ignored this problem 2024-05-09 15:59:59 And yet it's still quite performant 2024-05-09 16:00:14 So I might be overcomplicating it in my head 2024-05-09 16:02:31 https://flak.tedunangst.com/post/on-building-jpeg-xl-for-wasm 2024-05-09 16:09:37 What's the relevance? 2024-05-09 16:13:18 I was trying to discover how supported wasm is on openbsd these days. Mostly seeing a lot of "nope" "not gonna try" etc 2024-05-09 16:21:03 I see the browsers you can run on OpenBSD have wasm, or are we talking about building C to wasm? 2024-05-09 16:21:35 I'm not too interested in building C to wasm myself 2024-05-09 16:22:29 browsers are down in the kusoge class, similar to Windows in terms of bloat, unusability, and security issues 2024-05-09 16:26:24 Sunk cost though if I'm thinking about web applications 2024-05-09 16:26:47 I certainly wouldn't jump to this for all problems, or any problem actually :) 2024-05-09 16:28:57 I'm definitely working on an answer in search of a problem 2024-05-09 16:30:25 I see web browsers as the 'rich terminal' class of applications, compare with e.g. xterm that mostly 'just' displays coloured text and is notoriously complicated/bloated 2024-05-09 16:31:39 I think rich terminal applications are effective for some work, I wonder how much we could simplify them. Probably a lot! The web has a lot of baggage and grossness. 2024-05-09 16:35:30 There was a thing on Hackernews the other day about TUIs 2024-05-09 16:35:46 https://news.ycombinator.com/item?id=40273177 2024-05-09 16:35:52 "Ask HN: Interesting TUIs (text user interfaces), maybe forgotten ones?" 2024-05-09 16:36:34 I thought the Acme editor from Plan 9 was quite interesting https://research.swtch.com/acme 2024-05-09 16:38:15 It's partly inspired byt the Oberon system 2024-05-09 16:39:01 irssi here, in tmux; to the right is vi, in tmux, below that is less, in tmux 2024-05-09 16:39:37 and now below here, a w3m, in tmux, to some "orange" site link (the site is apparently orange, or so some have claimed?) 2024-05-09 16:41:14 The bar at the top has an orange background 2024-05-09 16:46:11 neat 2024-05-09 16:47:56 When I say 'rich terminal' I mean graphical, not just text, although you can do a lot with just text. 2024-05-09 16:48:17 And I think it should also have some protocol for client-side scripting 2024-05-09 16:48:54 You can get graphics in text terminals but it never works that well; still better than the situation with the web though 2024-05-09 16:49:58 Where you can apply arbitrary graphical transformations to anything to the detriment of your users but you can't centre UI elements 2024-05-09 16:51:11 I have a very locked down feh for viewing images, certainly don't want to do something silly like giving it network access or the ability to read arbitrary files 2024-05-09 16:54:00 If it doesn't have network access how can it report you to the authorities for illegal copying / viewing? 2024-05-09 16:55:18 or failing to sudo 2024-05-09 16:55:33 Won't someone /please/ think of the advertisers! :P 2024-05-09 16:56:49 I don't have mecrisp open in front of me. Is there support for SSD1306 display driver? 2024-05-09 16:57:22 ksh: sudo: not found 2024-05-09 16:58:17 thrig: Try running it with argv[0]==0 2024-05-09 16:58:21 Might work better 2024-05-09 16:59:18 And argc==0 2024-05-09 16:59:52 lf94, highly unlikely. here's a dump of words on stellaris with across: https://pastebin.com/Q74gwhvd 2024-05-09 17:00:37 if you set up binfmt and qemu, you can run binaries for other architectures like mecrisp in your terminal 2024-05-09 17:00:52 MrMobius: it does support apparently a few display drivers though 2024-05-09 17:00:58 ssd33xx or something apparently 2024-05-09 17:01:10 ST7735 2024-05-09 17:01:39 MrMobius: Does the 6502 userspace simulation allow paging of some sort? 2024-05-09 17:01:51 To get around lack of address space 2024-05-09 17:01:59 MrMobius: the SSD1306 is a nice target then for my learning :) 2024-05-09 17:02:09 I was hoping there *wasnt* support 2024-05-09 17:02:12 veltas: which thing are you talking about? 2024-05-09 17:02:15 So I can mess around myself 2024-05-09 17:02:34 The qemu thing where you can run 6502 programs from shell 2024-05-09 17:04:40 veltas: I don't know. I had a 6502 emulator in MIPS that was for a microcontroller project so I just compiled that to a MIPS program for linux and included TaliForth 2 2024-05-09 17:04:58 I mean I don't know how qemu works for 6502. no interest 2024-05-09 17:11:40 what's the status on compression routines in embedded forths 2024-05-09 17:11:50 would be nice to "stuff" graphics for less space 2024-05-09 17:11:56 ie fonts 2024-05-09 17:12:11 graphics is the biggest culprit for space eating 2024-05-09 17:13:34 I've not seen any compression words in any "standard" way. Like most things Forth, "you can do it, good luck." 2024-05-09 17:13:56 Surely you could probably find one out there somewhere. 2024-05-09 17:14:20 You'd probably need to mod it for your particular system. 2024-05-09 17:14:26 for all these displays i have now, and after reading 2 datasheets, i am worried about on-board memory space. 2024-05-09 17:14:54 Yeah, modern displays need a fair bit of RAM. 2024-05-09 17:14:54 ya forth is closer to an assembler in that regard than something like python that has all kinds of things built in 2024-05-09 17:15:31 you can always generate the image on the fly and send it to the LCD immediately if you dont have enough RAM to buffer the whole screen 2024-05-09 17:15:33 Im not even looking for "built-in", just a common compression routine everyone's using 2024-05-09 17:15:47 MrMobius: that's pretty much what I'm going to do for sprite-based graphics 2024-05-09 17:15:50 code reusability tends to be very low for forth 2024-05-09 17:15:58 But a font is generally large-ish 2024-05-09 17:16:16 Yeah, that's a large amount of information. 2024-05-09 17:16:31 but even if i had many many sprites. it'd make sense to compress each. 2024-05-09 17:16:32 hmm, how big is the text? it's probably not that big if you're storing one bit per pixel 2024-05-09 17:16:41 8x8 per glyph is the idea 2024-05-09 17:16:46 havent done anything yet tho 2024-05-09 17:16:56 I'm starting with plotting a single pixel and moving it around 2024-05-09 17:17:16 yes, 1 bit per pixel will be the idea 2024-05-09 17:17:21 Well, 8x8 pixels is 8 bytes, and you usually have 256 characters, so that's actually just 2kB. 2024-05-09 17:17:34 but if we can compress more, why not 2024-05-09 17:17:43 lf94: what chip is this? 2024-05-09 17:17:48 stm32f103 2024-05-09 17:18:02 I'll probably implement HAL compression 2024-05-09 17:18:03 Yes, but you'd then have to decompress it every time you used it, so that's CPU cycles you may or may not be able to spare. 2024-05-09 17:18:24 which is basic run-length compression 2024-05-09 17:18:28 and LZ 2024-05-09 17:18:36 should be fast enough + good enough 2024-05-09 17:18:43 it was used in gameboy games 2024-05-09 17:18:53 Which have ~8kb memory :D 2024-05-09 17:19:14 :-) RAM cost a whole lot more then. 2024-05-09 17:19:21 (not the same comparison, i know, since it's an 8-bit system. a comparison would be stm32 with 32kb of memory I think) 2024-05-09 17:19:51 I should probably not bother until I need it. YAGNI baby :D> 2024-05-09 17:20:17 Fortunately for everything I have in mind I'll get to choose my processor - I will just spend a couple extra bucks and get one with enough RAM to do things in a straightforward way. 2024-05-09 17:20:37 lf94: If there are patterns you can see, you could write code that generates the data based on those patterns 2024-05-09 17:20:49 Saves writing a general purpose decompression routine 2024-05-09 17:22:35 It would help to see some example data 2024-05-09 17:22:38 as ever 2024-05-09 17:23:08 So basically you're looking at taking all eight rows of a character and treating that as a 64-bit string, and compressing that? 2024-05-09 17:23:23 For 'graphics' a vector representation is often the smallest representation 2024-05-09 17:23:32 You might gain something there, but... it feels like a challenge to me. 2024-05-09 17:23:34 Might be true even for bitmap fonts 2024-05-09 17:23:55 https://en.wikipedia.org/wiki/Hershey_fonts 2024-05-09 17:24:00 I mean how many bitmap fonts are just "draw vertical line here, draw horizontal line there, XOR that pixel" 2024-05-09 17:24:49 I guess for letter T, for example, you might work from top to bottom and say "1 x + 6 x . With a suitable format that might be three bytes in your compressed form. 2024-05-09 17:24:57 But that's kind of an easy letter. 2024-05-09 17:25:13 "A" would be harder. 2024-05-09 17:25:18 GeDaMo: Nice 2024-05-09 17:25:19 Because every row is different. 2024-05-09 17:25:51 you could have 4 bits to represent next X and 4 for next Y so you get one line per pixel 2024-05-09 17:26:06 per byte I mean 2024-05-09 17:26:20 Maybe support brezenham as well, and arcs 2024-05-09 17:26:34 hmm, 4 bits if you encode offset. only 3 bits if you encode absolute position so 6 bits per stroke 2024-05-09 17:27:10 Can use a small base-opcode size with that too 2024-05-09 17:27:13 And pack the bits 2024-05-09 17:27:23 Now we're cooking with gas 2024-05-09 17:28:18 Want efficient representation of 'another X', like a bit that's 0 or 1 after a command to determine if you give more coordinates, might be better for some brushes than others 2024-05-09 17:28:42 lf94: you could also hook up an SPI or QSPI chip and have a cartridge system :P 2024-05-09 17:28:50 Can also do Chuck's trick of copying the content of an existing glyph to create another 2024-05-09 17:29:01 thats slick 2024-05-09 17:29:06 e.g. lowercase l can build I 1 T etc 2024-05-09 17:30:33 Anyway so my bitmap font rendering library is 800KB and the font it renders is shrunk down to 3KB from 4KB! 2024-05-09 17:31:44 veltas: exact thought I already had. glyph reuse 2024-05-09 17:31:59 veltas: lmao, yea. 2024-05-09 17:32:16 There's a video I know GeDaMo will have link to where Chuck Moore talks about his font for colorforth 2024-05-09 17:32:42 He has routines for drawing lines and circle halves or something like that and then creates an ugly font from all those primitives with hackery 2024-05-09 17:33:14 I was just thinking a lot of letters are mirrored horizontally or vertically 2024-05-09 17:33:28 Anyway just gedamo it if you're interested 2024-05-09 17:33:31 I mean google* 2024-05-09 17:33:49 I'm not familiar with that video 2024-05-09 17:35:32 https://www.youtube.com/watch?v=BpsXyB2WsUw 2024-05-09 17:35:35 Starts about a minute in 2024-05-09 17:35:53 Just look at the character set and you'll see how he's done it, it's very 'symmetric' 2024-05-09 17:37:43 Or https://www.youtube.com/watch?v=YjTDfYAPCbo 2024-05-09 17:40:23 Yeah that latter video he talks a bit more about rendering 2024-05-09 17:40:56 He even renders triangles 2024-05-09 17:41:57 software 3d is one of my stretch goals 2024-05-09 18:54:11 lf94: I think there's a lot of cool options for rendering in Forth now, we've got that vulcan bytecode thing you could literally program in Forth, and otherwise you can write vectorised code with good performance in forths on consumer CPUs in laptops/phones 2024-05-09 18:54:47 nice 2024-05-09 18:54:57 software 3d w/ vector ops will help :) 2024-05-09 18:54:59 Can even use vectorised wasm to target all of the above 2024-05-09 19:48:07 I'm very interested in that vulkan bytecode approach. 2024-05-09 19:48:20 I absolutely want to be able to do SOMETHING with GPUs. 2024-05-09 19:48:41 BTW, I saw a video a couple of days ago where a guy went through the steps of bringing up your own completely private AI. 2024-05-09 19:49:08 He put two high end GPUs in his box, and the software just saw them and put them to use with no muss, no fuss. 2024-05-09 19:49:38 That tech is really coming along, and that appeals to me a LOT more than having someone deciding how I'm allowed to use it and watching everything I do with it. 2024-05-09 19:50:30 Of course, you are running big third party software packages, so I guess nothing says they're not uploading various bits of info. I asked him in the comments if he'd done any packet sniffing while running the thing. 2024-05-09 19:51:15 The system he built was a BEAST, though. Very high end - probably cost between five and ten thousand bucks. 2024-05-09 19:57:31 No way I'm prepared to spend that kind of money on something "mostly hobby," but it's on the list now - in a couple of years it'll all be cheaper. 2024-05-09 19:58:20 you might be able to use them for games too :D 2024-05-09 19:58:59 No kidding - that box would have the power to play more or less anything. 2024-05-09 19:59:53 He also showed how to connect Obsidian to the AI engine, so basically you get a chatbot in your Obsidian. Obsidian is a note-taking / markup sort of thin. 2024-05-09 19:59:53 KipIngram: was his box using proprietary LLM data through an API? 2024-05-09 20:00:08 No, he downloaded the models and had them stored locally. 2024-05-09 20:00:17 At least he claimed everything was entirely local. 2024-05-09 20:00:26 https://github.com/ggerganov/llama.cpp 2024-05-09 20:00:29 But, I haven't really dug into it. 2024-05-09 20:00:36 I think he used ollama. 2024-05-09 20:00:50 As the "base layer" - he installed some stuff that ran on top of it too. 2024-05-09 20:01:03 https://www.youtube.com/watch?v=Wjrdr0NU4Sk 2024-05-09 20:01:12 KipIngram: are openai data available for download? 2024-05-09 20:01:33 All I know is what he said in that ^ video. 2024-05-09 20:01:33 I don't think OpenAI is but Llama certainly is 2024-05-09 20:01:35 sorry, I'm still a bit fuzzy on how it works 2024-05-09 20:01:44 Me too, honestly. 2024-05-09 20:01:56 There are plenty of models available on Hugging Face 2024-05-09 20:02:14 Oh wait, OpenAI does have a voice to text model available 2024-05-09 20:02:19 One of my disappointments when I first tried out chatgpt was that it isn't aware of latest news events. It told me its knowledge base was basically pre-2022. 2024-05-09 20:02:21 okay, from that link, looks like Llama 3 is available at 4.7GB 2024-05-09 20:02:35 If I built one, I'd want to wire it up so it could scrape news sources and then discuss them with me. 2024-05-09 20:02:40 under "LLAMA 3 COMMUNITY LICENSE AGREEMENT" 2024-05-09 20:03:09 I want something that will actually learn new things. 2024-05-09 20:03:25 which requires a license if you go commercial with more than 700 million monthly active users 2024-05-09 20:03:29 But... I don't even know if that's made possible. 2024-05-09 20:03:50 I don't think I need to worry about that user limit... 2024-05-09 20:04:31 I think I had 700 pages views 2024-05-09 20:04:33 last year 2024-05-09 20:27:07 I probably had seven, and they were probably all me.