flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
Demitar has joined #ocaml
ijcd_ has quit []
ijcd__ has quit []
struk_atwork has joined #ocaml
Morphous has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
struk_atwork2 has joined #ocaml
ijcd_ has joined #ocaml
ijcd__ has joined #ocaml
ijcd____ has joined #ocaml
ijcd___ has joined #ocaml
chessguy has joined #ocaml
Morphous_ has quit [Read error: 110 (Connection timed out)]
struk_atwork has quit [Read error: 110 (Connection timed out)]
<chessguy> i don't mean this to sound ignorant, but i'm literally curious - what does someone who likes ocaml more than haskell prefer about it?
Ched- has quit [Read error: 110 (Connection timed out)]
<thelema> chessguy: eager evaluation & imperative coding sometimes seem easier for some tasks
<chessguy> thelema: and you feel that ocaml has better support for those?
ijcd__ has quit [Connection timed out]
ijcd_ has quit [Connection timed out]
<thelema> yes.
<jlouis> ocaml has less category theory.
* johnnowak seconds eager evaluation
<johnnowak> the module system is a close second
<thelema> ocaml
<thelema> 's module system is okay, but the way this maps to the filesystem is poor...
<johnnowak> it's better than the haskell alternative
<thelema> and I often think that types don't need repetition between .mli and .ml
<thelema> I guess I'm just saying it's not perfect, even though it's good.
<johnnowak> sure
seafood has joined #ocaml
johnnowak has quit []
ijcd____ has quit []
ijcd___ has quit []
chessguy has quit ["`ap` bed"]
seafood has quit [Read error: 104 (Connection reset by peer)]
kig has joined #ocaml
ijcd has joined #ocaml
ijcd__ has joined #ocaml
ijcd has quit []
ijcd__ has quit []
seafood has joined #ocaml
sporkmonger has quit []
seafood has quit []
tetha has joined #ocaml
jonas_e has joined #ocaml
vixey has joined #ocaml
Snark has joined #ocaml
ygrek has joined #ocaml
hkBst has joined #ocaml
struk_atwork3 has joined #ocaml
struk_atwork2 has quit [Read error: 110 (Connection timed out)]
Associat0r has joined #ocaml
ygrek has quit [Remote closed the connection]
Associat0r has quit []
Associat0r has joined #ocaml
<Associat0r> hello
det has quit [Read error: 104 (Connection reset by peer)]
Flice has quit ["Leaving"]
filp has joined #ocaml
structured has joined #ocaml
<structured> t
filp has quit [Client Quit]
<structured> so I'm going to find out how simple it is to compile ocaml code and link it to C++ in reasonably "real" time
vixey has quit ["* I'm too lame to read BitchX.doc *"]
johnnowak has joined #ocaml
Snark has quit ["Ex-Chat"]
<flux> thelema, I think the .mli/.ml-repetition could be fixed with a campl4-extension, which would go and parse also the corresponding .mli-file?
<flux> thelema, a syntax like such as "copy type t" in the .ml-file or something
guillem has joined #ocaml
seafood has joined #ocaml
Linktim has joined #ocaml
struktured_ has joined #ocaml
asmanur has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
munga has joined #ocaml
<struktured_> is [ class zed = object val mutable x = 10 method get = x method set x' = x <- x' end;; ] preferred over making x of type int ref ?
structured has quit [Read error: 110 (Connection timed out)]
<asmanur> struktured_: no, I think one would use int ref
<asmanur> OO is rarely used for encapsulation, the module system is better for that
Gionne has joined #ocaml
<Associat0r> is there a visual studio add in for ocaml?
johnnowak has quit []
Yoric[DT] has joined #ocaml
<Gionne> hello, i just installed ocaml 3.10.1 for Intel-based Macs. I get a "bus error" when i try to start it. What's wrong?
<struktured_> asmanur: hmm...I am familiar with both oo and functoinal parts of ocaml, but I don't see how I would use a module to encapsulate the "properties" of a class. In my particular instance, I have to use a class because I'm going to bind a C++ abstract class
<Yoric[DT]> hi
<struktured_> Gionne: maybe wrong OSX version? missing lib dependency?
<Gionne> i don't know
<Gionne> i have an intel mac book
<Gionne> i went on the download page
<Gionne> binary macosx package for intel based macs
<struktured_> Gionne: it works fine on my macbook. Think I used darwin port though
<Gionne> ah ok
<Gionne> so the installer doesn't work
<struktured_> Gionne: I didn't say that.
struktured_ is now known as struktured
<Gionne> :D
<Gionne> "I" said that :D
<asmanur> struktured: what do you mean, properties ? can't you just use abstract type ?
<Gionne> have i got to uninstall it before installing it through macports?
<struktured> asmanur: I am given a C++ class with some virtual methods and some public members. I am trying to reflect this class naturally in ocaml so I can pass instances of the class back to C++ code..fun fun
<asmanur> hm
<struktured> Gionne: probably wise to do so far. you could try fink as well
<asmanur> can you paste the C++ class if it's not too complex ?
<struktured> its a joke...one sec
<struktured> asmanur: http://pastebin.com/m7f26b24d
<struktured> I am codeveloper of the project, so If I want to be a jerk I can modify that class and encapsulate things
<asmanur> So, you want people only use the constructor and the render function ?
<struktured> asmanur: not quite..the public variable members of pipeline are meant to be toyed with by subclasses
<asmanur> yeah, but not by the user ?
<asmanur> depending on how the subclasses, I'd do a record type wich includes a closure, or maybe a functor
<struktured> asmanur: here's an example of a "user" who would subclass pipeline http://pastebin.com/d4fd907c1
<asmanur> hum
<struktured> asmanur: my vision is code much like that in ocaml which is compiled at runtime and dynamically llinked into a C++ program
<asmanur> Maybe you can do similar things with functors, I'm not that sure though.
<struktured> asmanur: ok thanks, should probably get to bed soon anyway!
<asmanur> ok
Gionne has quit ["Leaving"]
<Yoric[DT]> Does anyone remember the format of comments inside a _tags file ?
<flux> struktured, what are you developing?
Linktim_ has joined #ocaml
<Yoric[DT]> mmmhhhh...
<Yoric[DT]> ocamlfind ocamlopt unix.cmxa -g -linkpkg -package cil batteries/extlib/ref.cmx batteries/extlib/enum.cmx batteries/extlib/enumLabels.cmx batteries/extlib/extChar.cmx batteries/extlib/extString.cmx batteries/extlib/IO.cmx batteries/extlib/extList.cmx batteries/extlib/option.cmx log.cmx ast.cmx batteries/extlib/number.cmx batteries/extlib/extFloat.cmx batteries/extlib/optionLabels.cmx batteries/extlib/std.cmx types.cmx expression.cmx
<Yoric[DT]> definition.cmx statement.cmx stdlib.cmx typing.cmx extrapol.cmx -o extrapol.native
<Yoric[DT]> Files /home/yoric/usr/local/godi/lib/ocaml/std-lib/unix.cmxa
<Yoric[DT]> and /home/yoric/usr/local/godi/lib/ocaml/std-lib/unix.cmxa
<Yoric[DT]> both define a module named Unix
<flux> quite interesting that godi is targeting also mingw
* Yoric[DT] wonder how a file and itself can enter in conflict.
<flux> yoric[dt], why don't you do -package cil,unix ?
<flux> dunno if it affects anything
<flux> but atleast the parameters would be in the same format
<flux> perhaps the other one is resolved automatically but the other one has been provided an absolute path, which somehow makes them different
<flux> actually: cil probably depends on unix, but ocamlfind doesn't know that unix is already in there
<flux> so is this legal? ocamlfind ocamlopt -o foo unix.cmxa unix.cmxa
<flux> if not, it's the same problem
<flux> nope, illegal
<flux> so there ;)
<flux> although I guess that should be changed; if not just to ignore the case, a better error message should be provided
<flux> "unix.cmxa listed more than once in the list of files"
<Yoric[DT]> Yeah.
<Yoric[DT]> Well, anyway, deadline too tight to handle that issue.
<Yoric[DT]> It works fine in bytecode, so that should be sufficient for testing.
<flux> ah, ocamlc indeed handles the case
Linktim has quit [Read error: 110 (Connection timed out)]
Linktim_ has quit [Read error: 110 (Connection timed out)]
Jedai has joined #ocaml
ulfdoz has joined #ocaml
sporkmonger has joined #ocaml
bla has quit [Read error: 101 (Network is unreachable)]
bla has joined #ocaml
sporkmonger has quit []
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
vixey has joined #ocaml
ygrek has joined #ocaml
sporkmonger has joined #ocaml
filp has joined #ocaml
filp has quit ["Bye"]
yziquel has quit [Read error: 110 (Connection timed out)]
love-pingoo has joined #ocaml
|Jedai| has joined #ocaml
Jedai has quit [Read error: 110 (Connection timed out)]
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
filp has joined #ocaml
filp has quit [Client Quit]
Gionne has joined #ocaml
bluestorm has joined #ocaml
Snark_ has joined #ocaml
marmotine has joined #ocaml
Snark_ is now known as Snark
Gionne has quit [Remote closed the connection]
<Yoric[DT]> Does anyone know if anyone has been working on dynamic scoping for OCaml ?
<flux> sounds.. evil!
<orbitz> what kind of crazy person would want dynamic scoping?
<flux> use monads to simulate?-)
<vixey> you cannot determine if a variable is bound statically with dynamic scoping
<vixey> so... how could you have it ocaml?aeo
<Yoric[DT]> :)
<flux> didn't haskell use to have sort-of dynamic variables
<Yoric[DT]> Well, I'm still working on exceptions.
<flux> implicit variables or something?
<flux> implicit parameters
<Yoric[DT]> Since exceptions are essentially something like dynamic scoping...
Gionne has joined #ocaml
<Yoric[DT]> And yeah, it's something like an implicit parameter, too.
<flux> so basically if you call a function that takes an implicit argument, your function magically takes the same implicit argument also
<vixey> I don't see the link, why are they similar?
<Yoric[DT]> vixey: the exception handler is dynamically scoped.
<flux> well, you have a variable that doesn't get bind by its static scope
<Yoric[DT]> Ok, maybe not "something like", but there's definitely a connexion somewhere.
<bluestorm> what's the difference of behaviour between dynamically scoped variables and global references ?
<Yoric[DT]> bluestorm: I'd say different type information.
<Yoric[DT]> Mmmmhhh....
<Yoric[DT]> A bit more complex, actually.
<flux> I wonder how the syntax would even be in ocaml
<Yoric[DT]> Well, anyway, gottago back to my deadline.
<flux> it makes (more) sense in certain languages because you can for example setq stuff
<flux> hmm, or maybe that isn't such a big difference
l_a_m_ has joined #ocaml
TaXules_ has joined #ocaml
ygrek has quit [Remote closed the connection]
<Yoric[DT]> Nearly unrelated: it would be nice if someone were to maintain ocamlexc and turn it into a full type-and-effects type-checker for OCaml.
<Yoric[DT]> Looks like most of the code is there already.
l_a_m has quit [Read error: 110 (Connection timed out)]
seafood has joined #ocaml
TaXules has quit [Read error: 110 (Connection timed out)]
<flux> but I suspect it needs some level of understanding to maintain?
<Yoric[DT]> I suspect so.
<Yoric[DT]> It's types-and-effects.
<Yoric[DT]> Just a specialized form thereof.
* Yoric[DT] would do that if he had time.
RobertFischer has joined #ocaml
seafood has quit []
giovi_ has joined #ocaml
r0bby has quit [Read error: 110 (Connection timed out)]
RobertFischer has quit []
RobertFischer has joined #ocaml
Linktim_ has joined #ocaml
struk_atwork3 is now known as struk_atwork
|Jedai| has quit [Read error: 113 (No route to host)]
Gionne has quit [Read error: 110 (Connection timed out)]
giovi_ is now known as Gionne
Axioplase has joined #ocaml
<hcarty> Is there a performance difference between using "open Foo" vs "include Foo"?
<Smerdyakov> Yes. Doesn't the manual explain it?
<Yoric[DT]> Performance-wise?
<Yoric[DT]> I think the manual explains binary-size-wise differences, but nothing about performances.
<Smerdyakov> Oh, missed "performance."
<Yoric[DT]> hcarty: according to my measurements, none.
<Yoric[DT]> ...
<Yoric[DT]> s/measurements/experiments/
<hcarty> Yoric[DT]: Ok, thanks. I'm just curious, wondering what what affect making a pa_includein camlp4 extension vs pa_openin camlp4 extension would have
<Yoric[DT]> Well, pa_openin already includes the module.
<Yoric[DT]> So probably not very different.
<Yoric[DT]> mmmhhhh...
<Yoric[DT]> No, my bad,
<Yoric[DT]> it probably doesn't include the module.
<hcarty> No, it uses open Module
<hcarty> IIRC
<Yoric[DT]> my bad
Linktim_ has quit [Read error: 60 (Operation timed out)]
<hcarty> Yoric[DT]: Thanks for the open vs include results. That is good to know.
<Yoric[DT]> My pleasure.
RobertFischer has left #ocaml []
Linktim_ has joined #ocaml
Jeff_124 has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
Jeff_123 has quit [Read error: 110 (Connection timed out)]
<hcarty> Yoric[DT]: What is/was the reason for using +., -., etc for operators in Batteries, rather than +/, -/, etc or some other extra character? Isn't masking floating point math just as bad as masking integer math?
<Yoric[DT]> No particular reason.
<Yoric[DT]> I'm willing to change that.
<hcarty> I think it might be worth changing. I've been using a Module.( "Module is opened in here" ) syntax extension for some code, and after playing around with (+) vs (+.) vs (+/) I think it may be worth changing
<hcarty> Sorry for the redundancy there...
<hcarty> +/ and friends are already used in the Num module, which is the only real reason I suggest them
<Yoric[DT]> ok
<Yoric[DT]> I'll try and do that.
petchema has joined #ocaml
r0bby has joined #ocaml
guillem has quit [Remote closed the connection]
Ched- has joined #ocaml
Ched- has left #ocaml []
shortcircuit has quit [Nick collision from services.]
shortcircuit has joined #ocaml
shortcircuit has quit [Nick collision from services.]
shortcircuit_ has joined #ocaml
Ched- has joined #ocaml
Ched- has left #ocaml []
rhar has quit [Read error: 110 (Connection timed out)]
rhar has joined #ocaml
ijcd_ has joined #ocaml
ijcd__ has joined #ocaml
<Associat0r> can anyone recommend a pretty printer for ocaml?
<Smerdyakov> What do you mean?
<Smerdyakov> camlp4 comes with OCaml, and "pretty printer" is 2 of the 4 p's.
<Associat0r> formatting my code automatically
<Associat0r> formatting ocaml code I mean
<Smerdyakov> I'm not sure what the command line is to get it to parse and then re-print code, though.
<Associat0r> also will there be a visual studio add on for ocaml?
<bluestorm> Smerdyakov: camlp4o foo.ml, most probably
<bluestorm> but the pretty-printer as-is is not *so* great
DoubleDouble has joined #ocaml
<hcarty> I have a list is numbers, and want to find the smallest, returning None if the list is empty and (Some smallest) if the list isn't empty. Is this the right way to use option types here? http://pastebin.com/d58a224fc
<hcarty> I
<bluestorm> hm
<hcarty> I've been using OCaml for a while, but I haven't really used the 'a option type very much before now
<bluestorm> i'd go for something tagless
<Yoric[DT]> monadic ?
<hcarty> I've been using ~-1
<bluestorm> let list_min = function [] -> None | hd::tl -> Some (List.fold_left min hd tl)
mbishop_ has joined #ocaml
mbishop has quit [Read error: 104 (Connection reset by peer)]
<hcarty> bluestorm: Oh, that's much nicer...
<hcarty> Thanks
Jedai has joined #ocaml
<bluestorm> the monadic version would be something like let list_min = List.fold_right (fun x m -> m >>= (fun y -> return (min x y))) None
<bluestorm> hm, forgot the list parameter
Gionne has quit ["Leaving"]
ijcd_ has quit [Read error: 104 (Connection reset by peer)]
ijcd__ has quit [Read error: 104 (Connection reset by peer)]
ijcd has joined #ocaml
ijcd__ has joined #ocaml
filp has joined #ocaml
ijcd has quit [Read error: 104 (Connection reset by peer)]
ijcd__ has quit [Read error: 104 (Connection reset by peer)]
ijcd has joined #ocaml
filp has quit [Client Quit]
ijcd__ has joined #ocaml
ijcd has quit [Read error: 104 (Connection reset by peer)]
ijcd__ has quit [Connection reset by peer]
ijcd_ has joined #ocaml
ijcd__ has joined #ocaml
comglz has joined #ocaml
ijcd__ has quit [Read error: 104 (Connection reset by peer)]
ijcd_ has quit [Read error: 104 (Connection reset by peer)]
ijcd has joined #ocaml
ijcd__ has joined #ocaml
jonas_e has left #ocaml []
guillem has joined #ocaml
mbishop_ is now known as mbishop
DoubleDouble has quit ["Les habitants du continent ont une vie sexuelle, les Anglais ont des bouillottes d'eau chaude"]
<Yoric[DT]> Does anyone know the symbol for >>= in LaTeX ?
<mattam> $>\!>\!=$ is the best I've found (search a bit in symbols-a4).
<Yoric[DT]> Thanks.
<bluestorm> if you have listing you can use inline code (even in math mode)
kig has quit [Read error: 110 (Connection timed out)]
<bluestorm> http://pastebin.be/12266 <- this is what I use
<Yoric[DT]> Good to know.
bla has quit [Read error: 110 (Connection timed out)]
aiosx has joined #ocaml
aiosx has quit [Client Quit]
mynyml has joined #ocaml
bla has joined #ocaml
Jeff_124 has quit ["Leaving."]
Snrrrub has joined #ocaml
ygrek has joined #ocaml
Axioplase has quit ["j'y go"]
RobertFischer has joined #ocaml
<hcarty> Is there a way to get ocamlbuild to produce an .mli from a .ml?
<hcarty> I can figure out the dependencies to do it by hand, but some ocamlbuild would be much easier and nice to have for the future
<bluestorm> ocamlfind could probably do that too
<hcarty> bluestorm: Yes, I would certainly want to use ocamlfind doing it my self. ocamlbuild potentially has the benefit of picking up the required local .ml files in the right order automatically
<hcarty> Mostly a laziness issue at this point, but as code starts to grow it would be nice to have the local dependencies decided automatically
<flux> hmm, why would one want to have .mli-files automatically generated always?
RobertFischer has quit ["Taking off -- check out http://smokejumperit.com and http://enfranchisedmind.com/blog/"]
RobertFischer has joined #ocaml
Snrrrub has quit [Read error: 110 (Connection timed out)]
Snrrrub has joined #ocaml
<hcarty> flux: Not always, but it can be a useful check. And sometimes easier than generating them by hand and continually updating them.
Snark has quit ["Ex-Chat"]
aeolist has joined #ocaml
Linktim_ has quit [Remote closed the connection]
ijcd has quit []
ijcd__ has quit []
mynyml has left #ocaml []
comglz has quit ["Lost terminal"]
ijcd_ has joined #ocaml
ijcd__ has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
sporkmonger has quit [Read error: 110 (Connection timed out)]
aeolist has left #ocaml []
ijcd__ has quit [Read error: 104 (Connection reset by peer)]
ijcd_ has quit [Read error: 104 (Connection reset by peer)]
ijcd_ has joined #ocaml
ijcd__ has joined #ocaml
ygrek has quit [Remote closed the connection]
asmanur has quit [Remote closed the connection]
vixey has quit ["* I'm too lame to read BitchX.doc *"]
LordMetroid has joined #ocaml
tetha has quit [Read error: 110 (Connection timed out)]
love-pingoo has quit ["pouf"]
sporkmonger has joined #ocaml
sporkmonger has quit []
ijcd__ has quit [Read error: 104 (Connection reset by peer)]
ijcd_ has quit [Read error: 104 (Connection reset by peer)]
ijcd_ has joined #ocaml
ijcd__ has joined #ocaml
ijcd____ has joined #ocaml
ijcd___ has joined #ocaml
ijcd____ has quit [Read error: 104 (Connection reset by peer)]
ijcd_____ has joined #ocaml
ijcd___ has quit [Read error: 104 (Connection reset by peer)]
ijcd____ has joined #ocaml
ijcd____ has quit [Read error: 104 (Connection reset by peer)]
ijcd_____ has quit [Read error: 104 (Connection reset by peer)]
guillem has quit [Remote closed the connection]
ijcd_____ has joined #ocaml
ijcd____ has joined #ocaml
Associat0r has quit []
<Yoric[DT]> 'night everyone
Yoric[DT] has quit ["Ex-Chat"]
ijcd____ has quit [Read error: 54 (Connection reset by peer)]
ijcd_______ has joined #ocaml
ijcd______ has joined #ocaml
ijcd_____ has quit [Read error: 60 (Operation timed out)]
ijcd_ has quit [Connection timed out]
ijcd__ has quit [Connection timed out]
Flice has joined #ocaml
<Flice> hey
<Flice> is it possible to patternmatch a string?
<Flice> like, c::tail
<Smerdyakov> Nope.
<Smerdyakov> You could explode the string into a list and match on the list, though.
<xevz> Or use the ocamlp4 extension for PCRE...
<Smerdyakov> The function is [String.explode] in SML, but I don't think it has a counterpart in the OCaml standard library.
<xevz> No, you'll have to use Str.split.
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
LordMetroid has quit ["Leaving"]
jlouis has quit ["Leaving"]
jlouis has joined #ocaml
marmotine has quit ["Quitte"]
RobertFischer has quit ["Taking off -- check out http://smokejumperit.com and http://enfranchisedmind.com/blog/"]
gildor has quit [Remote closed the connection]
gildor has joined #ocaml
ijcd_ has joined #ocaml
ijcd_______ has quit [Read error: 104 (Connection reset by peer)]
ijcd__ has joined #ocaml
shortcircuit_ is now known as shortc|desk
ijcd______ has quit [Connection timed out]