rwmjones changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
lordmetroid_ has quit [Client Quit]
postalchris has quit ["Leaving."]
Yoric[DT] has quit ["Ex-Chat"]
ramkrsna has joined #ocaml
Demitar_ has joined #ocaml
Demitar has quit [Read error: 104 (Connection reset by peer)]
TheLittlePrince has quit [Client Quit]
<ikatz> Smerdyakov: don't remember if it was you who suggested the ~rwh smlbook, but thanks -- its very helpful
thermoplyae has left #ocaml []
<Smerdyakov> ikatz, glad to hear it.
<mbishop> Hmm, having trouble building ocaml-plplot
<mbishop> Sure I'm just missing a library or something, not sure where though
<mbishop> Hmm, it tries to include /usr/lib/plplot/lib, but I don't have that, even after a plplot install...I've got /usr/lib/plplot5.6.1/ but only drivers/ in that directory
jlouis has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
<mbishop> hcarty: there?
<mbishop> oh, never mind, plplot 5.7.x or newer
<mbishop> Sorry :)
hsuh has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
hsuh has quit [Client Quit]
coucou747 has quit [Read error: 110 (Connection timed out)]
seafood_ has quit []
Tetsuo has quit ["Leaving"]
prince has quit [Client Quit]
<hcarty> mbishop: Not a problem... sorry that I skipped 5.6.x, but versions 5.7.x+ have a few functions I needed
<mbishop> Yeah, 5.9.0 is the latest stable apparently, guess ubuntu is just behind on it's packages as usual
<mbishop> although I built it, topfind errors when trying to #require it
<mbishop> Cannot load required shared library dllplplot_stubs.
<mbishop> Reason: /usr/local/lib/ocaml/3.09.2/stublibs/dllplplot_stubs.so: undefined symbol: c_plptex3.
<hcarty> You can try running ldd /usr/local/lib/ocaml/3.09.2/stublibs/dllplplot_stubs.so to see if it is looking at the correct plplot files
<hcarty> I had similar trouble with Debian packages and self-compiled plplot installed
<hcarty> with both, that is
<mbishop> yeah it's using /usr/lib/libplplotd.so.9 instead of /usr/local/lib/libplplotd.so.9
<hcarty> export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH may fix that
<mbishop> yep, that worked, thanks
<hcarty> You're quite welcome. Please let me know how it goes for you and if you have any further problems
<hcarty> You are the first person I've heard any feedback from, so I'm glad to hear someone can at least compile something with it :-)
middayc_ has quit []
seafood_ has joined #ocaml
AxleLonghorn has quit [Read error: 110 (Connection timed out)]
seafood_ has quit []
seafood_ has joined #ocaml
seafood_ has quit [Client Quit]
seafood_ has joined #ocaml
dibblego has quit ["Leaving"]
seafood_ has quit []
ramkrsna has quit ["Leaving"]
seafood_ has joined #ocaml
musically_ut has joined #ocaml
musically has quit [Remote closed the connection]
prince has joined #ocaml
prince has quit [Read error: 104 (Connection reset by peer)]
prince has joined #ocaml
hkBst has quit ["Konversation terminated!"]
prince has quit [Read error: 104 (Connection reset by peer)]
prince has joined #ocaml
evn has quit [Remote closed the connection]
evn has joined #ocaml
pango has quit [Read error: 104 (Connection reset by peer)]
seafood_ has quit []
AxleLonghorn has joined #ocaml
dibblego has joined #ocaml
dibblego has quit [Client Quit]
goalieca has joined #ocaml
seafood_ has joined #ocaml
wy has joined #ocaml
ben has joined #ocaml
thelema has quit [Read error: 110 (Connection timed out)]
mfp_ has joined #ocaml
mfp has quit [Read error: 110 (Connection timed out)]
jlouis_ has joined #ocaml
musicallyut has joined #ocaml
jargonjustin has joined #ocaml
<jargonjustin> I'm looking for a way to write out an image as a PNG given pixel values, I think the camlimages library would help here, but I can't find any documentation.
musically_ut has quit [Remote closed the connection]
jlouis has quit [Read error: 110 (Connection timed out)]
evn_ has joined #ocaml
evn_ has left #ocaml []
<jargonjustin> Okay, so I can experiment with the interface files from the command line, how do I tell the ocaml interpreter to link against files (there's .mli, .ml, .cmi,. cmo, .cmx and .o) in /opt/local/lib/caml/camlimages/ ?
<jargonjustin> Doing "ocaml -I /opt/local/lib/ocaml/camlimages/" by itself doesn't seem to work
|Catch22| has quit [Read error: 113 (No route to host)]
<jargonjustin> Is there a way to have the interpreter load all .cmo files in a particular directory?
jlouis has joined #ocaml
jargonjustin has quit [Remote closed the connection]
jargonjustin has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
wy has quit ["Leaving"]
jargonjustin has quit [Remote closed the connection]
jargonjustin has joined #ocaml
thelema has joined #ocaml
ramkrsna has joined #ocaml
wy has joined #ocaml
jlouis_ has joined #ocaml
<tsuyoshi> I think you load a .cmo with #load
<tsuyoshi> not sure though.. I never really use the interpreter except to check syntax
jlouis has quit [Read error: 110 (Connection timed out)]
dibblego has joined #ocaml
wy has quit ["Leaving"]
seafood_ has quit []
ramkrsna has quit ["Leaving"]
ttamttam has joined #ocaml
netx has joined #ocaml
goalieca has quit [Remote closed the connection]
Tetsuo has joined #ocaml
musically_ut has joined #ocaml
jargonjustin_ has joined #ocaml
jargonjustin has quit [Read error: 104 (Connection reset by peer)]
johnnowak has joined #ocaml
filp has joined #ocaml
musicallyut has quit [Remote closed the connection]
Yoric[DT] has joined #ocaml
musicallyut has joined #ocaml
musically_ut has quit [Remote closed the connection]
jargonjustin_ has quit []
ben has quit []
petchema has quit [Remote closed the connection]
OChameau has joined #ocaml
petchema has joined #ocaml
musically_ut has joined #ocaml
ttamttam has left #ocaml []
ben has joined #ocaml
musically has joined #ocaml
ben has quit [Client Quit]
musicallyut has quit [Remote closed the connection]
musicallyut has joined #ocaml
johnnowak has quit []
coucou747 has joined #ocaml
musically_ut has quit [Remote closed the connection]
johnnowak has joined #ocaml
musically has quit [Remote closed the connection]
Yoric[DT] has quit ["Ex-Chat"]
StoneNote has quit []
marmottine has joined #ocaml
hkBst has joined #ocaml
bongy has joined #ocaml
Yoric[DT] has joined #ocaml
musicallyut has quit [Remote closed the connection]
johnnowak has quit []
prince has quit [Read error: 110 (Connection timed out)]
det has quit [Remote closed the connection]
bongy has quit ["Leaving"]
Tetsuo has quit [Read error: 104 (Connection reset by peer)]
Tetsuo has joined #ocaml
TheLittlePrince has joined #ocaml
middayc has joined #ocaml
Madrok has joined #ocaml
delamarche has joined #ocaml
AxleLonghorn has left #ocaml []
bluestorm has joined #ocaml
RobertFischer has joined #ocaml
l_a_m has quit [Remote closed the connection]
* RobertFischer is trying to wrap his brain around Eliom.
<thelema> Next, God reveals himself under the name "ELIOM" in Genesis 14:18-22. "Eliom" means " the most high God." <- this Eliom?
Stavros has joined #ocaml
<Stavros> hello
<Stavros> what's a good ocaml tutorial?
<Stavros> thelema: ah, thanks
<thelema> many people like Jason Hickey's book, linked to from that page.
thermoplyae has joined #ocaml
<Stavros> i'd like to start with something shortish
<thelema> You could try David Matuszek's short tutorial.
<thelema> again, linked from the ocaml-tutorial page.
<RobertFischer> thelema: Well, that Eliom I'm trying to wrap my brain around, too. But I was talking more about http://www.ocsigen.org/eliom
<RobertFischer> Coming from Rails/Grails, that's a bit different.
<RobertFischer> As in, totally.
<thelema> I see it does typed HTML generation, with the type system enforcing XHTML1.1 rules.
<thelema> that seems very different from what I know of rails...
pango_ has quit [Remote closed the connection]
<RobertFischer> It's entirely different.
<RobertFischer> And I'm trying to figure out if I like it, dislike it, or what.
<RobertFischer> Just trying to get a handle on it.
ben__ has joined #ocaml
ben__ is now known as ziph
ramkrsna has joined #ocaml
<ziph> How do I get decent error information from ocamlyacc? The parse_error function seems to just get "syntax error" as an argument.
pango_ has joined #ocaml
dwmw2_gone is now known as dwmw2_AVF
Sapan has joined #ocaml
<Sapan> is there a way to prevent ocamldebug from stopping at every exception?
<Sapan> breaking on every exception, that is.
<RobertFischer> Stop using exceptions.
<RobertFischer> Otherwise, I dunno.
Morphous has joined #ocaml
<thelema> ziph: In yacc, there's an error token that patterns can match to recover from an error
<ziph> thelema, how do you get the state at the error when an error production causes tokens to be shifted?
<ziph> Oh, I think I just answered my question. Are the left on the stack while the error production code is executed? :)
<thelema> If you mean what I think you mean, no - the code on the stack is dropped until something can handle the error.
<thelema> s/code/states/
<ziph> Ok, so the LHS parser location is meaningless?
* thelema isn't a yacc expert -- take anything he says with lots of salt.
<Sapan> RobertFischer: ok, fair enough. i can hack things up to supress exceptions while i'm debugging.
<RobertFischer> Sapan: Wish I had a better answer.
<Sapan> RobertFischer: sometimes the best answer is a reminder of the brute force method
<thelema> ziph: maybe you should look at some of the rules in parser.mly in the ocaml source tree... the token 'error' gets used there a lot.
<ziph> Ah, good idea.
<ziph> I was hoping to be able to slap one top level one in and get the last token shifted.
Stavros has left #ocaml []
Morphous_ has quit [Read error: 110 (Connection timed out)]
Linktim has joined #ocaml
ziph has quit []
Yoric[DT] has quit ["Ex-Chat"]
thermoplyae has quit ["daddy's in space"]
filp has quit ["Bye"]
benzo has joined #ocaml
<benzo> hi there
<RobertFischer> benzo: Hey.
<benzo> I made already several attemps in learning ocaml
<thelema> don't give up
<benzo> I'm probably too stupid but I want to learn it anyway :-)
<benzo> I even bought a book "Practical Ocaml"
<thelema> start simple.
<benzo> that's what I thought today
<thelema> benzo: do you like math?
<benzo> sec I have to check a few words in english ...
<RobertFischer> benzo: You can do it!
|Catch22| has joined #ocaml
<benzo> sorry it's been a while since my last math classes...
<benzo> ok I liked: vector math
<benzo> integrals, complex numbers
<thelema> benzo: maybe there's some vector math problems at projecteuler.net that you could work in OCaml
<benzo> I didn't liked statistics
<thelema> number theory?
<benzo> sorry I can't answer that
<benzo> is it a requirement for learning Ocaml? :-)
<RobertFischer> benzo: The fact that you can actually say you "like" a field of math is good enough for me. Once you get into Ocaml, you'll probably fly.
<thelema> benzo: integers, factors, etc.
johnnowak has joined #ocaml
<thelema> no, I've noticed lots of the projecteuler.net problems deal with number theory.
<benzo> sorry I forgot a lot of the math stuff since I don't use it on a regular basis
<benzo> but it definitely interesting
<benzo> it *sounds*
<benzo> here is what I wan't to do today:
<benzo> 1.) writing a hello.ml
<benzo> 2.) someting like: let x = "hello world";
<benzo> <pseudocode>print x</pseudocode>
<benzo> 3.) compile and run hello.ml
<benzo> It sounds crazy, but it seems nearly impossible to do...
<bluestorm> :p
<bluestorm> first you have to know that you do not need to "compile and run" to do some ocaml
<bluestorm> you can use a toplevel (a kind of "interactive interpreter") instead
<thelema> benzo: let x = "hello world" in print_string x
<benzo> I'm aware of toplevel, but I'm not used to it
<bluestorm> (it's a bit limited for big things, but a good start point imho and a very good way to try little bits of code)
<benzo> do you write all your stuff in it?
<thelema> benzo: # ocamlc hello.ml -o hello
<bluestorm> # ocaml hello.ml would work too
<benzo> sorry my wife is back and hungry ..
<bluestorm> :p
<benzo> cy soon
benzo has left #ocaml []
wy has joined #ocaml
dwmw2_AVF is now known as dwmw2_gone
Yoric[DT] has joined #ocaml
<delamarche> I wonder if he knows that the majority of the ocaml community thinks that "Practical OCaml" is about as instructional as an equivalent weight in toilet paper.
<delamarche> *of
<bluestorm> are there any good (~ better) sexy ocaml books in libraries ?
<bluestorm> i've mostly seen french books, wich are quite good but damn hard to find, and that one
<hcarty> bluestorm: Hopefully Hickey's book will be around soon. I am looking forward to buying a copy. Maybe more will follow after that?
Demitar_ is now known as Demitar
<bluestorm> i hope so
<bluestorm> and i hope that Hickey's draft will still be available after publication
<Smerdyakov> I think it won't (legally).
olsner has joined #ocaml
tromp has joined #ocaml
<tromp> thx
postalchris has joined #ocaml
<RobertFischer> Brian Hurt has a book he's neglected, if someone wants to finish it up.
<RobertFischer> Having read a draft, it's actually pretty good.
OChameau has quit ["Leaving"]
<RobertFischer> But finding a publisher for it in the US will be hard.
<Smerdyakov> Why does it matter where the publisher is?
<bluestorm> he could e.g. put it on wikibooks one day
RobertFischer has quit ["I'm out of here. Check out my blog at http://enfranchisedmind.com/blog or my company website at http://smokejumperit.com"]
tromp has quit ["leaving"]
thermoplyae has joined #ocaml
johnnowak has quit []
Demitar_ has joined #ocaml
Demitar has quit [Read error: 104 (Connection reset by peer)]
jargonjustin has joined #ocaml
ttamttam has joined #ocaml
middayc_ has joined #ocaml
middayc has quit [Read error: 110 (Connection timed out)]
middayc_ has quit []
middayc has joined #ocaml
ttamttam has left #ocaml []
thermoplyae has quit ["daddy's in space"]
ramkrsna has quit ["Leaving"]
Linktim has quit [Remote closed the connection]
ita has joined #ocaml
benzo_ has joined #ocaml
ygrek has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
bongy has joined #ocaml
bongy has quit [Client Quit]
<benzo_> hi there
middayc has left #ocaml []
bluestorm has quit ["Konversation terminated!"]
<benzo_> everyone is leaving :(
benzo_ has quit []
benzo_ has joined #ocaml
<delamarche> hey benzo
<delamarche> i was gonna tell you earlier
<delamarche> that practical ocaml book is supposed to suck
<delamarche> lol
StoneNote has joined #ocaml
<benzo_> delamarche, sorry I accidently leaved the chat room when my wife returned home
<delamarche> well that's a pretty good reason :D
<benzo_> I was late with cooking (blame Ocaml)
<benzo_> sorry there is sth wrong with my username, just a sec
benzo has joined #ocaml
<benzo> ok
drewism has joined #ocaml
<benzo> as I told you a few hours ago, I was trying (again) to make a start with Ocaml
<benzo> maybe its smarter if I let it go
<benzo> but on the other hand - maybe you could help me little bit...
<benzo> so maybe i repeat what I told you some hours ago about my "project"
<benzo> 1. vim helloworld.ml
<benzo> 2. let x = "hello World";
<benzo> and then something like "print x;"
<benzo> 3. and finally build and run
pfoetchen has joined #ocaml
<benzo> here is my code (well it barely deserves to called that): http://pastebin.com/m2d82bbe9
<benzo> then I run: ocaml mysupercode.ml
<pango_> and... it doesn't work
benzo_ has left #ocaml []
benzo has quit [Remote closed the connection]
benzo has joined #ocaml
<benzo> sorry but my irc client (colloqui) just crashed ...
<jonafan> it'd work if you used ;; instead of ; on those lines
<ita> benzo: yeah, your wife ... :-)
<jonafan> ; is used only for describing imperative blocks
<pango_> and/or study the difference between let and let ... in
<jonafan> it means there's nothing cool going on to the left of me, return what's on the right of me
<benzo> ita, yeah whats about it :x
<benzo> pango, thanks I'll have a look
<benzo> all I have is the (so called shitty) Practical Ocaml book
<thelema> benzo: there's no generic print function, only one for each type: print_string, print_int, etc.
<pango_> I mainly learned using http://caml.inria.fr/pub/docs/oreilly-book/ it's slightly dated now, but still worth a read
<thelema> and the syntax for let goes: let x = "hi" in
<benzo> but I think this print function is fine: http://pastebin.com/m2d82bbe9 - no?
* thelema leaves, back later tonight
<thelema> ben: that one will work.
drewism has left #ocaml []
<benzo> thelema, thanks it runs now
hkBst has quit [Read error: 104 (Connection reset by peer)]
hkBst has joined #ocaml
<benzo> I think my questions are too basic
<jonafan> basic questions make us feel smart
<benzo> I try to find some information about the let ... in structure
<benzo> but all I find is really advanced stuff
<jonafan> all it really does is define a variable in the following code
evn_ has joined #ocaml
<pango_> for some definition of `variable', es
<pango_> s/es/yes/
<jonafan> yeah yeah
<benzo> jonafan: my code looks the same but with just one semicolon at the end
<jonafan> yeah, it's pretty similar
evn_ has left #ocaml []
<jonafan> although the single semicolon is wrong
<benzo> why?
<benzo> whats the diff. between ; and ;;
munga has quit [Read error: 104 (Connection reset by peer)]
<benzo> or is ; always wrong?
<jonafan> ; expects the stuff before it to be (), ignores it, and returns the stuff after it
munga has joined #ocaml
<benzo> ()
<benzo> ?
<jonafan> ;; goes at the end of complete function definitions or type definitions
<jonafan> () is sort of like null
<jonafan> it is referred to as unit
<benzo> is it fine to say ;; comes after a statement?
<benzo> but never inside a function?
bla has quit [Read error: 110 (Connection timed out)]
bla has joined #ocaml
<jonafan> hmm kind of
<benzo> but on the other hand: isn't "let x = "hi" " some kind of a statement?
<jonafan> yeah
<jonafan> you'd put ;; after probably
<benzo> yeah but like you said thats wrong
<jonafan> no, 1 semicolon is wrong
<jonafan> your original code would also work if you used 2 semicolons in both places instead of 1
<benzo> yeah I've just tried that - it works
<benzo> ok, whats the diff. between /let ... ;;/ and /let ... in/ then?
<jonafan> things defined with let ... in will fall out of scope and the binding will be unbindified
<jonafan> let x = "hi";; kind of defines a constant in a module
<benzo> so let...in is a local variable?
<benzo> sorry defines a local variable
<jonafan> kind of
<benzo> what do you mean with binding?
<jonafan> well, it works differently than a regular variable
<benzo> the "binding is unbindified" sounds like a haiku to me
<jonafan> you can't really change it, but you can redefine it in a new scope
<benzo> this is exactly the stuff that nowhere is explained
<jonafan> it's really a semantic difference that doesn't really get in your way that often
Demitar_ has quit [Read error: 104 (Connection reset by peer)]
Demitar has joined #ocaml
<jonafan> but if you do let x = "hi" in let x = "hi 2" in BLAH, you've technically got 2 different xs in different scopes
<benzo> ah, ok
<jonafan> if the second one goes out of scope, the first one will come back
<jonafan> but you do need to restructure code for this sometimes, because you can't simply change the value of x in an if statement or something
<benzo> and sth. like / let x = "hi" in x;;/ is possible?
<jonafan> yes, that would evaluate to "hi"
<benzo> and x is local or global?
<jonafan> local, it won't exist after the ;;s
<benzo> ah, ok
<benzo> I mean not ok
<benzo> let x = "hi";; is global
<benzo> but let x = "hi" in x;; is local
<benzo> hmmm
Tetsuo has quit [Read error: 110 (Connection timed out)]
<benzo> how can I understand 'in'?
<pango_> don't. There's let and let ... in, they're different syntactic constructs
petchema has quit [Read error: 110 (Connection timed out)]
marmottine has quit ["Quitte"]
<pango_> `in' by itself has no meaning
<benzo> is it safe to say: I'm 'in' I take everything on the left side and evaluate that?
<pango_> in let id = expr1 in expr2, expr1 is always evaluated before expr2, yes, that's in language definition
<benzo> how does the two expression are related
<benzo> sorry my horrible english
<pango_> id is bound to expr1 value in expr2 scope
ygrek has quit [Remote closed the connection]
<benzo> why do you took 'in' at the beginning of your statement?
<pango_> what statement?
<jonafan> that "in" isn't part of the code
<benzo> in let id = expr1 in expr2, expr1
<benzo> ah, ok
<jonafan> he was defining scope in english, not ocaml
<benzo> :-)
<pango_> ok, I should have written in `let id = expr1 in expr2' ...
<pango_> btw that whole thing is an expression, not a statement
<benzo> so I can also write 'let x = "hi" in let x = x;;'
<pango_> nope
<benzo> neither 'let x = "hi" in let x = "world";;' ?
<pango_> because let x = x is a definition, not an expression
<benzo> whats your definition of a definition?
<pango_> jonafan said it's a statement... it's ok with me, even if some languages don't call definitions `statements'
<jonafan> i should be better about jargon
<benzo> guys a feel a little dizzy - I need a short break and reread some stuff you wrote
<benzo> thank you very much and see you soon
<jonafan> ta
<pango_> I'm not sure if OCaml has real statements... maybe `open' ? it's not very important...
<pango_> even open could be classified as (bundled) definitions