<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
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...