_cody_ has quit [Remote host closed the connection]
q66 has quit [Quit: Leaving]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
shinnya has quit [Ping timeout: 244 seconds]
darkf_ has quit [Ping timeout: 272 seconds]
gustav___ has quit [Ping timeout: 255 seconds]
zpe has quit [Ping timeout: 246 seconds]
gustav___ has joined #ocaml
travisbrady has joined #ocaml
johnnydiabetic has quit [Ping timeout: 272 seconds]
darkf has joined #ocaml
NaCl has joined #ocaml
NaCl has joined #ocaml
travisbrady has quit [Quit: travisbrady]
zpe has joined #ocaml
cdidd has quit [Ping timeout: 272 seconds]
englishm has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 240 seconds]
darkf_ is now known as darkf
travisbrady has joined #ocaml
ontologiae has joined #ocaml
darkf has quit [Ping timeout: 240 seconds]
darkf has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
cdidd has joined #ocaml
giarc has joined #ocaml
elspru has joined #ocaml
<giarc>
Can anyone tell me if there a recommended way to get the base64 package through opam?
<rgrinberg>
giarc: $ opam install base64 ?
travisbrady has quit [Quit: travisbrady]
<giarc>
I did try that, but it didn't go through.
<giarc>
I'm not sure if there's something like repositories that can be added that would have it, as the opam package list shows way more than what 'opam list' shows me on my machine.
SethTisue_______ has quit [Ping timeout: 260 seconds]
<smondet>
giarc: `opam install base64` seems to work for me
<smondet>
what's your error message?
SethTisue_______ has joined #ocaml
<giarc>
Hmm... OK. The error was something simple like "package not found" or something of that nature. I did just start updating, so maybe it will work after that.
<giarc>
OK, the update totally resolved the issue. Thanks a lot.
giarc has quit [Quit: Page closed]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
yacks has joined #ocaml
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
darkf has quit [Ping timeout: 250 seconds]
englishm has quit [Remote host closed the connection]
englishm has joined #ocaml
darkf has joined #ocaml
path[l] has joined #ocaml
siddharthv_away is now known as siddharthv
Tekk_ has quit [Ping timeout: 240 seconds]
zpe has joined #ocaml
MercurialAlchemi has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
ontologiae has joined #ocaml
yacks has quit [Ping timeout: 260 seconds]
ricky_ has joined #ocaml
ricky_ is now known as Guest99768
yacks has joined #ocaml
Guest99768 is now known as ricky____
toroidalcode has quit [Ping timeout: 260 seconds]
ontologiae has quit [Ping timeout: 264 seconds]
MercurialAlchemi has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 245 seconds]
Tekk_ has joined #ocaml
araujo has quit [Quit: Leaving]
zpe has joined #ocaml
zpe has quit [Ping timeout: 255 seconds]
ollehar1 has joined #ocaml
Simn has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
ontologiae has joined #ocaml
arj has joined #ocaml
ollehar1 has quit [Ping timeout: 255 seconds]
ontologiae has quit [Ping timeout: 264 seconds]
_0xAX has joined #ocaml
Arsenik has joined #ocaml
rand000 has joined #ocaml
path[l] has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
BitPuffin has joined #ocaml
zpe has joined #ocaml
eikke__ has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
englishm has quit [Remote host closed the connection]
_whitelogger_ has joined #ocaml
fraggle_ has joined #ocaml
AltGr has joined #ocaml
fold has quit [Ping timeout: 272 seconds]
gasche has joined #ocaml
cago has joined #ocaml
ddosia has joined #ocaml
bezirg has joined #ocaml
path[l] has joined #ocaml
sepp2k has joined #ocaml
rand000 has quit [Quit: leaving]
cthuluh has quit [Ping timeout: 272 seconds]
cthuluh has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 244 seconds]
ontologiae has joined #ocaml
dsheets has joined #ocaml
fold has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
dsheets has quit [Quit: Leaving]
dsheets has joined #ocaml
maattdd has joined #ocaml
rgrinberg has quit [Quit: Leaving.]
vincom2 has quit [Remote host closed the connection]
vincom2 has joined #ocaml
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 260 seconds]
Kakadu has joined #ocaml
ddosia has quit [Quit: Leaving.]
darkf_ is now known as darkf
zpe has joined #ocaml
zpe has quit [Ping timeout: 246 seconds]
fold has quit [Ping timeout: 260 seconds]
BitPuffin has quit [Read error: Connection reset by peer]
BitPuffin has joined #ocaml
MercurialAlchemi has joined #ocaml
eikke__ has quit [Ping timeout: 255 seconds]
eikke__ has joined #ocaml
rishabhjain has joined #ocaml
maattdd has quit [Ping timeout: 272 seconds]
jonludlam has joined #ocaml
<elspru>
how to change array to list?
<elspru>
couldn't find it anywhere, none of the api search results functionional
rishabhjain has quit [Remote host closed the connection]
hhugo has joined #ocaml
jbrown has quit [Remote host closed the connection]
<asmanur>
Array.to_list
rishabhjain has joined #ocaml
rishabhjain has quit [Remote host closed the connection]
zpe has joined #ocaml
zpe has quit [Ping timeout: 244 seconds]
hhugo has quit [Quit: Leaving.]
<bernardo1pc>
I'm starting to bug my opam :/
<bernardo1pc>
on thursday, it did not compile correctly ocamlfind-1.5.2, so it stopped brutally
<bernardo1pc>
today, I did an update / ugrade cycle, and it (somehow) compiled ocamlfind-1.5.2 , but now it can't install because
<bernardo1pc>
how's that even supposed to arrive ? I'm doing an upgrade, so it should know better to uninstall the 1.5.1 after 1.5.2 is successfully installed....
ddosia has joined #ocaml
<bernardo1pc>
It's getting better... opam remove ocamlfind / opam install ocamlfind fails because (you guessed) 1.5.1 is already installed !
<bernardo1pc>
(all this in 1.1.1)
<bernardo1pc>
I did upgrade my opam through my distribution, should I have done something magic in between ?
eikke__ has quit [Ping timeout: 264 seconds]
<bernardo1pc>
(but if so, why then did it install correctly other packages, like camlp5 and camlp4 ?)
_andre has joined #ocaml
mrpantou1le has quit [Ping timeout: 246 seconds]
maattdd has joined #ocaml
hhugo has joined #ocaml
mrpantoufle has joined #ocaml
freling has quit [Ping timeout: 240 seconds]
freling has joined #ocaml
lordkryss has joined #ocaml
octachron has joined #ocaml
maattdd has quit [Ping timeout: 264 seconds]
hhugo has quit [Quit: Leaving.]
siddharthv is now known as siddharthv_away
maattdd has joined #ocaml
englishm has quit [Ping timeout: 240 seconds]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
hhugo has joined #ocaml
rishabhjain has joined #ocaml
darkf has quit [Quit: Leaving]
eikke__ has joined #ocaml
maattdd has quit [Ping timeout: 260 seconds]
englishm has joined #ocaml
jbrown has joined #ocaml
rishabhjain has quit []
shinnya has joined #ocaml
ggole has joined #ocaml
zpe has joined #ocaml
zpe has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
octachron has quit [Ping timeout: 246 seconds]
pgomes has joined #ocaml
maattdd has quit [Ping timeout: 272 seconds]
badon has joined #ocaml
hhugo has quit [Quit: Leaving.]
bernardo1pc has quit [Ping timeout: 272 seconds]
englishm has quit [Quit: Leaving...]
Hannibal_Smith has joined #ocaml
bernardofpc has joined #ocaml
macron has quit [Ping timeout: 260 seconds]
patronus_ has joined #ocaml
vbmithr_ has joined #ocaml
Cypi_ has joined #ocaml
andreypopp_ has joined #ocaml
_andre_ has joined #ocaml
demonimin_ has joined #ocaml
seliopou_ has joined #ocaml
Cypi has quit [Disconnected by services]
Cypi_ is now known as Cypi
girrig_ has joined #ocaml
<AltGr>
bernardofpc, yes, that situation _could_ happen rarely on 1.1 after an interruption ; I'd advise switching to the 1.2 beta.
<AltGr>
it's indeed a bug
_andre has quit [*.net *.split]
jonludlam has quit [*.net *.split]
demonimin has quit [*.net *.split]
patronus has quit [*.net *.split]
vbmithr has quit [*.net *.split]
andreypopp has quit [*.net *.split]
testcocoon has quit [*.net *.split]
mfp has quit [*.net *.split]
girrig has quit [*.net *.split]
seliopou has quit [*.net *.split]
<AltGr>
you can 'opam remove ocamlfind.1.5.1' explicitely, if that helps
andreypopp_ is now known as andreypopp
<AltGr>
you can also check that ocamlfind isn't pinned ('opam pin'), and as a last resort edit ~/.opam/<switch>/installed and ~/.opam/<switch>/installed.roots -- but that shouldn't be necessary
testcocoon has joined #ocaml
_0xAX has quit [Remote host closed the connection]
travisbrady has joined #ocaml
mfp has joined #ocaml
zpe has joined #ocaml
jonludlam has joined #ocaml
macron has joined #ocaml
zpe has quit [Ping timeout: 272 seconds]
bezirg has quit [Ping timeout: 264 seconds]
<Drup>
AltGr: while you are here: what is the prefered way to have a package pointing to the sub directory of a git repository ?
<Drup>
I could create a script that do a cd before executing the build commands but ...
yacks has quit [Remote host closed the connection]
<AltGr>
no good way at the moment, it's not really supported by git ; but that could be nice, yes, cding in opam files is really annoying
<AltGr>
if you want to go that way I read somewhere (stack overflow ?) that if it's on github there is a trick though
rossberg has joined #ocaml
<AltGr>
using their svn gateway... :p
<Drup>
it's not on git :)
<Drup>
github*
cross has quit [Quit: leaving]
cross has joined #ocaml
macron has quit [Ping timeout: 260 seconds]
jonludlam has quit [Ping timeout: 260 seconds]
<AltGr>
sorry, don't have a good solution at the moment ; feel free to open an issue and give suggestions if you have ideas on how best to handle this.
<boegel|work>
the build is failing with "ocamlfind: Package `threads' not found"
badon has joined #ocaml
<Drup>
(I'm always happily surprised to see the ocaml presence in the bio-info community)
<boegel|work>
I found a reference that the threads library is not enabled by default when installing OCaml, but I can't find a reference as to how to enable it (and I'm also wondering why it's not enabled by default)
<boegel|work>
any help?
<Drup>
boegel|work: which OS ?
<boegel|work>
Drup: Linux
pminten has joined #ocaml
<Drup>
which distribution ?
<boegel|work>
Drup: Scientific Linux 6, but I'm compiling OCaml myself
<Drup>
Oh.
<boegel|work>
I basically used "./configure && make world.opt && make install"
<boegel|work>
that worked fine, but threads is missing...
yacks has joined #ocaml
cago has quit [Quit: cago]
<Drup>
the thread library should be enabled by default
paolooo has joined #ocaml
<bernardofpc>
AltGr> you can 'opam remove ocamlfind.1.5.1' explicitely, if that helps -> that did not help :/
<adrien>
hmmmmmmmmmmmm
<Drup>
boegel|work: go where you have all your ocaml libraries and look if you have a threads directory
<bernardofpc>
opam pin returns nothing
<AltGr>
ok, that's good
<AltGr>
what does the remove return ?
<adrien>
boegel|work: at the end of "configure" you get a summary of what will be built
<adrien>
would be interesting to have a log of configure
<bernardofpc>
and (for clarification) opam entered this incongruent state by failing to install ocamlfind because of "bytes" that (according to the newly installed ocamlfind) was already installed and caused make install to fail
shinnya has quit [Ping timeout: 240 seconds]
<bernardofpc>
The strangest part is that the ocamlfind i have in <switch>/bin is new (like, modif time compatible with my install tentatives...)
path[l] has quit [Quit: path[l]]
<bernardofpc>
AltGr: remove returns 0, but does NOT remove it from opam list
<bernardofpc>
I thinkk I will try the hardcore vim way
<AltGr>
and if you try to remove ocamlfind.1.5.2 as well ?
<bernardofpc>
ocamlfind.1.5.2 is not installed.
<bernardofpc>
Nothing to do.
* Drup
whispers to bernardofpc : "rm -rf .opam"
<AltGr>
bernardofpc, well otherwise, this bug has been fixed a while ago ; release is just going to be out...
<bernardofpc>
yeah, but I'd like to avoid recompiling Coq for 1+h
<bernardofpc>
is there any way I could check which version of ocamlfind I have installed ?
<bernardofpc>
(NOT using opam)
<bernardofpc>
(ocamlfind does not honor --version :/)
<bernardofpc>
oh, ocamlfind list -> findlib (version: 1.5.2)
<rks`>
bernardofpc: I haven't read the conversation, but if you allow me one advice: don't install Coq from opam, or at least create a switch specifically for it. Otherwise you're bound to have to recompile it... frequently.
<bernardofpc>
the only point of opam is Coq (debian stable here)
zpe has quit [Remote host closed the connection]
<bernardofpc>
but then maybe I just upgrade when it needs to
<bernardofpc>
(well, utop also)
zpe has joined #ocaml
badon has quit [Ping timeout: 255 seconds]
<Drup>
whitequark: "jump through the burning ring" :D
zpe has quit [Ping timeout: 240 seconds]
nk0 has quit [Remote host closed the connection]
<Kakadu>
boegel|work: Any chance to install OCaml using opam?
maattdd has joined #ocaml
topher has joined #ocaml
topher has left #ocaml [#ocaml]
rgrinberg has joined #ocaml
philtor has joined #ocaml
bezirg has joined #ocaml
paolooo has quit [Quit: Page closed]
MercurialAlchemi has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
Hannibal_Smith has quit [Ping timeout: 245 seconds]
NoNNaN has quit [Remote host closed the connection]
<ricky____>
New to OCaml here. I was able to get the base64 library working, but when I try to get the bignum library to work via '#require "bignum";;' in utop, I get 'Error: Reference to undefined global `Zarith_1_2'' Can anyone offer some advice?
<ricky____>
Also, zarith isn't underlined (installed?) when I run 'opam list', but when I run 'opam install zarith', it says it's already installed and at 1.2.
<Drup>
hum, "bignum" is not a library
<Drup>
(afaict, at least)
travisbrady has quit [Quit: travisbrady]
<Drup>
ricky____: does "ocamlfind list | grep zarith" return anything ?
zpe has joined #ocaml
travisbrady has joined #ocaml
<ricky____>
Drup: OK, maybe it's a package and not a lib? I don't really have the differences down yet. The command mentioned returns "zarith (version: 1.2)"
Kakadu has quit [Quit: Page closed]
<Drup>
then you have zarith
<Drup>
why did you want bignum ?
<Drup>
the correct name you should require is "num"
<Drup>
but if you have zarith, it's better in everyway, you should use that
travisbrady_ has joined #ocaml
travisbrady has quit [Read error: Connection reset by peer]
travisbrady_ is now known as travisbrady
<ricky____>
Bignum just looked like what I wanted from the name of it. Says it's "Core-flavoured wrapper around zarith's arbitrary-precision rationals."
maattdd has quit [Ping timeout: 255 seconds]
<Drup>
Oh.
<Drup>
didn't know that one
<Drup>
the name is highly confusing
Anarchos has joined #ocaml
<Drup>
ok, try to reinstall zarith and see if it solves your issue
<jerith>
ricky____: I got that too. I ended up just using zarith directly and ignoring bignum.
zpe has quit [Ping timeout: 244 seconds]
<ricky____>
jerith: The whole thing where it seems like bignum can't see zarith?
<jerith>
ricky____: Yes. The same error.
fold has joined #ocaml
jwatzman|work has joined #ocaml
<ricky____>
jerith: OK, I'll give zarith a shot then.
troutwine_away is now known as troutwine
<ricky____>
Drup: Thanks for the effort.
_0xAX has joined #ocaml
srcerer has joined #ocaml
troutwine is now known as troutwine_away
q66 has joined #ocaml
zpe has joined #ocaml
path[l] has joined #ocaml
<ricky____>
jerith/others: Were you able to find any decent documentation besides source-diving for zarith? The pdf on OCaml Forge is private.
<Drup>
I use ocp-browser
path[l] has quit [Read error: Connection reset by peer]
path[l] has joined #ocaml
AltGr has left #ocaml [#ocaml]
claudiuc has joined #ocaml
claudiuc has quit [Ping timeout: 255 seconds]
<ricky____>
Drup: I'll check it out. Thanks, again. You always seem to have the answers.
Kakadu has joined #ocaml
<whitequark>
Drup: since you have all the answers
<whitequark>
where is the body?!
troutwine_away is now known as troutwine
philtor_ has joined #ocaml
<Drup>
what ? x)
<def`>
corpse or body?
<Drup>
(are you doing a FMA reference ? x)
<whitequark>
... no
<whitequark>
just
<whitequark>
typical "where are the bodies buried"
<Drup>
right x)
WraithM has joined #ocaml
troutwine is now known as troutwine_away
Nahra has joined #ocaml
philtor_ has quit [Ping timeout: 264 seconds]
claudiuc has joined #ocaml
claudiuc has quit [Remote host closed the connection]
claudiuc has joined #ocaml
WraithM has quit [Ping timeout: 240 seconds]
claudiuc_ has joined #ocaml
claudiuc has quit [Read error: Connection reset by peer]
ollehar has joined #ocaml
WraithM has joined #ocaml
WraithM has quit [Ping timeout: 246 seconds]
hhugo has quit [Quit: Leaving.]
travisbrady has quit [Quit: travisbrady]
dsheets has quit [Ping timeout: 245 seconds]
WraithM has joined #ocaml
claudiuc_ has quit [Remote host closed the connection]
claudiuc has joined #ocaml
WraithM has quit [Ping timeout: 240 seconds]
travisbrady has joined #ocaml
<nicoo>
whitequark, Drup : I also read it as an FMA ref :D
* nicoo
now wonders what is the definition of type FMA :o
_0xAX has quit [Ping timeout: 255 seconds]
<nicoo>
ricky____: The documentation in the .mli is pretty good. IIRC, you can generate some HTML with ocamldoc if you prefer that
malo has joined #ocaml
maattdd has joined #ocaml
toroidalcode has joined #ocaml
hhugo has joined #ocaml
ollehar has quit [Ping timeout: 272 seconds]
englishm has joined #ocaml
zennist has joined #ocaml
<zennist>
Is there a way to pattern match the type of a value?
boubou has joined #ocaml
<zennist>
I have a use case where I need to write a 'once' function; which takes a function of (unit -> 'a) and only run that function once no matter how many times it's called
<mrvn>
zennist: so a Lazy?
<zennist>
so I implemented like:
<zennist>
let r = ref None;;
<zennist>
| None -> let res = f () in r:= Some res; res
<zennist>
let once f = match !r with
<zennist>
| Some res -> res;;
<zennist>
mrvn: that's right
<zennist>
I'm a newbie so the immediate problem to my implementation is that once the 'once' function is run with one argument say "f ()", it can't be run with any other argument any more
<zennist>
because the saved reference would have mismatched type
<mrvn>
zennist: let once f = let r = ref None in function () -> match !r with | None -> let res = f () in r:= Some res; res | Some res -> res;;
claudiuc has quit [Remote host closed the connection]
<mrvn>
let onced = once f in .... onced (); onced (); onced ()
ollehar has joined #ocaml
<zennist>
Ok I see. Using let...in scoping to act like private variable as in some language like Java
<zennist>
and then using partial function as an "instance"
<zennist>
This way I can avoid polluting my toplevel. cool. thanjks
zacts has joined #ocaml
<mrvn>
zennist: as mentioned Ocaml has Lazy for that, which is optimized in the compiler
hhugo has quit [Quit: Leaving.]
<zennist>
mrvn: can you give me an example of using Lazy?
<mrvn>
# let f () = Printf.printf "evaluating f\n%!"; 23;;
<mrvn>
val f : unit -> int = <fun>
<mrvn>
# let once = Lazy.from_fun f;;
<mrvn>
val once : int Lazy.t = <lazy>
<mrvn>
Lazy.force once;;
hhugo has joined #ocaml
ollehar has quit [Quit: ollehar]
<zennist>
very cool
bezirg has quit [Remote host closed the connection]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
thomasga has joined #ocaml
hhugo has quit [Quit: Leaving.]
badon has joined #ocaml
dsheets has joined #ocaml
thomasga has quit [Quit: Leaving.]
fold has quit [Ping timeout: 246 seconds]
englishm_ has joined #ocaml
zpe_ has joined #ocaml
jzelinskie_ has joined #ocaml
Mercuria1Alchemi has joined #ocaml
cross_ has joined #ocaml
Mandus_ has joined #ocaml
cyanure__ has joined #ocaml
pollux__ has joined #ocaml
gasche_ has joined #ocaml
NaCl_ has joined #ocaml
zennist has left #ocaml [#ocaml]
englishm has quit [*.net *.split]
zpe has quit [*.net *.split]
MercurialAlchemi has quit [*.net *.split]
cross has quit [*.net *.split]
seliopou_ has quit [*.net *.split]
gasche has quit [*.net *.split]
Arsenik has quit [*.net *.split]
NaCl has quit [*.net *.split]
pyon has quit [*.net *.split]
tizoc has quit [*.net *.split]
samebchase has quit [*.net *.split]
misv_ has quit [*.net *.split]
pollux has quit [*.net *.split]
jzelinskie has quit [*.net *.split]
Mandus has quit [*.net *.split]
pollux__ is now known as pollux
tizoc has joined #ocaml
pyon has joined #ocaml
misv has joined #ocaml
badon has quit [Ping timeout: 264 seconds]
jzelinskie_ is now known as jzelinskie
badon has joined #ocaml
samebchase has joined #ocaml
_andre_ has quit [Quit: leaving]
claudiuc has joined #ocaml
badon has quit [Ping timeout: 260 seconds]
zennist has joined #ocaml
<zennist>
Can someone tell me the difference between "Node of 'a * 'b" and "Node of ('a * 'b)"?
maattdd has quit [Ping timeout: 244 seconds]
<flux>
in the former, 'a * 'b isn't a tuple that can be captured into a variable of type 'a * 'b
<flux>
it can be thought to be part of the triple that contains also the constructor Node (but not really..)
<zennist>
..okay..but the expressions might appear as exactly the same
<flux>
in practice, it means the former cannot be matched with expression Node a, it must be matched with Node (a, b)
<def`>
the first is a constructor with two fields, the second a constructor with one field which happens to be a pair :)
<flux>
but the latter can be matched with both
<zennist>
cool
<flux>
in practice also it means the former is a bit more memory-efficient
<flux>
but if you don't care too much about such things, like I don't, just use the latter so you can easily capture the tuple :)
hhugo has joined #ocaml
<zennist>
that's really helpful, especially the difference in pattern matching
<zennist>
I do notice that when printing a type the toplevel never includes the brackets for tuples unless absolutely necessary
<zennist>
that's the main reason contributing to my confusion...
claudiuc_ has joined #ocaml
claudiuc_ has quit [Remote host closed the connection]
claudiuc has quit [Read error: Connection reset by peer]
claudiuc has joined #ocaml
maattdd has joined #ocaml
philtor_ has joined #ocaml
njcomsec has joined #ocaml
boubou has quit [Quit: Page closed]
Mandus_ is now known as Mandus
ggole has quit []
nlucaroni has joined #ocaml
eikke__ has quit [Ping timeout: 255 seconds]
philtor_ has quit [Ping timeout: 245 seconds]
eikke__ has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Nahra has quit [Ping timeout: 240 seconds]
Nahra has joined #ocaml
freling has quit [Ping timeout: 240 seconds]
dsheets has quit [Ping timeout: 240 seconds]
freling has joined #ocaml
jbza has joined #ocaml
<jbza>
I would like to define an interface with an abstract type T, then in a separate file, define functions that take in T as an argument.
<jbza>
How can this be accomplished?
<jbza>
I mean, in a separate file, define functions that take an argument of type T
Mercuria1Alchemi has quit [Ping timeout: 240 seconds]
<mrvn>
you just do.
<mrvn>
let foo x = ()
<Tekk_>
jbza: you just include the other file
<mrvn>
val foo : M.t -> unit
<mrvn>
^^ in the mli
<mrvn>
or let foo (x : M.t) = ()
ontologiae has quit [Ping timeout: 260 seconds]
<mrvn>
Doing something usefull with T is harder. you need a functor over the interface or a first class module implementing the interface to use the abstract type.
<Tekk_>
mrvn: that's pretty much what he wants though
<Tekk_>
he just wants an interface that he can implement
<mrvn>
A simpler way is to pass a closure, a record of closures or an object. A functor or first class module is worth it though if you have a bunch of functions.
<mrvn>
plus its coolness factor.
<jbza>
Thanks for the responses
<mrvn>
If you wanted to know about functors then the manual has some simple examples
philtor has quit [Ping timeout: 240 seconds]
maattdd has quit [Ping timeout: 250 seconds]
<jbza>
I have read much about functors today, but have not had much luck
<jbza>
What I have (want to do) is this:
claudiuc has quit [Remote host closed the connection]
<jbza>
"module type foo : type a ..... end" and below it some functions that operate over a provided foo
claudiuc has joined #ocaml
travisbrady has quit [Ping timeout: 246 seconds]
<mrvn>
jbza: so you need a functor from Foo -> Module_operating_on_foo
<jbza>
Ok, and within that functor I would define the operations on Foo?
<mrvn>
grogging functors is hard the first few times
englishm_ has quit [Remote host closed the connection]
englishm has joined #ocaml
philtor_ has joined #ocaml
jbza has quit [Quit: Page closed]
<ricky____>
nicoo: A little late, but yeah, finding and reading z.mli was where I was figuring out what's going on in zarith. I used ocamldoc to generate html as you suggested, and that's really handy. Thanks for the tip!
S11001001 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Khady has joined #ocaml
gustav___ has quit [Ping timeout: 250 seconds]
bcuccioli has joined #ocaml
dmbaturin_ has joined #ocaml
samebcha1e has joined #ocaml
path[l]_ has joined #ocaml
jpdeplaix has quit [Ping timeout: 246 seconds]
bcucciol1 has quit [Ping timeout: 246 seconds]
samebchase has quit [Ping timeout: 246 seconds]
ddosia has quit [Ping timeout: 246 seconds]
dmbaturin has quit [Ping timeout: 246 seconds]
Khady_ has quit [Ping timeout: 246 seconds]
Kakadu has quit [Quit: Konversation terminated!]
path[l] has quit [Ping timeout: 264 seconds]
path[l]_ is now known as path[l]
jpdeplaix has joined #ocaml
gustav___ has joined #ocaml
ddosia has joined #ocaml
cyanure__ has quit [Remote host closed the connection]
jbza has joined #ocaml
path[l] has quit [Read error: Connection reset by peer]
path[l] has joined #ocaml
shinnya has joined #ocaml
Denommus has joined #ocaml
<Denommus>
if I am to program a compiler for the LLVM, which libraries do you recommend me to use?
<Drup>
you mean, "to llvm" ?
<Drup>
just use the llvm ocaml bindings
jbza has quit [Quit: Page closed]
<Denommus>
yes, I meant to llvm. Sorry, sometimes "to" and "for" confuse me because I'm not a native speaker
<Drup>
no problem :)
<Denommus>
I just checked that they're on opam
<Drup>
sure, simply the llvm package
Simn has quit [Quit: Leaving]
studybot has joined #ocaml
studybot_ has quit [Ping timeout: 264 seconds]
englishm has quit [Remote host closed the connection]
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 240 seconds]
eikke__ has quit [Ping timeout: 244 seconds]
travisbrady has quit [Quit: travisbrady]
darkf has joined #ocaml
madroach has quit [Ping timeout: 250 seconds]
madroach has joined #ocaml
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
troutwine_away is now known as troutwine
dotfelix has joined #ocaml
nojb has joined #ocaml
travisbrady has joined #ocaml
<nojb>
What is the best way to generate OCaml ASTs ?