<sgnb>
(I guess the principle is the same, but the examples should be fixed)
Yoric has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
ulfdoz has quit [Ping timeout: 276 seconds]
myu2 has joined #ocaml
myu2 has quit [Remote host closed the connection]
myu2 has joined #ocaml
ttamttam has joined #ocaml
Submarine has quit [Ping timeout: 276 seconds]
ikaros has joined #ocaml
<adrien>
hcarty: can you send me an example of the C libraries you're making bindings for?
munga_ has joined #ocaml
munga__ has joined #ocaml
ftrvxmtrx has joined #ocaml
Yoric has quit [Quit: Yoric]
msandin has joined #ocaml
dmhouse has quit [Read error: Connection reset by peer]
barismetin has joined #ocaml
barismetin has quit [Remote host closed the connection]
barismetin has joined #ocaml
alang has joined #ocaml
f[x] has quit [Ping timeout: 276 seconds]
f[x] has joined #ocaml
th5 has joined #ocaml
sepp2k has joined #ocaml
lvillani has joined #ocaml
rwmjones has left #ocaml []
rwmjones has joined #ocaml
eldragon has quit [Read error: Connection reset by peer]
eldragon has joined #ocaml
lvillani has quit [Remote host closed the connection]
lvillani has joined #ocaml
Shoggoth has quit [Quit: Ex-Chat]
alang has quit [Read error: No route to host]
alang1 has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
dmhouse has joined #ocaml
kaustuv has joined #ocaml
jsk-afk is now known as jsk
spearalot has joined #ocaml
dmhouse has quit [Read error: Connection reset by peer]
alpounet has joined #ocaml
drk-sd has joined #ocaml
munga_ has quit [Read error: Operation timed out]
munga__ has quit [Ping timeout: 258 seconds]
ikaros has joined #ocaml
onigiri_ has joined #ocaml
onigiri__ has quit [Ping timeout: 245 seconds]
_andre has joined #ocaml
|Jedai| has joined #ocaml
Jedai has quit [Ping timeout: 264 seconds]
myu2 has quit [Remote host closed the connection]
lvillani_ has joined #ocaml
spearalot has quit [Quit: Computer has gone to sleep]
spearalot has joined #ocaml
valross has quit [Quit: Ex-Chat]
derdon has joined #ocaml
smimou has quit [Ping timeout: 246 seconds]
Associat0r has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
f[x] has quit [Ping timeout: 248 seconds]
f[x] has joined #ocaml
<f[x]>
this is a shame, bitstring's META is still horribly broken
<munga>
question of the days: how can I create a Pervasives.in_channel from a string ? I want to uncompress a gzip file in memory without writing a file on disk
<f[x]>
no wai. use better gzip library (there is one in batteries afaik)
<adrien>
you could start gzip, get its stdin, write to it and read its stdout
<adrien>
you'd be limited to 16MB inputs/outputs on 32bit however
<munga>
thanks :)
kriko has joined #ocaml
<thelema>
f[x]: sadly, the gzip file interface was removed in batteries 1.0 to cut down on dependencies.
<adrien>
an interface to libarchive would probably be nice
f[x] has quit [Ping timeout: 276 seconds]
f[x] has joined #ocaml
<thelema>
libarchive? I'll look that up
<thelema>
mmm, that does look good. I worry about having wierd external dependencies
<thelema>
It looks like it'd take care of just about any archive format access someone might want to do
<thelema>
(including myself)
<adrien>
and the code quality is pretty good, I think archiver support (tar and cpio) is built-in and compressor support (gzip, bzip2, lzma/lzma2) uses external libraries
<adrien>
it also supports zip too iirc
<thelema>
wow, I like the automatic format detection...
<adrien>
would make a quite simple API too I guess
ftrvxmtrx_ has joined #ocaml
ftrvxmtrx has quit [Read error: Connection reset by peer]
<thelema>
I hope so - that'd be perfect for batteries.
<adrien>
I don't currently have the time for that but if noone does it, I might end up doing it (well, outside of batteries, and inside too, I need it as separate)
<ttamttam>
f[x]: which META do you have for bitstring?
<f[x]>
i.e. I am manually patching META for each bitstring install
<ttamttam>
Ok. I thought you had found other problem(s) with this version
<f[x]>
nope
jonathandav has left #ocaml []
<ttamttam>
Sorry for the noise
ikaros has quit [Quit: Leave the magic to Houdini]
lvillani has joined #ocaml
cgrubb has joined #ocaml
smimou has joined #ocaml
ikaros has joined #ocaml
myu2 has joined #ocaml
adrien has quit [Ping timeout: 245 seconds]
Asmadeus has quit [Ping timeout: 264 seconds]
Camarade_Tux has joined #ocaml
adrien has joined #ocaml
Camarade_Tux has quit [Client Quit]
Asmadeus has joined #ocaml
ygrek has joined #ocaml
dmhouse has quit [Remote host closed the connection]
dmhouse has joined #ocaml
dmhouse has quit [Remote host closed the connection]
myu2 has quit [Remote host closed the connection]
spearalot has quit [Quit: Computer has gone to sleep]
avsm has joined #ocaml
<th5>
In the batteries documentation for Stream, it says see BatEnum or BatLazyList and GenParser. Anyone know what/where is GenParser? (just in Haskell's Parsec library?)
<kaustuv>
Where does it say it? I can't find it in: http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=batteries/batteries.git;a=blob;f=src/batStream.mli;h=76a7d5e47583d7da4f5c97264c7e4f2cfd7aa4a7;hb=e8c1e36d94b7cf44136c9adb58aae51e6057b01f
<thelema>
it mentions it on line 30...
<kaustuv>
Ah, maybe it's meant to be a reference to ParserCo?
<thelema>
I'm trying to track it down.
<thelema>
GenParser was in extlib
<thelema>
but I dunno where that code's gone
<th5>
oh ok
<thelema>
I think it was replaced about 2 years ago by parserCo
<th5>
I'm just now reading the documentation for Enum. Thinking about switching away from streams...
<th5>
Is there some camlp5 syntax for dealing with Enums (or maybe for lazylists - havent read about them yet) ?
<thelema>
no nice syntax. There's some ideas of taking advantage of 3.11's support for 'lazy' in matching, but not done yet
<th5>
oh ok
<thelema>
kaustuv: I guess it was only in batteries' local copy
<th5>
How does the performance compare with Stream ?
<thelema>
depends on your application. I don't think we have any conclusive benchmarks
myu2 has joined #ocaml
<kaustuv>
What is the point of BatUnit?
<thelema>
One nice thing about enum is that elements can be GC'd as soon as they're pulled off the head of the list.
<kaustuv>
Trivial functor instances?
ikaros has quit [Quit: Leave the magic to Houdini]
<thelema>
kaustuv: pretty much. completeness.
<th5>
I'm doing some XML parsing - so just consuming a big stream of elements once while building OCaml types
<th5>
thelema: oh really? I'll start messing around then - that'd be nice
<thelema>
kaustuv: it's occasionally handy with Pair.print for types that happen to get instantiated with unit as part of a pair
<thelema>
th5: let me know how it goes.
ccasin has joined #ocaml
<th5>
is there something you dislike about Stream?
<thelema>
not really - there's just no reason to prefer it to Lazy Lists or Enumerations.
<thelema>
I guess the big thing you get with Enum vs. stream is easy length counting (sometimes) and easy cloning (although there's at least one bug in this somewhere, IIRC)
<th5>
Hmm - I'll mess around a little - the nice thing for me would be all the useful helper functions - Not totally sure about switching just yet though
boscop has joined #ocaml
joewilliams_away is now known as joewilliams
Yoric has joined #ocaml
avsm has quit [Quit: Leaving.]
jakedouglas has quit [Remote host closed the connection]
jakedouglas has joined #ocaml
sepp2k has quit [Remote host closed the connection]
<thelema>
hmm, maybe batteries should adopt '&' for function application instead of **> (or <|, which has the wrong precedence)
cgrubb has quit [Quit: cgrubb]
<th5>
what's wrong with space ?
<thelema>
requires () for grouping
<th5>
ahh
<thelema>
haskell uses $ for the same thing, except this has the wrong precedence or associativity or something in ocaml
ttamttam has quit [Quit: Leaving.]
_unK has joined #ocaml
barismetin has quit [Ping timeout: 245 seconds]
sepp2k has joined #ocaml
itewsh has joined #ocaml
Yoric has quit [Quit: Yoric]
ftrvxmtrx_ has quit [Quit: Leaving]
cgrubb has joined #ocaml
<adrien>
why is there a difference between 'type t = A of int * int' and 'type t = A of (int * int)'? I don't see how the first could be interpreted differently from the second
<flux>
thelema, & actually seems like a decent choice, given & is deprecated. is its precedency proper as well?
<adrien>
and & should be easy to type on almost any keyboard layout
<thelema>
flux: it's what the nickolas of ocamlbuild chose, so it's the standard for ocamlbuild plugins
<thelema>
*nicholas
<thelema>
adrien: the first is a 3-tuple: tag, int, int
<thelema>
the second is a 2-tuple: tag, pointer to (int, int)
<adrien>
thelema, ok, thanks
<thelema>
flux: technically it's a keyword... but it's right associative and pretty low precedence, so...
<adrien>
annoys me because I can't write '| Ast_c.FunCall expr -> expr' and have to write '| Ast_c.FunCall (funcall, expr) -> funcall, expr' which doesn't feel natural
jsk is now known as jsk-afk
<thelema>
because it's the first type, and it can't just extract the pointer to the pair, but has to be told to generate the pair
<thelema>
You're right, it's only sometimes an optimization, which is why both are allowed
goomba has joined #ocaml
ulfdoz has joined #ocaml
<kaustuv>
A of int * int doesn't actually generate a 3-tuple. It has the same space usage as a pair.
kaustuv_ has joined #ocaml
<thelema>
I was counting the tag word as part of the tuple. You're right, of course. But that pair can't (shouldn't) be mutated into an untagged pair.
<adrien>
the distinction makes sense, it's only a bit annoying
kaustuv has quit [Ping timeout: 260 seconds]
<thelema>
:( OASIS gets an initial thumbs down from me for having so many dependencies. I hope it doesn't need to be installed on the client side
<adrien>
which deps? and you mean, to run the .ml file or to generate it?
<thelema>
to setup a project as oasis-enabled. The deps I didn't have were extlib, fileutils, ocamlgraph and odn
<thelema>
and maybe ocamlify
<thelema>
and it looks like odn needs type-conv
<adrien>
my memory must be horrible, I can't remember well but I think all these deps aren't required later on
* adrien
feels old
<adrien>
and btw, ocaml-fileutils is awesome ;-)
<thelema>
yup, and type-conv needs almost the rest of jane street's public libraries - bin-prot, fields, sexplib
<adrien>
hmmm
<thelema>
Maybe I'll install the binary version after all
<adrien>
sexplib requires type-conv and I don't have fields
<adrien>
maybe bin-prot but that should be it
itewsh has quit [Quit: There are only 10 kinds of people: those who understand binary and those who don't]
<kaustuv_>
I'll never understand why everyone seems to like type-conv, sexplib, etc.
<adrien>
nice interface, fast, reliable?
<thelema>
because people grow tired of writing pretty printers and parsers for every datatype they make.
<thelema>
and because Marshal is double-plus dangerous
alang1 has quit [Quit: Leaving.]
<adrien>
sepxlib saved me a *lot* of time for yypkg
<adrien>
especially when your format/types are not definitive
drk-sd has quit [Quit: prologin]
<thelema>
They're probably really useful for debugging, as you can print things in a possibly readable form.
th5 has quit [Ping timeout: 248 seconds]
<adrien>
but what do you think about them?
<adrien>
(/me leaving soon)
<thelema>
I don't use them
<adrien>
I was actually asking kaustuv
<adrien>
but any reason you don't use them? or only that you don't need them?
<thelema>
too heavy a dependency, IMNSHO
<kaustuv_>
Sorry, I wasn't paying attention to IRC. I don't like these tools because when it matters having a real parser and pretty printer is worth the investment, and when it doesn't matter, dirty debugging with Obj.tag has suited me fine.
<kaustuv_>
I especially don't see how writing libraries with these things as dependencies is conscionable.
ttamttam has joined #ocaml
<kaustuv_>
Also, Marshal is pretty good for ad hoc protocols between server/client processes, which is perhaps the main thing I would need serialization for
<kaustuv_>
Maybe I'm just a crotchety old timer.
<kaustuv_>
Anyway, train time.
kaustuv_ has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<gildor>
thelema: OASIS generates a setup.ml that has 0 dependencies
<gildor>
thelema: and if you want to install it without dependencies, there is a linux installer
<gildor>
and probably a debian package for it soon
<thelema>
yup, I got it installed. Now I just have to figure out how to turn the Makefile we're using as a frontend to ocamlbuild into an _oasis
<gildor>
if you want to start slowly, I recommend to use the custom plugin
<gildor>
BuildType: custom (0.1.0)
<gildor>
XCustomBuild: $make all
<gildor>
(or $make toto if it is the default target)
<gildor>
_oasis can be useful to detect build dependencies, and it is a good first step
<gildor>
i.e. BuildDepends: sexplib
<gildor>
or to check OCaml version
<gildor>
OCamlVersion: >= 3.11.1
<gildor>
and to generate files
<gildor>
using FilesAB: src/conf.ml.ab
<gildor>
and substitue variables there
<gildor>
src/conf.ml.ab: let version = "$pkg_version"
<gildor>
thelema: I'll be away (diner time), I'll be back in 2 hours, but you can send me your questions by email, don't hesitate
<thelema>
ok.
<thelema>
I've got some other things to finish first.
enthymeme has joined #ocaml
ttamttam has quit [Ping timeout: 276 seconds]
spearalot has joined #ocaml
ttamttam has joined #ocaml
spearalot has quit [Client Quit]
jakedouglas has quit [Quit: Leaving.]
spearalot has joined #ocaml
spearalot has quit [Client Quit]
ftrvxmtrx has joined #ocaml
joewilliams is now known as joewilliams_away
pad has joined #ocaml
itewsh has joined #ocaml
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]