Hacker News new | past | comments | ask | show | jobs | submit login
B2fJ – A Java Virtual Machine to run on the 8-bit home computers of the 80s (mzattera.github.io)
109 points by muterad_murilax on Aug 3, 2017 | hide | past | favorite | 32 comments



"Preemptive threads with synchronization."

From working in 6502 asm in the 80s on a c64 I must say:

Most astonishing.


In an interpreter, appearing to do threads is easy. Just interpret some instructions from one "thread", then some from next, etc


That's pretty much what Python does, no?



"I keep getting asked why I'm programming for a Sega Genesis system in Java, the reason is I'm hoping someone from Sega or Sun Microsystems finds this page and offers me a job."

"Posted: November 17, 2015"

Oh man... I think he's been trapped in a hole coding for a very long time... Should I tell him or should you?


I was hoping he was being sarcastic. Oh boy. Impressive technical achievement though.


That's a very different thing, though - a native compiler targeting a 68k (decadent luxury!), rather than a JVM on a 6502.


See also this, which is (as far as I can tell) the JVM for the Apple II: http://forum.6502.org/viewtopic.php?f=2&t=2224&p=20418


Java fell into a disrespect among much of the younger crowd to a considerable degree - in contrast to the almost universal excitement about it some 20 years ago.

But I still find it an amazing, very well-engineered, extremely versatile platform that works on large machines and tiny microcontrollers alike and is easy to extend to new devices!


You find Java well engineered or you find the JVM well engineered? Java may go down in history for the most destructively designed programming language ever created. The entire standard library and methodology is to create every little piece of data on the heap, then use extremely deep inheritance as a substitute for the ability to write generic software pieces.

Not only is the "Object Oriented" way of doing things arguably a blight on software design, both allocation and chasing of virtual pointers are devastating to modern performance. Then to combat this, the JVM is an engineering marvel that has matured over 20 years.


> Not only is the "Object Oriented" way of doing things arguably a blight on software design, both allocation and chasing of virtual pointers are devastating to modern performance.

Um, this is not unique to Java, you know. Even C++ does this.


It is easily avoided in C++ by putting most values on the stack. Also with templates, inheritance isn't needed for generic data structures.


Java wasn't the first language with those features.

Pointer chasing OOP goes back to all languages that got themselves inspired by Smalltalk and SELF.


Java is full of problems.

JVM is a wonderful thing.

However OOP is great. OOP is no bad stuff, take a look at Smalltalk. The problem is Java's way of OOP. And let's not talk about java primitive types!!


well the jvm is actually making the whole allocations a little bit better with upcoming vm's. and that's exactly the problem it just takes too long for a new java release.


I'm part of that younger crowd, and it's probably because they associate it with a) their first CS class b) 90s Java applets on the web while growing up and c) Oracle.

I love Java, and I've learned to let go of (a) and (b).


"Java" is an overloaded term. The virtual machine is pretty good. Implementations have seen a huge amount of attention over the decades, and it shows. The design seems to have stood the test of time pretty well.

The language is bad. It seems to have been designed with the primary goal of ensuring that really bad programmers can still get something done and not be too destructive about it.

I think another part of it is that people were really excited about the "write once, run anywhere" promise that Java held. That promise didn't really work out, and to the extent that it did, lots of other languages now offer it too.


Go is better for that goal.

Java is already too advanced for them.


The excitement wasn't all the universal. I remember we advertised our CMS as "100% Java- and JavaScript-free" ;-)



That can be build for c64 easily and thus give you support of garbage collection, threads, arrays, and well, all of java


Really cool! Wish floating point was working though... software float can be useful!


Anyone know of a Java VM that works on Arduino?



In the mean time, I'm struggling to open Atom on an i7 processor with 16GB of memory.


You'll probably get downvoted, but I can't help having the same thoughts when reading a headline like this


And even Swing allows for better OS integration than a plain Webview.


I feel you bro'

I remember browsing with 16 MB of memory... and it still feels the same, specially now with Chrome hogging the fan, CPU and mouse...


Nobody force you to use Atom. In fact, there are half dozen alternatives that are faster and feature complete.


But can it run Doom?


Kinda sorta depending on what you think of as a C64 and what you think of as Doom.

Proper Doom on extended C64: https://www.youtube.com/watch?v=7ZzivzuDOls - even then the framerate is horrible.

Doom with heavily simplified graphics and stuff (M.O.O.D. Doom) on a proper C64: https://www.youtube.com/watch?v=YQcK527rYJI


If an Atari 2600 can run Halo, why not?

https://en.wikipedia.org/wiki/Halo_2600




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: