Vincenz has quit []
<ctkrohn> Hey, I'm getting the error "This expression has type move_info list but is here used with type move_info list" as part of a function definition. What does this mean? Is it really an error?
<lus|wazze> it means you have two distinct types move_info
<lus|wazze> like if you redefined the type
<lus|wazze> or have two definitions of it from two different modules
<ctkrohn> hmm, ok
<ctkrohn> I don't think I'm redefining anywhere
<ctkrohn> I'm only using one module
<ctkrohn> Would it be possible for me to be redefining move_info unintentionally?
<lus|wazze> are you in the toplevel ?
<ctkrohn> yeah.
<lus|wazze> well you probably loaded the same module several times then
<lus|wazze> and the value you used was constructed before the ast load
<lus|wazze> so it is of a different move_info type
<ctkrohn> hmm
<lus|wazze> the one which was defined in the former loading of the module
<ctkrohn> Well, I haven't been loading any modules
<ctkrohn> Just pasting code directly into the interpreter
<lus|wazze> thats the same then
<lus|wazze> you probably pasted the definition of move_info several times
<ctkrohn> now when I modified the function I'm getting the error "This expression has type move_info but is here used with type int"
<lus|wazze> or several versions of it
<ctkrohn> hmm
<ctkrohn> yeah, maybe
<ctkrohn> Let me exit and re-paste...
<ctkrohn> yeah, still getting the error, except with int
<lus|wazze> ???
<ctkrohn> I modified the function, and now I get the error "This expression has type move_info but is here used with type int"
<ctkrohn> I'll probably be able to figure this out now...
Smerdyakov has joined #ocaml
<lus|wazze> damn the limitations in ocaml's object system are really starting to piss me off
<lus|wazze> "self type cannot be unified with a closed object type" <--- well gee thats just dandy thanks a lot >8[
<mrvn> huh, whats that?
<mrvn> I thought I had seen all possible error messages
<lus|wazze> it means that if a have a class x which is of class type y
<lus|wazze> you cannot pass the self value of x inside of it as a y
<lus|wazze> e.g. you cant do class type a = object method get : b -> unit end and b = object method foobar : a -> unit end class implb : b = object ( self ) method foobar aimpl = aimpl#get self end;;
<lus|wazze> hm strange in that reduced example of what im doing the error message is a different one
<mrvn> (self:>a) ?
<lus|wazze> ah thanks
<lus|wazze> thats just crazy enough that it might work ;)
<mrvn> Somehow you allways have to cast self when it leaves the class.
<mrvn> i.e. for everything but self#blub
<mrvn> At least thats how it feals.
<mrvn> It might be good to write a method as_a = (self:>a)
<lus|wazze> :|
<lus|wazze> alright at least its working now :)
<lus|wazze> thanks^^
<mrvn> np
asqui has quit [Read error: 104 (Connection reset by peer)]
Kinners has joined #ocaml
lus|wazze has quit ["sul °°"]
lus|wazze has joined #ocaml
lus|wazze has quit ["sul °°"]
Kinners has left #ocaml []
Smerdyakov has quit []
whee has quit ["Leaving"]
h has quit ["BitchX: the original point-and-click interface."]
CybeRDukE has joined #ocaml
asqui has joined #ocaml
asqui has quit [Read error: 104 (Connection reset by peer)]
CybeRDukE is now known as CybeR[away]
TachYon has joined #ocaml
whee has joined #ocaml
CybeR[away] has quit ["Real programmers don't document. If it was hard to write, it should be hard to understand."]
mattam_ has joined #ocaml
mattam has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
lus|wazze has joined #ocaml
asqui has joined #ocaml
asqui has quit [Read error: 54 (Connection reset by peer)]
CybeRDukE has joined #ocaml
TachYon has quit ["Client Exiting"]
mrvn_ has joined #ocaml
mrvn has quit [Read error: 110 (Connection timed out)]
mrvn_ is now known as mrvn
TachYon has joined #ocaml
kmag has joined #ocaml
systems has joined #ocaml
kmag has quit [Read error: 60 (Operation timed out)]
systems has quit ["Client Exiting"]
kmag has joined #ocaml
<kmag> I can #load "fcp.cmo";;
<kmag> but
<kmag> open "fcp.cmi";;
<kmag> gives me asyntax error on the string
<kmag> what am I doing wrong?
<kmag> (this is using the toplevel in interactive mode)
<kmag> capitilizatoin error on my part
<kmag> got it now
<Riastradh> 'open' takes a module identifier, not a string.
<kmag> is it advisable to always put classes inside modules?
<Riastradh> What do you mean?
<kmag> if the module name isn't bount, it apearrs to default it to the source file name
<Riastradh> ...with a capitalized first letter.
<kmag> is it advisable to emplicitly name the modules for my classes?
<Riastradh> I don't know what you mean.
<Riastradh> Give me an example of what you're talking about.
<kmag> module MyMod =
<kmag> struct
<kmag> class myclass =
<kmag> object(self) ...
<kmag> end;;
<kmag> end;;
<kmag> or are modules and classes mutually exclusve in ocaml?
<Riastradh> What would the point of that be? -- why wrap a class needlessly in a module?
<kmag> They are wrapped by the system, correct?
<kmag> as in they are automatically wrapped in a module
<Riastradh> Er, not that I know of.
<kmag> let c = new fcp_client "127.0.0.1" 19114;;
<kmag> val c : Fcp.fcp_client = <obj>
<Riastradh> Where is fcp_client defined?
<kmag> fcp.ml
<Riastradh> And you did 'open Fcp'?
<kmag> fcp.cmo
<kmag> yes
<kmag> I opened FCP
<kmag> Fcp, rather
<Riastradh> That's not the system wrapping the class in a module.
<Riastradh> That's because the system implicitly defines a module Fcp based on the contents of the file fcp.ml.
<kmag> how would I load it dynamicaly?
<Riastradh> If you put 'foo' in fcp.ml and 'bar' in fcp.mli, and then loaded it from the top level, it's like in the top level just doing: module Fcp : sig bar end = struct foo end
<Riastradh> By the way, where are you right now, geographically? -- your hostname suggests that you use Verizon's Boston office.
<kmag> Cambridge, MA
<Riastradh> Do you know about ESP at MIT?
<kmag> you mean ESG?
<Riastradh> No, ESP -- http://web.mit.edu/esp/
<kmag> interesting
<kmag> why do you ask?
<Riastradh> I thought I may have met you, possibly -- I'm often found in that area.
<kmag> I'm an MIT alum living just off campus,but I don't think I've ever been
<kmag> involved in ESP
<kmag> in any case, all of my modules loaded via .cmo files will have an implicit module. Is it advisiable to give them an explicit module name?
<Riastradh> Not really. It would just be an extra, unnecessary layer of abstraction.
<kmag> but the layer of abstraction is added automatically if it is not added explicitly
<kmag> you aren't increasing the number of layers of abstraction
<kmag> uless you wind up with nested modules
<Riastradh> Yes you are -- you'd end up with a module Fcp containing only a module Fcp which contain what you define in the file.
<kmag> ahh... I didn't realize it would nest the modules
<kmag> thanks
<kmag> Have any of you sucessfully compiled mlDonkey under Debian?
* Riastradh uses neither MLdonkey nor Debian.
<kmag> do you use Freenet?
<Riastradh> No.
<kmag> K. I'm teachingmyself ocaml by writing some Freenet tools
<kmag> there are multiple implementations of Python Freenet tools
<kmag> but none in Ocaml
<kmag> AFAIK
<vegai> I thought only java implementations of freenet existed
<vegai> kmag: do you have some specific problem with mldonkey?
asqui has joined #ocaml
<kmag> I compiled it about a year ago
<kmag> but the new verion gives me problems, related to GTK, I bleieve
<vegai> can you specify? problems at what stage?
<vegai> you have lablgtk installed, right?
<kmag> I have at least the stub libs installed
<kmag> liblablgtk-oca 1.2.5-9 Runtime libraries for lablgtk.
<kmag> As far as Freenet goes, there is a Freenet Client Protocol for third-party tools running on localhost
<vegai> you may very well need the -dev for compiling
<kmag> thanks
<kmag> apt-getting now
<vegai> is the problem that it won't compile at all, or that it doesn't build the gtk clients?
<kmag> let me give it another go
<kmag> it's been abouta month since I tried it last
<kmag> from back in the day, I also remember the gnutella client was screed up
<kmag> it ouwld include error messsages _in_ the downloaded files
<vegai> is there something wrong with the mldonkey debian package, btw?
<kmag> how long has that been availaable?
<vegai> I have no idea, I don't use debian =)
<vegai> I just checked debian.org's package listings
<kmag> apt-cache search mldonkey gives no results
<vegai> ah, I searched from all versions... it is probably only in unstable then
<kmag> what do you run, vegai?
<vegai> gentoo
<vegai> the distro for the dumbass generation
<kmag> why do you say that?
<kmag> ever get dependency errors in the packaging system?
<vegai> obviously because I am a dumbass
<vegai> not that I remember, no
<vegai> well, in reality, I just dislike saying "my distro is the best"
<vegai> since it's so obvious...
<kmag> are the ports signed?
<kmag> or packages, or whatever you call them
CybeRDukE has quit ["My software never has bugs. It just develops random features."]
TachYon has quit ["Client Exiting"]
kmag has left #ocaml []
<mrvn> kmag: apt-get install mldonkey-server mldonkey-gui
<mrvn> In unstable since today.
<mrvn> i386 only, other archs as soon as the autobuilders get their hands on it
<vegai> kmag: no, they are not
<vegai> the source-files are md5summed, though
<mrvn> vegai: so how do you detect a worm?
<vegai> did I answer that already?
<mrvn> No.
<mrvn> vegai: A big problem with gentoo is that it allways downloads the complete source over and over again.
<mellum> Hm, build failed on m68k... xsltproc segfaults. Wasn't that supposed to be fixed?
<vegai> mrvn: are you trying to initiate a distro war for some reason now?
<vegai> cause I have no reason to do that
<mrvn> no.
<vegai> Good.
<mrvn> mellum: glibc might be bogus on m68k again
<mellum> mrvn: Oh well, nobody would be using it on m68k anyway :)
<mrvn> I heart some reports on it segfaulting before calling main
<mrvn> mellum: I'm thinking about it. 64 MB ram and 060@50 should be enough. And its the most silent comp I have.
<mellum> mrvn: Hm, might be barely enough (if you don't intend to do anyhing else with that machine)
travisbemann has joined #ocaml
<mrvn> routing and ftp downloads.
<travisbemann> ah, the sole problem with OCaml - once you've been programming in it for a while, everything else feels painfully limited to program in...
<mrvn> travisbemann: yeah, thats a real big problem :)
<mrvn> travisbemann: gimme a ocaml-sh
<Smerdyakov> travisbemann, even SML?
<travisbemann> well, what i've been doing is writing the rendering layer for a new GUI system, which itself is written in C even though the rest of my code'll be written in OCaml
<Smerdyakov> Why are you using C for this?
<travisbemann> and having to deal with C macros (for lack of automatic inlining) just feels so fucking painful...
<mrvn> travisbemann: for FB, X, Win, Mac?
<mellum> Huh? C has inlining...
<mrvn> travisbemann: user c++ and templates
<travisbemann> mellum: yes, but when i program in C i still think like i'm programming in assembly language
<mrvn> travisbemann: Thats the point of C
<travisbemann> mrvn: for primarily SDL, but it won't be inherently tied to SDL
<mellum> travisbemann: *shrug* doesn't mean you have to use macros
<mrvn> travisbemann: sdl realy realy sucks remote.
<Smerdyakov> travisbemann, why are you using C?
<travisbemann> because i'm gonna be doing a lotta bitblitting and such
<Smerdyakov> And you can't just write a few C functions and use those from OCaml?
<travisbemann> mrvn: i'm writing a network GUI system - i'm just gonna be using SDL as a local device driver for the server component
<mrvn> travisbemann: is it any good yet?
<travisbemann> (the reason why i'm not joining on with the Fresco or PicoGUI projects is that Fresco is going nowhere, and PicoGUI has some limitations i don't like)
<travisbemann> mrvn: look, i just started it yesterday - heh
<Smerdyakov> travisbemann, it seems like something is wrong if you need to write enough C code to be annoyed by it. OCaml is quite capable of doing almost all that you need to do.
<mrvn> travisbemann: I need something to put up some nice menus for wednesday.
* vegai feels that Fresco has been doing much better than most other vaporwares ;)
<mrvn> Probably just gonna mmap the FB device and dump raw images onto it.
<travisbemann> vegai: heh
<travisbemann> mrvn: the thing is that SDL provides low level device support that i don't wanna hafta rewrite
<mrvn> travisbemann: yeah. ggi too.
<travisbemann> and i might actually use OpenGL for last-minute compositing of multiple pixel buffers
<mrvn> Is the lablgl any good?
<travisbemann> mrvn: yeah, but SDL's far more widespread than GGI
<travisbemann> mrvn: it's okay, but i learned quickly that i couldn't rely on individual opengl implementations
<mrvn> .oO( both just one apt-get install away :)
<travisbemann> i've run into some bugs in individual OpenGL impls, such as NVIDIA's
<travisbemann> and i learned from the PicoGUI people that the performance of glBindTexture absolutely fucking sucks (and for what i've previously written, i've used glBindTexture (GlTex.bind_texture) a lot)
<travisbemann> so basically i've decided to write myself my own renderer from scratch, to tie me to neither SDL nor OpenGL
<mrvn> I have a 3D Mandelbrot program. It generates heightfields which i want to map with a texture and do realtime zoom and rotate via the mouse or keyboard.
<mrvn> I don#t realy want to write my own texture mapper and shaddow calculations for that.
<travisbemann> mrvn: yeah, but i plan on making a while GUI system run on what i'm doing
<mrvn> Do you have an abstraction layer between the application (modell) and the gui (view)?
lus|wazze has quit ["sul °°"]
<travisbemann> well, i'm planning on doing a NeWS type scheme where widgets are little programs that run in virtual machines on the server, and having widgets be specified by the client (because i want clients to not be limited to the widgets that are provided by the server))
<Smerdyakov> travisbemann, what is stopping you from calling the C functions you don't want to rewrite from OCaml?
<travisbemann> Smerdyakov: that's what i'm planning on doing - the only code i will have in C is the low level bitblitting code and some code to interface with some libraries such as freetype
lus|wazze has joined #ocaml
<travisbemann> i totally hate having to code in C myself, but for some things it's necessary, unfortunately
<mellum> Well, for bit fiddling it's certainly more fun than to do it in Ocaml :)
<travisbemann> weell, OCaml wasn't really designed for low level bit fiddling
<mellum> Indeed. I once wrote a function to count the number of bits in an int64. Looking at the assembly made me want to vomit ;)
<travisbemann> of course, that's not to say that i like C at all - i prefer Forth way over C, but unfortunately most machines have less support for Forth than C
<travisbemann> gcc is ubiquitous - Forth compilers are not
<travisbemann> i'm gonna go now, so i'll seeya later
travisbemann has quit ["[BX] Occifer, I'm not as think as you stoned I am!"]
lus|wazze has quit ["sul °°"]
lus|wazze has joined #ocaml