systems changed the topic of #ocaml to: Archive of Caml Weekly News http://pauillac.inria.fr/~aschmitt/cwn/ | ICFP Programming Contest 2003 http://www.dtek.chalmers.se/groups/icfpcontest/ | Good free book http://cristal.inria.fr/~remy/cours/appsem/
foxster has quit [Client Quit]
skylan has quit [Read error: 104 (Connection reset by peer)]
skylan has joined #ocaml
themus_ has joined #ocaml
themus has quit [Read error: 110 (Connection timed out)]
mvw has joined #ocaml
<mvw> hello!
<mvw> anyone knows why the icfp 2003 competition results have not been put on the web site?
eno has quit [Remote closed the connection]
mvw has quit ["ircII+tkirc2"]
polin8 has quit [Read error: 110 (Connection timed out)]
eno has joined #ocaml
eno has quit [Remote closed the connection]
eno has joined #ocaml
<Maddas> hm
<Maddas> anybody around? :)
srv has joined #ocaml
bk_ has joined #ocaml
<bk_> hi
<srv> bk_: hi :)
<bk_> :)
* srv waking up ...
* bk_ gets himself a fresh cup of coffee
<srv> I already have 1 in front of me :)
foxster has joined #ocaml
<bk_> got one too, now
<Maddas> hey!
<Maddas> I've got a question :-)
<bk_> hello maddas
<Maddas> What's the difference between f g x (where f and g are functions) compared to f (g x)
<srv> Maddas: hi! go ahead
<Maddas> I would think that they are the same, and latter only clarifies the precedence
<Maddas> But not in O'Caml, it seems! :)
<Maddas> I'm just trying to rewrite code of the book, but it never works out ;-)
<bk_> there is no difference, afaik
<Maddas> Well, O'Caml doesn't accept one of my functions without the brackets (in context it doesn't work)
<srv> bk_: agrred (AFAIK...)
<Maddas> and there is a difference
<Maddas> let me show you
<bk_> its really f( g (x))
<Maddas> # let compose f g x = f g x;;
<Maddas> val compose : ('a -> 'b -> 'c) -> 'a -> 'b -> 'c = <fun>
<Maddas> # let compose f g x = f (g x);;
<Maddas> val compose : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b = <fun>
<Maddas> not the same :)
<Maddas> ah, I see, f g x is the same as (f g) x
<Maddas> Question answered, in that case. I'm used to right-to-left evaluation, not left-to-right :)
<bk_> application is left associative
<bk_> with the brackets you change the precedence
<Maddas> I see
<Maddas> I thought they were right associative, thanks :)
<Maddas> because in Perl f g x is the same as f (g x), I guess I just wasn't aware of the difference
<Maddas> Ok, another short one!
<Maddas> why don't these return the same: compose f (iterate (n-1) f) and just f (iterate (n-1) f)
<Maddas> compose is defined as above
<srv> what do they return?
<srv> ah I know
<Maddas> Well, let me paste you the whole example on the web
<srv> with compose, you apply an x to the stuff
<Maddas> Yes
<Maddas> You only partially apply compose
<srv> yes
<Maddas> but couldn't you just return the "partial" expression without compose?
<Maddas> ah, maybe I understand.
<Maddas> you don't tell it to apply what it returns if you don't use compose
<bk_> no
<bk_> it does return something, only you don't apply 'compose' to what is returned
<srv> yes
<Maddas> I see
<Maddas> Couldn't I do it without compose?
<Maddas> http://nopaste.snit.ch:8000/511 that's the context
<Maddas> I tried to do it with a function x -> thing, but didn't succeed :)
<srv> I don't understand your question
<Maddas> ok
<Maddas> How do I do what I pasted in an easy way without using compose?
<Maddas> oh, got it.
<Maddas> fun y -> f ((iterate (n-1) f) y);;
<Maddas> That's what I was looking for :-)
<Maddas> Sorry for all the disturbance and confusion.
<srv> I was writing it...
<Maddas> oh, ok :)
<srv> I'm not waken up enough to check...
<srv> :)
<Maddas> it's ok, works :)
<Maddas> Thanks for bothering :)
<srv> cool
<bk_> where is this example from, maddas ?
* srv breakfast done
<Maddas> :)
<bk_> thx
<bk_> ah...
<bk_> where in the book heh
<bk_> found it
<bk_> let rec iterate n f = ....
Kinners has joined #ocaml
brwill|zzz is now known as brwill
<Maddas> yes
<Maddas> oh I pasted broken one
<Maddas> sorry
<Maddas> :)
<bk_> funny example, kinda
<Maddas> why?
<bk_> try #trace
<bk_> #trace power ;;
<bk_> #trace compose;;
<bk_> #trace iterate;;
<bk_> and take a look what it does
<Maddas> ok
<Maddas> huh
<Maddas> :)
<Maddas> that's a lot of things.
<bk_> yes
<Maddas> Over my head :)
<bk_> compose is only appiled partial, ie. it returns a <fun>
<Maddas> Yes, I know that
<Maddas> it only gets two arguments where it would need three for a full application
<bk_> the final argument to the <fun> compose returns is '1' which is applied to every <fun>
<Maddas> yes, that is necessary
<bk_> excatly
<Maddas> because you end up with something like (*) 3 ((*) 3 ((*) 3)) (*) x
<Maddas> err, almost
<Maddas> you end up with something like (*) 3 ((*) 3 ((*) 3 ((*) x)))
<Maddas> and x must be 1 just so that it's correct :-)
<Maddas> (e.g. this would be for power 3 3)
<Maddas> O'Caml is a very strange language indeed!
<Maddas> I'm very surprised by it's efficiency when compiled :)
<Maddas> There's a funny example where the book uses recursion to check if something is even/odd
<Maddas> Made me laugh :)
<Maddas> bk_: how do I tell OCaml to print the whole thing instead of <fun>?
<bk_> huh ?
<Maddas> Thought you might know
<Maddas> when tracing a function :)
<bk_> dunno
<Maddas> oki
<bk_> i think you can't
<Maddas> srv: any idea?
<Maddas> me too, but it would be very, very useful to see
<Maddas> :)
<Maddas> to easily understand how somehthing works
<Maddas> :)
<srv> Maddas: no idea... I never use the interaction loop. Only the compiler
<Maddas> Ok.
<Maddas> The book is erroneous!
<Maddas> Where would I send a correction to? :)
<srv> to the authors, for instance...
<Maddas> heh, ok.
<Maddas> I just thought any of them might hang around here occasionally :)
<srv> maybe....
<srv> but it's 9 AM in France (early...)
<Maddas> I know, I'm from Switzerland.
<Maddas> Maybe someone will peep in eventually
Kinners has quit [Read error: 113 (No route to host)]
<srv> uh I didn't notice....
<Maddas> :)
<bk_> according to someone on this channel, one drawback if ocaml supposedly is 'that it doesn't have much of a comminity'
<bk_> community, even
<srv> compared to GNU/Linux, yes... :)
<bk_> according to him the developers 'dont listen to the users of their language'
<bk_> a statement that i find kinda hard to believe
<srv> no idea
<bk_> well i do read the caml mailing list, and ocaml developers do reply to questions there frequently
<srv> uh I read it too :)
<bk_> :p
<bk_> i *think* i have identified one thing about ocaml - which perhaps applies to functional languages in general due to their nature - that *may* be a real drawback
<bk_> its readability and thus maintainability of code
<bk_> on the other hand this might be due to my limited experience w/ ocaml and FP
<srv> I know some people won't like what I'm about to say, but you can benefit from OCaml's advantages without coding the functionnal way...
<bk_> i know this
<srv> well I think my OCaml code is more readable than my C++ code
<bk_> however here's how i see it: FP is a paradigm that could be potentially rewarding if used accordingly
<bk_> and i intend to learn this new (to me its new) paradigm and see how and if it helps me to be a) more productive and b) write better code
<srv> I think it's definitely less intuitive
<bk_> yes!
<srv> (to me, at least)
<bk_> especially if you, like most people i presume, come from an imperative language
<srv> I do
<bk_> ya, so do i
<srv> I've really tried to use functionnal style, but... the fact is that I cannot easily re-read my code 2 days after I wrote it
<srv> maybe some folks can, but I cannot
<bk_> i agree, even tho i have not written much code yet
<bk_> but i'd like to use functional style in order to explore FP, if i just wanted 'a better C' i'd probably be better off with some other language
<srv> well the point is that thx to ocaml you have the choice (imperative or functionnal)...
<bk_> excatly
<srv> and I don't feel like playing with function pointers any more...
<bk_> oyes, that is definitely a big advantage
<bk_> pointers, segfaults, memleak - the horror they were
<srv> ;)
<srv> well C is still THE lgg if you want to code some kernel stuffs, but I don't
<bk_> neither do i
<Maddas> I wouldn't say FP is less intuitive
<Maddas> maybe even more intuitive than procedural
<Maddas> but it's not what you are used to if you already know a procedural language :)
<Maddas> I think I can get used to some FP things, really helps debugging a LOT
<Maddas> not pure FP, I know too much Perl/C/whatever for that, but a mixture of FP :)
<Maddas> (with procedural)
<Maddas> e.g. not redefining variables unless really necessary is a good thing, the way it looks
<bk_> i wonder if one shoots oneself in the foot when using a mixture of styles
<Maddas> Why?
<Maddas> IMO You shoot yourself in the foot if you resort to only one style
<Maddas> that's very unpractical from what I see :)
<bk_> because it could make things more messie than if you stick to one welformed style
<Maddas> hardly
<Maddas> bk_: do you use pure functional programming?
<Maddas> no OO at all?
<Maddas> or pure OO?
<bk_> since i'm new to this, yes, i'm trying to stick to FP only
<Maddas> using only one forces you to ignore the advantages of the other styles
<Maddas> well, pure FP is IMO the most viable of all three (Pure OO, pure procedrual, pure FP)
<bk_> no, i do know imperative programming already, i might and eventually will start using both when i'm comfortable with FP enough
<Maddas> but the most intuitive/easy way is a mixture of all three, I think
<Maddas> just stick to one style, and use something else when it's appropriate
<srv> I'm definitely an OO addict. OO is mainly designed to help managing big projects in which lots of developers are involved (my 2 cents...)
<bk_> yes, but to be able to do that i think i want to be more fluent with FP
<Maddas> of course
<Maddas> I'm also sticking to pure FP for now, but once coding a project, I still will use OO if necessary
<Maddas> to learn, sticking to one is the best :)
<bk_> i agree
two-face has joined #ocaml
<two-face> lo
<bk_> hi
two-face has left #ocaml []
srv_ has joined #ocaml
srv_ has quit [Client Quit]
bk_ has quit ["I'll be back"]
polin8 has joined #ocaml
Kinners has joined #ocaml
CybeRDukE has joined #ocaml
eno has quit [Remote closed the connection]
eno has joined #ocaml
asqui has quit [Read error: 104 (Connection reset by peer)]
asqui has joined #ocaml
bk_ has joined #ocaml
karryall has quit [orwell.freenode.net irc.freenode.net]
asqui has quit [orwell.freenode.net irc.freenode.net]
asqui has joined #ocaml
karryall has joined #ocaml
brwill is now known as brwill|zzz
<bk_> is this
<bk_>
<bk_> let rec t_line is il =
<bk_> match il with
<bk_> | h::t -> t_line (fill is (splitter h)) t
<bk_> | [] -> is
<bk_>
<bk_> better or worse than
<bk_>
<bk_> let rec t_line is = function
<bk_> h::t -> t_line (fill is (splitter h)) t
<bk_> | [] -> is
<bk_> i'd really like to know
bk_ is now known as bk_brb
<karryall> it's really the same thing
<srv> well... yes
<lam> does anybody have try to use ocamlrss ?
* Maddas <3 O'Caml
<lam> i have this error :
<lam> No implementations provided for the following modules:
<lam> Unix referenced from /usr/lib/ocaml/3.06/rss.cmxa(Rss_date)
bk_brb is now known as bk_
<bk_> hm ok
mvw has joined #ocaml
CybeRDukE has quit ["Murphy's best friend was a computer."]
<mvw> hello
<mvw> icfp should be over, anyone knows why the contest results aren't online?
systems has joined #ocaml
<karryall> lam: it means you have to link unix.cmxa
<bk_> First place: Hudson
<bk_> Second place: RedTeam
<bk_> Judge's prize: Team Dylan
<lam> karryall: of course !!
<lam> karryall: oh thanks :)
<lam> do u have already use lablgtk2 ?
<mvw> that is what i took from the message board
<bk_> yup
<systems> bk_ is that the icfp results
<mvw> but i have a bad conscience to put that on slashdot, without seeing any official
<bk_> according to the message board, yes
<mvw> on the other hand the organizers might not be able to update their site because they were flogged or other wise tortured to death by the fp attendees :)
<mvw> or are still cleaning the toilets to pay their sin for posing a pretty imperative problem set :-)
<systems> what lang did hudson use
<bk_> c++
<systems> >:(
<systems> then he didnt win
<mvw> i wanted to post this
<mvw> ICFP 2003 (the International Conference on Functional Programming) organized another
<mvw> <a href="http://www.dtek.chalmers.se/groups/icfpcontest/rules.html">programming contest</a>
<mvw> this year.
<mvw> Interesting enough, the winners have not been announced on the <a href="http://www.dtek.chalmers.se/groups/icfpcontest/">competition web site</a> or mailing list, alas the
<mvw> <a href="http://www.cc.gatech.edu/icfp03/schedule.html">conference schedule</a>
<mvw> indicates the prizes have been reached out already. Peek
<mvw> <a href="http://tro.dyndns.org/icfp/viewtopic.php?t=32">here</a> to get a hint who won.
<mvw> any opinion on that?
* mvw first attempt was a title "icfp 2003 results: 1. c++ 2. c++ 3. c++
* mvw second "c++ vs. fp - 3 : 0
<mvw> it is strange they didn't update the contest site
<systems> ocaml must win
<mvw> C/C++/Java must not
<mvw> A java winner would have been more embarassing to me :)
<systems> java cant win
<bk_> java is teh devil
<systems> it's sad that 1st and 2nd place are c++ entries
<systems> i am thinking it could be fake new
<systems> news
<mvw> wasn't the third as well?
<mvw> the writeups looked convincing
<mvw> the task was a numerical one
<systems> still c++ should never win anyting
<mvw> i wouldn't say that
<mvw> it was very good thing after c
<mvw> but they underestimated the importance of good libs and should have given more good free docs
<mvw> and too many meta features
<mvw> how could they allow java? :)
* mvw wrote to the organizers
systems has quit [Read error: 110 (Connection timed out)]
srv has quit [Remote closed the connection]
<mvw> test
mvw has quit [Remote closed the connection]
mvw has joined #ocaml
mattam_ is now known as mattam
d-bug has joined #ocaml
buggs|afk is now known as buggs
Kinners has left #ocaml []
cm has quit ["changing servers"]
eno_ has joined #ocaml
cm has joined #ocaml
eno has quit [Remote closed the connection]
d-bug has left #ocaml []
mvw has quit [Remote closed the connection]
systems has joined #ocaml
<systems> sup yo
<whee> hola
systems has quit [Nick collision from services.]
systems has joined #ocaml
eno_ has quit [Nick collision from services.]
CybeRDukE has joined #ocaml
mattam_ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
systems has left #ocaml []
buggs|afk has joined #ocaml
vegai has joined #ocaml
buggs has quit [Operation timed out]
CybeRDukE has quit ["A computer scientist is someone who, when told to 'Go to Hell', sees the 'go to', rather than the destination, as harmful."]
bk_ has quit ["Terminated with extreme prejudice - dircproxy 1.0.5"]
bk_ has joined #ocaml
buggs|afk is now known as buggs
tmcm has joined #ocaml
Xcalibor has joined #ocaml
<Xcalibor> hiyas
<bk_> hi
tmcm has quit ["using sirc version 2.211+ssfe"]
systems has joined #ocaml
karryall has quit [orwell.freenode.net irc.freenode.net]
asqui has quit [orwell.freenode.net irc.freenode.net]
asqui has joined #ocaml
karryall has joined #ocaml
<Xcalibor> so... weekend at last, uh? :-)
<systems> ocaml is your king
<Xcalibor> lol :)
<Xcalibor> yeah, you bet :)
<systems> :)
<Xcalibor> i'm going to study the module system this weekend... any good reference yo ucan recommend?
<Xcalibor> i'd like to create a module that provides a couple of functions, to get the gist of it
<systems> i am really not good at all
<systems> :)
<systems> i just learned a few things about ocaml, and liked it
<Xcalibor> just like me :)
<systems> they teased me on channel python, so i decided to pick a different favorite computer lang
<systems> ocaml 4 evaaaaaaaar
<systems> :P
<systems> try the free book from the link in the topic, it's supposed to be advanced stuff
<systems> for graduate level
<Xcalibor> i'm checking it, but it's a bit dense
<Xcalibor> i mean, it goes to deep to fast right now... i prefer a gentler approach to the whole of the language before getting down
<systems> well, try the oreilly book
<systems> i dont think the module system have any fundamental changes since v 2.0x which ever is used in that book
<systems> that remy book explain newer stuff i think
<systems> like labels and variants
<systems> the problem i have with many ocaml features is that, okay, this works like this
<systems> why would i ever need this anyway
<systems> or when would i use it
<systems> they assume you know what you want
<systems> which is not true for me
<systems> we need a why book for programmers
<Xcalibor> :-)
<Xcalibor> probably a what-when book would be more useful ;-)
<systems> and that too
<Maddas> Uhm
<Maddas> Knowing syntax is essential
<Maddas> :)
<Smerdyakov> If you ever teach a programming class, you will be amazed by how many people don't realize that.
<Smerdyakov> I had to grade the programs of one person who never compiled her code.
<Smerdyakov> She made up whatever syntax she felt like, based on what she remembered from lectures.
<Maddas> Heh.
<Maddas> O'Caml rocks :-)
<Maddas> A lot of Syntax to get used to, but it rocks.
<Maddas> Maybe I'm just trying to learn it too quickly
systems has quit [Connection timed out]
<whee> heh, teaching a programming course must be hell
<whee> I've never had problems with syntax, but sometimes I'll have to use a function and I won't be able to remember the name or arguments or their types, but I know it exists
<whee> so I'll just make up a function name and arguments as if I were writing that function in the first place :)
<whee> usually turns out pretty close
<Xcalibor> Smerdyakov: I guess her programs werea complete and utter mess...
polin8 has quit [Read error: 104 (Connection reset by peer)]
polin8 has joined #ocaml
asqui has quit ["Now I am gone..."]
bobbotron has joined #ocaml
mvw has joined #ocaml
bobbotron has quit ["Client exiting"]
brwill|zzz is now known as brwill
systems has joined #ocaml
<Xcalibor> mmm... I have a question about the QPL, anyone around to answer?
<Xcalibor> hey systems
<systems> not really
<systems> license doesnt matter
<systems> only make opensource software >:)
<Xcalibor> how come?
<systems> :P
<Xcalibor> well, my doubt goes a bit further than that
<systems> okay, elaborate
<Xcalibor> ok, it's basically a BSD-like license, except in point 6.
<Xcalibor> it says I have to give the source code for a nominal transfer price
<systems> huh
<Xcalibor> so, let's say I am hired by a company to make some software for them, so I write it in OCaml, the source is obviously theirs, must they give away the source to any customers they may have?
<systems> i dont think so
<Xcalibor> I mean, does the point 6. of the QPL apply to my program, written in OCaml, or only to modifications to OCaml distribution itself I may make?
<systems> i guess it applies to ocaml itself
<systems> but i am not sure
<systems> you need to ask someone else
<Xcalibor> bewcause, 6. seems to imply my code is also to be under the QPL, more or less...
<systems> i am sure i saw on the mailing ppl talkin about project writin in ocaml which are closed source
<Xcalibor> and that may hinder its introduction in the enterprose
karryall has quit ["uikend"]
<Xcalibor> i mean, it¡s a bit dangerous for a development system to impose licesing onto the programs people may write using it... not even GCC does that...