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
err404 has quit [Remote host closed the connection]
<thelema> if _key_ shows up again; could someone point him to ocamlbrew?
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 245 seconds]
ulfdoz_ is now known as ulfdoz
zbroyar has joined #ocaml
mattrepl has quit [Quit: mattrepl]
jcao219 has left #ocaml []
eni has joined #ocaml
madroach has quit [Ping timeout: 265 seconds]
madroach has joined #ocaml
gnuvince has quit [Ping timeout: 245 seconds]
bzzbzz has joined #ocaml
eni has quit [Ping timeout: 246 seconds]
mattrepl has joined #ocaml
emmanuelux has quit [Ping timeout: 276 seconds]
asmanur has joined #ocaml
asmanur_ has quit [Ping timeout: 268 seconds]
gnuvince has joined #ocaml
mattrepl has quit [Quit: mattrepl]
avsm has quit [Quit: Leaving.]
Mnabil has joined #ocaml
ankit9 has quit [Ping timeout: 276 seconds]
Mnabil has quit [Ping timeout: 276 seconds]
ankit9 has joined #ocaml
ankit9 has quit [Ping timeout: 265 seconds]
ankit9 has joined #ocaml
avsm has joined #ocaml
ankit9 has quit [Quit: Leaving]
avsm has quit [Quit: Leaving.]
ankit9 has joined #ocaml
avsm has joined #ocaml
Yoric has joined #ocaml
hkBst has joined #ocaml
pango is now known as pangoafk
Yoric has quit [Ping timeout: 260 seconds]
ftrvxmtrx has quit [Quit: Leaving]
djcoin has joined #ocaml
ocp has joined #ocaml
eni has joined #ocaml
BiDOrD_ has quit [Quit: No Ping reply in 180 seconds.]
BiDOrD has joined #ocaml
Yoric has joined #ocaml
mika1 has joined #ocaml
jamii has joined #ocaml
eikke has joined #ocaml
avsm has quit [Quit: Leaving.]
Cyanure has joined #ocaml
maufred has joined #ocaml
adrien_o1w is now known as adrien_oww
ftrvxmtrx has joined #ocaml
metadave has quit [Read error: Connection reset by peer]
eni has quit [Ping timeout: 268 seconds]
eni has joined #ocaml
Yoric has quit [Ping timeout: 268 seconds]
thomasga has joined #ocaml
eni has quit [Ping timeout: 240 seconds]
mal`` has quit [Ping timeout: 246 seconds]
pangoafk has quit [Ping timeout: 245 seconds]
<fasta_> How do I tell the build process to look in a certain directory for a given header file?
<fasta_> ./configure -help doesn't seem to tell me where it looks for C libraries.
mal`` has joined #ocaml
pangoafk has joined #ocaml
<fx_> C_INCLUDE_PATH
<fasta_> I have an _oasis build system, but even when using --destdir at configure time, it just doesn't listen.
cago has joined #ocaml
<adrien_oww> --destdir to do what? to do something similar to a package?
<fasta_> ocamlfind: Conflict with another package: Library dlllwt-unix_stubs.so is already installed
<fasta_> That error message is also just great.
<fasta_> Making existential claims is stupid.
<fx_> when will you give up at last?
<fasta_> I just don't understand why anyone would ever create such a tool.
<fx_> this dead language was never intended to be used by humans
<fasta_> In the real world things don't work like that.
<fx_> this one is easy. ocamlfind was created to annoy users
<fasta_> If a human cannot do something, it comes up with a good reason.
<fasta_> But then when we have a possible omniscient device (a computer), suddently you don't use it.
<fx_> "real world"? what are you talking about?
<fasta_> Programming is really simple: handle all cases and write a proof with an excuse saying why you don't do anything else.
<fasta_> A constructive proof, that is./
<fasta_> ocamlfind etc. manages everything, but it suffers from amnesia.
Yoric has joined #ocaml
foocraft has joined #ocaml
foocraft has quit [Ping timeout: 268 seconds]
beckerb has joined #ocaml
osa1 has joined #ocaml
zbroyar has quit [Read error: Connection reset by peer]
zbroyar has joined #ocaml
Progster has joined #ocaml
root____2 has joined #ocaml
zbroyar has left #ocaml []
emmanuelux has joined #ocaml
<fasta_> What does ocamlfind: Package 'lwt.react' not found mean? I have lwt installed, and it has react mli files.
<fasta_> How can I satisfy this lambda-term dependency otherwise?
<flux> you probably need to have react installed before buildling lwt, so that it will build its lwt.react submodule
<flux> it means that ocamlfind list | grep lwt.react does not return a row
<flux> (for instance)
<fasta_> flux: I have react installed, so then rebuilding lwt should do the trick?
<flux> yes
<fasta_> I think I already did that, but I will try it again.
<flux> although I haven't used react, but this is my understanding
<flux> maybe it has a configure phase that you haven't re-done?
ankit9 has quit [Quit: Leaving]
<flux> I suppose ocamlfind list | grep react does return a row
<fasta_> I think the odb --configure-flags option doesn't work.
_andre has joined #ocaml
<diml> fasta_: you need to configure lwt with --enable-react
<fasta_> diml: I know
<fasta_> diml: but odb --configure-flags '--enable-react' <url> doesn't work
<fasta_> diml: although, it is documented to work.
jamii has quit [Ping timeout: 244 seconds]
<fx_> come on man, just give up
<fasta_> fx_: can you drop your superiority complex?
<fx_> just a friendly advice
<fasta_> fx_: I can get everything to work.
<fx_> sure
<fasta_> psnively on reddit recently said that he didn't get why OCaml wasn't more popular.
sepp2k has quit [Remote host closed the connection]
<fasta_> Broken tools would be the reason.
<fasta_> The compiler is ok, but the rest is just amateur hour.
<fasta_> psnively is 'self-taught' and as such is also an amateur of course.
eni has joined #ocaml
gnuvince has quit [Ping timeout: 252 seconds]
hkBst has quit [Quit: Konversation terminated!]
ankit9 has joined #ocaml
eni has quit [Ping timeout: 260 seconds]
mattrepl has joined #ocaml
gnuvince has joined #ocaml
<companion_cube> in a type +'a foo, what does the '+' mean?
<gallais> companion_cube: it means that foo is covariant in 'a (which is useful to know for subtyping purposes)
<flux> companion_cube, it means covariance: http://tech.groups.yahoo.com/group/ocaml_beginners/message/9928
<companion_cube> but I thought ocaml had no subtyping?
<flux> it does, in objects and polymorphic variants
<companion_cube> oh, ok
<companion_cube> so it only makes sense when 'a is an object or a variant
<companion_cube> thanks
tane has joined #ocaml
milosn has joined #ocaml
Cyanure has quit [Remote host closed the connection]
BiDOrD_ has joined #ocaml
milosn_ has quit [Ping timeout: 252 seconds]
BiDOrD has quit [Ping timeout: 256 seconds]
Yoric has quit [Ping timeout: 252 seconds]
emmanuelux has quit [Read error: No route to host]
avsm has joined #ocaml
paolooo has joined #ocaml
emmanuelux has joined #ocaml
<hcarty> diml: Are you aware of any potential pitfalls when mixing Lwt and Bigarrays mapped to files?
<diml> hcarty: access to a mapped bigarray will be blocking
<diml> hcarty: you can use Lwt_bytes.wait_mincore to wait for data to be fetched to the cache
ftrvxmtrx has quit [Quit: Leaving]
tane has quit [Quit: Verlassend]
<hcarty> diml: Thank you, I'll take a look
<diml> also note that using preemptive threads won't help, Bigarray.*.get functions do not release the masterlock so a blocking bigarray will always block all ocaml threads
smondet has joined #ocaml
<hcarty> diml: I thought that might be the case. Could I use separate processes and pass around file descriptors between them?
<hcarty> That isn't ideal, but it may be my only option.
<hcarty> The goal is to be able to have a large number of files mapped and ready for random access.
<hcarty> I need to do some tests to find out how long each step takes (creating the file descriptor; mapping the file as a bigarray; reading a value from the bigarray)
<fasta_> hcarty: having a number of different processes with some parallel concurrent tree for the mapping should work fine.
<fasta_> hcarty: e.g. you could steal the PostgreSQL tree implementation.
<fasta_> It's BSD.
ccasin has joined #ocaml
<gnuvince> mfp: is your site, eigenclass.org, still up?
Yoric has joined #ocaml
emmanuelux has quit [Ping timeout: 260 seconds]
<fasta_> hcarty: for ocamlbrew, can you add some logic which tests whether a partial build has already been done?
<fasta_> hcarty: because if that is the case, OCaml builds will always fail.
<fasta_> hcarty: one can also argue that this is an OCaml upstream problem.
avsm has quit [Quit: Leaving.]
iratsu has quit [Ping timeout: 244 seconds]
metadave has joined #ocaml
eni has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
Yoric has quit [Ping timeout: 248 seconds]
Yoric has joined #ocaml
avsm has joined #ocaml
emmanuelux has joined #ocaml
tane has joined #ocaml
<fasta_> hcarty: ocamlbrew dies with Exception: Failure "_oasis file not found in package, cannot bootstrap." for 3.12, btw.
<fasta_> hcarty: I think it happens during Installing camomile.
iratsu has joined #ocaml
avsm has quit [Quit: Leaving.]
mika1 has quit [Quit: Leaving.]
emmanuelux has quit [Ping timeout: 268 seconds]
cago has quit [Ping timeout: 272 seconds]
Yoric has quit [Ping timeout: 240 seconds]
Yoric has joined #ocaml
paolooo has quit [Quit: Page closed]
paolooo has joined #ocaml
avsm has joined #ocaml
<thelema> fasta_: that's an odb error; what's the build error before that?
<thelema> fasta_: or send me your log
<fasta_> thelema: configure: creating ./config.status
<fasta_> config.status: creating Makefile
<fasta_> config.status: WARNING: Makefile.in seems to ignore the --datarootdir setting
<fasta_> config.status: creating META
<fasta_> Makefile:38: *** missing separator. Stop.
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 240 seconds]
<thelema> interesting, that does seem to be a problem building camomile, but camomile hasn't changed in a while...
<thelema> fasta_: do you have a non-gnu make installed?
<fasta_> thelema: no
<thelema> CAMLP4O = -pp "camlp4o -I $(OCAMLLIB)"
<fasta_> thelema: when I run make from the right directory, it does compile.
<thelema> is that your Makefile line 38?
<fasta_> thelema: yes
<thelema> hmm, odd...
<thelema> are you running as root?
<fasta_> thelema: no\
<fasta_> thelema: I first installed 4, which also wasn't exactly smooth.
<thelema> linux?
<fasta_> thelema: but it did work, then I tried to install 3.12.
<fasta_> thelema: yes
<fasta_> thelema: Ubuntu 12.04 even.
<thelema> what distro?
<thelema> hmm, same here...
<fasta_> thelema: how can I just rebuild cam* via your infrastructure?
<thelema> camomile?
<fasta_> thelema: because testing things with 10 minutes time in between is kind of bad.
<fasta_> thelema: yes
<thelema> odb camomile
<thelema> although
<thelema> if you want to use a particular ocaml, you'll have to set your path so that ocaml is run
<thelema> and you should probably set one other env var...
<thelema> export OCAML_BASE=/home/thelema/ocamlbrew/ocaml-3.12.1
<thelema> so that it uses that for --prefix
<fasta_> thelema: that seems to work.
<thelema> odd that it doesn't work from ocamlbrew
<fasta_> thelema: er not.
<thelema> same error?
<fasta_> thelema: because it tries to install stuff into /usr/lib
<fasta_> thelema: different error.
<thelema> even though you set OCAML_BASE?
<fasta_> thelema: yes
<fasta_> thelema: verified via env|grep OCAML_BASE
<thelema> odb should print a message about the base directory it's using when it detects one; can you scroll back through your odb output and find it?
<thelema> it should be the very first line of odb output
<thelema> if !base <> "" then print_endline ("Installing to OCaml base: " ^ !base);
<thelema> also, running `odb --debug camomile` will print more information on what commands are executed
<fasta_> thelema: Package camomile(0.8.1) already installed
<thelema> the problem seems like it's not passing --prefix to the configure script
<thelema> ocamlfind remove camomile
<fasta_> thelema: if I use --force, then I got the previous message.
<fasta_> thelema: odb clears the screen all the time.
<fasta_> thelema: instead of just outputting everything in an append way.
<thelema> clears the screen? afaik, I have no screen clearing code in odb
<thelema> I don't see any screen clearing on my side
<thelema> it may scroll quickly
<fasta_> thelema: gnome-terminal does this.
<fasta_> thelema: I don't have this with any other software.
<thelema> I use gnome terminal as well.
<fasta_> thelema: what terminal should work?
<thelema> I'm using gnome terminal 3.4.1.1
<fasta_> Me too.
<thelema> without problem
<fasta_> thelema: I see the difference.
<fasta_> thelema: ocaml odb.ml != ./odb.ml
<thelema> maybe something is wierd about my system; it's not a clean install of ubuntu 12.04, but the result of repeated upgrades since... 2009
<thelema> ah, really?
<fasta_> thelema: Ok, I got it now.
<fasta_> thelema: it was an alias for rlwrap./
<thelema> oops.
<thelema> I've made a symlink ~/bin/odb to my odb.ml, so I just run odb as a command
<thelema> maybe I should rename it from odb.ml...
<fasta_> thelema: I had one too.
<fasta_> thelema: but now it uninstalls and installs OK.
<fasta_> thelema: would you say this also means that it works from ocamlbrew?
<hcarty> fasta_: If you do have trouble with ocamlbrew please let me know. I don't have a lot of time to spend on it but I try to fix bugs when they come up.
<thelema> excellent. Did we ever figure out the root cause of your problems?
<fasta_> thelema: no
<thelema> fasta_: :( well, if we can't reproduce them anymore, there's not much I can do.
<fasta_> thelema: I haven't verified that it works now. I expect it still doesn't work.
<thelema> fasta_: ok, I can work on this a bit more.
<fasta_> thelema: do I need to run ocamlbrew -s version/*3.12 in a particular environment?
<thelema> hcarty: maybe ocamlbrew should unalias 'ocaml' before running 'ocaml odb.ml'
<fasta_> thelema: like all computing, it's just a matter of asserting conditions.
<thelema> fasta_: it wouldn't hurt to unalias 'ocaml'
<thelema> fasta_: there shouldn't be a particular environment that it fails in, although we did just find one thing that causes very odd behavior (rlwrap)
<hcarty> thelema: Do you know if that unaliasing will carry over outside of ocamlbrew's execution?
<thelema> hcarty: reading...
<fasta_> type ocaml now points to => ocaml-4.0.0
<fasta_> So, trying it again.
<thelema> hcarty: n/m; Aliases are not expanded when the shell is not interactive, unless the
<thelema> expand_aliases shell option is set
<fasta_> hcarty: it's also a problem that it cannot continue a build.
<hcarty> fasta_: I agree
<fasta_> I have to do rm -rf <everything> to make it work.
<hcarty> fasta_: Patches are welcome :-) Or a bug report.
<fasta_> hcarty: why doesn't this count as a bug report?
<fasta_> hcarty: it's clear what the problem is, no?
<hcarty> fasta_: Because I will forget
<hcarty> fasta_: I don't memorize my conversations with you
<fasta_> hcarty: so, copy paste the above in a file called BUGS.
<fasta_> hcarty: forgive me, but I get associations of French government workers.
<hcarty> fasta_: ???
<hcarty> fasta_: I don't know what that means.
<fasta_> hcarty: bureaucracy
<fasta_> It's not like the problem isn't clear.
<fasta_> As such, it's just bureaucracy.
<hcarty> fasta_: If I were spending my workday maintaining ocamlbrew, perhaps.
<hcarty> fasta_: When it's something I do in my spare time, not as much.
pangoafk is now known as pango
<thelema> fasta_, hcarty: if either of you were less lazy, that person would spend 30 seconds typing "continue an incomplete build" into the issues for ocamlbrew on github
<thelema> as is, you're both just trying to get the other to do this trivial amount of work
<fasta_> thelema: I don't even have an account.
<hcarty> thelema: Indeed. I could spend my time here or there.
<thelema> fasta_: you should get one so you can report issues properly
<thelema> hcarty: I admit I'm less inclined to go out of my way for pushy, self-righteous people like fasta, but fwiw, he seems to have calmed down today.
<hcarty> thelema: A fair point. And I shouldn't feed the trolls. Bug reporting now...
<fasta_> thelema: there are still 3 open issues.
<fasta_> thelema: also one of them has been open for 6 months, which seems to suggest nobody maintains this.
<thelema> fasta_: your self-righteous meter is starting to spike
<hcarty> fasta_: All of the open bugs are more in the feature request category. They are perhaps nice to have but do not affect (my?) use of ocamlbrew.
Yoric has quit [Ping timeout: 265 seconds]
<fasta_> thelema: the previous problem is still there.
<thelema> fasta_: the makefile:38 one?
<fasta_> thelema: yes
<fasta_> thelema: it seems to use the wrong odb.
<thelema> do you have multiple odb somehow?
<fasta_> thelema: it downloads everything to the ocaml-4.00.0 version.
<fasta_> thelema: that's pretty much the point of ocamlbrew, no?
<thelema> fasta_: not really; multiple odb isn't the point, multiple ocaml and findlib is
<fasta_> thelema: so, basically ocamlbrew -a for two different versions is not supported?
<hcarty> fasta_: I'm trying it here
<thelema> it should be; I've done it twice now.
<thelema> on two different ubuntu machines
<fasta_> I think all of the 'checking for <whatever> tool .... whatever could also be improved.
<fasta_> It should point to absolute paths.
<fasta_> This is ambiguous.
<fasta_> You get rid of failures and debugging problems when there is no room for error.
<thelema> fasta_: if it's important to you, you should make it sufficiently easy so that `(benefit_of_patch - added_complexity) > work_to_apply` for hcarty
<hcarty> Or for gildor since it sounds like fasta_ is talking about oasis's output.
<thelema> hcarty: ah, true.
<thelema> I'll admit I didn't use -a on my ocamlbrew installs, just answered 'y' to everything
<hcarty> FWIW, "./ocamlbrew -a" is working properly for me while under an brew'd 4.00.0 environment.
<fasta_> hcarty: for version/3.12?
<hcarty> thelema: They should be the same...
<hcarty> fasta_: Yes
emmanuelux has joined #ocaml
<hcarty> fasta_: It's currently going through utop's build and installation... and just failed.
<thelema> hcarty: that's what I would expect too.
<hcarty> Same error. Interesting.
<thelema> hcarty: makefile:38 for you too?
<hcarty> thelema: Yes
<thelema> !!
<fasta_> !!!!
<thelema> maybe add --debug to ocamlbrew's invocation of odb?
<fasta_> Where can I even find the Makefile?
<hcarty> Starting over with --debug. Man, it would be nice if ocamlbrew supported picking an installation back up part way through :-)
<thelema> :)
<thelema> fasta_: ~/ocamlbrew/ocaml-3.12/odb/install-foo/*/
<hcarty> fasta_: ocamlbrew/ocaml-svn/version/3.12/build/odb/install-${package}/Makefile most likely
<thelema> hcarty: really? oops
<thelema> actually, one more subdir
<thelema> install-foo is where tarball is put and extracted
<hcarty> thelema: Depends on what options you pass. That's the default.
<thelema> most packages make a directory for themselves
<hcarty> thelema: And oops, yes you're correct.
<fasta_> hcarty: find . -name odb => empty
<hcarty> fasta_: From the root ocamlbrew directory?
<fasta_> hcarty: no, from the one containing 3.12
<fasta_> hcarty: because otherwise it will find the 4.00 one.
<hcarty> fasta_: Very interesting
<fasta_> I'd have expected odb to be present.
<fasta_> In fact, it should not even be allowed to continue without that precondition.
<hcarty> fasta_: odb.ml should be in bin/
<hcarty> ocamlbrew/ocaml-svn/version/3.12/bin/odb.ml
<fasta_> hcarty: indeed
<fasta_> hcarty: so, AFAIK, the issue is that it uses the wrong version.
<hcarty> But it looks like the build directory isn't set correctly
<hcarty> The prefix is set properly but the build directory is not
<hcarty> Ah
<hcarty> : ${ODB_BUILD_DIR="$BUILD_DIR"/odb}
<fasta_> /3.12/lib/ocaml
<fasta_> That is line 38 now
<fasta_> The one below 4.00
<hcarty> So if ODB_BUILD_DIR is set it won't set it to something else.
<fasta_> Which indeed is completely wrong.
<hcarty> ("it" being ocamlbrew in this case)
<hcarty> I'm not sure how to address that without significant additions to ocamlbrew. Additions that I would like to make, but haven't yet.
<hcarty> Until those changes are made I should put something in the README and runtime notice/documentation saying that you should not try to do a fresh ocamlbrew from within an existing ocamlbrew environment.
<fasta_> hcarty: what does work then?
<fasta_> hcarty: using the system ocaml?
<hcarty> fasta_: ocamlbrew doesn't need an existing OCaml installation
<thelema> fasta_: not loading the other ocamlbrew environment
<fasta_> thelema: I don't think that's enough.
<hcarty> fasta_: Clearing the environment of ocamlbrew and odb environment variables is the way to go here.
<fasta_> hcarty: the right way to solve this would be to have ocamlbrew refuse to do any work, until its environment is properly defined.
<hcarty> fasta_: I'm testing "./ocamlbrew -a -s version/3.12" now in a clean environment.
<hcarty> fasta_: It is properly defined.
<hcarty> fasta_: As far as I know at this point at least. It's perfectly acceptable to point ODB_BUILD_DIR to another location.
<fasta_> hcarty: I am not even using ODB_BUILD_DIR myself.
<hcarty> fasta_: It's set by ocamlbrew's bashrc file.
<thelema> yes, it should be fine to have ODB_BUILD_DIR set to wherever you want.
<fasta_> Leaky abstractions
<hcarty> So the issue could be another environment variable that is causing a conflict or some change in version/3.12 that is causing trouble. Or something else.
<fasta_> unset ODB_BUILD_DIR
<fasta_> Why don't you just add that line?
<hcarty> fasta_: Because someone may want to change that location.
<fasta_> hcarty: unlikely, because you already have a top-level directory for that.
<hcarty> But it looks like that was a red herring.
<fasta_> hcarty: the *BASE* directory.
<hcarty> The same issue comes up with a clean build in a clean environment.
<fasta_> hcarty: otherwise just go to the user specified dir and check whether it is empty.
<fasta_> hcarty: if not scream very loudly.
<hcarty> fasta_: One may wish to separate the build directory from the base directory. Particularly odb's build base since it would generally be used after the ocamlbrew process.
<fasta_> hcarty: if it is, scream loudly how to get rid of it, but continue.
<fasta_> hcarty: in all cases, this is not rocket science.
<fasta_> hcarty: I am not sure to who I am talking here, but this is really, really basic stuff.
<hcarty> Well, ocamlbrew DOES have rocketry in its core. That was intended to be a secret.
<fasta_> It's somewhat fair to say 'patches welcome'.
<fasta_> But saying 'I don't know how to solve this' seems rather weird.
<hcarty> fasta_: I have. But to repeat myself: "patches are welcome"
<hcarty> fasta_: I was stating that I don't know how to address the ODB_BUILD_DIR issue.
<fasta_> hcarty: I think I already told you a solution for that.
<hcarty> fasta_: I don't see a perfect answer, or even a better answer than the one that exists.
tww has joined #ocaml
<fasta_> hcarty: do you want people reusing such directories?
<hcarty> fasta_: That's up to them. It shouldn't cause an issue.
<fasta_> hcarty: I don't see any use case.
<fasta_> hcarty: other than that.
<hcarty> fasta_: I do.
<thelema> fasta_: `benefit_of_patch - added complexity > work_to_apply`
djcoin has quit [Quit: WeeChat 0.3.2]
eni has quit [Ping timeout: 252 seconds]
<fasta_> Is Ocaml binary compatible within one major version?
<fasta_> If so, then I can sort of see it.
<hcarty> fasta_: That's not relevant here
<hcarty> fasta_: The build directory is a scratch space.
<fasta_> hcarty: it seems obvious that every invocation should get a new scratch space.
<fasta_> hcarty: otherwise you break the abstraction.
<fasta_> (which of course can be implemented in various ways)
<fasta_> You are really failing to communicate here what the problem is.
ocp has quit [Ping timeout: 240 seconds]
<hcarty> fasta_: I'm not the one trying to communicate a problem...
<fasta_> hcarty: neither am I.
<hcarty> Good. Then we're done. Nice work everyone.
<fasta_> hcarty: I communicated one problem.
<fasta_> hcarty: that was clear for you, wasn't it?
<thelema> fasta_: odb deletes the install-foo directory before re-using it.
ftrvxmtrx has joined #ocaml
<fasta_> for v in env| grep -o 'OCAML.*=' | tr -d '=' | tr '\n' ' '; do unset $v; done
<fasta_> I will just run that before I run my script to do the build and then it should work.
<hcarty> fasta_: As I said earlier, the environment is not the issue.
<fasta_> hcarty: then what is?
<hcarty> fasta_: The same Makefile:38 issue happens with a clean, ocamlbrew-less environment.
thomasga has quit [Quit: Leaving.]
<hcarty> fasta_: I don't know. Perhaps a bug or other incompatibility in version/3.12's commits.
<fasta_> hcarty: so, you are saying that your perlbrew intended functionality is nothing more but a glorified 4.00 installer?
<fasta_> Also, the whole patches welcome theory only works if the original code was written to be understood by others.
<hcarty> fasta_: ocamlbrew doesn't magically fix compiler bugs or incompatibilities with libraries.
<fasta_> hcarty: I have installed 3.12 from source myself.
<thelema> fasta_: hcarty's ocamlbrew code seems quite reasonably written
<fasta_> thelema: ok
<hcarty> fasta_: version/3.12 in Subversion <> the ocaml-3.12.1.tar.gz release tarball.
<hcarty> The problem comes up when camomile starts to install. I'm not sure why it happens.
<hcarty> thelema: It looks like camomile's build system can't handle the version string that version of OCaml spits out.
<hcarty> thelema: The Objective Caml compiler, version 3.12.2+closed (2012-03-08)
<fasta_> Yeah, the closed part is suspicious.
<fasta_> hcarty: but the OCaml release doesn't have that version string.
<hcarty> fasta_: Correct
<fasta_> hcarty: as such, by using a non-released version, you introduced a problem.
<fasta_> hcarty: why doesn't the script simply fetch a release tarball or doesn't svn support that?
<adrien> I don't think svn can handle that
<fasta_> Then perhaps it should just be fetched from some FTP site.
<hcarty> fasta_: Pulling from an arbitrary svn version an expected use case
<fasta_> hcarty: oh
<hcarty> fasta_: If you specify an OCaml version rather than telling ocamlbrew to pull from Subversion it will do that
<thelema> $ OCAML_MAJOR_VERSION=3 OCAML_MINOR_VERSION=12 OCAML_PATCH_VERSION=1 ./ocamlbrew -a
<hcarty> set OCAML_MAJOR_VERSION=3 OCAML_MINOR_VERSION=12 OCAML_PATCH_VERSION=1
<hcarty> thelema: Thanks, beat me to it
<thelema> :) just had to copy from other terminal
<fasta_> I am not sure what the ocaml developers 'guarantee'.
<fasta_> Anyway, for me it's not a problem anymore then.
<fasta_> So, perhaps a note like "if you want to install 3.12, don't even try the svn version could be done.".
<fasta_> Or after checking out, the whole 'closed' part could be deleted.
<fasta_> (before the build, that is)
<fasta_> That should be a one line shell script)
<hcarty> fasta_: It's something in the OCaml source code. It could be patched out, although I'm not sure it's worth the effort.
<thelema> or camomile fixed, as +foo in versions is surprisingly common
<hcarty> thelema: I think it's the ( and )
<hcarty> Although it could be any of those
<thelema> hcarty: that was part of the version string?!
<hcarty> thelema: Yes :-)
<hcarty> Not the friendliest version string I've seen.
<hcarty> fasta_, thelema: For what it's worth, ocamlbrew invoked as thelema described works fine for OCaml 3.12.1.
<fasta_> hcarty: that's certainly worth a thank you.
<hcarty> fasta_: You're welcome!
<hcarty> Or perhaps:
<hcarty> thelema: Thank you
<hcarty> thelema deserves lots of thanks for making all of this remotely possible.
<hcarty> s/possible/feasible/
<fasta_> thelema: thanks, indeed it works here too in that way.
ocp has joined #ocaml
<hcarty> thelema: Those should be documented. Another item for the TODO list.
<thelema> hcarty: I'm documenting all the environment variables that odb uses
<hcarty> thelema: Cool. I have a note for myself to do the same for ocamlbrew.
Yoric has joined #ocaml
ocp has quit [Read error: Connection reset by peer]
<osa1> is there a particular reason of why -rectypes is disabled by default in ocaml?
<thelema> osa1: yes, it often leads to non-intuitive behavior
Yoric has quit [Ping timeout: 244 seconds]
<paolooo> hi @all, is it easy to create a simple window application in ocaml?
<thelema> paolooo: lablgtk2
<osa1> thelema: do you have any examples? I'm using recursive data types in haskell for a while know and I find it really useful
<paolooo> thelema: thank you
tww has quit [Ping timeout: 246 seconds]
<thelema> osa1: -rectypes is a bit more than just plain recursive data types; it loosens up type checking a bit.
<thelema> osa1: even without it, you can do things like type 'a tree = 'a * 'a tree * 'a tree
<thelema> hmm, need a base case for that recursion...
<thelema> type 'a tree = ('a * 'a tree * 'a tree) option
emmanuelux has quit [Ping timeout: 252 seconds]
<osa1> it still doesn't work on my system (ocaml 4)
<thelema> oops, you're right; you need -rectypes for that type
ankit9 has quit [Ping timeout: 252 seconds]
<thelema> but you don't need it for... (checking before pasting)
<thelema> # type 'a tree = Leaf of 'a | Node of 'a * 'a tree * 'a tree;;
<thelema> the restriction is that recursion has to go through a tagged structure, like a variant
<thelema> even though in the first case it actually does go through a tagged structure, ocaml can't be sure of that from the type definition given.
<osa1> thelema: I'm new at this type stuff but isn't it possible to type check in first case with fixed-point operator or something?
<osa1> even OO languages have circular referances (with `self` or `this` keywords)
<thelema> osa1: I believe it's possible to typecheck the first case with -rectypes
dwmw2_gone has quit [Ping timeout: 240 seconds]
dwmw2_gone has joined #ocaml
<thelema> another example: type 'a circle_list = 'a * 'a circle_list
<thelema> again, possible with -rectypes, but a bit funny of a type in ocaml without.
<thelema> err, a bit funny of a type even with rectypes
<thelema> better is `type 'a c_list = Node of 'a * 'a c_list`
<thelema> not that there's much of a difference in runtime representation, but the tag on each value helps with accessing it properly
paolooo has quit [Ping timeout: 245 seconds]
<osa1> thelema: ok, thanks. I'm also trying to understand row polymorphism and it's implementation, do you have any examples/resources on it?
ankit9 has joined #ocaml
<thelema> sorry, my type theory-fu is weak
Anarchos has joined #ocaml
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
paolooo has joined #ocaml
dwmw2_gone has quit [Ping timeout: 240 seconds]
dwmw2_gone has joined #ocaml
Yoric has joined #ocaml
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
mehdid_ is now known as mehdid
avsm1 has quit [Quit: Leaving.]
dwmw2_gone has quit [Ping timeout: 240 seconds]
dwmw2_gone has joined #ocaml
milosn has quit [Ping timeout: 246 seconds]
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
dwmw2_gone has quit [Ping timeout: 240 seconds]
dwmw2_gone has joined #ocaml
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
gnuvince has quit [Ping timeout: 245 seconds]
twigmorewelsh has joined #ocaml
proq has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
dwmw2_gone has quit [Ping timeout: 240 seconds]
<orbitz> Hello
Yoric has joined #ocaml
<orbitz> Is tehre something obviously wrong with this: https://gist.github.com/2a8523e1e989258049ee
<orbitz> It stalled in the first read_all loop
dwmw2_gone has joined #ocaml
<_habnabit> orbitz, well, yeah. given this code, why would it ever stop reading?
<orbitz> _habnabit: when the processe dies shouldn't its stdout/stderr be closed, in which case I'll get a read of 0 bytes and know?
<_habnabit> orbitz, you might've meant ~args:["cat", "create_process.ml"]
<_habnabit> orbitz, otherwise, the process won't exit until you close its stdin
<orbitz> How does it workin a shell? I don't hit ^D every time I run a program...
<_habnabit> how does what work? are you talking about running cat with no arguments or cat with one argument?
<orbitz> I mean when I'm in bash and i do cat foo, I don't have to hit ^D for it to finish
<_habnabit> correct, but your code was not equivalent to `cat foo`
<_habnabit> your code was equivalent to `ln $(which cat) foo; PATH=. foo`
<orbitz> I modified it to be ~prog:"cat" ~args:["cat"; "foo.ml"] and it is sitll waiting on the stdout read
beckerb has quit [Ping timeout: 245 seconds]
<orbitz> hrm, why is what I am doing equivaelne to that. isn't Unix.create_process basically wrapping fork, dup2, and execvp?
<_habnabit> okay, so you know how you access Sys.argv.(1) to access the first argument to your ocaml program?
<orbitz> Yes
<orbitz> I understand that, I just would have ssumed the execvp would fail, i' not sue wher ethe ln part comesin
<_habnabit> the list you're passing as 'args' _is_ the argv list
<_habnabit> no, because _prog_ is what's executed
<_habnabit> not args.(0)
<_habnabit> the ln is just to make the 'cat' binary accessible as 'foo'
<orbitz> Ok, Regardless, though, the current code is still sitting on the stdout read (after printing out all of the output of the cat)
dwmw2_gone has quit [Ping timeout: 260 seconds]
<orbitz> What am I still missing?
dwmw2_gone has joined #ocaml
<_habnabit> let's see
cdidd has quit [Ping timeout: 260 seconds]
wmeyer has joined #ocaml
<orbitz> any thoughts? I'm sure it's something silly I just don't grok
avsm has joined #ocaml
tani has joined #ocaml
<_habnabit> ah, yes, that's what I suspected, and I just confirmed it
<orbitz> Don't keep it to yourself!
<_habnabit> Unix.create_process doesn't close the child's pipes in the master process
<_habnabit> so, you need to close c_std{in,out,err} before you return from your create_process
tane has quit [Ping timeout: 272 seconds]
<_habnabit> otherwise, you still have a reader open on the pipe in your own process, and as such the pipe isn't closed
dwmw2_gone has quit [Ping timeout: 240 seconds]
<orbitz> ah ok
<_habnabit> generally, you want to close _all_ fds when you fork
<_habnabit> there's CLOEXEC, but nobody sets that
<orbitz> Thank you
<orbitz> Works like a charm!
<orbitz> Many thankyous _habnabit
dwmw2_gone has joined #ocaml
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
dwmw2_gone has quit [Ping timeout: 240 seconds]
dwmw2_gone has joined #ocaml
Tobu has quit [Read error: Connection reset by peer]
Tobu has joined #ocaml
milosn has joined #ocaml
gnuvince has joined #ocaml
milosn has quit [Read error: No route to host]
milosn has joined #ocaml
Tobu has quit [Read error: Connection reset by peer]
dwmw2_gone has quit [Ping timeout: 260 seconds]
Tobu has joined #ocaml
dwmw2_gone has joined #ocaml
Yoric has quit [Ping timeout: 240 seconds]
twigmorewelsh has quit [Ping timeout: 260 seconds]
twigmorewelsh has joined #ocaml
dwmw2_gone has quit [Ping timeout: 240 seconds]
twigmorewelsh has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
metadave has quit [Remote host closed the connection]
Tobu has quit [Read error: Connection reset by peer]
Tobu has joined #ocaml
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
avsm has quit [Quit: Leaving.]
dwmw2_gone has quit [Ping timeout: 240 seconds]
avsm has joined #ocaml
dwmw2_gone has joined #ocaml
tlockney has quit [Excess Flood]
tlockney has joined #ocaml
paolooo has quit [Quit: Page closed]
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
dwmw2_gone has quit [Ping timeout: 240 seconds]
dwmw2_gone has joined #ocaml
_andre has quit [Quit: leaving]
eni has joined #ocaml
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
dwmw2_gone has quit [Ping timeout: 240 seconds]
dwmw2_gone has joined #ocaml
braibant has quit [Quit: Leaving.]
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
sepp2k has joined #ocaml
dwmw2_gone has quit [Ping timeout: 240 seconds]
dwmw2_gone has joined #ocaml
eni has quit [Ping timeout: 248 seconds]
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
dwmw2_gone has quit [Ping timeout: 240 seconds]
dwmw2_gone has joined #ocaml
tani has quit [Quit: Verlassend]
avsm has quit [Quit: Leaving.]
yezariaely has left #ocaml []
avsm has joined #ocaml
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
smondet has quit [Quit: Bye]
Tobu has quit [Read error: Connection reset by peer]
Tobu has joined #ocaml
dwmw2_gone has quit [Ping timeout: 240 seconds]
dwmw2_gone has joined #ocaml
eikke has joined #ocaml
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
dwmw2_gone has quit [Ping timeout: 240 seconds]
dwmw2_gone has joined #ocaml
avsm has quit [Quit: Leaving.]
eikke has quit [Ping timeout: 260 seconds]
Progster has quit [Ping timeout: 260 seconds]
avsm has joined #ocaml
dwmw2_gone has quit [Ping timeout: 260 seconds]
dwmw2_gone has joined #ocaml
rgrinberg has joined #ocaml
dwmw2_gone has quit [Ping timeout: 240 seconds]
avsm has quit [Quit: Leaving.]
dwmw2_gone has joined #ocaml
avsm has joined #ocaml
Anarchos has quit [Quit: time to sleep]