mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
carm is now known as structured
prince has joined #ocaml
postalchris has quit ["Leaving."]
bzzbzz has quit ["leaving"]
OceanSpray has joined #ocaml
<OceanSpray> sup.
<OceanSpray> where can I find a good tutorial for this language?
<orbitz> the first hit on googl eisn't so bad
<orbitz> it lacks some stuff
<orbitz> i used that as a starting point then just went straight to the language reference
<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
<palomer> structured, I'm not having any problems right now
<palomer> but I've pulled out my hair many times
<palomer> ahh yes
<structured> palomer: thats called "getting used to hte typechecker"
<palomer> but I've been getting used to it for the past 4 months!
<palomer> but, err, yeah
<palomer> I used to do stuff like constraint 'self = #interface1
<structured> palomer: lol. I may be complaining just as much 4 months from now. haven't started my project whole heartedly yet
<palomer> constraint 'self = #interface2
<palomer> and before that I used haskell quite a bit
<palomer> and before that I did some sml
<palomer> I remember writing sml code, it was _torture_
<structured> hm I didn't mind it much..but I've converged on ocaml
<palomer> Reference to self <--this refers to referencing the self value
<palomer> I'm talking about annotating self with a type 'self
<palomer> and then using 'self to put constraints on the class
<palomer> I guess the only way is class foo : interface_bar =
<palomer> and class type interface_bar = inherit interface1 ; inherit interface2 ; ... end
<structured> certainly seems the natural approach...I don't know how to concatenate two classes rows though
<structured> hmm inherit? yeah I guess that would work
<palomer> interface1 and interface2 need to be class types
<structured> of course
<palomer> so I'll be writing a lot of code twice
<structured> what twice?
sporkmonger has quit []
<palomer> well, I'll need to write a lot more type classes than I would like
<structured> hmm I suspect we aren't doing this the best way
<palomer> me too
<structured> palomer: this also works. class foo : object inherit my1 inherit my2 end = ...
<structured> althoug that's very confusing to me
seafood_ has joined #ocaml
<palomer> structured, that doesn't give very clear error messages
<palomer> structured, (it's currently how I'm doing it)
<structured> I got an error with it and it made sense to me
<structured> but anyway, reading up on jocaml..getting kind of excited by it :)
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
<palomer> structured, oh wait, I misread your post
<palomer> structured, that's probably the best way
jdrake has quit [Read error: 113 (No route to host)]
filp has joined #ocaml
optikal has quit [Read error: 110 (Connection timed out)]
optikal has joined #ocaml
netx has quit [Read error: 104 (Connection reset by peer)]
filp has quit ["Bye"]
netx has joined #ocaml
seafood_ has quit []
hkBst has joined #ocaml
dobblego has joined #ocaml
dobblego has quit [Read error: 104 (Connection reset by peer)]
mlh_ has joined #ocaml
seafood_ has joined #ocaml
seafood_ has left #ocaml []
seafood_ has joined #ocaml
seafood_ has quit []
netx has quit [Remote closed the connection]
al-maisan has joined #ocaml
Snark has joined #ocaml
mlh has quit [Connection timed out]
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
al-maisan has quit ["Bye for now!"]
al-maisan has joined #ocaml
seafood_ has joined #ocaml
netx has joined #ocaml
seafood_ has quit [Client Quit]
love-pingoo has joined #ocaml
<rwmjones> has anyone used / would recommend any of these ocaml eclipse projects (or another?) http://wiki.cocan.org/ocaml_and_eclipse ?
hkBst has quit ["Konversation terminated!"]
OChameau has joined #ocaml
filp has joined #ocaml
filp has quit [Client Quit]
love-pingoo has quit ["Connection reset by pear"]
marmottine has joined #ocaml
<gildor_> rwmjones: i install ocaide once
<rwmjones> hi sylvain
<gildor_> rwmjones: i was pretty impressed by the work done
* rwmjones checks which one is ocaide
<gildor_> rwmjones: hi
<rwmjones> ah that's actually another eclipse plugin I hadn't found before :-)
<rwmjones> ah
<gildor_> rwmjones: however, as a "vim"ist i cannot recommend eclipse ;-)
<rwmjones> not an eclipse plugin
* rwmjones neither
<rwmjones> firmly in the emacs camp here
<rwmjones> but someone is talking about visual studio & F#, and I'm wondering what the competitor to that is
<rwmjones> I think this one is the open competitor: http://ocamldt.free.fr/
<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> I'll just ask a question upstream now
<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
jlouis has joined #ocaml
tty56 has left #ocaml []
tty56 has joined #ocaml
sporkmonger has joined #ocaml
tty56 has quit []
tty56 has joined #ocaml
<rwmjones> flux, discussed on libvir-list lots of times, including right now ... https://www.redhat.com/archives/libvir-list/2008-May/msg00295.html
<rwmjones> and the answer is, yes if someone does the work
pattern has quit [Remote closed the connection]
rodge has joined #ocaml
ReinoDios has joined #ocaml
<Yoric[DT]> Has anyone around here used CIL ?
<Smerdyakov> Sure.
<Smerdyakov> No spaces before question marks in English!! :D
<Yoric[DT]> Oops.
* Yoric[DT] will end-up writing a irc pre-processor :)
<Yoric[DT]> Anyway, how much work does it take to write a CIL module ?
<Smerdyakov> It's very easy.
AxleLonghorn has joined #ocaml
<Yoric[DT]> And how much work does it take to adapt an existing analysis to get it to work as a CIL module ?
<Smerdyakov> CIL is as popular as it is largely because it doesn't add any overhead. You'd need to be working with some intermediate language, anyway.
bzzbzz has joined #ocaml
<Yoric[DT]> Let me rephrase: I only intend to use CIL as a C pre-processor + parser.
<Yoric[DT]> I have an analysis to run on an AST.
<Smerdyakov> Yeah, I got that.
<Yoric[DT]> That's not exactly CIL's AST, but the translation is pretty straightforward.
<Yoric[DT]> Would you happen to have a tarball for CIL ?
<Yoric[DT]> The site seems down.
<Yoric[DT]> I can get it through GODI, but I have the impression that the examples are missing from the GODI package.
<Smerdyakov> Sourceforge is the main distribution point.
<Yoric[DT]> ok, thanks
<Yoric[DT]> mfff...
<Yoric[DT]> Can't access sf.
AxleLonghorn has left #ocaml []
<rwmjones> Yoric[DT], yeah I used it
<rwmjones> Yoric[DT], my sample code is here: http://et.redhat.com/~rjones/cil-analysis-of-libvirt/ please feel free to use/abuse it
<Yoric[DT]> Thanks.
<Yoric[DT]> Ok, got SF.
mbz has left #ocaml []
Cygal has left #ocaml []
Snark has quit ["Ex-Chat"]
postalchris has joined #ocaml
<Yoric[DT]> ....
<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
Choupinou has quit ["KVIrc 3.4.0 Virgo http://www.kvirc.net/"]
pango_ has quit [Remote closed the connection]
TychoBrahe has joined #ocaml
<struk_atwork> orbitz, the category theory definition of functor is closest to ML's use of the word: http://en.wikipedia.org/wiki/Functor
pango_ has joined #ocaml
<orbitz> struk_atwork: thanks
<Yoric[DT]> okay....
<Yoric[DT]> I'm at a loss.
<Yoric[DT]> maybe not
<Yoric[DT]> Maybe yes.
<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"
khafra has quit ["http://www.mibbit.com ajax IRC Client"]
TheLittlePrince has joined #ocaml
al-maisan has joined #ocaml
al-maisan has quit [Client Quit]
al-maisan has joined #ocaml
postalchris has joined #ocaml
al-maisan has quit ["Bye for now!"]
TheLittlePrince has quit [Client Quit]
david33 has joined #ocaml
rodge has quit [Remote closed the connection]
ygrek_ has joined #ocaml
filp has joined #ocaml
filp has quit [Client Quit]
david44 has quit [Connection timed out]
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)]
<bluestorm> higher-order type stuff
<orbitz> why not making polly_succ just an option?
<bluestorm> hmm, why not
ygrek_ has quit [Remote closed the connection]
<bluestorm> moreover, tree_seq feels wrong
<jonafan> okay
<jonafan> i am thinking about making ocaml bindings for qgis so you can make plugins
<jonafan> because a, i do ocamlish stuff at work under the pretense of doing work at work
<jonafan> and b, i don't know how to do stuff like that, so it'll be neat to learn
<bluestorm> better version : http://pastebin.be/11423
<jonafan> but i guess the problem is b, i don't know how to do it
<bluestorm> jonafan: what is/are qgis ?
<bluestorm> s/ ?/?/
<jonafan> qgis is like a map/geoprocessing program
<bluestorm> ah
<bluestorm> Q... geographical information system ?
<jonafan> the q actually stands for quantum, but yeah
<bluestorm> :D
<jonafan> there's a python plugin thingy
<bluestorm> perhaps you could export the python interface to OCaml
<bluestorm> (there is a pycaml project providing more-or-less transparent bindings)
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
sporkmonger has quit [Read error: 110 (Connection timed out)]
marmottine has quit ["Quitte"]
Snark has quit ["Ex-Chat"]
Torment has quit [Read error: 110 (Connection timed out)]
bluestorm has quit ["Konversation terminated!"]
sporkmonger has joined #ocaml
RobertFischer has joined #ocaml
Mr_Awesome has quit ["aunt jemima is the devil!"]
Mr_Awesome has joined #ocaml
rodge has joined #ocaml
thelema has joined #ocaml
love-pingoo has joined #ocaml
structured has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
love-pingoo has quit ["'night"]
RobertFischer has quit ["Taking off -- check out http://smokejumperit.com and http://enfranchisedmind.com/blog/"]
ofaurax has quit ["Leaving"]
Axioplase has quit ["go"]
jdrake has joined #ocaml