mnabil has quit [Read error: Connection reset by peer]
ccasin has quit [Quit: Leaving]
BiDOrD has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 265 seconds]
ftrvxmtrx has joined #ocaml
drunK has quit [Remote host closed the connection]
hto_ has quit [Ping timeout: 255 seconds]
LeNsTR has quit [Quit: LeNsTR]
LeNsTR has joined #ocaml
BiDOrD has quit [Ping timeout: 276 seconds]
hto has joined #ocaml
hto has quit [Ping timeout: 276 seconds]
infoe has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
hto has joined #ocaml
cyanure has quit [Quit: Quitte]
Edward has quit []
LeNsTR has quit [Quit: LeNsTR]
Amorphous has quit [Ping timeout: 272 seconds]
oriba has quit [Quit: Verlassend]
myu2 has quit [Remote host closed the connection]
ftrvxmtrx has quit [Ping timeout: 264 seconds]
ftrvxmtrx has joined #ocaml
Amorphous has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 264 seconds]
smerz has quit [Quit: Ex-Chat]
ftrvxmtrx has joined #ocaml
accel has joined #ocaml
<accel>
what's a good OCaml vs SML comparison?
ymasory_ has joined #ocaml
accel has quit [Quit: leaving]
thatch has joined #ocaml
<thatch>
I have revamped the ocaml lib and package standards for Arch, and I have packaged about 30 ocalm packages. My question then is this, where can I find a list of ocaml libs so that I can just package the heck out of them for Arch?
<thatch>
so that I can package up more ocaml goodness?
<thatch>
I am assuming that it is the ocaml hump, am I correct?
CoryDambach has joined #ocaml
tnguyen has joined #ocaml
myu2 has joined #ocaml
ymasory_ has quit [Ping timeout: 260 seconds]
ulfdoz has joined #ocaml
thatch has quit [Remote host closed the connection]
tnguyen has quit [Remote host closed the connection]
ftrvxmtrx has quit [Read error: Operation timed out]
ikaros has joined #ocaml
ftrvxmtrx has joined #ocaml
bzzbzz has quit [Quit: leaving]
<flux>
from debian :-)
__marius__ has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
ymasory_ has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
Yoric has joined #ocaml
ymasory_ has quit [Ping timeout: 272 seconds]
Associat0r has joined #ocaml
almaisan-away is now known as al-maisan
<kerneis>
thelema: or from godi
<kerneis>
sorry, I meant to highlight thatch
<kerneis>
but he left
ttamttam has joined #ocaml
munga has joined #ocaml
Yoric has quit [Quit: Yoric]
al-maisan is now known as almaisan-away
edwin has joined #ocaml
munga has quit [Read error: Operation timed out]
decaf has quit [Remote host closed the connection]
Yoric has joined #ocaml
naufraghi has joined #ocaml
ygrek has joined #ocaml
thomasga has joined #ocaml
almaisan-away is now known as al-maisan
lewis1711 has joined #ocaml
kani has joined #ocaml
al-maisan is now known as almaisan-away
munga has joined #ocaml
lewis1711 has left #ocaml []
_andre has joined #ocaml
kani has quit [Ping timeout: 250 seconds]
ftrvxmtrx has quit [Ping timeout: 255 seconds]
accel has joined #ocaml
<accel>
I have gone as high up as haskell & scheme; I have gone as low as x86 assembly & C. I want the most efficeint way to learn ocaml. What book should I read?
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Client Quit]
<mfp>
accel: Jason Hickey's is widely considered the best introductory book
<adrien>
I think blas/lapack are still the fastest you'll get here, unless you spend a lot of time on your code (or on a tiny part of your code)
<mfp>
weird, can't find the BLAS/LAPACK bindings in Debian, but there's ocamlgsl
edwin has quit [Quit: Leaving.]
<mrvn>
BLAS/LAPACK is THE way do go with numerical stuff indeed.
BiDOrD has joined #ocaml
<accel>
got it; thanks :-)
<accel>
kinda suprised after all tehse years
<accel>
no one's beaten blas?
<adrien>
well, blas is still alive and evolving
<accel>
doesn't fftw have some crazy thing
<accel>
for automatically generating efficeitn code?
<accel>
is blas like that?
BiDOrD has quit [Ping timeout: 260 seconds]
ftrvxmtrx has joined #ocaml
jado has joined #ocaml
edwin has joined #ocaml
<jado>
hello, i have this module defined in my code, and at some point i have a bug; i'm trying to find out what the problem is, so i'm printing a few things, and i don't understand how the output can be what it is; ocaml says that my key is not bound in the map, though it says there exists a key that is equal in the map: http://pastebin.com/QndXGZDg
myu2 has quit [Remote host closed the connection]
myu2 has joined #ocaml
<edwin>
jado: probably because you never return <0?
myu2 has quit [Remote host closed the connection]
<edwin>
jado: if you compare a and b, you say a>b, if you compare b and a, you say a < b, hence a == b
<edwin>
the keys probably end up on the wrong branch of a tree
<edwin>
jado: if you can't define an ordering between the keys, only equality, then try using a hash table
<jado>
oh i get it thanks
<jado>
you cannot order Type's, just compare them
<edwin>
how does your ftype look like though?
<edwin>
is it possible to define an ordering?
<jado>
edwin: it's a system F type, http://pastebin.com/F5vFV7Ba; i guess i could define an ordering, but what i really want is Hashtbl
<edwin>
jado: if all your types are ocaml types (no abstract ones), then you can use Pervasives.compare
<edwin>
that usually works well
<jado>
edwin: compare will return non-zero for types that are alpha-equivalent
<edwin>
then just call Pervasives.compare on the else branch
<edwin>
you still control equality
<edwin>
but you leave the ordering up to Pervasives
<edwin>
Pervasives.compare = 0 -> implies Types.equal, but no the other way around, right?
<jado>
i think so
<edwin>
but yeah, maybe a Hashtbl is easier to use here
<jado>
edwin: i still get a contradiction with "let compare t1 t2 = if Types.equal t1 t2 then 0 else Pervasives.compare t1 t2"
<jado>
maybe you can't really use Pervasives.compare
<edwin>
how about the hashtable, does that work?
BiDOrD has joined #ocaml
<jado>
edwin: i'll try, it should work but i have to change a bit the code because it is mutable
<edwin>
ok
drunK has joined #ocaml
<edwin>
hmm, maybe Pervasives.compare doesn't work for you because there are 3 types, where Pervasives.compare says a < b < c, but Types.equal says a = c
<edwin>
it'd be nice if there was a module that checked whether the OrderedType you define is really ordered based on the values you insert into the map
<jado>
hm and the functions Hashtbl and Map doesn't take their arguments in the same order :p
<jado>
no more contradiction :)
munga has quit [Ping timeout: 240 seconds]
<jado>
thanks for your help i get it better now
<kaustuv>
mfp: interesting. Thanks for pointing me to it.
accel has quit [Quit: leaving]
LeNsTR has joined #ocaml
<edwin>
jado: yes I always find it strange that ocaml prefers the object as last argument
<edwin>
in that sense Hashtbl's is the "natural order" for me, and Map's ordering is backwards
<thelema>
I agree that it's problematic for me trying to remember which order things are in, switching from Hashtbl to Map, but the imperativeness/purity of each does make different partial applications common
BiDOrD has quit [Ping timeout: 255 seconds]
<mrvn>
usualy the order is so that you can build nice compount constructs.
<mrvn>
Then again sometimes it isn't: e.g. List.assoc elem pairs is the wrong way around imho.
<adrien>
barg! "Error: This comment contains an unterminated string literal" : why can't I have comments like: (* " *) ?
<adrien>
I had a file like: [code][comment with a lone "][code][comment with a lone "][code], and it simply didn't see the *) for the first [comment] block, nor the (* for the second one ><
<thelema>
adrien: because if you could, then you couldn't have "*)" as part of your code, and be able to comment it easily
npouillard has quit [Quit: Reconnecting]
npouillard has joined #ocaml
npouillard has quit [Client Quit]
<adrien>
hmm, right, I think I had already had this problem, but simply removing the whole middle chunk of code is quite annoying, I probably only found the issue because I had camlp4 parsing enabled and the post-processed source in /tmp
<kaustuv>
Emacs solves this problem by replacing all instances of (* and *) by (\* and *\) when commenting a region.
<kaustuv>
This avoids collisions because the way to have *\) in a string is to write "*\\)"
<adrien>
well, I had written this one by hand
<adrien>
I'd much more forbid lone " in comments
<adrien>
heh, the ocmal toplevel detects that
drunK has quit [Remote host closed the connection]
<kaustuv>
The problem with forbidding stuff inside comments is that commenting out an arbitrary portion of the file is then not well-defined.
Edward__ has joined #ocaml
xl0_ is now known as xl0
<kaustuv>
Although, I suppose one can always use #if 0 / #endif and the cpp
<adrien>
(I mean, it puts a '*' at the beginning of new lines, but that doesn't help a lot)
boscop has joined #ocaml
<thelema>
kaustuv: or pa_macro
<adrien>
kaustuv: but currently you'll be greated with a mysterious failure
<thelema>
adrien: just escape any " you want in comments
<adrien>
once you've found the issue, yeah, and when you think about it, but "Error: Unbound value pc_split" doesn't help a lot...
<thelema>
yes, ocaml's error messages are often particularly unenlightening
<thelema>
the syntax allows a bit too much sometimes for it to give better errors
<flux>
a better error reporter would make use of whitespace as well
npouillard has joined #ocaml
<adrien>
well, yesterday, I had a typo between `Windows and `WIndows, when you're aware of the possible pitfalls it's ok, but when you're beginning, good luck
<adrien>
but I think we've already said that a spell-checker could be nice :-)
<flux>
I think the most I wish would be the compiler to recover and proceed after finding the first error..
<flux>
("the most useful for me" perhaps)
<adrien>
I almost saw a comment and an unterminated string in your last message =/
<adrien>
might be quite hard, don't really know
<thelema>
adrien: I wrote a patch for that - spell-checking unknown identifiers. Wouldn't help for `WIndows, but...
<flux>
perl can give an error about variables used exactly once. perhaps similar diagnostics for exactly-once-used polymorphic variants would be nice.
<adrien>
I need git support for everything in godi, that way I can easily try various patches
<thelema>
flux: good idea - it shouldn't be too hard to do that in ocamlc
npouillard has quit [Quit: leaving]
npouillard has joined #ocaml
<flux>
thelema, well, I don't know about that.. it would need to be done in the linking stage perhaps
<flux>
or not?
<flux>
one should use Perl to find out :-)
<thelema>
flux: yes, you'd get false positives from identifiers used only once because they're meant to be used elsewhere
<thelema>
flux: but the compiler might be able to count the .mli file with...
<kaustuv>
polymorphic variants are dangerous without explicit type annotations
npouillard has quit [Client Quit]
npouillard has joined #ocaml
<flux>
while that might be true (examples?), I think its greatest danger is the incomprehensible error messags :)
<thelema>
kaustuv: agreed - I dug myself into a hole once where I had to back out of using polymorphic variants because I couldn't get everything to type, I gave up and used regular variants
<flux>
I've sometimes found myself needing recursive types without realizing it at first
myu2 has joined #ocaml
<flux>
iirc polymorphic variants can give an 'easy fix' without defining types
thomasga has quit [Ping timeout: 240 seconds]
<kaustuv>
flux: the problem I've often encountered is that when I want to add a new case to a datatype. With ordinary variants, the compiler tells me exactly where in the code the unhandled cases are. With polymorphic variants, the compiler rarely complains and I have to manually hunt and peck.
<flux>
kaustuv, yes. but considering many languages go without coverage analysis anyway, perhaps everyone don't consider that a problem
<flux>
(but I definitely like it)
<kaustuv>
Well, I am not saying polymorphic variants are useless. The way they are used as phantom types in XHTML.M, for example, is very impressive, and I am also more or less OK with using them as flags in stuff like LablGL.
<jado>
hi, can i make a module depend on a first-order argument?
<jado>
module Make(n: int) = struct ... end seems to work :)
<jado>
actually it doesn't
<flux>
you need to parametrisze with modules
<jado>
yes ok
<flux>
module Make (N : sig val n : int end) = struct .. end;;
<jado>
thanks
<jado>
also, how can i compile with ocamlgraph? i've tried: "ocamlbuild -cflags -for-pack,Ocamlgraph demo.native" but that doesn't let me open Graph.Pack
ttamttam has left #ocaml []
BiDOrD has joined #ocaml
<thelema>
jado: if you have the right myocamlbuild.ml file, you can add "<*>: pkg_ocamlgraph" to your _tags file
<jado>
thelema: i don't have an "myocamlbuild.ml" file
fraggle_laptop has joined #ocaml
<thelema>
then you'll have trouble making ocamlbuild know about your dependency on ocamlgraph. get one from ...
<thelema>
jado: your problem doesn't seem to have anything to do with extlib
<thelema>
cyanure: what system? linux, win, etc?
<jado>
thelema: i removed it
<cyanure>
linux
<cyanure>
i think i messed up my /usr/local since nothing works anymore
<cyanure>
(even when i remove the _tags thing and every occurnce to Graph
<thelema>
jado: and in the ocamlgraph folder, there's all the *.cmo files for all the ocamlgraph modules?
<jado>
thelema: no ocamlbuild asked me to 'sanitize'
<jado>
but before sanitizing there is a 'graph.cmo'
<thelema>
jado: ok, let's go back to the findlib option, -I isn't going to work so well
<cyanure>
ok
<cyanure>
i reinstalled ocaml
<thelema>
cyanure: ubuntu?
<cyanure>
now I have a better looking error Error: /usr/local/lib/ocaml/3.11.2/ocamlgraph/graph.cmi
<cyanure>
is not a compiled interface
<cyanure>
yeah
<thelema>
cyanure: ocaml what ver?
<cyanure>
1.6
<cyanure>
no
<cyanure>
ocamlgraph 1.6
<cyanure>
ocaml 3.12
<jado>
back to, findlib, open Graph is now working without error, while Graph.Pack is unbound
<thelema>
cyanure: ocaml libraries are not binary compatible across ocaml releases.
<thelema>
jado: do you have an older version of ocamlgraph installed for findlib to find?
<cyanure>
thelema, So i need to recompile extlib ? or just this version of extlib cannot work ?
<thelema>
cyanure: you need to recompile ocamlgraph for 3.12
<cyanure>
how do i do that ?
<jado>
thelema: ocamlgraph (version: 1.6): i don't think so; maybe Graph is coming from somewhere else?
<jado>
ohh i rm'd the _build folder and now it works
<thelema>
jado: I can't think of anywhere else Graph would come from - try opening some other modules from ocamlgraph - maybe Graph.Pack didn't get compiled for you for some reason
<thelema>
ah
<jado>
it's totally my fault, my dpgraph.ml was named graph.ml until today
<thelema>
that would mess things up
<jado>
thanks a lot :)
<cyanure>
when i configure ocamlgraph it find the good version of ocaml
<thelema>
cyanure: you're building ocamlgraph from source?
<cyanure>
y
<thelema>
well, remove your .deb install of ocamlgraph
<cyanure>
don't think I have one
<thelema>
I think you do because that ocaml/3.11.2/ocamlgraph/graph.cmi wasn't installed by you from source
<cyanure>
I think i know what happened
<cyanure>
I have compiler ocamlgraph before installer ocaml (new version) but installed it after
<thelema>
you'll have to recompile
<cyanure>
that's what I'm trying
<cyanure>
it doesn't work at make install-findlib
<cyanure>
ocamlfind: Package ocamlgraph is already installed
<thelema>
ocamlfind remove ocamlgraph
<cyanure>
did it
<cyanure>
and retry same error
<cyanure>
no wait
<cyanure>
it works xD
<cyanure>
that was hard thank you very much
<thelema>
you're welcome
joewilliams is now known as joewilliams_away
npouillard has quit [Quit: Reconnecting]
npouillard has joined #ocaml
joewilliams_away is now known as joewilliams
ccasin has joined #ocaml
<thelema>
I seem to have made ocamlbuild fail to depend-sort requirements...
<edwin>
thelema: did you create a cycle?
<thelema>
I don't think so, but I'm doing this a better way now - instead of adding a dep on a .cma file, I'm doing ocaml_lib for that cma, and this seems to compile better
<thelema>
although I still dont get the link order I need to have the side effects work out right
<thelema>
hmm, actually, I don't know how I'm not getting a link error...
<thelema>
ocamlbuild takes care of it... Here's the final link: ocamlfind ocamlopt -a -package camomile,num,str -package oUnit qtest/batString_t.cmx -o qtest/test_mods.cmxa # cached
<edwin>
that doesn't look like to link any of your _t files
<edwin>
unless you only have 1
<thelema>
I cut things down to just the one, for debugging purposes
<edwin>
ah ok
<thelema>
hard to see details when there's 60 modules being included
<edwin>
Tests is part of tests.cmxa?
<edwin>
err tests.cmx
<edwin>
?
<thelema>
yes, tests_runner.ml and tests.ml in qtest folder
<edwin>
# cached
<edwin>
^means it didn't rerun the link
<edwin>
tried cleaning build folder?
<edwin>
ocamlbuild is not very smart on coping with newly added rules to myocamlbuild.ml/_tags
<thelema>
I've just pushed a bunch of branches to github
<thelema>
basically, develop in the 'develop' branch. master will have a chain of releases only. use vx.x for release code
<thelema>
s/release code/release branches/
<thelema>
although I don't see any reason to be a nazi about this structure, do what's best.
<elehack>
kk, will do.
<elehack>
It makes sense, although the use of 'develop' vs. 'master' seems a bit contrary to general Git practice.
<thelema>
maybe instead of develop, add 'releases' branch that releases get merged into
<elehack>
something like that would seem more common.
<thelema>
I agree that it's better to stick with general git practice
<thelema>
I'll see if I can do some branch magic and fix my pushes
<thelema>
biab
ymasory_ has joined #ocaml
<mrvn>
what for? Just tag releases in the master branch
<elehack>
mrvn: having releases off of a separate branch allows them to be frozen and stabilized without freezing the main development line.
<elehack>
err, nvm, that doesn't quote address it.
<elehack>
s/quote/quite
cyanure has quit [Read error: Operation timed out]
elehack is now known as elehack|afk
Yoric has joined #ocaml
<thelema>
mrvn: that's what we're doing now, but there's less discipline on what makes it into the release branch. If there's a branch for all final releases, the pre-release stabilization branches can be merged into it
ymasory_ has quit [Ping timeout: 240 seconds]
<mrvn>
thelema: but how would that look any different from the master branch?
decaf has joined #ocaml
_andre has quit [Quit: leaving]
<mrvn>
elehack|afk: developement would be in the developement branch
<thelema>
mrvn: I guess there'd be merging of tips of release branches instead of just tagging the tips before they get merged back into master
<mrvn>
+--+--+--+--+--+--+ developement
<mrvn>
/ \ \ \
<mrvn>
@------+-----+-----+ master
<mrvn>
\ \ \ \
<mrvn>
-------+-----+-----+ release
<mrvn>
I don't see the advantage of a release branch there
<thelema>
because there's a 4th level, release-v1.3, release-v2.0
<thelema>
the history of which is not continuous
<thelema>
and it acts as the gateway from development to release
<mrvn>
well, I obviously don't know enough about your project to have a good opinion. So I will go and have dinner.
<mrvn>
*hungry*
<thelema>
not specific to our project
<thelema>
thanks for the feedback, though
<mrvn>
I found that branches and workflows are like assholes. Everybody have one. :))
ftrvxmtrx has quit [Quit: Leaving]
ygrek has joined #ocaml
thatch has joined #ocaml
elehack|afk is now known as elehack
drunK has joined #ocaml
elehack is now known as elehack|afk
elehack|afk has quit [Quit: Farewell, programs.]
Yoric has quit [Ping timeout: 272 seconds]
coucou747 has joined #ocaml
ftrvxmtrx has joined #ocaml
Edward has joined #ocaml
mnabil has joined #ocaml
Associat0r has quit [Quit: Associat0r]
<adrien>
sometimes I'm really puzzled by sexplib's error messages
elehack has joined #ocaml
ftrvxmtrx_ has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 255 seconds]
ulfdoz has joined #ocaml
ftrvxmtrx_ has quit [Ping timeout: 276 seconds]
ftrvxmtrx has joined #ocaml
mnabil has quit [Ping timeout: 240 seconds]
<elehack>
thelema: could you throw up a wiki page describing the various new branches sometime?
cyanure has joined #ocaml
ymasory_ has joined #ocaml
ulfdoz has quit [Ping timeout: 246 seconds]
ygrek has quit [Ping timeout: 240 seconds]
elehack has quit [Ping timeout: 250 seconds]
cyanure has quit [Remote host closed the connection]
avsm has joined #ocaml
ccasin has quit [Quit: Leaving]
elehack has joined #ocaml
naufraghi has left #ocaml []
thatch has quit [Remote host closed the connection]
<thelema>
elehack: good idea, I'll get on that
elehack has quit [Ping timeout: 260 seconds]
elehack has joined #ocaml
edwin has quit [Remote host closed the connection]
thatch has joined #ocaml
yezariaely has quit [Quit: Leaving.]
ymasory_ has quit [Ping timeout: 260 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
<adrien>
I'm alternating between debugging, slacking and cooking but my issue with sexplib is when I take a Buffer's content and load the resulting string with sexplib, but if I write that buffer to a file and read the file with sexplib, it works ><
charlesno has joined #ocaml
thatch has quit [Remote host closed the connection]
<charlesno>
do ocaml programmers usually use ocaIDE in Eclipse?
<alpounet>
a lot of ocaml programmers actually use emacs with tuareg-mod
<alpounet>
mode*
<charlesno>
i see
<charlesno>
i'm new to linux, is emacs easy to setup and learn?
<alpounet>
setup yes
<alpounet>
learn... not really
<charlesno>
ah
<alpounet>
but that's the kind of software that brings you much more once used to it
<alpounet>
you can be *very* efficient
<charlesno>
cool
<alpounet>
there are tons of tutorials / manuals about emacs
<alpounet>
you should take a look at them and see if you wanna try
<charlesno>
i think i will
<adrien>
(* vim *)
<cthuluh>
(* emacs with tuareg-mode *)
<charlesno>
when I load a .ml file into the top level, like example.ml, why do I have to type "open Example;;" to interact
fabjan has quit [Ping timeout: 276 seconds]
fabjan has joined #ocaml
<adrien>
charlesno: #use or #load ?
<charlesno>
hmm. I'm not certain what you mean
<adrien>
how do you use that .ml file from the toplevel? what are the steps you do
<charlesno>
i guess it is #load
<charlesno>
well I'm in Eclipse
<charlesno>
i right click it and select "load in top level"
<charlesno>
so i think it is #load, sorry
<charlesno>
and then in the top level I write "open Example" for example.ml
<charlesno>
but i guess i want to know what "open Example" actually does
<adrien>
because the .ml file defines a module and you're not in the right namespace
<adrien>
you could also write "Example.foo" instead of "open Example" and then "foo"
<charlesno>
i see, where foo is a method in the file
<charlesno>
yes i just tried that and it works
<charlesno>
when I'm editing the file it says .ml, when i load it, it says .cmo
<charlesno>
is .cmo a compiled version of the file?
<adrien>
value, not methode: it can be anything defined at the first level of definition of the file (I need to go to sleep I think)