dark_light changed the topic of #ocaml to: OCaml 3.09.2 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
sreeram has joined #ocaml
pango_ has joined #ocaml
smimou has quit ["bli"]
david_koontz has joined #ocaml
pango has quit [Remote closed the connection]
Skal has quit [Read error: 54 (Connection reset by peer)]
buluca is now known as wu_mind_3
wu_mind_3 is now known as buluca
sreeram has quit ["Leaving"]
Leonidas has quit ["An ideal world is left as an exercise to the reader"]
buluca has quit [Read error: 104 (Connection reset by peer)]
khaladan has quit [Read error: 110 (Connection timed out)]
malc__ has quit ["leaving"]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
<dbueno> I'm learning to use OCamlMakefile; ocamlc -c is complaining about an unbound type constructor, IO, which is to be found in extLib.
<dbueno> Do I need the extLib *.cmi files sitting around in order to compile stuff, or is there some incantation I can pass to OCamlMakefile to get my stuff compiling?
_fab has quit [Read error: 104 (Connection reset by peer)]
<sponge45> I recommend you use findlib (ocamlfind). You just have to set PACKS = extlib
<dbueno> sponge45: That's in my Makefile. Apparently, though, it's not working ,because even linking is not working.
<dbueno> (I previously compiled a small library, which uses extlib, successfully with the PACKS variable set.)
<sponge45> Did you install extlib with ocamlfind?
<dbueno> Yes.
<dbueno> ocamlfind -list shows extlib 1.3 is installed.
<sponge45> so there must be a problem in your program
<dbueno> An actual compile error, you mean?
<dbueno> Everything compiles fine with my custom Makefile.
<sponge45> what does ocamlmakefile do, which could be different?
<dbueno> It doesn't pass an -I argument to where the .cmi files for extlib are.
<sponge45> that's not necessary
<dbueno> I hope not; but that's what it does differently.
<sponge45> it should do something like ocamlfind ocamlc -c ... -package extlib
<dbueno> ah
<dbueno> Yes, I see that in my other project it does that.
<sponge45> did you set the LIBS variable?
<sponge45> maybe you shouldn't, I don't know
<dbueno> I did not.
_fab has joined #ocaml
<dbueno> I'm trying to compile a subproject, and I didn't put each variable value in string quotes.
<dbueno> Now I have done so, and I'm getting different behavior. Investigating....
<dbueno> (The string quotes are suggested, but don't seem to be required, by the README from OCamlMakefile...)
<sponge45> oh
<dbueno> Now I"m getting:
<dbueno> ocamlyacc compiler/src/infoTypesParser.mly
<dbueno> ._d/compiler/src/sexpLexer.d:1: *** missing separator. Stop.
<sponge45> that looks like a malformed dependency file (that is included in the makefile)
<dbueno> Ah, okay.
<dbueno> Well, I'm specifying a bunch of dependencies for a subproject.
<dbueno> I'll paste my short makefile, if I can find that ocaml paster thingie I like.
<dbueno> Suggestions?
<sponge45> I don't know
<dbueno> k, coming....
<dbueno> There's my makefile.
<dbueno> From the directory where that Makefile resides, I run: "make subprojs".
<sponge45> I never put double quotes around SOURCES or PACKS or anything.
<dbueno> Even in subprojects?
<dbueno> If I remove just the double-quotes, I get the "unbound constructor" error.
<dbueno> If you refresh that paste page, you'll see my error in full.
love-pingoo has quit ["Connection reset by pear"]
<sponge45> I don't know how define ... endef is supposed to work.
<dbueno> Ah.
<dbueno> sponge45, do you compile with multiple modules?
<sponge45> sure, why?
<dbueno> I'm just wondering how you compile them all with one command.
<dbueno> Manually $(MAKE) -C each module?
<dbueno> (I mean, in a make target you write?)
<sponge45> I don't write make targets since I use ocamlmakefile :-)
<dbueno> So do you compile them all with one command?
<dbueno> I thought subprojects was the way to get a bunch of modules (i.e. collections of related code) to compile.
<sponge45> I don't follow you. Basically I just do "make nc" to make a native code executable, etc.
<dbueno> I have some utility code, with its own source directory.
<dbueno> I have main application code, in its source directory.
<sponge45> I use symbolic links!
<dbueno> I have another compiler I'm writing, in its source directory.
<dbueno> All those dirs are completely disjoint...
<dbueno> I don't see how that solves the problem. Conceptually, you put all your .ml/.mli files in one directory?
<sponge45> Yes. It's been a long time since I haven't worked on a really big project, but this what I was doing. And it makes a lot of files which are just links. Probably there are more elegant approaches. I don't know. I hate make!
<dbueno> OCamlMakefile makes those links?
<sponge45> no, me
<dbueno> Ah, thought so. Okay.
<sponge45> oh, and I was using CVS, which doesn't support symlinks btw. So it's definitely not an elegant approach.
<dbueno> Subprojects looks nice to me, but, it looks like it's reading my dependencies, but not my PACKS variable.
<dbueno> Odd.
<sponge45> If you find a good solution, that would be nice if you could post it there: http://www.ocaml-tutorial.org/compiling_ocaml_projects
<dbueno> Actually, that's what make me look at OCamlMakefile. =]
<sponge45> :-)
<dbueno> I'll do so, when I find the solution.
<sponge45> thanks
<dbueno> Pulling PACKS out of the define PROJ and up to the toplevel seems to have solved the problem.
<dbueno> Now I just want it to compile&findlib-install my little library before attempting to build this subproject.
<datrus> does anyone know how to get the number of elements in a Map?
<datrus> in constant time, if possible
<dbueno> datrus: Ignoring your time complexity requirements: (let num = ref 0 in MyMap.iter (fun _ -> num := !num + 1) map; !num)
<dbueno> ... where MyMap is what you got from Map.Make.
<datrus> yes but it takes O(n) time
<datrus> there is no length attribute for maps?
<sponge45> nope
<datrus> well that sucks
<dbueno> datrus: You could implement a decorator straightforwardly.
<datrus> ok
rashnu has quit []
mindCrime_ has joined #ocaml
<dbueno> sponge45: Have you used OCamlMakefile to install findlib libraries?
<dbueno> Apparently there needs to be a META file?
johnnowak has joined #ocaml
<sponge45> yes
<dbueno> Never mind; should have Googled. =]
love-pingoo has joined #ocaml
khaladan has joined #ocaml
johnnowak_ has joined #ocaml
johnnowak has quit [Read error: 60 (Operation timed out)]
khaladan has quit [Read error: 110 (Connection timed out)]
Smerdyakov has quit ["Leaving"]
johnnowak_ has quit []
cmeme has quit [Excess Flood]
jacobian_ has quit [orwell.freenode.net irc.freenode.net]
ppsmimou has quit [orwell.freenode.net irc.freenode.net]
eradman has quit [orwell.freenode.net irc.freenode.net]
Oatmeat|umn has quit [orwell.freenode.net irc.freenode.net]
batdog|gone has quit [orwell.freenode.net irc.freenode.net]
_fab has quit [orwell.freenode.net irc.freenode.net]
pango_ has quit [orwell.freenode.net irc.freenode.net]
triple_ has quit [orwell.freenode.net irc.freenode.net]
mindCrime_ has quit [orwell.freenode.net irc.freenode.net]
shawn has quit [orwell.freenode.net irc.freenode.net]
DRMacIver has quit [orwell.freenode.net irc.freenode.net]
levi_home has quit [orwell.freenode.net irc.freenode.net]
dbueno has quit [orwell.freenode.net irc.freenode.net]
sponge45 has quit [orwell.freenode.net irc.freenode.net]
klapmuetz has quit [orwell.freenode.net irc.freenode.net]
danly has quit [orwell.freenode.net irc.freenode.net]
slipstream-- has quit [orwell.freenode.net irc.freenode.net]
datrus has quit [orwell.freenode.net irc.freenode.net]
mattam has quit [orwell.freenode.net irc.freenode.net]
seafood_ has quit [orwell.freenode.net irc.freenode.net]
gim has quit [orwell.freenode.net irc.freenode.net]
Shimei has quit [orwell.freenode.net irc.freenode.net]
ozzloy has quit [orwell.freenode.net irc.freenode.net]
TaXules has quit [orwell.freenode.net irc.freenode.net]
Ugarte has quit [orwell.freenode.net irc.freenode.net]
Amorphous has quit [orwell.freenode.net irc.freenode.net]
Ugarte has joined #ocaml
datrus has joined #ocaml
cmeme has joined #ocaml
TaXules has joined #ocaml
mattam has joined #ocaml
slipstream has joined #ocaml
Oatmeat|umn has joined #ocaml
_fab has joined #ocaml
ozzloy has joined #ocaml
jacobian_ has joined #ocaml
Shimei has joined #ocaml
DRMacIver has joined #ocaml
levi_home has joined #ocaml
gim has joined #ocaml
triple_ has joined #ocaml
ppsmimou has joined #ocaml
danly has joined #ocaml
shawn has joined #ocaml
Amorphous has joined #ocaml
dbueno has joined #ocaml
mindCrime_ has joined #ocaml
dibblego has joined #ocaml
clog has joined #ocaml
slipstream has joined #ocaml
descender has joined #ocaml
_fab has joined #ocaml
Naked has joined #ocaml
TaXules has joined #ocaml
flux__ has joined #ocaml
cypher23 has joined #ocaml
mattam has joined #ocaml
ozzloy has joined #ocaml
datrus has joined #ocaml
Ugarte has joined #ocaml
bebui has joined #ocaml
zmdkrbou has joined #ocaml
DRMacIver has joined #ocaml
Norgg has joined #ocaml
seafood has joined #ocaml
haelix has joined #ocaml
bzzbzz has joined #ocaml
mindCrime_ has joined #ocaml
levi_ has joined #ocaml
levi_ is now known as levi_home
khaladan has joined #ocaml
dibblego has joined #ocaml
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml
cmeme has quit []
cmeme has joined #ocaml
khaladan_ has joined #ocaml
mindCrime_ has quit [Read error: 104 (Connection reset by peer)]
Demitar has joined #ocaml
khaladan has quit [Read error: 110 (Connection timed out)]
khaladan_ is now known as khaladan
khaladan_ has joined #ocaml
jacobian_ has joined #ocaml
khaladan has quit [Read error: 110 (Connection timed out)]
khaladan_ is now known as khaladan
johnnowak has joined #ocaml
_JusSx_ has joined #ocaml
bluestorm has joined #ocaml
bluestorm has quit [Remote closed the connection]
dibblego has quit ["Leaving"]
khaladan_ has joined #ocaml
pingu has joined #ocaml
khaladan has quit [Read error: 110 (Connection timed out)]
khaladan_ is now known as khaladan
mikezzz has joined #ocaml
khaladan_ has joined #ocaml
Skal has joined #ocaml
jajs has joined #ocaml
slipstream-- has joined #ocaml
slipstream has quit [Read error: 104 (Connection reset by peer)]
khaladan has quit [Connection timed out]
khaladan_ is now known as khaladan
khaladan_ has joined #ocaml
johnnowak has quit []
khaladan has quit [Connection timed out]
khaladan_ has quit [Connection timed out]
jajs has quit [Remote closed the connection]
descender has quit [Remote closed the connection]
descender has joined #ocaml
Naked is now known as Hadaka
tomppa has joined #ocaml
mikezzz has quit ["Leaving"]
<tomppa> This is weird, I can't get ocaml to #load .cmo's under tuareg-interactive
<tomppa> It works fine in xterm but under tuareg I just get "Unbound value Test.bar" after #load:ing
smimou has joined #ocaml
<tomppa> hmm, I see. How does #load:ing modules actually work. It seems that I can't use full pathnames with it
mikeX has joined #ocaml
tomppa has quit [Remote closed the connection]
wy has joined #ocaml
<wy> Hey all!
<wy> anybody here?
<love-pingoo> it's quite quiet today..
<wy> yes. I can't visit Ocaml's site now. Do you know why?
<love-pingoo> no idea, probably a temporary failure at INRIA
<wy> Do you know any good books on OCaml?
<cypher23> wy, there's a pretty good ebook..
<love-pingoo> unfortunately I didn't learn in books so it's always difficult for me to give an advice
<love-pingoo> but I believe the online oreilly is good
<cypher23> wy, but don't buy "Practical OCaml", unless you've got money to waste
<wy> cypher23: Then which book do you suggest?
<cypher23> wy, this one: http://caml.inria.fr/pub/docs/oreilly-book/ (doesn't work right now)
<cypher23> wy, there's also "Objective Caml for Scientists" ( http://www.ffconsultancy.com/products/ocaml_for_scientists/ ), but it's very expensive
<cypher23> not a bad book though
<wy> cypher23: You mean "Objective Caml for Scientists" not bad?
<cypher23> yes
<cypher23> but as I said, it's also quite expensive, so you should think twice before buying it
<wy> cypher23: Thank you. Unfortunitely it's not in the library...
khaladan has joined #ocaml
pango has joined #ocaml
bluestorm has joined #ocaml
Leonidas has joined #ocaml
khaladan_ has joined #ocaml
khaladan has quit [Connection timed out]
khaladan_ is now known as khaladan
khaladan_ has joined #ocaml
khaladan has quit [Read error: 110 (Connection timed out)]
khaladan_ is now known as khaladan
slipstream-- has quit ["leaving"]
mikeX_ has joined #ocaml
mikeX_ has quit [Read error: 60 (Operation timed out)]
mikeX_ has joined #ocaml
mikeX has quit [Read error: 110 (Connection timed out)]
khaladan_ has joined #ocaml
Smerdyakov has joined #ocaml
khaladan has quit [Connection timed out]
khaladan has joined #ocaml
slipstream has joined #ocaml
khaladan_ has quit [Connection timed out]
khaladan has quit [Connection timed out]
klapmuet1 has joined #ocaml
klapmuetz has quit [Read error: 54 (Connection reset by peer)]
khaladan_ has joined #ocaml
khaladan- has joined #ocaml
johnnowak has joined #ocaml
malc_ has joined #ocaml
khaladan_ has quit [Connection timed out]
mellum has joined #ocaml
slipstream has quit [Read error: 104 (Connection reset by peer)]
johnnowak has quit []
slipstream has joined #ocaml
<klapmuet1> does anyone have a copy of the toareg mode? the website is down :-/
<malc_> i do
<klapmuet1> do you mind posting it somewhere?
<pango> http://packages.debian.org/stable/devel/tuareg-mode ... there's a tar.gz link to the original tarball on the page
<klapmuet1> thanks :-)
<pango> testing has 1.45... I think 1.46 is buggy
<klapmuet1> that mode is wicked :-)
<klapmuet1> I used to use 'rlwarp' around the ocaml toplevel... but using emacs is much more fun :-)
<Smerdyakov> Why tuareg-mode over caml-mode?
<klapmuet1> I haven't evaluated it myself... I just found people talking more about tuareg than about caml-mode.
<malc_> caml-mode has strange notion of \s- rules for one thing
<Smerdyakov> What are those?
<malc_> word constituents
<Smerdyakov> I'm no emacs expert. What effect does that have on the user?
<malc_> for instance: having moo_foo and point at the beginning M-f will jump to after foo, i'm accustomed to it jumping to underscore
<malc_> and other such small things
mahogny has joined #ocaml
junis has joined #ocaml
<flux__> syntax hilighting and indentation are my reasons
<descender> Tuareg is more colourful (at least by default)
<Smerdyakov> It's easy to turn on color with caml-mode.
<mahogny> which GUIs does ocaml support well?
<Smerdyakov> mahogny, silly question. Any programming language that needs special support for anything GUI-related is not worth using.
<mahogny> well duh
<mahogny> rephrased then, which guis have good working ocaml libraries then?
<malc_> mahogny: tk, gtk+
<mahogny> alright. opengl?
<malc_> probably win32 windowing subsystem through ocaml-win32 too
<malc_> opengl is not a GUI
<malc_> but yes it is supported to some extent
<mahogny> no. but I ask about opengl anyway :)
<mahogny> well. I don't plan on supporting minority systems, so win32 isn't very important
<mahogny> is it just me or is ocaml.org down?
<klapmuet1> mahogny: it's down for me too
<mahogny> :(
<malc_> inria is down by extension ocaml.org and so on
<Smerdyakov> Never visit ocaml.org.
<Smerdyakov> Unless INRIA finally got it away from the clowns who were never updating it. :)
<mahogny> how mature would you guys consider ocaml to be in terms of commercial use?
<mahogny> I'm more into haskell, never touched ocaml
<Smerdyakov> It's very solid there, but I would choose SML over OCaml.
<mahogny> well. ocaml seems to be faster, at least according to the language shootout. is it the case in your experience?
<Smerdyakov> No, not even close.
<mahogny> ok
<Smerdyakov> OCaml performance is horrible compared to SML with MLton.
<Smerdyakov> OCaml has no optimizing compilers.
<mahogny> o_O
<Smerdyakov> The Shootout shows only microbenchmarks.
<Smerdyakov> With no opportunities for optimization across abstraction boundaries
<malc_> sigh
<malc_> let's play along
<Smerdyakov> malc_, what is it?
<malc_> MLtons performance is horrible at compile time
<malc_> makes you want to hang yourself while it works
<Smerdyakov> malc_, that doesn't matter to anyone with a new computer.
<malc_> not to mention exorbitant resource requirements
<mahogny> malc_, you mean compilation takes time?
<Smerdyakov> malc_, you use SML/NJ during development and MLton for release builds.
<malc_> mahogny: that's to put it mildly
<malc_> Smerdyakov: right right
<mahogny> well. who cares about compilation time. not the customer of my programs at least :)
<malc_> and then fight differences in FFI and nuisance in conformance
<malc_> very very practical.. i already mentioned this fact
<Smerdyakov> No, SML/NJ and MLton both support the NLFFI.
<mahogny> how is mlton compared to C in speed?
<malc_> mahogny: speed is very good
<mahogny> assuming you don't write utterly stupid ml code
<Smerdyakov> You can't compare a compiler to a language.
<mahogny> alright. gcc
<mahogny> but gcc is c for me :)
<Smerdyakov> MLton will beat GCC output performance easily on programs that use lots of abstraction.
<malc_> Smerdyakov: NLFFI or not NLFFI those are two different compilers, with different gcs with different everything, no matter how good both say to support NLFFI there will be differences
<Smerdyakov> Similarly for MLton vs. OCaml compiler
<mahogny> does mlton have it's own channel? or is this discussion fine here?
<Smerdyakov> malc_, do you have any experience with that mode of development, or are you just conjecturing?
<Smerdyakov> mahogny, #sml is more on-topic.
<mahogny> thanks
<malc_> Smerdyakov: just conjecturing
<mahogny> hm. very small channel though :)
<Smerdyakov> malc_, I rest my case. :)
<malc_> Smerdyakov: apparently you do.. so what have you written employing this model..
* malc_ gone to eat.. hopes to find something of essence upon return
<Smerdyakov> This compiler: http://laconic.sf.net/
<Smerdyakov> No shared FFI stuff there. I will dive into that in the next few weeks with a different project.
<mahogny> Smerdyakov, if we assume there is little abstraction, say, rungekutta, how would it compare then? is it easy to replace SML with C in the parts which are lacking?
<Smerdyakov> mahogny, sure you didn't mean that for #sml?
<mahogny> sorry
<mahogny> yes
<mahogny> lets take it there
<Smerdyakov> mahogny, I'm waiting for you to re-ask the question with appropriate context so that everyone there can participate. :)
<mahogny> Smerdyakov, :)
love-pingoo has quit ["Connection reset by pear"]
khaladan has joined #ocaml
descender has quit [Remote closed the connection]
descender has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
<malc_> Smerdyakov: so you don't have any experience either.. i.e. conjecturing that there would be no problems.. i think i'd go for resting the case too
<Smerdyakov> I'll tell you soon. However, I think I have a stronger position, as the MLton developers are always considering these issues.
<malc_> Will have to wait and see.
khaladan- has quit [Connection timed out]
sponge45 has joined #ocaml
junis has quit [Read error: 110 (Connection timed out)]
_fab has quit []
sponge45 has quit ["zzzzzzzzzz"]
Leonidas has quit ["An ideal world is left as an exercise to the reader"]
levi_home has quit [Remote closed the connection]
fik has joined #ocaml
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml
llama32 has joined #ocaml
<llama32> type x = Taco of blah * (something * (bleh list)) | ...;; <-- when matching to Taco, i only want to pass all data over to a function, but do i still have to do match y with Taco x * (y * z) or whatever?
<llama32> bleh, i sorta lost track of the letters i was using there :)
<pango> don't need to, matching with Taco everything -> should do
<pango> (everything will be bound to your complex tuple)
<pango> mmh, oh there's the infamous constructor of a tuple vs. constructor of several arguments pb
smimou changed the topic of #ocaml to: Dicussions about the OCaml programming language | http://caml.inria.fr/
<pango> Taco of blah * (something * (bleh list)) isn't the same as Taco of (blah * (something * (bleh list))), iirc
<llama32> ah, that works, thanks