flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
q69 has quit [Remote host closed the connection]
darkf has joined #ocaml
ivan\ has quit [Ping timeout: 240 seconds]
hcarty has quit [Ping timeout: 240 seconds]
ivan\ has joined #ocaml
eikke has quit [Ping timeout: 256 seconds]
eikke has joined #ocaml
clintnewsom has joined #ocaml
clintnewsom has quit [Client Quit]
clintnewsom has joined #ocaml
eikke has quit [Ping timeout: 256 seconds]
clintnewsom has quit [Quit: clintnewsom]
clintnewsom has joined #ocaml
clintnewsom has quit [Client Quit]
clintnewsom has joined #ocaml
clintnewsom has quit [Client Quit]
lusory_ has quit [Remote host closed the connection]
awm22 has quit [Quit: Leaving.]
foo303 has quit [Read error: Connection reset by peer]
foo303 has joined #ocaml
leoncamel has joined #ocaml
bru` has quit [Ping timeout: 245 seconds]
walter|r has quit [Quit: Leaving]
ollehar1 has quit [Ping timeout: 240 seconds]
chambart has quit [Ping timeout: 256 seconds]
darkf_ has joined #ocaml
darkf has quit [Ping timeout: 245 seconds]
darkf_ is now known as darkf
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
weie_ has quit [Quit: Leaving...]
areece has quit [Quit: No Ping reply in 180 seconds.]
areece has joined #ocaml
milosn has quit [Ping timeout: 264 seconds]
jlouis_ has joined #ocaml
jlouis has quit [Ping timeout: 240 seconds]
yacks has joined #ocaml
weie has joined #ocaml
bernardofpc has quit [Ping timeout: 240 seconds]
bernardofpc has joined #ocaml
sivoais has quit [Ping timeout: 240 seconds]
sivoais has joined #ocaml
cdidd has joined #ocaml
<orbitz> thelema: yes adding types worked for me. Times like this I really wis hI could separate the annotation from the defintion in something not in a .mli
alxbl has quit [Remote host closed the connection]
caligula__ has quit [Quit: Konversation terminated!]
clintnewsom has joined #ocaml
<flux> orbitz, was it your so called main.ml?
<flux> orbitz, ie. a file you don't export symbols from
<flux> orbitz, if so, you can just touch main.mli and be done with it :)
caligula has joined #ocaml
clintnewsom has quit [Quit: clintnewsom]
sysopfb has quit [Ping timeout: 264 seconds]
sysop_fb has joined #ocaml
mikurubeam has joined #ocaml
leoncamel has quit [Ping timeout: 256 seconds]
<orbitz> flux: yes it is, I could but that says something that isn't true (stuff in this module should be called from outside of it) whih I like less
Cyanure has joined #ocaml
<flux> orbitz, it says "stuff described in this interface file can be called from outside. that is, nothing can."
<flux> echo '(* nothing exported *)' > main.mli would be better, of course
<orbitz> flux: ohh, i see
<orbitz> flux: the poblem I'm having though i stype inference doesn't work for this function so I need to type annotate it
<orbitz> Which is ugly in ocaml unelss it's in a .mli
<flux> orbitz, you can use this syntax, which is more mli-like: let f : int -> 'a -> 'a -> bool = fun x y z -> false
<flux> orbitz, or, if you insist, you can put the stuff inside a module :) : module Bar : sig val f : int -> 'a -> 'a -> bool end = struct let f x y z = false end
<flux> but if type inference is not working, it sounds like you have a polymorphic recursive function..
<flux> so you would need recursive modules as well..
adotbrown has quit [Ping timeout: 256 seconds]
Cyanure has quit [Remote host closed the connection]
chambart has joined #ocaml
ggole has joined #ocaml
Snark has joined #ocaml
chambart has quit [Ping timeout: 256 seconds]
yacks has quit [Ping timeout: 260 seconds]
<orbitz> flux: yeah, still ugly
<orbitz> i'm aware of all the options, just none of them are better than the fictional solution of allowing 'val' statements in .ml's :)
adotbrown has joined #ocaml
Yoric has joined #ocaml
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
Cyanure has joined #ocaml
yacks has joined #ocaml
<ggole> Hmm? What's the point of that?
<ggole> If you want a more restrictive type in a .ml, can't you annotate the binding?
Yoric has quit [Ping timeout: 256 seconds]
adotbrown has quit [Ping timeout: 252 seconds]
<adrien> avsm: oh, btw, I mentionned a friend of mine worked on a chip with several cpu architectures; I've asked him again on they've got two ARM9, one SH4 and 5 or 6 custom CPUs from ST, on the same die
Cyanure has quit [Remote host closed the connection]
<orbitz> ggole: Inference cannot actually infer the type I have proeprly (type error), but annotating it works
<orbitz> ggole: I believ eit's related to an open polymorphic variant being returned
Kakadu has joined #ocaml
lusory has joined #ocaml
thomasga has joined #ocaml
cago has joined #ocaml
mika1 has joined #ocaml
awm22 has joined #ocaml
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
hkBst has joined #ocaml
ollehar has joined #ocaml
anderse has joined #ocaml
hkBst has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
eikke has joined #ocaml
hkBst has quit [Remote host closed the connection]
hkBst has joined #ocaml
ontologiae has joined #ocaml
ttamttam has joined #ocaml
anderse has quit [Quit: anderse]
yacks has quit [Ping timeout: 245 seconds]
yacks has joined #ocaml
adrien_o1w is now known as adrien_oww
bru` has joined #ocaml
eikke has quit [Ping timeout: 252 seconds]
eikke has joined #ocaml
Yoric has joined #ocaml
tane has joined #ocaml
yacks has quit [Ping timeout: 276 seconds]
beckerb has joined #ocaml
Yoric has quit [Ping timeout: 256 seconds]
hkBst has quit [Remote host closed the connection]
Yoric has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
mcclurmc has quit [Ping timeout: 258 seconds]
ontologiae has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
ttamttam has quit [Ping timeout: 264 seconds]
ttamttam has joined #ocaml
yacks has joined #ocaml
ontologiae has quit [Quit: Lost terminal]
wwilly has joined #ocaml
martin__ has joined #ocaml
<martin__> Hello. Can't seem to get gbd debugging to work with ocaml 4.0 (building with oasis). How do I set oasis to pass -g to ocamlopt?
<wwilly> o/
ontologiae has joined #ocaml
ontologiae has quit [Client Quit]
hcarty has joined #ocaml
Yoric has joined #ocaml
ulfdoz has joined #ocaml
maufred has quit [Quit: Lost terminal]
<martin__> Anyone got time to help me get gdb debugging to work with ocaml?
maufred has joined #ocaml
martin__ has quit [Remote host closed the connection]
leoncamel has joined #ocaml
_andre has joined #ocaml
ollehar has quit [Ping timeout: 256 seconds]
mikurubeam has joined #ocaml
ontologiae has joined #ocaml
SanderM has joined #ocaml
thomasga has quit [Quit: Leaving.]
jbrown has joined #ocaml
yacks has quit [Ping timeout: 252 seconds]
SanderM has quit [Remote host closed the connection]
clintnewsom has joined #ocaml
adrien has quit [Read error: Operation timed out]
adrien has joined #ocaml
SanderM has joined #ocaml
thomasga has joined #ocaml
BiDOrD has quit [Ping timeout: 264 seconds]
<bru`> Hi. I'm doing C++ bindings, and returning a C++ object that's seen as "type solver_t" in my code.
<bru`> So first, I have to return a *pointer* to my object, right?
<Kakadu> yep
<bru`> (and allocate the object with new so it's in the heap etc.)
<bru`> but after that, when some functions use it, should I re-copy it every time?
<Kakadu> re-copy?
<bru`> ex: external my_fun: solver_t -> int -> solver_t = "my_cpp_fun"
<bru`> I think I cannot just change the object in the cpp part
BiDOrD has joined #ocaml
<bru`> or I'd have to define the function as such:
<Kakadu> I can if it is what u want
<bru`> external my_fun: solver_t -> int -> unit = "my_cpp_fun"
<Kakadu> s/I/you/
<bru`> I don't especially want it, I'm only wondering about side-effects
<bru`> (that could explain my binding crashing ^^à
<bru`> *)
<Kakadu> I don't think that it could explain
<Kakadu> I'm pretty sure that it is not explanation
<bru`> mhh ok
clintnewsom has quit [Quit: clintnewsom]
<ggole> I believe OCaml would see a solver_t as simply a foreign pointer and know nothing about any kind of copying
mikurubeam has quit [Ping timeout: 276 seconds]
<ggole> (Except duplication of the value of the pointer)
<Kakadu> also it is better to wrap this pointer to abstract value
<ggole> If the C++ code changes the value of the pointer, ie by reallocating of the object or a container it is in, then bad things will happen
<ggole> That could cause a crash
chambart has joined #ocaml
<ggole> "Invalidates" would be a better word than "changes".
yacks has joined #ocaml
mcclurmc has joined #ocaml
weie has quit [Read error: Connection reset by peer]
weie has joined #ocaml
toolslive has joined #ocaml
ttamttam has quit [Ping timeout: 258 seconds]
ttamttam has joined #ocaml
mikurubeam has joined #ocaml
Yoric has quit [Quit: Instantbird 1.4a1pre -- http://www.instantbird.com]
ulfdoz has quit [Ping timeout: 260 seconds]
<companion_cube> thomasga: I think there's a small bug in http://opam.ocamlpro.com/pkg/index.html (the query 'html' does not respond, although ' html' or 'html ' do)
<companion_cube> (sorry if I'm bothering you for irrelevant things)
srdjan has joined #ocaml
<srdjan> type 'a gen = unit -> 'a;; type producer = unit gen
<srdjan> why is 'type producer = unit gen' valid code?
<srdjan> I thought that 'unit' has to be "alone" in any type declaration
<orbitz> srdjan: hrm? that ijus thas the type unit -> unit
<orbitz> what is wrong with that type?
<thomasga> companion_cube: not sure I understand your issue
<thomasga> I guess all the packages have html in their contents
<thomasga> because they all have a link to an html page
<companion_cube> oh.
<thomasga> but I agree that's not ideal :-)
<companion_cube> my bad :)
<companion_cube> srdjan: unit is a type parameter here
<thomasga> companion_cube: I guess the regexp goes to the full row contents and does not go inside links
clintnewsom has joined #ocaml
<srdjan> orbitz: unit -> unit ?
<orbitz> Is there any decent way to express an FSM where some states only happen once and to get into the next state you know you can never go back tothe previous one so you don't watch to match against it, but you don't want to do a wildcard match
<orbitz> srdjan: is that a question?
<srdjan> orbitz: to me it looks like: unit unit -> 'a
<srdjan> orbitz: and there is my confusion
<orbitz> srdjan: type 'a gen = unit -> 'a;; why would replaceing 'a with unit give you (unit unit -> 'a)?
<srdjan> orbitz: I am not very familiar with ocaml, and that is the reason why I am askin this kind of question (sorry if my questions sound stupid)
jbrown has quit [Remote host closed the connection]
<orbitz> srdjan: you don't have to know the answers, but you should have some reason why you turned (unit -> 'a) into (unit unit -> 'a)
<srdjan> orbitz: please, could you explain me why 'type producer = unit gen' is equivalent to 'type producer = unit -> unit'?
<srdjan> orbitz: good point
<orbitz> srdjan: because you replace the 'a with the type you gavegen
<orbitz> gave gen
hkBst has quit [Ping timeout: 258 seconds]
<orbitz> so replacing 'a with unit is (unit -> unit)
<ggole> Maybe he got confused because ocaml's type constructor arguments are on the left
<srdjan> orbitz: I am looking at the following code: https://github.iu.edu/sabry/PPYield/blob/master/simple_gen.ml
<srdjan> orbitz: and I am trying to understand it
<orbitz> srdjan: Oleg's code might not be the best place to start with learning ocaml
<srdjan> orbitz: can you translate that doce to haskell?
<srdjan> orbitz: code*
<orbitz> no
<srdjan> orbitz: it is something like: data Gen a = () -> ....
<orbitz> srdjan: probably
<srdjan> orbitz: np
<orbitz> data Gen a = () -> a
<srdjan> orbitz: and how is the second line?
<orbitz> srdjan: 'a is a type variable, so when you make a type with it you replace instances of 'a with the type you give it
<orbitz> srdjan: i don't know I didn't open the .ml file
<orbitz> srdjan: I know that I been programming non trivial thing sin ocaml and it would take me a godo day of reading and working out that code to really understand it
<ggole> srdjan, type arguments are on the left
<ggole> which is... uh, odd
<orbitz> heh
<orbitz> I think i must be the only person that likes it :)
<ggole> It does lead to fewer parens in practice
<ggole> I dunno if that's worth it
<srdjan> orbitz: ggole: thanks
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
<orbitz> ggole: i think i like it becuase it generally emphasisize the type i'm more interested in. It doesn't really matter I guess, maybe i like it just because that 's wehre I started
<ggole> Yeah, I've gotten used to it. I think the Haskell way is a bit more consistent, but it doesn't really matter much.
<ggole> I do like OCaml's little ' to indicate a type variable though
<orbitz> yeah that's cute
<orbitz> does SML use ' as well?
<ggole> Yeah
<ggole> The core of OCaml is very close to SML
ulfdoz has joined #ocaml
SanderM has quit [Remote host closed the connection]
milosn has joined #ocaml
<toolslive> from the top of my head: SML uses => iso -> and functions have only 1 parameter (so you use tuples)
<ggole> Records and arithmetic ops are typed a bit differently, too
<ggole> + defaults to int, but works for float if there's an annotation (or inference)
srdjan has quit [Quit: Page closed]
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
Yoric has joined #ocaml
q66 has joined #ocaml
darkf has quit [Quit: Leaving]
Neros has joined #ocaml
ttamttam has quit [Ping timeout: 272 seconds]
eikke has quit [Ping timeout: 256 seconds]
eikke has joined #ocaml
ulfdoz has quit [Ping timeout: 260 seconds]
hkBst has quit [Read error: Connection reset by peer]
hkBst has joined #ocaml
mye has joined #ocaml
Neros_ has joined #ocaml
Neros has quit [Read error: Connection reset by peer]
mye has quit [Quit: mye]
beginner42 has joined #ocaml
<beginner42> how can it be that opam tells me some package is installed, but ocamlfind does not list it?
<zorun> env vars not being properly defined?
<beginner42> i pinned this specific package, i had to repeat the installation process a few time, but then the installation completed. Problem is now that my programs do not compile anymore, because that package cant be found
<beginner42> zorun: how can i verify if my env vars are properly defined or not?
<zorun> beginner42: hmm, I don't remember exactly which ones you need, but check the doc (and maybe “opam config env” or something similar)
hkBst has quit [Read error: Connection reset by peer]
beckerb has quit [Ping timeout: 245 seconds]
ollehar has joined #ocaml
ulfdoz has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
cago has left #ocaml []
mika1 has quit [Quit: Leaving.]
Neros_ has quit [Ping timeout: 245 seconds]
bru` has quit [Ping timeout: 255 seconds]
mikurubeam has joined #ocaml
Yoric has joined #ocaml
bru` has joined #ocaml
Kakadu has quit []
thomasga has quit [Quit: Leaving.]
Neros has joined #ocaml
bru` has quit [Ping timeout: 245 seconds]
fraggle_ has quit [Read error: Connection reset by peer]
tomprince has joined #ocaml
fraggle_ has joined #ocaml
tomprince has left #ocaml []
ollehar has quit [Ping timeout: 256 seconds]
Neros has quit [Remote host closed the connection]
bru` has joined #ocaml
Kakadu has joined #ocaml
hto has quit [Remote host closed the connection]
hto has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
ttamttam has joined #ocaml
thomasga has joined #ocaml
ontologiae has quit [Ping timeout: 264 seconds]
ohama has quit [Quit: leaving]
<thelema> beginner42: eval `opam config env`
ohama has joined #ocaml
RagingDave has joined #ocaml
Neros has joined #ocaml
eikke has quit [Ping timeout: 276 seconds]
mcclurmc has quit [Ping timeout: 245 seconds]
bru` has quit [Ping timeout: 264 seconds]
travisbrady has joined #ocaml
jbrown has joined #ocaml
djcoin has joined #ocaml
Neros has quit [Ping timeout: 245 seconds]
<beginner42> thelema: i have tried that, but that does not fix my problem.
<thelema> beginner42: which ocamlfind
Yoric has joined #ocaml
<beginner42> ~/.opam/4.00.0/bin/ocamlfind
<thelema> beginner42: that's good.
<thelema> ocamlfind printconf <- what is search path?
ulfdoz has quit [Ping timeout: 256 seconds]
chambart has quit [Read error: Operation timed out]
<beginner42> Effective configuration: Configuration file: /home/me/.opam/4.00.0/lib/findlib.conf Search path: /home/me/.opam/4.00.0/lib Packages will be installed in/removed from: /home/me/.opam/4.00.0/lib META files will be installed in/removed from: the corresponding package directories The standard library is assumed to reside in: /home/me/.opam/4.00.0/lib/ocaml The ld.conf file can be found here: /home/me/.opam/4.00.0/lib/ocaml
<thelema> ok, and does the package you're trying to access have a folder in /home/me/.opam/4.00.0/lib?
<beginner42> thelema: no
<thelema> ok, the package isn't really installed.
<thelema> what package?
<beginner42> promela
<beginner42> i pinned my local version, and did some extensions and then tried to install it
<thelema> did some extensions?
<beginner42> added some alternative backend
<beginner42> opam install promela gives me now this ouptut: ocamlfind: Package promela is already installed
ttamttam has quit [Remote host closed the connection]
<thelema> maybe ask opam to remove promela before reinstalling it
ttamttam has joined #ocaml
<beginner42> then i get promela is not installed.
emmanuelux has joined #ocaml
<thelema> ah, the uninstall fails because the ocamlfind remove fails... hmm
<toolslive> maybe a silly question, but do you also have a system ocaml installed via apt-get or something similar?
<beginner42> it says also that the META file in a folder alread exists
ggole has quit [Quit: Ex-Chat]
<thelema> beginner42: grep promela ~/.opam/4.00.0/installed
<beginner42> thelema: nothing
<thelema> then maybe you've succeeded at removing promela in opam. How are you trying to reinstall?
<beginner42> opam install promela
<orbitz> and you've pinned it?
<beginner42> orbitz: yes
<orbitz> so opam remove says it's not installed and opam install says it is?
<beginner42> orbitz: yes
<beginner42> file /path/to/lib/ocaml/site-lib/promela/META already exists
<orbitz> and does that exist?
<beginner42> orbitz: yes, but i dont understand, why ocaml is looking there?
<orbitz> and you did eval `opam config -env`?
<orbitz> in the shell you're using
<orbitz> beginner42: ocaml isn't, ocamlfind is
<beginner42> oribtz: that was the first thing i tried, but did not help
djcoin has quit [Quit: WeeChat 0.3.9.2]
<thomasga> beginner42: seems that promela Makefile is getting the wrong ocamlfind
<thomasga> I guess this is hard-coded
toolslive has quit [Remote host closed the connection]
<thomasga> try to delete /path/to/pinned/path/setup.data
<beginner42> thomasga: yes :) i greped ocamlfind in the promela folder and it points to another ocamlfind
<beginner42> thomasga: can i somehow generate the setup.data file new?
<thomasga> if you want to pin a local path, it's better to do some cleaning before
<thomasga> yup, OPAM will generate setup.data
<beginner42> how to?
<thomasga> in its own path
maufred_ has joined #ocaml
<thomasga> it will rsync your local path into ~/.opam/4.00.0/pinned.cache/promela
<beginner42> with what command?
<thomasga> well with no command
<thomasga> opam update promela
<beginner42> but before that unpin promela or not?
<thomasga> normally you don't need to
<beginner42> Everything is up-to-date.
<beginner42> but the setup.data file is still wrong
<thomasga> which setup.data ?
amaloz has joined #ocaml
<beginner42> the one in my promela folder
<thomasga> well just delete it
<beginner42> the one i pinned
<thomasga> as I said, it's better if the pinned path is clean
maufred_ has quit [Client Quit]
<beginner42> i dont quite understand what opam does with the existing oasis files?
BiDOrD has quit [Ping timeout: 260 seconds]
Neros has joined #ocaml
<thomasga> well he does nothing, he just runs the commands which are in the opam file
<thomasga> basically, local pinning is just rsync + the commands in that file
<thomasga> if your path is not clean, you'll hit a bug in oasis which does not update setup.data if it is already there
<beginner42> can i tell oasis to update?
<thomasga> ?
<thomasga> does it work now ?
<beginner42> i deleted the setup.data file, but it s still the same error
notk0 has joined #ocaml
<notk0> hello
<notk0> does anyone know why this is defined this way
<notk0> | Lletrec of (Ident.t * lambda) list * lambda
<thomasga> what is your error exaclty ?
<thomasga> are you using a package which depends on your patched promela ?
<beginner42> thomasga: after i deleted the setup.data file, i removed the pin and pinned it again and now it seems to work :)
<thomasga> (I guess no, as they are no such packages in opam-repository)
<thomasga> ha right
<notk0> a function is function_kind * Ident.t list * lambda, why is let rec different?
<beginner42> thanks a lot
<thomasga> in anycase, if you don't have packages depending on promela it's easier to just work in your /pinned/path instead of pinnig
<thomasga> no pb
<beginner42> thomasga: promela is like one of my most used packages so basically everything depends on that
<thomasga> so you have your own repository of packages ?
<beginner42> on github?
BiDOrD has joined #ocaml
<thomasga> what I'm saying is you don't need to pin promela if you don't have any packages managed by OPAM depending on it
<thomasga> but if it works for you that's fine
<thomasga> anyway, I have to go
<thomasga> good luck :)
<beginner42> thanks again
thomasga has quit [Quit: Leaving.]
beginner42 has quit [Quit: irc2go]
xavierm02 has joined #ocaml
xavierm02_ has joined #ocaml
xavierm02 has quit [Client Quit]
xavierm02_ has quit [Client Quit]
xavierm02 has joined #ocaml
ulfdoz has joined #ocaml
mcclurmc has joined #ocaml
yacks has quit [Remote host closed the connection]
xavierm02 has quit [Quit: Cya.]
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 256 seconds]
stephendwyer has joined #ocaml
notk0 has quit [Remote host closed the connection]
Kakadu has quit []
<stephendwyer> Hello all, first time here. I am having some problems with ocamlfind that I can not seem to resolve. In particular, when I install a package with ocamlfind, all the files go to the correct directory, but when I do "ocamlfind query -l PACKAGENAME" the location is incorrect!
<thelema> stephendwyer: ocamlfind printconf
<thelema> there are two configs: search path and packages will be installed/removed from
<stephendwyer> search path:
<thelema> if the second isn't a subset of the first, you can have the problem you're having
<thelema> s/subset/element/
<stephendwyer> they are the same
<thelema> that's good. hmmm
<orbitz> and it's not in ocamlfind list?
<stephendwyer> it IS in ocamlfind list
<stephendwyer> everything looks great, except the location in the query is incorrect and then when compiling a project, it can't find the packages
<orbitz> does the path it give not exist?
<stephendwyer> I have tried using make install for the package as well as calling ocamlfind install directly
<thelema> very odd; is your META file for that package weird?
<thelema> I think the META file can override things
<thelema> it normally doesn't have any paths in it
<stephendwyer> correct, the path that query gives does not exist
<stephendwyer> It could be the META file (I didn't write it, and have extremely limited ocaml experience…. :) )
<stephendwyer> also, fyi, the end goal is a macport of the package
<thelema> ah, the "directory = +ivy" is breaking things; remove it from the META
<stephendwyer> ah ok
<stephendwyer> will that break anything? assuming findlib is being used?
<thelema> those META files are for ... hmm, something installed not through ocamlfind, I'd guess
<stephendwyer> hmm ok
<thelema> findlib normally uses the directory it installed into as the directory for the package
<stephendwyer> well i will talk to the guy who wrote those metafiles
<thelema> He might blame me for their form.
<thelema> Those META files expect the libraries to be installed to `ocamlc -where`/ivy and glibivy
<stephendwyer> yes ok, which is where they are installed by default on his debian-based systems
<thelema> I'm guessing the META files are like that to try to retain compatibility with non-findlib-based build systems
<stephendwyer> yes, that is the case I think
<stephendwyer> is there a way to make them compatible with both?
<thelema> If you can install to that directory, that will be the easiest solution, although not the best. Best is to remove the directory declarations and install to wherever ocamlfind wants, although this will lose backwards compatibility
<thelema> what he's done is only way to have compatibility with both
<thelema> install to +ivy, and tell ocamlfind about it.
<stephendwyer> hmm ok… bummer. I will have a chat and see what the best solution might be
flixr has joined #ocaml
<thelema> Will you have to keep compatibility with scripts that don't use ocamlfind to locate ivy?
<flixr> hi
<flixr> yes... unfortunately..
<stephendwyer> excellent, yes, removing that line from the META fixes it!
<stephendwyer> however, using macports, I can just patch the META files in place
<stephendwyer> I think I will do that
<flixr> which line? sorry, missed the interesting part ;-)
<thelema> stephendwyer: then the correct fix is not to remove that line from the META, but to change how you do the install
<orbitz> direcotry="+ivy"
<thelema> flixr: the directory=
<flixr> ah, right
<flixr> damn
<stephendwyer> thelema: ok, so patching META just before install should work?
<thelema> but if you can patch all the makefiles you have to keep compatible with to use ocamlfind, then patching META works
<flixr> we should change that in the ivy-ocaml svn
<thelema> flixr: you'd lose compatibility with anything doing "-I +ivy" if you patch the META and let ocamlfind handle install path
<flixr> probably not... since previously it was not installed to the ivy dir, but directly in the ocaml dir
<flixr> we have symlinks for backwards compat
<flixr> I think that should work
<thelema> if you have a symlink, that should work
<thelema> mv META.glibivy META
<thelema> this is hackish; can you put the two META files into different subdirs?
<thelema> oh, you weren't installing to +ivy before? eww...
<flixr> yeah, it was real bad...
<flixr> we just recently took over maintainership of this package...
<thelema> glad you're fixing things
ttamttam has quit [Remote host closed the connection]
<stephendwyer> thelema: thanks so much for your insight, very helpful
<thelema> flixr: is there something relatively self-contained that we can pull from your project to use for benchmarking compiler optimizations?
<thelema> flixr: I see the -unsafe flag on ocamlopt, and think that you're trying to squeeze all the performance possible out of ocaml
<thelema> or you're just like running off the end of arrays
<thelema> s/you're/you/
<flixr> puh... to be honest I don't really know.. this was done by another ocaml guru some years ago... unfortunately he is no longer with us..
<thelema> ok. ah, it's embedded, yes?
<flixr> no, the ocaml stuff is running on a normal laptop
<thelema> oh, then I'd recommend turning that off.
<flixr> at least in most cases... I have it running on a raspberry pi as well though...
<flixr> ok, thx.. will do
<thelema> bounds checking is a good thing.
<thelema> and is very cheap on at least intel/amd cpus. I'm not as sure about ARM
<flixr> yes, definitely... I have no idea what that does... has always been like that since I'm with the project
<thelema> -unsafe turns off bounds checking on strings and arrays
<flixr> k, I'd rather have that and spend a few more cycles...
<thelema> yup, it's on by default for a good reason
maufred_ has joined #ocaml
maufred_ has quit [Client Quit]
darkf has joined #ocaml
Neros has quit [Read error: Connection reset by peer]
ulfdoz has quit [Ping timeout: 258 seconds]
<clintnewsom> n00b question,
<clintnewsom> how do you you load an opam module in a project?
<orbitz> define load
<clintnewsom> for instance
<orbitz> compile against?
<clintnewsom> require Batteries; failes
<clintnewsom> failes
emmanuelux has quit [Quit: emmanuelux]
<clintnewsom> fails
<clintnewsom> sorry
<orbitz> in REPL you mean?
<clintnewsom> no
<orbitz> require is not an ocaml keyword
<orbitz> it's a REPL directive
<clintnewsom> sorry
<clintnewsom> i use open Batteries;
<orbitz> ocamlfind -package batteries ../
<clintnewsom> and that fails
<rks_> clintnewsom: with « ; » ?
ulfdoz has joined #ocaml
ontologiae has joined #ocaml
Pantoufle has quit [Ping timeout: 252 seconds]
<clintnewsom> I'm trying to include a module already installed with opam, in a .ml file…it will not compile.
<clintnewsom> the syntax i'm using is "open Batteries;;"… but it fails
<orbitz> ocamlfind -package batteries ocamlc blah blah
<clintnewsom> if anyone knows how use an opam installed module from a file, that would help
<rks_> orbitz: he doesn't want to read you apparently :)
<orbitz> rks_: Random people haveme on /ignore somtimes :)
ontologiae has quit [Ping timeout: 252 seconds]
ontologiae has joined #ocaml
belaid has quit [Quit: Quitte]
adotbrown has joined #ocaml
<clintnewsom> orbitz: figured it out
<clintnewsom> you need to do it in the _tags file
<orbitz> oh, your question is about ocamlbuild
<clintnewsom> orbitz: an the specific syntax is <*>: package(batteries)
<orbitz> I know :) I could have told you if you specifeid you were compilingwith ocamlbuild
<clintnewsom> orbitz: ok, thanks anyhow!
ontologiae has quit [Ping timeout: 260 seconds]
Yoric has quit [Ping timeout: 252 seconds]
adotbrown has quit [Ping timeout: 255 seconds]
Snark has quit [Quit: Quitte]
tianon has quit [Quit: "I'm a very important man. I've got a tower!"]
adotbrown has joined #ocaml
ontologiae has joined #ocaml
tianon has joined #ocaml
clintnewsom has quit [Quit: clintnewsom]
ollehar has joined #ocaml
milosn_ has joined #ocaml
milosn has quit [Ping timeout: 255 seconds]
travisbrady has quit [Quit: travisbrady]
chambart has joined #ocaml
RagingDave has quit [Quit: Ex-Chat]
paddymahoney has quit [Remote host closed the connection]
clintnewsom has joined #ocaml
ulfdoz has quit [Ping timeout: 256 seconds]
Neros has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
mikurubeam has quit [Quit: +1 (Yes). -1 (No). i (WTF?).]
chambart has joined #ocaml
travisbrady has joined #ocaml