caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: brogoff <brogoff@speakeasy.net>
Cc: caml-list <caml-list@inria.fr>, David MENTRE <david.mentre@gmail.com>
Subject: Re: [Caml-list] Looking for a configuration file library
Date: Thu, 29 Sep 2005 13:33:23 +1000	[thread overview]
Message-ID: <1127964804.20162.36.camel@rosella> (raw)
In-Reply-To: <Pine.LNX.4.58.0509280938540.28672@shell4.speakeasy.net>

On Wed, 2005-09-28 at 09:55 -0700, brogoff wrote:
> On Thu, 29 Sep 2005, skaller wrote:
> > On Wed, 2005-09-28 at 08:15 -0700, brogoff wrote:
> >
> > > > [1] Even if, in the long term, I want to remove noweb in order to use
> > > > a literate programing style relying on language source code, like
> > > > ocamldoc.
> > >
> > > That is exactly what I wish they had done.
> >
> > Why?
> 
> Getting off topic, but since you ask...

Packaging is hardly off topic in any programming language list.

Last Ocaml tool I tried to build, that nice re library ..
failed on the first line. Gave up in disgust. First line
started with 'findlib' ... its a third party tool.

I also get annoyed when you need to have 'make' to build
a package.. usually you need bash as well. Neither
is standard on Windows.

> Because, Borg like, I wish to integrate whatever source code I grab into my
> own code base, perhaps modifying it, and I don't wish to add yet another layer
> of perl scripts and extra  weird tools into my flow. 

That I understand. Though note: noweb is written in Icon (under debian
noweb package requires iconx package .. that's the end, two binaries).

> I'd rather Lua-ML be just
> like the libraries that are distributed with OCaml.
> 
> Also, I don't believe programs are enough like books that LP is worth
> adopting. In short I'm an LP unbeliever (behead me!).

Using MY tool, interscript, I don't care about the 'literate' 
part much either. What I *do* care about is the code generation --
precisely because "I don't wish to add yet another layer
of perl scripts and extra  weird tools into my flow"

Hard to describe, but if you look at Felix, you'll see
the tarball contains a single directory of files
ending in .ipk or .pak. These are the LP sources.
Everything else: be it Ocaml, HTML, C++, Felix, test data,
Python, build scripts, man pages .. for the language
comparisons there is Ada, Haskell, Scheme, Java,
and a few other languages in there too .. EVERYTHING is
stored in a single format in just one directory. 

Furthermore, using tables I can keep all these codes synchronised, 
that is, remove redundant and error prone repetition -- all
without any external tools, other than interscript, which
is supplied in the tarball in machine independent form.
Of course, you need Python .. and Ocaml (and for Felix
a C++ compiler). But you don't need bash or make!
(Felix now builds *from source* on raw Win32 using only
major programming language tools).

> > Is there problem with running noweb to extract the source?
> 
> That's the first step, then you need to get the comments right. And there
> was a problem with yacc stuff, but nothing beyond grunt work, like I said.

Oh yes, you have a problem: if you manually run noweb and fiddle
the result, then include that in your own product (which is what
I do all the time with 3pl software) then you have two SERIOUS
problems:

(a) you can't easily synchronise with the upstream author
(b) you have the usual Licence problem, you whole project
is now probably a 'derived work'

> Back to config files. Other languages like Python and Scheme could also be used
> as configuration files, but Lua is especially suitable when "non programmers"
> are writing the config scripts.

I doubt that. I'm a programmer, and I spent some time with Lua.
Simple assignments in Lua are the same as Python:

x = 1 
y = "Hello"

Anything more complex is HARD, and much harder in Lua than
Python -- I never really figured it out. And anything that
simple can be parsed by a few lines of Ocaml..

I actually looked at Lua as a replacement for Python
to control configuration but threw it out. I am very happy
now, sticking with Python (the platform independent build
would have been harder in Lua). However I don't need to
embed reading of config scripts (Felix has it own mechanism
for conditional compilation etc).

In the end, I would have to recommend using a pure Ocaml
solution.. because if your Ocaml code embeds native Lua,
then you need your clients who are 'building from source'
to have a C compiler to compile Lua.. and you need to
provide build scripts to do it .. and .. its all a huge
mess. 

Ocaml is much easier to build .. except that people
insist on using 'findlib' and INRIA insists on NOT
supplying it as part of Ocaml. It's an old problem.
Sigh. GODI and Debian solve these problems entirely .. but they're
very heavy weight.


-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


  reply	other threads:[~2005-09-29  3:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-27 13:09 David MENTRE
2005-09-27 13:23 ` [Caml-list] " Bruno De Fraine
2005-09-27 16:26   ` Samuel Mimram
2005-09-28  6:59     ` David MENTRE
2005-09-28  7:06       ` Maxence Guesdon
2005-09-27 17:02 ` brogoff
2005-09-28  7:06   ` David MENTRE
2005-09-28 15:15     ` brogoff
2005-09-28 16:37       ` skaller
2005-09-28 16:55         ` brogoff
2005-09-29  3:33           ` skaller [this message]
2005-09-29  4:02             ` brogoff
2005-09-29  7:24         ` Christian Lindig
2005-09-28 15:40     ` skaller
2005-10-05 10:16 ` Richard Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1127964804.20162.36.camel@rosella \
    --to=skaller@users.sourceforge.net \
    --cc=brogoff@speakeasy.net \
    --cc=caml-list@inria.fr \
    --cc=david.mentre@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).