Two more tech demo's.
VMS Tech Demo 14 - Groovy for scripting:
https://www.vajhoej.dk/arne/articles/vmstd14.html
On 3/2/24 7:14 PM, Arne Vajhøj wrote:
Two more tech demo's.
VMS Tech Demo 14 - Groovy for scripting:
https://www.vajhoej.dk/arne/articles/vmstd14.html
How does Groovy compare to BeanShell?
https://github.com/beanshell/beanshell
A job search at dice.com find 239 Groovy jobs and 0
BeanShell jobs. I am sure there are plenty of jobs
where BeanShell is used but its usage is not
important enough to warrant being mentioned in the ad.
On 3/3/2024 12:54 PM, Arne Vajhj wrote:
A job search at dice.com find 239 Groovy jobs and 0
BeanShell jobs. I am sure there are plenty of jobs
where BeanShell is used but its usage is not
important enough to warrant being mentioned in the ad.
Or to to rephrase: "Groovy developer" is a thing while
"BeanShell developer" is not a thing. BeanShell is a skill
like JDBC, JPA, JMS, JNI etc. for a "Java developer".
On 3/3/2024 9:38 AM, Craig A. Berry wrote:
On 3/2/24 7:14 PM, Arne Vajhøj wrote:
Two more tech demo's.
VMS Tech Demo 14 - Groovy for scripting:
https://www.vajhoej.dk/arne/articles/vmstd14.html
How does Groovy compare to BeanShell?
https://github.com/beanshell/beanshell
Good question.
And I am not an expert on the topic.
But to my understanding then:
* they are relative similar in language syntax and features today
* they came from a very different (opposite) background:
- BeanShell started as Java interpreter and evolved
into a full script language with optional typing
- Groovy started as a Java-like scripting language
without typing that added typing later
* they are used for different purposes:
- BeanShell is very much used for JSR223 embedded
scripting language in Java applications
- Groovy got a much broader usage:
. web applications (Grails framework, Groovelets)
. more general scripting (the world dominated by
Perl and Python)
. JSR223 embedded scripting language in Java applications
* Groovy is more used than BeanShell - especially
Grails have a reasonable big user base
I have only used BeanShell as embedded script engine
for 100% Java compatible. I have dabbled in Groovy for both
web and scripting.
On 2024-03-03, Arne Vajhøj <arne@vajhoej.dk> wrote:
On 3/3/2024 12:54 PM, Arne Vajhøj wrote:
A job search at dice.com find 239 Groovy jobs and 0
BeanShell jobs. I am sure there are plenty of jobs
where BeanShell is used but its usage is not
important enough to warrant being mentioned in the ad.
Or to to rephrase: "Groovy developer" is a thing while
"BeanShell developer" is not a thing. BeanShell is a skill
like JDBC, JPA, JMS, JNI etc. for a "Java developer".
$ set response/mode=good_natured
Hmmm, I wonder how many Java developers claiming JNI as a "skill"
could actually _use_ JNI (and make it work!) ? :-)
JNI requires a very different mindset and knowledge base than most
of the other Java development skills...
JNI is tricky (read: it sucks).
On Mon, 4 Mar 2024 15:49:27 -0500, Arne Vajhøj wrote:
JNI is tricky (read: it sucks).
I managed to do some stuff in Android with it, back in the day. I
created a Python script
<https://bitbucket.org/ldo17/jniglue/src/master/> that generates
slightly more convenient wrappers around the entry points in the
JNIEnv object, e.g. for the NewStringUTF method:
static inline jstring JNNewStringUTF(JNIEnv* env, const char* a1)
{
return
(**env).NewStringUTF(env, a1);
} /*NewStringUTF*/
so you call it like this:
const jstring msgobj = JNNewStringUTF(env, usebuf);
I felt it made things much more bearable.
That converts the C++ API to a C API ...
PS: (**env).Foobar is rather unusual - the common style is
(*env)->Foobar.
On Mon, 4 Mar 2024 19:17:03 -0500, Arne Vajhøj wrote:
That converts the C++ API to a C API ...
No, it’s all strictly C.
f(a1, a2, a3) to be C++f(o, a1, a2, a3) to be C
f(o, a1, a2, a3) to be C++ API in C language
PS: (**env).Foobar is rather unusual - the common style is
(*env)->Foobar.
I don’t understand why. It’s the same number of characters either way.
But I consider:
f(a1, a2, a3) to be C++
On 3/5/2024 5:53 PM, Lawrence D'Oliveiro wrote:
On Tue, 5 Mar 2024 17:48:21 -0500, Arne Vajhøj wrote:
But I consider:
f(a1, a2, a3) to be C++
If you can refer to o as “this”, that’s C++. You can’t do that in C.
But this is not available by magic. It is there because
it (at least in some implementations - I doubt that the
standard define the "how") pass it as a hidden 1st argument.
On Tue, 5 Mar 2024 17:48:21 -0500, Arne Vajhøj wrote:
But I consider:
f(a1, a2, a3) to be C++
If you can refer to o as “this”, that’s C++. You can’t do that in C.
Arne
On 3/5/2024 5:53 PM, Lawrence D'Oliveiro wrote:
On Tue, 5 Mar 2024 17:48:21 -0500, Arne Vajhøj wrote:
But I consider:
f(a1, a2, a3) to be C++
If you can refer to o as “this”, that’s C++. You can’t do that in C.
But this is not available by magic.
Two more tech demo's.
VMS Tech Demo 14 - Groovy for scripting:
https://www.vajhoej.dk/arne/articles/vmstd14.html
Covering:
* basic scripting
* using to SYS$ and LIB$ functions
* accessing index-sequential files, databases and message queues
VMS Tech Demo 15 - Groovy for applications:
https://www.vajhoej.dk/arne/articles/vmstd15.html
Covering:
* Groovy calling Java
* Java calling Groovy
* Groovy calling C/Pascal/Basic
* C/Pascal/Basic calling Groovy
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 434 |
Nodes: | 16 (2 / 14) |
Uptime: | 115:02:38 |
Calls: | 9,109 |
Calls today: | 3 |
Files: | 13,419 |
Messages: | 6,030,395 |