sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
ikaros_ has quit ["Leaving"]
johnnowak has quit []
smimou has quit ["bli"]
johnnowak has joined #ocaml
johnnowak has quit [Remote closed the connection]
ludwig- has quit [Read error: 104 (Connection reset by peer)]
mnemonic has joined #ocaml
<mnemonic> hi
love-pingoo has quit ["Connection reset by pear"]
love-pingoo has joined #ocaml
ludwig- has joined #ocaml
malc_ has joined #ocaml
malc__ has quit [Read error: 145 (Connection timed out)]
ikaros has joined #ocaml
jeffs has quit [Read error: 104 (Connection reset by peer)]
ircleuser has joined #ocaml
ircleuser has quit [Client Quit]
malc_ has quit [Read error: 145 (Connection timed out)]
curtosis has joined #ocaml
malc_ has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
Amorphous has quit ["arg... must... shutdown... computer burnin..."]
malc_ has quit [Read error: 145 (Connection timed out)]
malc_ has joined #ocaml
Amorphous has joined #ocaml
mikeX_ has joined #ocaml
mikeX has quit [Read error: 110 (Connection timed out)]
mikeX_ has quit ["leaving"]
jeffs has joined #ocaml
bzzbzz has quit ["leaving"]
curtosis has quit []
Amorphous has quit ["shutdown"]
Amorphous has joined #ocaml
mnemonic has quit ["leaving"]
Smerdyakov has quit ["Leaving"]
jeffs has quit ["Quit"]
Mr_Awesome has quit ["...and the Awesome level drops"]
jeffs has joined #ocaml
<jeffs> Is anyone here familiar with lazy evaluation?
<jeffs> My lazy list library is working great, but my parser isn't acting lazy.
mbishop has quit ["Leaving"]
<pstickne> heh. isn't lazy evaluation a core part of a functional programming language? :p
<jeffs> I think so.
<jeffs> I'm just not using it quite right.
<jeffs> I made a lazy Fibonacci sequence generator, that was easy.
malc_ has quit [Read error: 145 (Connection timed out)]
* pstickne doesn't actually use ocaml :( I've been meaning to learn...
diffbavis has quit [Read error: 54 (Connection reset by peer)]
<jeffs> It's not an especially difficult language if you stick with the programming style you're used to (eg imperative, functional, etc).
<pstickne> I currently use Ruby, I like the semi-functional (like Lisp) syntax it has... I've been trying to pick up Haskell but I can never get my head around monads.
<jeffs> Monads do look like a lot of trouble.
<jeffs> You could probably consider caml as an eagerly evaluated version of Haskell, minus the monads, plus object orientated and imperative features.
<jeffs> Although I haven't found a use for the OO part of caml.
joshcryer has joined #ocaml
mbishop has joined #ocaml
<pstickne> Hmm, I was sure [o]caml was lazy-eval :-/
<mbishop> nope, I'm kind of glad too heh
<pstickne> I should get myself a good book on it :p
<mbishop> gets confusing, and I prefer strict by default, and lazy when needed
<pstickne> mbishop, do you like ocaml or haskell better?
<mbishop> which isn't very often heh
<mbishop> ocaml
<mbishop> haskell is nice, great ideas and stuff, but way too theoretical I guess...more like an experiment in how to control side effects rather than being useful
<mbishop> at least to me, *shrug*
<jeffs> List comprehensions in Haskell are nice.
<mbishop> I never did learn that heh
<jeffs> It looked relatively simple to me. For instance [1..10] builds the list [1;2;3;4;5;6;7;8;9;10]. It's all syntactic sugar really, but it's nice.
<jeffs> er, actually taht's a bad example
<mbishop> ah, well I did learn that heh, but what I never got was the [x | <- blah] looking stuff
<jeffs> [x*x | even x] would give a list of squares of even numbers
<jeffs> I haven't looked into it enough to know what <- does.
<mbishop> maybe nothing, I might have just made that up :P
<jeffs> I dunno, I don't really know how to write Haskell. I've only had to learn to read it enough to understand some parsing functions.
<jeffs> And how lazy evaluation works. It SUCKS doing lazy evaluation in caml.
<mbishop> I like haskell's implicit pattern matching, a lot like erlang's, but other than that, doing anything useful is usually more of a pain than it (seemingly) needs to be
<jeffs> That's too bad. I was hoping the do { } syntax would make it easy to do imperative-style things.
<mbishop> it should, but having to mess with the IO type gets annoying
<mbishop> at least for me, some people don't seem to mind, or know how to control it better heh
<mbishop> but I think shunning side effects on systems that are basically all about side effects is a little impractical
<jeffs> i'm sure it can be a pain
<jeffs> I'm sure my lazy list functions work in a lazy manner... I can do append and fold_right on the entire Fibonacci sequence...
<jeffs> just my dumb parser isn't lazy
<jeffs> actually it's pretty smart :)
<pstickne> so what is a good Ocaml book?
<jeffs> 1 sec
<jeffs> it has links for you
bluestorm_ has joined #ocaml
bluestorm_ has quit [Remote closed the connection]
<mbishop> I have "The Functional Approach to Programming", not the greatest, but one of the few print books with ocaml in english heh
<mbishop> the online translation of the o'reilly book is good, and if you've got some money, you can get "Objective Caml for Scientists"
<jeffs> There's also "Practical OCaml"
<mbishop> I hear that book is terrible though
<jeffs> hm, the reviews on amazon say so
* mbishop nods
<mbishop> even the technical editor hated it heh
<jeffs> i looked through it at the bookstore. It has some useful examples, but I'm not sure it's good for a beginner, or worth that much money.
<jeffs> Well, I'll try to solve this problem with my parser not being lazy tomorrow.
<jeffs> good night
<pstickne> thanks for the links
smimou has joined #ocaml
mbishop has quit ["Leaving"]
mbishop has joined #ocaml
Amorphous has quit ["shutdown"]
joshcryer has quit [Read error: 104 (Connection reset by peer)]
smimou has quit ["bli"]
<flux-> (in ocaml, obviously)
<flux-> whops, type in tld, fixed: http://www.modeemi.cs.tut.fi/~flux/goba/
pstickne is now known as pst[sleep
pst[sleep has quit [Client Quit]
jlouis has quit ["Leaving"]
diffbavis has joined #ocaml
malc_ has joined #ocaml
Amorphous has joined #ocaml
Morphous has joined #ocaml
rickardg has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
malc_ has quit [Read error: 145 (Connection timed out)]
love-pingoo has joined #ocaml
rickardg has quit [Read error: 60 (Operation timed out)]
zhllg has joined #ocaml
<zhllg> does ocamlopt support mips?
<ppsmimou> zhllg: don't think so
jlouis has joined #ocaml
<zhllg> it does, however, only irix and n32 abi
Morphous has quit ["shutdown"]
Amorphous has joined #ocaml
jlouis has quit [Read error: 104 (Connection reset by peer)]
jlouis has joined #ocaml
cjeris has joined #ocaml
descender has quit [Remote closed the connection]
Amorphous has quit ["shutdown"]
Amorphous has joined #ocaml
descender has joined #ocaml
ikaros has quit ["segfault"]
dark_light has quit [Read error: 110 (Connection timed out)]
diffbavis has quit [Read error: 104 (Connection reset by peer)]
postalchris has joined #ocaml
Smerdyakov has joined #ocaml
love-pingoo has quit ["Leaving"]
pango has quit [Remote closed the connection]
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
pango_ has joined #ocaml
benny has joined #ocaml
benny_ has quit [Connection timed out]
diffbavis has joined #ocaml
ikaros_ has joined #ocaml
ikaros_ has quit [Client Quit]
jlouis has quit [Remote closed the connection]
love-pingoo has joined #ocaml
flux- has quit [Remote closed the connection]
flux- has joined #ocaml
pstickne has joined #ocaml
bluestorm_ has joined #ocaml
david_koontz has joined #ocaml
jlouis has joined #ocaml
pango_ has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
pango has joined #ocaml
pango_ has joined #ocaml
slipstream-- has joined #ocaml
cjeris has quit []
malc_ has joined #ocaml
dark_light has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
postalchris has quit [Read error: 110 (Connection timed out)]
jeffs has quit ["Quit"]
mnemonic has joined #ocaml
postalchris has joined #ocaml
david_koontz has quit ["Leaving"]
Hadaka has quit [zelazny.freenode.net irc.freenode.net]
oscarh has quit [zelazny.freenode.net irc.freenode.net]
mattam has quit [zelazny.freenode.net irc.freenode.net]
mattam has joined #ocaml
pstickne has quit [Remote closed the connection]
pstickne has joined #ocaml
pstickne has quit [Read error: 104 (Connection reset by peer)]
pstickne has joined #ocaml
<mnemonic> hi
<hcarty> Is it normal for Tuareg mode syntax highlighting to break when creating or deleting comments from an OCaml source file?
<hcarty> I'm new to Emacs, so I'm not sure if I've done something wrong or if this is a limitation from elsewhere
<hcarty> I was happily using Omlet and vim, but I found it became much too slow with longer source files (a few hundred lines+)
<flux-> syntax hilighting does break in (x)emacs with large regions, such as comments
<flux-> but I think it lazily tries to refontify the buffer if you let it stay for a while; or by manually saying M-x font-lock-fontify-buffer
<hcarty> flux-: Thanks, that works well
<flux-> maybe you can bind it to some key if that annoys :)
<hcarty> Yes, I'm looking in to how to do that now :-)
<hcarty> I'm doing some pretty heavy development and refactoring at the moment, so I'm constantly commenting and uncommenting code blocks.
smimou has joined #ocaml
<mbishop> Hmm
<mbishop> I'm iterating over a list of strings using List.iter, and outputting chars to the screen, and after it's done I want to put a newline, but doing (List.iter (fun -> c print_char (unmorse c)) pinput; print_newline) doesn't work
<mbishop> it prints the chars fine, but doesn't put the newline
<malc_> mbishop: print_newline _()_
<pango> print_newline () ?
<malc_> once again -warn-error A is your friend
<mbishop> oh haha of course, silly me
bluestorm_ has quit [Remote closed the connection]
bluestorm_ has joined #ocaml
pango_ has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
pango has joined #ocaml
pango_ has joined #ocaml
postalchris has quit [Read error: 148 (No route to host)]
<hcarty> For if ... else ... statments, does the ... block need surrounding parens?
<hcarty> The tutorial says it does..
<hcarty> But -- if 1 = 1 then "1" else let _ = 2 in failwith "here";; -- gives "1"
Smergo has quit [Read error: 60 (Operation timed out)]
<hcarty> I think I see what is happening in the tutorial vs this example. Interesting.
bluestorm_ has quit ["Konversation terminated!"]
<pango> ∣ if expr then expr [ else expr ] expr being any of the definitions in the list
<pango> so if/then/else itself is not a statement, it's an expression
<pstickne> yay! statements suck terribly! ^
<pango> and not all expressions are between parens, so if some tutorial says parens are needed, it's, at best, oversimplifying things
<hcarty> pango: Thanks for the pointer - I think it's the use of "something;
<hcarty> failwith "error" rather that "let _ = something in failwith "error""
jeffs has joined #ocaml
<hcarty> So it seems the ; ends the expr, whereas using let .. in does not? I think I was just running in to a terminology issue here.
<jeffs> howdy
<jeffs> hm, what is ":>" ?
<jeffs> it says you can do "expr :> typexpr"
<jeffs> I just tried "(1+x) :> int" but that gives a syntax error.
erfcf has joined #ocaml
<eradman> ':>' is used to do type coercion
<eradman> But it has to be within the parentesized expression
<eradman> (x:>type)
diffbavis has quit [Read error: 110 (Connection timed out)]
<eradman> I think this is mostly useful in OO subtyping ??