robinnn has quit [Remote host closed the connection]
wtetzner has quit [Remote host closed the connection]
wtetzner has joined #ocaml
<gildor>
rproust: thx, just fixed it
lopex has quit [Quit: Page closed]
lopex has joined #ocaml
robinnn has joined #ocaml
robinn has joined #ocaml
robinn has quit [Client Quit]
robinnn has quit [Read error: Connection reset by peer]
<kaustuv>
thelema: pong
SoftTimur has quit [Quit: Leaving.]
vivanov_ has quit [Quit: leaving]
<larhat>
gildor, it'll be good to have some kind of simple api for browsing packages and their info on oasis-db (json or plaintext). it'll allow one to remove html parsing from odb.ml. and also, separate "views" for human and auto tools are good choice, i think. is this api exist in oasis-db or in its todo-list?
vivanov has joined #ocaml
robinnn has joined #ocaml
robinn has joined #ocaml
<thelema>
kaustuv: two things- can you take a look at the problem with batMap.mli for building documentation?
<rproust>
gildor: you seem to be using a wiki to html thing on the oasis website, and there seems to be a small error on the examples in the "conditional value" section of the manual. There are stars (<ul>…</ul>?) visible.
<larhat>
thelema: are you going to use that api in odb.ml ?
<thelema>
larhat: probably not, as it'd require a much more complex parser
<rproust>
gildor: there are other small markup problems. The repository of oasis-website is empty, is it hosted somewhere else so that I can send you a patch ?
<thelema>
that said, my current parser is 5 lines of splitting, so...
avsm has quit [Quit: Leaving.]
<larhat>
but html parsing is not reliable, i think — layout can be changed and parser will fail then. odb.ml from repo head, for example, doesn't work for that reason. (Exception: Failure "tl". on parsing html page).
avsm has joined #ocaml
lopex has quit []
wtetzner has quit [Remote host closed the connection]
<kaustuv>
thelema: no, I haven't had a chance to look at bluestorm's code. Too busy with a looming conference deadline to work on it before next week.
<thelema>
good luck with your deadline
wtetzner has joined #ocaml
<kaustuv>
The deadline will be fine. It's me I'm worried about.
emmanuelux has joined #ocaml
BiDOrD has quit [Read error: Operation timed out]
BiDOrD has joined #ocaml
lopex has joined #ocaml
92AACP2C3 has joined #ocaml
robinnn has joined #ocaml
92AACP2C3 has quit [Remote host closed the connection]
agarwal1975 has joined #ocaml
noj has joined #ocaml
avsm has quit [Quit: Leaving.]
dnolen has quit [Quit: dnolen]
larhat has quit [Quit: Leaving.]
Snark has quit [Quit: Ex-Chat]
robinnn has quit [Remote host closed the connection]
wtetzner has quit [Remote host closed the connection]
wtetzner has joined #ocaml
ymasory has joined #ocaml
<gildor>
thelema: I think larhat was right, parsing HTML is maybe not very reliable
<gildor>
thelema: what I can do, is to create a simple text file pkg/info/00list with one info per line
<gildor>
thelema: it will be more reliable to parse, you will have a shorter odb.ml code
<gildor>
thelema: alternate solution: pkg/00list with info/oUnit and ounit-1.1.0.tar.gz listed
avsm has joined #ocaml
wtetzner has quit [Remote host closed the connection]
wtetzner has joined #ocaml
yezariaely has joined #ocaml
yezariaely has left #ocaml []
ymasory has quit [Remote host closed the connection]
wtetzner has quit [Remote host closed the connection]
wtetzner has joined #ocaml
avsm has quit [Quit: Leaving.]
robinnn has joined #ocaml
robinn has joined #ocaml
<thelema>
scooty-puff: Does S have a type Monoid.t inside it?
<scooty-puff>
it does not, but i am thinking that may be the way to fix it
<thelema>
Usually the way to do "Monoid.t = Body.t" is attached to BodyType
<thelema>
no, that's not the way to fix it
<thelema>
(Body: BodyType with type t = Monoid.t
<thelema>
)
<scooty-puff>
ah, ok
<thelema>
you want to restrict BodyType, not S
<scooty-puff>
ok, that makes sense
<scooty-puff>
the one that might be difficult, and it may be a design issue with the Monoid.S signature
<scooty-puff>
is ensuring 'a Monoid.S.i = 'a array
<scooty-puff>
(it seems like i may be confusing when to use monomorphic types)
Yoric has quit [Quit: Yoric]
<scooty-puff>
Monoid.S defines val concat: t i -> t
<scooty-puff>
(abstracted by a functor in all cases i have defined)
<thelema>
Just put that restriction in Monoid.S : type 'a i = 'a array
<scooty-puff>
o, again
<scooty-puff>
ok
<scooty-puff>
i should have figured that one out..
<scooty-puff>
thanks
<thelema>
you don't need after-the-fact type tweaks
<thelema>
or just drop the i type and have val concat : t array -> t
<scooty-puff>
the only reason i did not define it as such is mostly because trying to emulate haskell monoid (which uses a list), but actually need to use an array in its use
<thelema>
if you really want, you can put that annotation into the functor parameter, if you don't want to pollute Monoid.S -- (Monoid : Monoid.S with type 'a i = 'a array)
<scooty-puff>
its it weird to have a type 'a i, and only use it with t i? i.e., should i define the container type with out type parameters
<thelema>
you can have type i = t array
<scooty-puff>
i guess i mean as a matter of style or convention, is one preferred over the other?
<thelema>
if you don't need the polymorphism, don't allow it.
<scooty-puff>
ok
<scooty-puff>
(polymorphism! i knew that was the term, but was feeling i was confusing or generalizing it too much)
sepp2k has quit [Quit: Leaving.]
ymasory has quit [Read error: Connection reset by peer]
ymasory has joined #ocaml
ymasory has quit [Client Quit]
Cyanure has quit [Remote host closed the connection]
wtetzner has quit [Remote host closed the connection]
wtetzner has joined #ocaml
vivanov has quit [Ping timeout: 250 seconds]
<gildor>
thelema: have you seen my proposal about 00list ?
<joelr>
how does this work? type 'a t = private socket
<joelr>
does this define a new type (socket) or is it referring to a previously defined socket type?
<joelr>
assuming this is within a module of course
<flux>
it is a type alias
<flux>
it refers to type 'socket' within the scope
<mrvn>
joelr: previously defined
<joelr>
hmm... i suspected so
<joelr>
thanks
<mrvn>
joelr: it also hides the fact that 'a t is just another name for socket
<mrvn>
hides it from the following code.
<flux>
well, it only partially hides it
<mrvn>
true
<flux>
you can subvert it with (foo :> socket)
<mrvn>
but not the other way around
<flux>
however, you cannot have a socket and pass it along as 'a t
<joelr>
was that :>
<joelr>
yes, it was :D
<flux>
see, ocaml can be fun!
robinn has quit [Quit: Leaving]
<joelr>
i'm trying to do 'oasis setup-dev' but i get no makefile generated
Yoric has joined #ocaml
<joelr>
why would that be?
robinnn has quit [Ping timeout: 240 seconds]
robinnn has joined #ocaml
robinn has joined #ocaml
ulfdoz has joined #ocaml
<joelr>
gildor: ^
ymasory has joined #ocaml
vivanov has joined #ocaml
vivanov has quit [Ping timeout: 260 seconds]
emmanuelux has quit [Read error: Connection reset by peer]
<thelema>
gildor: I don't recall it, but I'm guessing you're suggesting maintaining patches to packages in oasis-db
<gildor>
thelema: no, that was related to listing pkg/info as suggested by larhat
<gildor>
thelema: i.e. I can provide a file 00list which list content of pkg/info with one file per line (no HTML)
robinnn has quit [Quit: Leaving]
<gildor>
thelema: easier to parse
<gildor>
joelr: what is the content of the Plugins: field
<thelema>
ah, instead of flattening the directory listing
<joelr>
checking
<gildor>
thelema: yes, so that you will have something very simple to parse
<thelema>
If it's automatically maintained, no problem.
<joelr>
gildor: just meta
<gildor>
no more str
<gildor>
joelr: add DevFiles (0.2)
<joelr>
gildor: thanks!
<gildor>
thelema: of course, I will maintain it automatically (smthg like 5 lines more)
<gildor>
thelema: I'll ping you when ready
<gildor>
thelema: right now, working on some other stuff in oasis-db but will manage to do it tomorrow
<thelema>
ok, I'll fix up odb to read it real quick
<thelema>
one package per line?
<gildor>
one pkg/info per line
<thelema>
meaning that there'll be two entries for batteries: batteries\nestring\n
<gildor>
do you want the synopsis
<gildor>
thelema: I don't think that you even have to parse it, just download and display ?
<thelema>
space separated would be easier as I'd just print it out.
<gildor>
thelema: ok for space separated
* thelema
deletes 10 lines of code.
<thelema>
repo/pkg/info/00list?
<gildor>
yes
wtetzner has quit [Remote host closed the connection]
wtetzner has joined #ocaml
<joelr>
is there a caml ffi example that would show how to handle an array of tuples, both taking and creating?
<hcarty>
joelr: I don't have an example handy - but the short version is that to create it you create the tuples as OCaml values and insert them in to the array
<joelr>
hcarty: thanks
<hcarty>
Reading involves reading the OCaml value from the array, then reading the tuple elements from that value
<hcarty>
And if you have seen it... then it's an excellent resource you already know about :-)
<hcarty>
I reference it and the OCaml manual pretty frequently when working on bindings
<joelr>
hcarty: thanks!
scooty-puff has quit [Read error: Operation timed out]
<gildor>
thelema: 00list implemented
<thelema>
gildor: fix pushed
<thelema>
yay, I'm happy it doesn't list all the pseudo packages
<thelema>
err, n/m. I was looking at ... stable? something other than unstable
<gildor>
thelema: well, it lists all pseudo package
<gildor>
thelema: I can remove the ocamldoc/ocamllex/unix info, if you want
<gildor>
but latter this evening, time for dinner
<thelema>
if you can easily, otherwise some other time
<gildor>
thelema: it is 4 lines more, not a big deal
<thelema>
it doesn't help to list packages that can't be installed by odb
<joelr>
hcarty: i'm trying to implement a poll function for ocaml-zmq and normally the # of sockets is known in advance, so in c you allocate an array of poll descriptors on the stack. it appears that i'll have to malloc it in the ocaml stubs :-(
robinn has quit [Remote host closed the connection]
<joelr>
i guess i can have a separate function to pre-allocate the array and then reuse it
<thelema>
is ocaml.info down for everyone else?
<adrien>
dns issue for me
<adrien>
on two different and unrelated computers
<thelema>
ok. just checking it wasn't just me.
wtetzner has quit [Remote host closed the connection]
robinnn has joined #ocaml
wtetzner has joined #ocaml
scooty-puff has joined #ocaml
<hcarty>
joelr: If you can allocate one element at a time, you could allocate the OCaml array then fill in each element separately
<joelr>
right
<hcarty>
It avoids the C-side malloc
<hcarty>
But it may not make things any easier in the end.
<joelr>
hcarty: the array needs to be passed to a c function
<hcarty>
Oh. Nevermind then :-)
robinn has joined #ocaml
<joelr>
it's an array of c structures
<joelr>
so i'm looking to allocate it as a custom block
robinn has quit [Remote host closed the connection]
<mrvn>
you can allocate a bigarray of sufficient size
<mrvn>
The advantage of that would be that you can create slices of the array then.
sepp2k has joined #ocaml
joewilliams is now known as joewilliams_away
<joelr>
mrvn: this is an array holding a c structure
<joelr>
mrvn: i don't think i can use a bigarray
agarwal1975 has quit [Quit: agarwal1975]
wtetzner has quit [Remote host closed the connection]
wtetzner has joined #ocaml
genelisp has joined #ocaml
scooty-puff has quit [Ping timeout: 250 seconds]
avsm has joined #ocaml
robinnn has quit [Quit: Leaving]
scooty-puff has joined #ocaml
_andre has quit [Quit: home time]
<mrvn>
joelr: a bigarray is just a chunk of memory with some wrappers.
wtetzner has quit [Remote host closed the connection]
<joelr>
ok
wtetzner has joined #ocaml
<mrvn>
If you don't need subarrays of your array I would just make a custom block though.
<thelema>
mrvn: on the ocaml side, this array will hold tuples
<thelema>
mrvn: I don't think bigarray is good for this
<mrvn>
tuples of what?
<thelema>
mrvn: something having to do with poll
<mrvn>
and fd and a closure?
<mrvn>
If you have ocaml types then you can't use a bigarray or a malloced block. Then you need the GC to see the values.
<mrvn>
thelema: remeber a few days back I suggested that arrays of ints should't be scanned by the GC. You think it would work to tage then with the No_scan_tag?
<mrvn>
-e
<joelr>
custom block is what i'm using
<joelr>
tuples of a 1) custom block wrapping a zeromq socket type and 2) variant
<mrvn>
joelr: just remember that you can't put any non primitive ocaml values in there
<mrvn>
Isn't a zeromq socket just a FD?
<joelr>
no, it's not. it's a structure, most likely
<joelr>
an opaque type regardless
<thelema>
mrvn: That should work to keep them from being scanned.
<joelr>
i'm just allocating a custom block of the size of my array and sticking my array in there
<thelema>
mrvn: except iirc, no_scan_tag shouldn't acually be used, it's more of a boundary than an actual tag
<mrvn>
The docs say "A tag greater than or equal to No_scan_tag indicates a raw block, whose contents are not scanned by the garbage collector." No indication that No_scan_tag isn't allowed.
<thelema>
mrvn: it's allowed, just that it's not recommended, as its value may change.
<thelema>
and depending on how you use it (marshaling), that may be a problem
<mrvn>
true.
tautologico has quit [Quit: tautologico]
<mrvn>
I should open a bugreport requesting 2 new tags: Custom_scan_tag and Primitive_array_tag. The former is like Custom_tag except the GC would scan it.
<thelema>
mrvn: what's the first for? isn't there already a way to attach code to the deallocation of a value?
<mrvn>
thelema: Gc.finalise?
<orbitz>
what does <abstr> mean in a val'line?
<mrvn>
orbitz: that no details of the type are exposed
<orbitz>
what use is that?
<mrvn>
orbitz: it is what you get when you write "type t"
<orbitz>
so i have
<orbitz>
val waiter : '_a Lwt.t = <abstr>
<orbitz>
it means waiter returns an '_a Lwt.t and that is an abstract type?
<thelema>
orbitz: and this means that you can't see the details of how a Lwt.t is implemented
<mrvn>
which means you have '_a Lwt.t but aren't allowed to look at the internas.
philtor has quit [Ping timeout: 246 seconds]
Oejet has joined #ocaml
<mrvn>
thelema: I think Gc.finalise stores the closure in a hashtbl or so. I don't think it an efficient way to finalise a block.
<thelema>
as soon as you have a killer app in ocaml that needs fast finalization, then request that tag.
<mrvn>
libaio bindings
<mrvn>
The problem arises when you have some C bindings that have both ocaml and C pointer in their struct. Like a callback closure and some buffer space. Now you need to create a tuple with the ocaml values plus a custom block with finalizer for the buffer.
StylusEater has joined #ocaml
StylusEater has left #ocaml []
Modius has quit [Quit: "Object-oriented design" is an oxymoron]
akka has joined #ocaml
<gildor>
thelema: ok, only listing info from real packages
<thelema>
much nicer. You say I shouldn't put much work into this dev repo because it may not survive going live?
edwin has quit [Remote host closed the connection]
<gildor>
thelema: I cannot guarantee that it will survive, but would probably do what I can to make it surive
<gildor>
thelema: i.e. all smooth upgrade scheme are in place but I never tested it thoroughly
<thelema>
Okay, I want there to be a good repo for people to actually use, so sometime I'll have to put in work on the contents of the repo
<thelema>
fair enough. It shouldn't be too hard to migrate - it's mostly just uploading tarballs and choosing the right package names at this point.
<gildor>
let say, that all the effort you put into this repo will help to design a good system
<thelema>
This weekend, I'll spend some time so that at least some things are buildable.
<gildor>
maybe don't put too much effort on the number of packages for now, just focus on what is important for odb.ml
<thelema>
along those lines - did you get a chance to fix the file extension bug for camomile?
<gildor>
i.e. I suppose you want a buildable version of batteries
<gildor>
thelema: not yet
<thelema>
ok, that's important at this point, as odb needs to know the archive type to extract it
<thelema>
maybe if there were a way to remove that URL from the package, so it would default to the .gz I uploaded...
<thelema>
I had both batteries and oasis buildable from scratch under my old repo - it would be a minimum to get the two of those working again under the new repo
<gildor>
thelema: yep, you'll have to edit some _oasis for them
<thelema>
(sorry, oasis was the package with the most dependencies that I knew of)
<gildor>
thelema: you never try to build ocsigen ;-)
<thelema>
yup, I haven't.
<thelema>
Maybe that'll be #3
<thelema>
easy, medium, hard
<gildor>
thelema: if you have to create _oasis for camomile, add .oasis1 to the version number
<gildor>
thelema: or any other package
<gildor>
thelema: that is the scheme I will adopt for creating new pkg
<thelema>
uh oh, my version code can't handle words.
<gildor>
thelema: in the _oasis created you can limit yourself to: Library/Exec section with the right deps
<thelema>
I'm very weak at _oasis-fu, so I appreciate any help you can give. My initial plan is to copy the batteries _oasis file and tweak the commands
<thelema>
and the metadata
<thelema>
I doubt I'll be creating proper _oasis files (in the sense that it doesn't use the existing build system) for any packages yet.
<thelema>
Unless I find a really trivial package.
<thelema>
that I know well enough to be sure it's really trivial
<gildor>
I think odb.ml will fall into the ./configure/make case
<gildor>
and that is ok (for now ;-)
<gildor>
but you need to have the right dependencies to build deps=
<gildor>
and the right findlib name and executable name for pkg/info
<gildor>
so just describe what the content of the tarball is
<thelema>
so I can make an _oasis file without making a setup.ml file for anything I want to keep the existing build system on?
<gildor>
thelema: the _oasis is required to generate the repository, so yes
<gildor>
thelema: ideally you should generate a setup.ml out of it, but that the long term goal
Oejet has quit [Quit: Leaving.]
<thelema>
yes, long term - replace the existing build system with setup.ml as much as possible.
<gildor>
thelema: you are not really force to replace the build system, you will just offer a standard entry points in it, through setup.ml
<thelema>
I may have to do this for camlzip, which needs custom make target to install for findlib
Oejet has joined #ocaml
<gildor>
can you make you version scheme handle the .oasis1 (or just ignore it)
<gildor>
that is quite important, since it will clearly state that the version has been changed to contain an _oasis file
<thelema>
but if the existing build system is configure/make/make install, I'm just going to generate a very light _oasis with just metadata and no info on how to compile. Hopefully that'll work for the repo
<thelema>
yes, I can hack support for .oasis1 in
<gildor>
the camomile link is just a big failure
<thelema>
technical debt catching up with you?
<gildor>
the tarball is empty
<thelema>
iirc, the link doesn't even work right, as it goes to a page that auto-starts the download.
<gildor>
and the link points to the .bz2 version
<thelema>
stupid sourceforge
<gildor>
best option: remove the link, reinject the tarball
<thelema>
can I remove the link? I looked for a way to do this
<gildor>
edit button is missing, but yes you can
<gildor>
using vi
<thelema>
I should have tried that. :)
<gildor>
you want the .bz2 or the .gz ?
<thelema>
I prefer .gz
<gildor>
hum, upstream only provide a .bz2, sorry
<thelema>
well, at least give it the right name so I can use the right extraction command.
<gildor>
I am doing it
<thelema>
1) support .bz2 files, 2) support .oasis1 versions
<thelema>
(my todo list for odb)
joewilliams_away is now known as joewilliams
<gildor>
thelema: camomile link fixed
<ptrf>
who's handling the planet_ocaml twitter bot?
<thelema>
gildor: thank you.
<ptrf>
or, what i'm actually wondering about, why doesnt it retweet instead of copying tweets?
<gildor>
ptrf: I am handling the planet_ocamlcore twitter bot (the one that display the caml logo)
Yoric has quit [Quit: Yoric]
wtetzner has quit [Remote host closed the connection]
<ptrf>
twitter.com/planet_ocamlcore gives 404
<ptrf>
dont you mean twitter.com/planet_ocaml
<ptrf>
?
wtetzner has joined #ocaml
<ptrf>
if yes, then why is it that it doesnt just do regular retweets, instead of copying tweets