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
struktured has quit [Ping timeout: 244 seconds]
struktured has joined #ocaml
Progster has quit [Ping timeout: 260 seconds]
struktured has quit [Ping timeout: 244 seconds]
struktured has joined #ocaml
pango is now known as pangoafk
tbrady has joined #ocaml
netrino has quit [Quit: Ave!]
cdidd has quit [Remote host closed the connection]
struktured has quit [Ping timeout: 245 seconds]
spaceships has joined #ocaml
destrius has joined #ocaml
spaceships has quit [Read error: Connection reset by peer]
spaceships has joined #ocaml
spaceships has quit [Quit: Lost terminal]
Progster has joined #ocaml
mister_m has joined #ocaml
<mister_m> is there a difference between defining a function like this: let f x y z = x + y + z;; as ooposed to this: let f = function x y z -> x + y + z ;;
<mister_m> is the first an implicit application of pattern matching?
avsm has quit [Quit: Leaving.]
<ssbr> mister_m: I think you mean "fun"
<ssbr> and no, pattern matching only happens with "function" or "match"
<ssbr> and no, I don't know of any difference.
<mister_m> ssbr: where do I mean fun
<ssbr> mister_m: function should be fun
<ssbr> function pattern matches one argument, it doesn't accept multiple arguments
<mister_m> ssbr: my mistake, you are right
smerz has quit [Ping timeout: 245 seconds]
struktured has joined #ocaml
Progster has quit [Ping timeout: 260 seconds]
NihilistDandy has joined #ocaml
tbrady has quit [Quit: tbrady]
emmanuelux has quit [Ping timeout: 246 seconds]
mister_m has quit [Quit: WeeChat 0.3.7]
edwin has joined #ocaml
BiDOrD has joined #ocaml
BiDOrD_ has quit [Read error: Operation timed out]
NihilistDandy has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ftrvxmtrx has quit [Quit: Leaving]
osa1 has quit [Ping timeout: 246 seconds]
err404 has joined #ocaml
ankit9 has joined #ocaml
mika1 has joined #ocaml
cago has joined #ocaml
avsm has joined #ocaml
avsm has quit [Client Quit]
probst has joined #ocaml
probst has quit [Client Quit]
<bnwr> ssbr: (mister_m left, but you might be interested) #let f None (Some 2) = 3 ;; is a valid definition, that uses pattern matching
edwin has left #ocaml []
<bnwr> it even warns: Warning 8: this pattern-matching is not exhaustive.
<bnwr> twice (each time for a different argument)
gasche has joined #ocaml
avsm has joined #ocaml
thomasga has joined #ocaml
ftrvxmtrx has joined #ocaml
pangoafk has quit [Ping timeout: 272 seconds]
pangoafk has joined #ocaml
<Ptival> gasche: thx
avsm has quit [Quit: Leaving.]
Yoric has joined #ocaml
<gasche> (the project from Jérémie Dimino I was thinking of was "utop" ( http://darcs.ocamlcore.org/repos/utop/README ), but apparently he used his own ncurse-like library directly, instead : http://forge.ocamlcore.org/projects/lambda-term/
<gasche> it has readline-like support but is probably too different and monolithic for what you're trying to do
<orbitz> Ahh gasche, the face of Ocaml on reddit :)
eni has joined #ocaml
<gasche> well orbitz, I'd love not to be: my mission will have succeeded when I don't have to post on reddit, because others do
<gasche> gtani is doing a good job at it recently
<gasche> you should consider posting too ! :)
<orbitz> :)
<orbitz> I don't have anything to post yet!
<gasche> well
<orbitz> I will have some code to post soon, I'm going to ask the core peopel to look at it tonight to tease out holes and then I'll pos tit ot ocaml
<gasche> when I say you should post on reddit, I did not necessarily mean that you should post your own stuff
<gasche> I post other people's stuff on reddit
<orbitz> The problem is, reddit is my source of ocaml news haha
<gasche> when I find something on the web that I found interesting, and which is OCaml-related, I post it
<gasche> ha
<gasche> I know of a source of fantastic blog posts that I don't post on reddit myself: the ones I contributed writing on http://gallium.inria.fr/~scherer/gagallium/
<gasche> feel free to suscribe to the syndication feed (or Planet OCaml which has those plus a lot of other stuff), and post the one you personally found most interesting, if any
<gasche> orbitz, but if you have indications on what you'd like to see on r/ocaml, I'm all ears
<gasche> (for example: do people prefer to read only about new stuff, or is old stuff that wasn't posted also fine?)
<gasche> thelema, are you planning to attend the Ocaml Users and Developers Meeting this year?
<asmanur> gasche: do you know if there something planned on batteries to disable the runtime check of Camomile ? (or delay its initialization)
<gasche> I don't know, I haven't heard of much about Camomile; thelema certainly knows about this better
<gasche> btw asmanur
<gasche> did we finally integrate your string slice patches?
<gasche> I recently wondered about where those had gone
<asmanur> I think so
<asmanur> I've been using it in mlorg
<asmanur> and it compiles against the latest git so...
<gasche> ok, it's fine
<gasche> sometimes I fear contributions get lost in the bugtracker
<asmanur> gasche: I don't know if I spoke of it at that time, but I think it would be intesreting to have an interface for String-like modules
<asmanur> (String, SubString, Rope, UTF8, ...)
<gasche> hm
<gasche> but they provide quite different capabilities
<gasche> (eg. Rope emphasize concatenations and UTF8 things should de-emphasize random access)
<asmanur> yes
<asmanur> but I think a user should be able to write code that does not depend on a particular backend
<gasche> ok
<orbitz> gasche: I'm ok with anything ocaml related. Depending on my mood I especially like stories of people accomplishing things in Ocaml, the type theorys tuff is interesting but often times I liek my types simple enough to be effective but simple enough to use
<asmanur> and then choose the backend that is more suited to his code
<gasche> well asmanur, we're accepting contributions any time :]
destrius has quit [Read error: Connection reset by peer]
<gasche> we should update the Junior tasks page ( ,https://github.com/ocaml-batteries-team/batteries-included/wiki/%22Junior-tasks%22-for-batteries ) and maybe we could add that to it
<asmanur> well I'll try to find some time to make up an interface
<gasche> if you don't really plan to work on it yourself, a small paragraph to add to this page would also be appreciated
<asmanur> ok
<gasche> (currently it's a bit outdated and I'm ashamed of it, but I'm buzy with GADTs subtyping right now and don't want to start on Batteries so soon in the week...)
<asmanur> :D
avsm has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
eni is now known as albacker
albacker has quit [Changing host]
albacker has joined #ocaml
sepp2k has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
albacker is now known as eni
destrius has joined #ocaml
Hussaind has joined #ocaml
Hussaind has left #ocaml []
cdidd has joined #ocaml
thomasga has quit [*.net *.split]
pollux has quit [*.net *.split]
testcocoon has quit [*.net *.split]
Ptival has quit [*.net *.split]
zorun has quit [*.net *.split]
wieczyk has quit [*.net *.split]
zorun has joined #ocaml
pollux has joined #ocaml
testcocoon has joined #ocaml
thomasga has joined #ocaml
Ptival has joined #ocaml
wieczyk has joined #ocaml
destrius has quit [Quit: Leaving.]
fraggle_ has quit [Remote host closed the connection]
ankit9 has quit [Remote host closed the connection]
ftrvxmtrx has quit [Ping timeout: 244 seconds]
zorun has quit [Ping timeout: 265 seconds]
eni has quit [Quit: Leaving]
fraggle_ has joined #ocaml
_andre has joined #ocaml
emmanuelux has joined #ocaml
zorun has joined #ocaml
ftrvxmtrx has joined #ocaml
nicoo has quit [Ping timeout: 248 seconds]
adrien is now known as pchevalier_ow
pchevalier_ow is now known as adrien
netrino has joined #ocaml
emmanuelux has quit [Ping timeout: 264 seconds]
mal``` has quit [Ping timeout: 260 seconds]
nicoo has joined #ocaml
mal`` has joined #ocaml
Yoric has joined #ocaml
nass has quit [Quit: WeeChat 0.3.7]
Progster has joined #ocaml
emmanuelux has joined #ocaml
slash^ has joined #ocaml
<diml> gasche: lambda-term has readline support but this part actually uses all other modules of the lib, it is not an isolated feature...
<gasche> ok, thanks
<gasche> diml, have you seen bobzang's questions about patching Camlp4? (on the bugtracker and SO)
<gasche> (he seems surprisingly enthusiastic about making changes to it)
<diml> gasche: yes, but i did not yet take the time to look at it carefully
<gasche> ok
<thelema> gasche: I have no plans
<thelema> asmanur: batteries 2.0 doesn't depend on camomile
<gasche> thelema, does it mean you plan not to come?
<thelema> gasche: I have no plans to attend
<thelema> yes
<gasche> ok
<gasche> a shame :]
<thelema> I'd like to participate, but traveling to france is costly
<gasche> it's Denmark
<gasche> but probably just as costly if you're in the US
<thelema> yes, potato, tomato
* orbitz will be missing ICFP :(
<gasche> and you could not suggest your employer to fund the trip :-'
<thelema> my employer is not supportive of my work on OCaml
<gasche> hm
<gasche> if I was in your situation, I'd consider asking Yaron for funding, in reward to your participation to a "Core vs Batteries" discussion
<adrien> thelema: pfffft, if you really wanted, you'd get into a box and be shipped by ups!
<orbitz> srsly thelema, where is your dedication?
<thelema> :)
<thelema> Sep 14th, right?
<gasche> ( the planning for ICFP: http://xelpaste.org/5317 )
<gasche> yes, OUD is on the 14th
<gasche> at the same time as "Haskell's Implementor's Workshop" and some part of CUFP
<gasche> the day before they have "Haskell Symposium" and "Workshop on ML" at the same time; a shame as I hoped to attend both
<orbitz> Whatis OUD?
<gasche> OCaml Users and Developers' Workshop
<orbitz> Ocaml User Discussion?
<gasche> a strange name for "OCaml Meeting"
<orbitz> Is that in france?
<adrien> Denmark iirc
<orbitz> Ah, so ICFP and OUD are in Denmark. Copenhagen?
<rwmjones> ocamlbuild--
<orbitz> hi rwmjones
<rwmjones> hello ... ocamlbuild is another build system in search of a problem
<rwmjones> how do I simply add an -I flag to all compiles?
<rwmjones> this shouldn't be hard
<orbitz> :) I've been making my own Makefiles for fun, it's actually not that bad (with ocamlfind)
<avsm1> rwmjones: ive spent so much painful time with ocamlbuild. you need a custom myocamlbuild.ml
<avsm1> add a "directory: include" to your _tags file and that might work
<thomasga> ocamlbuild -cflags xx,yy,zz
<thomasga> and ocamlbuild -lflags xx,yy,zz
<thomasga> (cflags is for "compile")
<adrien> rwmjones: -I flag about what? include for C? for another ocaml library?
<thomasga> (lflags is for "link")
<gasche> indeed, ocamlbuild -cflags -I,$dir -lfags -I,$dir works
<gasche> but you may have an easier time if $dir is the path to an ocamlfind package; then you can use ocamlbuild -pkg package_name
<gasche> (it's good if you can package your own libs through ocamlfind)
ccasin has quit [Ping timeout: 276 seconds]
emmanuelux has quit [Read error: Operation timed out]
emmanuelux has joined #ocaml
Progster has quit [Ping timeout: 260 seconds]
<rwmjones> I need to add -I +compiler-libs, that's all
<rwmjones> to any ocamlc/ocamlopt invocation
<thelema> flag ["ocaml"; "compile"; "compiler-libs"] & S[A"-I"; A"+compiler-libs"];
<thelema> rwmjones: this was my solution - use myocamlbuild rules to make a new tag
<thelema> and then apply that tag to whatever needed compiler libs
<thelema> you'll need at least 3 lines like this in your myocamlbuild - one for "compile", one for "link" and one for "ocamldep"
<adrien> rwmjones: update the META files for ocaml?
<rwmjones> yeah, I'm waiting to see what the solution is going to be upstream
<rwmjones> having compiler-libs in a separate directory isn't great long-term
<adrien> a package named "ocaml.compilerlibs" or something like that
<gasche> hm
<rwmjones> at least, for toploop etc
<gasche> rwmjones, this change was actually made in the hope of *simplifying* third-party developers job in reusing those libraries
<gasche> so if you think this is a problem, you should complain about in on the bugtracker
<adrien> as far as I'm concerned, I view it as simpler
<gasche> Gerd already has some tickets open on this
<adrien> iirc some of the files weren't installed at all before
<gasche> in short, we need feedback
<rwmjones> right, installing the extra files is great
<rwmjones> but breaking all the software to do so is bad
<gasche> hm
<rwmjones> anyway, waiting to see what happens upstream
<gasche> you should report on your problems and what you *would like* to happen upstream
<adrien> heh, it's a major release, breakage is to be expected ;p
<gasche> I think the reason to use compiler-libs/ was that this was how Debian did it on their own
<gasche> so hopefully it would not break things on some people ecosystem
<thelema> you'll need at least 3 lines like this in your myocamlbuild - one for "compile", one for "link" and one for "ocamldep"
<gasche> of course, one reason for the dev to make this change is that several environments had made different choices, so there was a growing non-portability; some breakage is to be expected
<gasche> finally, you (#ocaml in general) should not hesitate to send feedback on what should be improved on ocamlbuild
<gasche> patches are, of course, even better
<gasche> I'm planning to hack on ocamlbuild a bit when I get the time (maybe this summer?)
<adrien> -j!
<adrien> kidding, but it'd be nice
<gasche> build parallelization is not trivial; definitely a quick fix one can do without knowing the codebase well, more like an internship project
<gasche> (but if you know people that have time, or know teacher that are looking for a-bit-ambitious programming projects in OCaml that could be helpful to more people, yes, that's definitely something interesting)
<mrvn> Debian split the ocaml libs between compiler and runtime stuff. And I thinkt the reason for the extra dir is so that people don't accidentally use the compiler libs and then the programm fails if only the runtime is installed.
osa1 has joined #ocaml
<gasche> well
<gasche> if the current choice is really problematic, you should send feedback *before* the release
<gasche> it certainly won't be changed afterwards, and could be changed now
osa1 has quit [Ping timeout: 246 seconds]
avsm1 has quit [Quit: Leaving.]
cpiccione has joined #ocaml
cpiccione has quit [Quit: Beware of programmers who carry screwdrivers.]
thomasga has quit [Remote host closed the connection]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
avsm has joined #ocaml
smerz has joined #ocaml
tbrady has joined #ocaml
Yoric has quit [Quit: Instantbird 1.2a1pre -- http://www.instantbird.com]
Yoric has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
cago has quit [Quit: Leaving.]
mika1 has quit [Quit: Leaving.]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
thomasga has joined #ocaml
vext01 has joined #ocaml
<vext01> hi, i was wondering how I can link a package which is not using findlib
<vext01> specifically mlgmp
<vext01> my serach terms have not been the right ones
* mrvn wonders how hard it would be to add x32 support to ocaml (x32 == amd64 but with 32bit pointer).
<mrvn> It would need basically i386 data structures but with amd64 code generation.
<vext01> hi again mrvn
<mrvn> hi vext01
<adrien> mrvn: pjzeiorhoegtuerjkgbfuiermkldfvyudtqsfyg
<adrien> <- doesn't buy x32
<adrien> mostly useless imho
emmanuelux has quit [Ping timeout: 248 seconds]
<adrien> except it could be a good way to trigger and pinpoint a number of assumptions
<mrvn> It is good for stuff that doesn't need more than 4GB ram but some speed.
<mrvn> and stuff with lots and lots of pointers.
<vext01> ah i figured it out
<vext01> this is correct for a package not using findlib:
<vext01> ocamlopt -verbose -I /usr/local/lib/ocaml/gmp gmp.cmxa g.ml
<mrvn> looks ok
<adrien> mrvn: you're going to get what? 10% faster at best?
<mrvn> adrien: 30% isn't unheard of.
<mrvn> adrien: and that is for amd64 code with the memory overhead
<adrien> 30% is unheard of to me :-)
<mrvn> so let it be 10%. still a bonus.
<adrien> but there are probably easier ways to win performance in ocaml
<adrien> 30% is really only if you _only_ play with pointers and do nothing on them
<mrvn> adrien: no, 30% is if you have a quite small loop that needs lots of registers.
<mrvn> pointers on amd64 slow you down because they need twice the memory bandwidth.
<adrien> 30% is pretty much the absolute theorical maximum you can get with x32
<mrvn> fixed.
<mrvn> ups
ftrvxmtrx has joined #ocaml
Yoric has quit [Ping timeout: 245 seconds]
<orbitz> Hello! I have a design question that I would appreciaet some help on if someone has a few minutes
<orbitz> The basic problem is: I have this functor https://github.com/orbitz/web_typed/blob/master/libs/ort_async/gen_server.ml
<orbitz> And I want to some how represent passing the init function in GEN_SERVER 'itself'. But the type doesn't exist where the user would specify such a thing, so I can't. I'm wondering if I can solve this more elegantly. Right now I'm passing the raw type that is the server's message queue, but that is, not the best solution, I think since it exposes the queue
<orbitz> The reason I want this is because I want init to be able to start other things and it should be able to give those other things a reference to it so it can communicate back with it. But I think that gets me into a circular dependency problem..
<orbitz> Any thoughts appreciated
pangoafk is now known as pango
eni has joined #ocaml
pango has quit [Quit: crazy context switches]
pango has joined #ocaml
Cyanure has joined #ocaml
<Drakken> orbitz if you make your servers objects, they could all inherit some method that init calls to start them?
<orbitz> I dont' want to use objects
<orbitz> Drakken: and i don't think that solves my problem, since the problem is the message type cannot be known until the functor is instantiated
<Drakken> Why does init need to know the message type?
<orbitz> init does know the message type, btu the gen server type isn't nkown until the functor is created. And it needs to know it so giving it out to other services will type check
err404 has quit [Remote host closed the connection]
<hcarty> orbitz: Could you apply the functor in a function to get what you want?
<orbitz> hcarty: I'm not sure honestly. This is my first dive into functors
<orbitz> Walkignto the grocery store, going to ruminate on it
<Drakken> What does init need to know about the servers?
<Drakken> Could each server have a function of the same type that init calls?
<orbitz> Drakken: I want it to know about itself, so it can create something else and pass itself to that osmething else to communicate
<Drakken> So why does the type of the server have to be involved?
<orbitz> because that is what the server is...
<orbitz> HWo do I pass something a variable to itself when it doesn't know its type?
thomasga has quit [Ping timeout: 264 seconds]
<Drakken> it sounds like init needs to be in the server and you need some more generic external interface
<orbitz> It might, but I'm not sure that makes my life easier
emias has quit [Quit: Changing server]
Sablier_ has joined #ocaml
Sablier__ has joined #ocaml
Sablier_ has quit [Ping timeout: 245 seconds]
ankit9 has joined #ocaml
Sablier__ has quit [Client Quit]
zorun has quit [Read error: Connection reset by peer]
<Drakken> What's Ivar?
zorun has joined #ocaml
ulfdoz has joined #ocaml
thomasga has joined #ocaml
eni has quit [Ping timeout: 246 seconds]
Progster has joined #ocaml
ulfdoz has quit [Ping timeout: 264 seconds]
ulfdoz has joined #ocaml
emias has joined #ocaml
<tbrady> Drakken: Not sure if you remember my question from yesterday regarding types for an order book. This does what I want https://gist.github.com/3034802, but is it hideous or non-idiomatic?
<Drakken> tbrady there's no type in your SideType module.
<Drakken> I would just put the side in a record along with the price and define better and worse to take a record.
<tbrady> Ok. is the 'if S.side = Buy…' thing hideous? I'm scanning other people's code and I don't see that type of thing anywhere.
<Drakken> The normal use for a functor would be if you have different trade types.
<Drakken> If you really want to use functors, you could define Buy and Sell modules with better and worse defined in them.
<Drakken> Usually you use all caps for module types, so you could call the module type SIDE.
Anarchos has joined #ocaml
<Drakken> module type SIDE = sig val better: price -> price -> bool val worse: price -> price -> bool end
<tbrady> I'm not set no functors. But if I pass the side in a record, then I've got to check the side each time I want to use better or worse. And I'll be making that check many many times.
<Drakken> better and worse should do the checking.
<Drakken> module type SIDE = sig type t = price val better: t -> t -> bool val worse: t -> t -> bool end
<Drakken> then you can define Buy and Sell modules separately. The best use for a functor would be if you have different types for prices.
<Drakken> tbrady if you make buys and sells different types, then you won't be able to put buys and sells together in the same list.
<tbrady> For this use case I actually need them in separate lists, so that's ok.
<tbrady> But so given what you've said, would that mean better and worse will do if order.side = Buy checks each time they're called?
<Drakken> no, you wouldn't have order.side any more.
<Drakken> You would have to declare a trade as either a Buy.t or a Sell.t
<tbrady> Ok. Where would you put code common to them then?
<Drakken> Alright. Maybe you want a Price module with the price type and common functions.
<Drakken> Then you can have a Side.Make functor that defines better and worse.
<Drakken> wait... no, that's not right.
slash^ has quit [Quit: leaving]
Yoric has joined #ocaml
<Drakken> I guess you would have to have separate Buy.Make and SellMake functors.
<Drakken> Sell DOT Make
<Drakken> But then Buy and Sell have to define wrappers for all of those price functions, to take Buy.t or Sell.t values.
<Drakken> And if you only have one Price module, then you can still define Buy and Sell with Price hard-coded instead of as a functor arg.
<Drakken> or you could objects. Then you can define the common code in a price class and define better and worse in buy and sell classes that inherit from price.
Yoric has quit [Ping timeout: 264 seconds]
<tbrady> Drakken: That's how I'd do it in Python. But for some reason I have this aversion to objects in OCaml.
<Drakken> Well, I think they're the best solution to the problem you described. I don't know any other way in OCaml of applying the same function to different types.
ankit9 has quit [Ping timeout: 246 seconds]
<Drakken> Maybe the simplest solution is to just define Buy and Sell with their own better and worse functions, then explicitly call the appropriate function for each list of trades.
<Drakken> If you have lists of buys, just call Buy.better or Buy.worse, and likewise for sells.
<orbitz> Drakken: Ivar is a variable that will be filled at some point in the future, once
<Drakken> tbrady if your buys and sells are separated and you just want to do things the "right" way, I would forget about types and functors and just define and use those four functions I mentioned.
<Drakken> orbitz is the gen_server global in Gs?
<orbitz> No the gen server is a value whos type is part of Gen_server.Make
yezariaely has left #ocaml []
<Drakken> orbitz where's the server? All I see is a state.
ankit9 has joined #ocaml
<orbitz> What do you mena?
<Drakken> orbitz does init create a new server wrapped in the state?
<orbitz> No
<orbitz> start does
<orbitz> and returns it
yezariaely has joined #ocaml
<orbitz> start makes a server, calls Gs.init with the message stream and arg, and on sucess returns the server (gs)
<orbitz> err, self
<Drakken> so the server is created by Tail.create or Ivar.create?
<Drakken> orbitz sorry if I'm asking dumb Erlang questions. I don't know much about it, except that it has all that messaging and agents or whatever.
<orbitz> Neither, the server is those
<orbitz> The Tail is the servers message queue
<orbitz> and the Ivar is filled when the server exits
<orbitz> The server is represetend by these two values
<_andre> anyone ever seen this? "called object ‘caml_callback’ is not a function"
<_andre> it won't complain about caml_callback2() etc, just caml_callback()
<Drakken> orbitz where are Deferred and Async?
<Drakken> and is Core supposed to be Jane Street Core?
ankit9 has quit [Ping timeout: 246 seconds]
<orbitz> Drakken: yes, they are types Core has defined for deferred computations
<Drakken> orbitz where are the docs?
<orbitz> For what?
<Drakken> Deferred and Async
<_habnabit> does anyone know anything about getting an error "Fatal error: Module CamlinternalLazy unavailable" ?
<orbitz> I don't know, I jsut read the code
<_habnabit> specifically when installing a package via odb
<Drakken> where's the code?
<orbitz> Jane St's website
<thelema> _habnabit: what package?
<thelema> and are you running 4.00?
<_habnabit> thelema, 4.00?
ankit9 has joined #ocaml
<thelema> _habnabit: ocaml 4.00 beta
<_habnabit> thelema, it's the camlzip package I made a while ago. unfortunately this isn't on my machine; I just have some debug logs
<_habnabit> no, it should be 3.12.1
<thelema> ok, I was thinking it *might* be the compiler-libs issue
<_habnabit> godi seems to be doing some weird things, though
* thelema tries installing camlzip locally
<_habnabit> I've installed it successfully on a bunch of 3.12.1 installs already
<_habnabit> this is the first time I've seen the problem
<thelema> well, there should be a `ocamlc -where`/camlinternalLazy.cmi and .cmx file
<thelema> It sounds like this person has a broken ocaml install
<_habnabit> yeah, that's what I thought too
<_habnabit> but I don't know how it could be broken
<thelema> hmm, ubuntu 11.04 has ocaml 3.11.2, iirc
<thelema> although that should have this module too...
<_habnabit> the install script he's using _should_ be only using the ocaml built by godi, though
<thelema> oh, he used godi to install ocaml?
<_habnabit> one second
Submarine has quit [Ping timeout: 246 seconds]
<thelema> http://pkgs.org/ubuntu-11.04/ubuntu-main-amd64/ocaml-nox_3.11.2-4ubuntu1_amd64.deb.html <- according to this, the ocaml package for his ubuntu has the needed file for 3.11.2
<_habnabit> http://matsen.github.com/pplacer/_static/install_pplacer.sh is what we have people run if they're not going to be doing any actual _development_
Cyanure has quit [Quit: Quitte]
<thelema> If he's installing a custom ocaml, why not use ocamlbrew?
* thelema reads the script
<_habnabit> I guess I could
<_habnabit> I didn't know about ocamlbrew, though
<_habnabit> godi was more useful when we were installing more packages via godi than odb, though
<thelema> If there's anything you need to install via godi, let me know so I can make it work under odb
<_habnabit> hah, okay
<thelema> :)
<thelema> I see gsl and sqlite3
<_habnabit> what does ocamlbrew install by default?
<_habnabit> I mean, does it install findlib?
<thelema> yes, it installs findlib
<_habnabit> okay
<_habnabit> IIRC godi also installs pcre by default
<thelema> iirc, ocamlbrew installs ocaml, findlib, odb, batteries, ounit, and utop
<_habnabit> oh, neat
<_habnabit> maybe I should try that
<thelema> it's a much more straightforward script than godi
<thelema> godi is full of magic, I'm sure for good reasons at the time
<_habnabit> godi has been a real pain in the ass for us in general
sepp2k has quit [Ping timeout: 246 seconds]
<_habnabit> just the other day, they decided to rename godi-ocamlgsl to godi-gsl
<thelema> :) odb is happy to let you host your own tarballs
<thelema> that said, who knows if we'll ever do such renaming.
err404 has joined #ocaml
<thelema> actually, we probably won't, as we name based on the findlib name
sepp2k has joined #ocaml
<thelema> gildor: I don't seem to be able to set testing versions of packages in oasis-db's odb admin panel
<thelema> drat, you could almost use odb to build pplacer, except the URI ends in /master, which isn't detectable as a tarball.
_andre has quit [Quit: leaving]
ankit9 has quit [Ping timeout: 246 seconds]
<adrien> what's the whole URI?
<adrien> hmpf
<adrien> would there be a URI with a git tag in it?
<thelema> this is what the tgz for batteries tag v2beta1 looks like
<adrien> I really really really need a better error output when sexplib can't parse something (self-written deserializer but sexplib's auto-generated one wasn't better)
<adrien> thelema: it looks doable, no?
<thelema> adrien: recognizing github links as tarballs?
<thelema> yes, this is doable.
netrino has quit [Quit: Ave!]
ankit9 has joined #ocaml
eni has joined #ocaml
braibant has joined #ocaml
<tbrady> Ooh, hadn't previously seen ocamlbrew. Looks nice.
<braibant> Hi. I would like to implement something like [let debug s = if cond then Format.printf s else ____ ] such that debug s has the same type as Format.printf s, but does nothing if cond is false. I do not know how to implement ____ which should be something that gobbles arguments, and then return () …
<thelema> tbrady: thank hcarty
<thelema> braibant: Printf.ifprintf
<tbrady> thank you, hcarty!
Yoric has joined #ocaml
<tbrady> thelema: thank you as well for batteries, odb.ml and the rest
<braibant> thelema: does ifprintf have a runtime cost ?
<thelema> tbrady: batteries is the work of many. I'll take some credit for odb.ml, though. Not all of it of course, as gildor is still responsible for oasis-db, without which, odb.ml would be much less useful
thomasga has quit [Quit: Leaving.]
<thelema> braibant: yes, but not nearly as much as any IO function.
<adrien> at last, xz yypkg package ready
<adrien> untested
<braibant> thelema thanks
<adrien> but built
<thelema> braibant: the right way to do this kind of conditional logging is with source filtering. Also, see the BatLog library in batteries 2.0 beta (http://ocaml-batteries-team.github.com/batteries-included/hdoc2/BatLog.html)
<braibant> hum. I would expect constant propagation to get rid of the useless code in my case, but ok
<thelema> braibant: your arguments could have side effects on evaluation...
<braibant> thelema: you are right in general, even if I try to make sure to keep this code pure
eni has quit [Ping timeout: 240 seconds]
<thelema> I take that back, if the compiler inlined sufficiently, it would be able to get rid of ifprintf. But the only way to be sure is to look as the asm
smerz has quit [Ping timeout: 245 seconds]
smerz has joined #ocaml
<braibant> thelema: sorry to have to ask, but what is the relationship between odb and opam ?
Yoric has quit [Ping timeout: 244 seconds]
smerz has quit [Remote host closed the connection]
Yoric has joined #ocaml
<thelema> braibant: first time I've heard of opam
<adrien> same, do you have a link?
Progster has quit [Ping timeout: 248 seconds]
<thelema> I take that back; I was aware of the ocamlpro guys writing an ocaml package manager. I hope they succeed.
<braibant> I (indirectly) asked the question a while ago on the caml list
<braibant> so, this is kind of the same thing as odb right ?
<thelema> I hope someone succeeds at making other people's ocaml packages easy to use
<braibant> that would be cool yes
<thelema> gotta go, it seems the same to me
<braibant> ok
Yoric has quit [Ping timeout: 265 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Yoric has joined #ocaml
Xizor has joined #ocaml
<vext01> a noob question, im using StringMap from batteries. Can i store one of these in a record?
<orbitz> Sure
<vext01> i cant seem to figure out the syntax
<vext01> type somerec = { mymap : XXX };;
<orbitz> type r = { m = valuetype StringMap.t }
<orbitz> I'm assumig StringMap is basically an application fo Map.Make
<vext01> i tried this
<vext01> constructor is expecting an argument apparently
<vext01> orbitz: yeh its a premade functorised BatMap
<vext01> er
<vext01> wait, i see it
<vext01> valuetype is something i have not yet encountered
Yoric has quit [Read error: Connection reset by peer]
Progster has joined #ocaml
<orbitz> vext01: it's wahtever type you are storing as the value in the map
<orbitz> string is the key
<orbitz> value is your vlaue
<orbitz> or if you don' tknow, type 'a r = { mymap : 'a StringMap.t }
<vext01> i see
<orbitz> so if you are mapping strings to int's, type r = { mymap : int StringMap.t }
<vext01> thats the ticket
<vext01> cheers
<vext01> slowly picking this up
ankit9 has quit [Ping timeout: 250 seconds]
Yoric has joined #ocaml
braibant has quit [Quit: Leaving.]
Xizor has quit []
ankit9 has joined #ocaml
pango has quit [Ping timeout: 252 seconds]
pango has joined #ocaml
avsm has quit [Quit: Leaving.]
<hcarty> tbrady: You're welcome - but again, ocamlbrew is nothing but a thin (and possibly currently broken...) wrapper around the build + install routines for OCaml, findlib, and several odb-able libraries and tools.
<hcarty> _habnabit: If ocamlbrew is missing something that would be useful for you please submit a feature request or bug report. I'm planning to have some time to spend on it soon.
<_habnabit> hcarty, oh, great
Yoric has quit [Ping timeout: 252 seconds]
<hcarty> _habnabit: It may be broken now because of a change in findlib + compiler library handling. I'm hoping to test it tonight and fix it if needed.
<tbrady> hcarty: funny you should mention. I just ran into a problem running it. From the log: "cp: topdirs.cmi: No such file or directory
<tbrady> cp: toploop.cmi: No such file or directory"
emmanuelux has joined #ocaml
err404 has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
sgnb has quit [Ping timeout: 260 seconds]
Progster has quit [Ping timeout: 260 seconds]
sgnb has joined #ocaml
<Drakken> orbitz why is init polymorphic in its return value? The only functions I've seen like that are the ones that don't actually return.
gnuvince has quit [Quit: Remember when men were men and regular expressions recognized regular languages?]
sgnb has quit [Ping timeout: 252 seconds]
ankit9 has quit [Ping timeout: 265 seconds]
contempt has quit [Ping timeout: 246 seconds]
ankit9 has joined #ocaml
contempt has joined #ocaml