[Caml-list] Fwd: User Group for functional programmers and scientific computing; Monday, April 6th

2009-04-03 Thread Mike Lin
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 Subject: User Group for functional programmers and scientific computing; Monday, April 6th To: jobsl...@altoids.mit.edu Rick, Michael, and I

Re: [Caml-list] 64 bits ocamlopt to generate 32 bits code

2009-04-03 Thread Florian Hars
Jean Guyader wrote: Is it possible to generate 32 bits assembly code with a 64 bits ocamlopt? If you are adventurous, you might be able to set up a cross compilation environment, look at the PowerPC 405 thread from a few days ago for ideas. The easier way is probably to set up a 32 bit chroot

Re: [Caml-list] 64 bits ocamlopt to generate 32 bits code

2009-04-03 Thread Goswin von Brederlow
Jean Guyader writes: > Hello, > > Is it possible to generate 32 bits assembly code with a 64 bits ocamlopt? > > Thanks, > -- > Jean Guyader Afaik no. MfG Goswin ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-b

Re: [Caml-list] Strings

2009-04-03 Thread Goswin von Brederlow
Daniel Bünzli writes: > Le 3 avr. 09 à 18:52, Martin Jambon a écrit : > >> I love this recurrent discussion! > > I love your carefully argumented response ! > >> - I see absolutely no practical advantage of having an immutable >> "character >> string" type. > > In fact I find the result of the fo

[Caml-list] Execution order in class construction

2009-04-03 Thread Goswin von Brederlow
Hi, I'm wondering if the execution order is defined during class construction. For example: let n = ref 0 let next () = incr n; !n class foo = object val x = next () val y = next () val z = next () method print = Printf.printf "%d %d %d\n" x y z end Will that always give x < y < z or cou

Re: [Caml-list] Bug? Constraints get ignored in methods

2009-04-03 Thread Goswin von Brederlow
Jacques GARRIGUE writes: > From: Goswin von Brederlow > >> I want to keep a linked list of structures that have a common subset >> of functionality. I thought this would be a good use of ocaml objects. >> A base class with the common subset of functionality and methods to >> link them. And then

RE: [Caml-list] Strings

2009-04-03 Thread Harrison, John R
| 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 else to which you innocently pass a string argument. You may think you

[Caml-list] OCaml-bindings for libmodbus?

2009-04-03 Thread Oliver Bandel
Hello, I'm looking for an OCaml-binding (library) for the libmodbus: https://launchpad.net/libmodbus Does someone here know, if there is such a lib? Ciao, Oliver ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bi

Re: [Caml-list] Strings

2009-04-03 Thread Arnaud Spiwack
If my experience is worth anything, I've had hardly any use of mutable character strings. Many of immutable ones. The practical advantage of having immutable character strings is the same as that of having immutable integer data : when you do not need to mutate data of a type, you'd better keep

Re: [Caml-list] Strings

2009-04-03 Thread Paolo Donadeo
> 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 you ever do things like: > # s.[0] <- 'a';; Regards, -- Paolo ~

Re: [Caml-list] Strings

2009-04-03 Thread Florian Hars
Martin Jambon wrote: - There is nothing to change in OCaml's string type because it is an "array of bytes", with type char representing single bytes. $ ocaml Objective Caml version 3.10.2 # let c = 'ö';; Characters 8-9: let c = 'ö';; ^ Syntax error # Meanwhile, in another

Re: [Caml-list] netplex multi-thread asynchronous processor for passive clients

2009-04-03 Thread Jake Donham
On Fri, Apr 3, 2009 at 10:55 AM, Serge Sivkov wrote: > I 've look through sources of the netplex. For now i clearly see how > synchronious service works, > but i don't understand workflow of anyncronious version of netplex > services (i'm using ocamlnet-2.2.9). Can you explain what you're trying

Re: [Caml-list] netplex multi-thread asynchronous processor for passive clients

2009-04-03 Thread Serge Sivkov
Hello, I 've look through sources of the netplex. For now i clearly see how synchronious service works, but i don't understand workflow of anyncronious version of netplex services (i'm using ocamlnet-2.2.9). As says manual, to implement anync version of the processor i must to return control to co

Re: [Caml-list] Strings

2009-04-03 Thread Daniel Bünzli
Le 3 avr. 09 à 18:52, Martin Jambon a écrit : I love this recurrent discussion! I love your carefully argumented response ! - 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

Re: [Caml-list] Strings

2009-04-03 Thread Martin Jambon
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 more efficient byte array. In fact,

[Caml-list] 64 bits ocamlopt to generate 32 bits code

2009-04-03 Thread Jean Guyader
Hello, Is it possible to generate 32 bits assembly code with a 64 bits ocamlopt? Thanks, -- Jean Guyader ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Begin

Re: [Caml-list] netplex multi-thread asynchronous processor for passive clients

2009-04-03 Thread Gerd Stolpmann
Am Freitag, den 03.04.2009, 17:19 +0600 schrieb Serge Sivkov: > Hello, > I want to convert my synchronious multi process netplex service to > asynchronous multi thread one. > I don't understood how can i send data from #receive_message > to #process for asynchronous worker (ideally more than one p

Re: [Caml-list] Strings

2009-04-03 Thread Daniel Bünzli
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 more efficient byte array. In fact, the best translation to F# is oft

Re: [Caml-list] ocamlgraph ConcreteBidirectional and Dot

2009-04-03 Thread Pietro Abate
I still don't have an answer for this problem, but I'm wondering now ... is there a way to create a Labeled ConcreteBidirectional reusing these building blocks ? is there an ocamlgraph specific ml ? :) p On Fri, Apr 03, 2009 at 02:37:19PM +0200, Pietro Abate wrote: > Hello all. > > I've a sma

Re: [Caml-list] Strings

2009-04-03 Thread Jon Harrop
On Friday 03 April 2009 15:18:51 Ashish Agarwal wrote: > > I found immutable strings to be a PITA > > in what way? 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

Re: [Caml-list] Strings

2009-04-03 Thread Ashish Agarwal
> I found immutable strings to be a PITAin what way? On Fri, Apr 3, 2009 at 7:56 AM, 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

[Caml-list] ocamlgraph ConcreteBidirectional and Dot

2009-04-03 Thread Pietro Abate
Hello all. I've a small problem with ocamlgraph. I want to parse a dot graph into a ConcreteBidirectional. The problem is that the signature needed for Dot.Parse requires a function edge, but I've no mean to specify a label (since it is unlabelled !!)... The functor for ConcreteBidirectional sa

Re: [Caml-list] Strings

2009-04-03 Thread Paolo Donadeo
On Fri, Apr 3, 2009 at 13:56, Jon Harrop wrote: > was just reading up on some horror stories about immutable strings on > StackOverflow. Can you post any link? -- Paolo ~ ~ :wq ___ Caml-list mailing list. Subscription management: http://yquem.inria.f

[Caml-list] Strings

2009-04-03 Thread Jon Harrop
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 immutable strings? I had never thought about it until I started port

[Caml-list] netplex multi-thread asynchronous processor for passive clients

2009-04-03 Thread Serge Sivkov
Hello, I want to convert my synchronious multi process netplex service to asynchronous multi thread one. I don't understood how can i send data from #receive_message to #process for asynchronous worker (ideally more than one per thread). Here is my current code : class my_hooks = ... method re

Re: [Caml-list] Re: LLC book [was: Questions]

2009-04-03 Thread Daniel de Kok
On Thu, Apr 2, 2009 at 8:39 PM, Richard Jones wrote: > Decide on a format: http://en.wikipedia.org/wiki/DocBook - check I have written one open source book, and participated in another, and DocBook was always a barrier of entrance for most potential contributors. These days I'd rather go for some