mbishop 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!)
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
yziquel has quit [Remote closed the connection]
RobertFischer has quit ["Taking off -- check out http://smokejumperit.com and http://enfranchisedmind.com/blog/"]
<palomer__> let rec foo = print_hoo "bar"
<palomer__> and print_hoo = print_endline <--why is this disallowed?
<Smerdyakov> Recursion has to go through anonymous function expressions or particular data type constructors.
<Smerdyakov> I'm sure you can find the exact rule in the manual.
<palomer__> why?!
<Smerdyakov> I invite you to ponder how you'd compile OCaml programs otherwise.
<palomer__> ah, I see, value a needs value b and value b needs value a
<palomer__> so that's why ocaml doesn't have recursion by default like haskell!
yminsky has quit [Connection reset by peer]
yminsky has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
LordMetroid has quit ["Leaving"]
jlouis has quit [Remote closed the connection]
yminsky has quit [Read error: 110 (Connection timed out)]
yminsky has joined #ocaml
rodge has left #ocaml []
yminsky has quit [Read error: 110 (Connection timed out)]
yminsky has joined #ocaml
jdrake has quit [Read error: 110 (Connection timed out)]
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
yminsky_ has joined #ocaml
yminsky has quit [Read error: 104 (Connection reset by peer)]
Snark has joined #ocaml
yminsky_ has quit [Read error: 110 (Connection timed out)]
fatalerrorx has joined #ocaml
<fatalerrorx> no offence to anyone but ocaml really seems to be getting stale
<fatalerrorx> any reason for that?
<fatalerrorx> i guess the community is stale too :)
<Ugarte> In what way
<Ugarte> ?
<fatalerrorx> they don't want to add parallel gc because its too hard.....that just shows a lazy bunch of devs
<fatalerrorx> also the type system could be improved greatly but thats also to hard for them
<fatalerrorx> thus the shortcoming of ocaml sit there and never get improved
fatalerrorx has quit []
<Ugarte> ...
<flux> perhaps he had great examples of parallel gc with high allocation rates, but now we can never learn about them
netx has joined #ocaml
mlasson_ has joined #ocaml
ygrek has joined #ocaml
yminsky has joined #ocaml
mlasson_ is now known as marque
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
filp has joined #ocaml
<Proteus> I thought there was a Google Summer project for developing a concurrent GC?
al-maisan has joined #ocaml
al-maisan has quit [Remote closed the connection]
<Proteus> Does anyone have access to Jon Harrop's damn Ocaml Journal? the article titles and summaries sound intriguing but based on his postings on the ML I have to wonder about the value of the content.
Linktim has joined #ocaml
<flux> it remains to be seen how performant it will be
al-maisan has joined #ocaml
al-maisan has quit [Remote closed the connection]
al-maisan has joined #ocaml
al-maisan has quit ["Leaving."]
al-maisan has joined #ocaml
comglz has joined #ocaml
Associat0r has joined #ocaml
al-maisan has quit ["Leaving."]
al-maisan has joined #ocaml
Linktim has quit [Remote closed the connection]
Demitar has quit [Read error: 110 (Connection timed out)]
al-maisan has quit ["Leaving."]
marmottine has joined #ocaml
<ertai> gildor_: pong
Linktim has joined #ocaml
<gildor_> ertai: hello
Poulet has joined #ocaml
Poulet has quit [Client Quit]
Poulet has joined #ocaml
al-maisan has joined #ocaml
<Snark> hmmm... I didn't remember ocaml's error messages where that bad... where am I supposed to find an error at "Characters 490-495:" !?
<flux> use emacs and enter M-x goto-char 490
<flux> so it doesn't tell you the line then?
OChameau has joined #ocaml
<gildor_> ertai: hello (again;-)
<Snark> flux, good!
<Snark> cumbersome, but good
al-maisan has quit ["Leaving."]
yziquel has joined #ocaml
Poulet has quit []
mqtt has joined #ocaml
middayc has joined #ocaml
<flux> snark, what produces that kind of error messages?
<flux> camlp4?
middayc has quit []
tsuyoshi has quit ["Lost terminal"]
yminsky has quit [Read error: 110 (Connection timed out)]
mqtt has quit [Read error: 113 (No route to host)]
<Snark> flux, ocaml's interpreter
<thelema> Snark: how do you want the interpreter to tell you where the error is?
<thelema> s/interpreter/toplevel/
al-maisan has joined #ocaml
Poulet has joined #ocaml
al-maisan has quit ["Leaving."]
structured has quit [Read error: 110 (Connection timed out)]
<flux> snark, right, I rarely give long inputs to it; at times I do, though, exactly with (x)emacs
<flux> it could give the input line relative to some separator
<flux> perhaps relative to the previous ;;
<flux> off you go, the source is there ;)
<flux> how big a performance difference is there between for i = 1 to n do .. done and iter (fun i -> ..) (5 -- 10)?
<thelema> flux: Enum.iter?
<flux> yeah
<flux> perhaps I could download and try it :)
<thelema> well, for 5--10, I'd imagine almost none.
<flux> :)
<thelema> because it's only 6 loops.
<flux> good point. unless you do it a million times!
<flux> the relative performance difference should be the same
<thelema> for i=1 to n do print_int i; vs. Enum.iter print_int (5--n)
* thelema tries
<flux> I suppose the bulk of work is done in print_int..
* thelema is still working on integrating the new Enum into the compiler
<thelema> grr, stupid dependencies.
postalchris has joined #ocaml
<thelema> grr, why does Obj depend on Marshal...
<thelema> stupid obj.marshal and obj.unmarshal
* thelema wishes he could put obj at the head of the dependency list, but can't because of Marshal
<flux> hm?
<flux> why is it important to you?
<thelema> just de-circularizing the dependency tree...
<thelema> all the extlib code assumes it'll get compiled after all the stdlib, but if it gets integrated into the stdlib, that assumption doesn't hold.
<thelema> so I have to take the dependency tree and cut the circles somewhere
postalchris has quit [Read error: 110 (Connection timed out)]
<Snark> thelema, well, if the error is in a method in a class, then it could tell me which method in which class...
<thelema> Snark: that's one big downside of syntax errors - there's no methods or classes when such an error occurs
<flux> but there is surrounding text..
<flux> it could be helpful
<flux> but useful error messages are hard, or so I've heard :)
<thelema> they are. I've considered rewriting the parser to give more helpful error messages, but that'd definitely break something.
LordMetroid has joined #ocaml
Linktim has quit [Remote closed the connection]
<thelema> it might be possible to have a "path" that gets built during parsing...
Linktim has joined #ocaml
<thelema> when it enters a let phrase or object/method definition, it pushes the identifier on the path
<thelema> so you could follow the path to the general area of the error.
<Snark> if it could count lines, that could help too
<Snark> and it may be simpler
<thelema> the toplevel doesn't count lines, but the compilers do - why not use them?
<Snark> because emacs allows me to evaluate the buffer in a toplevel ?
<thelema> then fix emacs to count characters for you.
pango has quit [Remote closed the connection]
TheLittlePrince has joined #ocaml
<Snark> thelema, ah, that is a nice point
rodge has joined #ocaml
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
middayc has joined #ocaml
TheLittlePrince has quit [Connection timed out]
comglz has quit ["baille"]
structured has joined #ocaml
blendin has joined #ocaml
pango has joined #ocaml
<blendin> hi, when running ocamlfind ocamlc -o v1 -package netstring versuch1.ml
<blendin> I get Error while linking versuch1.cmo: Reference to undefined global `Netchannels'
<flux> -linkpkg
<flux> I wonder what it would hurt if -linkpkg was implied when -c wasn't given..
<flux> (or some other slightly more advanced version)
<blendin> indeed, -linkpkg resolves the problem...
<blendin> I though linking is done by default, and to prevent this one has to use -c
<flux> yes, but ocamlfind complicates things slightly
<flux> not much, though :_
<blendin> ah, ok, thanks for the help!
<flux> so -linkpkg is actually understood by ocamlfind, not ocamlc
<flux> happy hacking..
<blendin> flux: thanks :)
blendin is now known as tty56
tty56 has quit []
tty56 has joined #ocaml
<tty56> grrr bac irc client
<tty56> bad
Linktim has quit [Remote closed the connection]
hsuh has joined #ocaml
<hsuh> hi! i saw this syntax in "functional programming with caml light", is there a ocaml equivalent? let next = function [< ’x >] -> x;;
<pango> hsuh: looks like streams... they still exists in OCaml, but as a camlp4 syntax extension
<hsuh> aw, so they probably existed in ocaml 3.08 which is where that example comes from
<pango> #load "camlp4o.cma" ;;
<pango> # let next = parser [< 'x >] -> x ;;
<pango> val next : 'a Stream.t -> 'a = <fun>
<hsuh> is there anything that replaces streams for writing a parser?
ygrek has quit [Remote closed the connection]
<thelema> also, various people have written parser combinator libraries
<pango> Genlex, for caml syntax like languages
<pango> hsuh: btw, streams have been a syntax extension for a long time now; I'm almost sure they were by the time of 3.08
<hsuh> heh
<hsuh> thelema: afaik one guy wrote something called pcl as a ocaml summer project but didnt release it
<structured> I'm fairly confused about all these extensions. need to read up on it
<structured> hsuh: what has the failure rate been of these ocaml summer projects?
<hsuh> structured: i dont know that is the expected result of those projects (the paper or the code)
<thelema> hsuh: there's a complete one that I've used that's part of ... the core foundation library (part of ocamlnae)
<structured> thelema: awesome! I hope some of the projects turn out great this year
<hsuh> thelema: there is a parser with ocamlnet?
ygrek has joined #ocaml
<thelema> hsuh: yes
carm has joined #ocaml
Linktim has joined #ocaml
<tty56> does anyone know whether there is an imap client lib for ocaml?
<thelema> pretty sure there's not.
carm_ has joined #ocaml
<tty56> thelema: ok, thats what I found, too, just wanted to be sure I am right...
hsuh has quit [Read error: 104 (Connection reset by peer)]
hsuh has joined #ocaml
carm__ has joined #ocaml
structured has quit [Read error: 110 (Connection timed out)]
carm has quit [Read error: 110 (Connection timed out)]
carm has joined #ocaml
carm is now known as structured
carm_ has quit [Read error: 110 (Connection timed out)]
carm__ has quit [Read error: 110 (Connection timed out)]
mamie_cracra has joined #ocaml
marmottine has quit [Read error: 113 (No route to host)]
LordMetroid has quit ["Leaving"]
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
pango has quit [Remote closed the connection]
pango has joined #ocaml
sporkmonger has quit [Read error: 110 (Connection timed out)]
hsuh has quit [Read error: 104 (Connection reset by peer)]
hsuh has joined #ocaml
ygrek has quit [Remote closed the connection]
Yoric[DT] has joined #ocaml
Snark has quit ["Ex-Chat"]
<tty56> I am tinkering a bit with ocaml to implement some basic imap functionality. For that I need a good string lib. Any hints on a string lib that does some more advanced things like split etc.?
<det> ExtLib
<tty56> det: thanks!
<Yoric[DT]> 'evening
<tty56> Yoric[DT]: 'nabend
<Yoric[DT]> wie geht's ?
comglz has joined #ocaml
<tty56> Yoric[DT]: bestens, und selbst ;)?
<Yoric[DT]> Ein bißchen müde.
ygrek has joined #ocaml
ygrek has quit [Client Quit]
ygrek has joined #ocaml
<palomer__> http://ocaml.pastebin.com/mc7d0a7e <--does anyone know why this expression doesn't type?
<Smerdyakov> Well, the error message is clear enough, at least.
<Smerdyakov> You're trying to use the first pair component in a way that doesn't permit one of the constructors that might be used.
<Smerdyakov> You don't say which bit of the code generates the error, so it's hard to say more.
hsuh` has joined #ocaml
<Yoric[DT]> line 6
<palomer__> yeah, line 6
<Yoric[DT]> Sorry, line 6+
<Smerdyakov> Oh, you've just not used your helper function the way you meant to.
<palomer__> ahhh!
<Yoric[DT]> This expression has type [ `Foo of 'a ] list * [ `Bar of 'b ] list
<Yoric[DT]> but is here used with type [ `Bar of 'b ] list * [ `Bar of 'b ] list
<Smerdyakov> It would have helped to follow the usual procedure of fully type-annotating everything until the problem is clear.
<Yoric[DT]> (when replacing the end with an assert false)
Poulet has left #ocaml []
<tty56> mpf, I do not get the object system of ocaml. In "Practical Ocaml" I read that one can use Constructors with objects (called initializer). But could not find some further information on how to use them...
<tty56> heh, I forgot the ocaml manual...
hsuh has quit [Read error: 110 (Connection timed out)]
<tty56> palomer__: ok, but is it possible to use or access parameters within the initializer?
<palomer__> yes!
<palomer__> everything is possible!
<tty56> palomer__: :) cool... do I understand you example right in that after "initializer" I can fill in a "normal" method body?
<palomer__> tty56, eh??
<palomer__> tty56, I don't think you can do what you mean to do
<tty56> mhh ok
<palomer__> you want to define a method in initializer?
<palomer__> what you CAN do is:
<palomer__> val method_body = (None : (unit -> int) option)
<palomer__> method foo = match method_body with None -> raise (...) | Some y -> y ()
<palomer__> initializer
<palomer__> method_body <- (whatever you want)
<palomer__> Some (whatever you want)
<palomer__> but I don't see the point
filp has quit ["Bye"]
jlouis has joined #ocaml
ygrek has quit [Remote closed the connection]
<flux> I wonder if anyone has written a (toy) language that would use prolog for type inference..
<flux> (why not a real one too, I suppose)
jdrake has joined #ocaml
<thelema> Yoric[DT]: ping
hsuh` has quit [Remote closed the connection]
<tty56> palomer__: thanks for the reply, I am slowly starting to understand how the ocaml object stuff works
Yoric[DT] has quit [Read error: 113 (No route to host)]
jdrake has quit [Read error: 110 (Connection timed out)]
gaja has quit [Read error: 110 (Connection timed out)]
Linktim has quit [Remote closed the connection]
<palomer__> tty56, the ocaml object type system is really funky
netx has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
jdrake has joined #ocaml
jdrake has quit [Read error: 110 (Connection timed out)]
mamie_cracra has quit ["Quitte"]
thelema has quit [Read error: 110 (Connection timed out)]
comglz has quit ["Lost terminal"]
mlh has quit [Remote closed the connection]
jdrake has joined #ocaml
mlh has joined #ocaml
tty56 has quit []