<flux>
do you mean to say that that's not a scary bug?
<gildor>
flux: people live with bugs -- at every level, the whole point is that it is important to correct them
<flux>
I'm pretty sure Intel felt pretty scared at the time
<flux>
fortunately they could patch it up
<flux>
or work around it
<gildor>
indeed, and we have spotted it in OCaml and provide a patch now
fraggle_laptop has joined #ocaml
<gildor>
the bug that are really scary are the one still undiscovered or sitting still in the OCaml BTS
<flux>
the scariness of such depends on the overall robustness of the product
<flux>
ocaml I guess has a pretty decent track record, so I'm not that scared about unknown bugs
<flux>
if such bugs were uncovered on weekly basis, I'd be much more scared about them
<flux>
(about the uncovered bugs)
<mfp>
hmmm I can't see this in the changelog, anybody remembers something like module type of <module expression> ?
<mfp>
don't remember where I saw that
ttamttam has joined #ocaml
<f[x]>
mfp, on mailing list I believe
<mfp>
"3. Will the "module type of..." feature of 3.12 help with this? I can imagine e.g.: module type EdgeX = (module type of (ConvenientEdge (SmallX)))"
<orbitz>
The first thign i thought of with first lcass modules is explicit typeclasses. Is that the primary use case?
munga has joined #ocaml
mbishop__ has joined #ocaml
mbishop_ has quit [Ping timeout: 276 seconds]
Yoric has joined #ocaml
robthebob has quit [Ping timeout: 248 seconds]
mbishop_ has joined #ocaml
mbishop__ has quit [Ping timeout: 248 seconds]
filp has quit [Quit: Bye]
ttamttam has quit [Quit: Leaving.]
oriba has joined #ocaml
travisbrady has joined #ocaml
munga has quit [Quit: Ex-Chat]
ftrvxmtrx has quit [Quit: Leaving]
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: Operation timed out]
pad has joined #ocaml
Edward__ has quit [Ping timeout: 276 seconds]
ygrek has joined #ocaml
avsm has joined #ocaml
ftrvxmtrx has joined #ocaml
barismetin has quit [Quit: Leaving...]
gabriel_1 has joined #ocaml
gabriel_1 has quit [Client Quit]
hto has joined #ocaml
derdon has quit [Quit: Lost terminal]
mbishop__ has joined #ocaml
mbishop_ has quit [Ping timeout: 245 seconds]
mbishop_ has joined #ocaml
mbishop__ has quit [Ping timeout: 245 seconds]
fabjan has quit [Read error: Connection reset by peer]
_unK has quit [Remote host closed the connection]
ttamttam has joined #ocaml
Edward__ has joined #ocaml
boscop_ has left #ocaml []
boscop has joined #ocaml
mbishop__ has joined #ocaml
mbishop_ has quit [Ping timeout: 276 seconds]
hto has quit [Quit: leaving]
Yoric has quit [Ping timeout: 264 seconds]
sepp2k has joined #ocaml
avsm has quit [Quit: Leaving.]
ttamttam has quit [Quit: Leaving.]
Yoric has joined #ocaml
murph has joined #ocaml
<murph>
if i have two pairs of ints, and i want to add them directly, what's the easiest way (pref w/o library functions). Somethin like (1,2) + (4,5) = (5,7)
Yoric has quit [Ping timeout: 260 seconds]
<sgnb>
murph: let f (a,b) (c,d) = (a+c,b+d)
<sgnb>
there is no simpler way AFAIK
coucou747 has quit [Read error: Connection reset by peer]
<murph>
mmkay. thanks :)
<murph>
that's what i'd come up with, but i wasn't sure if there was some form of implicit syntax i could use
Paczesiowa has joined #ocaml
<theDroggl>
<- ocaml newb, is there operator overloading in ocaml?
<theDroggl>
i.e. could one define an operator for that task?
<theDroggl>
ie something like (1,2) <+> (4,5)
<Paczesiowa>
I don't think so, otherwise there wouldn't be (+.) operator
<Paczesiowa>
I'm trying to install batteries and I get this: "ocamldep: unknown option `-package', I have ocaml 3.11.2 on gentoo, any ideas how to fix it?
<murph>
no there isn't any overloading
<orbitz>
your question si soemwhat confusing theDroggl
<murph>
actually
<murph>
i think you can define *new* operators
<orbitz>
theDroggl: Ocaml allows you to use symbols as functions
<theDroggl>
oh nice
<orbitz>
operators and functisona re much closer in Ocaml than in C++/Java
<orbitz>
# let (<+>) x1 x2 = x1 + x2;;
<orbitz>
val ( <+> ) : int -> int -> int = <fun>
<orbitz>
# 1 <+> 2;;
<orbitz>
- : int = 3
<theDroggl>
but there is no overloading as there are no polymorphic function calls, right?
<orbitz>
there are parametric polymorphic functions
<orbitz>
polymorphism is not teh same as overloading
<murph>
If i write a function that I think is tail recursive, is there a way to get the interpreter to tell me if it is, indeeed, tail-recursive for sure?
<gildor>
val ( <+> ) : int * int -> int * int -> int * int = <fun>
<gildor>
# (1,1) <+> (2,3);;
<gildor>
- : int * int = (3, 4)
<orbitz>
murph: How would you not know if it is tail recursive?
coucou747 has joined #ocaml
<gildor>
theDroggl: ^^^^^
<theDroggl>
thats nice, I always found that differenciation arbitrary (some languages allow multiple dispatch on operators but not on functions for example, which is just not logical)
<murph>
orbitz, since i'm a bit of a newb, perhaps i have some order-of-operations mistake that requires calculation after the recusive call
<orbitz>
murph: then it is not tail recursive
<murph>
orbitz, right. But the whole point is i'm not sure >.>
<orbitz>
murph: tail reccursive == ther ecursive call is teh *last* call in teh functino
<orbitz>
murph: it's a fairly simple test
<murph>
orbitz, right. and i think i'm correct. i just was wondering if there was some way to be positive. double check myself.
ygrek has quit [Ping timeout: 245 seconds]
<orbitz>
murph: have mor confidence in yourself
<murph>
i'm new to functional programming. the confidence would be misplaced. perhaps in a week after i've written a number of tail recursive functions and convinced myself that they were correct.
coucou747 has quit [Read error: Connection reset by peer]
<orbitz>
(tail recursion is not limited to functional programming. gcc an do TCO in C/C++ programs)
<gildor>
orbitz: concerning tail recursive, I think the right definition is that at any point of the recursion you don't need data from the previous level
<orbitz>
gildor: fair enough
<travisbrady>
Paczesiowa: -package is an ocamlfind option, do you have findlib installed?
<gildor>
i.e. you can convert your function to a loop without a stack
coucou747 has joined #ocaml
_andre has quit [Quit: leaving]
<Paczesiowa>
travisbrady: ocamlfind ocamldep -package num fails this way
<orbitz>
thelema: at some point we should discuss specifics on this labels utility we talked about last month so I can get crackin at it
_unK has joined #ocaml
ccasin has quit [Quit: Leaving]
coucou747 has quit [Read error: Operation timed out]
coucou747 has joined #ocaml
<travisbrady>
Paczesiowa: do you have findlib installed?
<Paczesiowa>
travisbrady: yes
<Paczesiowa>
travisbrady: otherwise, ocamlfind binary wouldn't work
ulfdoz_ has quit [Quit: Reconnecting]
ulfdoz has joined #ocaml
ulfdoz has quit [Ping timeout: 265 seconds]
gl has joined #ocaml
mal`` has quit [Quit: Coyote finally caught me]
mal`` has joined #ocaml
sepp2k has quit [Quit: Leaving.]
robthebob has joined #ocaml
<robthebob>
hey, anyone used the calendar package? having some trouble getting started with it
Yoric has joined #ocaml
<robthebob>
if i compile using -package calendar, i still get Error: Unbound module Calendar on the open statement
emias has quit [Ping timeout: 276 seconds]
<robthebob>
riiight, it's called CalendarLib
<robthebob>
ocaml has serious documentation issues
<robthebob>
camlp4 is just the tip of the iceberg
avsm has joined #ocaml
<murph>
i'm bad with the anonymous 'fun' notation. I want a function that takes a function and an argument, and applies them. I tried (fun f arg -> f arg) - is that close/right?
<palomer>
yeah,
<murph>
oh, i had a different mistake. thanks.
oriba has quit [Quit: Verlassend]
Yoric has quit [Quit: Yoric]
Paczesiowa has quit [Read error: Connection reset by peer]
<palomer>
np
valross has joined #ocaml
<mfp>
robthebob: the .mli files are usually helpful, and you can know which modules are exported by the lib by looking for the .cmi files
sshc has quit [Quit: leaving]
<mfp>
robthebob: e.g. ls -l /usr/lib/ocaml/calendar/*.cmi -> /usr/lib/ocaml/calendar/calendarLib.cmi
<mfp>
once you know the toplevel modules, you can explore in the hmm ocaml toplevel, or take a look at the .mli files
avsm has quit [Quit: Leaving.]
<robthebob>
mfp, thanks for the suggestions - i'll remember for next time
robthebob has quit [Remote host closed the connection]
Edward__ has quit []
avsm has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]