gjs -c "(() => print('hello'))()"Jsc: My New Best Friend
31–40 of 44 posts
Re: Jsc: My New Best Friend
#32Also on windows, C:\Windows\System32\cscript.exe ( https://en.wikipedia.org/wiki/Windows_Script_Host ) Which run a less modern version of ECMA script, but does have access to COM objects
True story: Some years ago, a consulting assignment involved analyzing a bunch of data saved on a slow as molasses NAS using SAS's data format. The work was CPU intensive but IO throughput was the bottleneck. The analysis was close to being embarrassingly parallelizable[1] given an appropriate partitioning of the data. The only thing installed on the remote system I was given access to via RDP was SAS whose macro fac…
Re: Jsc: My New Best Friend
#33Not in front of a keyboard, but does tr not work? echo "something in turkish" | LC_ALL=tr_TR tr "[:lower:]" "[:upper:]"
Re: Jsc: My New Best Friend
#34Sounds a lot like NodeJS.
Re: Jsc: My New Best Friend
#35Neat. Also if you've got java installed, there's jrunscript jjs Both invoke the nashorn javascript engine.
That has been dropped in Java 10 and Java 17 is getting released next month, thus only works in what I consider legacy runtimes. https://openjdk.java.net/jeps/372
Re: Jsc: My New Best Friend
#36Earlier quoted context omitted.
That has been dropped in Java 10 and Java 17 is getting released next month, thus only works in what I consider legacy runtimes. https://openjdk.java.net/jeps/372
Well, then it is still on many production systems that still run on Java 8.
Re: Jsc: My New Best Friend
#37Earlier quoted context omitted.
True story: Some years ago, a consulting assignment involved analyzing a bunch of data saved on a slow as molasses NAS using SAS's data format. The work was CPU intensive but IO throughput was the bottleneck. The analysis was close to being embarrassingly parallelizable[1] given an appropriate partitioning of the data. The only thing installed on the remote system I was given access to via RDP was SAS whose macro fac…
I'm not sure if your post was meant to imply this was against the rules but you can upload files via RDP file sharing.
Yes, this is not as useful as people think it is. In real life, it ends up kneecapping productivity while enabling checkbox driven security.
Regardless, it was also part of the contract that one was not allowed to upload/download or use copy&paste.
I did point out they had forgotten to explicitly prohibit setting up a camera pointed at the screen, but the humor was not appreciated.
Re: Jsc: My New Best Friend
#38Earlier quoted context omitted.
Yeah, there isn't really any reason to use it over something like nodejs, especially since it doesn't look like the code is portable (e.g. print instead of console.log, etc.). It's not like it's the only scripting language available either, OSX comes with ruby, python2, python3 and perl by default.
The big difference is that it comes preinstalled. If you had a whole company on MacBooks but not all of them had Node installed, and you wanted to distribute a script written in JavaScript, this could be handy Fairly niche, but not useless I could also imagine some sort of Electron-alternative using the builtin JS interpreter for system stuff alongside the builtin webview for the UI
Except when Apple decides to remove it from the default setup.
Re: Jsc: My New Best Friend
#39Javascript is more fun away from the web The most fun I've ever had programming was in max/msp https://cycling74.com/ things that are difficult to do in code, processing multiple simultaneous signals is done visually, running lines between object, but when you do want to write code, you open a code window and write javascript, and can then run visual patch cables to your javascript code representing the inputs and ou…
Can you do this with PureData too?
Re: Jsc: My New Best Friend
#40Earlier quoted context omitted.
Well, then it is still on many production systems that still run on Java 8.
Yeah, Java's version of Windows XP and Python 2, time to move on.