gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
iago has quit [Quit: Leaving]
ulfdoz_ has joined #ocaml
justdit has joined #ocaml
ulfdoz has quit [Ping timeout: 248 seconds]
ulfdoz_ is now known as ulfdoz
justdit has quit [Ping timeout: 250 seconds]
justdit has joined #ocaml
justdit has quit [Ping timeout: 246 seconds]
emmanuelux has quit [Ping timeout: 246 seconds]
oriba has quit [Quit: oriba]
justdit has joined #ocaml
justdit has quit [Read error: Connection reset by peer]
justdit has joined #ocaml
justdit has quit [Ping timeout: 248 seconds]
ankit9 has quit [Ping timeout: 240 seconds]
ankit9 has joined #ocaml
justdit has joined #ocaml
justdit has quit [Ping timeout: 248 seconds]
justdit has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
ankit9 has quit [Ping timeout: 252 seconds]
justdit has quit [Quit: Lost terminal]
ankit9 has joined #ocaml
ankit9 has quit [Remote host closed the connection]
ChristopheT has joined #ocaml
ChristopheT has left #ocaml []
edwin has joined #ocaml
xcombelle has joined #ocaml
osa1 has joined #ocaml
hto has quit [Ping timeout: 248 seconds]
osa1 has quit [Ping timeout: 265 seconds]
yezariaely has quit [Ping timeout: 245 seconds]
yezariaely has joined #ocaml
pippijn has quit [Quit: Lost terminal]
fantasticsid has joined #ocaml
pippijn has joined #ocaml
fantasticsid has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Anarchos has joined #ocaml
oriba has joined #ocaml
Cyanure has joined #ocaml
<fasta> ocamlfind says that dlllwt-unix.so can be found in multiple directories. In which directory should it be found?
edwin has left #ocaml []
<fasta> (and how do I know all the directories in which it can be found (the error message doesn't say...)
<adrien> find
<adrien> typically happens because you're mixing several kinds of library installs, and I bet one is godi, the other one is "by hand"
osa1 has joined #ocaml
emmanuelux has joined #ocaml
MaskRay has joined #ocaml
MaskRay has quit [Changing host]
MaskRay has joined #ocaml
MaskRay is now known as \rs2
<fasta> Where can I get /usr/lib/ocaml/cairo/cairo.cmxs?
MaskRay has joined #ocaml
<adrien> from ocaml bindings to cairo?
xcombelle_ has joined #ocaml
<fasta> adrien: I wanted to know where those were, but apparently they are only in the git repo.
xcombelle has quit [Ping timeout: 252 seconds]
<fasta> What is ocamlopt.opt?
<fasta> As opposed to ocamlopt.
bzzbzz has quit [Quit: leaving]
<adrien> file $(which ocamlopt.opt)
<adrien> file $(which ocamlopt)
eikke has joined #ocaml
<fasta> adrien: I don't have one of them, but I want to know what they are.
<fasta> adrien: I just compiled cairo from source and I still don't get the cmxs version.
<fasta> adrien: i.e. cairo-ocaml git repo.
<fasta> adrien: never mind w.r.t. the ocamlopt question.
\rs2 has quit [Quit: leaving]
MaskRay has quit [Quit: leaving]
eikke has quit [Ping timeout: 240 seconds]
ygrek has joined #ocaml
<adrien> cmxs is a recent addition and needs to be explicitely built
<adrien> .opt is native-compiled executable
bzzbzz has joined #ocaml
<fasta> adrien: basically what I want is to test ocsigen executables in opt mode.
<fasta> adrien: it now runs using byte code and I am not getting the stellar performance claimed.
<fasta> adrien: and one of the make targets for the optimized version requires that cairo file.
<fasta> adrien: I don't see anything in the cairo-ocaml make file for enabling these cmxs files.
<fasta> The cairo-ocaml software is also rather amateuristic in that it doesn't even have a make uninstall target.
<adrien> switching to native-compiled (not really "optimized" much) is not a good way to try to get better performance if you do have performance issues
<Anarchos> fasta ocamlopt.opt is the optimized optimizing compiler
<fasta> Anarchos: yes, I know that already now.
<adrien> of course it'll be faster but it won't be that much faster
<Anarchos> fasta it is the compiler in asm building for asm
<adrien> fasta: why would it have an "uninstall" target?
<adrien> nothing has it
<fasta> adrien: because all decent software has that.
<adrien> no
<adrien> use ocamlfind to remove the package
<adrien> ocamlfind remove cairo
<fasta> adrien: it's called adhering to a standard which exists for over 20 years or so.
<fasta> adrien: and that command doesn't work.
<fasta> ocamlfind: [WARNING] You are trying to remove the package from /usr/local/lib/ocaml/3.12.1/cairo but the currently visible package is at /usr/lib/ocaml/cairo; you may want to specify the -destdir option
<fasta> ocamlfind: [WARNING] No such directory: /usr/local/lib/ocaml/3.12.1/cairo
<fasta> "The currently visible package."
<fasta> Sure, I sort of understand what they mean by that.
<fasta> But it wouldn't hurt to explain what they mean by that.
<fasta> (another argument for Nix pkgs, btw)
<fasta> Even multiple make installs don't work for cairo-ocaml.
<fasta> I.e., it's not idempotent.
<fasta> Please, do not defend such packages. It's just bad.
<fasta> It might very well be that 99.99% of the package is great, btw.
<adrien> fasta: I haven't seen anything but two packages with "uninstall" stuff
<fasta> adrien: that's because most people don't understand the autotools.
<fasta> adrien: you get make uninstall for free if you use that.
<fasta> (and it works on tons of platforms with tons of useful options)
<fasta> It's the difference between amateurism and professional software.
<Anarchos> fasta autotools are such a pain to understand even for professionals ..
<adrien> fasta: if you have a borken package installation, first remove it through ocamlfind, then again, then use rm
<adrien> ocaml libs installed through ocamlfind are always neatly placed
<fasta> adrien: again, I have no idea how to remove it via ocamlfind.
<adrien> ocamlfind remove cairo
<fasta> adrien: I specified the destdir option to what I believed to be the right dir, and it didn't work.
<fasta> adrien: I already said that that didn't work.
<adrien> don't use -destdir unless you understand it
<adrien> and then move to the second thing: rm
<fasta> adrien: ocamlfind: [WARNING] You are trying to remove the package from /usr/local/lib/ocaml/3.12.1/cairo but the currently visible package is at /usr/lib/ocaml/cairo; you may want to specify the -destdir option
<fasta> ocamlfind: [WARNING] No such directory: /usr/local/lib/ocaml/3.12.1/cairo
<adrien> OBVIOUSLY
<fasta> adrien: that's what your command returns.
<adrien> you have two installations
<adrien> that's your issue
<fasta> adrien: so, then your instructions are incorrect, no?
<fasta> adrien: ocamlfind remove cairo
<fasta> ocamlfind: [WARNING] No such directory: /usr/local/lib/ocaml/3.12.1/cairo
<fasta> adrien: that's what I get when I remove the operating system installed version.
<adrien> first sort out the fact that you have several installations in different places but all visible at the same time
<fasta> adrien: I have already done so. I had the operating system version and the one under local.
<fasta> adrien: and yet, I still get this back.
<fasta> adrien: I find the method of software installation and removal to be extremely inconsistent thusfar.
<adrien> remove both, start fresh
<fasta> adrien: yeah, about that: I don't even know where it is now.
<fasta> ocamlfind: Package `cairo' not found
<adrien> sorry, I haven't been clear
<adrien> remove both *OCAML* installations
<fasta> adrien: godi isn't in my path anymore.
<adrien> otherwise it's like mixing oil and vinegar and then hoping you can properly separate them
<fasta> adrien: ok, I will see whether I can modify the godi configuration to throw away its compiler.
<adrien> fasta: what is the output of "ocamlc -where"?
<fasta> adrien: /usr/lib/ocaml
xcombelle_ has quit [Quit: I am a manual virus, please copy me to your quit message.]
<fasta> Ok, I nuked godi now.
<fasta> adrien: I don't think cairo-ocaml does anything with ocamlfind.
<adrien> ls /uisr/local/bin/ocaml*
<adrien> ls /usr/local/bin/ocaml*
<fasta> adrien: doesn't exist.
<adrien> why was there something in /usr/local/lib/ocaml/3.12.1/cairo then? how did ocamlfind think of that path?
* Anarchos just compiled ats on haikuOS
<Drakken> Hmm. I rearranged some camlp4 grammar entries and the typechecker said it couldn't generalize some of their type variables.
<Drakken> The code compiled after I put in some type hints, but I didn't know that could happen with grammar entries.
<fasta> adrien: I don't know.
<fasta> adrien: but it simply seems that cairo-caml doesn't register an ocamlfind compatible package.
<adrien> this path is something I have *NEVER* seen
<adrien> in any form
<adrien> so you have to understand what you have done to get it before you can hope to get things right
<fasta> adrien: destdir="/usr/local/lib/ocaml/3.12.1"
<fasta> path="/usr/local/lib/ocaml/3.12.1:/usr/lib/ocaml:/usr/lib/ocaml/METAS"
<fasta> adrien: that's what ocamlfind.conf contains.
<adrien> why does it contain that?
<fasta> adrien: I don't know. I didn't put it there.
<fasta> adrien: what is it supposed to contain?
<adrien> first, it's findlib.conf, and second, where is this META file from?
<adrien> oh
<adrien> aren't you using Nix?
<fasta> adrien: no, I am not using nix.
<fasta> adrien: it's great, but not practical for me yet.
<fasta> adrien: the plan is to move services to it one by one until I can switch.
<adrien> then, where is this .conf file from?
<fasta> adrien: UBuntu
<fasta> adrien: /etc/ocamlfind.conf
<adrien> iirc it's possible to have META files in a separate place
<fasta> adrien: yes, that's possible.
<fasta> adrien: odb makes use of that.
<adrien> as for ubuntu, last I had heard, the packages were not very good
<adrien> I can't say much more
<adrien> but at any rate
<adrien> whatever you do now, avoid having two ocaml installations reachable (in PATH) at the same time
<fasta> adrien: well, I certainly don't have that anymore, but again, I think cairo-ocaml does not use ocamlfind.
<fasta> adrien: and as a result, ocamlfind list doesn't list it after installation.
<adrien> it's possible but either it use it, either it doesn't, but you shouldn't have mixes
<fasta> adrien: or doesn't ocamlfind need to be called explicitly?
<fasta> adrien: I have no mixes anymore.
<fasta> adrien: godi has been rm -rf'ed.
<fasta> adrien: ocaml has been purged and reinstalled.
<adrien> you can "install" with ocamlfind by calling "ocamlfind install", or by putting the files by hand
emmanuelux has quit [Ping timeout: 246 seconds]
osa1 has quit [Ping timeout: 244 seconds]
eikke has joined #ocaml
<fasta> adrien: how does ocamlfind list work?
<fasta> adrien: how does it determine whether or not some 'package' is installed?
<adrien> META fiels
<adrien> files*
<fasta> adrien: and where does it look for those?
<fasta> Anyway, this is why it is nice if programs have a verbose mode.
<fasta> ocamlfind -verbose could simply say 'We are now going to list some packages. This is done by ...'
<fasta> Every conditional could come with a conclusion printed to stdout.
<adrien> fasta: "destdir"
<adrien> that would be useless
<fasta> adrien: in which configuration file again?
<adrien> strace it if you want to see what it does
<adrien> no point in adding code to do the same thing
<adrien> fasta: findlib.conf
<fasta> adrien: that file doesn't exist.
<adrien> then you have a problem probably
<fasta> adrien: that's what Ubuntu does by default.
eikke has quit [Ping timeout: 250 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Snark has joined #ocaml
emmanuelux has joined #ocaml
Anarchos has joined #ocaml
sepp2k has joined #ocaml
ftrvxmtrx has joined #ocaml
K_F has quit [Ping timeout: 240 seconds]
ManateeLazyCat has joined #ocaml
<ManateeLazyCat> Hi, i'm new to OCaml, i want to ask some questions. Is OCaml libraries number enough for particular usage? OCaml program's size is small enough? How fast OCaml program can ? OCaml have package system like dpkg or Cabal (Haskell) or something else? Thanks! :)
<adrien> yes in my opinion, define "small" (lines of code, or generated executable?), can be very fast, and yes
<ManateeLazyCat> adrien: I care about 'executable'
<ManateeLazyCat> adrien: How about compare with Haskell ? I know haskell's executable is not small.
<adrien> define "small" then
<Qrntz> yes, dubious, very fast, yes
<ManateeLazyCat> adrien: I don't want program static link everything, i want to know OCaml how deal with link program?
<adrien> default is static linking; it can use dynamic link too without issue but ask yourself whether it'll help in your current case
* ManateeLazyCat I just compile OCaml-3.12, i wonder it just 3.5M that include everything. GHC have 104M
<adrien> dynamic link will only help if there is another software using the same libraries
xcombelle has joined #ocaml
<adrien> if it's not the case, it won't save anything
<adrien> ManateeLazyCat: yes, everything in that archive for the compiler and the base tools
<adrien> and some libs
<adrien> afaiu, GHC ships precompiled binaries; that probably doesn't help the size
<ManateeLazyCat> adrien: Are you play Haskell? Can you compare Haskell vs OCaml? OCaml have any advantage?
<ManateeLazyCat> adrien: Haven't any affront, I'm just write some Haskell code, i want to try OCaml now, so i want to know some difference between Haskell and OCaml.
slink has joined #ocaml
<adrien> I can't say
<ManateeLazyCat> adrien: Ok, thanks for your detail explanation
* ManateeLazyCat I think best way to answer my question is read some books and start write OCaml code. :)
ManateeLazyCat has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
zerny has joined #ocaml
zerny has left #ocaml []
mcstar has joined #ocaml
<mcstar> im missing something
<mcstar> why is there no option for ocamlopt, to set where to look for the cmx or cmxa files?
<adrien> you're missing something =)
<adrien> and I'd tell you to use ocamlfind instead of doing it by hand
<mcstar> the story is, im trying to compile something with gsl
<mcstar> but it keeps complaining about 'unbound module'
<mcstar> i installed ocaml-gsl
<mcstar> which put the files afaik the right place
<mcstar> and im trying to build an example
<mcstar> and the compiler cant find the modules
<mcstar> what should i do now?
<adrien> use ocamlfind
<mcstar> ok
<mcstar> how?
<mcstar> what does it find?
<adrien> ocaml :P
<adrien> ocamlfind list | grep -i gsl
<mcstar> yes?
<mcstar> that didnt help much, i told you i just installed it
<adrien> what does this command output?
<mcstar> there is gsl installed
<mcstar> thats what it saus
<mcstar> says*
slink has left #ocaml []
<mcstar> when do i need to open a module?
<adrien> which build system do you use for your project?
<mcstar> i thought that you only need to open something, so that you could reference the contents wo module prefix
<mcstar> is that right?
<mcstar> adrien: no build system
<mcstar> no project
<mcstar> just trying to compile a damn file
<adrien> ocamlfind ocamlopt -package gsl -linkpkg yourfile.ml
<adrien> and use an actual build system
<adrien> also, read the doc for "ocamlfind"
<adrien> and I'm off, bed soon
<mcstar> ok, thanks
<mcstar> (but i just wanted to buld 1 single file, why should i use a buildsystem?)
<mcstar> ok, it seems to have worked
<mcstar> though, i have no idea why cant be ocamlopt be parameterized properly by hand
<adrien> ocamlfind ocamlopt -verbose -package gsl -linkpkg yourfile.ml
<adrien> and read
<adrien> I consider not using ocamlfind to be a very bad thing
<adrien> 297M slackware64-current/source/kde/src/oxygen-icons-4.8.4.tar.xz
<adrien> wrong chan, sorry
<mcstar> adrien: do you know Faenza icons? they are beautiful
hto has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Cyanure has quit [Remote host closed the connection]
K_F has joined #ocaml
Cyanure has joined #ocaml
eikke has joined #ocaml
Snark has quit [Quit: Quitte]
emmanuel__ has joined #ocaml
cyrano has joined #ocaml
emmanuel__ has quit [Read error: Connection reset by peer]
cyrano has quit [Quit: Quitte]
cyrano has joined #ocaml
<cyrano> hello
<cyrano> what did you advice as std lib for new project that will run under linux/mac/windows: batterie, extlib, core ? i need to launch many external programme and create/read json file.
ftrvxmtrx has joined #ocaml
eikke has quit [Ping timeout: 255 seconds]
<K_F> I'd imagine async of core should work nicely for that
<K_F> but I'm working with the core developers on another project, so I'm biased :)
<cyrano> K_F: Does core run under windows ?
<K_F> I honestly haven't tried myself, but don't foresee why not
xcombelle has quit [Quit: I am a manual virus, please copy me to your quit message.]
cyrano has quit [Ping timeout: 255 seconds]
cyrano has joined #ocaml
ygrek has quit [Ping timeout: 276 seconds]
sepp2k has quit [Remote host closed the connection]
ygrek has joined #ocaml
ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
cyrano has quit [Quit: Quitte]
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 252 seconds]
ygrek has quit [Quit: Leaving]
tbrady has joined #ocaml
emmanuelux has quit [Ping timeout: 246 seconds]
mcstar has quit [Quit: mcstar]
sepp2k has joined #ocaml
agarwal1975 has joined #ocaml
agarwal1975 has quit [Client Quit]
<tbrady> How do you reliably read all of stdin into a string in OCaml? I'm calling 'input stdin' recursively, but it returns 0 before all data has been read.
<_habnabit> tbrady, are you using batteries? that makes it easier
<Anarchos> tbrady maybe you have to flush or sync the buffer
emmanuelux has joined #ocaml
<tbrady> I'm not using batteries, can't unfortunately for this case.
<tbrady> How do I sync the buffer?
<Anarchos> tbrady did you look at the documentation of the "input" function ?
<tbrady> Anarchos: I have yes. But I see no mention of syncing.
<Anarchos> tbrady the in_channel you are trying to read, where does it come from ? Can you force hte flush on the out_channel at the other side ?
<tbrady> yes, I'm calling flush_all as the first line in my function.
<tbrady> the in_channel is stdin
<Anarchos> tbrady just write some line returns, it will force the flush
<Anarchos> tbrady tty terminals often send characters only on a line return.
f[x] has quit [Read error: Operation timed out]
f[x] has joined #ocaml
oriba has quit [Quit: oriba]
Tobu_ has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]