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
<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 :
<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
<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
<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)]
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)]