smkl changed the topic of #ocaml to: OCaml 3.07 ! -- 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
Vincenz has quit []
gim_ has quit ["..."]
mattam_ is now known as mattam
mimosa has quit ["J'ai fini."]
wazze has quit ["Learning about how the end letters on French words are just becoming more and more silent, I conclude that one day the French]
pattern has joined #ocaml
<pattern> "I've found that the key difference between mediocre and excellent programmers is whether or not they know assembly language..."
<pattern> "...This is why the old-timers are often viewed as 'wizards': they had to know assembly language programming"
<pattern> "High-level languages are great, but learning them will never teach you about computers. Perhaps it's time that computer science curriculums start teaching assembly language first."
<pattern> from slashdot's front page
<Riastradh> What, did you expect something intelligent from Slashdot?
<pattern> hehe
<Riastradh> He even screwed up the plural of 'curriculum.'
<anpanman> taocp uses assembly to teach though
<Riastradh> It does. So?
<anpanman> maybe there's some pedagogical point to it
<pattern> what's taocp?
<pattern> oh
<pattern> nm
<anpanman> the art of computer programming
<pattern> eh, what would knuth know?
<anpanman> Still, sounds like a stupid slashdot post
<pattern> he probably trolls on slashdot regularly
Smerdy has joined #ocaml
<pattern> i do think learning assembly language would help the average c/java/perl coder, though
<anpanman> in what way?
Smerdyakov has quit [Nick collision from services.]
Smerdy is now known as Smerdyakov
<pattern> it would give them insight in to what's happening behind the scenes in their own languages
<pattern> it would also expose them to a different way of thinking about programming, much like leraning fp would
<Smerdyakov> I think it would help minimally, if at all.
Nutssh has joined #ocaml
<pattern> well, it's a matter of oppinion, them
<Smerdyakov> I don't know about that. I think we can agree on objective standards of the goals of programming and work from there.
<pattern> personally, coming from a backround of medium and high level languages, i did feel learning assembly helped me
<pattern> i think it would help the average c/java/perl programmer even more
<pattern> of course, that's not to say i agree with the /. poster about teaching assembly language first
<pattern> nor do i think knowing assembly means you're a good programmer, much less an excellent programmer, or that the difference between a good and an excellent programmer is that the latter knows assembly
<pattern> i'm sure it's possible to be a world class sql programmer without ever having set eyes on any other language
<Smerdyakov> Well, you know, SQL isn't a programming language....
<mattam> SQL3 with stored procedures mimics one very easily
<pattern> i don't want to bicker
<pattern> the point is that you can use any language effectively (whether or not it's turing complete is beside the point), and that that mastery does not necessarily entail knowledge of assembly
<pattern> Java: Failure or Crime? http://www.advogato.org/article/752.html
<pattern> "Many languages have failed honorably -- Eiffel, Dylan, Oberon, Icon, CLP(R), C+@, Oak, PL/1, Bliss, Algol-68, Pascal -- some more honorably, some less, but far too many to list, or indeed to count. Others struggle vainly along, confined forever to subsidized niches -- Erlang, Common LISP, REXX, Objective-C, Delphi, Ada."
<Riastradh> Objective-C, Erlang, and CL have certainly not been confined to subsidized niches.
Kinners has joined #ocaml
tomasso has quit [Read error: 110 (Connection timed out)]
Kinners has quit [Remote closed the connection]
Kinners has joined #ocaml
<anpanman> who subsidized delphi?
<anpanman> dumb schools that make you buy it?
<Nutssh> pattern: I disagree. Different languages have their plusses and negatives. I'd hate to rewrite a 10 line text-grotting perl script into ocaml, and I'd hate to write a 10 line simple interpreter in ocaml into perl.
<Smerdyakov> Nutssh, what would you do in Perl that would be harder to do in OCaml with proper libraries?
<Nutssh> Grotting stuff out of text.. Yeah, I know with the right regexp library, it could be done in perl, but it'd be 3-5 times the code.
<Nutssh> (Whats the paste-bot address?)
<Nutssh> Thanks.
<Nutssh> Rough paraphrase of a recent perl script.
d2004xx has joined #ocaml
d2004xx has quit [Read error: 54 (Connection reset by peer)]
blueshoe has joined #ocaml
Nutssh has quit ["Client exiting"]
Nutssh has joined #ocaml
Kinners has left #ocaml []
Kinners has joined #ocaml
d2004xx has joined #ocaml
anpanman has left #ocaml []
kiff has joined #ocaml
mr_jim has joined #ocaml
carm has quit [Read error: 54 (Connection reset by peer)]
reltuk has joined #ocaml
<reltuk> anyone here familiar with the ocaml internals?
<blueshoe> yes
<blueshoe> not me, though
<reltuk> heh, coolness
<Nutssh> Whats the question?
<reltuk> I'm trying to wrap my head around a way to parse a file, examine the parse tree and find out if the recursive definitions are tailcalls or not...
<Nutssh> camlp4 for the parse tree and codewalk it? (don't ask me how)
<Kinners> reltuk: ocamlc -dlambda foo.ml, I think that will show you
<Nutssh> BRB.
Nutssh has quit ["Client exiting"]
<reltuk> looks like lisp :-p
Nutssh has joined #ocaml
<Kinners> reltuk: actually ocamlopt -dsel foo.ml might be the one, like reading asm though :)
<reltuk> hah
<reltuk> I was hoping to write a program to do ti :-p
<reltuk> I mean...the compiler does it :-p
<reltuk> does the compiler really go from ocaml to this internal very lisp-like form and then bytecode?
<Nutssh> yeah, if you want to see the stages, do 'ocaml -help' and try the undocumented debug options.
<Nutssh> Err, 'ocamlc -help' and 'ocamlopt -help'
<reltuk> very cool
<reltuk> is_tailcall in ocaml/bytecomp/bytegen.ml is key to my success I think :-p
<reltuk> I just need to know how to get from file form to the form that comp_expr takes...
<reltuk> and I'm assuming it's in toploop.ml...
<reltuk> load_lambda...
voltron has joined #ocaml
mr_jim has quit ["Leaving"]
Kinners has left #ocaml []
blueshoe has quit [Read error: 104 (Connection reset by peer)]
The-Fixer has quit ["Goodbye"]
The-Fixer has joined #ocaml
The-Fixer has quit [Client Quit]
giedi has joined #ocaml
ott has joined #ocaml
blueshoe has joined #ocaml
carm has joined #ocaml
The-Fixer has joined #ocaml
<pattern> in "let foo = bar in foo" "foo = bar" doesn't happen until after the "in", right?
<pattern> # let foo = print_endline "foo" in print_endline "bar" ; foo ;;
<pattern> foo
<pattern> bar
<pattern> - : unit = ()
<pattern> so it appears that the clause before the "in" actually does happen first
<pattern> but is this guaranteed?
ott has quit [Remote closed the connection]
The-Fixer has quit ["Goodbye"]
ott has joined #ocaml
The-Fixer has joined #ocaml
wazze has joined #ocaml
<Nutssh> Unless you use rec, I believe so. let foo= .... in ...., the binding for foo is only in the second ....
<pattern> nutssh, then how do you explain the output of my program above?
<Nutssh> I misread what you wrote.
<smkl> in "let x = e1 in e2", e1 is evaluated first, then e2
<pattern> and that order is guaruanteed?
<teratorn> sure
<teratorn> it wouldn't make any sense if it wasn't
<pattern> i thought it might be lazy
<pattern> or that the order was not guaranteed
<teratorn> ehmm
<teratorn> well I don't know, but for the purpose of your logic, it happens first.
<pattern> ok
<pattern> thanks, teratorn
<smkl> the eval order of function args is not specified
<smkl> and here's another thing: let x = ref 0 in incr x, !x;;
<Nutssh> Cute! That also applies for the tuple constructor?
<pattern> and how about lists?
<pattern> [incr x;incr x] evaluates to?
<smkl> seems to be so ... might cause problems if you try to mix functional and imperative style
<smkl> pattern: just try the toplevel
<teratorn> I wonder, is there a nicer toplevel, with a cmd line history and such?
<pattern> yeah, but just because in the top level it evaluates one way doesn't mean it won't evaluate another at some future time, if hte order is not guaranteed
<smkl> teratorn: get ledit
<pattern> there are at least two, teratorn, iirc
<teratorn> hm ok
<teratorn> smkl: nice.
<smkl> perhaps constructor args are guaranteed to be right to left
<pattern> let x = ref 0 in [(incr x;x);(incr x;x)];;
<pattern> - : int ref list = [{contents = 2}; {contents = 2}]
<pattern> well, that didn't work too well
<smkl> pattern: use !x
<pattern> oh, right
<pattern> # let x = ref 0 in [(incr x;!x);(incr x;!x)];;
<pattern> - : int list = [2; 1]
<pattern> goes from right to left, every time i try it
<pattern> but i suppose that is just an implementation detail, not guaranteed in the "standard"
<smkl> probably
<pattern> but at least in "let e1 in e2" e1 gets evaluated first
Nutssh has quit ["Client exiting"]
pattern has quit []
* Demitar remembers being bitten by that in a recursive use of Str, it only keeps the regexp state for the latest calculation around, no regexp objects... (I think pcre has those btw.)
axolotl has quit [Remote closed the connection]
Kinners has joined #ocaml
wax has joined #ocaml
pattern has joined #ocaml
blueshoe has quit [Read error: 104 (Connection reset by peer)]
<Demitar> I guess I can consider myself more functional than ever now. :)
<Demitar> let tcons (alpha : 'a -> 'b) (beta : 'b -> 'c) : 'a -> 'c = function x -> beta (alpha x)
blueshoe has joined #ocaml
blueshoe has quit [Remote closed the connection]
blueshoe has joined #ocaml
blueshoe has quit [Client Quit]
blueshoe has joined #ocaml
gim_ has joined #ocaml
blueshoe has quit ["BitchX-1.0c20cvs -- just do it."]
mimosa has joined #ocaml
gim has quit [Read error: 54 (Connection reset by peer)]
wazze has quit ["Learning about how the end letters on French words are just becoming more and more silent, I conclude that one day the French]
wazze has joined #ocaml
Swynndla has quit ["Leaving"]
ott has quit [Remote closed the connection]
karryall has joined #ocaml
Kinners has left #ocaml []
ott has joined #ocaml
ott has quit []
ott has joined #ocaml
_joey has joined #ocaml
ott has quit []
reltuk has quit ["leaving"]
wazze has quit ["Learning about how the end letters on French words are just becoming more and more silent, I conclude that one day the French]
wazze has joined #ocaml
Tachyon76 has joined #ocaml
cjohnson has quit ["Drawn beyond the lines of reason"]
tomasso has joined #ocaml
Tachyon76 has quit ["Leaving"]
mattam has quit [Read error: 60 (Operation timed out)]
mattam has joined #ocaml
mr_jim has joined #ocaml
mr_jim has quit ["Leaving"]
TheDracle has joined #ocaml
cmeme has quit [Read error: 60 (Operation timed out)]
karryall has quit ["we"]
carm has quit [Read error: 54 (Connection reset by peer)]
Vincenz has joined #ocaml
cjohnson has joined #ocaml
_JusSx_ has joined #ocaml
cmeme has joined #ocaml
_JusSx_ has quit [Remote closed the connection]
drWorm has joined #ocaml
<drWorm> i'd like to use the Set module but i don't know how, functors scare me :) any examples or something around?
<Smerdyakov> Examples of functors?
<drWorm> well, i was thinking of Set usage primarily
<Smerdyakov> It's much better for everyone if you just learn how to use functors.
<drWorm> hm, i suppose
<Smerdyakov> What have you read to try to understand functors?
<drWorm> uhm, well, hm :) tried to google some
<Smerdyakov> So you haven't read the OCaml tutorial?
<drWorm> been reading http://www.merjis.com/richj/computers/ocaml/tutorial/, but it's a little unfinished. will consult the manual :)
giedi has quit [Nick collision from services.]
giedi_ has joined #ocaml
<drWorm> oh dear, the example there even uses sets
wazze has quit ["Learning about how the end letters on French words are just becoming more and more silent, I conclude that one day the French]
<TheDracle> Oh :P Already posted it :p
mimosa has quit ["J'ai fini."]
det has quit ["If you are going to walk on thin ice, you may as well dance."]
det has joined #ocaml
Kinners has joined #ocaml