<_zack>
thelema: batteries, but it doesn't seem to be defined by batteries itself
<jeddhaberstro>
i know, that's why i ask
<tomh>
so the answer is no
<jeddhaberstro>
i was always under the presumption that ocaml was faster
<tomh>
possibly in some cases
<thelema>
jeddhaberstro: as a lazy language, there's some overhead keeping track of what has been evaluated, but the laziness can allow unnecessary code to not get run.
<jeddhaberstro>
yeah
<tomh>
haskell is lazy too
<jeddhaberstro>
that's what thelema is saying
<tomh>
oh thought he was talking about ocaml :)
<thelema>
_zack: it's defined by batteries' myocamlbuild.ml
<_zack>
tomh: ocaml is not lazy per default
<_zack>
thelema: tnx, I'll look better then
<thelema>
rule "%.ml to %.cma in presence of tag autolib"
<thelema>
~deps:["%.ml"; "%.ml.depends"]
<thelema>
~tags:["autolib"]
<thelema>
~prod:"%.cmz"
<thelema>
...
<_zack>
thelema: it's commented here
<thelema>
ok.
<_zack>
thelema: eve with a note "not working yet"
<_zack>
so apparently, ocamlbuild does not care about unknown tags :)
<tomh>
ok
<thelema>
yup.
<thelema>
so don't misspell your tags.
<Kerris4>
would anyone know when Jason Hickey's OCaml book is coming out in print?
<Smerdyakov>
He would.
<thelema>
I guess: "when ready"
<Kerris4>
Thanks guys. :)
<thelema>
lots of useful answers - why we hang around.
hkBst has quit [kornbluth.freenode.net irc.freenode.net]
_zack has quit [kornbluth.freenode.net irc.freenode.net]
Associat0r has quit [kornbluth.freenode.net irc.freenode.net]
Amorphous has quit [kornbluth.freenode.net irc.freenode.net]
gim has quit [kornbluth.freenode.net irc.freenode.net]
mfp has quit [kornbluth.freenode.net irc.freenode.net]
ppsmimou has quit [kornbluth.freenode.net irc.freenode.net]
hkBst has joined #ocaml
_zack has joined #ocaml
Associat0r has joined #ocaml
Amorphous has joined #ocaml
gim has joined #ocaml
mfp has joined #ocaml
ppsmimou has joined #ocaml
fatalerrorx has quit []
lnchntdsl has quit [K-lined]
itewsh has quit [Remote closed the connection]
pango has quit [Remote closed the connection]
pango has joined #ocaml
Amorphous has quit [Connection timed out]
Amorphous has joined #ocaml
itewsh has joined #ocaml
acatout has quit [Read error: 60 (Operation timed out)]
acatout has joined #ocaml
<maxote>
hello people, where can i find BDD libraries (Binary Decision Diagrams) written in OCaml? Thanks in advance.
HalfDemon has joined #ocaml
jlouis has quit [Remote closed the connection]
<thelema>
maxote: google will help.
itewsh has quit [Read error: 110 (Connection timed out)]
marmotine has quit ["mv marmotine Laurie"]
itewsh has joined #ocaml
<thelema>
can someone help me with a camlp4 request?
<thelema>
I want "type foo = new int" to expand to
itewsh has quit [Remote closed the connection]
<thelema>
"module Foo : sig type t val of_int : int -> t val to_int : t -> int end = struct type t = int let of_int : int -> t = "%identity" let to_int : t -> int = "%identity" end
Associat0r has quit [Client Quit]
<thelema>
oops, s/let/external/
mjonsson has joined #ocaml
pango has quit [Remote closed the connection]
hjpark has quit [Read error: 113 (No route to host)]
<thelema>
We should include one or the other in batteries...
<mfp>
I always have trouble remembering the name
<mfp>
I keep looking for "abstract"
<thelema>
public domain. That license workd.
<thelema>
*works
<mfp>
hmmm Opaque is limited to strings and ints, and includes ops that might or might not make sense for the opaque types
<mfp>
like val add : 'a int_t -> 'a int_t -> 'a int_t
<mfp>
if we have let port : port = int_t 0, let f port n = add port (int_t n) is meaningless
<thelema>
hmm, maybe batteries could use p4ck
<thelema>
yes, doing math on many opaque types is meaningless.
<thelema>
but I guess if you wanted to restrict it, just write the darn thing out.
<mfp>
so maybe the quick type foo = new int hack is better in more than one way
<mfp>
on further thought, I don't see the rationale for the ops defined on opaque types
<thelema>
well, it's public domain, I think I'll take the parts I want.
<mfp>
they're polymorphic on 'a int_t or 'a string_t, but we clearly don't want to make polymorphic funcs over such opaque types (what's the point of e.g. a function that sums arrays of ports?)
<thelema>
they're polymorphic so that the same function works on any abstract type.
<mfp>
what I mean is that for any 'a int, we can create any desired function using int_t and t_int
<thelema>
yes.
<mfp>
so add : 'a int_t -> 'a int_t -> 'a int_t is redundant
<thelema>
it's not strictly necessary, but the whole module is not strictly necessary.
<thelema>
one just has to keep track of the different int types in your head.
<mfp>
the point of the module is to make some types opaque
<mfp>
yet it provides functions that operate on such opaque types
<mfp>
I suppose having to do Opaque.add suffices to make sure you don't do it by accident :)
<thelema>
no, because you'll do [open Opaque] to avoid typing [`Port] Opaque.int_t
<thelema>
at least it's not +, -, etc.
Fullma has joined #ocaml
threeve has joined #ocaml
ygrek has joined #ocaml
Snark has joined #ocaml
<_zack>
thelema, Yoric[DT]: how do you test changes to batteries? is there any "magic" ocamlbuild target for that?
<Yoric[DT]>
What do you mean?
<Yoric[DT]>
There's no real unit testing yet.
<Yoric[DT]>
There's a directory tests, though.
<_zack>
Yoric[DT]: I mean, I made some changes, I want to spawn a top-level loading the current dev version of batteries
<Yoric[DT]>
"make all" reinstalls Batteries and recompiles all tests.
<psnively>
What's the benefit of private type abbreviations?
<psnively>
Forgive my ignorance.
<thelema>
psnively: allows one to restrict the construction of values while allowing free reads
<psnively>
Ah!
<thelema>
for example, positive integers.
<psnively>
Nice.
<thelema>
no overhead to read from the value, but you have to go through a constructor function that checks > 0 to construct such a value.
<ushdf>
what's this language like?
<flux>
actually there is some overhead for reads, syntax-wise, unfortunately
<flux>
you need to enter (foo :> int) + 42 for instance
<flux>
I hope they'd fix that :)
<thelema>
flux: I'm pushing for that on -devl
<flux>
but apparently there are some deeper reasons why they aren't
<thelema>
ushdf: it's like ML.
<flux>
thelema, do you understand the reason why they aren't?
<flux>
(I'd like an example that is particularly hairy if they were allowed)
* ushdf
doesn't know ML...knows lisp, sort of
<thelema>
flux: well, I can't figure out the corner cases having to do with parameterized types, but jacques garrigue says there's some, so I believe him.
Camarade_Tux has quit ["Leaving"]
<ushdf>
is it like lisp?
<ushdf>
:D
<thelema>
ushdf: it's not too far from lisp, but we don't do the ()s, and we avoid any assignment. We're also strongly typed, even though most type annotations are optional.
<psnively>
We avoid most assignment. :-D
<psnively>
Statically-typed, with type inference.
<ushdf>
sounds fun
<thelema>
I think it quite fun.
<psnively>
It is, I think... kind of a nice middle ground between the kind of anything-goesishness of Lisp and the straightjacket of a C++, Java...
<psnively>
The type system is much more expressive than most static type systems, but doesn't get in the way until you ask it to (i.e. "typeful programming).
<psnively>
Well, it gets in the way relative to Lisp, but I've never found it bothersome.
<ushdf>
print_endline "end line world!!!"
HalfDemon has quit [Remote closed the connection]
<psnively>
As you can see, it's got what we call a toplevel ("REPL" for us Lisp weenies). :-)
<ushdf>
let answer=42
<ushdf>
fuck me like you fucked that horse
<psnively>
You ain't seen nothin' yet.
ushdf has quit [Read error: 104 (Connection reset by peer)]
ushdf has joined #ocaml
GustNG has joined #ocaml
Linktim has joined #ocaml
Daniello has joined #ocaml
<_zack>
Yoric[DT], thelema: Batteries_core is not visible to the end user, hence if I'm using it in the compression library I'm screwed, right?
<Daniello>
hi, i am ocaml beginer, let n = read_int () in... is for reading standard input... is any similar manner also for reading booleans ?