Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update espresso-jshell demo. #115

Merged
merged 6 commits into from
Jun 20, 2022

Conversation

mukel
Copy link
Member

@mukel mukel commented May 9, 2022

This PR is an update for building the demo with Java 17 and documentation improvements.

Fix build with Java 17.
Document -Dorg.graalvm.home argument to espresso-jshell.
@@ -24,7 +24,7 @@ jobs:
run: |
cd espresso-jshell
./build-espresso-jshell.sh
echo "Math.PI" | ./espresso-jshell
echo "Math.PI" | ./espresso-jshell -Dorg.graalvm.home=$GRAALVM_HOME
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does $GRAALVM_HOME need to be passed in? Is there no way to detect this from inside the espresso-jshell?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! Now it tries to set/initialize org.graalvm.home and java.home from the GRAALVM_HOME env. variable.
Running just ./espresso-jshell may give the false illusion that the executable is fully standalone.
I added a small section to the README explaining this.


JShell is a Java read-eval-print loop tool first introduced in the JDK 9, but this demo also shows how to run `jshell` on Java 8.
JShell is a Java read-eval-print loop tool first introduced in Java 9, this demo also allows to run `jshell` on Java 8.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
JShell is a Java read-eval-print loop tool first introduced in Java 9, this demo also allows to run `jshell` on Java 8.
JShell is a Java read-eval-print loop tool first introduced in Java 9, this demo also allows running `jshell` on Java 8.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I manually fixes this nits in the latest version.

@mukel mukel force-pushed the a2p/espresso-jshell-improvements branch 2 times, most recently from 8695c63 to 8dfaa28 Compare May 17, 2022 14:37
@mukel mukel force-pushed the a2p/espresso-jshell-improvements branch from d389c68 to 3ea5971 Compare May 18, 2022 01:50
@fniephaus fniephaus requested a review from olyagpl June 20, 2022 11:34
@fniephaus fniephaus self-assigned this Jun 20, 2022
@fniephaus fniephaus merged commit a5a7d30 into graalvm:master Jun 20, 2022
You will build a native executable of `jshell`, that executes dynamically generated bytecode on Espresso.
This hybrid mode achieves instant startup, beating the vanilla `jshell` in both: time to the first interaction and time to evaluate a simple expression.
This demo showcases the integration between [GraalVM Native Image](https://www.graalvm.org/reference-manual/native-image/) and [Java-on-Truffle (Espresso)](https://www.graalvm.org/reference-manual/java-on-truffle/).
It builds a native image of `jshell`, that executes the dynamically generated bytecodes on Espresso. This hybrid mode achieves instant startup, beating the vanilla `jshell` in both: time to the first interaction and time to evaluate a simple expression.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bytecodes > bytecode

This demo showcases the integration between [GraalVM Native Image](https://www.graalvm.org/reference-manual/native-image/) and [Java-on-Truffle (Espresso)](https://www.graalvm.org/reference-manual/java-on-truffle/).
It builds a native image of `jshell`, that executes the dynamically generated bytecodes on Espresso. This hybrid mode achieves instant startup, beating the vanilla `jshell` in both: time to the first interaction and time to evaluate a simple expression.

JShell is a Java read-eval-print loop tool first introduced in Java 9, this demo also allows running `jshell` on Java 8.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JShell is a Java read-eval-print loop tool first introduced in Java 9, this demo also allows running jshell on Java 8.

JShell is a Java "read-eval-print loop tool" first introduced in Java 9, and this demo also allows running jshell on Java 8.

It builds a native image of `jshell`, that executes the dynamically generated bytecodes on Espresso. This hybrid mode achieves instant startup, beating the vanilla `jshell` in both: time to the first interaction and time to evaluate a simple expression.

JShell is a Java read-eval-print loop tool first introduced in Java 9, this demo also allows running `jshell` on Java 8.
For further discussions and questions please join our `#espresso` channel on the [GraalVM Slack Community](https://graalvm.slack.com/).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on the GraalVM slack community > in GraalVM slack community

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants