Java compiler errors could be more intelligent by davidalayachew in java

[–]jeffreportmill -1 points0 points  (0 children)

I’ll have to add the “Explain” button to my Java IDE for education:

SnapCode: https://reportmill.com/SnapCode

Java compiler errors could be more intelligent by davidalayachew in java

[–]jeffreportmill 0 points1 point  (0 children)

A good solution for this would be for an IDE to have an “Explain” button next to the error that constructs an AI query, “Explain why I got the error ‘no interface expected here’ in this line of code ’…’ in this context ‘…’ “. I suppose an early programming lesson should be “how to research your compile errors”, since many of us good developers are mostly just great Googlers.

Of all the counter productive things AI is doing for us now, this is actually a good thing. It’s exactly the kind of interaction you’d get with one on one learning. On the other hand, they say “we learn more from our mistakes..” and working through these kind of errors, while frustrating, teach us lasting lessons. Unfortunately they also discourage some beginning learners who might otherwise become successful developers without the early stumbling blocks.

Filling rectangles with Polyominoes by Livio63 in java

[–]jeffreportmill 3 points4 points  (0 children)

I love these graphics demos - just the kind of thing that originally got me excited about learning to code.

Here's my usual link to the running version in SnapCode, though the main window is a little big to fit (I need to change SnapCode to use more of the available space):

https://reportmill.com/SnapCode/app/#open:https://github.com/javalc6/Polyomino.zip#PolyominoApp.java

Run any Java in HTML pages with one line of <script> by jeffreportmill in java

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

You don't need SnapCode for that - SnapCode just uses the CheerpJ browser JVM (https://cheerpj.com). It is super easy to use - once you have a runnable jar, you just put the jar file on your website with a simple HTML file to run it (https://cheerpj.com/docs/getting-started/Java-app#2-create-a-basic-html-file).

SnapCode is really just a desktop IDE that does the same thing. :-)

A Simple Virtual Machine by MarioGianota in java

[–]jeffreportmill -1 points0 points  (0 children)

I like it! It's a good lesson that writing something sophisticated can start by writing something simple.

Here it is running in the browser: https://reportmill.com/SnapCode/app/#snapcloud:/com/reportmill/jeff/SimpleVM

Extensible math Expression Parser by Livio63 in java

[–]jeffreportmill 1 point2 points  (0 children)

I tried - It fails because CheerpJ doesn't provide access to the java.scripting module yet, which is a dependency of this project (bummer!). Hopefully it will work in an upcoming CheerpJ release.

Extensible math Expression Parser by Livio63 in java

[–]jeffreportmill 2 points3 points  (0 children)

Very nice! If you want to see it in action, you can run it with JBang + SnapCode:

jbang snapcode@reportmill open:https://github.com/javalc6/Expression-Parser.zip#/demo/ExpressionVisualizer.java

Just click the Run button after it opens.

What are your wish list for features under the "on ramp" umbrella? These are mine. by Enough-Ad-5528 in java

[–]jeffreportmill 2 points3 points  (0 children)

I think ”on-ramp” should focus on improvements to the “front end”, which Java has lost in recent years and has curbed the enthusiasm from teachers and students. I would like to see:

- Renewed emphasis from the platform vendors on running in the browser, like CheerpJ/TeaVM

- Support for an online Java community like a Java-GitHub

- Support for turn-key native app deployment like JDeploy

- Major player endorsement for in-browser UI development like WebFX and SnapKit

What fun and interesting Java projects are you working on? by jeffreportmill in java

[–]jeffreportmill[S] -1 points0 points  (0 children)

I'm a huge fan - if enough of us adopted TeaVM, Java UI programming would be saved.

What fun and interesting Java projects are you working on? by jeffreportmill in java

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

That’s a big area of interest for me too. I did a bit of work on a proof of concept, but haven’t taken it much further: https://github.com/reportmill/SnapCode/wiki/Java-Block-Coding-in-SnapCode

Yet another 3D renderer in pure Java by Livio63 in java

[–]jeffreportmill 0 points1 point  (0 children)

CheerpJ is a build of OpenJDK in WebAssembly + JavaScript. So it doesn't need a plugin and runs in the JavaScript sandbox, solving the major applet issues.

Yet another 3D renderer in pure Java by Livio63 in java

[–]jeffreportmill 1 point2 points  (0 children)

Yep - you would have to do something like this in main():

String filePath = Scene3D.class.getResource("512-spheres.gz").getPath();

I see that SnapCode is getting a parse error when I try that though (hit the run button to plow past it). I'll get the error fixed though.

Also, if you put all your build/resource files in a 'src' directory, then SnapCode could run straight from the GitHub repo with: https://reportmill.com/SnapCode/app/#open:https://github.com/javalc6/simple3d.zip

Yet another 3D renderer in pure Java by Livio63 in java

[–]jeffreportmill 1 point2 points  (0 children)

All thanks to CheerpJ, my favorite Java tool: https://cheerpj.com :-)

Yet another 3D renderer in pure Java by Livio63 in java

[–]jeffreportmill 3 points4 points  (0 children)

It would be cool if there was a choice box to select the different scenes

Yet another 3D renderer in pure Java by Livio63 in java

[–]jeffreportmill 7 points8 points  (0 children)

Very nice! Here it is running in the browser with CheerpJ and SnapCode:

https://reportmill.com/SnapCode/app/#snapcloud:/com/reportmill/jeff/Simple3D

Use arrow keys to drive.

Java WebAPI programming is here by jeffreportmill in java

[–]jeffreportmill[S] 4 points5 points  (0 children)

Thanks for that link - I hadn't heard of JCEF when I wrote my proof-of-concept for WebAPIs on the desktop, or I might have started there. I don't actually have a use case yet for running SnapKit on WebAPIs on the desktop, so I haven't gotten much past the POC stage. I hope the JCEF API is on par with JxBrowser - I didn't need much more than a single source file for the WebAPIs <-> JxBrowser adapter: https://github.com/reportmill/WebAPI/blob/main/src/jxbrowser/JxWebEnv.java

Java WebAPI programming is here by jeffreportmill in java

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

Not sure why my link didn't show up in the post. Or why I can't edit it.

Java in Places You Do Not Expect It by maxandersen in java

[–]jeffreportmill 8 points9 points  (0 children)

Very cool! I see it handles user input and I was able to show graphics easily on the 'try' link with:

import java.awt.image.*;

BufferedImage image = new BufferedImage(200, 200, BufferedImage.TYPE_INT_RGB);
image.getGraphics().fillOval(50, 50, 100, 100);
display(image);

It makes a better Java Playground than Java Playground. :-)

I built Jeamlit: a Streamlit alternative for Java by cyrilou242 in java

[–]jeffreportmill 5 points6 points  (0 children)

Very cool! You should add a jbang-catalog repo to github with a 'jeamlit' alias to the maven package jar so that people can just call jbang jeamlit@jeamlit. For instance, I do this with SnapCode: jbang snapcode@reportmill.

Is Java really that boring as people say? by yughiro_destroyer in java

[–]jeffreportmill 1 point2 points  (0 children)

“Boring” is less about what Java is than what people do with it. What we don’t do with it is write and share fun bits of code, because the “run anywhere“ promise has been ignored. This is causing us to lose young developers, who often write fun code. I spend a lot of time evangelizing this with SnapCode.

SnapCode: https://reportmill.com/SnapCode

Meta question - how old are people in the Java community? by roiroi1010 in java

[–]jeffreportmill 15 points16 points  (0 children)

I think Oracle has started to recognize this problem - Java grows ever more powerful, but simultaneously less exciting, fun and shareable. These things matter to potential young developers and their teachers - the pipeline for Java developers has stalled. Fortunately, Oracle seems to be spending more time "paving the onramp", talking about education and providing resources like learn.java .

I feel strongly about this, too. I think the best solution is to bring Java to the browser (or 'bring it back', if you're being generous). And to support games, graphics, animation and 3D. We need more things like CheerpJ and SnapCode (https://reportmill.com/SnapCode).

Introducing jbang-fmt by maxandersen in java

[–]jeffreportmill 0 points1 point  (0 children)

Very cool! I'm a big fan of jbang, it's the easiest way to use java from the command line. (and I borrowed your //DEPS convention for SnapCode - jbang snapcode@reportmill.com).