Jon Harrop writes:
> On Saturday 04 April 2009 22:51:50 Goswin von Brederlow wrote:
>> The beauty of ocaml strings is that they are really compact. An ocaml
>> string on 32bit is 5-8 bytes longer than the contained string and 9-16
>> bytes on 64bit.
>
> The ugliness is that 16Mb limit. I assume t
Hello, the following code hags container as for Netplex_mt as for
Netplex_mp parallelizer:
method process ~when_done container fd proto_name =
let ch = Unix.out_channel_of_descr fd in
output_string ch "Hello\n";
flush ch;
container#send_message "Sender*" "test-msg" [||];
clos
Jon Harrop wrote:
> On Saturday 04 April 2009 22:51:50 Goswin von Brederlow wrote:
>> The beauty of ocaml strings is that they are really compact. An ocaml
>> string on 32bit is 5-8 bytes longer than the contained string and 9-16
>> bytes on 64bit.
>
> The ugliness is that 16Mb limit. I assume tho
On Saturday 04 April 2009 22:51:50 Goswin von Brederlow wrote:
> The beauty of ocaml strings is that they are really compact. An ocaml
> string on 32bit is 5-8 bytes longer than the contained string and 9-16
> bytes on 64bit.
The ugliness is that 16Mb limit. I assume those limits have been removed
On Sat, Apr 4, 2009 at 5:51 PM, Goswin von Brederlow wrote:
> Mutable/Immutable can really nicely done with phantom types and is
> independent of the data structure used. It works for strings, lists,
> arrays, sets, trees, ... and I think all standard modules should have
> it. The official standar
Alp Mestan writes:
> I think providing both capabilities is the best solution.
Phantom types solvethis beautifully with not truntime penalty.
GO BATTERIES!
> However, let's study Haskell's strings.
> They simply are a list of characters. This let the ability to use heavily
> list-related funct
David Rajchenbach-Teller writes:
> I personally can't remember the last time I've needed mutable strings in
> OCaml.
Only for byte arrays or a buffering module where I String.blit to the
string itself instead of into a new string. Saves a mutable.
MfG
Goswin
___
On Saturday 04 April 2009 18:11:20 Kuba Ober wrote:
> On Apr 3, 2009, at 1:50 PM, Daniel Bünzli wrote:
> > In fact I find the result of the following sequence of operations
> > very disappointing for a functional programming language :
> >
> >Objective Caml version 3.11.0
> >
> > # Sys.os_t
Isn't the book written in French? (I mean "Le langage Caml"...).
It could be nice to translate it in English, at least to have a
larger base of readers, and adapt the examples from Caml Light to
Objective Caml (I don't know how much the syntaxes differ though)
It's perhaps a good way to lean
On Apr 3, 2009, at 1:50 PM, Daniel Bünzli wrote:
Le 3 avr. 09 à 18:52, Martin Jambon a écrit :
- I see absolutely no practical advantage of having an immutable
"character
string" type.
In fact I find the result of the following sequence of operations
very disappointing for a functional pr
Hello,
why following code doesn't react to messages sent to container (and to
events sent from other service)?
exception BeLive
exception DataArrived
...
method receive_admin_message container name args =
container#event_system#add_event (Extra DataArrived)
...
method process ~when_done c
On Sat, 2009-04-04 at 12:40 +0100, Jon Harrop wrote:
> On Saturday 04 April 2009 12:12:52 David Teller wrote:
> > The bad thing is that, whenever you have to return text in an otherwise
> > functional program, you need to enter "mutable array of bytes" land. You
> > can't just assume that the user
On Saturday 04 April 2009 12:12:52 David Teller wrote:
> The bad thing is that, whenever you have to return text in an otherwise
> functional program, you need to enter "mutable array of bytes" land. You
> can't just assume that the user isn't going to modify that string,
> because, they can, possi
The bad thing is that, whenever you have to return text in an otherwise
functional program, you need to enter "mutable array of bytes" land. You
can't just assume that the user isn't going to modify that string,
because, they can, possibly by accident, and any invariant relying on
the fact that you
On Sat, Apr 4, 2009 at 11:26 AM, Alp Mestan wrote:
> However, let's study Haskell's strings.
> They simply are a list of characters. This let the ability to use heavily
> list-related functions (take, takeWhile, drop, dropWhile, map, etc.). On the
> other hand, OCaml's standard library lacks of ma
On Friday 03 April 2009 16:03:25 Daniel Bünzli wrote:
> Le 3 avr. 09 à 16:46, Jon Harrop a écrit :
> > Just because my OCaml programs were mutating strings and translating
> > that into
> > F# is non-trivial if the string is shared or big. In essence, I've
> > always
> > used OCaml's strings as a m
On Friday 03 April 2009 20:46:26 Paolo Donadeo wrote:
> > You clearly want both, but each with its own type and strings as
> > immutable. Individual character mutability is rarely needed in text
> > processing
>
> I can agree with you on this argument, but a question still remains:
>
> why should y
On Friday 03 April 2009 21:41:26 Harrison, John R wrote:
> | I can agree with you on this argument, but a question still remains:
> |
> | why should you ever do things like:
> | > # s.[0] <- 'a';;
>
> The point is that it might not be your own code that does it, but a
> function written by someone
On Saturday 04 April 2009 10:14:34 David Rajchenbach-Teller wrote:
> Note that Batteries provides
> * regular OCaml strings
> * strings with capabilities (i.e. strings which, depending on their
> type, can be read-only/write-only/read-write) -- sometimes faster than
> regular strings, never slower
On Sat, Apr 4, 2009 at 11:14 AM, David Rajchenbach-Teller <
david.tel...@ens-lyon.org> wrote:
> I personally can't remember the last time I've needed mutable strings in
> OCaml.
Neither do I.
> On the other hand, I can remember a handful of times where, to
> return a constant string, I had to
On Fri, 2009-04-03 at 12:56 +0100, Jon Harrop wrote:
> I read that batteries included provides first-class rope-based strings and I
> was just reading up on some horror stories about immutable strings on
> StackOverflow. This made me wonder what people's thoughts are about mutable
> vs immutabl
On Fri, 2009-04-03 at 23:44 +0200, Goswin von Brederlow wrote:
> It wouldn't be too hard to change the string module to allow for both
> mutable and immutable strings:
[...]
Done in Batteries.
# "foo";; (*OCaml base string*)
- : string = "foo"
# ro"foo";;(*Read-only string*)
- : [ `Read ] Bat
I guess nobody would be interested for doing so in South of France, right ?
On Sat, Apr 4, 2009 at 3:08 AM, Mike Lin wrote:
> This might be of interest to anyone else in the Boston area.
>
>
> -- Forwarded message --
> From: Anne Hunter
> Date: Fri, Apr 3, 2009 at 7:40 PM
> Subj
23 matches
Mail list logo