flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
Narrenschiff has quit []
mwhitney__ has joined #ocaml
jeanbon has quit ["J'y trouve un goût d'pomme."]
mib_1b75sg has joined #ocaml
mib_1b75sg has left #ocaml []
Associat0r has joined #ocaml
jlouis has quit [Read error: 60 (Operation timed out)]
Associat0r has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
jlouis has joined #ocaml
det has quit [Read error: 104 (Connection reset by peer)]
det has joined #ocaml
bzzbzz has joined #ocaml
seafood_ has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]> 'night
<Yoric[DT]> Whenever he comes back, could someone tell dartelin that this looks like a Camlp4 bug I've found a few times?
Yoric[DT] has quit ["Ex-Chat"]
ulfdoz has quit [Read error: 110 (Connection timed out)]
rhar has quit ["This computer has gone to sleep"]
|jedai| is now known as jedai
palomer has quit [Remote closed the connection]
ulfdoz has joined #ocaml
tar_ has joined #ocaml
<tar_> Is there an OCaml library that will invert a matrix? I'm not finding any by searching
vuln has joined #ocaml
<vuln> Hello there
<Alpounet> bye guys
<Alpounet> tar_, Caml Hump ?
Alpounet has quit ["Ex-Chat"]
<tar_> zero results for 'matrix'
mwhitney__ has quit [Read error: 110 (Connection timed out)]
<hcarty> tar_: LACAML or ocamlgsl may have something
<tar_> thanks
Axioplase has joined #ocaml
Mr_Awesome has quit [Read error: 104 (Connection reset by peer)]
Mr_Awesome has joined #ocaml
saml has left #ocaml []
mwhitney__ has joined #ocaml
schmx has joined #ocaml
Ched has quit [Read error: 60 (Operation timed out)]
komatsu has joined #ocaml
schme has quit [Read error: 110 (Connection timed out)]
<hcarty> thelema: Should Array.make (and other similar functions in other modules) throw exceptions on invalid arguments when using the Exceptionless module?
mwhitney__ has quit [Read error: 110 (Connection timed out)]
Ched has joined #ocaml
<thelema_> hcarty If we're doing exceptionless right, Array.make will return a variant (probably polymorphic) giving (`OK of array | `Other_exception | `Exception2]
<hcarty> thelema_: As of now it throws an exception, along with several other similar functions
<thelema_> I think yoric had some good ideas on how to do exceptionless properly (IIRC, he wrote a paper on error handling w/o exceptions)
<thelema_> I wish I recalled what the results were... I remember polymorphic variants being really good, and monads too...
<hcarty> I think I have the PDF sitting around somewhere
<thelema_> http://www.univ-orleans.fr/lifo/Members/David.Teller/opensource.html <- has "exception monads for ocaml", but no link
<hcarty> I'm not sure where though
mwhitney__ has joined #ocaml
<hcarty> thelema_: I have an Exceptionless module for Seq. Would it step on any toes to push it now?
<hcarty> thelema_: I hope this isn't too many Batteries questions -- I don't want to overstep any boundaries
<thelema_> covers all functions throwing exceptions in seq?
komatsu has quit []
<hcarty> thelema_: All except make and init
<thelema_> because we're not really sure what to do with those.
<hcarty> Yes
<thelema_> ok, push it - I'll review it
<hcarty> Cool, thanks
<hcarty> thelema_: Pushed
<thelema_> well, that was very straightforward code. review passed
<hcarty> I'm off for that night. Thanks again for your assistance in getting setup with this thelema_ and the code review(s)
<hcarty> s/that/the/
<thelema_> you're welcome. Thanks for the code.
<hcarty> You are quite welcome as well. I'm glad to be able to take part in the process.
<thelema_> http://www.netsplit.com/2009/03/26/the-fallacy-of-high-level-languages/ <- is he right that making programming easier just lets bigger idiots write code?
komamitsu has joined #ocaml
<jedai> thelema_: Well I would argue with the "just". Besides easier and higher-level are not exactly synonym... There's lot of people that manage to code in C and have difficulty with Haskell for instance
<jedai> And he seems to have an extremely restricted vision of the high-level language landscape : he seems to hold Python as the pinnacle of the world for high-level code...
schme has joined #ocaml
schmx has quit [Read error: 110 (Connection timed out)]
<thelema_> jedai: I kind of agree with the sentiment that python is linux's Visual Basic
<jedai> thelema_: It's still a much better language than VB <= 6..
<brendan> down with batteries! that makes ocaml too easy to use
<jedai> I dislike Python (for no good reason) but I'll be the first to say that it's a pretty nice language
<jedai> brendan: I suggest that we only use Haskell with the functions from category-extras, for another taste of difficulties in a high-level language
<jedai> If you don't see what that could look like I suggest you refer to this excellent page :
mal`` has quit ["Coyote finally caught me"]
mal`` has joined #ocaml
mbishop_ has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
mbishop has quit [Read error: 113 (No route to host)]
tar_ has quit []
Camarade_Tux has joined #ocaml
jeanbon has joined #ocaml
jeanbon has quit [Read error: 113 (No route to host)]
mwhitney__ has quit [Read error: 110 (Connection timed out)]
angerman has joined #ocaml
mwhitney__ has joined #ocaml
HeikkiT_lc has joined #ocaml
vuln has quit ["leaving"]
seafood has quit []
angerman has quit []
mwhitney__ has quit [Read error: 60 (Operation timed out)]
manju__ has joined #ocaml
verte has joined #ocaml
manju_ has quit [Remote closed the connection]
_zack has joined #ocaml
mwhitney__ has joined #ocaml
s4tan has joined #ocaml
schme has quit ["leaving"]
schme has joined #ocaml
_zack has quit [Read error: 113 (No route to host)]
jedai has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
_zack has joined #ocaml
seafood has joined #ocaml
_zack has quit ["Leaving."]
_zack has joined #ocaml
Alpounet has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]> hi
<Alpounet> hi
seafood has quit [Read error: 110 (Connection timed out)]
Ched has quit [Remote closed the connection]
Ched has joined #ocaml
hkBst has joined #ocaml
Axioplase has quit ["Lost terminal"]
Ori_B has quit [Read error: 113 (No route to host)]
dartelin has joined #ocaml
komamitsu has quit []
dartelin has quit []
Alpounet has quit [Remote closed the connection]
jeanbon has joined #ocaml
jeanbon has quit ["J'y trouve un goût d'pomme."]
jeanbon has joined #ocaml
jeanbon has quit [Client Quit]
schme has quit [Read error: 60 (Operation timed out)]
jeanbon has joined #ocaml
verte has quit [calvino.freenode.net irc.freenode.net]
mrvn has quit [calvino.freenode.net irc.freenode.net]
holgr has quit [calvino.freenode.net irc.freenode.net]
ertai has quit [calvino.freenode.net irc.freenode.net]
verte has joined #ocaml
holgr has joined #ocaml
ertai has joined #ocaml
mrvn has joined #ocaml
Ori_B has joined #ocaml
itewsh has joined #ocaml
jeanbon has quit ["J'y trouve un goût d'pomme."]
schme has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
mwhitney__ has quit [Read error: 110 (Connection timed out)]
mwhitney__ has joined #ocaml
itewsh has joined #ocaml
Alpounet has joined #ocaml
seafood has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
seafood has quit []
<Alpounet> when working with camlp4, ";" is some sort of synonym of " " right ?
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
manju_ has joined #ocaml
manju__ has quit [Remote closed the connection]
schme has quit [Read error: 60 (Operation timed out)]
LeCamarade has joined #ocaml
<LeCamarade> join #plan9
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
schme has joined #ocaml
palomer has joined #ocaml
<palomer> http://pastebin.com/m4d5d11d <--could someone explain to me why this doesn't compile?
<palomer> foo2 is clearly a subtype of foo
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
mwhitney__ has quit [Read error: 104 (Connection reset by peer)]
<thelema_> palomer: but you're asking for foo2 to have exactly the same type as foo
mwhitney__ has joined #ocaml
<palomer> thelema, to be a subtype of foo
<palomer> consider:
<palomer> err
<palomer> I thought # was the subtype operator
<mfp> palomer: maybe you want self-types? http://pastebin.com/m3fe6039d
<mfp> (the constraint is pointless)
<palomer> mfp, doesn't that do exactly the same thing?
<mfp> well, that one compiles, for one :)
<palomer> oh my, I'm really confused now
<mfp> is get_parent supposed to return the same type or just foo?
<palomer> the same type
<mfp> then you need a self type -> object('self)
<palomer> so class type foo = object method get_parent : foo end is not the same as lass type foo = object('self) method get_parent : 'self end ?
<palomer> that's really confusing!
<mfp> the former returns only foo, the latter some #foo
<palomer> I use constraint to simplify type errors
<mfp> ('self is replaced by the derived class type)
jlouis has quit ["Lost terminal"]
<mfp> palomer: ic, then you don't need to repeat the method bar, method get_parent defs
<mfp> and you can write it as inherit foo instead of constraint foo2 = #foo
<palomer> eh?
<palomer> so inherit automatically enforces a constraint?
<mfp> what would it do otherwise in a class type?
jlouis has joined #ocaml
<mfp> s/would/could/
<mfp> ah I see, if you use constraint foo2 = #foo you _have_ to repeat all the methods, otherwise you get The abbreviation foo2 expands to type < > but is used with type #foo
<palomer> http://pastebin.com/m214cb65c <--now this won't compile!
<palomer> http://pastebin.com/m39da1c5c <--this compiles, but shouldn't (since I'm not using 'self types)
<mfp> foo2 and foo3 are the same type, < get_parent: 'a; baz : float> as 'a
<palomer> yes, but I can coerce to foo
<palomer> even though foo doesn't use self types
<mrvn> class foo3 : foo2?
<palomer> is this bad?
<mrvn> What is the difference to inherit?
<palomer> foo3 is a class
<palomer> foo2 is a class type
<palomer> so it won't work
<mfp> you could use a class virtual
<mrvn> but a class type can inherit another class type?
<palomer> mrvn, yup
<palomer> mfp, for which example?
<mfp> in general, why do you prefer class types to virtual classes?
<mrvn> palomer: In your first example isn't the 'self == foo?
<palomer> that's what I thought!
<palomer> but apparently not
<mrvn> that makes the 'self stupid
<palomer> mfp, with virtual classes, you can't do what you can do with self types
<mfp> this types > http://ocaml.pastebin.com/m4dff03b7 not with new foo3 though
<mfp> ?
<palomer> every function in a virtual class must have exactly the same signature, no?
<mfp> it can have a self-type too
<palomer> oh my
<mfp> types with {< >} instead of new foo3
<mrvn> palomer: method get_parent = Some (new foo3)
<mrvn> palomer: wouldn't that give an endless recursion?
<palomer> http://ocaml.pastebin.com/mf4f7815 <--this won't work though
<mrvn> palomer: never mind.
<mfp> (new foo3 type error -> some problem with the type not being complete at that point or whatever)
<mfp> right, the thing with the incomplete type
<palomer> I don't get this incomplete type business
<mfp> I must have seen it somewhere in the manual. The class def is not finished so the type is incomplete and it doesn't unify with <get_parent: 'b option; ..> as 'b
<mrvn> palomer: "Self type cannot escape its class" I hate that.
<mfp> anyway, the last paste works
itewsh has quit [Connection timed out]
<palomer> but what's {< >} ?
<mfp> a copy of the current object
itewsh has joined #ocaml
<palomer> but I want a new object!
<mfp> if you have some instance variables, you'd be able to change them with {< iv = newvalue >}
<mfp> it _is_ a new object
<palomer> ah
<palomer> erm
willb has joined #ocaml
<mrvn> palomer: Why not have class foo3 parent = ?
<palomer> mrvn, hmm?
<mfp> just to make the example self-contained?
<mrvn> palomer: pass the parent as argument to the constructor. For the root object you pass None.
<palomer> mfp, this isn't my actual code...my actual code is much more complicated
<palomer> plus, I'm going to have my users implement the type class
<palomer> and I don't want them to scratch their head like I'm doing
<mfp> palomer: of course, so I read the new foo3 as just a way to make a minimal self-contained ex
<palomer> right!
<mfp> (it doesn't terminate after all)
<palomer> but if I do class foo3 : foo2 = ...
<palomer> the type _is_ complete
<mrvn> mfp: how could it? The parent is never None
<palomer> but I still get the "self cannot escape" error
<mrvn> which paste now?
<mrvn> palomer: and {< >} solves that
<mfp> let's see... it doesn't type because of the new foo3, which is only used to make the example. In practice the node would get the parent [class foo3 parent = object ...] why are you worrying about that type error which won't happen in the real code?
<mfp> *make the example self-contained
<palomer> im just wondering about the "self cannot escape" error
<mrvn> I get "Self type cannot be unified with a closed object type"
<palomer> whoa, we get 2 different errors
<mrvn> Error: This expression has type foo2 but is here used with type
<mrvn> < baz : float; foobar : unit; get_parent : 'a option; .. > as 'a
<mrvn> Self type cannot be unified with a closed object type
<palomer> im using 3.10.2
<mrvn> 3.11.0
hastake_ has quit [Connection reset by peer]
<mfp> turns into Self type cannot escape its class with #foo2
<mfp> (3.11.0)
<mrvn> #foo2?
<palomer> mrvn, subclass of foo2
<mrvn> What is the difference between :> and #?
<palomer> :> is coercion
<palomer> what's the point of class types
<palomer> just use virtual classes all the time
<palomer> well...thanks for all the help!
* palomer is off
<mrvn> I think with virtual methods the get_parent would have type foo option and can not return a foo2 option.
ttamttam has joined #ocaml
<mfp> mrvn: it has type 'self, works fine (see my last paste)
<mfp> 'self option, that is
<mrvn> right, if you use 'self type.
<mrvn> get_parent : foo option does not work.
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
s4tan has quit []
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
HeikkiT_lc has quit ["ChatZilla 0.9.84 [Firefox 3.0.7/2009021910]"]
<hcarty> thelema_: Is exception use consistency a Batteries pre-beta concern?
LeCamarade has quit [Remote closed the connection]
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
<hcarty> thelema_: Or is this something that would be better to bring up on the list?
willb has quit ["Leaving"]
willb has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
ttamttam has left #ocaml []
verte has quit ["http://coyotos.org/"]
thelema_ has quit [Read error: 110 (Connection timed out)]
jeddhaberstro has joined #ocaml
|jedai| has quit [Read error: 131 (Connection reset by peer)]
|jedai| has joined #ocaml
jeanbon has joined #ocaml
willb has quit [Remote closed the connection]
itewsh has quit [Read error: 60 (Operation timed out)]
itewsh has joined #ocaml
willb has joined #ocaml
psnively has joined #ocaml
<thelema> hcarty: I'd say it's something that can be fixed even in beta.
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
<hcarty> thelema: Ok, sounds good. I didn't know how strict the API freeze would be post-beta
Snark has joined #ocaml
jlouis has quit ["Lost terminal"]
<mrvn> Better to fix the API in beta then post release.
<hcarty> mrvn: Indeed
<hcarty> I was bitten several times when switching code from the stdlib to Extlib by differing exceptions
<hcarty> So having a consistent and fixed exception structure for Batteries is, I think, worth focusing on
<palomer> oh boy, about to functorize my code
* palomer is scared
<mrvn> palomer: me too. I still don't know how to write my code. Use polymorphic types, a record of closures, functors, a virtual base class, a class type? Not sure what I need and whats best.
jeddhaberstro has quit []
<mrvn> Can one write module M = struct type t = { F.t array } end and F = FOO(M) ?
<thelema> mrvn: yes, but you need signatures everywhere
itewsh has quit [Read error: 110 (Connection timed out)]
<thelema> (in that declaration. See recursive modules in the manual)
itewsh has joined #ocaml
thelema_ has joined #ocaml
<mrvn> thelema: what chapter is that?
<thelema> language extensions
<rwmjones> _zack, ping
<thelema> part 7, chap 7
<thelema> part 2
<mrvn> thx, that is exactly my example.
psnively has quit []
<_zack> rwmjones: leaving, bb tomorrow
<_zack> rwmjones: mail, in case it's urgent
<rwmjones> ok not urgent
_zack has quit ["Leaving."]
slash_ has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
<rwmjones> ocaml, lablgtk and rpm users might be interested in http://rwmj.wordpress.com/2009/03/27/rpm-dependency-size-viewer-now-available/
<rwmjones> (that is to say, users of all 3)
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
|jedai| is now known as jedai
psnively has joined #ocaml
psnively has quit [Remote closed the connection]
jlouis has joined #ocaml
itouch has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
itouch has quit [Read error: 60 (Operation timed out)]
itouch has joined #ocaml
ttamttam has joined #ocaml
Jeff_ober has joined #ocaml
mwhitney__ has quit [Read error: 110 (Connection timed out)]
rjones has joined #ocaml
<rjones> gildor, I give up, where do I submit a change URL request for ocamlcore planet?
itouch has quit [Read error: 60 (Operation timed out)]
itouch has joined #ocaml
infoe|wk has quit [Read error: 60 (Operation timed out)]
mwhitney__ has joined #ocaml
kaustuv_ has joined #ocaml
Yoric[DT] has joined #ocaml
infoe|wk has joined #ocaml
Jeff_ober has quit []
kaustuv_ has quit ["ERC Version 5.3 (IRC client for Emacs)"]
caligula has joined #ocaml
Snark has quit ["Ex-Chat"]
caligula has left #ocaml []
thelema_ has quit [Read error: 60 (Operation timed out)]
mwhitney__ has quit [Read error: 60 (Operation timed out)]
jlouis has quit ["leaving"]
itouch has quit [Read error: 110 (Connection timed out)]
itouch has joined #ocaml
mwhitney__ has joined #ocaml
ttamttam has left #ocaml []
caligula has joined #ocaml
itouch has quit [Connection timed out]
itouch has joined #ocaml
seafood has joined #ocaml
rjones has quit ["Leaving"]
Associat0r has joined #ocaml
Associat0r has quit [Success]
itouch has quit [Read error: 110 (Connection timed out)]
itouch has joined #ocaml
thelema_ has joined #ocaml
hkBst has quit [Read error: 104 (Connection reset by peer)]
willb has quit [Read error: 60 (Operation timed out)]
oriba has joined #ocaml
itouch has quit [Read error: 110 (Connection timed out)]
itouch has joined #ocaml
<gildor> rwmjones: you want to change an URL for planet ?
itouch has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
Alpounet has quit [Read error: 110 (Connection timed out)]
mwhitney__ has quit [Read error: 104 (Connection reset by peer)]
mwhitney__ has joined #ocaml