bnoah changed the topic of #ocaml to: OCaml 3.08 "Bastille Day" Release available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
mpc has quit []
mpc has joined #ocaml
mpc has quit []
bnoah has joined #ocaml
<bnoah> :) i'm totally new... so, how can i get the type of * or *. or ** in the toplevel read-eval-print interface?
<bnoah> (*);; and it thinks (as it should) it's a comment...
<bnoah> oh nevermind... ( * );; does it
mrsolo has joined #ocaml
mpc has joined #ocaml
monochrom has joined #ocaml
mpc has quit []
shawn has quit [Read error: 232 (Connection reset by peer)]
mpc has joined #ocaml
cjohnson has quit ["Leaving"]
GreyLensman has quit ["Leaving"]
mpc has quit []
malte has quit [Ping timeout: 14400 seconds]
shawn has joined #ocaml
mpc has joined #ocaml
monochrom has quit ["Don't talk to those who talk to themselves."]
vezenchio has quit ["I thought what I'd do was, I'd pretend to be one of those deaf-mutes"]
mpc has quit []
TheDracle has quit [Remote closed the connection]
malte_ has joined #ocaml
pango has quit ["Client exiting"]
Kinners has joined #ocaml
pattern has quit [Excess Flood]
pattern has joined #ocaml
Kinners has quit [Read error: 232 (Connection reset by peer)]
_fab has joined #ocaml
daapp has joined #ocaml
daapp has left #ocaml []
mrsolo has quit [Read error: 238 (Connection timed out)]
mrsolo has joined #ocaml
rhw has joined #ocaml
mlh has quit [Client Quit]
eugos has joined #ocaml
<vincenz> bnoah: what is all this spam?
<eugos> vincenz, and I decided I was wrong having changed this "standard" topic. Because I see, it's here again.
<vincenz> hmm?
<eugos> vincenz, but this one is really long and... old :)
<eugos> vincenz, is it normal?
* vincenz shrugs
<eugos> vincenz, :-/
<eugos> vincenz, and it's false because the latest version is 3.08.1 to be precise.
<vincenz> yes, but my question is
<vincenz> why did you start talking to me with "and..."
<vincenz> you're confusing me
<vincenz> all I asked is why bnoah was spamming so much
<vincenz> even though that's like 10 hours ago
<eugos> vincenz, yes, but 10 hours ago for me are night hours
<vincenz> me too
<vincenz> I'm just always on
<eugos> vincenz, I know you are not bnoah, I wanted just discuss with you if it was my fault to change this standard topic or not.
* vincenz shrugs
<vincenz> I'm not an op here
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
ita has joined #ocaml
<eugos> vincenz, ok
<ita> hi all - i've found some functions like "let regexp ?(study = true) ?limit" in some code - does the ? have a special meaning ?
<vincenz> ita: it's a named optional parameter
Herrchen has joined #ocaml
Banana changed the topic of #ocaml to: OCaml 3.08.1 available! | | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
Banana changed the topic of #ocaml to: OCaml 3.08.1 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
ita has quit [Read error: 110 (Connection timed out)]
Smerdyakov has quit [Read error: 60 (Operation timed out)]
Smerdyakov has joined #ocaml
claque2000 has joined #ocaml
claque2000 has left #ocaml []
mlh has joined #ocaml
kuribas has joined #ocaml
cjohnson has joined #ocaml
Lemmih_ has joined #ocaml
<kuribas> hi
<kuribas> can camlp4 be used for creating compilers (instead of camlyacc)?
buggs|afk has joined #ocaml
<eugos> kuribas, you mean creating parsers?
<kuribas> eugos: yes
<eugos> kuribas, several ways: camllex+camlyacc, camlp4, Stream, or Scanf at last ;)
<eugos> kuribas, I've used neither camllex+camlyacc, nor camlp4 yet. I've written my XML parser with Stream+Buffer only, like genlex.ml is done in the ocaml distrib
<eugos> kuribas, in simple cases sometimes Scanf is enough
<eugos> kuribas, or Str
<kuribas> eugos: yeah. I was thinking about using it to create a simple programming language
<eugos> kuribas, as for me, it was a good practice to write something "by hand", only on the base of the language itself.
<kuribas> eugos: yes, that's a good exercise!
<kuribas> eugos: I was reading about camlp4, and it looked like it integrated well with the language
<eugos> kuribas, sure
<eugos> kuribas, you can try it, why not
<kuribas> eugos, the grammar system lookes quite nice
<kuribas> eugos, but I am actually newbie to ocaml
<eugos> kuribas, me too :) several months or so
<kuribas> eugos, I quite like it
<eugos> eugos, I like it very much but, unfortunately at my company I have to use Java. It's life
<eugos> kuribas, I like it so that maintain its port under FreeBSD ;)
<kuribas> eugos, wow great.
<kuribas> eugos, you must know the system very well now
<kuribas> eugos: it is great as a replacement for C
<eugos> kuribas, at least I'm trying to do
<kuribas> eugos: Well, it doesn't look so easy to me. Ocaml is bootstrapped, right?
<kuribas> eugos: written in itself...
<kuribas> eugos: do you know which parser ocaml uses for itself?
buggs|afk is now known as buggs
<eugos> kuribas, I don't know
<kuribas> eugos: ok, I'll have to do some digging myself to find out :)
<eugos> kuribas, ;)
kuribas has left #ocaml []
pango has joined #ocaml
<eugos> if i want to hide in_channel implementation in some fo my functions, to work with them only through my own type, is it a good way to do it, say, so:
<eugos> in .ml: type t = { chan : in_channel }
<eugos> in .mli: type t
<eugos> in other words, I don't want to allow access it through the standard functions that use in_channel
<karryall> eugos: sure but type t = in_channel is enough
<eugos> karryall, really? hmm.. but I defined a function "val close : t -> unit" where t = in_channel, and it still allows to use in_channel where 't' must be used :/
<eugos> karryall, sorry, it's probably my fault, forget it
<eugos> karryall, thank you very much
monochrom has joined #ocaml
ipsunny has joined #ocaml
ipsunny has left #ocaml []
bnoah has quit ["Read error 232: Operation timed out"]
mlh has quit [Client Quit]
_fab has quit [Remote closed the connection]
vezenchio has joined #ocaml
Herrchen has quit ["bye"]
srv_ has joined #ocaml
srv has quit [Read error: 232 (Connection reset by peer)]
eugos has quit ["Leaving"]
monochrom has quit ["Don't talk to those who talk to themselves."]
karryall has quit ["tcho"]
mrsolo_ has joined #ocaml
mrsolo has quit [sendak.freenode.net irc.freenode.net]
tnks has quit [sendak.freenode.net irc.freenode.net]
Banana has quit [sendak.freenode.net irc.freenode.net]
beschmi has quit [sendak.freenode.net irc.freenode.net]
Lemmih has quit [sendak.freenode.net irc.freenode.net]
ericc has quit [sendak.freenode.net irc.freenode.net]
lambdawar has quit [sendak.freenode.net irc.freenode.net]
gzl has quit [sendak.freenode.net irc.freenode.net]
CLxyz has quit [sendak.freenode.net irc.freenode.net]
z|away has quit [sendak.freenode.net irc.freenode.net]
mattam has quit [sendak.freenode.net irc.freenode.net]
mrsolo has joined #ocaml
tnks has joined #ocaml
Banana has joined #ocaml
beschmi has joined #ocaml
Lemmih has joined #ocaml
lambdawar has joined #ocaml
mattam has joined #ocaml
CLxyz has joined #ocaml
gzl has joined #ocaml
z|away has joined #ocaml
ericc has joined #ocaml
ericc_ has joined #ocaml
Banana_ has joined #ocaml
mattam_ has joined #ocaml
z|away_ has joined #ocaml
Lemmih__ has joined #ocaml
z|away has quit [Nick collision from services.]
z|away_ is now known as z|away
gzl_ has joined #ocaml
beschmi_ has joined #ocaml
lmbdwar has joined #ocaml
mattam has quit [Connection timed out]
CLxyz has quit [Client Quit]
ericc has quit [Connection timed out]
mrsolo has quit [Connection timed out]
tnks has quit [Connection timed out]
beschmi has quit [Read error: 110 (Connection timed out)]
gzl has quit [Success]
Banana has quit [Read error: 110 (Connection timed out)]
lambdawar has quit [Connection timed out]
Lemmih has quit [Connection timed out]
zigong__ has quit [Remote closed the connection]
zigong_ has joined #ocaml
Lemmih_ is now known as Lemmih
CLxyz has joined #ocaml
zigong_ has quit [Remote closed the connection]
mrsolo_ has quit [Connection timed out]
bk_ has joined #ocaml
TNKS has joined #ocaml
pango has quit ["Leaving"]
Banana_ is now known as Banana
TheDracle has joined #ocaml
TheDracle has quit [Remote closed the connection]
zigong has joined #ocaml
mfurr has joined #ocaml
bk_ has quit ["Leaving IRC - dircproxy 1.1.0"]
<dan2> I don't understand the typing system
<dan2> what makes Digest.t different from a string?
<dan2> hmm
<dan2> or what can make a function require an arbitrary type like Digest.t when Digest.t is just a string
<Smerdyakov> Opaque signature ascription
<mfurr> It's not opaque, it just makes the signature easier to read
<mfurr> it makes it clear what argument is the digest and which is a source string
<dan2> mfurr: ahh, and how do you specify which is the input argument type and the output argument types
<Smerdyakov> OK. I don't know what the signature is in this case. I inferred from what dan2 was saying that he wasn't able to use a string instead.
<dan2> Smerdyakov: no, I can use a string with it
<dan2> Smerdyakov: but I am referring to what makes the type signature specific
<dan2> specific as to Digest.t
TheDracle has joined #ocaml
<mfurr> you mean like "let myfun (x:foo) (y:bar) : rettype = ...
<mfurr> ?
<dan2> yeah
<mfurr> there is no need to specify in your source except for documentation purposes
<TheDracle> mfurr: Won't the autodocumentation thingamajig figure out the type through inferance?
<dan2> mfurr: lets say I want the return type to be foo, is there any other way to do this other than make fun f = ( .. : foo);;
mattam_ is now known as mattam
<dan2> TheDracle: how does that work?
<TheDracle> dan2: I'm not sure, I figured it probably does.
<Smerdyakov> dan2, do you see "rettype" in mfurr's example?
<mfurr> TheDracle: For client code, it won't know which type to use in the gerenal case since they are simply aliases
<TheDracle> dan2: Ocamldoc seems to find the types of expressions that haven't been implicitly defined.
<dan2> Smerdyakov: oh I see now
<TheDracle> Hm.
<Smerdyakov> dan2, but, like he's saying, you should realize that adding that type won't make the slightest difference.
<dan2> Smerdyakov: yes I know
<Smerdyakov> dan2, do you know what 'typedef' is in C?
<dan2> Smerdyakov: its like a little way to make your types shorter and more specific
<dan2> shorter when you declare them
<Smerdyakov> dan2, right. That's all that type equalities in signatures provide in OCaml.
<TheDracle> You mean, "let tstF a:int = a;;" is similar to a typedef in C?
<TheDracle> The a:int?
<dan2> mfurr: how do you use rettype
<dan2> mfurr: that example wasn't clear
<TheDracle> Or are you talking about type someType = Bob of int | Joe of string;;?
<dan2> mfurr: if it were a complete function
<mfurr> dan2: when you specifiy a function you can explicitly specify the types of parameters by (a:foo) and the final ":" gives the return type of the function
<mfurr> without the ()'s
<dan2> mfurr: ahh I see
<mfurr> so type t = int
<mfurr> let f (x:int) (y:int) : t = x + y
<TheDracle> dan2: It's a guideline for the type inference mechanism. It simply tells it that this is what you intend that type to be.
<dan2> TheDracle: ok
monochrom has joined #ocaml
<TheDracle> dan2: For instance let tstVal a = a +. 5.0;; Will be infered as float -> float
<TheDracle> dan2: If you made a mistake, and wanted it instead to be an int, you could say let tstVal a:int = a +. 5.0;; And the inference mechanism will complain.
<TheDracle> dan2: So you know you'll have to use float_of_int on the input value, or change the +. and the 5.0 to + and 5.
<dan2> ok that cleared everything up
<TheDracle> Yeah, I haven't a clue how it's related to typedef in the least.
<Smerdyakov> 'type t = int' is an example of what I was talking about.
<TheDracle> Ah. Okay.
<TheDracle> Yeah, I wouldn't compare them still because typedef is more like a macroing mechanism. type in Ocaml is much much much more sophisticated.
<Smerdyakov> How so?
<TheDracle> Polymorphic, pattern matching.
<Smerdyakov> Without parametric types, it's exactly analagous.
<Smerdyakov> The 'type' keyword is overloaded in OCaml. I'm only talking about its use to introduce type synonyms.
<TheDracle> Right, but then what use is it? You don't even declare shorthand types if you don't want to.
<TheDracle> The inference mechanism would handle it.
<Smerdyakov> It lets you express signatures more compactly and readable. Such a use was what started this conversation.
<TheDracle> Right, but the only time you'd ever use that is if you were explictly defining types. like: type bob = (int*int);; let a:bob = <something>;;
<TheDracle> It's used in the language 'really' for parametric polymorphism, not for shorthand types.
<Smerdyakov> Wrong.
<TheDracle> Well, that's how I use it :p
<Smerdyakov> And I just said why.
<Smerdyakov> It provides no new capabilities for polymorphism.
<TheDracle> It doesn't?
<Smerdyakov> The polymorphic version is not fundamentally different from the monomorphic version, for type synonyms.
<TheDracle> Alright, so type means different things then.
<Smerdyakov> Yes, which I already said.
<TheDracle> Hm, you're right about its usage being similar to typedef then. I still think it served to confuse dan2 more than it served to help him though.
<TheDracle> I just have reservations about comparing ocaml and C :p
<Smerdyakov> I think it just confused you, because you missed the start of the conversation and then started saying confusing things to dan2.
<TheDracle> Right, but at the point I entered I gathered we were talking about let func a:type.
<TheDracle> Which, if you read dan2's comment above he exclaimed that my input had "cleared everything up." So Blah! Hehe :)
Submarine has joined #ocaml
buggs|afk has joined #ocaml
buggs has quit [Nick collision from services.]
buggs|afk is now known as buggs
<TheDracle> Is there any way to map an Ocaml record to some hardware memory range?
<mflux> on unix you could memory map BigArray to /dev/core
<Submarine> TheDracle, you don't want to do that, because OCaml records have a fixed structure
<Submarine> TheDracle, you'd better wrap some C functions for doing peeks and pokes
<Submarine> (what the heck kind of hardware are you talking to?)
<TheDracle> Hm.
<TheDracle> Are the represented in the background like C structs?
<TheDracle> Or Fortran Unions?
<Submarine> they are represented as described in the "interfacing C to Caml" doc
<Submarine> and it's not something you wish to map to hardware
<TheDracle> Hm, I map C structs to hardware all the time.
<TheDracle> It's a contiguous piece of memory. You can name each of your registers along with their type and not care what their precise address is thereafter.
<Submarine> I know C.
<Submarine> Caml just has a more rigid and specific memory model.
<TheDracle> Alright.
<Submarine> That's why you'd probably like peek and poke functions wrapped inside some caml module.
<TheDracle> Yeah.
<TheDracle> Peek and poke is very laborous.
Submarine has quit ["ChatZilla 0.8.31 [Mozilla rv:1.4.1/20031114]"]
TheDracle has quit [Remote closed the connection]
eugos has joined #ocaml
mfurr has quit ["Client exiting"]
eugos has quit ["Leaving"]
budjet has joined #ocaml
<avlondono> hey guys have any of you tried ocaml in windows 64 bits?
monochrom has quit ["Don't talk to those who talk to themselves."]
Lemmih has quit ["Haskell - www.haskell.org"]
budjet has quit [Remote closed the connection]
gzl_ is now known as gzl
kinners has joined #ocaml