<structured>
altohugh..I've read everything and I still can't even decide how to split my program up into components yet :)
prince has quit [Client Quit]
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
Associat0r has quit []
shortcircuit has quit [Remote closed the connection]
rodge has quit ["Leaving."]
<mbishop>
modules, of course!
<palomer>
how do I enforce that a class _must_ satisfy a certain interface?
<palomer>
constraint 'self = #interface ?
* palomer
notices his class structure is a complete mess
<palomer>
I miss java style classes
<palomer>
the compiler would go "class c does not meet interface d, this method is <missing/different/whatever>"
Proteus has quit [Read error: 113 (No route to host)]
shortcircuit has joined #ocaml
<structured>
palomer: type constraints + coercions
<structured>
palomer: eg.. foo#bar is valid for any object foo with method bar
<structured>
argh join calculus is headache inducing...but must learn it
<palomer>
structured, I want the compiler to give me smart error messages according to the interface restrictions I impose on a class
<palomer>
like in Java, C#
<structured>
palomer: class type my_interface = object method play: int-> unit end
<structured>
palomer: class foo : my_interface = ...
<structured>
palomer: not sure if syntax is perfect, but idea is you are ensuring the compiler will bail if you are class doesn't contain all the the methods and values of my_interface
<structured>
*if you're class
<structured>
*if your class..sheesh
<palomer>
structured, what if I want it to support many interfaces?
m3ga has joined #ocaml
<palomer>
also, my_interface might be parametric in foo
<palomer>
and then the compiler gives _really_ funky error messages
m3ga has quit [Client Quit]
<structured>
palomer: not quite sure about multiple interfaces, except to define a class type that is a row union of two or more other class types perhaps? the parametric thing shouldn't be much of an issue
<palomer>
structured, the parametric thing gives wacky error messages, exactly the thing I'm avoiding
<palomer>
stuff like
<palomer>
"self can't escape its scope"
<structured>
thats a different type of error I think
<palomer>
or the standard "expected <150 lines> but got <200 lines>" without any reason
<structured>
one sec
Proteus has joined #ocaml
<structured>
palomer: how are you referencing self in your code? post to pastebin I suppose
<gildor_>
a long long time ago i also give a try to odt and eclipsefp
<gildor_>
odt is nice
<rwmjones>
ocaide looks pretty sweet too
<rwmjones>
I think ocamldt is a fork / continuance of eclipsefp
<gildor_>
indeed
<rwmjones>
gildor_, on an unrelated topic, is debian interested in packaging any of my virt stuff, specifically bitmatch, virt-df, virt-top, virt-ctrl, ocaml-libvirt? all the prereqs are in debian (specifically, libvirt)
<rwmjones>
we (Red Hat) coordinate closely with some debian guys to package libvirt, virt-manager
<rwmjones>
but they're a bit scared of ocaml to package the stuff written in ocaml
<gildor_>
if i should recommend something i will go for ocaide
<gildor_>
concerning virt/ocaml: i will have done it myself, if i should have used it
<gildor_>
but unfortunately, libvirt don't support vserver, which is the thing i use to have virtual host
<gildor_>
rwmjones: i will maybe do bitmatch myself
<rwmjones>
yeah, bitmatch is generally useful
<gildor_>
is libvirt planning to support linux-vserver?
<rwmjones>
I was just looking into it ... there were patches posted in 2007-10
<rwmjones>
asked, I'll let you know if there's an answer
Associat0r has joined #ocaml
naos_ has joined #ocaml
naos_ has quit [Read error: 104 (Connection reset by peer)]
bluestorm has joined #ocaml
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
tty56 has joined #ocaml
Mr_Awesome has joined #ocaml
Mr_Awesome has quit [Read error: 104 (Connection reset by peer)]
Mr_Awesome has joined #ocaml
Yoric[DT] has joined #ocaml
Associat0r has quit []
jlouis has quit ["Leaving"]
al-maisan has quit [Remote closed the connection]
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
al-maisan has quit [Read error: 113 (No route to host)]
mbz has joined #ocaml
<mbz>
hiya
al-maisan has joined #ocaml
<flux>
I'm not much in the virtualization scene, but has it been planned/is it even feasible to support vmware with libvirt? or would that be too orthogonal to the foss movement ;)
<flux>
hmph, the return type of 'while true' isn't 'a
<Yoric[DT]>
Do I understand correctly that there's no way to run an extension CIL module without recompiling CIL ?
<Smerdyakov>
CIL has a mode ("cilly") of making it easy for you to build executables.
<Smerdyakov>
However, the whole shebang is available as a library.
<orbitz>
does the Ocaml 'functor' term just one they liked or odes it bear a resembelance to math? The SGI STL docuemtnation for C++ defines the word functor in a way that seems different than Ocaml
<struk_atwork>
orbitz: most "correct" mathemetical concept of functor is in functional languages. in C++, a functor is a function object. in ocaml, a functor is a mapping (function) from structures to structures
<orbitz>
oh ok
<orbitz>
struk_atwork: how is that differen than any function that maps some value to another value? is a structure specifically defiend as not being a value?
<Yoric[DT]>
I don't quite get how to use cilly.
<Yoric[DT]>
That is, the documentation states that after having written my module, I need to ./configure .
<Yoric[DT]>
Which looks a tad annoying.
<struk_atwork>
orbitz, structures are modules...not first class values of the language. modules (generally) can't appear in expressions, but values can
<struk_atwork>
orbitz, I think..
<orbitz>
oh ok
<orbitz>
no that makes sense, i was not sure if you were usign 'structure' in the ocaml sense or in some higher matheamtical sense
<Yoric[DT]>
Getting CIL to work with my modules seems difficult at best.
tty56 has quit []
khafra has joined #ocaml
<khafra>
So, /usr/lib/ocaml/ contains big_int.cmi, big_int.cmx, and big_int.mli. I start ocaml interective and type "open Big_int;;", no errors. I type "unit_big_int;;", and it says "Reference to undefined global 'Big_int'"
<khafra>
"Big_int.unit_big_int;;" gets me the same complaint. Why is ocaml being all retarded?
<petchema>
khafra: `open' has nothing to do with linking, it's just a namespace convenience
<orbitz>
is Big_int part of Nums?
<orbitz>
err Num
<orbitz>
i'm not srue how to do it with bigint, but with nums you do: ocamlmktop -o mytop nums.cmxa
<petchema>
you have to load or link module first
<orbitz>
then ./mytop is the interpreter linked against nums
<orbitz>
oh yeah you can do #load "nums.cmxa" too
<bluestorm>
struk_atwork: and even closer to the Haskell definition of "functor" ^^
<orbitz>
one of them only works in windows I think
<khafra>
petchema: I know, I'm just using that as a way to point out that it exists and is linked just fine
<struk_atwork>
bluestorm, still haven't touched haskell yet. gotta limit the scope at some point :)
<orbitz>
khafra: "open" doe snot link it
<khafra>
"open Big_int;;" gives me no complaints, "open Blargh;;" gives me "Unbound module Blargh"
<orbitz>
struk_atwork: i am slowly being puleld to haskell. I'm not sure if it' as practical as ocaml, but i do like typeclasses
<khafra>
I'm overloading the operator "linked" to indicate that ocaml knows where it is.
<orbitz>
khafra: the *module* exists, but th ebindings to the native lib have not been linked in
<orbitz>
khafra: you ened to #link it
<orbitz>
err #load
<khafra>
There's no loadable .cma
<khafra>
Just a .cmx, .cmi, and .mli
<petchema>
khafra: use findlib
postalchris has quit [Read error: 113 (No route to host)]
<orbitz>
khafra: hrm ok, my bad
<mfp>
khafra: #load "nums.cma";;
<petchema>
mmh actually findlib's #list doesn't make it clear that Big_int is provided with nums.cma
<khafra>
#load "nums.cma";; works fine.
<khafra>
But after that, "unit_big_int;;" still gets an "Unbound value unit_big_int"
<mfp>
have you opened Big_int?
<petchema>
khafra: sure, now it's loaded, but not in namespace path... loading/linking and opening are really orthogonal
<khafra>
mfp: Yup.
<khafra>
mfp: Oh, wait, I gotcha
<khafra>
#load "nums.cma";; _then_ open Big_int;;
<mfp>
yes
<mfp>
hmm it doesn't seem to matter actually (3.10.1)
<khafra>
Cool, seems to be working. Thanks.
<khafra>
None of the 5 most popular ocaml tutorials online said anything about that kind of sequence, heh--even the interactive ocaml code examples just had "open Big_int;;"
al-maisan has quit ["Bye for now!"]
<khafra>
Perhaps they assumed things about some default interactive ocaml setup that I don't have.
<petchema>
khafra: afaik, what you see is the default setup
rodge has quit [Read error: 110 (Connection timed out)]
<orbitz>
i'm getting pretty decent and this snow globe with a tee and a golfball you ahve to get on to the tee
rodge has joined #ocaml
pattern has joined #ocaml
<khafra>
Verily, it is only intuitive for very specific values of "intuitive"
OChameau has quit [Read error: 110 (Connection timed out)]
Snark has joined #ocaml
<struk_atwork>
hmm it appears I was initially deceived..jocaml does not support code mobility
<orbitz>
struk_atwork: is that sending a function over the wire?
<struk_atwork>
orbitz, exactly
<orbitz>
struk_atwork: what a jerk. jerkcaml
<hcarty>
struk_atwork: I think there was some discussion about that on the mailing list
<struk_atwork>
hcarty, yeah looks like they thought it would break binary support with ocaml, and introduce complicated grammar into the ocaml language...still doesn't mean its not useful tho
<hcarty>
The "workaround" was to compile bytecode and send that, then use Dynlink on the other end
<hcarty>
Definitely useful. But they likely don't have much time to support it, so I doubt they want to diverge too far from OCaml
<struk_atwork>
hcarty, sigh guess I'll have to drop my mad scientist vision of autonomous ocaml agents taking over networks :(
jonafan_ has joined #ocaml
<ReinoDios>
struk_atwork, for implements agents, i though it's better to do in clisp or scheme.
<ReinoDios>
or Java.
<struk_atwork>
ReinoDios, eh I'll pass. sticking with ocaml for now.
Axioplase has joined #ocaml
jonafan has quit [Read error: 110 (Connection timed out)]
ofaurax has joined #ocaml
al-maisan has joined #ocaml
jonafan_ is now known as jonafan
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
structured has quit [Connection timed out]
al-maisan has quit [Remote closed the connection]
thelema has quit [Read error: 110 (Connection timed out)]