4 ms·
It's 128KB of RAM, that's the same as the original Macintosh in 1984. I would be surprised if it ran at more than about 10MHz. And nevermind the constrained res
by nknight 15y ago
It's 128KB of RAM, that's the same as the original Macintosh in 1984. I would be surprised if it ran at more than about 10MHz. And nevermind the constrained resources for implementing any of this hypothetical infrastructure, unless Notch adds an MMU, you can't enforce permissions
You can't think about this in modern terms. It's not a modern computer. It's a 1980s computer, and it's supposed to run a spaceship. Think microcontrollers, not smartphones or set-top boxes.
- coderdude 15y agoCouldn't the permission system exist outside of the constraints of the in-game computer (as just some game mechanism)? If each of the ship's discrete components were accessible at some address, couldn't the game enforce the permissions at a level above the simulated CPU? A rough static analysis of the code might reveal where those components are accessed, and as long as you enforce permissions while the software runs then you should be able to catch anything that tries to slip past.
- nknight 15y agoGo back and look at the first post in this very thread. Notch explicitly intends nothing of the kind, and I certainly can't see why it would be done -- it runs counter to the vision thus far articulated.
- coderdude 15y agoI know he said that. I'm following the conversation. I'm just describing an idea for a permission system.
- DanBC 15y agoSomeone could write an out-of-game emulator[1] which people could use to test software. [1] I have no idea what the correct terminology is here.
- javert 15y agoIt should be possible to provide programs as "data" that is interpreted by the program "running" on Notch's CPU, thus allowing a fine-grained, whitelisted permissions even without MMU. No?
- jiggy2011 15y agoYou would have to abstract the CPU in some way and then write the permissions management in software as part of the interpreter. Bear in mind that this is already only a 16bit CPU with a restricted address space.
- javert 15y agoYou would have to abstract the CPU in some way and then write the permissions management in software as part of the interpreter. Yes, that's what I said. :) Bear in mind that this is already only a 16bit CPU with a restricted address space. I suspect the interpreter could be made to fit, with limited space left for the untrusted (to-be-interpreted) code. As has been pointed out elsewhere, though, if there is a backing store (i.e., simulated hard drive), it's probably possible to have effectively unlimited "RAM" in the game in practice, unless Notch implements a slowdown for accessing the backing store.
- jiggy2011 15y agoTrue, but your CPU is limited too so having to lex & parse sourcefiles and walk syntax trees to run programs could be a bottleneck there, if you remember old computers there was a significant performance gap between native and interpreted code. In practice that might not matter for many applications if they do not have to use intensive algorithms etc. I would still imagine that compilers would be used more than interpreters though which would mean that some security would need to be present at the "hardware" or "firmware" level. Another interesting thing to think about regards backing stores: I assume that the programs will be able to take input from the world around them, i.e other ships , objects in space etc. So what's to stop you from using (perhaps) a tractor beam to re-organise the position of asteroids in space and then "read" that data back using ship instrumentation? Potentially the entire universe becomes one big DB!