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
hdaume has quit ["it complains that the last statement in a do construct must be an expression in that form"]
asqui has quit [forward.freenode.net irc.freenode.net]
lam has quit [forward.freenode.net irc.freenode.net]
xtrm has quit [forward.freenode.net irc.freenode.net]
whee has quit [forward.freenode.net irc.freenode.net]
asqui has joined #ocaml
lam has joined #ocaml
xtrm has joined #ocaml
whee has joined #ocaml
asqui has quit [Excess Flood]
asqui has joined #ocaml
<matkor> $ cat mymod.mli
<matkor> val t:string
<matkor> $ cat mymod.ml
<matkor> let t = "hellou modules.\n"
<matkor> How can I acces MyMod.t from file t.ml ?
matkor has quit [Remote closed the connection]
lament has quit ["mental mantle"]
j_bravo has quit ["Trillian (http://www.ceruleanstudios.com)"]
mattam_ has quit ["leaving"]
lament has joined #ocaml
Kinners has joined #ocaml
lament has quit ["TTT"]
Kinners has quit ["leaving"]
j_bravo has joined #ocaml
j_bravo has quit [Read error: 104 (Connection reset by peer)]
Kinners has joined #ocaml
asqui has quit [forward.freenode.net irc.freenode.net]
whee has quit [forward.freenode.net irc.freenode.net]
lam has quit [forward.freenode.net irc.freenode.net]
xtrm has quit [forward.freenode.net irc.freenode.net]
asqui has joined #ocaml
lam has joined #ocaml
xtrm has joined #ocaml
whee has joined #ocaml
asqui has quit [Excess Flood]
asqui has joined #ocaml
Guest has joined #ocaml
<Guest> im sorry to bother you all but someone was telling me something about www.bytekill.net and i cannot figure out how to register?
Guest has left #ocaml []
Kinners has quit ["leaving"]
mattam has joined #ocaml
docelic has quit ["ok work is waiting"]
lament has joined #ocaml
* thierry is back (gone 13:54:58)
<thierry> yo there
thierry is now known as thierry_rdv
docelic has joined #ocaml
docelic has quit ["Client Exiting"]
karryall has joined #ocaml
docelic has joined #ocaml
thierry_rdv is now known as thierry
Kinners has joined #ocaml
karryall has quit [forward.freenode.net irc.freenode.net]
karryall has joined #ocaml
TachYon25 has joined #ocaml
gl has joined #ocaml
skylan has quit [Read error: 104 (Connection reset by peer)]
skylan has joined #ocaml
mattam_ has joined #ocaml
docelic has quit ["l8r ppl"]
lament has quit ["mental mantle"]
mattam has quit [Read error: 110 (Connection timed out)]
Kinners has quit [Remote closed the connection]
Kinners has joined #ocaml
<thierry> is ocaml handling "delegation" natively ?
<whee> telegation?
<whee> s/^t/d/
<thierry> yep
<whee> you're going to have to explain that one
<whee> heh
<thierry> ok
<whee> wait, I know what it is
<whee> it's where you have OO objects that require delegates to pass decisions to, right?
<thierry> yes that is, if attribute or method is not found in the message receiver object
<thierry> automatically (o explicitly), the message is sent to object's parents
<whee> it'll automatically go up the inheritence chain, but I'm not sure if it has delegation like that
<thierry> delegation is diff of inheritance
<whee> yeah, I remember playing with things like that when I was doing objective-c work
<whee> I don't think ocaml has it
<thierry> delegation means that an object O1 has a pointer reference of another class inside O2 called parent
<thierry> may be it will be great to develop a new type to handle delegation ;)
<whee> I never really use objects in ocaml, so I don't know how easy it would be heh
<whee> I don't know if you really need it, though
<whee> could you do essentially the same thing with a functor and an object declaration?
<thierry> right now i dunno.. i'm planning the porting of my python apps to ocaml
<thierry> so, i often used pseudo-delegation mechanism in python..
<whee> http://caml.inria.fr/oreilly-book/html/index.html this is usually a good read, the later chapters cover modules and OO
<whee> there may be a better way to handle what you're doing
<thierry> ok. thanks.
<whee> I wouldn't try a direct port from python to any functional language, though
<whee> there's probably better ways to represent a lot of things
<thierry> i think so..
<whee> I haven't used any languages other than ocaml (and now haskell) in my free time for the past year or so so I can't really be sure :)
<thierry> one month ago I've begun to study OCaml
gl has quit [Remote closed the connection]
<thierry> and I chose this one between, haskell, Erlang, ...
<whee> I found that learning haskell has improved my ocaml work quite a bit, as you're forced to do things functionally in haskell
<whee> I'd go and learn them all :)
<whee> I haven't looked at erlang, yet
<thierry> best erlang avantage is the "hot code upgrade"
<whee> yeah I'd imagine erlang is better suited for industry, since it actually is used extensively in at least one
<thierry> yep.. but i'm sure that ocaml can do the same thing and can have a "life" outside research laboratories
<whee> ocaml just needs more support libraries
<thierry> yep.. I convinced my company to let down python and develop more w/ ocaml
<whee> the hardest part with that is the learning curve
<whee> you could technically port line by line, but that's never optimal
Kinners has quit ["zzzzz"]
<thierry> I dont think we could port line by line
<thierry> the porting should be done on the whole application
<thierry> the main problem is we have always used a "already-done" middleware
<thierry> and w/ ocaml the middleware doesnt exist.. afaik
<whee> like?
<thierry> we are using Zope
xmkl has quit [Remote closed the connection]
smklsmkl has joined #ocaml
Torquemada has quit [Read error: 104 (Connection reset by peer)]
Torquemada has joined #ocaml
gl has joined #ocaml
exa-away is now known as exa
skylan has quit [Read error: 104 (Connection reset by peer)]
skylan has joined #ocaml
docelic has joined #ocaml
skylan has quit [Read error: 104 (Connection reset by peer)]
skylan has joined #ocaml
thierry has quit [Read error: 104 (Connection reset by peer)]
Dalroth has joined #ocaml
thierry has joined #ocaml
greg_ has joined #ocaml
<greg_> i get this error when configuring:
<greg_> The "labltk" library: not found
<greg_> what is that labltk?
<exa> blackstar:exa$ apt-cache search labltk
<exa> liblablgl-ocaml - Runtime libraries for lablgl.
<exa> liblablgl-ocaml-dev - an OpenGL interface for Objective Caml.
TachYon25 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
docelic is now known as docelic|pimping
karryall has quit []
thierry is now known as thierry_afk
thierry_afk has quit [forward.freenode.net irc.freenode.net]
skylan has quit [forward.freenode.net irc.freenode.net]
Torquemada has quit [forward.freenode.net irc.freenode.net]
smklsmkl has quit [forward.freenode.net irc.freenode.net]
asqui has quit [forward.freenode.net irc.freenode.net]
whee has quit [forward.freenode.net irc.freenode.net]
lam has quit [forward.freenode.net irc.freenode.net]
xtrm has quit [forward.freenode.net irc.freenode.net]
Dalroth has quit [forward.freenode.net irc.freenode.net]
greg_ has quit [forward.freenode.net irc.freenode.net]
merriam has quit [forward.freenode.net irc.freenode.net]
docelic|pimping has quit [forward.freenode.net irc.freenode.net]
exa has quit [forward.freenode.net irc.freenode.net]
kev has quit [forward.freenode.net irc.freenode.net]
polin8 has quit [forward.freenode.net irc.freenode.net]
mattam_ has quit [forward.freenode.net irc.freenode.net]
gl has quit [forward.freenode.net irc.freenode.net]
Segora has quit [forward.freenode.net irc.freenode.net]
emu has quit [forward.freenode.net irc.freenode.net]
greg_ has joined #ocaml
thierry_afk has joined #ocaml
Dalroth has joined #ocaml
skylan has joined #ocaml
docelic|pimping has joined #ocaml
gl has joined #ocaml
Torquemada has joined #ocaml
smklsmkl has joined #ocaml
mattam_ has joined #ocaml
asqui has joined #ocaml
whee has joined #ocaml
xtrm has joined #ocaml
lam has joined #ocaml
exa has joined #ocaml
kev has joined #ocaml
polin8 has joined #ocaml
merriam has joined #ocaml
emu has joined #ocaml
Segora has joined #ocaml
<exa> val getgid : unit -> int
<Segora> exa: .. ?
<exa> I was meditating
<exa> This language is a little different than haskell admittedly
<exa> Compared to haskell, what do you really think are the pros/cons of ocaml?
<thierry_afk> exa: native compiler...
docelic|pimping is now known as docelic
<exa> thierry_afk: pl feature-wise?
<exa> thierry_afk: I can think of the high level module system (functors), and class-based object system which separates subtyping from inheritance
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
<exa> How do I print out a list? Is there a generic way like in Haskell?
<exa> Like print-whatever-function (show list)
docelic is now known as docelic|sleepo
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
j_bravo has joined #ocaml
j_bravo has left #ocaml []
<exa> any imperative-gurus here?
<exa> isn't there an equivalent of "do" construct in haskell?
<exa> i have to use nested "let" constructs instead?
Hellfried has joined #ocaml
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
Dalroth has quit []
exa is now known as exa-away
jkozak has joined #ocaml
jkozak has left #ocaml []
sam_ has joined #ocaml
Hellfried has quit ["http://chat.ircnet.org/ (EOF)"]
Dybbuk has joined #ocaml
<sam_> hmm.. does the standard library have a function for binary output/input of a float ? That is, other than input/output_value ?
<whee> scanf?
<Dybbuk> Howdy guys.
<sam_> scanf does not do binary
<whee> no idea then :|
<sam_> guess i just need to code my own.. easy enough, but i just find it really annoying that the standard library is missing such 'elemental' stuff
<whee> the standard library is a bit lacking in some places, I agree
<Dybbuk> whee: What do you mean by "binary"?
<Dybbuk> whee: You can marshall and un-marshall floats.
<whee> wrong person :)
<Dybbuk> Er, whomever. :)
<whee> I believe input_value does deal with marshalled values
<whee> I could be entirely wrong, though. it just seems like that's the easy way to do it
<sam_> Dybbuk: binary representation.. yes, you can use marshaller to input/output binary floats, but the problem is the marshaller is not type safe
<Dybbuk> sam_: Whose binary representation?
<sam_> Dybbuk: a binary representation of a float
<Dybbuk> I didn't realize there was only one.
<sam_> so yes, you can use the marshaler to do it (or input/output_value that interface the marshaler).. and you can only have your application core dump if reading in corrupted data.. unfortunately the second case isn't acceptable for real life applications
<Dybbuk> sam_: Right, but binary representations are usually architecture-specific.
<Dybbuk> And even then, if you're reading from another piece of hardware, it might be completely different.
<sam_> dybbuk, oh, sure, there are many binary representations of course.. but i don't really case which, as long as i can input and output in using whichever representation
<Dybbuk> Usually if you can figure out the representation, you just write your own converter. It is a pain in the ass, though.
<Dybbuk> What kind of data source are you reading from?
<sam_> dybbuk, yes.. as said above, writing one would be easy, but such an elemental thing should be in the standard library
<Dybbuk> Except it's tough to put in the standard library when there's no real standard way to do it.
<whee> but isnt it?
<sam_> forget it.. i got the point clear: the standard library does not have one. so i'll write my own
<whee> there's no way to ensure type safety
<sam_> dybbuk, there _are_ standard ways to do it.. e.g. IEEE presentations.. it's done all the time in other languages
<sam_> whee, there _are_ ways to ensure type safety
<whee> apparently not what you require, as ocaml will most likely die if you request a float to be read and you don't get one
<sam_> whee, sure there is
<Dybbuk> sam_: Ah, found it.
<Dybbuk> sam_: Check the Int64 module.
<Dybbuk> val bits_of_float : float -> int64
<Dybbuk> val float_of_bits : int64 -> float
<Dybbuk> Converts IEEE format.
<Dybbuk> Or at least 'the IEEE 754 floating-point ``double format'' bit layout'
<sam_> dybbuk, yes, i know it's there, but that was not the point
<Dybbuk> But the code might give you someplace to start if you're working with a different float format.
<Dybbuk> Oh, I guess I don't get the point then.
Kinners has joined #ocaml
<whee> I don't either. heh
<sam_> dybbuk, i was asking if there was a standard library function for outputting/inputting floats. not how to write one
<whee> there is, input_value :P
<sam_> whee, yeah, but it's not type safe, so it's useless
<whee> how is it not type safe?
<sam_> whee, read the documentations of the marshal module
<whee> so how do you propose implementing type safety? :P
<whee> it's already platform specific, and assuming you don't write bad code it's not a problem
<sam_> whee, i'm not proposing anything.. there's several easy ways to do that.. take a look at GCaml for example, or if you are not into extending a language, it's trivial to do it within ocaml, parse the data, and if the data is corrupt raise an exception
greg_ has quit ["Client Exiting"]
<whee> how would you detect if it's corrupt if you don't know what you're dealing with?
<sam_> i'm not here to teach programming
<whee> I'm referring to how you would represent this read value in a strongly typed language
<whee> since you can't represent it as any type if you don't know what it is.
<sam_> input_float : in_channel -> float
<whee> that doesn't explain how you would represent the value you read from the file :P
<sam_> type safety does not have anything to do with representations in a file
<whee> type safety means knowing the type of everything and ensuring it's consistent
<sam_> any representation is ok, as long as the functions inputing/outputing from the representation are type safe
<whee> there's no way you can possibly know that you're going to read a value of some type from a channel
<whee> unless you store the type along with the value
<whee> but even then, how do you know the type is correct
<sam_> you're confusing type safety and representation there
<whee> not really
<sam_> ok, whatever. i'll just ignore you
<whee> I don't see what's wrong with from_channel and specifying a return type
<Dybbuk> sam_: Maybe you'd get better results asking on caml-list.
<sam_> already got my answer about 50 lines up
<sam_> oh, and sorry if i came across rude. was not my intention