7 ms·
Uxn is a virtual machine with 32 instructions
- theteapot 4y agoWhy is this different/better than emulating the PIC micro controller instruction set (or something like that), except that no hardware actually supports it? As I recall they had about 32 instructions. Not bashing, just asking.
- EarlKing 4y agoThis. I mean, the C18 microcontroller has 32 instructions, too, but nobody's using that either. So what's the advantage of this thing?
- entaloneralie 4y agoI gave a talk about the various options I considered in the beginning, it's linked up on top of this thread by someone. In short, I didn't really care to have to design a CPU, I just wanted to drive a framebuffer. The PIC was a pretty poor target for what I had in mind, but I did nearly settle for the J1 which is a gorgeous design, the 4kb program limit was pretty tight, and it ended up being quite slow when emulated on the NDS. I wrote a couple of notes that might interest you: https://wiki.xxiivv.com/site/devlog.html https://wiki.xxiivv.com/site/devlog.html
- theteapot 4y agoAh OK, what your trying to do makes more sense now. Thanks.
- mdaniel 4y agodocument.querySelectorAll('a[href]').forEach(it => it.style.textDecoration='underline') It drives me absolutely batshit when I have to wave my cursor all over the place to find hyperlinks that the browser has been displaying since the 90s
- Shared404 4y agoInternal links are at the top, or wrapped in { text } and external links are [ text ]. Does it really require that much cursor waving? It's nice to have the distinction, and I personally like the visual impact.
- kristopolous 4y agoIt's not a problem if you don't care about accessibility
- Shared404 4y agoScreen readers will respond to the fact that it is an href will they not? The braces/brackets do not appear in the source. Am I missing something?
- Arnavion 4y agoYou're missing that not everyone who wants accessible content is blind and using a screen reader.
- Shared404 4y agoThe links are accessible to everything which can determine an <a> exists, uniquely defined with a visual indicator that doesn't require color, and show before you hover if it is internal or external. Requiring a link to be underlined doesn't seem productive from an accessibility perspective to me. I did some research on a11y and didn't see anything in the audit checklists that this violates [0], could you explain what the precise issue is? [0] obviously checklists aren't everything.
- junon 4y agoPatterns and consistency are a large part of accessibility.
- ant6n 4y ago> With only 64kb of memory, it will never run Chrome, TensorFlow or a blockchain Perhaps with using memory banking, it could run Chrome.
- zxexz 4y agoI'm pretty sure you could fit a blockchain into 64kb of memory too. Not sure why you'd want to do such a thing though except for amusement (the reason a lot of us do anything at all).
- colejohnson66 4y agoIt’s possible to mine bitcoin on an IBM 1401. Just 80 seconds per hash! http://www.righto.com/2015/05/bitcoin-mining-on-55-year-old-ibm-1401.html http://www.righto.com/2015/05/bitcoin-mining-on-55-year-old-...
- robterrell 4y agoYes! I made a blockchain in Apple ][ BASIC (with one machine-language routine for hashing). And yeah, I did it because of insomnia-related boredom.
- pcwalton 4y ago> Perhaps with using memory banking, it could run Chrome. At that point you might as well just write an AArch64 emulator in uxn and run Chrome that way. It wouldn't be much slower than the "native" build.
- ant6n 4y agoYeah that’s how I’d do it. Or perhaps an x86 emu? Maybe get qemu to run.
- deaddodo 4y agoIt would probably be better to link the varvara[1], which is the actual virtual machine. Uxn is the processing core: > Uxn is to Varvara, what the 6502 is to the Classic Nintendo. 1 - https://wiki.xxiivv.com/site/varvara.html https://wiki.xxiivv.com/site/varvara.html
- Brian_K_White 4y agoPresumably the poster would have posted about the overall platform instead of the processor, if that was what they found interesting and wanted to discuss.
- deleted 4y ago[deleted]
- schemescape 4y agoSorry if I missed it, but how is this page related to (what I think is) the main uxn page? https://100r.co/site/uxn.html https://100r.co/site/uxn.html
- Shared404 4y agoThe page is Devine's personal wiki. Lots of fun stuff around, including notes on uxn and other assorted stuff.
- bullen 4y agoHere he goes through some of the steps to making this (1:20) https://vimeo.com/771406693 https://vimeo.com/771406693
- abnercoimbre 4y agoHey I'm the organizer of that conference! It's taking longer than anticipated but the talk will be published soon this month where you can download [0] presentations for free. Sign up for the newsletter [1] if you'd like (we're indie and the extra eyeballs help.) [0] https://guide.handmade-seattle.com/ https://guide.handmade-seattle.com/ [1] https://handmade-seattle.com/newsletter https://handmade-seattle.com/newsletter
- makeitrain 4y agoHey I went to that conference, met you, met Devine, drank choco wine. Highlight of my year!
- abnercoimbre 4y agoWoo! I genuinely grin when someone drinks chocolate wine. Don't know if it was a long trip for you to get here, but I hope you return :)
- dang 4y agoRelated: Uxn: Small permacomputing VM designed for easy implementability - https://news.ycombinator.com/item?id=32158816 https://news.ycombinator.com/item?id=32158816 - July 2022 (2 comments) MicroFLENG – concurrent logic programming for CP/M, C64 and the “uxn” VM - https://news.ycombinator.com/item?id=31506240 https://news.ycombinator.com/item?id=31506240 - May 2022 (4 comments) Uxn – Virtual AV Computer - https://news.ycombinator.com/item?id=27561463 https://news.ycombinator.com/item?id=27561463 - June 2021 (5 comments) uxn: a portable 8-bit virtual computer - https://news.ycombinator.com/item?id=27185950 https://news.ycombinator.com/item?id=27185950 - May 2021 (47 comments) Uxn is a 8-bit virtual stack machine - https://news.ycombinator.com/item?id=26258991 https://news.ycombinator.com/item?id=26258991 - Feb 2021 (5 comments)
- dym_sh 4y agoevery sixth month is the charm
- harryvederci 4y agoReally cool initiative, and with a really pleasant community. The author lives on a boat, using only electricity generated with solar panels. Xcode didn't work out that well under those circumstances, which was one of the driving forces to create uxn. Another is the desire to make programs that can run pretty much anywhere, and will remain possible to run in the future. Similar to how you can run NES roms on lots of devices. Also, "Devine Lu Linvega" is just the name of someone you'd follow in battle, even if it's a battle that will lead you to your certain death. Just saying.
- throwaway0x7E6 4y ago[flagged]
- culi 4y agoThis is such an absurd thing to be upset about. The name is a reference to an anime. This artist has also released music under the name of Aliceffekt Sorry to break it to you but Doja Cat doesn't have any relation to the Felidae family of mammals You know, writing under a pseudonym was also the norm about a century ago. I doubt throwaway0x7E6 is your real name as well you poser
- throwaway0x7E6 4y agoit doesn't upset me one bit, I'm just pointing out to the poster above that he's been misled. surely you'll agree with me that it's much cooler to have Max Thundercock in your birth certificate than to adopt it as a pseudonym later in life
- Shared404 4y agoHow has the above commenter been misled? If someone uses a name for a context, that is their name for that context. Devine has given talks and performs much of their work under this name, why does it matter when it was taken?
- rcarmo 4y agoHere’s a very nice Uxn playground: https://metasyn.github.io/learn-uxn/ https://metasyn.github.io/learn-uxn/ I don’t have a lot of time on my hands, but this is a rabbit hole I wouldn’t mind dropping into on occasion.
- deleted 4y ago[deleted]
- KHoward12 4y agovery cool
- bitwize 4y agoI made one of these about 18 years ago. It was a stack-based machine which meant I could get the instruction set under 32. I wrote a compiler for a little Forth-like language targeting its instruction set. I wanted to turn it into a fantasy console, but never wired up the graphical, sound, and input bits for that.
- andrewflnr 4y agoThe little mascot/logo guy is a delight.
- globalnode 4y agoVery interesting website and projects there, will have to poke around more. Is great to see someone interested in programming and tech also interested in reducing their impact on our global ecosystem and a vegan too! I've never actually thought about low power/tech constrained programming, I feel like this could be something that would fire me up again in the tech industry, so sick of the more more faster faster approach.
- donio 4y agoThe emulator core is worth checking out: https://git.sr.ht/~rabbits/uxn/tree/main/item/src/uxn.c https://git.sr.ht/~rabbits/uxn/tree/main/item/src/uxn.c Less than 150 lines, each opcode is defined in a single line in terms of a dozen or so basic operations which are single line macros themselves.
- genewitch 4y agointeresting to read through. No MOV tho
- bullen 4y agoDigging into this, how are the .tal files made? Found it: https://compudanzas.net/uxn_tutorial.html https://compudanzas.net/uxn_tutorial.html So you need to write assembly sort of, I wonder what language anyone would pick to compile for this little VM. Also I lack networking! Here is a video introduction: https://www.youtube.com/watch?v=LrNuq_JgaOA&t=794s https://www.youtube.com/watch?v=LrNuq_JgaOA&t=794s
- zzo38computer 4y agoI wrote my own implementation, now called Uxn38. I had done a few writing uxn programs, and figured out some tricks with programming with this. I think that there are a few problems with it, one of which is the delete/append ports of the file device, which I had proposed a change, to allow seeking and a few other things. (Deleting files in a uxn code is probably not that important anyways. Uxn32 allows deleting directories too, although since there is no way to create directories using uxn, deleting directories seems worthless.) I also made some enhancements to the assembler. Some of these do not match what other people had done, so due to this sometimes there are two ways of doing the same thing. It was before the symbol file output, so instead it has its own symbol file format (although it might be possible to use the official assembler to convert the symbol file). If necessary, I might need to add switches to control some options, e.g. different versions of the uxn assembly language (since sometimes changes will break some old programs, even if the target instruction set has not changed), symbol file format, etc. I have not implemented any optimizations in the assembler, since I think that the writer can make the optimization by themself (or, possibly, can have a high-level programming language capable of uxn, but I do not have such a thing). I dislike the proposed metadata formats. For one thing, I think that it is unnecessary for a device port to be allocated for this purpose. Also, specifying capabilities would be useful, I think; at least to me, it seems more useful than including icons.
- conaclos 4y agoWhere is the link to the source code? :)
- entaloneralie 4y agohttp://zzo38computer.org/fossil/uxn.ui/dir?ci=tip http://zzo38computer.org/fossil/uxn.ui/dir?ci=tip
- entaloneralie 4y agoIt's true that using a vector port for this is overkill, how would you instead tell the emulator that metadata is available?
- userbinator 4y agoone-page computer It seems smaller than that --- more like a business card. After all, the Z80's instruction set fits on one standard page too: https://ia600604.us.archive.org/view_archive.php?archive=/1/items/World_of_Spectrum_June_2017_Mirror/World%20of%20Spectrum%20June%202017%20Mirror.zip&file=World%20of%20Spectrum%20June%202017%20Mirror/sinclair/books-pics/z/Z80CPUMicroprocessorInstantReferenceCard.jpg https://ia600604.us.archive.org/view_archive.php?archive=/1/... More amusingly, the mascot looks like the Go gopher grew a few more appendages.
- skykooler 4y agoI misread the title as "Unix is a..." and got to thinking about how you could map unix-style command line programs to instructions in a VM.
- hcs 4y agoNeat idea. I'm imagining something like an FPGA or MPPA [1], where you program an interconnect (pipes) between dozens of available cores (processes), which can be configured to do one of a few hardcoded types of stream processing (commands) with a few flexible options (switches). [1] https://en.wikipedia.org/wiki/Massively_parallel_processor_array https://en.wikipedia.org/wiki/Massively_parallel_processor_a...
- nosklo 4y agoI know you guys are tired of ChatGPT but > I have this implementation of the uxn virtual machine that has 32 instructions, how can we add a few more instrucions do implement memory pagination? (code here) To implement memory pagination, we can add a few instructions to the existing set of 32 instructions in the uxn virtual machine. These instructions could include: 1. PAGE_IN - This instruction would be used to load a specific page of memory from the underlying storage device into the virtual machine's RAM. 2. PAGE_OUT - This instruction would be used to save a specific page of memory from the virtual machine's RAM to the underlying storage device. 3. SET_PAGE - This instruction would be used to set the current page of memory that is being accessed by the virtual machine. 4. GET_PAGE - This instruction would be used to retrieve the current page of memory that is being accessed by the virtual machine. These instructions could be implemented as follows: #define PAGE_IN(x) { u->page = (x); u->dev[0x0f] = 1; } #define PAGE_OUT(x) { u->dev[0x0f] = 1; } #define SET_PAGE(x) { u->page = (x); } #define GET_PAGE(x) { x = u->page; } int uxn_eval(Uxn *u, Uint16 pc) { ... switch(instr & 0x1f) { ... case 0x1a: /* PAGE_IN */ PEEK(a, pc) PAGE_IN(a) pc += 1 + bs; break; case 0x1b: /* PAGE_OUT */ PEEK(a, pc) PAGE_OUT(a) pc += 1 + bs; break; case 0x1c: /* SET_PAGE */ PEEK(a, pc) SET_PAGE(a) pc += 1 + bs; break; case 0x1d: /* GET_PAGE */ GET_PAGE(a) PUSH(src, a) break; ... } ...
- entaloneralie 4y agoNot only these opcodes are already assigned, this would be a very much overkill implementation of this functionality by wasting opcode space, whereas a simple device port would do the trick. It's telling that everyone's first reaction to Uxn is to write a compiler for it, or adding extra memory - it's more about finding fun projects to do that fits within such a restricted space.
- Dylan16807 4y agoWhat's wrong with a compiler? How is that not a fun project that works within the restricted space?
- casey2 4y agolinks are blue for me, try using a dark theme like a normal person, boomer.