[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: patch - add an ocaml-interp binary package

Sven Luther wrote:
On Mon, Nov 03, 2003 at 07:35:30AM -0800, David Fox wrote:
I would like to distribute executables in source form like this:

 #!/usr/bin/ocamlrun /usr/bin/ocaml
 #load "unix.cma"

but this requires the ocaml package, which pulls in lots of development 
libraries like libc6-dev which we don't want on our normal system.  I 
developed the attached patch to 3.06 which splits out an ocaml-interp 
package, it would be great for me if this was made part of the normal 
packaging.  I think it would help promote ocaml as a Perl alternative.
Mmm, not convinced.

Please explain to me the benefit of doing it this way over simply
compiling the needed stuff to bytecode and simply execute it.


Sven Luther

The least important reason is size.  We are creating lots of small scripts, such as those you find in /etc/init.d, as part of our hardware detection/configuration system.  When we byte-compile these scripts, they end up at about 400 to 500 k, which can add up.

The more important reason is the ease with which people can modify these scripts, particularly when you are trying to fix a mis-configured system.  For people who are not really interested in programming, but are just trying to get something to work, editing and running a script is quite a bit easier than finding and downloading the source (which maybe you can't do at all if your network isn't working) editing it, building it, installing it.  Granted, for most people, editing a script is something they simply will not do.  For a few others, building from source is just fine.  But there are some people whose input is important to us who fall between these two categories.  They have lots of energy and intelligence, but they come from a world of GUI's and don't have the Unix background we sometimes take for granted.  If you point them to a script and tell them "try some different values here and here" they will go at it until it works.

For myself, it is partly an aesthetic thing.  Whenever practical, when efficiency is not an issue, I like to distribute software in the least obfuscated way, and put as few barriers as possible between the code and the (hapless?) reader.

Reply to: