Posted by
Saalfeld, Stephan on
Jun 19, 2014; 3:49pm
URL: http://imagej.273.s1.nabble.com/FIJI-IJ2-script-editor-tp5008308p5008323.html
Hi Johannes and all Fiji-/ImageJ2 developers,
in my opinion, the interpreters are the most useful piece of Fiji.
Where everything else fails, the interpreters enable me to inspect,
test, prototype, and investigate. We have entire workflows that heavily
depend on the stateful interactive behavior of the interpreters vs. the
monolithic stateless execution of scripts in the editor. TrakEM2, as it
stands, is practically unusable without using an interpreter to
communicate with it. The interpreters are Fiji's terminals. Taking
them away is equivalent to removing the terminal from an operating
system. I hope you feel with me that this is an outrageous idea. It
does harm to people who rely on Fiji to do their work.
I agree that auto-imports are in principle evil and I remember that we
were all clear about that when you introduced them. However, I see them
being extraordinarily useful in the terminal style use of the
interpreters that enabled me to efficiently work with Fiji in the past.
So why not letting the interpreters try to auto-import what's possible
and not doing so in the entirely different editor environment?
Whatever happens to auto-imports, please leave the interpreters in
place! Please do not remove them just because you wish to have
everything prematurely streamlined with a particular library concept
that you consider superior tho the current state. If the new library
concept makes it complicated to keep the interpreters, then this library
design has failed. Fiji is not a toy, it's a tool to do work with.
Fiji needs a terminal!
Please keep Fiji's terminal!
Thanks and sorry for being polemic,
Stephan
On Thu, 2014-06-19 at 16:54 +0200, Johannes Schindelin wrote:
> Hi Leon,
>
> On Thu, 19 Jun 2014, Leon Espinosa wrote:
>
> > I prefer to repport those problems here because I do not know if this is
> > actually the "bugs" or a scheduled behavior of the editor change ...
> > Some things do not work and others work differently by compared to
> > FIJI/IJ1
> >
> > in FIJI/IJ2
> > IJ.wait(1000);
> > in the editor "python" fails
> > in the editor javascript fails.
> > in the jython interpreter fails
> > in the javascript interpreter works OK
>
> Please note that the interpreters will go away unless somebody else puts
> in the work to port them to the SciJava scripting framework. (The reason
> for SciJava's scripting framework's existence is exactly those
> inconsistencies in IJ1's and previous Fiji's scripting which you pointed
> out.)
>
> As I just wrote in a mail to Christophe, the auto-imports (which you can
> switch on in the script editor, but you should not!) are a dangeours
> business. It's sloppy and will bite you *in the future*. When somebody
> else introduces classes with the same name, and you will be puzzled no end
> why things broke.
>
> > in FIJI/IJ1 javascript and python editor
> > IJ.beep(); OK
> >
> > in FIJI/IJ2 editor javascript
> > IJ.beep(); fails
> > in FIJI/IJ2 javascript interpreter OK
> >
> > in FIJI/IJ1 "python" editor
> > IJ.beep(); OK
> > in FIJI/IJ2 "python" editor
> > IJ.beep() fails
> >
> > in FIJI/IJ2 "python" editor
> > from ij import IJ as IJ
> > IJ.beep() OK
> >
> > in FIJI/IJ2 "python" interpreter
> > IJ.beep() OK
> >
> > I was unable to import ij.IJ in the FIJI/IJ2 javascript editor with
> > "import ij.IJ.*;" while " from ij import IJ as IJ" works with the
> > "python" editor...
>
> Yes, Javascript's syntax is a bit funky:
>
> importClass(Packages.ij.IJ);
>
> Please, for all of our sakes (but especially mine because I want to spend
> my time coding instead): use explicit imports all the time! And that
> includes very much avoiding wildcard imports (i.e. *no* "import ij.*"!).
>
> If anyone thinks wildcard imports are a Good Thing, I would like to remind
> that someone that I had to spend a good 80 hours in total on that stupid
> TextField issue with the Volume Viewer. And those issues were only caused
> *by the use of wildcard imports*. On the caller's side.
>
> Therefore, do everybody a favor, do not use auto-imports or wildcard
> imports. Like, ever.
>
> Ciao,
> Johannes
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
Stephan Saalfeld, Ph.D.
Group Leader
Janelia Farm Research Campus
19700 Helix Drive | Ashburn, VA 20147
Phone: 571-209-4184 | Fax: 571-209-4946
[hidden email]
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html