gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
ftrvxmtrx has joined #ocaml
Tobu has joined #ocaml
mlh has quit [*.net *.split]
mlh has joined #ocaml
SEcki has quit [Remote host closed the connection]
bzzbzz has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 240 seconds]
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
Amorphous has quit [Ping timeout: 272 seconds]
Amorphous has joined #ocaml
Fullma has quit [Quit: Fullma]
avsm has joined #ocaml
avsm1 has quit [Ping timeout: 272 seconds]
joewilliams_away is now known as joewilliams
joewilliams is now known as joewilliams_away
lpereira has joined #ocaml
mehdid has quit [Read error: Operation timed out]
orbitz has quit [Ping timeout: 245 seconds]
dskippy has joined #ocaml
<dskippy> What is the best introductory OCaml book for someone who has been a software engineer for a decade and knows Lisp/Scheme/Haskell/C/Perl/Python pretty well?
almaisan-away is now known as al-maisan
<al-maisan> dskippy: unfortunately there's not much choice. There's http://www.amazon.com/dp/159059620X but the reviews speak for itself.
<dskippy> al-maisan: Thanks.
<dskippy> It's sort of the same in the Haskell world. Real World Haskell is just great and the rest sort of suck.
orbitz has joined #ocaml
<al-maisan> yeah
<schmx> hoh
<schmx> practical ocaml is pretty shit.
<schmx> dskippy: I found Ocaml for scientists quite nice meself.
<al-maisan> dskippy: I have also read http://www.amazon.com/dp/0521576814/ and liked it but it has a somewhat theoretical slant
<al-maisan> yeah, "Ocaml for scientists" is nice if you can get it at a reasonable price
<al-maisan> dskippy: if all else fails go with the official documentation and a try programming something small :-)
<dskippy> al-maisan: I generally do that. But, my honest motivation here is that my parents demand a Christmas list and I'm horribly over due.
<dskippy> And I don't, generally, want much.
<schmx> dskippy: Get some F# books (:
<dskippy> But a book is nice. It's more collected than a series of Google searches and I can take it on the subway.
<schmx> Or maybe a digital book reader and render google searches into a pdf ;)
<dskippy> I think I wouldn't want a book on F# or a digital book reader for roughly the same reasons, actually.
<al-maisan> dskippy: I think your best bet is http://www.amazon.com/dp/0521576814/ + http://caml.inria.fr/pub/docs/manual-ocaml/index.html for the object-oriented stuff and the standard library overview.
mehdid has joined #ocaml
hto has quit [Read error: Connection reset by peer]
lpereira has quit [Quit: Leaving.]
hto has joined #ocaml
ttamttam has joined #ocaml
astertronisticon has quit [Quit: Leaving]
dskippy has left #ocaml []
boscop_ is now known as boscop
<f[x]> gildor, curl has the api to plug in async IO library to manage sockets and libcurl does the rest (processing, timeouts, etc)
<f[x]> flux, you may want to try the latest ocurl, I had fixed several crash bugs there
<f[x]> gildor, I am currently using libevent with ocurl
<f[x]> btw it's a pity that there is no common async IO layer for ocaml (like I heard AnyEvent in perl), i.e. a common low-level interface (with different implementations - Unix.select, libev, libevent, whatever), that everybody can code against, then glueing different libs become easier
<flux> the funny thing about that idea is that libev and libevent both support multiple different async wait mechanisms ;)
<flux> but yes, I do get your point
<flux> but how would things like Lwt fit into an api like that?
<flux> (I guess: by wrapping)
<f[x]> lwt should use this layer too
<f[x]> lwt is more than async io
<f[x]> i.e. async io implementation is just some low level mechanism that is used when providing nice abstraction of light-weight threads
<f[x]> yes, providing one more layer (and wrapping all C bindings to this interface) is not a way to achive super-duper performance, but in many tasks it is more important to have generic api to glue different parts easily because IO is not a bottleneck (who gonna write another nginx in ocaml anyway?)
lars9 has joined #ocaml
<lars9> hi
<lars9> anyone uses ocaml at work?
<gildor> f[x]: I think Lwt is a nice framework for async thing
<gildor> lars9: I am
<f[x]> gildor, it is, but it makes a choice - select or libev currently. One size doesn't fit all
<gildor> f[x]: Lwt hides most of the async stuff I don't like (e.g. a single big event loop, always hard to code, IMHO)
<lars9> i'm going to take an interview in ocaml. but i only know haskell and don't know ocaml. is there a quick way to learn ocaml for other FP users?
<gildor> f[x]: maybe on the low level side, there can be different implementation
<f[x]> there is many code already - rewriting it into lwt is not an option - but using lwt for new parts would be ok - if it was possible to make lwt use already existing event loop
<gildor> f[x]: but I think you must propose a patch to do it ;è)
<gildor> ;-)
<flux> lars9, hmm.. there's a comparison between sml and ocaml, if that's of any help :)
<flux> lars9, "ocaml for haskell programmers" finds something on google
<lars9> flux
<gildor> lars9: when is your interview ?
<lars9> flux: thanks
<f[x]> yes, that's the point - the low-level implementation shouldn't be mandated by any networking lib - say ocamlnet or lwt
<lars9> gildor: next week.
<gildor> f[x]: maybe lwt's upstream can accept this kind of patch (e.g. make low-level not mandated by networking lib)
<f[x]> it is the same situation as with extlib.IO - look at camlzip, camlimages, etc - they all use channels for io - awful!
<flux> f[x], you mean it's awful in that it's not async?
<flux> because otherwise standardization is great
<gildor> lars9: 1 week is short to learn ocaml, I recommend not to fake it, i.e. explains that you are an Haskell programmer and you start learning OCaml
<f[x]> no, it is awful that I cannot gzip into string
<flux> oh you mean they use ocaml channels
<flux> it's a shame that ocaml channels aren't extensible
<flux> it would be such a small change.
<gildor> f[x]: there was an effort to bring Extlib IO channel to a lot more place
<flux> (of course, they still wouldn't be suitable for async workload)
<f[x]> flux, it is ok for channels, there is extlib.IO for exactly this
ftrvxmtrx has quit [Quit: Leaving]
<lars9> gildor: probably i should do that
<lars9> so ocaml is strict, and muttable var is allowed?
<gildor> lars9: yes
<gildor> though mutable var is not recommended (and when it is possible, people avoid it)
<companion_cube> flux, one thing you may be surprised of is let f x y = (* something *) is not the same as let f = (* something point free equivalent *) in the general case
<f[x]> gildor, maybe, but today the situation is still the same (there are some patches)
<gildor> you also have direct side effect for writing/reading to files
<lars9> gildor: is IO restircted inside of IO Monads?
<gildor> f[x]: for camlzip, I don't see public patches that implement Extlib IO
<gildor> lars9: no IO monad (there are libraries that allow it though)
<f[x]> gildor, for camlzip the patch is inside mldonkey
<gildor> and they don't want to export it ?
<f[x]> why not?
<gildor> I don't know, they never propose it to Xavier ?
<f[x]> they = me
<f[x]> I will post a patch to forge
<gildor> good starting point ;-)
<lars9> in "type person = name * address;;" what is *, and is two ;s are needed at the end of a line?
<gildor> the ";;" is a separator, but not needed
* f[x] postponed it because some people don't like extlib for some reason so it is unlikely that camlzip dep on extlib will pass through
<gildor> the * means you define a tuple
<gildor> of 2 elements
<gildor> type person = name * address * birthday is a tuple of three elements
<gildor> f[x]: AFAIK, you can have Extlib IO withouth depending on extlib
<lars9> gildor: thanks, that's the definition of tuple type, how to write a tuple value?
_andre has joined #ocaml
<gildor> let me = ("Sylvain Le Gall", "France")
<lars9> gildor: is rec always needed to define a recursive function?
<f[x]> there is object level interface - but you know - objects are sloooow - so it is even more unlikely
<gildor> lars9: yes
<gildor> f[x]: why objects are slow ?
<f[x]> runtime dispatch
<lars9> gildor: thanks. i spent 1/4 time in my 1st interview in guessing the syntax, i guess i should be able to read ocaml first.
<gildor> f[x]: runtime dispatch is not a big deal
<gildor> f[x]: and having the Extlib IO in camlzip (through the object) is a start
<f[x]> somebody should measure it, but thats the common perceived feeling about ocaml objects
<gildor> f[x]: if people want speed, they have the native interface
<gildor> f[x]: partial application is slower also, but it doesn't mean people don't use it
<gildor> or anon function
<gildor> (because they don't get inlined, e.g.)
<f[x]> but objects get most of the bashing :)
<gildor> f[x]: if you stop at bashing, you will stop often :-)
<gildor> f[x]: esp. when it comes to performance
<f[x]> true
<gildor> f[x]: I spent weeks trying various ideas of various people to enhance the speed of one of my application
<gildor> f[x]: but ended up with the most simple scheme, because a lot of tips / what people think is good but never tested it / are in fact not good
<gildor> f[x]: honestly, start small, grow bigger if needed and it is justified
<gildor> f[x]: if jdh30 have spent 50% of the time he posts on the mailing list, working on HLVM, we should have a top class demonstration of LLVM power
<gildor> f[x]: i.e. providing projetcs/patches is better than bashing
* f[x] completely agrees
<gildor> f[x]: send the patch to the forge for CamlZip IO, I will talk about it to Xavier (and provide him with _oasis also)
<gildor> f[x]: if you can make it not depends on Extlib, it is even better
tmaeda has quit [Ping timeout: 240 seconds]
<f[x]> ok
avsm has quit [Quit: Leaving.]
tmaeda has joined #ocaml
<flux> soo, ocaml-tutorial's been down for some time?
ftrvxmtrx has joined #ocaml
init1 has joined #ocaml
munga has joined #ocaml
mlh has quit [Ping timeout: 248 seconds]
lars9 has left #ocaml []
mlh has joined #ocaml
mlh has quit [Ping timeout: 248 seconds]
mlh has joined #ocaml
Yoric has joined #ocaml
mlh has quit [Ping timeout: 248 seconds]
mlh has joined #ocaml
smerz has quit [Remote host closed the connection]
ztfw has joined #ocaml
mlh has quit [Ping timeout: 248 seconds]
mlh has joined #ocaml
init1 has quit [Read error: Connection reset by peer]
init1 has joined #ocaml
seafood has joined #ocaml
<mfp> flux: rwmjones is rebuilding the machine in order to avoid embarrassing incidents after the exim4 security advisory
mlh has quit [Ping timeout: 248 seconds]
mlh has joined #ocaml
cthuluh has quit [Remote host closed the connection]
cthuluh has joined #ocaml
Yoric has quit [Ping timeout: 272 seconds]
<flux> maybe some placeholder would be nice..
seafood has quit [Ping timeout: 260 seconds]
seafood has joined #ocaml
mlh has quit [Ping timeout: 248 seconds]
mlh has joined #ocaml
oriba has joined #ocaml
oriba has quit [Remote host closed the connection]
seafood has quit [Quit: seafood]
mlh has quit [Ping timeout: 248 seconds]
mlh has joined #ocaml
Modius has quit [Quit: "Object-oriented design" is an oxymoron]
mlh has quit [*.net *.split]
morphbot has joined #ocaml
morphbot has left #ocaml []
Fullma has joined #ocaml
mlh has joined #ocaml
pikachuyann has joined #ocaml
init1 has quit [Quit: Quitte]
pikachuyann has quit [Remote host closed the connection]
pikachuyann has joined #ocaml
avsm has joined #ocaml
mlh has quit [Ping timeout: 248 seconds]
mlh has joined #ocaml
ikaros has joined #ocaml
avsm has quit [Ping timeout: 250 seconds]
shm has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
shm has joined #ocaml
SEcki has joined #ocaml
joewilliams_away is now known as joewilliams
shm has quit [Ping timeout: 260 seconds]
thomasga has quit [Quit: Leaving.]
lamawithonel has joined #ocaml
shm has joined #ocaml
_andre has quit [Quit: leaving]
_andre has joined #ocaml
al-maisan is now known as almaisan-away
jonafan has quit [Quit: Leaving]
ftrvxmtrx has quit [Quit: Leaving]
avsm has quit [Quit: Leaving.]
Fullma has quit [Ping timeout: 240 seconds]
srcerer has joined #ocaml
ttamttam has quit [Remote host closed the connection]
joewilliams is now known as joewilliams_away
Smerdyakov has joined #ocaml
tsuwabuki has quit [Remote host closed the connection]
jonafan has joined #ocaml
ftrvxmtrx has joined #ocaml
mlh has quit [Ping timeout: 248 seconds]
mlh has joined #ocaml
munga has quit [Read error: Operation timed out]
joewilliams_away is now known as joewilliams
thelema has quit [Remote host closed the connection]
_andre has quit [Quit: leaving]
alexyk has joined #ocaml
munga has joined #ocaml
<alexyk> I have an algorithm used for integer arrays, using + and now I need to adapt it to doubles. Do I really have to cut and paste the whole function and replace + with +. ?
<Smerdyakov> If it's just a function, you can make it take the addition operation as an argument.
<Smerdyakov> Otherwise, if we're talking about multiple coordinated definitions, then you have a natural use case for functors.
shm has quit [Ping timeout: 260 seconds]
smerz has joined #ocaml
<flux> alexyk, let (+) a b = (+.) a b, tadah!
<flux> but search and replace might work as well..
<alexyk> Smerdyakov: flux: yep, thx!
<alexyk> flux: I need to keep both
<Smerdyakov> Also, you could switch to a language with type classes. ;)
mlh has quit [Ping timeout: 248 seconds]
<alexyk> Smerdyakov: and strictify it to no end and engage in endless monadic thinking instead of doing work, yeah
<alexyk> ...waiting gfor it to compile...
<Smerdyakov> My language, Ur/Web, is both eager and type-classy.
<alexyk> ...and annoying its acolytes with reminiscences how fast and simple OCaml was...
<Smerdyakov> But you wouldn't want to use it if you don't like monadic IO. :)
mlh has joined #ocaml
munga has quit [Ping timeout: 255 seconds]
<alexyk> Smerdyakov: when implementing my PhD algos mining a big chunk of Twitter, I use a really working workhorse of ocaml... the whole idea is to forget language lawyery for a while and just do it
<alexyk> with minimal respect to doing things properly
<alexyk> Smerdyakov: you can't google for Ur/Web from Chrome!
<alexyk> Chrome thinks Ur is a protocol
<Smerdyakov> LOL
<hcarty> Smerdyakov: Is Ur useful outside of web development in its current state?
ulfdoz has joined #ocaml
<Smerdyakov> hcarty, there is only Ur/Web now. You probably wouldn't want to try to use it for something else.
shm has joined #ocaml
brendan has quit [Quit: leaving]
brendan has joined #ocaml
<alexyk> Smerdyakov: larval stealth sounds deadly :)
<Smerdyakov> *grrrrowl* *BITE*!
<alexyk> Why + and +. are specialized, while < is not?
<flux> alexyk, < works for everything, not just numbers
<alexyk> flux: so is it because it returns bool it can be implemented polymorphically?
Smerdyakov has quit [Quit: Leaving]
<flux> alexyk, no, it's because it's implemented for every type 'a
<alexyk> ok
<flux> alexyk, < comparison between functions will fail, but it will type ok
<flux> similarly + between values that are would not be addable would fail at runtime
<flux> and runtime errors are something that the caml people aspire to avoid..
<alexyk> yep
<alexyk> does 3.12 compile much faster or am I imagining things?
dskippy has joined #ocaml
<hcarty> alexyk: I haven't noticed a difference, but I haven't done any actual tests.
<alexyk> btw, anybody here uses omake? I found that ot often runs and the executable does nothing. An old-style makefile redoes things and teh executable works, with the same sources... I wonder if omake is buggy or am I missing something.
hto has quit [Ping timeout: 255 seconds]
fraggle_ has quit [Ping timeout: 250 seconds]
blackswan1 has joined #ocaml
fraggle_ has joined #ocaml
hto has joined #ocaml
<blackswan1> i have a stupid ocaml question.
<blackswan1> foo.ml: class foo = object end
<blackswan1> no wait
<blackswan1> foo.ml: class foo = object (self) end
<blackswan1> bar.ml: class bar = object (self) inherit foo end
<blackswan1> how do i compile bar so it sees foo?
<hcarty> blackswan1: You need to either "open Foo" in bar.ml or refer to foo in a fully qualified way - Foo.foo
<blackswan1> thx.
<blackswan1> Reference to undefined global `Glade' *sigh*
<blackswan1> i am unduly baffled by the ocaml compiler
<blackswan1> whee. it works.
alexyk has quit [Quit: alexyk]
thelema has joined #ocaml
rixed_ has joined #ocaml
alexyk has joined #ocaml
mlh has quit [Ping timeout: 248 seconds]
lpereira has joined #ocaml
mlh has joined #ocaml
alexyk has quit [Quit: alexyk]
blackswan1 has left #ocaml []
drunK has joined #ocaml
<pikachuyann> bonne nuit, good night
pikachuyann has quit [Quit: Quitte]
blackswan1 has joined #ocaml
lpereira has quit [Quit: Leaving.]
alexyk has joined #ocaml
bzzbzz has quit [Quit: leaving]
lamawithonel has quit [Ping timeout: 255 seconds]
lamawithonel has joined #ocaml
alexyk has quit [Quit: alexyk]
lamawithonel has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Quit: alexyk]
ikaros has quit [Quit: Leave the magic to Houdini]
blackswan1 has left #ocaml []
Obfuscate has quit [Ping timeout: 255 seconds]
dskippy has left #ocaml []
nox- has joined #ocaml
<nox-> moin
rixed_ has quit [Ping timeout: 260 seconds]
<nox-> im trying to fix geneweb after an ocaml update (knowing nothing about ocaml :) - does this patch look sane? http://paste.pocoo.org/show/307631/
<adrien> well, what was the issue in the first place?
<nox-> failed to build
<adrien> and from which version to which version?
<nox-> and i just put in semicolons at each place it complained about
rixed_ has joined #ocaml
<adrien> you have the error message?
SEcki has quit [Remote host closed the connection]
<nox-> on moment
<nox-> one
<nox-> File "wserver.ml", line 267, characters 1-4:
<nox-> Parse error: ';' expected after [str_item] (in [structure])
<adrien> you updated ocaml from which version to which version?
<nox-> ocaml-camlp5 went to 6.02.0 from some earlier version id have to check
<nox-> looks like from 5.13 to 6.02.0
<adrien> and ocaml itself?
<nox-> 3.11.2
<adrien> unless someone else has an idea, you should probably email Daniel de Rauglaudre, he's the author of both camlp5 and geneweb, it should be quite easy for him to answer you
<nox-> heh i didnt know both are from the same author... :)
<adrien> ;-)