Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
237 lines (236 sloc) 17.5 KB
04:46:32 <Drakken> thelema are you around?
13:40:44 <Drakken> thelema I have a Q about odb whenever you have some time.
14:07:06 <thelema> Drakken: go ahead
14:09:27 <Drakken> thelema good morning.
14:09:41 <thelema> good morning, drakken
14:10:06 <Drakken> Someone in the archimedes team said they fixed a bug that supposedly caused the prob I was having.
14:10:33 <Drakken> The fix isn't on oasis-db yet
14:11:22 <Drakken> so I guess I need to download bzr, checkout the new project tree, and install
14:11:48 <Drakken> without messing up whatever state info odb keeps.
14:12:29 <thelema> odb keeps no state info.
14:12:46 <thelema> go ahead, download, install whatever you like
14:13:06 <Drakken> So my questions are (a) do you know of any easier options, and (b) if not, what do I have to do to install from the bzr project.
14:14:45 <thelema> b) bzr branch <url>
14:14:47 <Drakken> oh, and any odb-specific installation details
14:15:11 <Drakken> that's to check the project out. what about installing?
14:16:30 * thelema looks at what build system it uses
14:16:56 <thelema> ok, it uses oasis.
14:17:09 <thelema> ocaml setup.ml -configure
14:17:13 <thelema> ocaml setup.ml -build
14:17:43 <thelema> to install to ~/.odb/lib, do `OCAMLFIND_DESTDIR=~/.odb/lib ocaml setup.ml -install`
14:19:01 <Drakken> and the project knows about stublibs? Do I need to install cairo2 first? I don't know what they changed.
14:20:04 <thelema> cairo2 should be already installed by odb - you don't need to install it.
14:20:34 <Drakken> assuming the bugfix was in archimedes and not cairo
14:20:39 <thelema> the project doesn't know about stublibs, but ocamlfind knows about them and will put the right files in the right places
14:21:05 <Drakken> I guess the guy said it was a new version of archimedes
14:21:17 <thelema> 0.4.11?
14:21:25 <Drakken> right
14:21:34 <thelema> already in oasis-db
14:21:44 <thelema> odb --force archimedes
14:22:07 <Drakken> dang it
14:22:29 <Drakken> I knew I should have checked first. I looked last night & it wasn't there.
14:22:40 <thelema> yup, just yesterday I updated.
14:24:36 <thelema> and it was there in unstable before that.
14:51:08 <hcarty> thelema: A thought for mixing odb and GODI - it may be worth finding a way to create a GODI package for odb. If the dependencies and build targets are setup properly in GODI, in theory this could be used to at least odb-based package rebuilds to GODI-based OCaml compiler upgrades.
14:51:45 <thelema> hcarty: on gildor's todo list is generating godi packages from oasis
14:52:08 <thelema> oh, but you think I should put odb into godi...
14:52:14 <thelema> hmmm...
14:52:48 <thelema> godi can rebuils everything on a compiler upgrade
14:52:59 <thelema> I don't see much use for odb on a computer with a functioning godi
14:53:14 <thelema> Drakken: did everything work out with archimedes 0.4.11?
14:53:34 <hcarty> thelema: Once oasis supports generating GODI packages then that may be true
14:54:04 <hcarty> odb is still a much lower barrier to entry than GODI
14:54:46 <thelema> yes, that's my reason for it.
14:54:53 <hcarty> Extending GODI to support oasis-db/oasis-db to act as a GODI repository is another and possibly better option...
14:55:48 <Drakken> thelema no, I got the same error. The dev said repost the bug report, so I just did that.
15:27:07 <oriba> how can I control the output signature of a functor by it's input signature? Or other forumlated: how to restrict the type 'a t of Map for example, by specifying it at the input of a functor?
15:27:14 <oriba> (does this make any sense to oyu?)
15:27:17 <oriba> you
15:33:09 <thelema> oriba: module Foo (X : sig type key type value end) : Foo where type t = X.value Map.t = struct ... end
15:33:20 <thelema> oriba: completely untested, but probably something like this.
15:33:42 <oriba> hmhhh
15:36:14 <oriba> syntax error...
15:36:47 <oriba> defining a module tpye inside a functior also seems not to work
15:38:26 <oriba> maybe somehow 'a empty used in a module can be used to construct a limitation of type?
15:38:49 <oriba> wrapping a type restricted funtion around the call of Map?
15:38:57 <thelema> well, the second "Foo" should be a module type, module type Foo_t = sig type t = int Map.t ... end
15:40:54 <oriba> thelema, and "where" should be "with" ... that was the reason of the syntax error :)
15:41:50 <oriba> Also I want to have the type restriction as input
15:42:11 <oriba> maybe I need a functor which creates a module that is input for another functior
15:42:19 <oriba> (higher order functor?)
15:42:57 <thelema> oriba: no problem.
15:43:15 <oriba> but does it goes without that?
15:43:52 <oriba> need to explore your code in more detail
15:43:56 <oriba> maybe that can be used?
15:44:06 <oriba> I normally use a differnt syntax for fucntors
15:44:15 <oriba> need to rebuild my thinking ;)
15:44:25 <oriba> is there an advantage on the syntax you used here?
15:45:02 <oriba> instead of module Foo = Functor (... : ... ) -> struct ...end ?
15:45:29 <oriba> ..or just a matter of taste?
15:45:40 <thelema> it's just shorter to type on IRC
15:46:01 <thelema> I usually don't use the functor keyword
15:46:09 <oriba> aha
15:46:10 <thelema> just like I don't usually use the 'fun' keyword for functions
15:46:17 <thelema> let foo = fun x -> ...
15:46:23 <oriba> ah
15:46:23 <thelema> vs. let foo x = ...
15:46:30 <oriba> aha here I also use the latter one
15:47:01 <oriba> but in functors I somehow find it more easy to understand what I'm doing, when using the keyword functor...
15:47:21 <oriba> also looks nice in the code, if it contains functors explicitly ;)
15:47:47 <oriba> but thx for the code I will try awound with it soon
19:03:20 <gildor> hcarty, thelema: I have studied the various possibility of GODI/oasis
19:03:23 <gildor> with Gerd
19:03:48 <gildor> hcarty, thelema: I think we will build a tool in between oasis2debian and GODIVA
19:04:22 <gildor> i.e. something that helps to do the 90% of the initial packaging/upgrade
19:04:32 <hcarty> gildor: Do you think it would be reasonable to provide support for oasis-db acting as a GODI repository?
19:04:43 <gildor> the 100% is hard to get
19:05:05 <gildor> hcarty: it is feasible, but will require hand editing for some parts
19:05:32 <gildor> hcarty: e.g. deciding when to use conf-* package
19:06:28 <gildor> hcarty: let says that if you want to do it, you can probably do it just as odb.ml was build, you should have enough information from the _oasis
19:07:01 <gildor> (just use the oasis library from the source and parse/decode _oasis files)
19:07:19 <gildor> maybe you can use some part of the code found oasis-db sources
19:08:06 <hcarty> gildor: That is what I expected. Now I just need to find a free week to work on it :-)
19:09:14 <thelema> gildor: could you explain more what's in the last 10%?
19:09:41 <thelema> godi packages sometimes have conf- packages that do what?
19:12:53 <thelema> gildor: also, should I file bugs with you to fix entries in oasis-db? (like the Lablgtk2 package with the incorrect uppercase L)
19:13:08 <thelema> (or maybe the right fix is to do case-insensitive sor)
19:14:19 <thelema> but the big bug for me is the linking order issue: http://forge.ocamlcore.org/tracker/index.php?func=detail&aid=1069&group_id=54&atid=291
19:21:57 <hcarty> thelema: I ran into that after installing 11.10 on my desktop, but figured that I hadn't installed something properly
19:31:09 <gildor> conf- package (AFAIR) are packages that describes some C libraries (I think)
19:31:50 <thelema> hcarty: yes, I assumed that for a long time, but after lots of tracking of the bug, I found that the linux linker has become much more picky about argument order
19:32:07 <thelema> gildor: ah, external C deps... hmmm
19:32:35 <adrien> gildor: yup
19:32:41 <adrien> they're not mandatory
19:33:15 <adrien> I think you should skip them at first
19:35:20 <gildor> thelema: I removed the Lablgtk2 package (though it will remain in the news for now)
19:35:27 <thelema> gildor: thanks.
19:36:06 <adrien> was the issue in lablgtk2 itself?
19:36:46 <thelema> adrien: no issue with lablgtk2. Although I should send you the _oasis file I wrote for lablgtk2 so you can make it unhacky and put it into lablgtk2's source tree
19:37:38 <adrien> thelema: handles pkg-config well? and the .ml4 files? and everything?
19:38:07 <thelema> adrien: just runs the ./configure and make to build, and has its own ocamlfind install command to install
19:38:08 <gildor> thelema: I think the compile and run C is a cairo project specific oasis functions
19:38:20 <gildor> thelema: I don't remember coding it
19:38:37 <thelema> gildor: oh. well then...
19:38:55 <adrien> thelema: ah, ok, but that's already a nice improvement =)
19:39:12 <thelema> adrien: as is, it makes it able to be odb-installed
19:39:17 <adrien> cairo2 has a specific thing to get the C "infos"
19:39:31 <adrien> (I remember it has since it was the only part that failed on windows =) )
19:42:08 <thelema> gildor: btw, should I still have problems with forge.ocamlcore.org's certificate?
19:42:27 <thelema> adrien: ah.
19:43:29 <thelema> gildor: you're right - I'll bother upstream
19:43:47 <thelema> now as to lwt...
19:44:51 <thelema> I guess they did the same thing too, in a different way
19:45:00 <thelema> but still with the linking order wrong
19:45:55 <gildor> thelema: SSL cert shoud be ok, what is the problem and on which sites ?
19:46:08 <gildor> thelema: concerning your "install a specific version"
19:46:42 <thelema> http://pastebin.com/n42Pfcxt SSL cert error
19:47:20 <gildor> you could call "curl "http://oasis.ocamlcore.org/dev/api/0.1/sexp/pkg_ver/show?ver=0.2.0&pkg=oasis" to get the tarball name
19:47:45 <gildor> but if you want an entry in info/, tell me how to format it
19:48:06 <gildor> (feature request please, I'll have a ton of thing to do RSN)
19:48:25 <thelema> gildor: no rush on this. I'll think further on how to do this right.
19:49:18 <gildor> thelema: what's your distro/OS ?
19:49:27 <thelema> gildor: ubuntu 11.10
20:04:01 <gildor> thelema: run this
20:04:03 <gildor> openssl s_client -connect forge.ocamlcore.org:443 < /dev/null | openssl x509 -noout -enddate
20:04:35 <thelema> http://pastebin.com/vKwfVKcR
20:08:21 <gildor> did you get the same error in FF
20:08:38 <thelema> one sec
20:09:35 <thelema> gildor: no, but I may have permanently made an exception
20:11:05 <thelema> hmm, I have a certificate on file from equifax for *.ocamlcore.org - I'm not sure if that's my exception in FF or what.
20:13:25 <thelema> hmm, even after removing that cert, it still works in FF
20:15:27 <gildor> thelema: so it works on FF but not with wget
20:16:26 <gildor> thelema: I pay enough money for the cert so that it can work ;-)
20:16:33 <gildor> (in FF)
20:17:10 <thelema> ok
20:17:32 <gildor> try curl maybe
20:18:03 <gildor> I think you have a problem with setting CAPath or having the global file that contains all root CA updated
20:18:22 <gildor> (SSL stuff is not extremly simple)
20:25:25 <thelema> gildor: curl has same problem at oasis.ocamlcore.org
20:27:22 <adrien> thelema: mozilla never does things like the system asks it to: I think it has its own cert list
20:34:55 <thelema> of course. well I hope others don't have this problem too - maybe it's my old, cranky system with an old SSL conf
21:40:45 <thelema> adrien: https://github.com/protz/ocaml-installer/issues/4
21:43:54 <adrien> thelema: OCAMLPATH env var all the way
21:43:58 <adrien> or one like that
21:50:33 <adrien> but you can definitely configure it with environment variables (or findlib.conf as you've stated) (connection is horribl laggy)
21:52:18 <thelema> adrien: will yypkg fit into this system?
21:53:25 <adrien> jein :P
21:53:47 <thelema> "nein"?
21:54:17 <adrien> jein means ja+nein
21:55:03 <adrien> currently, it wouldn't be able to upadte the conf file for the stubs in ocamlfind
21:55:19 <adrien> but it's not terribly hard to add
21:55:25 <thelema> adrien: would it be useful as a binary package manager for ocaml-installer
21:55:34 <adrien> and apart from that it should be perfectly doable
21:56:20 <adrien> and if you don't care about bytecode it's already fine
21:56:21 <thelema> I'm not worried about yypkg configuring ocamlfind on windows, just whether it'd be good for package management in a one-click-install ocaml for windows
21:56:32 <adrien_web> I should really type on this connection because my screen is way too laggy to do anything
21:57:04 <adrien> my todo for yypkg is: remove sexplib and use biniou instead (JSON) and avoid syntax extensions; then I need to update the GUI stuff
21:57:26 <adrien> have you seen the screenshots?
21:57:45 <thelema> no
21:58:11 <thelema> looks nice
21:58:17 <adrien> http://notk.org/~adrien/yypkg/screenshots/sherpa_gui_3.png
21:58:36 <thelema> ah, even prettier than the one on its webpage
21:58:46 <adrien> it should be as usable as a typical linux package manager
21:58:49 <thelema> using wget?
21:58:56 <adrien> slight differences but the whole stuff should be there
21:58:59 <adrien> yes, wget
21:59:30 <adrien> yypkg is very pragmatic in its design: take components that are know to work and already exist
21:59:35 <thelema> how's its repo structured?
21:59:41 <thelema> could it backend with oasis-db?
22:00:45 <adrien> repo has a big s-expression and files: http://notk.org/~adrien/yypkg/latest/
22:01:29 <adrien> the s-expression is like hat you'd have in the package db once you've installed the package (so you can poke the server to find out which package has a specific file)
22:01:44 <adrien> I don't know oasis-db well enough to comment on the matter
22:02:13 <adrien> yypkg really has a dump package format
22:02:27 <adrien> you have files in an archive and a doinst.el file
22:03:09 <adrien> the doinst.el file is an s-expression of "actions" that have to be done upon installation: extract some files, create a symlink, rm a file, ...
22:03:32 <adrien> the list of possible actions has to be expanded (and will be)
22:05:29 <thelema> interesting. How easy is it to add more packages? It's sounding like it's going to be hard to get many packages into it
22:05:54 <thelema> and the duplication of effort will result in few packages available for it...
22:05:59 <thelema> s/will/may/
22:07:21 <adrien_web> adding packages is quite simple (it's centralised: I do the work on my computer, create the list of packages and upload everythingà
22:07:21 <adrien_web> )
22:07:46 <thelema> the scripting is pretty simple?
22:07:49 <adrien_web> typically, the difficulty is not to make the package but to make the software build on/for windows and work on windows
22:08:29 <thelema> granted. I don't see lablgtk2 in your package list, have you tried packaging it?
22:08:56 <thelema> hmm, cairo2... means gtk+2 includes lablgtk2?
22:08:56 <adrien_web> I've used slackware package scripts so far and they're very very simple (I'm not sure I'll continue using them, or at least not in the same way because I'm constantly tracking slackware upstream, but it prevents me from forgetting updates!)
22:09:20 <adrien_web> the package list has only C libs because I've cross-compiled everything
22:09:38 <adrien_web> I think that in the end I'll cross-compile from cygwin
22:10:17 <adrien_web> typically, it takes half a day to one day to get a C library packaged and tested
22:10:45 <adrien_web> and fixed
22:10:45 <adrien_web> that's why duplicating packaging is actually "fun"
22:14:26 <adrien> I'll be able to spend time on yypkg from february on
22:14:43 <thelema> ok. good luck with your work in the meantime.
22:14:56 <adrien> thanks =)
22:15:27 <adrien> I'll be doing an internship and I hope I'll be able to do yypkg work *for* the internship itself
22:15:34 <thelema> nice.
22:15:49 <adrien> and if not, I'll have free evenings anywya
22:16:18 <adrien> have to go to bed now, good night
22:32:43 <Samae> adrien: good night
22:42:05 <thelema> gildor: Lablgtk2 (cap. L) is still listed here: http://oasis.ocamlcore.org/dev/odb/
22:43:38 <agolsme> hmm, how do I manually implement something like Pervasives.float_to_int?
22:43:47 <agolsme> er float_of_int
22:44:01 <thelema> agolsme: really? you want to implement this manually?
22:44:02 <_habnabit> agolsme, what part is giving you trouble?
22:45:28 <agolsme> not really sure how to start..?
22:45:33 <agolsme> i am just curious mostly
22:45:46 <thelema> agolsme: do you know what a float looks like in a register?
22:46:32 <thelema> agolsme: http://en.wikipedia.org/wiki/Double_precision_floating-point_format
22:50:46 <agolsme> ah i see,
22:50:48 <agolsme> ok that makes sense
22:51:04 <_habnabit> you don't even need to do that, though
22:51:21 <_habnabit> you could just do repeated multiplication/division
22:52:25 <thelema> I like the bit-shifting implementation of float -> int
22:53:55 <thelema> fraction >> (exponent - 1023 - 51) * sign
22:54:06 <_habnabit> heh
22:54:52 <thelema> or something like that.
22:55:09 <_habnabit> why not -972
22:55:52 <thelema> computing on the fly. 1023 is for the offset of the exponent, 51 is because 51 decimal digits in fraction
22:56:00 <_habnabit> ah
22:56:01 <thelema> err, binary fraction, not "decimal"
22:56:20 <thelema> err, maybe not.
22:56:35 <thelema> 52 decimal fraction digits, need to shift in a 1 still.
22:58:14 <thelema> anyway, bit shifting is probably faster than multiplication/division
23:40:52 <_habnabit> thelema, it's academia; who cares about 'faster'
23:43:41 <thelema> _habnabit: my PhD advisor insists on it
23:43:44 <_habnabit> thelema, sorry, I included some extraneous words. "it's academia; who cares"
23:47:30 <thelema> _habnabit: ah, ok. true.
Something went wrong with that request. Please try again.