caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* requests for improvement
@ 2008-01-20 17:10 ivan chollet
  2008-01-20 17:31 ` [Caml-list] " Oliver Bandel
  2008-01-20 17:43 ` ketti
  0 siblings, 2 replies; 6+ messages in thread
From: ivan chollet @ 2008-01-20 17:10 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

Two of my remarks about the current OCaml implementation:

-          About the Random module: could the function self_init () take
something else as the current system date as the only entropy source? I
think there are more valuable sources than the current time on today's
computers.

-          Any plans about giving the possibility to spread the definition
across more than one source file. Sometimes modules are more than 300 lines,
so I would like to be able to split it over two or more files. Currently
there is a one-to-one relationship between files and modules. As far as I
know, OCaml is the only language to have such a particular constraint.

 

Any insightful comment would be greatly appreciated.

 

Thanks,

lapinmalin

 

 

 


[-- Attachment #2: Type: text/html, Size: 4492 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] requests for improvement
  2008-01-20 17:10 requests for improvement ivan chollet
@ 2008-01-20 17:31 ` Oliver Bandel
  2008-01-20 17:43 ` ketti
  1 sibling, 0 replies; 6+ messages in thread
From: Oliver Bandel @ 2008-01-20 17:31 UTC (permalink / raw)
  To: caml-list

Zitat von ivan chollet <ivan.chollet@laposte.net>:

> Two of my remarks about the current OCaml implementation:
>
> -          About the Random module: could the function self_init ()
> take
> something else as the current system date as the only entropy source?
> I
> think there are more valuable sources than the current time on
> today's
> computers.
[...]

Which would you suggest to be a good source?
It must be cross-platform available, because OCaml
will be compiled / used on different systems.

There also are Random.full_init and Random.init.
Don't you think, they can be used, when feeded with the
data you might expect to be better?

On Linux for example, a while ago some people who run
servers had the problem that the random-device didn't had
enough random data, and so generating random-inits for
encryption-tools didn't worked.
I think in later kernels this problem was solved,
but this can show that relying on seemingly "better" solutions
can yield worse results, if the conditions aren't as they should be.
And: I'm not sure if the currently used solutions are really better...
...if you really need random data, look for devices that generate the
data out of analog circuits!

But if you have an idea for doing it better, possibly
use it for yourself (and let know us your ideas),
and/or write a feature wish to teh OCaml-bug reporting system:
  Bug reports: http://caml.inria.fr/bin/caml-bugs
It's called "Bug reports" but feature wishes are welcome there also.


>
> -          Any plans about giving the possibility to spread the
> definition
> across more than one source file. Sometimes modules are more than 300
> lines,
> so I would like to be able to split it over two or more files.
> Currently
> there is a one-to-one relationship between files and modules. As far
> as I
> know, OCaml is the only language to have such a particular
> constraint.
[...]

I doubt it is "the only" language.

But IMHO it's not a good idea to spread code, depending to one
module over many files.

Spreading code over many files is the best way to create a mess.
And THIS is one major problem of code of many projects: that it is a
mess! OCaml's strictly handling of some issues is the way to make
things cleaner and clearer.

You can (re)use code of already available modules,
so in this way you can pick up the "spreaded" things.
This is clear and clean.


Ciao,
   Oliver


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] requests for improvement
  2008-01-20 17:10 requests for improvement ivan chollet
  2008-01-20 17:31 ` [Caml-list] " Oliver Bandel
@ 2008-01-20 17:43 ` ketti
  2008-01-21  9:05   ` Michaël Le Barbier
  2008-01-22 19:44   ` Richard Jones
  1 sibling, 2 replies; 6+ messages in thread
From: ketti @ 2008-01-20 17:43 UTC (permalink / raw)
  To: ivan chollet; +Cc: caml-list

Hi,

2008/1/20 ivan chollet <ivan.chollet@laposte.net>:
> -          Any plans about giving the possibility to spread the definition
> across more than one source file. Sometimes modules are more than 300 lines,
> so I would like to be able to split it over two or more files. Currently
> there is a one-to-one relationship between files and modules. As far as I
> know, OCaml is the only language to have such a particular constraint.

I think this is a non issue.
Just split it in several modules and use 'include' to bring it all
together. Is that any different from what you want?


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] requests for improvement
  2008-01-20 17:43 ` ketti
@ 2008-01-21  9:05   ` Michaël Le Barbier
  2008-01-22 19:44   ` Richard Jones
  1 sibling, 0 replies; 6+ messages in thread
From: Michaël Le Barbier @ 2008-01-21  9:05 UTC (permalink / raw)
  To: ketti; +Cc: ivan chollet, caml-list

ketti <kattlachan@gmail.com> writes:

> Hi,
>
> 2008/1/20 ivan chollet <ivan.chollet@laposte.net>:
>> -          Any plans about giving the possibility to spread the definition
>> across more than one source file. Sometimes modules are more than 300 lines,
>> so I would like to be able to split it over two or more files. Currently
>> there is a one-to-one relationship between files and modules. As far as I
>> know, OCaml is the only language to have such a particular constraint.
>
> I think this is a non issue.
> Just split it in several modules and use 'include' to bring it all
> together. Is that any different from what you want?

If you insist on splitting source code, recombination is
straightforwardly done thanks to make(1).

Example:

        module.ml: module.1.ml module.2.ml
                   cat ${.ALLSRC} > ${.TARGET}

(For BSD Make)
-- 
Michaël LB


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] requests for improvement
  2008-01-20 17:43 ` ketti
  2008-01-21  9:05   ` Michaël Le Barbier
@ 2008-01-22 19:44   ` Richard Jones
  2008-01-23 17:07     ` Hezekiah M. Carty
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Jones @ 2008-01-22 19:44 UTC (permalink / raw)
  To: ketti; +Cc: ivan chollet, caml-list

On Sun, Jan 20, 2008 at 06:43:36PM +0100, ketti wrote:
> 2008/1/20 ivan chollet <ivan.chollet@laposte.net>:
> > -          Any plans about giving the possibility to spread the definition
> > across more than one source file. Sometimes modules are more than 300 lines,
> > so I would like to be able to split it over two or more files. Currently
> > there is a one-to-one relationship between files and modules. As far as I
> > know, OCaml is the only language to have such a particular constraint.
> 
> I think this is a non issue.
> Just split it in several modules and use 'include' to bring it all
> together. Is that any different from what you want?

Or keep the source in a single file and use a folding editor.

Rich.

-- 
Richard Jones
Red Hat


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Caml-list] requests for improvement
  2008-01-22 19:44   ` Richard Jones
@ 2008-01-23 17:07     ` Hezekiah M. Carty
  0 siblings, 0 replies; 6+ messages in thread
From: Hezekiah M. Carty @ 2008-01-23 17:07 UTC (permalink / raw)
  To: Richard Jones; +Cc: caml-list

On Jan 22, 2008 2:44 PM, Richard Jones <rich@annexia.org> wrote:
> On Sun, Jan 20, 2008 at 06:43:36PM +0100, ketti wrote:
> > 2008/1/20 ivan chollet <ivan.chollet@laposte.net>:
> > > -          Any plans about giving the possibility to spread the definition
> > > across more than one source file. Sometimes modules are more than 300 lines,
> > > so I would like to be able to split it over two or more files. Currently
> > > there is a one-to-one relationship between files and modules. As far as I
> > > know, OCaml is the only language to have such a particular constraint.
> >
> > I think this is a non issue.
> > Just split it in several modules and use 'include' to bring it all
> > together. Is that any different from what you want?
>
> Or keep the source in a single file and use a folding editor.
>

Any suggestions for a folding editor for OCaml?  I've been using emacs
+ tuareg + some sort of outline mode for emacs. vim can at least do
indentation-based folding, but its auto-indent tends to act quite
badly for me and vim + omlet gets very slow for .ml files longer than
a few hundred lines.

-- 
Hezekiah M. Carty
Graduate Research Assistant
University of Maryland
Department of Atmospheric and Oceanic Science


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-01-23 17:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-20 17:10 requests for improvement ivan chollet
2008-01-20 17:31 ` [Caml-list] " Oliver Bandel
2008-01-20 17:43 ` ketti
2008-01-21  9:05   ` Michaël Le Barbier
2008-01-22 19:44   ` Richard Jones
2008-01-23 17:07     ` Hezekiah M. Carty

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).