News for hackers. Stuff that matters.
Re:Amiga Java by pavlov on Friday January 10, 2020 @11:12AM (#22011953)
Seeing "Amiga" and "Java" together reminds me of Amiga Anywhere, a brilliant and completely misunderstood gaming/entertainment VM project twenty years ago:

https://arstechnica.com/gadgets/2018/03/a-history-of-the-ami...

It didn't really have anything to do with the original Amiga. It was a rebranding of a strange high-performance VM designed by some very clever people in UK:

"Tao had created a product that was so innovative that few people understood what it actually was. Taos was an operating system that was coded in VP1, an advanced assembly language that used instructions for an imaginary, idealized RISC CPU. When Taos programs were loaded into memory, the system translated the VP1 opcodes into the equivalent ones for whatever CPU it happened to be running on. Taos could run on an x86, a MIPS, a PowerPC, or a transputer, and many more—or even different combinations running at the same time. Because VP1 instructions were more compact than most CPU’s native opcodes, Taos programs would often load and run faster than native ones, even when you included the time it took to do the translation. Taos was a little bit like magic."

Of course HN past has the details on this interesting bit of alternative software history:

https://news.ycombinator.com/item?id=9808159

Re:Amiga Java by armitron on Friday January 10, 2020 @11:29AM (#22012114)
You might be interested in https://github.com/vygr/ChrysaLisp by one of the inventors of Taos. It's brilliant.
Re:Amiga Java by unixhero on Friday January 10, 2020 @12:18PM (#22012594)
Whoa.
Re:Amiga Java by ngcc_hk on Saturday January 11, 2020 @07:43AM (#22019588)
Indeed woha
Re:Amiga Java by somesortofsystm on Friday January 10, 2020 @12:00PM (#22012386)
Isn't it the case that the approach of using a VM to do games goes way back .. in the early 80's it was a common mechanism in games dev, and the tradition has endured such that VM's are often pushed hard, technology-horizon wise, by the game devs.

One of the reasons Lua is all over the place, is its VM code is very well written and easy to integrate in a code-base.

There is still room for VM's to solve a lot of the current platform-war problems.

Re:Amiga Java by Someone on Friday January 10, 2020 @12:28PM (#22012727)
”the approach of using a VM to do games goes way back .. in the early 80's it was a common mechanism in games dev”

One reason that was done is that it made porting games between CPU architectures (OSes weren’t that much of an issue, as games ran on bare metal) easier.

Zork had one in 1979 (https://en.wikipedia.org/wiki/Z-machine). I think that ended when games became truly interactive, as opposed to command-based, because, when that happened, performance became a bottleneck.

Another reason could have been is that it made programming easier, as 8-bit CPUs are so weak that running a virtual machine for the convenience of having such luxuries as 16-bit arithmetic sometimes made sense even then (e.g. https://en.wikipedia.org/wiki/SWEET16)

And of course, there is Forth, the ultimate “give me a VM that is tailored to this specific program” language (every word you define can be seen as a new instruction for your virtual machine)

Re:Amiga Java by brazzy on Friday January 10, 2020 @06:14PM (#22016638)
> I think that ended when games became truly interactive, as opposed to command-based, because, when that happened, performance became a bottleneck.

Counterexample: the recently posted article series about Another World - a VM-based game released in 1991 that was very interactive and graphics-heavy.

https://news.ycombinator.com/item?id=21937607

Re:Amiga Java by EvanAnderson on Friday January 10, 2020 @12:25PM (#22012697)
Zork and the Z-Machine[1] is a great early example of use of a VM in a game.

[1] https://en.wikipedia.org/wiki/Z-machine

Re:Amiga Java by bitwize on Friday January 10, 2020 @12:16PM (#22012571)
This also reminds me of Inferno, which was marketed as an OS for next-gen game consoles and set-top boxes by Lucent back in the 90s. Unfortunately it didn't get very far.
Re:Amiga Java by kjs3 on Friday January 10, 2020 @12:44PM (#22012882)
It got far enough to be the operating system for the Lucent 'Brick' line of firewall/VPN appliances. Those were modestly successful in the market. But, yeah, Lucent had big plans for Inferno that never really panned out.
Re:Amiga Java by asveikau on Friday January 10, 2020 @12:41PM (#22012849)
Never used it, but my recollection was the most radical thing about Inferno was it was based on a high level, JIT, GC'd language runtime.

I don't think Inferno people themselves said this, but I remember one of the things that people said in favor of memory safe JIT language operating systems was that the JIT would be able to optimize across multiple programs, or between kernel and user mode, since it didn't need to care about MMU based protections like a language with arbitrary pointers. And indeed you wouldn't need the high cost of the context switch.

In light of Spectre and meltdown that now sounds like a bad idea to me.

Re:Amiga Java by zozbot234 on Friday January 10, 2020 @12:45PM (#22012887)
Who cares about Spectre and Meltdown in a game console or set top box? These are information disclosure vulnerabilities. What info are you going to "disclose" about the game I'm playing on a console? Especially if the game console is airgapped because I'm playing a single-player game from a cartridge or optical disk.
Re:Amiga Java by asveikau on Friday January 10, 2020 @01:04PM (#22013134)
Do you think that they wrote the thing expressly for game console applications or perhaps they had a research idea and later found an application? Are we not talking about the same Inferno from Bell Labs?

Anyway I think I was describing a broader topic than Inferno. Eg. There was the singularity project at Microsoft that people spoke similarly about. Maybe Midori too? The latter may have moved away from the jit idea, there is some writing online about it that I have not read.

Re:Amiga Java by jt_snacks on Friday January 10, 2020 @02:14PM (#22014211)
>Who cares about Spectre and Meltdown in a game console or set top box?

The business model of consoles is subsidized hardware, with the bulk of revenue coming from game licensing fees (per copy). These vulnerabilities would reduce the security of the consoles which would directly put that business model at risk (unlicensed games + piracy).

>Especially if the game console is airgapped because I'm playing a single-player game from a cartridge or optical disk.

Between 10% and 30% (depending on who you ask) exclusively play only online games. The number of mixed is harder to discern but significant. About 50 million people use xbox live, microsoft's paid online gaming service. Last year, over 80% of game sales were digital. The business and consumer landscape simply would not accept airgapping.

These consoles are often used for other entertainment and health applications. Many of them have cameras attached to them (I know, I know). They are tied into peoples' cloud accounts. They are used for web browsing. They are used to watch porn. People deserve privacy, I think we can all agree.

You, personally, may not be affected, but these are concerns that cannot be ignored, both by users and business.

Re:Amiga Java by nwallin on Friday January 10, 2020 @09:21PM (#22017631)
"Security" in the context of a game console manufacturer means its users are unable to execute unlicensed code on it. So if Spectre or Meltdown are a concern, the system has already been compromised. It's not another layer on the onion, the onion is already gone. Security on a console is like a safe that contains the key to your Bitcoin wallet and the combination to the safe.

Usually there's SOC that manages IO, and the ROM contains a key/publisher cert. To run code on the main CPU, the SOC has to bless it. No code other than what's on the SOC's EEPROM can run on the EEPROM. And flashing the EEPROM requires the manufacturer's key; you load a potential image into the SOC's RAM, it verifies the image, it flashes the image.

Getting unlicensed code to run on modern consoles is generally more difficult than jailbreaking an iPhone. And even if you get your code to run by tapping the bus or whatever, there's no data in main memory that's worth stealing, nothing that could help you get a persistent break or anything. The valuable data lives in the SOC.

Preventing Spectre/Meltdown is less important than the extra 2-4% performance.

Re:Amiga Java by asveikau on Friday January 10, 2020 @11:50PM (#22018214)
Today's consoles have web browsers. So if it runs javascript, spectre and meltdown are a concern.
Re:Amiga Java by saagarjha on Saturday January 11, 2020 @05:40AM (#22019241)
> Getting unlicensed code to run on modern consoles is generally more difficult than jailbreaking an iPhone.

I think they're of similar difficulty.

Re:Amiga Java by pjmlp on Saturday January 11, 2020 @03:22AM (#22018866)
Security exploits on game consoles are also a means to win money on MMO with virtual currency, so game companies nowadays do care about Spectre, Meltdown and friends.
Re:Amiga Java by jlarcombe on Friday January 10, 2020 @12:27PM (#22012720)
Taos was a brief source of excitement on the Acorn platform, there was talk of using it for the never-finished Risc PC 2, although whether that was just marketing talk I'm unsure. I think there was a demo on the front of a magazine?
Re:Amiga Java by opless on Sunday January 12, 2020 @03:00PM (#22028809)
There's an ISO for a Windows (95?) based SDK floating about. It possibly is the very same CD that you mention.
Re:Amiga Java by octetta on Sunday January 12, 2020 @10:38PM (#22031621)
Anyone know how to track down a capture of that ISO?
Re:Amiga Java by opless on Monday January 13, 2020 @03:08AM (#22032700)
Last time I put a link on here I was downvoted. So Im not doing that again.

I do have contact details in my bio.

Re:Amiga Java by jacobush on Friday January 10, 2020 @11:26AM (#22012085)
Like Android.
Re:Amiga Java by pjc50 on Friday January 10, 2020 @11:41AM (#22012214)
Or Transmeta. Or even WebAssembly. It's an interesting trick but only useful if you demand a very high level of binary portability.
Re:Amiga Java by pjmlp on Friday January 10, 2020 @12:01PM (#22012405)
Or Burroughs, Xerox PARC mainframes, IBM mainframes language environments, UCSD Pascal, Lilith, Ceres, Inferno, Windows Phone 7, Windows Store, MicroEJ, watchOS bitcode,....

I think that the use of such systems has only increased, thanks to mainstream adoption of IoT devices and cloud environments.

OEMs can change their hardware at will while supporting existing applications, and cloud environments can be heterogeneous, without much issues moving applications around.

Re:Amiga Java by zozbot234 on Saturday January 11, 2020 @07:56AM (#22019631)
> IBM mainframes language environments

Not just mainframes either, AS/400 (for minicomputer-class machines, as opposed to mainframes) is the same way. A binary, hardware-independent VM is the officially-supported programming environment.

Re:Amiga Java by pjmlp on Saturday January 11, 2020 @08:18AM (#22019703)
Thanks for the correction. On my mind AS/400 keeps being a mainframe, I keep forgetting it had another hardware class.