rIDL is a command line version of IDL offering tab completion, more logging options, better multi-line command editing, and keybindings. See previous articles for more information: 1, 2, 3, 4.
rIDL has been extremely useful for me when using IDL from the command line, but so far I only had it building on Mac OS X. I finally broke down and made a real build system for rIDL based on CMake. I have currently tested builds on Mac OS X and 64-bit Linux, though I am hoping it works more widely.
Get the lastest source code with Subversion:
$ svn co http://svn.idldev.com/ridl/trunk ridl
I currently don’t have any official releases of rIDL, it is definitely a work in progress. See the README file in the source for instructions on building.
You will need to have a working GNU Readline available on your system. On Mac OS X, I use Homebrew to install Readline:
$ sudo brew install readline
Readline is usually available on most Linux systems.
Let me know if there are issues!
August 4th, 2011 at 2:19 am
Hello, and thanks for your efforts on rIDL!
I have tried installing it on a fairly untouched Snow Leopard system, with the following observations:
1) according to “brew install readline”, readline is masked by BSD libedit library, and is therefore installed for “keg-only” in /usr/local/Cellar/readline/…, had to edit FindReadline.cmake accordingly
2) IDL 8.1 installed in /usr/local/itt by default on my system, had to edit FindIDL.cmake accordingly
3) When starting ridl.sh the following happens:
I don’t know what this signifies or where to proceed from here.
IDL by itself runs fine from the Terminal.
Thanks for any and all help,
//T
August 4th, 2011 at 10:41 am
See the
example_configure
file in the repo, you can make CMake find a library in a particular directory from thecmake
line:I don’t understand at all why IDL would be in
/usr/local/itt
on Mac OS X, but you can do the same thing as above to specify an IDL location:The third point is even more mystical. I have two things to ask/try: 1) make sure the IDL code from rIDL is in your
!path
and 2) if that is not enough, try to put acompile_opt strictarr
in your startup file. Not sure why any of this would cause a seg fault though.August 8th, 2011 at 7:31 am
Hi,
Adding the directory with the rIDL code to !path fixed the final problem (facepalm). Thanks!
While applications should not trample on user preferences, perhaps the ridl.sh shell script could set the IDL_PATH environment variable immediately before starting idl? Since environment variables are only inherited by child processes, this would not influence the !path of IDL sessions run outside rIDL.
A couple of questions on a completely different tack:
have you experimented with rlfe (or something similar) to provide command line editing and history with search (but no fancy IDL-aware magic)?
Since readline is shadowed by BSD libedit, is it a credible approach to make rIDL use the latter instead, eliminating one hurdle on the path to a rIDL installation?
I have (the PDF) of your book now, together with rIDL it looks like exactly what I need to overcome my IDL shyness. Thanks, and looking forward to the printed edition!
//T
August 8th, 2011 at 4:08 pm
Setting the
IDL_PATH
environment variable wouldn’t be good since there are multiple ways of setting your IDL!path
.I have not experimented with rlfe.
I have not looked at BSD libedit, but that looks very promising! If it has the same interface as GNU Readline, but with a BSD license, I could distribute it with rIDL.
August 26th, 2011 at 6:19 am
Following from my previous question (sorry for the double post) I was able to fully build rIDL using some manual steps (which probably can be specified on the inital cmake step, though i’m not sure of how to do this).
This can be incorporated into the CMakeCache.txt file generated after the cmake step.
I chaged the lines
To
I’ve not experimented with this but I guess it’s probably something wrong with my enviro setup as these are all standard libraries.
Is the overhead in using rIDL significant? I ask as when running my newly compiled version the response is slow taking several seconds to tab complete and even longer to type and move cursor? What’s the limiting operation? Is readline the bottleneck?
Thanks!
August 26th, 2011 at 1:09 pm
I’m glad you have gotten this working, I’m not sure what the problem was. Do you need all the flags given in your CMAKE_C_STRINGS specification? Maybe just “-lgcc_s” would be enough?
There should not be any significant overhead using rIDL. I find it equivalent in speed to the standard IDL command line on the 4 platforms I use it on (3 Macs, 1 Linux box). Typing definitely shouldn’t be slow and I have never experience any noticeable delay with tab completing. Possibly this is due to the build issues, but I’m lost as to why.
September 27th, 2011 at 1:31 pm
As someone who has a heavily customized .inputrc, I thank you.
I came across several issues trying to install on Ubuntu 11.04 32-bit. The most important were having to specify ‘-32’ when running idl.sh, and then, as someone else noted above, having to add ‘/usr/local/share/idl’ to my IDL_PATH (otherwise I get the ‘_ridl_preflocation = ridl_preflocation()’ error)
However, after doing those things rIDL appears to work but I get the command line:
[501]>
where I can type absolutely nothing. I have to kill the process.
So, let me know what I can do to help troubleshoot. I tried registering on the Trac site but got an SMTPAuthenticationError.
September 28th, 2011 at 12:40 pm
Since I don’t have access to a 32-bit Linux machine troubleshooting this is difficult. I have fixed the issue with the -32 option, now it is automatically set on 32-bit platforms. Currently, the
IDL_PATH
must be set to include rIDL’s IDL routines, this is documented in the installation instructions in the README. I will have to do some research on the more serious problem of not being able to type anything at the command prompt.Sorry about the problem with the Trac site. I locked it down because of spammers, maybe I have locked it down too tightly.
October 12th, 2011 at 7:24 am
Hi Mike,
When I tried to make the ‘docs’. It complained that a file ‘html.py’ is not found. Is the file missing in the repository or did I do something wrong?
Thanks!
October 12th, 2011 at 8:50 am
To make the documentation, you have to have Docutils installed. You should be able to
easy_install
it with:if you have setuptools installed.
October 12th, 2011 at 9:20 am
Thanks Mike. easy_install solved the html.py problem.
But now I have a new problem that it complains no latex is found. I am new to OS X. So could you give me some suggestions on which latex release to install? MacTex seems to be a complete solution but the download size is huge (1.8G).
October 12th, 2011 at 10:15 am
I use the MacTex installation. It is large (and updated every year), but it comes with a ton of styles and classes.
October 13th, 2011 at 8:03 am
Hi Mike, thanks for all the help. I have successfully installed rIDL on both OSX and 64-bit linux.
I have a few questions after using it for a bit:
Is there a way to recall a magic command? The history does not seem to keep them and the up-arrow key does not show them either.
What is the magic command :color for? I don’t see any color in the rIDL command line no matter whether this option is on or off.
The tab completion works for all the system routines. However, for user defined routines, it only works for those routines that are already compiled. That means when I use an user defined routine for the first time, I still have to type all the routine names. For me, the user defined routines tend to have long names …
:help is used for system routines and :doc mostly for user defined routines. These two, in my opinion, are really doing the same thing for different targets. So I think maybe it is logical to unify the two commands into just one, say :help
Thanks!
October 13th, 2011 at 9:38 am
Right now I put valid IDL commands in the history because I use the same history file that IDL uses. So if I added magic commands, in IDL, you could up arrow to a command that doesn’t make sense.
Colors are used for error messages, i.e., for a runtime IDL error, the stack trace is in red.
Yes, I need to tap into the path cache, still need to check into that.
Yes, that makes sense.
October 13th, 2011 at 2:52 pm
I’ve add tickets 15 and 16 to for issues 3. and 4. above, respectively.
October 14th, 2011 at 8:28 am
Thanks Mike. Looking forward to see these features in the next release. :)
October 14th, 2011 at 10:14 am
Well, I’ve been regularly updating rIDL, but I’m going to need some help from ITT VIS to fix a couple big problems, like the READ issue and issues when debugging. I have to fix those problems in order to have an actual release, i.e., I don’t want to make a formal release of something that can’t do everything that the normal command line can do.