OcaIDE, Eclipse, ocaml, unix

/bin/sh: ocamlc: command not found

is what you get?

There’s a problem in your PATH, locate your ocaml installation dirs, like /usr/local/bin and /usr/local/lib/ocaml and export them into the path, then launch eclipse from the same environment as the one you’ve just created from your terminal (where you launched the export command), with ./eclipse and stuff, you know that part.
Now eclipse+ocaide should do its job.


You don’t believe me, don’t you? I’m also running the debugger! I can now finally understand certain pieces of code running under the hood!

Stupid Things

Do not name your .py file like a library you are going to use.

.../user$ python curses.py
 Traceback (most recent call last):
 File "curses.py", line 4, in
 import curses
 File "/Users/user/Documents/python/curses.py", line 6, in
 stdscr = curses.initscr()
 AttributeError: 'module' object has no attribute 'initscr'

This is an example of a typical “between chair and keyboard”-error.

PowerShell – renaming files

The MS Windows bash-shell-like wannabe…

Open powershell, cd to your folder and then type this:

> $var=0
> Get-ChildItem *.ext_from | foreach { Rename-Item $_ $var".ext_to"; $var++; }

and it will produce something like

At least you don’t have to learn PowerShell to do group renaming on Windows…