systems changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn , A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ , A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list
<Dybbuk> Lemmih: Are you sure? It's not defined.
<Dybbuk> # x.(1) <- 2. :> int ;;
<Dybbuk> Syntax error
<Lemmih> # class virtual test =
<Lemmih> object
<Lemmih> method virtual print : unit
<Lemmih> end;;
<Lemmih> class virtual test : object method virtual print : unit end
<Lemmih> # class test2 =
<Lemmih> object
<Lemmih> inherit test
<Lemmih> method print = print_endline "Yo"
<Lemmih> end;;
<Lemmih> class test2 : object method print : unit end
<Lemmih> # let n = new test2;;
<Lemmih> val n : test2 = <obj>
<Lemmih> # let wg = (n :> test)::[];;
<Lemmih> val wg : test list = [<obj>]
<Lemmih> Sorry. Shouldn't have pasted so much code.
<JPL-Justin-away> no it's great :)
<Dybbuk> Let me give that a try. Funky.
* Dybbuk has to admit he's rather OO deficient.
<Dybbuk> Can't stand the stuff. :)
<Dybbuk> OOP gives me hives.
huhnl has joined #ocaml
huhnl has quit ["leaving"]
<Lemmih> Hmm I'm still stuck.
bk_ has quit ["I'll be back"]
<Smerdyakov> What's the problem?
<Lemmih> This doesn't work:
<Lemmih> val mutable wg = None
<Lemmih> method insert w = wg <- Some (w :> widget)
<Lemmih> I get this error: "The method insert has type #widget -> unit where .. is unbound"
<Smerdyakov> Couldn't hurt to specify the type f wg manually.
ashanks has joined #ocaml
<Smerdyakov> of wg..
<Smerdyakov> I think you might not be able to have a mutabel field with a type that is an abstract superclass, though.
<Smerdyakov> It's well-known that nontrivial subtyping and mutable cells don't mix.
<ashanks> Hello, Smerdyakov.
<Lemmih> Then what do I do?
<Smerdyakov> Lemmih, did you try changing the line to val mutable wg : widget option = None
<Lemmih> OCaml did detect the right type but I'm gonna try anyway.
<Lemmih> No change.
<Smerdyakov> Which version of OCaml are you using?
<Lemmih> The Objective Caml compiler, version 3.06
<Smerdyakov> OK. 3.07 gives a better error message.
<Smerdyakov> The method save has type (#wonko as 'a) -> unit where 'a is unbound
<Smerdyakov> The problem is that the :> operation is impossible without exact type information.
<Smerdyakov> So, the function you want is impossible.
<Smerdyakov> The problem is easy to fix: Require that a widget be passed, and perform the :> at the caller where needed.
<Lemmih> Hmm
tautologico has joined #ocaml
m[kel[ has joined #ocaml
evil-eddie has joined #ocaml
smklsmkl has quit [Read error: 110 (Connection timed out)]
noss has quit ["hej då"]
plzstopit has joined #ocaml
<plzstopit> !list
<Riastradh> This isn't a warez channel, dork.
Vekza has quit [orwell.freenode.net irc.freenode.net]
<plzstopit> Where can I find resident evil ebooks?
<Riastradh> Do you know what OCaml is?
plzstopit has quit [Read error: 113 (No route to host)]
Vekza has joined #ocaml
cjohnson has quit ["Drawn beyond the lines of reason"]
mfurr has joined #ocaml
smklsmkl has joined #ocaml
m[kel[ has quit [Read error: 110 (Connection timed out)]
tautologico has quit ["F(YF) = YF"]
ashanks has quit [Client Quit]
Vekza has quit ["Leaving"]
monotonom has joined #ocaml
m[kel[ has joined #ocaml
smklsmkl has quit [Read error: 110 (Connection timed out)]
m[kel[ has quit [Connection timed out]
m[kel[ has joined #ocaml
Meta has joined #ocaml
smklsmkl has joined #ocaml
m[kel[ has quit [Read error: 110 (Connection timed out)]
Meta_ has quit [Read error: 110 (Connection timed out)]
Meta_ has joined #ocaml
Meta has quit [Read error: 110 (Connection timed out)]
mfurr has quit ["zzZZzz"]
Dybbuk has quit [Remote closed the connection]
m[kel[ has joined #ocaml
smklsmkl has quit [Read error: 110 (Connection timed out)]
smklsmkl has joined #ocaml
m[kel[ has quit [Connection timed out]
mkennedy has joined #ocaml
drWorm has quit [Read error: 54 (Connection reset by peer)]
drWorm_ has joined #ocaml
_jpl_ has quit [Read error: 60 (Operation timed out)]
m[kel[ has joined #ocaml
smklsmkl has quit [Read error: 110 (Connection timed out)]
monotonom has quit ["Don't talk to those who talk to themselves."]
shawn_ has quit [Read error: 104 (Connection reset by peer)]
__DL__ has joined #ocaml
__DL__ has quit ["Bye Bye"]
vezenchio has quit ["--- reality is that which, when you stop believing in it, doesn't go away ---"]
smklsmkl has joined #ocaml
<JPL-Justin-away> hey smklsmkl
m[kel[ has quit [Read error: 110 (Connection timed out)]
m[kel[ has joined #ocaml
m[kel[ is now known as smkl
mads- has joined #ocaml
smklsmkl has quit [Read error: 110 (Connection timed out)]
shawn has joined #ocaml
smkl has quit [Read error: 60 (Operation timed out)]
Shammah has joined #ocaml
smkl has joined #ocaml
SpookRijder has joined #ocaml
mattam_ has joined #ocaml
bk_ has joined #ocaml
Demitar has quit [orwell.freenode.net irc.freenode.net]
mattam has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
cjohnson has joined #ocaml
cjohnson has quit [Client Quit]
cjohnson has joined #ocaml
noss has joined #ocaml
bk_ has quit ["I'll be back"]
bk_ has joined #ocaml
mattam_ is now known as mattam
malte has joined #ocaml
<malte> hm, being a total newbie to ocaml I cant find the error in this (first) little program I've done: d.unix.se/stuf/file.ml
<malte> it claims that ;; is a syntax error :/
<malte> it's supposed to copy a file to another file.. erhm
<gl> let ic = ... and oc = ... in let foo offset_foo = ... in foo 1024;;
<malte> oh
<gl> in foo's definition you don't say what 'offset' is
<gl> let len = input ic buf start offset in
<gl> i suggest you to do : let foo offset_foo ic oc = ...;;
smkl has quit [Read error: 60 (Operation timed out)]
<gl> then let ic = ... and oc = ... in foo 1024 ic oc;;
<malte> ah, yes i accidently renamed it to offset_foo :)
<malte> ok, looks better
<malte> hm, i get "Fatal error: exception Invalid_argument("input")" when running it
<malte> gl, if you have time, do you see why input complains?
smkl has joined #ocaml
SpookRijder has quit ["ni!"]
smkl has quit [Read error: 110 (Connection timed out)]
smkl has joined #ocaml
<malte> is the development of cameleon discontinued?
cjohnson has quit ["Drawn beyond the lines of reason"]
Shammah has quit ["ChatZilla 0.9.35 [Mozilla rv:1.5/20030925]"]
shawn has quit [Read error: 104 (Connection reset by peer)]
shawn has joined #ocaml
Godeke has quit ["Leaving"]
smkl has quit [Read error: 60 (Operation timed out)]
smkl has joined #ocaml
Tram has joined #ocaml
<Tram> hello, I'm quite a newbie to caml, and completly to sockets
<Tram> I want to make a program to handle winpopups
avlondono has joined #ocaml
Godeke has joined #ocaml
<Smerdyakov> Tram, are you expecting a response from the channel?
<Tram> Smerdyakov: well, I was just wondering if someone could tell me where I could get more docs
<Tram> (I just noticed that the things that I wrote aren't very clear)
<Smerdyakov> You mean more words than http://caml.inria.fr/ocaml/htmlman/index.html ?
<Smerdyakov> s/more words/more docs
<Tram> well, the doc about the sockets only speaks about how to communicate between a server and a client
<Tram> what I need, is how just to listen on a port. The is no server/client
<Smerdyakov> Which docs about sockets were you reading?
<Tram> I have the printed book of the first link
<Smerdyakov> You should always check the actual manual before concluding that docs on an issue are "hard to find"....
<Tram> no, I have all the docs
<bk_> http://cristal.inria.fr/~remy/poly/system/camlunix/comm2.html this has good examples about using sockets in ocaml, its in french tho
<Tram> Smerdyakov: I still to new to sockets to be able to understand the manual
<Smerdyakov> Tram, have you ever written a socket-using program in another language?
<Tram> Smerdyakov: no :p
<Tram> do you think it would be easier to learn in another language?
<Smerdyakov> No, but most developers are already familiar with the standard (C-based) BSD sockets API, so the docs will reflect that.
<Tram> bk_: I think the link you gave has what I needed. thankyou
<Smerdyakov> Perhaps try this: http://www.ecst.csuchico.edu/~beej/guide/net/
<Tram> Smerdyakov: that's why I was looking for some help
<bk_> tbh before going for sockets you should perhaps try to re-create something in ocaml that you're already familiar with
<Tram> bk_: I didn't think sockets would be so complicated
<Smerdyakov> They _aren't_ complicated.
<Tram> well, for my needs a little bit as the program isn't connected to any server, it just gets the pops on port 138 :/
<Smerdyakov> What is the complexity?
<Tram> to understand the doc ;) The manual explains very well how to make to programs communicate one to eachother
<Tram> but there is no server/client relation...
smklsmkl has joined #ocaml
smkl has quit [Read error: 110 (Connection timed out)]
<Tram> I think I'll do something easier first ;)
<bk_> heh :>
<Smerdyakov> Oh. A library can't do that for you.
<Tram> sure
<Smerdyakov> You have to make up your own stream-based protocol.
Godeke has quit ["Leaving"]
Dybbuk has joined #ocaml
smklsmkl has quit [Read error: 110 (Connection timed out)]
smklsmkl has joined #ocaml
smklsmkl has quit [Read error: 110 (Connection timed out)]
smklsmkl has joined #ocaml
cjohnson has joined #ocaml
vezenchio has joined #ocaml
LordBrain has joined #ocaml
maihem has joined #ocaml
_JusSx_ has joined #ocaml
LordBrain has quit ["Leaving"]
smklsmkl has quit [Read error: 60 (Operation timed out)]
smklsmkl has joined #ocaml
smklsmkl has quit [Read error: 60 (Operation timed out)]
mkennedy` has joined #ocaml
smklsmkl has joined #ocaml
smklsmkl has quit [Read error: 60 (Operation timed out)]
smklsmkl has joined #ocaml
monotonom has joined #ocaml
<Dybbuk> Interesting discussion regarding build systems on the mailing list.
<Dybbuk> and packaging.
* Dybbuk hopes OCaml gets something cool along those lines.
smklsmkl has quit [Read error: 110 (Connection timed out)]
smklsmkl has joined #ocaml
<Demitar> Oh? I guess I should go read up and see if I should toss in a few suggestions.
<Demitar> Dybbuk, what thread?
bk_ has quit ["I'll be back"]
<Dybbuk> Demitar: Uh...the one with GODI in the subject line.
<Dybbuk> Demitar: Sorry, I already nuked the thread or I'd be able to give you something better than that.
<JPL-Justin-away> hey guys
<Dybbuk> Hey there, rocket boy. :)
<JPL-Justin-away> Greetings
<JPL-Justin-away> So do you know anything about getting OCAML to integrate with Java?
<JPL-Justin-away> Something for ocaml that was like jython would make my year
<JPL-Justin-away> ocaml that can compile to jvm, and access java libraries etc, i think I'd about die
White_FrosT has joined #ocaml
White_FrosT has left #ocaml []
<malte> JPL-Justin-away, implement it :)
smklsmkl has quit [Read error: 110 (Connection timed out)]
smklsmkl has joined #ocaml
<malte> that would be pretty cool.. speaking of java, has anyone tested F#?
<JPL-Justin-away> Yeah I don't have time to implement it, however I see some notes on how to do it.
<JPL-Justin-away> Hmm...
<JPL-Justin-away> I'd test it if mono works well on the mac :(
<JPL-Justin-away> mono has a LONG way to go before it can be used for anything that's like mission-critical, so I"m stuck with JVM
<malte> :/
<drWorm_> nemerle.org is an interesting functional language for mono/.net, although i think it's ugly compared to ocaml
<malte> what are you developing JPL-Justin-away?
JPL-Justin-away is now known as JPL-Justin
<JPL-Justin> next generation scientific analysis and planning software for the next few mars missions
<malte> wow! uhm, you're serious, right? :)
<Riastradh> JPL-Justin, there are Scheme implementations that tie in very nicely with Java...
<JPL-Justin> uh, no thanks :)
<JPL-Justin> Not that I dislike scheme, it's just I"m a typesafe kinda guy
<JPL-Justin> and I don't like writing parse trees :)
<JPL-Justin> I am a true believer that every language will continue to evolve until it's as much like LISP as possible, that seems to be the general trend
<Smerdyakov> You think ML will "evolve" until it's as much like LISP as possible?
<JPL-Justin> I'm just wayyyyyy on the ML side of functional programming. I'm not big on things like lisp or haskell, because I really like ML's design philosophy, however I think that haskel, lisp/scheme etc all have their merits
<JPL-Justin> I think it's pretty close already
<JPL-Justin> anyways I"m using it a loose sense
<JPL-Justin> languages seem to be heading away from C and more towards LISP type abilities
<JPL-Justin> in general... it's more and more common now adays to see anonymous first calss functions, and even immutable data structures than it was back in the day... and a lot of languages are starting to use self-modifying code
<JPL-Justin> etc
<JPL-Justin> I don't really see OCAML going dynamically typed though so... there's a good chance that line will be held
<monotonom> In terms of defining anonymous functions and using them, ML and Scheme are an improvement over Lisp. It would be sad if this progress were reversed so that calling a named function had a different syntax from calling an anonymous one.
<JPL-Justin> Very true
<JPL-Justin> I guess I'm not talking about syntax
<JPL-Justin> I'm talking about functionality.
<Dybbuk> JPL-Justin: People listen to you a lot more when you mention that Mars thing, huh? :)
<Riastradh> monotonom, Scheme _is_ a Lisp.
avlondono has quit [""Today is friday! and the weather is great in NYC ...""]
<JPL-Justin> ha sometimes... but I'm not a computer language expert
<Dybbuk> Heheh. :)
<JPL-Justin> I do software engineering not programming language design.
<JPL-Justin> Although I am working on a dataflow based programming langage written in OCAML.
<JPL-Justin> If you'd like a look, I can email to you, I'm going to put it up LGPL on sourceforge sometime soon once I get lexer/parser working.
<monotonom> Many Lisp features are good, and many language designers are learning from it, I agree.
<JPL-Justin> It's interpreted, meant to be based around nonlinear iterative partial execution.
<JPL-Justin> monotonom: yes that's basically what I'm saying... a lot of languages come up with "new" features that ancient LISP guys just kinda chuckle at
<JPL-Justin> Heck look at Gosling's Jackpot
<JPL-Justin> I mean, it's totally going towards LISP, it's even got the damn parse tree programming.
* Dybbuk isn't ancient, but still manages to chuckle.
* monotonom always chuckles
* JPL-Justin wonders what the next *NEW* language feature will be
* JPL-Justin also wonders if declarative languages will be put to good use in GUI design
<Smerdyakov> I think they already are....
<JPL-Justin> I'm actually very interested in that, if you can send me some links that'd be most appreciative
<JPL-Justin> *appreciated.
<JPL-Justin> :)
<Smerdyakov> I can't. :-)
<JPL-Justin> Seriously one of my collegues does 3D graphics work (you've probably seen some of his stuff) and he's looking at using something lke that for aGUI
<JPL-Justin> do you have any names or somethihng
<JPL-Justin> something I could google other than declarative GUI
<JPL-Justin> I see FranTK
<Smerdyakov> No
<JPL-Justin> which is for haskell
<JPL-Justin> Meta-GUI... hmmm...
<JPL-Justin> So, Smerdyakov, have you ever used Mercury?
<Smerdyakov> No
mkennedy` has quit ["ERC Version 4.0 $Revision: 1.648 $ (IRC client for Emacs)"]
<JPL-Justin> I'm trying to think if it's worth learning
smklsmkl has quit [Read error: 110 (Connection timed out)]
smklsmkl has joined #ocaml
Demitar has quit [Read error: 104 (Connection reset by peer)]
Demitar has joined #ocaml
teratorn has quit [orwell.freenode.net irc.freenode.net]
shawn has quit [orwell.freenode.net irc.freenode.net]
shawn has joined #ocaml
teratorn has joined #ocaml
mkennedy has quit ["ERC Version 4.0 $Revision: 1.648 $ (IRC client for Emacs)"]
m[kel[ has joined #ocaml
smklsmkl has quit [Read error: 110 (Connection timed out)]
monotonom has quit ["Don't talk to those who talk to themselves."]
_JusSx_ has quit ["BitchX: double your pleasure, double your fun!"]
m[kel[ is now known as smkl
<Dybbuk> Testing.
<Dybbuk> Howdy?
<Dybbuk> Wooo!
<mads-> See you
<mads-> Dybbuk
<Dybbuk> Well, that's about to change...network is getting reconfigured here. :)