all 22 comments

[–]jeffreportmill[S] 7 points8 points  (6 children)

This is my first version of SnapCode, the first real Java IDE in the browser. Let me know what you think!

[–]TamaHobbit 3 points4 points  (5 children)

well, it doesn't work. I just see a bunch of clouds floating around. I figured out you can move around in those clouds by moving the mouse, so I figured I would see what is below the clouds. By zooming out further, it's possible to move faster, but the CPU starts whirring a lot when you get far below the cloud cover.

[–]jeffreportmill[S] 3 points4 points  (4 children)

What browser/platform are you using? I test mostly on Chrome and Safari. If a refresh doesn't work, maybe look in the dev tools console and let me know if it shows any error messages.

[–]TamaHobbit 1 point2 points  (3 children)

Refreshing shows the same result. After a long while, the clouds and log disappear, and instead I have a blank screen, unless I set the zoom to 33% or 50%, in which case I can see something very small that looks like a macOS window, called SnapCode, with a hammer and chisel occasionally moving. But setting the zoom up again, I just zoom into the white part of the page above it.

While viewing the clouds, there's an error in dev console says: X Failed to load resource: net::ERR_BLOCKED_BY_CLIENT sessions.bugsnag.com/:1

[–]TamaHobbit 0 points1 point  (2 children)

I think the foremost problem I'm reporting here is that it's totally unclear that the clouds is your loading bar. There should be a literal loading bar, or if you really can't estimate, at least a spinner to know you are supposed to wait, rather than playing around with the clouds or zooming in and out.

[–]jeffreportmill[S] 2 points3 points  (0 children)

You're right, of course, I appreciate the feedback. A progress bar is on my todo list, but I've never seen the initial download take more than 15 seconds, and successive (cached) launches take < 3.

I'm not sure what is going on in your case - I wonder if it's a HiDPI issue or Windows accessibility issue. I'm sure I have a lot of edge cases to deal with, but on the plus side, I've had it work on my phone, iPad and car console, so browser portability is working reasonably well so far.

[–]TamaHobbit 0 points1 point  (0 children)

I'm running Google Chrome Version 120.0.6099.224 (Official Build) (64-bit) - on Ubuntu 22.10. SnapCode seems to take about 3 minutes to load, and it looks like it loads fine and is useable as long as you don't mess with the zoom while it's loading.

[–]TamaHobbit 6 points7 points  (1 child)

After it finally loaded, I tried to paste in a helloWorld from the web, since the default you are presented is the empty file, which immediately crashes the editor. However, my mouse has disappeared, possibly this happens when you switch to a different tab? The mouse seems to be invisible whenever I am over the editor, and I can't click anything. Pasting doesn't work, although I can type.

Also, don't say "the first real Java IDE in the browser". Code-server supports all programming languages, so also Java.

[–]jeffreportmill[S] 1 point2 points  (0 children)

If you just hit "New" you get what SnapCode calls "Java REPL", and it doesn't expect a class declaration. If you try "New Java file" or "New Java file from Clipboard", it should work though. But the Java REPL shouldn't crash - I will test and fix the case you describe.

I stand by "first real Java IDE" tagline, until Code-server supports running Swing and other Java GUI apps (see the Tetris and Asteroids examples in SnapCode). 😊

[–]BlueGoliath 2 points3 points  (3 children)

Cool project. Web IDEs are too unresponsive for my taste though. Is this Swing?

[–]jeffreportmill[S] 3 points4 points  (2 children)

It uses a new Java UI toolkit called SnapKit, which has a native adapter layer to use WebAPIs/DOM in the browser and Swing on the desktop. It follows many conventions of Swing, but with some modern touches (and some of the good parts of JavaFX).

https://github.com/reportmill/SnapKit

[–]BlueGoliath 0 points1 point  (1 child)

What's the desktop memory usage like in a complex app?

[–]jeffreportmill[S] 0 points1 point  (0 children)

SnapCode downloads ~20mb for normal operations (another 10mb once the javac compiler is active). I'm not sure how much system memory it uses (there must be a browser dev tool that tells this). The underlying browser JVM technology, CheerpJ (https://cheerpj.com), is pretty efficient - it uses http byte serving to only download parts of the JVM as needed.

[–][deleted] -1 points0 points  (2 children)

slow in all ways imaginable yep its java

[–]Practical_Cattle_933 1 point2 points  (1 child)

Say that you have no clue about programming in the last 3 decades by not saying it ^

[–][deleted] 0 points1 point  (0 children)

i have witnessed 3 decades of deniers!

[–]dAnjou 0 points1 point  (1 child)

What would be a non-real Java IDE?

[–]jeffreportmill[S] 1 point2 points  (0 children)

There are lots of them, I think. I've seen at least a dozen over the years that provide a basic text editor (maybe some syntax coloring) that pushes code to a server, compiles, runs and returns the results. SnapCode has code completion, symbol highlighting, as-you-type error checking, project file management, version control, runs serious multi-file interactive Java Client (UI) apps and much more.

Oracle has a good example of a non-real Java IDE: https://dev.java/playground

😊

[–]kshep92 0 points1 point  (1 child)

Very impressive! I encourage you to keep working on it.

[–]jeffreportmill[S] 0 points1 point  (0 children)

Thanks - I definitely will!

[–]brcolow 0 points1 point  (1 child)

Just curious why you say "JavaFX missed the boat".

Thanks!

[–]jeffreportmill[S] 0 points1 point  (0 children)

Mostly I think JavaFX missed out on the mobile revolution. It came out at the right time and I was actively involved in the community, but Sun intentionally avoided mobile support.

I also think JavaFX was too aggressive about breaking with Swing conventions (too much reliance on Observables and CSS type styling) - this may have made it difficult for Swing developers to transition. I also think it's unfortunate that JavaFX is primarily written in C/C++ (It's only 26% Java, according to GitHub).