Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

ocaml_beginners · Ocaml Beginners

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 13748 - 13777 of 13887   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand Author Sort by Date ^
13748 Johan Mazel
johan.mazel Send Email
Feb 13, 2013
7:48 am
Hi I used camlidl to create OCaml bindings to a C library. I am using a Debian testing with OCaml 3.12.1 installed. I also have OCaml 4.00.0 installed through...
13749 Philippe Veber
philippeveber Send Email
Feb 15, 2013
8:11 am
Hi Johan, I tried to compile an old library of mine using camlidl (I also use OPAM with the 4.00.1 compiler). I had to add a CCopt option in the _oasis file to...
13750 Sergei Steshenko
sergstesh Send Email
Feb 20, 2013
5:17 am
Hello, as I am playing with data structures, I need to write my own *to_string functions. And for that I need to concatenate strings that are string...
13751 Francois Berenger
f_berenger Send Email
Feb 20, 2013
5:24 am
Maybe not. Hence the Buffer module: http://caml.inria.fr/pub/docs/manual-ocaml/libref/Buffer.html...
13752 Francois Berenger
f_berenger Send Email
Feb 20, 2013
5:27 am
... A little more advanced way would be S-expressions as in the core library from janestreet....
13753 Jason Yeo
goosebumpsov... Send Email
Feb 20, 2013
5:59 am
Hi, I am trying to achieve some form of polymorphism to print my data structures (ints, floats, List of ints, List of floats or List of ADTs). Is there a way...
13754 Francois Berenger
f_berenger Send Email
Feb 20, 2013
6:25 am
... Maybe you are looking for this: http://mmottl.bitbucket.org/projects/sexplib/README.html...
13755 Gabriel Scherer
ga_sche Send Email
Feb 20, 2013
7:06 am
Complementing François's useful answer: to concatenate lots of strings together, Buffer is definitely the way to go. If you want to serialize data, printing...
13756 Philippe Veber
philippeveber Send Email
Feb 20, 2013
7:16 am
Hi Jason, I'm affraid what you're looking for (ad-hoc polymorphism) doesn't exist in ocaml. You have to give your print functions different names and apply the...
13757 Sergei Steshenko
sergstesh Send Email
Feb 20, 2013
8:40 am
Regarding serialization and stuff. First of all, I am learning. And as I've discovered, implementing something similar to Perl data structures is a good test...
13758 Gabriel Scherer
ga_sche Send Email
Feb 20, 2013
8:54 am
Avoid camlp{4,5} at (nearly) all cost. It's tempting but too often misused in practice (been there, done that). Find a good way to have something clean in the...
13759 Francois Berenger
f_berenger Send Email
Feb 20, 2013
9:13 am
... Using camlp4/p5 is not for beginners. I would never mention these tools to someone starting to learn OCaml!...
13760 Sergei Steshenko
sergstesh Send Email
Feb 20, 2013
9:21 am
Regarding "Avoid camlp{4,5} at (nearly) all cost" - well, it's my very purpose to be outside of the language. In Perl I write as I think, something like this: ...
13761 Gabriel Scherer
ga_sche Send Email
Feb 20, 2013
9:56 am
Meh, I think jumping on Camlp{4,5} head first will result in you making bad design choices. Could you elaborate on what you would like to write, what would be...
13762 Sergei Steshenko
sergstesh Send Email
Feb 20, 2013
10:10 am
I suggest to look at examples here: http://perldoc.perl.org/perldsc.html . Fundamentally, I am looking for a "better Perl". OCaml seems to fit the "definition&quot;...
13763 Gabriel Scherer
ga_sche Send Email
Feb 20, 2013
10:33 am
It looks like you're looking for either: - embedding all the values you're interested in a single big sum type (like you have in a dynamic language); you lose...
13764 Sergei Steshenko
sergstesh Send Email
Feb 20, 2013
8:52 pm
... From: Gabriel Scherer <gabriel.scherer@...> Subject: Re: "ocaml_beginners"::[] is String.concat efficient enough for "production&quot; use ? To:...
13765 Sergei Steshenko
sergstesh Send Email
Feb 20, 2013
9:11 pm
This is what I already have :) : " type plds_type =     Plds_int of int   | Plds_float of float   | Plds_string of string   | Plds_list of...
13766 Sergei Steshenko
sergstesh Send Email
Feb 20, 2013
11:41 pm
Hello, I've checked Sys.max_string_length: " # Sys.max_string_length;; - : int = 16777211 ". By my standards it's a small value. For example, in Perl strings...
13767 Hongbo Zhang
hongbozhang88 Send Email
Feb 20, 2013
11:45 pm
Hi Sergei, try 64 bit ocaml. The length limit is due to the data representation chosen by ocaml. ... -- -- Regards, Hongbo [Non-text portions of this message...
13768 Sergei Steshenko
sergstesh Send Email
Feb 20, 2013
11:52 pm
Even though my desktop (but not laptop) CPU is capable of running 64 bits, I still prefer 32 bit versions of Linux for various practical reasons. Could you...
13769 oliver
oliver@... Send Email
Feb 21, 2013
2:12 am
... [...] Initially OCaml was written/designed with 64 Bit systems in mind. Later, when it shows up that 32 Bit machines will stay on market for quite long...
13770 Francois Berenger
f_berenger Send Email
Feb 21, 2013
2:21 am
Gabriel mentioned the rope data structure. That would allow you to create giant strings, I guess. There are several implementations in OCaml. ...
13771 Gabriel Scherer
ga_sche Send Email
Feb 21, 2013
8:49 am
Ropes are indeed a reasonable choice for long strings. Another solution is to use Bigarray ( ...
13772 Marek Kubica
pymastr Send Email
Feb 21, 2013
9:43 pm
On Wed, 20 Feb 2013 13:59:43 +0800 ... Well, not really cleanly but Batteries has some kind-of-solution, check out the "dump" function there. regards, Marek...
13773 Sergei Steshenko
sergstesh Send Email
Feb 22, 2013
5:55 am
Hello, in Perl there is 'x' binary operator which replicates its left operand string: " sergei@amdam2:~/junk> perl -e 'print "foo" x 3, "\n"' foofoofoo ". I...
13774 Francois Berenger
f_berenger Send Email
Feb 22, 2013
6:21 am
... open Printf let v = "foo" in printf "%s%s%s&#92;n" v v v; ... More seriously, for more string fun, you can have a look in the Str module from the stdlib, the...
13775 Sébastien Dailly
s_dailly Send Email
Feb 22, 2013
6:41 am
... [1] : http://ocaml-batteries-team.github.com/batteries-included/hdoc2/BatString.html Sébastien...
13776 Sergei Steshenko
sergstesh Send Email
Feb 22, 2013
7:18 am
Thanks. Is the batteries library compatible with standard libraries ? I.e. will some standard library functions be overridden, or the batteries do no export...
13777 Sébastien Dailly
s_dailly Send Email
Feb 22, 2013
8:56 am
... Yes, it's even recommended to add batteries in your project library ! ... Depends, when you'r opening the batteries module, it will overide some standard...
Messages 13748 - 13777 of 13887   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help