Is it possible to run JShell like REPL on GraalVM 19.11? - graalvm

I tried to execute few lines of Java and JavaScript codes on GraalVM. i used REPL for JavaScript and node. it works awesome but i couldn't find jshell REPL to run java code.
when i refer https://www.graalvm.org/docs/getting-started/ document. i see below way to run java code.
$ javac HelloWorld.java
$ java HelloWorld
GraalVM 19.1.1 is based on JDK version 8u222, whereas jshell was introduced since JDK 9. I hope only in future GraalVM can accommodate jshell REPL.
Is it possible to run jshell REPL on GraalVM? is there any other tool available to run jshell REPL on GraalVM?

Related

lua script and when executed via wrk the version is different

I have a lua script test.lua
which when executed lua test.lua it executes and provides me output as expected and it uses lua 5.3 when compiling
But when i execute the same test.lua via wrk (http performance test benchmark brew tool) , it reached to lua 5.1 (which I dont have in my system) rather than 5.3
And there is no any wrk config which tries to reach to lua 5.1 . I am not sure why it behaves different and hits different version of lua
An hint to this confusion will be appreciated.
From the LuaJIT site, here:
LuaJIT is API-compatible with Lua 5.1
wrk uses LuaJIT, as noted here.

How do I run a Lua script on fceux on Mac os?

First I start the emulator.
Then I load dragon warrior ROM.
Then I try to access the lua script menu.
However fceux will not let me access the main menus anymore. I can only control the emulator.
What is the right way to run a Lua script in version 2.2.3?
The documentation below is obviously lacking. No window pops up. See the **** there is no run Lua script option.
The fceux docs say this:
To run a Lua script, choose "Run Lua Script" from where  In the dialog that pops up, click "Browse" and find the file you wish to run.  This will insert the path of this file into the dialog.  You can then click on "Run" to run the script or "Cancel" to return to FCEUX without running the script.
To end a Lua script, choose "Stop Lua Script" from where.
You're reading documentation for the windows version and trying to apply it to the portable version. They aren't the same. Learn to use wine or virtualization and use the windows version.
If you insist in using the portable version, you can use --loadlua myfile.lua, assuming your fceux has been built with lua support (and who can say how it was built on linux or osx?)

Yeoman. The filename, directory name, or volume label syntax is incorrect

Reinstalled Windows 10 (Version 10.0.14393). Reinstalled the following:
Java
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
nodejs (v6.9.5)
NPM (3.10.10)
Yarn (v0.19.1)
Yeoman (installed with yarn global add yo)
When I write yo -v in cmd in any folder, runned with administrator or not, I take:
The filename, directory name, or volume label syntax is incorrect.
UPDATE:
The only workaround I found is to use the full path of yo:
C:\Users\<username>\AppData\Local\Yarn\config\global\node_modules\.bin\yo.cmd
It may be that your PATH does not point to global NPM modules yet. The FAQ and links are more helpful for gnu/linux or mac users. The PATH is a list of the places that your operating system checks whenever you type a command.
Since you are using Windows, to add the modules path temporarily (just for one session) at the prompt, just type (obviously use the correct path with your correct username and please take note of the ; separator character):
path = %path%;C:\Users\<username>\AppData\Local\Yarn\config\global\node_modules\.bin\
You should then be able to run 'yo -v' without pointing to the full path name, since the console now knows to check that folder also. If that works for you, you can add that path permanently using the instructions described on another SO post here.
Finally (and this is only slightly related to your question), since i notice you've got the Windows 10 anniversary update, if you have Linux experience, you may prefer to use "Windows subsystem for Linux", which is a bash shell (Ubuntu 14) on Windows, that you can use instead of the default command prompt. You can find it under "Add / Remove programs --> Turn Windows features on or off --> (scroll right down) --> Windows subsystem for Linux (beta)". Your local file system will be at "/mnt/c" so you can get to it from within the shell or from windows explorer. I've had fewer problems using this and since so many tutorials are written with bash (not command prompt) in mind, it's useful to use it instead of cmd.
You'll need to install dependencies in the usual way using apt-get (as it won't use the ones you've installed on the windows side) and you'll need to prefix commands that make system changes with 'sudo'. e.g.
sudo npm -g modulename

How to get color in Windows gitbash using bundle exec rake test

I am following Rails Tutorial. I am on section 3.7.1 and I am trying to get color in my gitbash command prompt when running bundle exec rake test. I have tried installing ansi, the win32console gem and the gem called turn and nothing seems to work.
Is it even possible to get red and green colors when running bundle exec rake test?
You definitely can get colored output to show up. But not with using the standard Windows cmd.exe or powershell. Gems won't help. You need to need add the ability to correctly interpret ANSI escape codes to your system -- something that cmd and powershell aren't able to do. (ANSI.sys was how ANSI escape codes were handled under DOS. cmd and powershell don't use it.)
You need to (1) install ANSICON and/or (2) install and use a different console/console emulator or shell that handles colors (ANSI escape codes).
(1) ANSICON is a program for Windows that interprets ANSI escape codes so that color is displayed. It kind of runs 'on top of' cmd or powershell. You can set it up so that it's always used whenever you use cmd or powershell, or use it only at specific times. Most people install this and are really happy with it.
Jason Karns wrote a blog post about installing and using ANSICON for git bash (on Windows) that folks have found helpful.
(2) Here are the popular options for alternatives to cmd/powershell. These are console emulators and tools and shell alternatives:
ConEmu - ("ConEmu-Maximus5") This is a console emulator, not a shell. You can use it with any shell (cmd, powershell, cygwin, bash, etc). But in day-to-day use, once you set it up, you use it just like you'd use cmd.exe or powershell, etc. (I use this so know more about it than the other choices. I have configurations for it to start up with different git/ruby version/rails version configurations as needed. I don't use ANSICON because I use ConEmu whenever I need to open up a console.)
Console 2 - Like ConEmu, this is a console emulator that adds functionality above and beyond cmd.exe (including displaying ANSI colors). You can use it with existing shells (e.g. powershell, etc.) Here's a SO answer that talks about using Console 2.
Console Z - a fork of Console 2 that is current and actively maintained. I haven't ever used it, but here is some info on how you'd configure Console Z to work with git bash.
You can also (or instead of) use a Unix-like shell (or suites):
Cygwin is the best known suite of Unix-like commands that runs in Windows. Comes with shells (e.g. MinTTY) that can be used and will work with ANSI codes
Babun A windows shell that sits on top of a cygwin install. Configurable; you can create configurations (e.g. for git bash or rvm or whatever) and share them as plug-ins. (Uses the mitty console.)
MinGW - A "Minimalist GNU for Windows" that has a GNU toolset for windows, focused on those tools needed for development. (IOW, it's a smaller and slightly different set than Cygwin provides.) DevKit, used to complie ruby gems into native windows code, uses MinGW.
MinSYS - "[A] contraction of "Minimal SYStem", is a Bourne Shell command line interpreter system. Offered as an alternative to Microsoft's cmd.exe, this provides a general purpose command line environment, which is particularly suited to use with MinGW, for porting of many Open Source applications to the MS-Windows platform; a light-weight fork of Cygwin-1.3, it includes a small selection of Unix tools, chosen to facilitate that objective." (From the MinGW site:)
Some searching might turn up additional options. These are the options most talked about and used (based on talking with others IRL, StackOverflow, and doing searching now and previously.)
Install and set one of those options (it won't take long), and then you'll be all set to see the helpful colors used by RSpec or git or whatever.

Dart Editor: It didnt work?

I launched Dart Editor yesterday but it didn't work giving the error:
("A Java Runtime(jre) or Java Development Kit(jdk) must be avaible in
order to run DartEditor. No Java virtual machine was found after
searching the following loacations:
C:\Users\name\Donwloads\darteditor-windows-x64\dart\jre\bin\javaw.exe
jawaw.exe in your current PATH ")
Do you think how i going to fix this error ?
Thanks
Checkout this link:
https://www.dartlang.org/tools/editor/troubleshoot.html
"Launching Dart Editor"
Your Java version should have the same bit width as your Dart Editor version. For example, if you're using a 64-bit Dart Editor, then you should use 64-bit Java. Otherwise, you might see a message like this when you try to launch Dart Editor:
Failed to load the JNI shared library "C:\Program Files(x86)\Java\jre6\\bin\client\jvm.dll
To determine which version of Java you are running, do one of the following:
1-Go to CMD type java -version.
2-Go to Start -> Programs and Features.
Specifying the Java runtime
If necessary, you can specify the Java runtime that Dart Editor uses. Go to your Dart installation directory and add the following two lines to DartEditor.ini immediately before the existing ‑vmargs line:
-vm
/full/path/to/java
Important: On Windows, use double backslashes (\) as the directory separator:
-vm
c:\\bin\\java_jdk1.7.0\\bin\\javaw.exe
For example, DartEditor.ini might have:
-vm
/usr/local/buildtools/java/jdk-64/bin/java
-vmargs
You just need to download the Java Development SDK and your Java version should have the same bit width as your Dart Editor version. For example, if you're using a 64-bit Dart Editor, then you should use 64-bit Java. Otherwise, you might see a message like this when you try to launch Dart Editor:
You can download it here:
http://www.oracle.com/technetwork/java/javase/downloads/index.html?ssSourceSiteId=otnjp
and specify the java/bin directory in the darteditor.ini file.you can specify the Java SDK that Dart Editor uses. Go to your Dart installation directory and add the following two lines to DartEditor.ini immediately before the existing ‑vmargs line:
-vm
/full/path/to/java
Important: On Windows, use double backslashes () as the directory separator:
-vm
c:\\bin\\java_jdk1.7.0\\bin\\javaw.exe
For example, DartEditor.ini might have:
-vm
/usr/local/buildtools/java/jdk-64/bin/java
-vmargs
If it still doesn't work then you can follow this:
https://www.dartlang.org/tools/editor/troubleshoot.html
I made jre folder in my dart program folder.
And loaded there latest JRE. (Java runtime environment)
It stays in every new darteditor installation.
Better / right way would maybe be using path clause...
I dont know how to.. / dont want to use it.
My choise might need to load new version of jre now and then.
Hope this helps you...

Resources