gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
alexyk has quit [Quit: alexyk]
Associat0r has quit [Quit: Associat0r]
<NaCl> adrien: does the default lablgtk2 META need to link in gtkThread.cm{o,x}?
zsparks has quit [Ping timeout: 240 seconds]
zsparks has joined #ocaml
Lor has quit [Ping timeout: 240 seconds]
Lor has joined #ocaml
<thelema> NaCl: only if you're compiling w/ threads
<thelema> NaCl: I'd recommend not, and using the event loop to get your work done
<NaCl> thelema: What's being done is calling an external process
<NaCl> and using the event loop to monitor the changes in it's stdout
<NaCl> and this is an exceedingly slow process
<thelema> ah, hmm... well, you don't need a thread to do that.
<NaCl> Well, not in GTK itself, I guess
<NaCl> just use Unix.create_process, right?
* NaCl is recycling oldish code
joewilliams_away is now known as joewilliams
barismetin has joined #ocaml
nannto_ has joined #ocaml
<orbitz> NaCl: Lwt works great for that
* NaCl wonders if he wants to make yet another spec file
<NaCl> orbitz: indeed, does look interesting. But GTK will be handling the mainloop stuff
eye-scuzzy has quit [Ping timeout: 260 seconds]
joewilliams is now known as joewilliams_away
barismetin has quit [Remote host closed the connection]
barismetin has joined #ocaml
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
Associat0r has quit [Client Quit]
rwmjones has quit [Read error: Operation timed out]
mehdid has quit [Ping timeout: 260 seconds]
mehdid has joined #ocaml
deavid has quit [Remote host closed the connection]
deavid has joined #ocaml
rwmjones has joined #ocaml
Snark has joined #ocaml
barismetin has quit [Remote host closed the connection]
ulfdoz has joined #ocaml
vivanov has joined #ocaml
cthuluh has quit [Ping timeout: 260 seconds]
cthuluh has joined #ocaml
vivanov has quit [Quit: Lost terminal]
jamii has joined #ocaml
vivanov has joined #ocaml
<adrien> thelema: why do you recommend against linking lablgtk with threads?
<adrien> NaCl: lwt is really simple to use with lablgtk and works pretty well too, I think you can chose the way you want
cthuluh has quit [Ping timeout: 255 seconds]
dnolen has joined #ocaml
f[x] has quit [Ping timeout: 276 seconds]
f[x] has joined #ocaml
ankit9 has quit [Quit: Leaving]
dnolen has quit [Quit: dnolen]
jamii has quit [Ping timeout: 276 seconds]
ulfdoz has quit [Ping timeout: 276 seconds]
Cyanure has joined #ocaml
ankit9 has joined #ocaml
axiles has joined #ocaml
alfa_y_omega has quit [Read error: Operation timed out]
philtor has quit [Ping timeout: 276 seconds]
othiym23 has joined #ocaml
ikaros has joined #ocaml
janaka has joined #ocaml
janaka has quit [Read error: Connection reset by peer]
Cyanure has quit [Remote host closed the connection]
eye-scuzzy has joined #ocaml
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
ygrek has joined #ocaml
alfa_y_omega has joined #ocaml
edwin has joined #ocaml
hyperboreean has joined #ocaml
ygrek has quit [Ping timeout: 250 seconds]
mfp has quit [Ping timeout: 255 seconds]
ftrvxmtrx has joined #ocaml
mfp has joined #ocaml
<gildor> anybody aware of an OCaml library for prime numbers generator/test/factorization ?
avsm has joined #ocaml
avsm has quit [Ping timeout: 276 seconds]
avsm has joined #ocaml
Modius_ has joined #ocaml
Modius has quit [Ping timeout: 240 seconds]
vivanov has quit [Quit: Lost terminal]
othiym23 has quit [Ping timeout: 255 seconds]
ikaros has quit [Quit: Ex-Chat]
<NaCl> adrien: so, use lwt to start the process, then use glib's fd monitoring for the mainloop?
lopex has joined #ocaml
vivanov has joined #ocaml
<f[x]> gildor, I could find some code if you want, not a library
likebike has joined #ocaml
munga has joined #ocaml
cthuluh has joined #ocaml
ezyang has joined #ocaml
_andre has joined #ocaml
thomasga has joined #ocaml
<gildor> f[x]: that is just to know, if it is worth creating a library with some pieces of code that I gather while doing Project Euler
<f[x]> actually, as I think of it, cryptokit should have such code
ygrek has joined #ocaml
pheredhel has quit [Quit: ZNC by prozac - http://znc.sourceforge.net]
oriba has joined #ocaml
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
oriba_ has joined #ocaml
oriba_ has quit [Read error: Connection reset by peer]
lamawithonel_ has quit [Read error: Connection reset by peer]
ygrek has quit [Ping timeout: 250 seconds]
bacam has joined #ocaml
<adrien> NaCl: should be something like "Lwt_glib.init ()", nothing more than that
<adrien> the rest is automatic
fraggle_ has quit [Remote host closed the connection]
fraggle_ has joined #ocaml
<likebike> I was watching one of the lecture videos on the Janestreet website, and Yaron Minsky said something to the effect of "OCaml has object-oriented support, but nobody uses it! Even the creator of the object system doesn't use it." Would you guys say this is a fairly accurate statement?
<ezyang> That was certainly my impression of it.
<rproust> the creator uses the OO type system for typing JS objects in js_of_ocaml
<likebike> I was reading about the object system, and the need to always deal with "explicit" types seemed to make things complex.
<flux> some use it, for example ocamlnet
<adrien> lablgtk uses objects so actually, people do use it
<flux> the thing about ocaml oo is that it is sort of an advanced subject
<adrien> that was an exageration
<flux> you might end up with curious error messages which can be difficult to understand
<adrien> what flux said, and it's good to tell learners not to use oo in ocaml: better wait a bit
<flux> but, ocaml's oo is a great system in any case
<adrien> I've seen several people jump to oo in ocaml immediately, and that's not a good thing
<likebike> ok, thanks
<hcarty> likebike: I jumped in to OCaml's OO support early in my OCaml learning time. I thought it was very cool, used it everywhere in my code... and was then bitten horribly because I hadn't used it properly.
<likebike> haha. k. I'll wait a while. :)
<hcarty> likebike: The OO system in OCaml is very cool, but it requires a different kind of discipline from a user
<hcarty> It's worth learning! But it's important to remember that the compiler doesn't protect as nicely as it does when using a functional programming style.
<hcarty> Protect the programmer that is... as flux said, the error messages can become cryptic and/or HUGE
zsparks has quit [Ping timeout: 276 seconds]
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 250 seconds]
lamawithonel has joined #ocaml
munga has quit [Ping timeout: 258 seconds]
vivanov has quit [Quit: Lost terminal]
Tommytom has joined #ocaml
boscop_ has quit [Ping timeout: 255 seconds]
<thelema> gildor: check out batteries/examples/euler/mathlib.ml
<thomasga> does ocaml-installer still alive ? the hg repository seems to be dead on ocamlforge
thelema_ has joined #ocaml
<f[x]> gildor, is there some stable url to download latest version of package from oasis-db?
thelema has quit [Ping timeout: 240 seconds]
<f[x]> i.e. without version number
<thelema_> f[x]: at the moment, you can do that in two steps: first get oasis.ocamlcore.org/dev/odb/unstable/pkg/info/<pkgname>
<f[x]> ok, I see
<thelema_> this is a simple key=value file, the key `tarball` has the name of the latest version
<Tommytom> Hello, how can I give an object to a arg method of current class ?
<thelema_> Tommytom: you want to pass an object as a method parameter?
<Tommytom> yes but an instance of current class
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
<thelema_> class foo = object (self: 'mytype) method another_me : 'mytype -> unit = fun obj -> ... end
barismetin has joined #ocaml
<Tommytom> but
<Tommytom> here
<Tommytom> method sendOtherPck c =
<Tommytom> let i = 0 in
<Tommytom> while (i < (List.length c#list_pck)) do
<Tommytom> Where c is the object
<thelema_> the key is the (self: 'mytype) after `object` combined with marking the argument as mytype
<thelema_> but why don't you want the inferred type?
<Tommytom> I don't know what it is inferred type.
<thelema_> if you just use c as an object, its type will be inferred based on how you use it, including what methods it needs and the type of those methods
<thelema_> you don't need to do anything special
<Tommytom> mmh okok
<gildor> thomasga: hg repository for ocaml-installer: ssh://scm.forge.ocamlcore.org//hgroot/ocaml-installer/ocaml-installer
<gildor> thomasga: but latest commit is pretty old
<thomasga> ok thanks
sepp2k has joined #ocaml
Dalida has joined #ocaml
<Dalida> helo, were can i find a list of projects based on ocaml, and what are best and most recent books on this language?
<thelema_> Dalida: forge.ocamlcore.org has many ocaml projects
edwin has quit [Ping timeout: 255 seconds]
<rproust> Tommytom: you seem to be using the i as a variable in you pasted example
Dalida has quit [Quit: Page closed]
<rproust> `let i = 0 in while (i< e1) do e2 done` either loops indefinitely or does nothing but evaluating e1
<rproust> ohh
<rproust> my mistake
<rproust> nevermind
nullllun has joined #ocaml
<f[x]> thelema_, what is used as package name in url - findlib name or what?
<f[x]> see - pkg/info/oUnit and dev/dist/ounit
<gildor> thelema_: mathlib -> indeed useful, but I was more thinking about prime number generator
<gildor> thelema_: BTW, int for factorial is a bit an "underestimate" for euleur problmes ;-)
<gildor> thelema_: big_int is the least we can expect
boscop has joined #ocaml
<gildor> (e.g. 100!)
edwin has joined #ocaml
zsparks has joined #ocaml
<thelema_> gildor: true
<thelema_> f[x]: findlib name or executable name is used as package name. If a package provides multiple findlib names, it's available under all of them
<f[x]> 500 -> oasis.ocamlcore.org/dev/dist/oUnit
<f[x]> 200 -> oasis.ocamlcore.org/dev/dist/ounit
<f[x]> 404 -> oasis.ocamlcore.org/dev/odb/unstable/pkg/info/ounit
<f[x]> 200 -> oasis.ocamlcore.org/dev/odb/unstable/pkg/info/oUnit
<thelema_> f[x]: yes, odb uses the findlib name for its info files
<thelema_> It might be useful to expose this somewhere, as it's not necessarily obvious from the /dev/dist/name
<f[x]> after getting info - what to put in dev/dist/___ ?
<thelema_> I guess gildor could put the dev/dist/<id> into the info files
<gildor> f[x]: why do you want the latest tarball ?
<f[x]> because I want to quickly setup environment for ocaml (manually), with some curl curl curl make make make
<f[x]> without launching browser and remembering all upstream sites
<gildor> ok
<thelema_> f[x]: you've rejected using odb for this?
nullllun has quit [Quit: leaving]
<f[x]> it does too much
<f[x]> odb_home
<f[x]> chdir at install
<f[x]> automatic sudo !
<f[x]> all I need is - download - make all - make install (ocamlfind is configured beforehand)
impy has quit [Ping timeout: 255 seconds]
<f[x]> ok, sudo is configurable
joewilliams_away is now known as joewilliams
hrk has joined #ocaml
<thelema_> chdir at install?
<thelema_> as for odb_home, you'd prefer it use the current directory as working dir?
<f[x]> no, I mean --prefix odb_home
<f[x]> otoh automatic deps reinstall looks interesting
lopex has quit []
hrk has quit [Quit: Leaving]
<thelema_> ah, because without sudo, it assumes a local install.
Tobu has quit [Remote host closed the connection]
<thelema_> that's easily fixable, now which way to fix it.
Tobu has joined #ocaml
<thelema_> configurable --prefix? or auto-detect permissions for using default prefix...
<thelema_> is it reasonable to assume default prefix is /usr/local/?
Cyanure has joined #ocaml
<f[x]> why do you need to care about prefix?
<f[x]> everybody _should_ install with ocamlfind
<thelema_> because I need it to do a local install in my home dir on some systems
<thelema_> and one of my test cases was oasis, which has lots of deps, some of which aren't findlib packages, but are programs
drunK has joined #ocaml
ankit9 has quit [Quit: Leaving]
<adrien> I haven't followed the whole conversation but I like to be able to select different prefix: I currently have a godi toolchain in /opt/ocaml/ and one in ~/test and maybe a third one somewhere in my home
<f[x]> I guess there is no good soultion for prefix for same program compiled with multiple ocaml versions
<thelema_> well, if it's a program, it shouldn't matter which ocaml version it's compiled with
philtor has joined #ocaml
<thelema_> adrien: TODO noted
ulfdoz has joined #ocaml
<adrien> and I'd like to do automated testing of everything on a variety of different environment, so that'd help :P
<adrien> anyway, be back later
<f[x]> probably
<thelema_> adrien: I'm making the prefix thing happen now
<adrien> oh, great :-)
<thelema_> f[x]: and I'm making the "don't sudo and don't use --prefix" now too
<thelema_> --have-perms
<thelema_> adrien: I assume you want OCAMLFIND_DESTDIR repointed with a different --prefix?
<f[x]> better OCAMLFIND_CONF and PATH
<thelema_> f[x]: thanks, that is better
<f[x]> (but then again I would argue that it is probably out of scope of odb)
<thelema_> if a small tweak increases the scope of odb, I don't mind. If it's not so simple and rarely used, it doesn't go in
gnuvince|work has joined #ocaml
ygrek has joined #ocaml
<gnuvince|work> What is the "usual" build tool for OCaml projects?
<thelema_> hmm, maybe `OCAMLFIND_CONF=... ocaml odb.ml --have-perms foo` is better than adding prefix support
<gnuvince|work> I've seen OCamlBuild, OMake, OASIS, etc.
<gnuvince|work> Lots of choices
<f[x]> thelema_, that's what I wanted to say :)
<gildor> gnuvince|work: OASIS is not really a build tool, it is mostly a wrapper around ocamlbuild
<thelema_> gnuvince|work: Oasis isn't exactly a build system, it'll generate a build system for you (assuming you can describe the build system to it)
<thelema_> gnuvince|work: the most common build tools are ocamlbuild and make
<gnuvince|work> Plain old make?
* f[x] has a simple utility to select ocaml environment via these variables, all other tools seem to work ok with such setup
<thelema_> gnuvince|work: well, there's a nice ocamlmake file that you can include to improve usability of plain old make
<gildor> gnuvince|work: I would choose ocamlbuild alone if you don't intend to distribute your project or oasis if you intend to distribute it
* thelema_ agrees with gildor
<gnuvince|work> ok
<gnuvince|work> I'll look into ocamlbuild
<gnuvince|work> thanks
<gildor> gnuvince|work: though, oasis can be nice for not public project since it ease some steps wrt to setting up ocamlbuild
kurtosis has quit [Remote host closed the connection]
<thelema_> gnuvince|work: that said, I still use a simple makefile to run ocamlbuild, as typing `make` is easier than typing `ocamlbuild projectname.native`
<gildor> (e.g. generates default myocamlbuild.ml and a lot of required stuff for ocambuild that you'll end up setting by yourself)
<gnuvince|work> Great
<gildor> gnuvince|work: and the Plugin: DevFiles in _oasis can generate a Makefile that call the right command
<gnuvince|work> I don't really intend to publish this project
<gnuvince|work> Just a small utility for some friends and myself.
<gnuvince|work> I'll probably actually just give them the executable file
<zorun> For a small project, I usually write a small Makefile that calls ocamlbuild
<avsm> just download OCamlMakefile gnuvince|work
<avsm> it takes about 5 seconds to configure, and you can get on with coding
<avsm> for quick projects, thats what i use
<avsm> when I'm feeling like a mental workout, I switch to ocamlbuild :)
ikaros has joined #ocaml
<thelema_> f[x]: ok, new odb with --have-perms option to turn off both sudo and any --prefix stuff
<thelema_> avsm: why is ocamlbuild a mental workout? because of _tags?
<avsm> well, when something goes wrong debugging an ocamlbuild setup can take a lot of time
<avsm> i just like that you define 4 variables (RESULT, SOURCES, PACKS, PREDS) and ocamlmakefile just works
<avsm> having said that, I've ported Mirage to be fully ocamlbuild and it's lovely now. parallel builds are great.
barismetin has quit [Remote host closed the connection]
<gildor> avsm: OCamlMakefile is great for very small projects, when you start digging a little bit in it, you can go through several stages of headache
<gildor> avsm: esp. when something goes wrong
<gildor> avsm: Makefile debugging can be a nightmare
<rproust> imho ocamlbuild complexity/documentation ratio is way too high
zorun has quit [Read error: Connection reset by peer]
<avsm> sure, but he wanted something small
<thelema_> rproust: granted, but once you figure out enough (and use the right myocamlbuild.ml), building becomes pretty easy
zorun has joined #ocaml
<thelema_> avsm: I often use ocamlbuild for single-file projects
<avsm> darn, still no -pack support in ocamlbuild
ulfdoz_ has joined #ocaml
<rproust> I'll eventually have to learn it… and then I'll be too lazy writing documentation/tutorial, and I'll watch other complain, and I'll sparsly distribute tips on request
<avsm> that sinking feeling of going through the changelog with increasing eagerness, and then falling off the end :)
<avsm> rproust: ha ha, yes… writing a tutorial on it is "on my list" too
<avsm> sorry, -pack support in ocamldoc i meant, not ocamlbuild
<thelema_> avsm: huh? batteries (pre 1.0) used packs extensively and did... ah
barismetin has joined #ocaml
ulfdoz has quit [Ping timeout: 244 seconds]
ulfdoz_ is now known as ulfdoz
oriba has quit [Quit: oriba]
ankit9 has joined #ocaml
<thelema_> gildor: also, I know I had some code for primality testing, I'm looking for it still
barismetin has quit [Remote host closed the connection]
yezariaely has joined #ocaml
vivanov has joined #ocaml
Cyanure has quit [Remote host closed the connection]
impy has joined #ocaml
thomasga has quit [Quit: Leaving.]
edwin has quit [Ping timeout: 255 seconds]
ygrek has quit [Ping timeout: 250 seconds]
<Tommytom> In C#, there is an loop which is named foreach, are there an equivalent in OCamL for lists ?
<thelema_> List.iter
<Tommytom> mmh not exactly, but maybe that can help me, thx you
edwin has joined #ocaml
<thelema_> Tommytom: don't discriminate against it just because ocaml doesn't need it to be a builtin
<thelema_> how about: let foreach x f = List.iter f x in foreach [1;2;3;4] (fun x -> print_int x)
_andre has quit [Quit: Lost terminal]
_andre has joined #ocaml
<Tommytom> I try your foreach
<NaCl> adrien: ah, cool
<Tommytom> Because I must use two foreach of one List
<thelema_> you have a list of lists?
<Tommytom> no, but a list of objects, and for each, i must compare with the others
<thelema_> ah, ok.
^micro has quit [Quit: BitchX-1.1-final -- just do it.]
yezariaely has quit [Quit: Leaving.]
<Tommytom> I'm a little lost
<thelema_> foreach objects (fun o1 -> foreach objects (fun o2 -> o1#action o2));
<Tommytom> not need check if o1 != o2 ?
<thelema_> you can do that. you can probably do some check so that you don't do both x#act y and y#act x, if you want
<Tommytom> OK
<Tommytom> thx
fraggle_ has quit [Remote host closed the connection]
gnuvince|work has quit [Ping timeout: 252 seconds]
fraggle_ has joined #ocaml
micro has joined #ocaml
ftrvxmtrx has joined #ocaml
pheredhel has joined #ocaml
alexyk has joined #ocaml
gnuvince|work_ has joined #ocaml
alexyk has quit [Client Quit]
Tommytom has left #ocaml []
Tommytom has joined #ocaml
drunK has quit [Remote host closed the connection]
nannto_ has quit [Quit: Leaving...]
munga has joined #ocaml
<thelema_> gildor: I leave it up to you to lift this code to big_ints: https://github.com/ocaml-batteries-team/batteries-included/commit/07ef39655a435b2a13b5a430c5f33b94f081cced
ygrek has joined #ocaml
<_habnabit> Is there an operator that's unary negation? (-) is binary subtraction.
<_habnabit> (-) 0 works, I suppose.
enthymeme has joined #ocaml
<NaCl> _habnabit: (- 1) would work too
<NaCl> adrien: I am wondering... how much sense would it make to split the LWT package into parts that depend on lablgtk and those that don't?
<_habnabit> eh? that's a value.
<NaCl> oh
<NaCl> operator
<flux> _habnabit, ( ~- )
<_habnabit> ah, thanks.
<_habnabit> Does that apply for all unary operators?
<_habnabit> apparently not.
Snark has quit [Quit: Ex-Chat]
<gildor> thelema_: I would probably go for a fully fledged library rather than just an examples
<gildor> thelema_: but thx for the code, maybe it is time for me to dig further into batteries
<flux> _habnabit, but it does apply to -.
<flux> _habnabit, I think other unary operators work as is?
<thelema_> gildor: no problem. Enjoy both the code and the batteries
jamii has joined #ocaml
sheets has quit [Quit: Leaving.]
gnuvince|work_ has quit [Quit: Page closed]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
jamii has quit [Ping timeout: 258 seconds]
lopex has joined #ocaml
othiym23 has joined #ocaml
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgee has joined #ocaml
EM03 has joined #ocaml
<EM03> standard library is all loaded by default just not opened by default into the current "namespace" correct?
<EM03> join #gnu-smalltalk
<rproust> EM03: Pervasive is opened, other modules are openable, accessible
<EM03> yes just noticed some modules you had to load and open while others you could just open
rgrinberg has joined #ocaml
rgee has quit [Quit: Leaving]
rgrinberg has quit [Read error: Connection reset by peer]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
vivanov has quit [Ping timeout: 250 seconds]
<Tommytom> thelema_ I work on foreach, what do you think about that: let myiter obj =
<Tommytom> if obj#need_send_update then
<Tommytom> List.iter (function c2 -> if (obj != c2) then c2#sendOtherPck obj#list_pck else () ) !list_clients
<Tommytom> else
<Tommytom> () in
<Tommytom> List.iter myiter !list_clients;;
rgee has joined #ocaml
<thelema_> Tommytom: use pastebin over pasting a bunch of code, please
<thelema_> the "else ()" can be omitted
<Tommytom> Excuse me
<thelema_> other than that, it looks good.
<Tommytom> and this: let list_clients = ref [];;
<thelema_> yup, looks like that'll call A#sendOtherPck B#list_pck for every pair of distinct A & B
<Tommytom> just if B#need_send_update == true
<thelema_> ues.
<thelema_> *yes
<Tommytom> Is it correct: let list_clients = ref [];; ?
<thelema_> the ocaml toplevel can give you an answer to that easily:
<zorun> from a functional point of view, this is bad style, but it is perfectly valid :)
<thelema_> $ ocaml
<thelema_> # let list_clients = ref [];;
<thelema_> val list_clients : '_a list Batteries.ref = {contents = []}
<Tommytom> damned, I have a probleme somewhere
<thelema_> (ignore the bit about batteries)
<thelema_> zorun: I've seen worse first steps into functional programming
<Tommytom> I used to program in C and C#, it's difficult CamL :p
<Tommytom> *i'm used
munga has quit [Ping timeout: 260 seconds]
<thelema_> keep working at it - learning ocaml style takes some getting used to.
<Tommytom> but I work on translation of one of mine program written in C#, not very easy to begin
<zorun> hum, translating a program from one style to another is a bit similar to natural languages
<zorun> that is, the litteral translation is often awkward
<thelema_> OCaml is surprisingly flexible when it comes to many programming idioms, although there's usually better ways to do things in OCaml than the literal conversion
<Tommytom> Litteral to begin and optimization later
<thelema_> not just in terms of performance, but in terms of program structure.
<Tommytom> Yes of course
<Tommytom> can you look this function and give me the prototype ?
<thelema_> prototype?
<Tommytom> I don't know the name in Caml: 'a -> 'b
<thelema_> type
<Tommytom> type, ok
<thelema_> the type depends on teh type of #send_pck
<thelema_> it's a list of whatever takes, "tabchar"?
lamawithonel has quit [Remote host closed the connection]
<Tommytom> tabchar: is an array of char
_andre has quit [Quit: leaving]
<Tommytom> method send_pck tab =
<Tommytom> send sock (tabchar_to_string tab) 0 (Array.length tab) [];
<thelema_> also, you probably meant to write "List.iter (fun e -> this#send_pck e; printf "Send: %s\n%!" (tabchar_to_char e)) li"
<thelema_> instead of L2-8
<Tommytom> Yes, now I learn iter because of you ;)
<Tommytom> more easier
<Tommytom> But caml say: sendOtherPck : '_a -> unit
<Tommytom> But with a List.iter is not possible
<thelema_> Tommytom: works for me: method sendOtherPck : char list list -> unit
jamii has joined #ocaml
<thelema_> forgive the copy/paste formatting
<Tommytom> mmh tabchar is an array of char
<thelema_> just changing tabchar_to_string will change it from char list to char array
<Tommytom> okay
<Tommytom> So I agree with you
<Tommytom> The problem is here: val mutable list_pck = []
<Tommytom> Because caml say that: list_pck : '_a;
<thelema_> '_a list
<thelema_> yes, you need to use it as a list of tabchars somewhere
<Tommytom> I don't understand
<thelema_> mutable values can't be polymorphic
<Tommytom> Ok
<Tommytom> but why it say it is a '_a, not a '_a list ?
<thelema_> I dunno about that.
<thelema_> # object val mutable list_pck = [] end;;
<thelema_> - : < > = <obj>
<thelema_> huh.
<thelema_> # class c = object val mutable list_pck = [] end;;
<thelema_> class c : object val mutable list_pck : 'a list end
<thelema_> hmm...
<Tommytom> Heu...
<EM03> what is the general ocaml community stance on testing?
<EM03> do people go test crazy like in ruby? Or do it only when they think its needed?
<thelema_> ocaml is generally not test crazy, as the static typing helps catch most bugs without tests
jamii has quit [Ping timeout: 258 seconds]
Anarchos has joined #ocaml
<EM03> I think the TDD stuff is crazy
<EM03> a test won't prevent the unexpected
<thelema_> ocaml devs are generally on the side of preventing incorrect code from compiling when possible
<thelema_> and designing with that in mind
ygrek has quit [Ping timeout: 250 seconds]
itewsh has joined #ocaml
<krktz> i have troubles compiling the core lib from jane street ; where should i ask for help?
<Anarchos> krktz maybe to jane street ?
sepp2k has quit [Quit: Leaving.]
<krktz> don't you think they'll be upset of becoming an email from a poor and probably ignorant student? :D
<thelema_> krktz: it's got a lot of deps, do you have them all installed?
<krktz> i mean, maybe there's some forum or irc channel or something
<krktz> yes, it's during the build
<krktz> (here's the error: http://pastebin.com/udxzm3eN)
<krktz> (so i guess no one can help but they)
<thelema_> looks like a missing c library
<thelema_> are you on linux?
<krktz> yes
<krktz> archlinux
<NaCl> it isn't linking against the unix module
<Tommytom> thx thelema_, I be back tomorrow.
<NaCl> no, I lied
* NaCl stopos talking
<thelema_> well, you're missing librt, I think
edwin has quit [Remote host closed the connection]
ankit9 is now known as ankit9|zzz
Tommytom has left #ocaml []
ulfdoz has quit [Ping timeout: 240 seconds]
lamawithonel has joined #ocaml
eye-scuzzy has quit [Ping timeout: 260 seconds]
axiles has quit [Remote host closed the connection]
rgee has quit [Ping timeout: 240 seconds]
Tobu has quit [Quit: No Ping reply in 180 seconds.]
Tobu has joined #ocaml
fschwidom has joined #ocaml
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
barismetin has joined #ocaml
itewsh has quit [Quit: o/]
Associat0r has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
munga has joined #ocaml
<adrien> NaCl: lwt's prefers libev so splitting probably makes sense
rgee has joined #ocaml
rgrinberg_ has joined #ocaml
rgrinberg_ has quit [Read error: Connection reset by peer]
<NaCl> wonderful
<NaCl> more work for NaCl
barismetin has quit [Remote host closed the connection]
<adrien> hahaha :P
rgee has quit [Read error: Connection reset by peer]
rgee has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
fschwidom has quit [Remote host closed the connection]
Tobu has quit [Ping timeout: 260 seconds]
alfa_y_omega has quit [Ping timeout: 240 seconds]
dnolen has joined #ocaml
alfa_y_omega has joined #ocaml
Tobu has joined #ocaml
munga has quit [Ping timeout: 240 seconds]
ezyang has quit [Remote host closed the connection]
Morphous_ has quit [Ping timeout: 240 seconds]
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
Morphous_ has joined #ocaml
rgee has quit [Read error: Connection reset by peer]
rgee has joined #ocaml
rwmjones has quit [Read error: Operation timed out]
alexyk has joined #ocaml
Tobu has quit [Ping timeout: 264 seconds]
<alexyk> I want to export a simple string value x in an mli, do I say it as: val x: string ?
dnolen has quit [Quit: dnolen]
rwmjones has joined #ocaml
<EM03> thelema_: do you write tests at all?
philtor has quit [Ping timeout: 246 seconds]
<alexyk> who needs tests when you have a type system? :)
<Associat0r> "F*: A Verifying ML Compiler for Distributed Programming (microsoft.com) "