mrvn_ is now known as mrvn
skylan has quit [Remote closed the connection]
skylan has joined #ocaml
mellum has quit ["ircII EPIC4-1.1.7 -- Are we there yet?"]
skylan has quit [Read error: 104 (Connection reset by peer)]
skylan has joined #ocaml
skylan has quit ["Reconnecting"]
skylan has joined #ocaml
merriam has quit ["Client Exiting"]
merriam has joined #ocaml
MegaWatS has joined #ocaml
Wazzamar has joined #ocaml
MegaWatS has quit [Read error: 110 (Connection timed out)]
Wazzamar is now known as MegaWatS
MegaWatS is now known as VoteWatS
TachYon25 has joined #ocaml
gene9 has joined #ocaml
VoteWatS is now known as MegaWatS
gene9 has quit ["Client Exiting"]
mrvn_ has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
two-face has joined #ocaml
<two-face> hello
<MegaWatS> hi
<pnou> plop
<two-face> hey !
<pnou> two-face is back !
<two-face> :)
<two-face> je reviens sur paris avec un temps gris :))
<pnou> ha ben paris et temps gris ça rime pas pour rien :)
<pnou> c'était sympatico tes vacances ?
<two-face> Evig ar breizh
<two-face> super beau temps
<pnou> veinard
<two-face> en Bretagne j'ai toujours beau temps !
<pnou> moi j'y suis allé plusieurs fois et j'ai jamais eu de chance
<pnou> mais c'était très sympa quand même
<two-face> arf
<two-face> dis moi
<two-face> stefano n'a rien fait sur cameleon ?
<pnou> pas que je sache
<two-face> ok
<pnou> tu pourrais regarder et si tout va bien uploader mon paquet ocamldsort ?
<two-face> tu me dis où il se trouve
<two-face> je le ferai dans la semaine ok ?
<pnou> ho c'est pas pressé :)
<two-face> cameleon continue à avancer un peu ?
<pnou> nan maxence s'occupe plus de son nouveau job en ce moment
<pnou> sinon j'ai changé trois conneries à mlchat mais comme je suis le seul à l'utiliser :)
<two-face> j'espère que ça ira
<pnou> tu vas packager le snapshot du cvs ou la release ?
<two-face> snap
two-face is now known as two-away
TachYon25 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
two-away is now known as two-face
TachYon25 has joined #ocaml
TachYon25 has quit [Remote closed the connection]
TachYon25 has joined #ocaml
TachYon25 has quit [Remote closed the connection]
TachYon25 has joined #ocaml
TachYon25 has quit [Remote closed the connection]
Malkuth has joined #ocaml
<Malkuth> Hey guys...
<Malkuth> Is there a way to specify an instance variable without giving it an initial value during instantiation?
TachYon25 has joined #ocaml
<pnou> no
<two-face> hopefully not
<two-face> :)
<two-face> Malkuth: do you realize how insane ideas you have in mind :)
<Malkuth> Dang.
<Malkuth> But I could aways do 'val mutable x = 0' or something.
<two-face> yes, but there is an initialisation
<Malkuth> I know.
<Malkuth> I have a C type without a corresponding OCaml type.
<Malkuth> I want to do 'val mutable ctx : gss_ctx_id_t = "something"'
<Malkuth> I guess I could make an external function call that returns an empty gss_ctx_id_t.
<two-face> then you have to use abstract types in OCaml
<Malkuth> Ahhh, ok.
<Malkuth> Where can I look for some information on that?
<two-face> the oceml reference manual
<Malkuth> Ok, I'll poke around. Thanks.
<two-face> there is a chpter on interfacing with C
<two-face> and you can have a look at the lablgtk code
<two-face> with is a very good example
<Malkuth> I didn't see any objects in the lablgtk code.
<two-face> you mean OO ?
<Malkuth> Yep.
<Malkuth> Oh, wait...I'm looking at labltk. :)
<two-face> :)
<Malkuth> two-face: Thanks! Lots of great stuff in there.
<Malkuth> It is so nice to work with a real OO language.
<two-face> not always easy to understand even
<Malkuth> No, but it's still nice.
<Malkuth> You know, I'm coming from Perl when it comes to OOP. Perl's OOP is just a giant hack.
<two-face> heh
<two-face> ocaml is fully safe
<Malkuth> Yeah, and the C interface in OCaml is so nice and easy to use.
<Malkuth> I have a working GSS-API client object for OCaml now. :)
<two-face> what 's this?
skylan has quit [Read error: 104 (Connection reset by peer)]
<Malkuth> GSS-API is the Generic Security Standard. It basically allows Kerberos 5 authentication for network services.
<Malkuth> And Kerberos 5 encryption, too.
<two-face> ah ok
<Malkuth> So I think, once I get the server object done, it will allow encrypted marshalled OCaml objects to be passed across a network connection.
<Malkuth> Which is pretty darn cool.
skylan has joined #ocaml
<two-face> k
<Malkuth> Time for a nap.
<Malkuth> two-face: Thanks for your help!
<two-face> anytime!
MegaWatS has quit ["Oceania has ALWAYS been at war with Eastasia!"]
TachYon25 has quit [Remote closed the connection]
TachYon25 has joined #ocaml
dostoyevs has joined #ocaml
TachYon25 has quit [Remote closed the connection]
* dostoyevs wonders whether it's worth to learn OCaml.
<Malkuth> dostoyevs: Depends. What are you planning on doing?
<dostoyevs> Malkuth: I don't have a real application. I just learn every language that has interesting ideas in it.
<two-face> it is worth
<two-face> ocaml is nice, has a fast implementation, is safe
<Malkuth> dostoyevs: Well, it's worth it, then. :)
<two-face> you can write games with it
<dostoyevs> Fast is nice. But what I like most are language features that distinguish it from other languages; that may change the programmer's view of programming in general.
<two-face> i'm off now
<two-face> bye
two-face has left #ocaml []
<Malkuth> dostoyevs: It's a semi-functional language, so if you're not familiar with functional programming, that part will certainly change the way you approach problems.
<Malkuth> dostoyevs: Also, it's the only language I know of with inferred typing.
<dostoyevs> Malkuth: Is it more functional than LISP?
<Malkuth> dostoyevs: Much more. Common Lisp has lots of side effects.
<Malkuth> dostoyevs: I probably wouldn't call CL a functional language, actually.
<dostoyevs> Malkuth: Yes, CL is not really a functional language. I will see, if I find inferred typing explained somewhere.
<pnou> mmm, i can't see why ocaml would be much more functional thant clisp
<Malkuth> pnou: The standard library in CL isn't functional.
<Malkuth> pnou: There are all sorts of CL functions with side-effects.
<pnou> well, ocaml too
<Malkuth> Like what?
<Malkuth> I haven't run into any yet.
<pnou> Hashtbl
<pnou> Buffer
<Malkuth> Yes, but compare that to this:
<pnou> Stack
<Malkuth> (setf foo '(10 9 5 7))
<Malkuth> (sort foo #'<)
<Malkuth> Suddenly, foo is axed.
<pnou> well it's the same with arrays
<Malkuth> The libraries in OCaml that are non-functional are clearly labeled as such.
<pnou> that's true
<Malkuth> But in CL, individual functions in the standard library may or may not be non-functional.
<smkl> aren't all variables mutable in lisp?
<Malkuth> Yep, all variables are mutable.
<Malkuth> Even inside a list.
<Malkuth> (setf (nth 1 foo) 99)
<Malkuth> You can 'setf' pretty much anything.
<Malkuth> Even object slots.
<Malkuth> Or even (setf (cdr foo) '(a b c))
<Malkuth> :)
* Malkuth loves Common Lisp.
<Malkuth> Even better is (setf (cdr foo) foo)
<pnou> hehe
gl has joined #ocaml
<Malkuth> So anyhow, that's why CL isn't functional.
<pnou> what is you definition of a functional language?
<gl> a language where we don t care about the memory state
<gl> ('lo all)
<pnou> so ocaml isn't a functional language
<Malkuth> OCaml doesn't claim to be purely functional.
<pnou> yep
<pnou> but you said that it's more functional than clisp
<Malkuth> It is.
<Malkuth> Becuase you can program in a functional manner without having to worry about non-functional side-effects.
<Malkuth> In CL, you always have to be aware of the state of your variables and what you might be overwriting.
<Malkuth> You have to remember if the function you're calling is destructive or not, and if you will harm other variables by altering a pointer somewhere.
<pnou> to me that doesn't make it a less functional programing language
<Malkuth> To each his own. :)
<pnou> :)
<Malkuth> It's just not that often that you hear Lispers claiming theirs is a functional language.
<pnou> to me a functional language is a language that helps the programmer to handle functions
<pnou> so with my definition, clisp is less purely functional
<pnou> because it can't prove things that ocaml can prove about referentiel transparency
<pnou> but it is as functional that ocaml
<mrvn_> pnou: But clisp is more functional because it allows for fixpoint itterators.
<pnou> hu ?
<pnou> Y combinators ?
<mrvn_> yes, that stuff
<mrvn_> In ocaml you have to resort to let rec to write a factorial function.
<pnou> no
<pnou> but you must use ocamlc -rectypes
<pnou> # let y = function le -> (function f -> le (function x -> f f x)) (function f -> le (function x -> f f x)) ;;
<pnou> let length = y (function length -> function | [] -> 0 | h :: t -> 1 + length t)
<pnou> ;;
<pnou> val y : (('a -> 'b) -> 'a -> 'b) -> 'a -> 'b = <fun>
<pnou> # val length : '_a list -> int = <fun>
<pnou> # length [1;2;3];;
<pnou> - : int = 3
<pnou> launched with
<pnou> dimitri@corwin:~$ ocaml -rectypes
<mrvn_> Hmm, didn't know that one.
<mrvn_> pnou: Why is the last "length" bound there and to which length?
<pnou> i didn't understand
<mrvn_> Without -rectpyes the "+ length t" would give onbound binding length.
<pnou> that's not a problem of binding, but of typing
<mrvn_> ah, forget it. length is bound there.
<pnou> the y function cannot be typed without -rectypes
<mrvn_> Why do you write "function | []..."? Is that a common custom?
<mrvn_> The extra | I mean.
<pnou> so that i can cut and paste the first pattern matching
<pnou> common i don't know, but i'm not the only one :)
<mrvn_> I saw that a few time here now.
mrvn_ is now known as mrvn
<mrvn> Does -rectpyes make ocaml less type save or compilation slower or what is its effect apart from the y working?
<pnou> it doesn't make it less type safe but it can accept some program errors that are typable, there are some example in the oreilly book as far as i remember
<pnou> i don't think it slows compilation but i'm not sure