7 ms·
Uxn
- dmitrygr 2y ago[flagged]
- FactKnower69 2y agowhy that reaction? what impact does one or the other entail?
- dmitrygr 2y agowell, if i wanted to emulate this on some tiny piece of hardware, as one does. Little endian is generally a lot more amenable to emulation, since math of almost all kinds of done LSB-to-MSB
- lifthrasiir 2y agoUxn uses big endian primarily because it is meant to be easily assembled from (or disassembled into) a thin programming language called Tal. I think Tal is meant to be the highest-level language available in this platform, so it should be as convenient as possible without being too fat---`#1234` in Tal would ideally be assembled to two bytes `12 34` therefore.
- kragen 2y agoI don't think you can emulate it on a tiny piece of hardware; the smallest full Uxn/Varvara implementation I've seen so far is the GameBoy Advance, which has 384KiB of RAM. On the other hand, you've previously been able to emulate some pretty astonishing things on pretty astonishing hardware. There are a lot of minor things in Uxn and Varvara that make them hard to emulate efficiently. Extensive use of self-modifying code, memory-mapped I/O, and using a stack instruction set, for example. I'm interested to hear how you'd redesign Uxn/Varvara to be easy to emulate on some tiny piece of hardware; of everyone in the world, you're probably the best person to answer that question. Little-endian, check. What else?
- dmitrygr 2y agoLE is all i'd ask for. I bet I could get it to run on an 8008 even without that change, but LE would make it easier to emulate :) Stack-based actually helps (registers suck up RAM fast). Self-mod does not matter to emulators. It would for a JIT, but that is a separate story.
- kragen 2y agoHow would you hook up 64K of RAM to an 8008? Through some shift registers?
- dmitrygr 2y agoSPI RAM bit-banged via some IO ports is pretty easy, same as here: http://dmitry.gr/?r=05.Projects&proj=35.%20Linux4004 http://dmitry.gr/?r=05.Projects&proj=35.%20Linux4004
- kragen 2y agoAwesome, thanks for the link! I didn't remember that aspect of the 4004 project. This would be a pretty amazing project. I wonder if you could get existing Uxn/Varvara applications like the Left text editor or Orca to run fast enough to be usable. Presumably for Orca you'd want to hook up external sound hardware rather than trying to bitbang the sound on the 8008, and I guess the same is even more true of a framebuffer. If you were bitbanging RAM access at 7kbps it might be hard to get it to run instructions fast enough to be usable, though.
- dmitrygr 2y agoi think 8008 would be much faster :) i'll look into this
- d66 2y agoThere's no requirement that stacks grow upwards in Varvara. If your stacks grew downwards then you could use LE instructions to operate on 16-bit values on the stack. You'd still need to support loading from BE memory into the LE stack but that might not be too bad (two 8-bit operations instead of one 16-bit operation). The device ports are also specified as BE so in theory you'd need to split those reads/writes up too. However, in almost all cases those are done directly from the stack values so I bet most ROMs would work fine with LE devices and LE stacks. LE devices would only cause issues when someone used 8-bit reads/writes from part of a 16-bit port.
- SolarNet 2y agoFrom an ergonomics perspective big-endian is the little-endian of stack based machines. Register truncation is the big reason why from an ergonomics perspective we prefer little-endian, but in stack based machines the equivalent is pop truncation. But the behavior between these is reversed between the two machine types. Big endian is the layout by which pop-ing one byte off the stack gives you the truncated number.
- dmitrygr 2y agomath is still done LSB-to-MSB
- vitiral 2y agoIt's an 8 bit unaligned encoding, so this matters very little
- userbinator 2y agoBig endian is a totally illogical choice these days, unless you're making network hardware.
- samsolomon 2y agoAs a product designer, I don’t fully grasp everything the folks at 100r make. I’ve followed them for a couple of years. From what I can tell they have a ton focus and are serious about craftsmanship. Nothing else to add—just admire people good at making things!
- IncreasePosts 2y agoI feel like they are artists with computers as their medium. I've had the same question. I enjoy reading about what they do, but it isn't clear that I should ever attempt to be inspired by their work in my day to day engineering job.
- oersted 2y agoIndeed, 100r.co is probably my favourite place on the internet, but it does have the vibes of those 20th century architects with grand artistic and futuristic ideas that were not practical on so many levels. Not that that's any kind of failure, they simply had different priorities. It also reminds me of the gap between philosophy and science. I deeply respect that kind of work too, there's a place for it, but certainly it is closer to art than engineering.
- dang 2y agoRelated. Others? Tal is the programming language for the Uxn virtual machine (2021) - https://news.ycombinator.com/item?id=39575102 https://news.ycombinator.com/item?id=39575102 - March 2024 (18 comments) Virtualizing Uxn - https://news.ycombinator.com/item?id=37091091 https://news.ycombinator.com/item?id=37091091 - Aug 2023 (4 comments) The Uxn Ecosystem - https://news.ycombinator.com/item?id=36734445 https://news.ycombinator.com/item?id=36734445 - July 2023 (54 comments) The Uxn Ecosystem - https://news.ycombinator.com/item?id=36642390 https://news.ycombinator.com/item?id=36642390 - July 2023 (2 comments) Uxn is a virtual machine with 32 instructions - https://news.ycombinator.com/item?id=33926600 https://news.ycombinator.com/item?id=33926600 - Dec 2022 (84 comments) 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)
- phoe-krk 2y agoI don't want to go to Chel-C - https://news.ycombinator.com/item?id=31705239 https://news.ycombinator.com/item?id=31705239 - June 2022 (124 comments) is sorta-related, since it's a rebuttal.
- dang 2y agoThanks! In addition to looking like a good post, that is a first-class internet pun: https://www.youtube.com/watch?v=XvRQDsH0Yho https://www.youtube.com/watch?v=XvRQDsH0Yho.
- vessenes 2y agoThat is a savage savage critique beautifully written and demonstrated. I don’t even like small ‘simple’ systems and I’m smarting a bit reading it. Thanks for the link.
- __MatrixMan__ 2y agoThat page answers "what?" I had to browse around a bit to answer "why?" I landed here: https://100r.co/site/mission.html https://100r.co/site/mission.html It's a cool idea. I found the contrast with electron helpful: > While solving some of our issues, Electron was rapidly increasing in size and hunger, so despite it being open-source soon joined the rest of the software that we did away with. Our focus shifted toward reducing our energy use, and to ensure reliability we began removing dependencies.
- v3ss0n 2y agoElectron is slow when your code is crappy .
- 01HNNWZ0MV43FF 2y agoHTML is just so big
- WD-42 2y agoYea that must be why the original electron authors abandoned it and are now working on an editor in Rust.
- unnkrsnn 2y agoIs Github working on a new editor?
- Cannabat 2y agoThe team who create Atom, Electron and tree sitter are working on zed: https://github.com/zed-industries/zed https://github.com/zed-industries/zed
- v3ss0n 2y agoZed is fast at starting up, But incredibly slow at When it involves moving UI - atleast on Linux. You better test first before saying that. Lets think of it , how many time you restart your app when you start using the app?
- snvzz 2y agoGreat, although the VM should really migrate to being RISC-V based, now that we finally have a proper standard ISA.
- yjftsjthsd-h 2y agoOn the inside (guest) or outside (host)? On the host side, yeah if there isn't an RV version you should definitely write one (they do helpfully provide docs explicitly for that purpose). On the guest side, I seriously doubt that it's a good fit; RISC-V is designed for hardware and this is designed for emulation, which makes for different design choices.
- kragen 2y agoI actually think Uxn and Varvara are a lot better suited to hardware than to emulation. RISC-V, however, includes a lot of concessions to hardware implementation that just add headaches to code generation and emulation, though not quite to the level of the MuP21.
- PinkMilkshake 2y agoI really like their ideas, and I love that they follow through with actual implementation. Given the restrictions on the VM, like 64K of memory, are they going to have issues with more complex written languages like Japanese or Arabic?
- lifthrasiir 2y ago> Given the restrictions on the VM, like 64K of memory, are they going to have issues with more complex written languages like Japanese or Arabic? That can be achieved by adding an additional (virtual) device, as it was often done for such scripts in the past.
- ravetcofx 2y agoFrom what I follow Japanese character and font support is being implemented now
- sssilver 2y agoThis reminds me of Urbit
- pavlov 2y agoUrbit is to Uxn as Scientology is to science.
- actionfromafar 2y agoUrbit is to Uxn as Scientology is to hippies.
- astennumero 2y agoNoob developer here. From what I understand this can only run on emulators. If I have a system powerful enough to run an emulator why would I want to use this? I understand being able to run this on old consoles. But what about modern computers?
- kyleperik 2y agoUxn runs on its own VM, so each emulator emulates this VM, just like every java implementation emulates the JVM, etc. In other words, the emulator isn't designed for any specific physical machine to begin with.
- throwawayk7h 2y agoThe idea is that it's a standard and stable runtime environment. 100 years from now we'll still be able to run NES games, but running old windows programs may be nearly impossible. uxn is trying to be like the NES in that regard, but for more general use cases than just games. Write a uxn program once, and it can run anywhere, any time (on any device that can host uxn).
- gavindean90 2y agoI totally get your point but we are great at running old windows now with dosbox and wine.
- kragen 2y agoFor now, but maintaining DOSBox and especially WINE continues to require substantial engineering effort, in part because the platforms they're running on change. Implementing Uxn/Varvara is many orders of magnitude easier than implementing Win32, as evidenced by the fact that many more people have done it despite the much smaller base of applications they can then run. It seems likely that many Win32 applications will execute incorrectly on versions of WINE that are current in 02124, unless they themselves are running on top of something like Uxn. Probably not Uxn itself, though, because a 16-bit memory space is not a practical way to emulate Win32. Dmitry wouldn't be dissuaded, I suppose.
- ruslan 2y agoThis Uxn thing reminds me Inferno[1] - a VM based operating system from Bell Labs with its own programming language, GUI and networking protocol. It can run on may hardware with just 1 MB of RAM. But Inferno is far more than that, it's a Plan9's descendant. 1. https://en.wikipedia.org/wiki/Inferno_(operating_system) https://en.wikipedia.org/wiki/Inferno_(operating_system)
- ErikAugust 2y agoThere is a reference to Inferno here: https://100r.co/site/weathering_software_winter.html https://100r.co/site/weathering_software_winter.html
- pjmlp 2y agoIn modern times the closest we have to Inferno is Android, which traces back to Bell Labs original goal to target Inferno against Sun's Java efforts on the market. Pity that most Plan 9 afficionados usually always forget about Inferno, with Limbo being the re-consideration that dropping Alef from Plan 9, or designing it without automatic memory management in first place was a mistake. https://en.wikipedia.org/wiki/Alef_(programming_language) https://en.wikipedia.org/wiki/Alef_(programming_language)
- ruslan 2y ago> In modern times the closest we have to Inferno is Android, which traces back to Bell Labs original goal to target Inferno against Sun's Java efforts on the market. That's interesting, I never looked on Android at that angle. Still, Android is based on Linux (Unix), it allows JIT and NDK. Whereas Inferno does not allow escape from VM conceptually, and the whole OS, except low-level stuff, is written in Limbo and works totally in VM. I once tried Inferno somewhere in 1998 on my PC, played with it a litte and removed. But three years later I met it in Lucent/Definity Avaya PSTN switches the company I worked for bought. Not to say I was surprised. :-)
- pjmlp 2y agoInferno still has C user space, check source code made available by Vita Nuova. Like on Android it is as support for Limbo libraries and DisVM, and drivers. Android Treble also allows for drivers to be written in Java, and ART does JIT/AOT.
- indigodaddy 2y agoSo is the page hosted on a uxn instance too or?
- deleted 2y ago[deleted]
- mikae1 2y agohttps://wiki.xxiivv.com/site/oscean.html https://wiki.xxiivv.com/site/oscean.html
- 627467 2y agoI have never seen devine mention where he hosts his website, and haven't come across a uxn web server so I think the answer is "no", it's not hosted on uxn. Would be cool to have a web hoster that follows some of the principles layed out by uxn/100r and see what kind of service would turn out.
- mikae1 2y agoCheck the edit link in the footer. It's GitHub. I guess being extremely productive and successfully pushing new and exciting concepts in computing also means you need to adopt a certain level of pragmatism. But yeah, uxn hosting is a cool idea.
- kcaseg 2y agoFirst time I saw 100r on HR I have read the entire website like a book, amazing people! Uxn is also cool, I especially liked the Orca ROM, but I couldn’t really figure it out how to make it work with MIDI, so I ended up using the Linux version.
- exitb 2y agoIt’s somewhat disappointing that over the years the ecosystem[1] accumulated more emulators than substantial programs. [1] https://github.com/hundredrabbits/awesome-uxn https://github.com/hundredrabbits/awesome-uxn
- severak_cz 2y agoI am not surprised as Unxtal is very low level and with lot of constraints. It looks more like some tool of demoscene than a practical programming platform.
- 627467 2y agoIt's a testament to the quality/function of the existing types of ROMs available to uxn and the community that forms around it? Uxn type initiatives are forward-backward looking: how do I ensure future retro compatibility of software created going forward.
- exitb 2y agoIt's probably also an interesting challange to implement an emulator. I was hoping that Uxn could eventually be a vehicle to get rich, graphical apps onto less popular operating systems, like Plan 9 (which they support). While their 1st-party roms are great, the wave of software never came.
- baudaux 2y agoIt is an amazing project ! You can develop and run uxn apps in the browser with https://exaequos.com https://exaequos.com. There are uxnasm, uxncli and wayvara, a Wayland varvara emulator that supports graphics. There are some compiled roms in /usr/local/share/roms
- mgnienie 2y agoSome elements of UXN's philosophy remind me of CollapseOS (https://news.ycombinator.com/item?id=21182628 https://news.ycombinator.com/item?id=21182628), and as it turns out, there's even a port of it to UXN https://github.com/schierlm/collapseos-uxn https://github.com/schierlm/collapseos-uxn
- SamGyamfi 2y agoForget about the software, the entire artistic mission is cool as hell.
- ForOldHack 2y agoSummary: "Cool as hell."
- dmwilcox 2y agoI love this stuff. Thinking about how our software and its supply chain break down so dramatically given small adversaries like 'intermittent internet access' or 'old crappy machines' has definitely changed the way I think about software as a developer. I appreciate the care 100r has put into working with their doors open and sharing their lives, circumstances and worldview. I'm not using Uxn but am I following a bit of a quest to try my hand at personal shaped computing. I didn't really want to write an emulator (I don't have a game-preservation shaped problem) and I like to be able to just "takeover" computers around me with bootable USB sticks. Fittingly, my project is in x86 assembly, real-mode with BIOS routines for IO and as a stand-in for drivers. (Tldr; not amazing but serviceable, and Devine is right that 64kb is a lot) As a long time python programmer, I've found it fun to play in the land of understanding memory layouts, segmentation, and writing assembler. I highly recommend it for educational purposes. I don't need a hobby project that looks like work in my off time so real-mode programming fits nicely. As a plus I rediscovered MSDOS .COM files and it's shockingly fast and will give you 64kb of memory setup and a filesystem which is handy. Again here I don't have to write an emulator and my little Forth-like project could bootstrap from DOS assemblers and tool chains. My take away from Uxn project is "go ahead and try to do something fun with a computer". Uxn very much isn't about making the most efficient p-machine or best language, but something that fits 100r. And that more of us with the background in computers ought to try something off the beaten path because we might learn something and we might have fun doing it.