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/ | A tutorial http://merjis.com/richj/computers/ocaml/tutorial/ | Good free book http://cristal.inria.fr/~remy/cours/appsem/
brwill_zzz is now known as brwill
<Xcalibor> nights and thanks for all :)
Xcalibor has quit ["Terminando cliente"]
pnou has quit ["leaving"]
systems has joined #ocaml
polin8 has joined #ocaml
systems has left #ocaml []
asqui has quit [Read error: 104 (Connection reset by peer)]
asqui has joined #ocaml
Kinners has joined #ocaml
cm has quit [Read error: 104 (Connection reset by peer)]
themus__ has joined #ocaml
cm has joined #ocaml
themus_ has quit [Read error: 110 (Connection timed out)]
brwill is now known as brwill_out
Riastrad1 has joined #ocaml
polin8 has quit [Read error: 110 (Connection timed out)]
Riastradh has quit [Read error: 110 (Connection timed out)]
themus__ has quit [Connection timed out]
themus__ has joined #ocaml
<Maddas> heh
<Maddas> anybody around?
<Kinners> hi Maddas
<Maddas> hi
<Maddas> I'm not sure how this works out: http://tnx.nl/scribble/1257VOBR
<Maddas> you'd call it with new_s "STRING", and it would return "STRING0" in the first call, then "STRING1", "STRING2", and so on in later calls
<Maddas> calling reset_s resets the counter to 0
<Maddas> Why isn't the counter reset to 0 every time?
<Maddas> after all the first line is let c = ref 0
<Maddas> are f1 and f2 any special variables?
brwill_out is now known as brwill
<Kinners> no
<Maddas> but? :)
<Kinners> it creates two functions, f1 and f2. They both refer to the same ref
<Maddas> I mean, why is only f1 called if you call reset_s();; and why is only f2 called if you call new_s "STRING";;?
<Maddas> Yes
<Maddas> but if you call reset_s() or new_s "FOO", wouldn't it just create them again every time?
<Kinners> Imagine that c was global
<Kinners> let c = ref 0;;
<Kinners> let reset_s () = c := 0;;
<Maddas> Yes, I understand that
<Maddas> But I don't understand it the way it's done in the paste
<Maddas> :-)
<Kinners> instead of c being global, it says, let c = ref 0 in the context of these two functions I'm creating
<Maddas> I understand that c is only to those functions f1 and f2
<Maddas> Oh, damn, gotta go to the military
<Maddas> talk to you later :-)
<Kinners> cya
d-bug has joined #ocaml
Kinners has left #ocaml []
mrvn_ is now known as mrvn
brwill is now known as brwill_zzz
d-bug has quit ["going to work"]
asqui has quit [Connection reset by peer]
asqui has joined #ocaml
det has joined #ocaml
srv has joined #ocaml
lophty_ has joined #ocaml
lophty_ has quit [Client Quit]
lophty_ has joined #ocaml
lophty_ has quit ["ChatZilla 0.8.31 [Mozilla rv:1.4/20030624]"]
mrvn has quit [Read error: 110 (Connection timed out)]
two-face has joined #ocaml
<two-face> Hello
<det> 'lo
<srv> is it possible to access an object's attribute directly? (i.e. without accessor). If yes, what's the syntax? I'd like to remove a bunch of dummy accessors...
<srv> I'ze tried obj#attrib, but it looks like "#" is for methods only, not attributes
<srv> s/ze/ve
<det> srv, nope
<srv> grrhhh
<det> srv, maybe you want a record ?
<srv> what do you mean?
<srv> (sounds like you have a trick... ;) )
<karryall> two-face: salut
<det> srv, what does your object do ?
<srv> well this one just stores some stuffs
<srv> but I have other objects which have methods which do some stuffs
<det> are you sure you need a class ?
<det> would functions and records not work better ?
<srv> not stupid...
<det> ?
<srv> 1 thing is sure: I need a module
<srv> but maybe it would be possible w/o object
<srv> I'll think about it
<two-face> salut karyall, ça roule ?
<karryall> ca roule ...
<two-face> karryall: tu bosses sur quoi en ce moment ?
<karryall> en caml tu veux dire ?
<two-face> oui
<karryall> toujours les bindings pour ORBit
<karryall> mais ça marche vraiment bien maintenant
<two-face> tu as bindé autre chose de GNOME ?
<karryall> le gnome canvas (c'est dans LablGTK)
<karryall> pour les autres trucs (composants bonobo et autres) il faut du CORBA
Riastrad1 is now known as Riastradh
<two-face> ok
<two-face> pourquoi le cvs n'est pas public ?
<karryall> le CVS de lablgtk ?
<karryall> je sais pas, peut-être parce qu'on l'a jamais demandé à Jacques
<two-face> pareil pour lablgl
<karryall> au fait, les types qui avaient lancé un projet sur savannah pour des bindings KDE ... ils ont fait des trucs depuis ?
<two-face> jamais
<two-face> enfin, moi j'ai honte aussi avec camelot
<two-face> mais au moins je ne perds pas espoir
det has quit ["kapow bazooooom"]
<two-face> karryall: ceci dit, interfaçer avec du C++ c'est balaize
<karryall> ouais j'en ai peur
<karryall> déjà j'y connait pas grand chose en C++ ...
<karryall> alors interface des trucs avec !
<two-face> j'ai un peu réussi mais en plus Qt utilise des hacks de préprocessing et des métaobjets
__buggs is now known as buggs
<two-face> et puis faire ça à la main c du gros boulot pas passionnant
bk_ has quit ["I'll be back"]
<two-face> karryall: et ocamlsdl, tu continues ?
bk_ has joined #ocaml
mrvn has joined #ocaml
<srv> I have a weird compilation pb...
<srv> make[2]: Entering directory `/home/olivier/projects/marvin/src/libnn/networks'
<srv> ocamlc -c -g -I ../misc -I ../networks -w A nn.ml
<srv> File "nn.ml", line 68, characters 24-34:
<srv> Unbound class corpus
<srv> but...
<srv> olivier@freedom networks > ls ../misc/corpus.*
<srv> ../misc/corpus.cmi ../misc/corpus.ml
<srv> ../misc/corpus.cmo ../misc/corpus.mli
<srv> (and I made an "open Corpus" in nn.ml and nn.mli)
<srv> any idea?
<srv> It used to work fine before I wrote the mli files
<bk_> no :\
<srv> it's weird since nn.mli compiles w/o problem...
<srv> make[1]: Entering directory `/home/olivier/projects/marvin/src/libnn/networks'
<srv> ocamlc -c -g -I ../misc -I ../networks -w A nn.mli
<srv> make[1]: Leaving directory `/home/olivier/projects/marvin/src/libnn/networks'
<srv> I hope it's the right way to compile an interface...
<srv> (at least, nn.cmi is created...)
mattam_ has joined #ocaml
<srv> I'm going to ask on caml-list...
<karryall> srv: ça dépend comment t'as écrit ton .mli ... elle est bien dedans ta classe corpus ?
<karryall> two-face: ocamlsdl, en gros c'est terminé
<karryall> two-face: je fais plus que les mises à jours et des bugfix
<srv> karryall: class type corpus = ...
<srv> donc ça doit être bon, non?
mattam has quit [Connection timed out]
<srv> I have to go out for a moment. If you find an explaination, "/query srv". Otherwise I'll post on the list.
<karryall> srv: ben non class type c'est un _type_ de class
<karryall> pas une class
<two-face> karryall: ok
<karryall> tu ne peux pas faire un new avec
<two-face> karryall: donc pas de 1.0 :)
<karryall> two-face: ah oui la 1.0 ...
<karryall> il faudrait revoir la doc, s'assurer que tout marche bien, reécrire les Makefile
<karryall> des truc fun, quoi :)
<two-face> karryall: ah bon ?
<karryall> les Makefiles sont dans un bordel pas possible
<two-face> hmm
<srv> karryall: http://www.pps.jussieu.fr/Livres/ora/DA-OCAML/book-ora147.html#toc215 <- c'est pas comme ça qu'on écrit une interface?? sinon, sans "type" dans copus.mli ça syntax error...
<srv> (ce qui me semble logique...)
srv has quit [Remote closed the connection]
two-face has quit ["Client exiting"]
<bk_> whats the "right way" to use usleep from ocaml ?
<karryall> it's deprecated I think
<karryall> use nanosleep rather
<bk_> the Unix module only offers sleep tho
<bk_> well i know i could probably use select [] [] [] 0.1
<karryall> you have setitimer also
<bk_> yes, but i rather like to avoid messing with timers
<Maddas> back
<Maddas> Mind if I repaste my example?
<Maddas> I can't understand it. :-)
<Maddas> I know what it does, but I don't know why.
<Maddas> you'd call it with new_s "STRING", and it would return "STRING0" in the first call, then "STRING1", "STRING2", and so on in later calls
<Maddas> calling reset_s resets the counter.
<Maddas> Why are there f1 and f2?
<karryall> Maddas: it's roughly equivalent to an object with an attribute and two methods
<Maddas> This behaviour makes sense if f2 is executed when new_s is called, and f1 if reset_s is called
<Maddas> karryall: Are f1 and f2 magical variables aliased to reset_s and new_s then?
<karryall> no
<karryall> f1 and f2 are identifiers bound to two functions
<Maddas> Yes.
<Maddas> but why is only f2 executed if new_s is called?
<Maddas> And only f1 if reset_s is called
<karryall> at the end, new_s and reset_s are bound to f1 and f2
<Maddas> Hm.
<karryall> so it's like f1 and f2 are 'renamed' to reset_s and new_s
<Maddas> Yes.
<Maddas> Which part of the statement binds reset_s and new_s to f1 and f2?
<karryall> let (reset_s, new_s) = (* some stuff *) (f1, f2) ;;
<karryall> at the end you create a tuple with (f1, f2)
<Maddas> I see.
<karryall> this tuple is deconstructed by the very first let
<karryall> which binds reset_s and new_s
<karryall> so reset_s equals f1 and new_s equals f2
<Maddas> I see
<Maddas> I'll have to reread the let .. in syntax again thoroughly then, I seemed to have missed this behaviour :)
<karryall> it's not a let .. in, it's a toplevel let
<Maddas> oh.
<Maddas> It has two lets and two ins though
<Maddas> What would the second in belong to then?
<karryall> you have let (reset_s, new_s) = some_expression
<karryall> (no in here)
<karryall> then some_expression is composed of three let .. in and a tuple construction
<karryall> let c = ... in let f1 = ... in let f2 = ... in (f1, f2)
<Maddas> oh, doh
<Maddas> :)
<Maddas> missed the inside lets
<bk_> i like to think that f1 and f2 are 'local functions' that are actually used in the final in (f1,f2)
<bk_> is that correct ?
<Maddas> ah, I see.
<Maddas> so evaluated it's let (reset_s, new_s) = (evaluated f1, evaluated f2)
<Maddas> Now I understand
<bk_> ok
<karryall> Maddas: exactly
<karryall> bk_: yes but they are not so 'local' since the result new_s and reset_s are bound to them in the end
<Maddas> I didn't think about the fact that the whole block will be evaluated/executed/whatever :-)
<Maddas> I think he means the function names f1 and f2
<Maddas> just the names, not their contents
<bk_> yes
<karryall> well then yes, f1 and f2 are bound to functional values
<Maddas> aaah. f1 and f2 are calculated at compile-time?
<Maddas> oh, it doesn't even matter.
<Maddas> "let c = ref 0" only is executed/calculated/whatever once anyway, no matter if f1 or f2 is called.
mrvn has quit [Read error: 60 (Operation timed out)]
<karryall> at module initialization time
<Maddas> I keep on making mistakes because I forget about how functions are returned :-)
<Maddas> And I thought that the value of reset_s and new_s would have to be determined every time it's run
<Maddas> So let c = ref 0 would have to be gone through again and again too :-)
two-face has joined #ocaml
<two-face> rehi
mrvn has joined #ocaml
<bk_> w
<bk_> ...
<bk_> isn't 'and' just a shorthand for consecutive 'let' phrases ?
<two-face> no
<two-face> it is different
<bk_> oh
<two-face> with and, you don't force any order
<bk_> AH !
<two-face> a and b is sementicaly equal to b and a
<karryall> with and you can define mutually recursive functions
<two-face> Debian a un nouvel opteron, on va pouvoir tester le portage amd64 :)
<bk_> i've tried to replace the 'and' in maddas example with a let, but somehow i don't get it right
<two-face> if b depends on a, you must use let a in b
<mrvn> "let a=... and b=..." is equivalent to "let a=... let b=..." but "let rec a=... and b=..." is different.
<two-face> mrvn: not if b depends on a
<mrvn> # let a = 1 and b = a;;
<mrvn> Unbound value a
<mrvn> Ok, it only works => not <=
<mrvn> s/equivalent/the same as/
<bk_> http://tnx.nl/scribble/1257VOBR i'm not sure why 'and' was used here and how it would be replaced with let
<karryall> bk_: let f1 = ... in let f2 = ... in (f1, f2)
<karryall> the and is not necessary
<bk_> oh my bad, 'in' ofc
<whee> I typically use "and" in let definitions like that when the order of evaluation doesn't matter
<bk_> nm i'll better read more before asking dumb questions again
<mrvn> "and" is shorter than "in let". Prevents pollution of f2 by f1 too.
<mrvn> bk_: Does ocaml reorder the definitions for greater speed?
<bk_> uh, how would i know :>
<karryall> yes it usually evaluate things in a right-to-left order
<karryall> IIRC it's for performance reasons
<two-face> il va bientôt sortir le 3.07
<bk_> n English:
<bk_> it soon will leave the 3.07
<bk_> hm heh
<bk_> thats what babelfish says
<karryall> two-face: ca va etre la 3.08 alors ?
<two-face> karryall: bah non la 3.07
<two-face> Wir möchten Fransözisch oder Deutch sprechen
<bk_> ;)
<two-face> Deutsch
<two-face> We need to speak Enlish all the time, ain't it boring?
<bk_> i can speak only english and german, i can however read some french but not say or write anything in it
<two-face> what is your mother tongue?
<bk_> german
<two-face> OK, so you learn French, I improve my German and let's kick anything English out :)
<bk_> heh :p
<bk_> i did learn french in school, alas i didn't pay much attention to it at the time and only got bad grades, but i do regret that already
<two-face> hmm
<two-face> I bought the last Kraftwerk album :)
<bk_> Tour de France :>
<two-face> excellent!
<karryall> two-face: bah non bicose 3.07 < 3.07beta
<two-face> karryall: en fait non :)
<Maddas> je cherche ma voiture!
<Maddas> hm
<Maddas> are nested lets evaluated inside out then?
<Maddas> nvm
<Maddas> hm
<Maddas> I think I'll try to write a simple RPN calculator in O'Caml
<Maddas> Will anybody be available to look at my code later and tell me if I made the things in a 'nice' way?
<Maddas> And point me at things which could have been done in a much easier way ;-)
<Maddas> Or just let me know if the style is ok in general
Verbed has quit [leguin.freenode.net irc.freenode.net]
Verbed has joined #ocaml
<Maddas> Oh I'll just write it anyway :)
<karryall> two-face: comment ça non ?
<karryall> # "3.07" < "3.07beta" ;;
<karryall> - : bool = true
<whee> Maddas: I'll look at it :P
* whee loves RPN calculators
<two-face> karryall: hihi, pas au sens de Xavier la beta2, c'est une pré-3.07 :)
<Maddas> whee: I love them too, but unfortunately I only found out after getting a TI-92 Plus :)
<whee> heh
<whee> I have two HP calculators so far, going to buy another HP when they release the 49+ :)
<Maddas> HP stopped producing calculators.
<whee> there's three new models in the works
<Maddas> oh, cool
<Maddas> I had 3 or 4 HP32SII, lost all though ;)
<whee> there's pictures and the manual and all, so they're real too :)
<Maddas> :)
<Maddas> my thingy will still be very simple though, as I don't know much about O'Caml yet (especially not the libraries).
<mrvn> Maddas: Apart from datatypes there are not much libs.
<Maddas> Well, I don't really know many functions yet either ;-)
<Maddas> Hm.m.m.m....m..mm.m.
<Maddas> sorry. Anyway, is there something like a hash?
<mrvn> Do you know what CPS is?
<Maddas> Continuation Passing Style?
<mrvn> yep.
<Maddas> No.
<Maddas> I only know that Parrot will have it, and that Scheme supports it.
<Maddas> Is that storing the place in which you are (in the code) in a variale and then being able to "jump" back to that place later by restoring the value in the variable?
<Maddas> Or something like that ;-)
<mrvn> You can write code as CPS. Comes in handy when you need to do stuf asynchronous or otherwise schedule jobs.
<Maddas> I should read about it noce.
<Maddas> once, even.
<Maddas> Just wondering, why did you ask me?
<mrvn> cps is a way to write the code so it allways calls the next function with some argument and never ever returns.
<Maddas> I'm trying to write a RPN calculator, not like I could possibly know about it :-)
<Maddas> hah, cool
<karryall> two-face: comprends rien, tant pis :)
<mrvn> Maddas: Are you using a list for the stack?
<Maddas> An array, I guess.
<Maddas> Or whatever that [| |] thing is :)
<mrvn> bad
<mrvn> You can't resize arrays.
<mrvn> A list would be the natural choice.
<two-face> karryall: une version beta 3.07, c'est une préversion de 3.07, à savoir une pas-encore-3.08
<two-face> karryall: une version beta 3.07, c'est une préversion de 3.07, à savoir une pas-encore-3.07
<karryall> oui mais non, pas avec ocaml
<karryall> l'idée c'est qu'on puisse comparer les versions en utilisant la string
<karryall> comme 3.07 < 3.07beta
<karryall> la suivante sera 3.08 parce que 3.07beta < 3.08
<karryall> d'ailleurs tu remarqueras qu'après la 3.03alpha il y a eu la 3.04
<karryall> une version beta 3.07, c'est une (pas pré) version de 3.07 mais qui est beta
<bk_> btw does anyone of you know the book "the functional approach to progamming" by Cousineau, Mauny ?
<Maddas> mrvn: you can resize lists?
<Maddas> I didn't want to have an arbitrary sized stack anyway, I was thinking of four registers.
<bk_> oops
<Maddas> (as in the HP32SII :-))
bk_ is now known as bk_brb
<whee> Maddas: it'd probably be a lot easier to allow an unlimited stack size and use a list
<Maddas> I see.
<Maddas> I'll read up on lists then.
<Maddas> Hm, what I'm planning to do will be a bit over my head, so I will be poking small questions at you in between anyway. :-)
<whee> I think there's also a Stack library, which will be useful
<whee> module, even
<whee> the Stack module uses a list for implementation, anyway :)
<Smerdyakov> "Read up on lists"? Eek, you need a general OCaml tutorial.
two-face has quit [Read error: 104 (Connection reset by peer)]
<Maddas> Heh
<Maddas> I hate the book that I'm reading :)
bk_brb is now known as bk_
<mrvn> let push list item = item::list let pop list = List.hd list
<mrvn> ^^^ module Stack
<mrvn> let pop list = (List.hd list, List.tail list) I mean
<mrvn> tail? tl? what was it?
<mrvn> head? hd? one of those anyway.
ita has joined #ocaml
bk_ has quit ["I'll be back"]
bk_ has joined #ocaml
bk_ has quit [Client Quit]
<Maddas> hm
<Maddas> Why can't I say this?
<Maddas> type keyseq = int | Plus | Minus | Times | Divide | Modulo | Store | Recall;;
<Maddas> Do I need to define my own thing? Oh fine then ;/
<Maddas> I'll just do Number of int then
bk_ has joined #ocaml
bk__ has joined #ocaml
<whee> what is keyseq?
<Maddas> just something I'm defining
bk__ has quit [Client Quit]
<Maddas> It's supposed to be any valid entry by the user
<whee> I'm just wondering how you're doing your ast
<Maddas> Either an operator or a number
bk_ has quit ["I'll be back"]
<Maddas> I'm just doing this for the sake of writing something myself. :-)
<whee> well that ast looks a little odd, but okay :)
<Maddas> so I'll "match" the input, and match the result again :)
<Maddas> How would you do it in an easy way?
<whee> I'd just define an expression, then a literal (numbers), and operators
<Maddas> hm
<whee> you know that calculators have operations that aren't just binary, so you'd want to abstract that
<Maddas> Yes, I'm planning to think about that later :)
<Maddas> Would you seperately define operators and such then?
<whee> I'd probably go and have some type operator = BinOp op expr expr
<Maddas> Heh
<whee> then use polymorphic variants for op, and expr is the expr type
<Maddas> I'll just go on reading the book :)
<Maddas> Any good sources to learn O'Caml?
<Maddas> (free) :)
<whee> although it might be better to use a list and just do Op op [expr]
<whee> I just learned by looking at other code and whatever's on caml.inria.fr
<Maddas> wow :)
<whee> ocaml was my third or fourth real language; my first functional one, though
<ita> Maddas: look at the topic
<Maddas> I see
<Maddas> ok, I'll have a look at that one then :)
<whee> Maddas: what you're doing when writing something like a calculator is really coming up with some DSL, so it'd be easier in the long run to handle it like that from the start
<Maddas> DSL?
<whee> domain specific language
<Maddas> No idea :)
<Maddas> I must be leaving a very stupid impression in this channel, heh :)
<whee> nah :P
<Maddas> whee: I know enough people like me asking questions like me in other programming language channels ;)
<Maddas> But I'm having a hard time finding good O'Caml documentation ;)
<Maddas> This topic tutorial seems nice though.
<whee> yes, it does
<Maddas> There isn't a small bit of documentation on every function in the way Perl has it with Perldoc, is there?
<Maddas> e.g. a short description of how it works / what it does :)
<whee> people usually use ocamldoc to generate html docs
<Maddas> I see
buggs|afk has joined #ocaml
systems has joined #ocaml
<Maddas> Ah, that tutorial already cleared up many misconceptions that I had.
Vincenz has joined #ocaml
d-bug has joined #ocaml
<systems> what tut
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/ | A tutorial http://merjis.com/richj/computers/ocaml/tutorial/ | Good free book http://cristal.inria.fr/~remy/cours/appsem/ | Mailing list (best mailing list ever for any computer language) http://caml.inria.fr/bin/wilma/caml-list
<systems> >:)
<systems> LINKSSSSSS
<Maddas> huh!
<Maddas> how can you change the topic without being op? :)
<systems> HAHA
<Maddas> is that a freenode thing?
<systems> no
<Maddas> But? :)
<systems> it's the irc server software thingie
<Maddas> ok
<systems> some channels topic is restricted to ops only
<Maddas> ok :)
<systems> others are not, depends on the channel option
<systems> but i guess most irc servers are equal
<Maddas> :)
<systems> anyway, for a long time this channel was not even registered i dont know who did
<Vincenz> easy to find out
<systems> yea, i mean i dont know who he is
<Vincenz> it was regged by gl
<systems> he could be an ocaml hater
<Vincenz> so?
<Vincenz> as long as he stays away, it's not really a problem
<systems> yup
<Vincenz> [20:22] -> *chanserv* register somechannel; PASSWORD
<Vincenz> [20:22] -ChanServ- You are not a channel operator on [somechannel]
<Vincenz> but I am...
<Vincenz> ah
<Vincenz> forgot the #
<Vincenz> And if gl is an ocaml hater
<systems> yes you did
<Vincenz> you're all welcome to [--J--]
<systems> J
buggs has quit [Read error: 110 (Connection timed out)]
<Vincenz> #[--J--]
<systems> well i'll just switch to haskell, cant continue using a lang without it freenode chat room
<Vincenz> hehe
<Vincenz> hmm, do you like haskell better than ocaml?
<systems> i dont know haskell
<Vincenz> oh
<systems> just heard of it
<Vincenz> Ahhh
<Maddas> haha systems :)
<systems> it's teh competitor
<systems> i diss it
<Vincenz> tss
<Vincenz> well maybe it applies
<Vincenz> do you diss scheme, c and java too
<Vincenz> ?
<systems> no , i learn c
<Vincenz> ah good :)
<Vincenz> I hate those people that say "language X is the best, language Y, Z and W suck..."
<Vincenz> I prefer to think "The right tool for the right job"
<Vincenz> One very nice thing from learning scheme and ocaml, I started using more "functional-approach" in solving my c-problems
<systems> well, i like to read lang comparisions actually
<systems> if ppl who say lang x rules and lang z suck give nice arguments i dont hate em
<Vincenz> yes, but you can't compare c and ocaml, they're different, ocaml and haskell you could
<Vincenz> it's like comparing a screwdriver to a hammer
<Vincenz> you need both
<systems> yea vincenz, but to know what is the right tool for the job, you will have to compare langs at some point
<Vincenz> true
<Vincenz> hmm, met any comparisons between ocaml and haskell?
<Vincenz> and if so...what was the verdict?
<Vincenz> I've read quite some comparisons too (perl vs python vs ruby) ...(ocaml vs scheme...) (scheme vs lisp)...but usually they're quite biased
<systems> and quiet shallow
* Vincenz nods
<whee> heh
<systems> quite
<Vincenz> it's hard to find good comparisons
<whee> I like haskell more than ocaml just because haskell is fun to learn
<Vincenz> maybe it's best to just pick one and roll with it
<systems> i guess smarter ppl didnt write lang comparision
<Vincenz> it's like vim vs emacs
bk_ has joined #ocaml
<Vincenz> whee: what about libs for ocaml vs libs for haskell?
<whee> Vincenz: haskell's prelude covers more than ocaml to me, and the included libraries seem to cover a lot more
<whee> there's a lot more included list functions for example
<Vincenz> that's something that's usually lacking in the comparisons, the expansiveness of the libs, and I think it's important. A language might have a really nice syntax, but without libs it's kinda useless
<Vincenz> whee: how about things for OS, gui, net, zip, gfx...
<Vincenz> io
<whee> ocaml seems to have more graphics bindings and that type of thing
<Maddas> You know, by far most language comparisons are completely stupid. The only real way to get a feel for a language is to learn it yourself :)
<Vincenz> Maddas: true, but once I've chosen to learn python (for example) it's kinda useless to learn ruby and perl too (imho)
<Vincenz> they're too similar, and there's too many languages out there
<Maddas> haha
<whee> that's one reason for me never really learning ruby
<Maddas> They are not at all similar
<Vincenz> they have the same problem space
<whee> there's no point in learning ruby for me as it offers no new concepts
<Maddas> Ruby is completely different than Perl, for example
<whee> it's just a new syntax
* Vincenz nods at whee
<Maddas> Yeah, that's why I don't learn Ruby, too :)
<Vincenz> I finally chose Ruby over Python, though I'm starting to doubt my choice, ruby is slightly cleaner but doesn't have as much support
<Maddas> I hope knowing O'Caml will be rewarding, it's a bit painful to learn
<Vincenz> nah, it's fun:)
<Vincenz> my fave lang
<Maddas> Where do you learn it from?
<Vincenz> and my fave implementation is plt scheme, that's one well-integrated complete library/implementation
<Maddas> plt-scheme is nice
<Vincenz> Maddas: I read both docs (the two big ones on the site) and then I just started coding things
<Maddas> I see
<Maddas> I need to be more patient tehn :-)
<Maddas> then, even
<Vincenz> you can read as much as you want, but you only really start learning when you start programming
<Maddas> I just want a clean, but still practical and powerful language to code in. Not scripts, more the kind of distributed client-side things
<Maddas> Yes :)
<Vincenz> I usually just skim the syntax of a lang I want to work, then copy paste some simple program and start to modify it and see what happens
<Vincenz> Maddas: if you want distributed, look at Erlang...
<Vincenz> I took a look at it last week, quite nice
<Vincenz> (for distributed)
<Vincenz> threads are the basic unit of programming
<whee> erlang is great
<Maddas> Not distributed in that sense
<Maddas> just a program that gets distributed to other people
<Maddas> :-)
<Vincenz> ohh
<Maddas> whee: gah! I don't want so many great languages
systems has quit [Read error: 104 (Connection reset by peer)]
<Maddas> I want to know the best! :)
<Vincenz> hehe, I know the feeling
<Maddas> (I know, there is no best)
<Vincenz> :)
<Maddas> But Erlang seems to target developers for different things than what I'm likely to develop
<Vincenz> what sort of things do you watn to make?
<Vincenz> guis? plt scheme or java...
<Maddas> I'm not much of a ubercoder, and I won't be studying comp sci, so I won't have too much time left
<Vincenz> complex algorithms without too much interface....ocaml
<teratorn> Vincenz: erlang has "processes"; quite different from threads of the evil kind :)
<Vincenz> teratorn: true, sorry about that
<Maddas> Vincenz: not sure yet ;)
<Maddas> I'm planning to use O'Caml more as a general purpose programming language.
<Maddas> For any type of clients, I guess ;)
<Vincenz> it's quite a great lang, but one of the things that's missing.....is interfacing
<Maddas> Vincenz: All languages start like that
<Vincenz> there's not many libs to interface with the gui
<Maddas> or whatever. I just want to know O'Caml now.
<Maddas> Vincenz: yes, they need to be written ;-)
<Vincenz> well you can use tk, but I don't like tk...
<teratorn> tk is themable btw
<Vincenz> yeah, but it's a bit buggy. I did tk with ruby and it segfaulted sometimes, plus it doesn't look very native
<Vincenz> MrEd is awesome for guis :)
<Vincenz> (plt-scheme)
<teratorn> hmm, tk is stable as it's used from python (tkinter), (it's the bundled gui toolkit).
<teratorn> anyway, ocaml can do gtk right?
<whee> yes
<Vincenz> teratorn: what I don't like about tk-ocaml is....ocaml can be compiled natively, but you're still running a gui that's running on scripts
<Vincenz> what's the difference between gtk and tk?
<whee> they're entirely different toolkits
<Vincenz> but designwise...
<teratorn> Vincenz: gui isn't going to be a bottleneck, anyway
<Vincenz> teratorn: true but it doesn't feel like one nice homogeneous whole
<whee> that feeling is difficult to get on a unix anyway
<Vincenz> is gtk "scripted" too?
<Maddas> Indeed
<Maddas> There is no "homogeneous" feeling for UNIX
<teratorn> Vincenz: i wound't worry about that so long as it just works :)
<Vincenz> alright:)
<Maddas> I'd like to see a nice interface to something that uses native widgets on Windows and some nice other widgets on UNIX though ;)
<Vincenz> teratorn: but...it's not like pltscheme where you can hook scheme code as handlers. you're still going through a few well defined functions and passing messages back and forth
<Vincenz> Maddas there is something like that, forgot the name
<Maddas> plt-scheme isn't much of a practical language though :/
<Vincenz> it exists as a toolkit with support for many languages
<Vincenz> wx?
<whee> Maddas: wxwindows does that sort of thing
<teratorn> wx sucks pretty hard
<Vincenz> Maddas: I thought so too until I did the icfp competition in plt
<Maddas> Why, teratorn
<Maddas> Vincenz: ICFP competitions are practical? :)
<Vincenz> hmm...touche
<Maddas> I mean, writing something like mldonkey for example.
<Maddas> It'd probably just be hard in Scheme
<Maddas> I love Scheme and all, sure :)
<teratorn> Maddas: well, first up, it's 10 years behind in needing to be refactored (check the number of overlapping layout methods, for example)
<Vincenz> yeah but I like icfp competition-style things better, you get to work on all the cool algo's without having to worry about the user
<Maddas> Yeah, Vincenz, that's the whole point of the competition :-)
<Maddas> I might be implementing scientific things later on (studying electrical engineering), Scheme might be a good choice, but so might O'Caml. I'm learning both to see which I like more.
<Vincenz> there should be more of those things
<Vincenz> Maddas: cool, I studied ee too
<Maddas> cool :)
<teratorn> segfaults, ID numbers in a supposedly object-oriented framework, stupid macros, bloated memory usage, cross-platform inconsistencies, hmm..
<Maddas> Where?
<Vincenz> option multimedia and signal processing
<Maddas> teratorn: :(
<Vincenz> finished a year ago...., Maddas: leuven
<Maddas> teratorn: Can you recommend a better thing that's cross-platform?
<whee> Maddas: java? :)
<Vincenz> yick
<Maddas> For C/C++ :)
<teratorn> Maddas: well, Qt is definately better, but it may not be suitable for your needs. Also, gtk.
<Riastradh> Maddas, there are no good cross-platform GUI toolkits.
<Maddas> (Not me who's implementing it)
<whee> you should be able to write the interface in java and the rest in another language
<Maddas> Riastradh: Oh, I see.
<Vincenz> whee: JNI?
<Maddas> whee: I'm planning to try doing exactly that with Perl/Java when I get my PowerBook.
<whee> Maddas: you'd rather use cocoa :)
<Maddas> Using Inline::Java to do the Cocoa bindings (OS X GUI API), Perl doing the backend.
<Maddas> Haha :)
<teratorn> gtk even looks native nowadays on windows and winxp
<Vincenz> they should make an ocaml->java byte code compiler
<Maddas> whee: Cocoa is the reason I'm planning to use Java :-)
<whee> I thought I would be doing my normal development when I was considering a powerbook, but then I ended up just doing things in obj-c and using cocoa
<Maddas> haha, whee
<whee> it's just too easy
<Maddas> is it really that good?
<Maddas> Did you consider the PowerBook a good buy?
<Vincenz> what's obj-c and cocoa?
<Maddas> Objective C, Cocoa is an API with bindings for Java and Objective C
<whee> the powerbook was the best thing I've ever bought :P
<Vincenz> ah
<whee> objective C is a lot of fun to work with, as well
<teratorn> whee: damn i want one of those :)
<Maddas> whee: I might end up waiting one month without any computer just because the new 15" models are so late. But then, I'll spend the time reading, which is A Good Thing (tm)
<whee> Maddas: I believe there's new models this month
<whee> so I'd wait just a little more
<Maddas> I hope so.
<Maddas> Rumours were that they're delayed by one month, though. University starts October 20th. Will be a tight race :)
<teratorn> whee: though, i don't think my piggy bank is heavy enough yet :(
<Maddas> And I'll miss my computer at home. (Will be in a dorm)
<Vincenz> aren't powerbooks much more expensive than a comparable intel/amd based laptop?
<whee> Vincenz: not really
<Vincenz> oh
<whee> well, maybe they are; but I'd pay $1000 for OS X :)
<Maddas> Vincenz: you can't really find a comparable inntel/amd based laptop
<Riastradh> Vincenz, you get what you pay for.
<Maddas> Because the intel/amd based laptops don't run OS X :)
<Vincenz> whee: why OS X?
<Riastradh> Vincenz, have you ever used it?
<Maddas> Vincenz: use it once! You'll see.
<whee> I haven't found an OS I've liked more
<Vincenz> I haven't used Macintosh since 1997
<Maddas> The design is exceptional.
<Maddas> Oh, I didn't like any MacOS before OS X
<Maddas> But I love FreeBSD, so this was clear already from a technical point of view ;-)
<Maddas> And then, I used one once.
<Vincenz> isn't OS X based on linux?
<Maddas> No.
<Vincenz> hmm, ok
<whee> it gets a lot from freebsd
<Maddas> The core isn't FreeBSD, but a heavily modified version of it
<Vincenz> does it have commandline?
<whee> it's a unix, of course :P
<Maddas> Huh? Of course, it's considered a BSD after all.
<Vincenz> besides...FreeBSD and linux are very similar compared to the old mac interface
Xcalibor has joined #ocaml
<whee> I wouldn't call FreeBSD and linux similar
<whee> I'd very much rather not touch linux :)
<Maddas> Me neither, but that's because I don't like any Linux but like FreeBSD ;-)
<Xcalibor> hiyas :)
<Maddas> hiya Xcalibor
* Vincenz scratches his head
<Vincenz> I'll take a look at freebsd then
<Vincenz> ok, what separates freebsd from linux?
<Maddas> Maybe it's just personal preference on my side though.
<Vincenz> I thought they were both unices
<Maddas> So?
<Xcalibor> Vincenz: otoh linux supports an impressive array of hardware devices
<Maddas> Hey, OS X is also a UNIX, and is it the same like Linux? Never :)
<whee> Vincenz: what separates a 15 cent bic pen from something else? :)
<Maddas> Haha
<Maddas> whee: good argument :)
<Vincenz> doubtedly
<Vincenz> the interface is the same
<Vincenz> they have a point that writes
<Maddas> No it's not
<Maddas> oh, you mean the pens
<Maddas> :)
<whee> that's my point; they may look the same and in the end probably achieve the same result, but a decent pen will be easier to use to actually get there
<Vincenz> hmm........
<Vincenz> I don't know
<whee> except bic pens do have pretty crappy ink :)
<Vincenz> I doubt the difference between a linux and freebsd is much bigger than a difference between, say aix and mandrake
<Maddas> hah
<Vincenz> or slackware and mandrake
<d-bug> I like the speed of FreeBSDs kernel, but Debians userland is nice for a lazy bum like me. :)
<Xcalibor> Vincenz: they are different, reallt
<Vincenz> alright
<Xcalibor> different and the same
<Maddas> Vincenz: that's a bit like the typical language debate. Of course, anything you can do in C, you can do in asm.
<Vincenz> I'm not speaking about which is better
<Vincenz> just that....
<Maddas> That's a bit a harsh example, but it gives you the idea
<Vincenz> if someone says to me HP-UX and AIX, I say..same
<d-bug> anything you can do in asm can't be done in c :)
<whee> I prefer OSes that are a bit more coherent than what typical linux distributions are
<Vincenz> if someone says mac os and windows, I say different
<Maddas> d-bug: probably, I agree. :)
<Maddas> Same here, whee
<Maddas> Vincenz: if you think Linux and FreeBSD are the same, you obviously never used them much :)
<Vincenz> I've never touched freebsd
<Maddas> They're just different OSs.
<Vincenz> I was just under the impression they were very much akin
<whee> and nothing beats ports and packages, heh
<Maddas> Both run most of the software the other does, sure
<Maddas> But the OS is pretty different
<Vincenz> yes but now you're comparing the "libraries" of freebsd and linux..
<d-bug> I saw pictures of Suns Linux desktop and my first thought was "why should reinstall my desktop(WinXP) and run this, it looks identical"
<Maddas> Yes, that's what I'm trying to say.
<Vincenz> the coherentness and such
<Vincenz> hmm..
<Maddas> You can't possibly tell what OS I'm using by looking at my desktop either.
<Maddas> Sure, I'm probably not using Windows or OS X, but it could be any UNIX really :)
<Maddas> Although under the hood they are very different
<Xcalibor> you can tell by looking at mine, but you'd possibly be wrong ;-)
<whee> Vincenz: that's the thing; Linux is just a kernel, with a bunch of utilities thrown around it to make it into a usable OS
<Vincenz> yes
<Maddas> Agreed. Administering *BSD is much less of a pain IMO
<whee> with a BSD, it's all one package
<Maddas> It's not what you do, it's how you do it
<Vincenz> but I just think there needs to be a minimum amount of difference to be different
<Maddas> There is a lot of difference
<Vincenz> ask anyone "are linux and windows" different -> yes
<Xcalibor> well... administering a Debian is just as easy
<Vincenz> "are slackware and redhat different" ....->arguably no
<whee> Xcalibor: as is windows :)
<Maddas> Vincenz: They are completely different operating systems.
<Vincenz> alright
<Xcalibor> whee: windows is not easy to administer
<Maddas> Sure, they are similar in many ways, but they are different.
<Xcalibor> specially is you have more than 1 box
<Maddas> Vincenz: Don't try to find differences, try to find similarities.
<d-bug> I used FreeBSD for like 6-7 years but I use Debian these days just because there were too much work when I tried to upgrade things like X, GNOME et al
<Maddas> Don't assume that they are the same, assume that they are different.
<whee> d-bug: too much work? how?
<Maddas> compiling
<whee> pkg_add -r, no compilation
<Maddas> d-bug: I've got an AMD XP 1800+, so I'm happy :-)
<Vincenz> (thinks of gentoo :P)
<whee> does the same dependencies checks, downloads the packages
<Maddas> whee: I find that packages tend to be out of date :/
<Vincenz> whee: tried Mandrake?
<Vincenz> it's much easier to administer than debian
<whee> Vincenz: I don't use linux :)
<Vincenz> oh
* Xcalibor is using Mandrake 9.1, very nice
* Vincenz too
<Maddas> Vincenz: Gentoo copied the ports system. That's why portage is similar to the ports.
<Vincenz> but currently in windows
* ita is using Mandrake 9.2 rc1
<Maddas> But then, OS X has portage and apt-get too.
<whee> I've used slackware, debian, and gentoo
<d-bug> whee: you have to run portupgrade, which failed for me leaving me with a partially installed new version
<whee> never again, though :)
<Vincenz> Maddas: gentoo has only source packages, one big PAIN if you want to install a system
<Maddas> It's a good kind of pain :)
<d-bug> whee: the other option was to remove a lot of packages and install newer versions
<ita> are there ocaml bindings for qt ?
<Xcalibor> OTOH you can compile them with -O3
<d-bug> two non-options :-(
<d-bug> i really like FreeBSD
<d-bug> but I
<d-bug> I'm also 30+ and very lazy :)
<whee> heh
<Maddas> d-bug: portupgrade worked fine here :) Surprisingly, even portupgrading everything automatically worked just fine.
<Maddas> works, even
<Vincenz> Maddas: where are you studying ee?
bk_ has quit ["leaving"]
<Maddas> The only thing that I really don't like about ports are the CPAN Perl modules in there. They don't belong there.
<whee> I haven't had any problems with keeping things updated with portupgrade, but that could just be luck
<d-bug> Maddas: Lucky you! :)
<Maddas> Vincenz: ETH Zurich
<whee> I've been following -current and haven't had any problems yet :)
<Vincenz> Maddas: which year?
<Maddas> Heh. I'm not that courageous :)
<d-bug> Anyone tried Dragonfly?
<Maddas> Vincenz: Starting my first in October ;-)
<Vincenz> ah
<Vincenz> youngun :P
<Maddas> :)
<Xcalibor> DragonFly?
<Xcalibor> what's that?
<Maddas> DragonFlyBSD
<Maddas> A fork of FreeBSD.
<Xcalibor> a fork?
<d-bug> yes, Matt Dillons fork of FreeBSD 4.x
<Maddas> It's pretty small and has different goals than FreeBSD
<Xcalibor> well... not really... which goals?
<Vincenz> to be different than freebsd
<Vincenz> :P (jk)
<ita> *bsd code always forks
<Maddas> well, it doesn't want to do the changes that FreeBSD does from 4.x to 5.x
<Xcalibor> I have tried both free- and open- ... OpenBSD is nice
<d-bug> it's a much saner system design than Linux and FreeBSDs mutex web
<Maddas> Just introduce some new, cool stuff to 4.x
<Maddas> Or so :)
<Maddas> ita: yeah, but the cool thing is that many of the good features are ported across over time
<ita> so .. nobody knows if there are qt bindings or ocaml then ?
<ita> Maddas: it's easier with gpled code ;-)
<d-bug> ita: try sf.net or google
<d-bug> gpl sucks for some things
<Maddas> I don't like GPL in general :)
<Maddas> ita: why should it be easier?
<ita> d-bug: already tried, found nothing
<Maddas> After all, there's a reason that BSD code is in most modern operating systems :)
<Maddas> Or was for a long time, at least
<d-bug> example: i simply cannot understand why a lisp enthusiast would release a lisp system under the GPL. Is he more of a GPL enthusiast than a Lisp enthusiast?
<Vincenz> GPL lesser is nicer :
<ita> Maddas: gpl prevents ppl from forking it into proprietary sh*t
<Maddas> No it doesn't, ita
<Maddas> See RedHat :)
<d-bug> Does he really beleive that Lisp makes a difference and want others to use it, commercial or not?
<Maddas> It prevents people from using code with any other licesne.
<Maddas> license, even.
<d-bug> s/ei/ie/ right?
bk_ has joined #ocaml
<Maddas> believe yes :)
<d-bug> i have fever so... :)
<Maddas> ;)
<d-bug> it's hot in here :^)
<whee> if I'm going to write code on my own time for free, I'd rather let as many entities take advantage of it as possible with less strings attached
<Maddas> Me too.
<Maddas> Hey, if somebody actually uses my code in something proprietary, it'll only make me prouder.
<Vincenz> whee: GPL Lesser
<Maddas> Vincenz: He could use many other licenses too :)
<Vincenz> (LGPL?)
<Vincenz> The perfect license is a oneliner
<Vincenz> Use however you see fit, just attach my name.
<Maddas> Is it valid?
* Vincenz shrugs
<Maddas> :)
<whee> does the LGPL require someone to release all their source under that license if they directly use code under LGPL?
<d-bug> i searched sf.net for embedded common lisps, they were all under GPL, impossible to use for most of the things I would care to do.
<Maddas> Depending on what you mean with 'directly use', IIRC.
<whee> as in compile LGPL code into the project, directly using whatever it defines
<Maddas> No, not IIRC
<Maddas> They can use LGPL libraries and so on without releasing their things in LGPL, but they can't directly compile it in license the whole thing uder something else
<Maddas> *and license
<Vincenz> question...
<Vincenz> is a .BIN an iso image?
<whee> not always, it's just a binary of some sort
<Maddas> I don't know what you mean with that. It can usually be converted into .iso , IIRC
<Maddas> or was it the other way round :-)
<d-bug> The Lisp community uses LLGPL, lisp lesser GPL, sometimes
<whee> LGPL seems to deal a lot with libraries, heh
<Vincenz> damn, nero doesn't burn bins
<d-bug> rename it to .iso then
<d-bug> don't give up so easilly :)
<Maddas> gack. Stop distracting me from learning :-)
<Vincenz> I doubt it'd work :P
<Vincenz> hmm, you need a .cue file to change bin to iso
<Vincenz> grr
<Vincenz> ah, I could generate one
<d-bug> i thought you only needed .cue-files for multi-session .iso's?
<Vincenz> no idea
<Vincenz> I only had a bin file
<Vincenz> nero only burns isos
<Vincenz> it's a one track file tho
<Vincenz> let Maddas = function
<Vincenz> Studying -> NotStudying
<Vincenz> NotStudying -> Studying;;
<Maddas> shush
<Vincenz> hmm, Maddas is studying so...
<Maddas> you forgot the |
<Maddas> :)
<Vincenz> Maddas Studying
two-face has joined #ocaml
<Vincenz> been a while that I did ocaml
<two-face> yo
Vincenz has quit [Read error: 104 (Connection reset by peer)]
<karryall> 'lut
<mrvn> whee: LGPL is the GPL with some extra rules for linking of libraries.
<ita> GPL RoX0r
<Maddas> haha
buggs|afk is now known as buggs
<two-face> why GPL rox0r?
<two-face> i'm testing ocaml files with Xemacs
<Maddas> :)
<two-face> i can't get proper coloration
<Maddas> I switched from emacs to vim because my wrists hurt :?
<Maddas> Still kinda fighting, but it's getting better
<two-face> really ?
<Maddas> Yeah
<Maddas> :/
<two-face> how did they hurt?
<Maddas> As in, pain
<two-face> what makes them hurt?
<d-bug> i made that switch too, because of pain
<two-face> but you can use the viper mode
<two-face> Maddas: what in emacs make them hurt?
<Maddas> the control-something things
<d-bug> c-x c-s :)
<Maddas> I hated Viper mode.
<Maddas> I didn't like vim, I just forced myself to use it :)
<two-face> and with vim, you loose nifty modes, don't you?
<two-face> how do you get used to hiting ESC constantly?
<ita> just use gg=G in vim
<ita> two-face: in emacs you use ctrl meta constantly, not better
<two-face> what's gg=G?
<two-face> ita: yes, you need C and M anyway
<Maddas> two-face: I have 'TAB' bound to escape.
<Maddas> I couldn't get used to hitting escape anyway :)
<two-face> bah
<Maddas> ita: vim uses control, too, just less
<Maddas> much less
<Maddas> actually for nothing important :)
<ita> Maddas: not for functions that you use all the time (save, quit, open)
<Maddas> yeah
<Maddas> yeah
<Maddas> two-face: I had ` bound to c-x c-o, and lots of stuff like this. The vim way is much cleaner ;)
<two-face> saving: ESC : w ENTER
<ita> Maddas: quick vim shortcuts map -> http://kdissert.tuxfamily.org/kdissert.png
<Maddas> two-face: moving around? all keys under my fingers in vim.
<Maddas> I move around *much* more than I save :)
<Maddas> but hey, I'm not forcing you to anything.
<two-face> hmm and what about the TAB in emacs? I've never managed to do the same in vim
<Maddas> I just find this better for me and my wrists. I love emacs.
<ita> two-face: use "=="
<d-bug> the only thing i miss in vim was indentation, it worked almost as I wanted it
<Maddas> two-face: I don't need the emacs TAB anymore. I have autoindent set to on, so it autoindents when I start writing after a newline.
<Maddas> And it works perfectly in ocaml. Really perfectly :-)
<two-face> ita: you mean ESC ==
<ita> Maddas: autoindent is not that good actually, use smartindent instead
<Maddas> well
<Maddas> ita: I just hacked together two different ocaml syntax files, so I don't really *use* autoindent
<Maddas> but rather my ocaml.vim indents anyway :)
<Maddas> I'll replace autoindent with smartindent then. I just never edited anything apart from ocaml in vim yet ;)
<Maddas> except for scheme
<Maddas> and ( and ) are very cool, too.
<d-bug> how's vim for editing lisp?
<Maddas> heh, emacs really need syntax highlighting for vimscript
<Maddas> works fine with Scheme, never tried Lisp. And I don't use advanced functions, so I don't know yet. Still getting used to vim
<two-face> This project is an attempt to make a mindmapping-like tool
<Maddas> nice :)
<two-face> i don't get it
<bk_> awesome, the 2nd maxtor drive that's b0rked withhin 3 months now
* bk_ mad
<mrvn> I hat 3 ones this year, one died twice.
* Xcalibor uses vim for all languages, and emacs (with viper) for some interesting environments like usb logo (a very nice logo-mode), or haskell (since yesterday :-)
pattern_ has quit [Remote closed the connection]
pattern_ has joined #ocaml
<ita> two-face: the program (kdissert) is not ready yet ;-)
<two-face> ita: if only i could understand what it does
d-bug has quit ["night"]
<ita> two-face: look at this picture -> http://kdissert.tuxfamily.org/kdissert.jpeg
<ita> two-face: the idea is that you make the tree of your ideas, and you obtain the corresponding latex/openoffice/slide template
<two-face> omg
<ita> two-face: what ?
<two-face> oh my god
<karryall> two-face: arf, j'avais compris autre chose
<two-face> karryall: comme quoi ?
<karryall> object management group, l'organisme qui a commis CORBA
<two-face> mouarf :)
<karryall> hehe
<two-face> je suis un peu plus spirituel :)
<two-face> karryall: tu utilises emacs toi ?
<two-face> je ne pense pas que le mode emacs de 3.06 soit adapté à xemacs
<karryall> emacs oui
<two-face> j'ai testé avec xemacs, j'arrive pas à avoir toutes les couleurs
<Maddas> hahaha, this is hilarious
<Maddas> "I<CLC-INTERCAL> 1.-94 is a "just too late" compiler. Every statement in the source is treated as an INTERCAL comment, and an initial object file is produced containing just these comments. When the program runs, the first comment being executed will result in a runtime error. The "just too late" compiler is executed as part of the error handler, and attempts to compile the comment."
<karryall> je crois que tuareg est plus adapté à xemacs
<two-face> karryall: ok
<karryall> moi c'étais l'inverse : j'ai essayé tuareg avec emacs et j'arrivais pas à avoir toutes les couleurs
<two-face> ah bon? je trouve tuareg très coloré dans emacs
<karryall> je sais plus trop ... tout était en orange
<karryall> j'ai pas cherché à comprendre, j'ai tout viré
<ita> tiens tout le monde parle francais ici ;-)
<Maddas> non
<Maddas> mais la documentation d'ocaml est normalement en francais ;)
drWorm has joined #ocaml
<drWorm> i redefined + to be ( + ) x y = x + y + 1, just for kicks (i'm learning), any good way to reset it, except redefining + to subtract again? :)
mrvn_ has joined #ocaml
<Maddas> huh? :)
<Maddas> + to subtract?
<Maddas> Sorry, I'm not sure what you're trying to do.
<Maddas> maybe mrvn_ knows :)
mrvn has quit [Read error: 60 (Operation timed out)]
<Xcalibor> drWorm: + is not redefinable in OCaml
<Xcalibor> afaik
<Smerdyakov> Xcalibor, he just said he did it.
<Smerdyakov> drWorm, in SML, I'd do val + = Int.+
<whee> # value (\+) = (\-);
<whee> value ( + ) : int -> int -> int = <fun>
<whee> # 3 + 4;
<whee> - : int = -1
<Maddas> :-)
<whee> looks good to me :)
<drWorm> Xcalibor: it certainly is :)
<Xcalibor> drWorm: interesting... !!!
<drWorm> yeah, you can rearrange all the infix operators to create some very interesting bugs, i'm sure :)
<Xcalibor> nod... so the problem is to get it back to adding without reiniting the toplevel?
<drWorm> yes
<whee> you should be able to get it back by rebinding it to the function in Pervasives
<drWorm> i can always just restart ocaml, but i'm just a little curious
<Smerdyakov> Well, I don't know that "bugs" is the right term. Thanks to lexical scoping, you can generally only confuse your own code with new bindings.
<drWorm> if i set + back to x + y, it just uses the previous broken definition :)
<whee> err, unless it's not in Pervasives
<drWorm> Smerdyakov: well, true
<whee> I think it is :\
<whee> drWorm: try let (+) = Pervasives.(+)
<drWorm> excellent :)
<drWorm> never heard of this Pervasives, will get to it i suppose
<ita> open Pervasives;;
<whee> it's done automatically
<Xcalibor> or bind it to (-) (~-) ... (ie 1 + 2 = 1 - (~-2))
mrvn has joined #ocaml
<drWorm> Xcalibor: but that would create more calls
<Xcalibor> Pervasives is like a kind of default module that defines the OCaml toplevel...
<drWorm> i see
<Xcalibor> drWorm: well, yes, but you fiddle with a standard function in the first place... don't do that! :-P
<drWorm> Xcalibor: i'm just playing :)
<drWorm> trying to grok things
<Xcalibor> drWorm: then don't complain about function calls ;-)
<drWorm> hehe
<Xcalibor> :)
two-face has left #ocaml []
mrvn_ has quit [Read error: 110 (Connection timed out)]
<ita> on fait comment random en caml ?
<karryall> avec le module Random
<karryall> Random.int 100 donne une valeur entre 0 et 100
<ita> cool
<ita> merci
<ita> on fait comment pour imprimer une nouvelle ligne ?
<mattam_> print_newline ()
<mattam_> ou print_endline str
<mattam_> qui passe a la ligne automatiquement
<ita> merci
mattam_ is now known as mattam
<mrvn> mattam: ??
<ita> on fait comment pour avoir la longueur d'une liste d'entiers ?
<mrvn> If I stay a few years longer here I might even learn french.
<Xcalibor> ita
<Xcalibor> mm... List.length ?
<Xcalibor> ita: oui, c'est List.length: # let a = [1;2;3;4] in List.length a;;
<Xcalibor> - : int = 4
<Xcalibor> :-)
<Xcalibor> mrvn: it's not that difficult, actually...
<karryall> Xcalibor: what ? french ? you're kidding !
<karryall> must be horrible to learn
<Xcalibor> karryall: no way... it's easy
<Xcalibor> karryall: japanese, or irish, those are harder, but french???
<ita> Xcalibor: oki, merci
* Riastradh despised French in school.
<Riastradh> (less than I despise English, but it's hard for me to despise a language more than English)
* Xcalibor love to learn languages .)
<Xcalibor> loves, even
<Xcalibor> :)
<bk_> french is difficult
<Xcalibor> french is easy
<bk_> ha! because you're spanish
<Xcalibor> bk_: maybe :)
<bk_> :>
WoeToHice has joined #ocaml
<Riastradh> I'd hate to have to learn English as a second language.
<Xcalibor> but anyway, in an absolute space, french is way easier than Gaelic, or Hindi or Japanese
<Xcalibor> Riastradh: learning english as a third language is fun :-)
* Xcalibor has two mother languages, so english is his 3rd one, actually...
<Xcalibor> and much much easier than any north america native american language, like anishiinaabe (cherokee) or navajo (those are aglutinant languages, really hard to learn)
<Xcalibor> worse than german or russian or gaelic...
<karryall> german is not that hard
<Xcalibor> and comparable to swahili
<Xcalibor> karryall: ah, the relativity of effort... :-)
<Xcalibor> easy for you, hard for me :-)
<mattam> mrvn: ah... :)
<mattam> english is much easier than any other language I know, the only difficulty for me are irregular verbs (past forms particularily)
<mattam> but german, with all it's 'declinaisons' is like latin: too much to learn the hard way (even if in french we have something similar)
<bk_> nonono its not like latin !
<mattam> not like, but this particular thing, declinaisons, is like latin: you have multiple classes based on the context of the subject in the phrase (accusatif, datif, genitif...) plus the 6 usual I you he/she, we, you(plural) and they
<mattam> s/plus/multiplied by/
<Xcalibor> nod... declensions are a remnant from ancient indoeuropean... while old english had them, the only one still alive nowadays is the Saxon genitive... german has a wider articulated declension system, like russian do, for example...
<mattam> hmmm, btw, does anyone know of localization package for ocaml (like for formating dates etc...) ?
<mattam> of a
<Xcalibor> all latin descendants have changed the declension system for a preposition based sytem, much like english is doing and what most languages will eventually do...
<mrvn> mattam: Unix module?
<mattam> hmmm ?
<mrvn> iirc it has some time/date functions
<mattam> well, they're not localized
<bk_> well at least i still can decipher most of the postings on fr.comp.lang.caml
ita has quit ["kill me"]
<mrvn> val localtime : float -> tm
<mrvn> Convert a time in seconds, as returned by Unix.time, into a date and a time. Assumes the local time zone.
<mrvn> Look for a Locale or Gettext module.
<mrvn> converting to the local timezone seems to be the only localization Unix does.
WoeToHice has quit [Remote closed the connection]
<karryall> mattam: y'a quelqu'un qui en parlait sur la caml-list y'a pas longtemps
<mattam> faut funelweb et cook :(
buggs is now known as buggs|afk
<async> can you trace a function in ocaml?
<async> in other words, is there away to see when a function is called, and when it returns a value
<async> prefereably without printf
<bk_> hm you could try #trace in the toplevel i suppose
systems has joined #ocaml
<systems> sup
<async> bk_: thanks