Yurik changed the topic of #ocaml to: http://icfpcontest.cse.ogi.edu/ -- OCaml wins | http://www.ocaml.org/ | http://caml.inria.fr/oreilly-book/ | http://icfp2002.cs.brown.edu/ | SWIG now supports OCaml| Early releases of OCamlBDB and OCamlGettext are available
mattam has quit ["leaving"]
Kinners has joined #ocaml
hitachi has joined #ocaml
rox is now known as knop
knop is now known as rox
vegai has quit [sterling.freenode.net irc.freenode.net]
docelic has quit [sterling.freenode.net irc.freenode.net]
pattern_ has quit [sterling.freenode.net irc.freenode.net]
async has quit [sterling.freenode.net irc.freenode.net]
seth_ has quit [sterling.freenode.net irc.freenode.net]
emu has quit [sterling.freenode.net irc.freenode.net]
xtrm has quit [sterling.freenode.net irc.freenode.net]
systems has joined #ocaml
vegai has joined #ocaml
docelic has joined #ocaml
xtrm has joined #ocaml
async has joined #ocaml
seth_ has joined #ocaml
emu has joined #ocaml
pattern_ has joined #ocaml
pattern_ has quit [sterling.freenode.net irc.freenode.net]
async has quit [sterling.freenode.net irc.freenode.net]
vegai has quit [sterling.freenode.net irc.freenode.net]
seth_ has quit [sterling.freenode.net irc.freenode.net]
emu has quit [sterling.freenode.net irc.freenode.net]
xtrm has quit [sterling.freenode.net irc.freenode.net]
docelic has quit [sterling.freenode.net irc.freenode.net]
vegai has joined #ocaml
docelic has joined #ocaml
xtrm has joined #ocaml
async has joined #ocaml
seth_ has joined #ocaml
emu has joined #ocaml
pattern_ has joined #ocaml
lament has joined #ocaml
tmilford_ has joined #ocaml
systems has quit [Remote closed the connection]
asqui has joined #ocaml
Riastrad1 has joined #ocaml
Riastradh has quit [Connection timed out]
tmilford_ has quit [Remote closed the connection]
<seth_> lus|wazze: I was reading your earlier discussion. A purely functional language can be Turing complete, meaning that all programs can be coded. That only speaks to the possibility, of course, not the practicality.
<seth_> Anyone about?
<lus|wazze> um i guess no one was questioning the turing completeness of any programming language in that discussion ... as a non-turing complete pl would be pretty useless
<seth_> lus|wazze: true, I just meant that everything, including a GUI with state, can be coded some way or other.
<seth_> Question for you and/or whoever is listening. I'm having a problem figuring out how to use the Queue data structure.
<seth_> When I create an empty queue, and then try to add to the queue, I get a type error.
<seth_> Queue.create returns an empty queue of type 'a Queue.t. Adding to it gets a type error because whatever you are adding requires a concrete type.
<lus|wazze> actually I think Queue.create returns an '_a Queue.t
<seth_> For example, if I add a string, I get a type error, saying the queue is type 'a Queue.t but the infered type is string Queue.t
<seth_> lus|wazze: well, ocaml shows it is 'a Queue.t, but I don't think that matters here, does it?
<lus|wazze> what exactly statements did you use for creatign the queue and adding elements?
<seth_> lus|wazze: To create the queue:
<Kinners> you can only use one type
<Kinners> are you adding say an integer and then a string?
<seth_> Kinners: yes, I know, but it won't let me use _any_ type.
<seth_> Kinners: no, just strings.
<lus|wazze> # let q = Queue.create ();;
<lus|wazze> val q : '_a Queue.t = <abstr>
<lus|wazze> # Queue.add "hello" q;;
<lus|wazze> - : unit = ()
<lus|wazze> seems to work nicely
<seth_> lus|wazze: I mean in a compiled program.
<lus|wazze> well you probably did it in a way that it could not infer the type of what you were adding
<seth_> lus|wazze: no, if that were the case, it wouldn't correctly state the queue type that I'm using.
<lus|wazze> as i said, Queue.create returns an '_a Queue.t not a 'a Queue.t
<seth_> lus|wazze: I think I see something, though...
<seth_> lus|wazze: Let me check...
<seth_> lus|wazze: I see my mistake. I did let q = Queue.create;; (without the () )
<lus|wazze> well then the type error would have been something like it needing an '_a Queue.t and getting an unit -> '_a Queue.t, which was not what you SAID it was giving you :)
<lus|wazze> so give us the EXACT error message next time :)
<seth_> lus|wazze: I just ran it both ways, and what I said is exactly what it does, indeed, say.
<seth_> lus|wazze: but to see the error, you have to define a function that takes a Queue as an argument.
<seth_> that is, to see _that_ error message.
<lus|wazze> if you do a let q = Queue.create;; and give q as an argument to something expecting a queue (as you apparently have done) it will complain exactly in that way - because q is a function returning a q
<seth_> lus|wazze: correct. Now I understand.
<lus|wazze> if you don't use it in functions taking queues you can't really do anything with q so you wouldn't be getting any error messages at all
<seth_> lus|wazze: no, you can use it in a statement. ocaml lets you write imperative statements.
<lus|wazze> those are still just expressions, and in basically all cases function applications
<lus|wazze> in fact the ONLY thing you can do with a queue is apply a function to it
<lus|wazze> the only datatypes used directly by statements are unit (by all block/loop statements) and bool
<seth_> lus|wazze: no, I have a short test program here where I add things to the queue, and then print them out, and I never apply a function to the queue.
<lus|wazze> how do you do that? I mean, add things to the queue without applying functions to it :)
<lus|wazze> usually you add things to a queue by applying the Queue.add function to it
<seth_> Yes, that's true. What I meant before is that the q is an argument to a function that I define, not an argument to a function in the Queue module. The point being that the error message is different.
<lus|wazze> why should it be? both functions would take 'a Queue.t as its argument
<seth_> lus|wazze: I don't know. I think, however, it is because the function definition (and thus the type inference) occurs before I use the (incorrect) queue object, so I see a different error message. Not important, I was just explaining why I see the message that you said can't occur.
<lus|wazze> then your function definition is wrong which is an entirely different topic
<lus|wazze> anyway I'm off to sleep now in a few minutes
<seth_> no, my function definition is correct. When I fix the error in create(), it works.
<lus|wazze> does your function use q directly?
<seth_> Yes, it adds to the queue and removes entries from the queue.
<lus|wazze> well that explains it
<lus|wazze> when you said function I thought you meant you had written your own function operating on an arbitrary queue
<seth_> Yes, I just didn't explain it well.
<lus|wazze> and the error occurred when calling that function with q as an argument
<lus|wazze> well be that as it may -- I'm off to bed now :)
<lus|wazze> good night
<Kinners> I'm off for now too
Kinners has left #ocaml []
Riastrad1 has quit [Connection timed out]
hitachi has quit [Remote closed the connection]
lament has quit ["Support Darwin Awards! Join the military!"]
xtrm has quit [Remote closed the connection]
xtrm has joined #ocaml
TachYon26 has joined #ocaml
Riastradh has joined #ocaml
TachYon26 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
liyang_ has joined #ocaml
liyang has quit [Read error: 104 (Connection reset by peer)]
liyang_ has quit [sterling.freenode.net irc.freenode.net]
pattern_ has quit [sterling.freenode.net irc.freenode.net]
async has quit [sterling.freenode.net irc.freenode.net]
vegai has quit [sterling.freenode.net irc.freenode.net]
seth_ has quit [sterling.freenode.net irc.freenode.net]
emu has quit [sterling.freenode.net irc.freenode.net]
docelic has quit [sterling.freenode.net irc.freenode.net]
liyang_ has joined #ocaml
vegai has joined #ocaml
docelic has joined #ocaml
async has joined #ocaml
seth_ has joined #ocaml
emu has joined #ocaml
pattern_ has joined #ocaml
asqui has quit [Excess Flood]
asqui has joined #ocaml
TachYon26 has joined #ocaml
TachYon26 has quit [Remote closed the connection]
mattam has joined #ocaml
TachYon26 has joined #ocaml
whee has quit [Read error: 110 (Connection timed out)]
gene9 has joined #ocaml
<Yurik> gene9: hi
<gene9> Yurik: hi-hi
asqui has quit [Read error: 104 (Connection reset by peer)]
asquii has joined #ocaml
asquii is now known as asqui
hitachi has joined #ocaml
whee has joined #ocaml
gene9 has quit []
vegai has quit [Read error: 104 (Connection reset by peer)]
vegai has joined #ocaml
hitachi has quit [Remote closed the connection]
TachYon26 has quit [Remote closed the connection]
lus|wazze has joined #ocaml
__DL__ has joined #ocaml
<gl> wow, 26.
<gl> 27
<gl> impressive
<vegai> soon, the world
<__DL__> what is impressive is the traffic :)
Riastrad1 has joined #ocaml
Riastradh has quit [Read error: 60 (Operation timed out)]
xtrm has quit ["prout"]
<emu> sc
<__DL__> what does sc mean ?
systems has joined #ocaml
systems has quit [Read error: 60 (Operation timed out)]
__DL__ has quit ["Bye Bye"]
__DL__ has joined #ocaml
__DL__ has quit ["Bye Bye"]
__DL__ has joined #ocaml
Riastradh has joined #ocaml
_DL_ has joined #ocaml
async has quit [sterling.freenode.net irc.freenode.net]
liyang_ has quit [sterling.freenode.net irc.freenode.net]
pattern_ has quit [sterling.freenode.net irc.freenode.net]
seth_ has quit [sterling.freenode.net irc.freenode.net]
emu has quit [sterling.freenode.net irc.freenode.net]
docelic has quit [sterling.freenode.net irc.freenode.net]
Riastradh has quit [sterling.freenode.net irc.freenode.net]
__DL__ has quit [sterling.freenode.net irc.freenode.net]
lus|wazze has quit [sterling.freenode.net irc.freenode.net]
whee has quit [sterling.freenode.net irc.freenode.net]
Yurik has quit [sterling.freenode.net irc.freenode.net]
polin8 has quit [sterling.freenode.net irc.freenode.net]
lam has quit [sterling.freenode.net irc.freenode.net]
iusris_ has quit [sterling.freenode.net irc.freenode.net]
Riastrad1 has quit [sterling.freenode.net irc.freenode.net]
vegai has quit [sterling.freenode.net irc.freenode.net]
mattam has quit [sterling.freenode.net irc.freenode.net]
mellum has quit [sterling.freenode.net irc.freenode.net]
Smerdyakov has quit [sterling.freenode.net irc.freenode.net]
smkl has quit [sterling.freenode.net irc.freenode.net]
Zadeh has quit [sterling.freenode.net irc.freenode.net]
rox has quit [sterling.freenode.net irc.freenode.net]
cm has quit [sterling.freenode.net irc.freenode.net]
gl has quit [sterling.freenode.net irc.freenode.net]
skylan has quit [sterling.freenode.net irc.freenode.net]
Riastradh has joined #ocaml
lus|wazze has joined #ocaml
whee has joined #ocaml
pattern_ has joined #ocaml
emu has joined #ocaml
seth_ has joined #ocaml
async has joined #ocaml
docelic has joined #ocaml
liyang_ has joined #ocaml
Yurik has joined #ocaml
polin8 has joined #ocaml
lam has joined #ocaml
iusris_ has joined #ocaml
asqui has quit [Excess Flood]
asqui has joined #ocaml
Riastrad1 has joined #ocaml
vegai has joined #ocaml
mattam has joined #ocaml
mellum has joined #ocaml
Smerdyakov has joined #ocaml
smkl has joined #ocaml
Zadeh has joined #ocaml
skylan has joined #ocaml
gl has joined #ocaml
cm has joined #ocaml
rox has joined #ocaml
Riastrad2 has joined #ocaml
Riastradh has quit [Killed (NickServ (Ghost: Riastrad2!~riastradh@pool-141-154-218-149.bos.east.verizon.net))]
Riastrad2 is now known as Riastradh
Riastrad1 has quit [Connection timed out]
rox has quit ["Client Exiting"]
rox has joined #ocaml
Riastrad1 has joined #ocaml
Riastrad2 has joined #ocaml
Riastradh has quit [Connection timed out]
Riastrad2 is now known as Riastradh
Riastrad1 has quit [Connection timed out]
foxster has joined #ocaml
Yurik_ has joined #ocaml
Vincenz has joined #ocaml
Yurik has quit [Read error: 113 (No route to host)]
* _DL_ is away: Buzy
karryall has joined #ocaml
Riastradh has quit [Killed (NickServ (Ghost: _Riastradh!~riastradh@pool-151-203-240-10.bos.east.verizon.net))]
Riastradh has joined #ocaml
TachYon has joined #ocaml
_DL_ has quit [Remote closed the connection]
Riastradh has quit [Killed (NickServ (Ghost: _Riastradh!~riastradh@pool-151-203-203-16.bos.east.verizon.net))]
Riastradh has joined #ocaml
lus|wazze has joined #ocaml
TachYon has quit ["Client Exiting"]
Vincenz has quit []
foxster has quit [Read error: 113 (No route to host)]
systems has joined #ocaml
Riastrad1 has joined #ocaml
Riastradh has quit [Connection timed out]
Riastrad1 is now known as Riastradh
systems has left #ocaml []
_Riastradh has joined #ocaml