cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Using JSL to Develop Efficient, Robust Applications (EU 2018 415)

Level: Advanced
Joseph Morgan, JMP Principal Research Statistician Developer, SAS

This session will focus on JSL constructs that can prove invaluable when developing efficient, robust, production-ready applications. These include expression handling functions, xpath support, namespaces and others. The ideas will be illustrated with examples that the instructor has collected over the past 10 years as he has worked with a wide cross-section of JSL users.

Comments
thomasz

 The download links do not work

hogi

@ colleagues:
the presentation and  the JSL file are available at the bottom of this page

Video is not available anymore?

thanks for recovering it  : )

hogi

#1 Expression handling

#2 clever Display Tree Indexing

 

Just imagine how powerful Jmp/JSL will get via #1 X #2:
Expression Indexing: read and write access 

... or even Expression Xpathing?

tMinnx

Exp() function and its family are too hard to understand even after spending hours looking at the script and Log. It is not intuitive at all. I would love to watch additional videos elsewhere explaining the practicality of these functions.

 

E.g.

x = Expr(Expr(Expr(1+2))); 

gives a result when I assume it is simply an assignment of a variable "x" to an expression. My intuition is no result from that line.

hogi

Hm, I partially agree.

 

 

 

I'd love to see more videos about Expression Handling

 

On the other Hand:

 

this video IS THE key - your chance to understand the concept. It's definitely worth to watch it 2-3 times.

 

 

 

 

It's a good practice to predict what's going on - and then to compare with the actual result. I guess every JSL programmer uses this approach to find the final, working result. Put an Eval Expr here, try Name Expr there ...

 

 

 

Another aporoach: use another Name which facilitates to remember the functionality.

 Name Expr() could be renamed Hey JSL Symbol, give me your Expression().

 

Expr() might be safety Zone, don't Touch()

 

 

 

For your example,

 

 

 

z = Expr(Expr(Expr(1+2))); 

IS assigning ...

an expression to a variable z:

 

 

 

and the assigned expression is Expr(expr(1+2)).

 

 

 

A third aporoach: If you wonder why it's so complicated - think if there is an easier way to get the same result (with less Exr, Substitute, Name Expr , ...). After guessing such an alternative approach, try IT and check if it really works ...

 

hogi

The issue:
the individual JMP programmer defined if a function evaluates it's argument or not.

There is NO documentation!

e.g. Does Head evaluate its argument?  - who knows?

 

To make our work live much easier:
JSL editor could help us tremendously - by indicating which function evaluates it's argument and which one doesn't - and which one does just something Name Expr ()-ish.


Let's hope that the wish gets enough Kudos:
Advanced syntax highlighting in JSL Editor
... and the attention of JMP developers to implement it.


 

hogi

there is a chapter in the scripting index:
https://www.jmp.com/support/help/en/18.0/?os=win&source=application#page/jmp/advanced-expressions-ma...


Here is a Webinar video explaining an application case in detail:
Run a Platform without Knowing the Number or Names of Columns 

 

hogi

@Ryan_Gilmore , the video disappeared again.

Is it possible to recover it another time?

 

thank you

Great presentation. I think "syntactic sugar" is my favorite new expression!