Banana changed the topic of #ocaml to: OCaml 3.08 "Bastille Day" Release available ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn , A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ , A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
TheDracle has quit [Remote closed the connection]
jason_ has joined #ocaml
jason_ has quit ["Client exiting"]
Lemmih_ has joined #ocaml
yauz has joined #ocaml
yauz_ has quit [Read error: 60 (Operation timed out)]
mrsolo has joined #ocaml
larsr has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
pac_away has quit ["leaving"]
whee has quit []
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
<mrsolo> hmm can someone point to me some lisp vs ocaml materials?
monotonom has joined #ocaml
larsr has quit [Remote closed the connection]
* Smerdyakov wonders how to get command line arguments.
<mrsolo> there is getopt module somewhere
<Smerdyakov> Eh, I found it. Sys.argv
<bk_> thought you knew that
<Smerdyakov> I had forgotten it.
Herrchen_ has joined #ocaml
wmg has joined #ocaml
wmg has left #ocaml []
Herrchen has quit [Read error: 110 (Connection timed out)]
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
ionOSu has joined #ocaml
<async_> Smerdyakov: you ever play around with mod_caml?
<Smerdyakov> No.
<Smerdyakov> I use this instead: http://smlweb.sf.net/
<async_> why not modcaml
<async_> oh you wrote it
<Smerdyakov> I don't know if it makes sense to use or not.
<Smerdyakov> I'm not too familiar with mod_caml.
<Smerdyakov> I don't know if it has the same kind of interface as my system does, though.
<Smerdyakov> Writing pages in "PHP-style."
<Smerdyakov> SML embdedded in HTML.
<async_> crazy
<async_> do you like sml better than caml?
<Smerdyakov> Not sure
cjohnson has quit [Connection timed out]
<async_> Smerdyakov: you ever do topcoder?
cjohnson has joined #ocaml
<Smerdyakov> Yes
<Smerdyakov> Not in a long time, though. It has negative psychological effects on me.
<async_> what do you mean?
<Smerdyakov> I get too into it.
<async_> whats your user name
<Smerdyakov> Psion
<async_> java or c++?
<Smerdyakov> I stopped using it around the time they added C++.
<Smerdyakov> I found a bug that let you run assembly on their servers. XD
<async_> im not too great at it
<Smerdyakov> I'm horrible at it.
<async_> a lot better than me
<Smerdyakov> Somehow I still won a lot of money.
<async_> im trying to learn more about algorithms, etc.
<Smerdyakov> I am a hopeless case for algorithms.
<Smerdyakov> I will never be quick at anything involving algorithms.
<Smerdyakov> And I'll probably never be quick at anything involving Java or C++ again, because I don't use 'em. :)
<async_> they're useful to know
<Smerdyakov> In certain company...
<mrsolo> what do you use now then?
<Smerdyakov> ML variants
<mrsolo> lucky :-)
<Smerdyakov> I've written more proofs in Coq than programs recently, too.
<async_> Smerdyakov: are you doing research, or working?
<Smerdyakov> Research is work, silly!
<debona|r> hrm
<debona|r> stupid machine conked out, so I can't play with ocaml :(
<async_> gah, pgsql is like a whole other world
<async_> so much protocol you can learn
monotonom has quit ["Don't talk to those who talk to themselves."]
jason_ has joined #ocaml
<jason_> Hm, is there any way to overload the constructor of a class?
<async_> im not exactly sure, but you might be able to do it with optional arguments
<async_> its not overloading in the strict sense
<jason_> Explain.
<jason_> I mean, I can't check for the type of the value passed, because it's stricly typed :P
<jason_> Hehe.
<async_> i don't know much about objects
<jason_> Yeah, they're proving somewhat enigmatic up to this point.
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
<jason_> I may have to use inheritance..
<Smerdyakov> Why are you using OO in the first place?
<Smerdyakov> (Also not that inheritance is never necessary for typing reasons in OCaml. It's just a convenience to avoid re-entering code.)
<Smerdyakov> s/not/note
<bk_> convenience can be a valid reason, too no
<jason_> You use include in modules too.
<jason_> You just don't have late binding, which is useful.
<jason_> I'm actually looking up a solution at the moment which involves using both classes and modules :P
<jason_> I'm somewhat confused towards why you're using Ocaml and not Caml if you're not using object.
<Smerdyakov> Caml Light is for teaching French university students how to code.
<Smerdyakov> OCaml is the "industrial strength" Caml.
<jason_> What exactly does that O stand for? Remind me :P
<jason_> Hehe.
<jason_> I realize you're strictly anti-object :P
<Smerdyakov> What does that have to do with anything, if OCaml is the only Caml with a practical implementation?
<jason_> Well, it's meant to be Object oriented, I'm not going to ignore an entire feature set of the language.
<mrsolo> i am told o in ocaml isn't that useful
<Smerdyakov> No, it's not.
<Smerdyakov> The creators of OCaml do not recommend using objects regularly.
Lemmih_ has quit [Read error: 60 (Operation timed out)]
<Smerdyakov> And you'll find the OO features relegated to late mention in the manual, and basically no OO stuff in the standard library, etc..
<mrsolo> also keep in mind that ocaml pays a penality in performance on oo construct
<jason_> Why does it pay a penality in performance? Late binding?
<Smerdyakov> You'll also find that hardly anyone here uses the O regularly.
<Smerdyakov> Most of us never choose to use it, I think.
<mrsolo> as i heard because it uses dispatch method similar to object c
<mrsolo> and it isn't optimized yet
<jason_> Right, "nobody does it" tends not to be a very good explanation for why not to explore something.
<jason_> I mean, hardly anybody use ML period.
<jason_> That doesn't mean ML is worthless.
<mrsolo> as far for libary isn't in oo, that is probably because oo is fairly new
<mrsolo> for ocaml
<mrsolo> s/probably/may be/
<Smerdyakov> I think we tend to have good reasons for not using it, jason_.
<Smerdyakov> OO is just a poor fit for most problems.
<jason_> I'd like to know these reasons then, not just why you're not using it.
<mrsolo> jason_: implementation using ocaml functional feature is more elegant
<jason_> Ahem, that you're not using it.
<jason_> mrsolo: Aren't objects in Ocaml functional?
<mrsolo> jason_: take advantage of even
<Smerdyakov> jason_, look, the onus is on you. We have this nice core ML + modules, and then someone comes along and adds OO. Why should this be a feature that we use regularly?
<jason_> Well, I believe the Object message paradigm has been proven to be very useful.
<jason_> Certainly not the only useful paradigm.
<mrsolo> object message paradigm? as in smalltalk one?
<Smerdyakov> I think it's proven useful in limited domains and parroted outside those domains by people with limited knowledge of alternatives.
<jason_> It encourages organisation and extension through a regulated means.
<mrsolo> yes it is useful
<Smerdyakov> Module systems encourage those as well.
<jason_> I think it's a useful feature, and I intend to learn about it as well as modules and other features of Ocaml so that I can most effectively use it.
<jason_> Well, Module systems don't really encourage extension in the same way.
<Smerdyakov> Sure, but don't act like we're confused for not using OO in most OCaml programs we write.
<jason_> You lose your interface when you extend with a Module.
<jason_> You can't redefine a method with the same signature and a different implementation without completely redefining a new thing.
<jason_> You lose all of the extensions made on the base interface.
<Smerdyakov> The kind of "extension" you mean is a red herring. There is generally no enforcement of behavioral compatibility. You can always reimplement all methods to get a completely new class, even when it's viewed as a "descendant" of another.
<jason_> But, it is true that you should usually preffer composition to inheritance.
<jason_> So, Modules are more generally useful.
Lemmih has quit [Read error: 110 (Connection timed out)]
<jason_> True, but you also can only reimplement one method, and keep all of the changes and new interface introduced in a previous extension.
<Smerdyakov> Right, and I'm saying that is not generally applicable in a natural way.
<jason_> There's little way to present "This item has a subset of this interface" with modules.
* mrsolo shrugs
<mrsolo> that has issues
<Smerdyakov> You can use a signature that is a subsignature of another.
<jason_> Well, I disagree, I think it's generally applicable, I just don't think it's AS applicable as other features.
<mrsolo> another language research is trying to solve, decendant of smalltalk that is
<jason_> Yeah, smalltalk is amazing in my humble opinion.
<jason_> But, I wouldn't implement a professional system in it.
<mrsolo> basically reuse through inheritance doesn't really gain anything in the end
<jason_> There's just too much room for things to go wrong.
<jason_> I work on a lot of hardware items that need to be dependable.
<jason_> So, heavy typing is incredibly important.
<mrsolo> naw
<jason_> Heh.
<Smerdyakov> Well, high assurance is important. You could use other means to get there.
<jason_> Sarcasm?
<mrsolo> no
<mrsolo> if language concept works, it works
<mrsolo> heavy typing or not
<jason_> Not true :P
<mrsolo> java, heavy typing, it sucks
<mrsolo> python, no typing, it rocks
<jason_> Java doesn't really have "heavy" typing.
<jason_> But what typing it has is actually pretty good in my humble opinion.
<mrsolo> whatever can get the feature completed in shortest amount of time, bug free
<mrsolo> rocks
<Smerdyakov> I would like to continue this conversation, but I have just been informed by the teleprompter that sometimes I require sleep.
<jason_> I mean, I can make a very simple example of a program that fails 1 out of every 100 times in smalltalk.
<jason_> Hehe.
<jason_> Just by having it take a generic argument, then taking a random between 1 and 100 :P If it's 100 call method that exists, else call one that doesn't.
<jason_> The more complicated the code is, the more likely the interface you met with the object you're using may not work sometimes.
<jason_> And the only way you find out it doesn't work is by testing it.
<mrsolo> sure and what's wrong with that?
<jason_> Ocaml can potentially discover whether an object you're using meets ALL of the interfaces being used internally.
<mrsolo> and who is to say if 1 out 100 failure isn't what being called for?
<jason_> Well, nothing, it just would be nicer if I could know that there was a potential problem at compile time.
<jason_> Like "This function can possibly be called on this object you're using that would generate a runtime error" in smalltalk would be useful.
<jason_> I'm not sure if such a static check can be made without typing.
<jason_> Maybe.
<jason_> It's difficult to track it all down by hand.
<mrsolo> compiler can only check for language correctness
<jason_> Not to mention for mathematical computations heavy typing helps a great deal too.
<mrsolo> it doesn't know what program correctness is
<jason_> I work in physics, and people incessantly make mathematical mistakes based on typing
<jason_> Because they use C>
<jason_> They ignore compiler warnings that a function prototype doesn't exist, it defaults to int, they pass a double.
<jason_> Or they simply assign a double to an int, and then back into a double, lose their precision.
<jason_> Lots of fun stuff :P
<jason_> In Ocaml it can test if a object being used is polymorphic.
<jason_> Kindof like templates in C++.
<jason_> It can actually test code by compilation and see if it fits the template being used.
<jason_> Ack, movie time :P
<jason_> Later people.
<jason_> Nice talking to you solo :)
<mrsolo> see ya
vezenchio has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
Snark has joined #ocaml
larsr has joined #ocaml
smimou has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
avn has joined #ocaml
larsr has quit ["User disconnected"]
larsr has joined #ocaml
larsr has quit [Read error: 54 (Connection reset by peer)]
kinners has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
kinners has quit ["leaving"]
Herrchen_ is now known as Herrchen
jason_ has quit [Remote closed the connection]
lambdawar has joined #ocaml
vincenz has joined #ocaml
ionOSu has quit [Remote closed the connection]
mattam__ is now known as mattam
mamol has joined #ocaml
mamol is now known as maml
maml has quit [Read error: 60 (Operation timed out)]
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
Iter has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
Iter has quit ["Leaving"]
ionOSu has joined #ocaml
AshW8rk3 has joined #ocaml
AshW8rk3 has quit [Remote closed the connection]
AshW8rk3 has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
AshW8rk3 has quit [Remote closed the connection]
gal_bolle has joined #ocaml
AshW8rk3 has joined #ocaml
dv has joined #ocaml
<slashvar[lri]> Yop
AshW8rk3 has quit [Remote closed the connection]
cjohnson has quit [Connection timed out]
Boojum has joined #ocaml
cjohnson has joined #ocaml
froog has joined #ocaml
pac_away has joined #ocaml
Snark has quit [Read error: 110 (Connection timed out)]
<froog> is it possible to embed ocaml in c?
<froog> slashvar[lri]: thanks, I meant the other way around, for example, using ocaml as a scripting language
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
<slashvar[lri]> froog: what you as mean as a scripting language ?
<slashvar[lri]> (in fact, what is explain in the manual is sufficient to the other way, normaly, but I don't see any real use of ocaml inside C prog ... )
dan|el has joined #ocaml
AshW8rk3 has joined #ocaml
<jlouis> What you really want is an abstraction from C
whee has joined #ocaml
Boojum has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
larsr has joined #ocaml
AshW8rk3 has quit [Remote closed the connection]
Lemmih has joined #ocaml
AshW8rk3 has joined #ocaml
ionOSu has quit ["Leaving"]
cjohnson has quit [Connection timed out]
AshW8rk3 has quit [Remote closed the connection]
maihem has joined #ocaml
cjohnson has joined #ocaml
gal_bolle has quit [Remote closed the connection]
maihem has quit [Read error: 104 (Connection reset by peer)]
maihem has joined #ocaml
mrsolo has quit [Read error: 110 (Connection timed out)]
AshW8rk3 has joined #ocaml
cjohnson has quit [Network is unreachable]
FredCods has joined #ocaml
ionOSu has joined #ocaml
kosmikus is now known as kosmikus|away
AshW8rk3 has quit [Remote closed the connection]
monotonom has joined #ocaml
larsr has quit [Read error: 60 (Operation timed out)]
larsr has joined #ocaml
ionOSu has quit [bear.freenode.net irc.freenode.net]
Snark has quit [bear.freenode.net irc.freenode.net]
_fab has quit [bear.freenode.net irc.freenode.net]
shawn_ has quit [bear.freenode.net irc.freenode.net]
ionOSu has joined #ocaml
Snark has joined #ocaml
_fab has joined #ocaml
shawn_ has joined #ocaml
cjohnson has joined #ocaml
clog has joined #ocaml
vezenchio has quit ["With little power comes little responsibility"]
Snark has quit ["Parti"]
larsr has joined #ocaml
menace has joined #ocaml
bk_ has joined #ocaml
Riastrad1 has joined #ocaml
Riastradh has quit [Nick collision from services.]
Riastrad1 is now known as Riastradh
mattam__ has quit [Client Quit]
mattam has joined #ocaml
menace has quit ["Leaving"]
smimou has quit ["?"]
larsr has quit [Remote closed the connection]
cjohnson has quit [Read error: 54 (Connection reset by peer)]
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
bk_ has joined #ocaml
<ronwalf> arr
<ronwalf> So I'm trying to use the FFI
<ronwalf> Just a dummy test
<ronwalf> external printfoo : string -> unit = "_printfoo_native"
<ronwalf> let _ = printfoo "Hi there!";
<ronwalf> But I'm getting the following compile error:
<ronwalf> % ocamlopt printfoo.ml printfoo.c
<ronwalf> ld: multiple definitions of symbol __printfoo_native
<ronwalf> printfoo.o definition of __printfoo_native in section (__TEXT,__text)
<ronwalf> printfoo.o definition of __printfoo_native in section (__TEXT,__text)
<Smerdyakov> ronwalf, do you have that external declaration in multiple files?
<ronwalf> No, just that one .ml file
<ronwalf> oh
<ronwalf> rename printfoo.c to printfoo2.c
<ronwalf> It didn't like a .c and a .ml having the same name
<ronwalf> Works fine now...
<ronwalf> Of course, because ocamlopt produces a .o for each