<hcarty>
thelema: I didn't expect any changes on this front until 2.0
<hcarty>
thelema: Has a direction for exception handling in future releases of Batteries been decided on? Exceptionless by default, exceptions by default with Exceptionless modules (like now), or provide both functions (foo and foo_opt or foo_exn depending on default) in the same module?
2010-12-21
<hcarty>
opla2: In OCaml, it's "for i = 1 to 10 do"
<hcarty>
And there is syntax for list comprehensions
<hcarty>
But there is a ( -- ) operator
<hcarty>
There is no ".." syntax
<hcarty>
al-maisan: You're welcome, have fun :-)
<al-maisan>
hcarty, adrien : thank you very much for the explanation!
<hcarty>
al-maisan: Yes
<hcarty>
al-maisan: It is an almost-synonym for "let () = ... in"
<hcarty>
al-maisan: ";" can be used with imperitive code, when you only care about side effects
<hcarty>
Not all entry points allow you to provide one
<hcarty>
thelema: My concern with polymorphic map is that it seems difficult to use custom comparison functions
<thelema>
hcarty: polymorphic map is good. in theory you could functorize, with the parameter being a functor itself. but polymorphism seems easier
<hcarty>
I suppose one option is to use the polymorphic Map module.
<hcarty>
I would like to create a module which includes functions which return maps keyed on strings. I would like to use the Map.Make functor, but avoid having the user tied to My_module.My_map. Is a functor the right way to go here, or are there other options?
<hcarty>
adrien: Ah, ok. That's good to know.
<adrien>
hcarty: dunno but type-conv won't build (haven't tried myself: was julm)
<hcarty>
adrien: What/where are the incompatible camlp4 changes in 3.13?
<hcarty>
adrien: That could be. My view of the issue is colored by being bitten by bugs in each release since the 3.10.0 old-camlp4 to new-camlp4 switch.
<hcarty>
flux: Curses! :-)
<hcarty>
:-)
<hcarty>
I don't personally have any use for camlp5 (over camlp4). I'm just (very very mildly) bitter that I can't use some of the new 3.12 features with camlp4 (new version)
<hcarty>
coq is my guess
<hcarty>
flux: "let go" of syntax extensions in general?
<hcarty>
flux: Indeed. It's just unfortunate that the more actively maintained version is the one which is not part of the core language.
<hcarty>
But camlp5 seems to be more actively maintained.
<hcarty>
camlp5 is now external to the main OCaml project, while the new camlp4 is internal
<flux>
hcarty, internal vs external?
<hcarty>
flux: And the internal vs external, from what I've seen regarding upkeep of the two
<hcarty>
camlp5 does support the new syntax. That camlp* split is really unfortunate.
<hcarty>
The short version is that "module type of ..." does not work under camlp4
<hcarty>
blackswan1: You need to either "open Foo" in bar.ml or refer to foo in a fully qualified way - Foo.foo
<hcarty>
alexyk: I haven't noticed a difference, but I haven't done any actual tests.
<Smerdyakov>
hcarty, there is only Ur/Web now. You probably wouldn't want to try to use it for something else.
<hcarty>
Smerdyakov: Is Ur useful outside of web development in its current state?
2010-12-17
<hcarty>
sgnb: I think that was part of the problem I ran in to ... the latest Debian packages would build against the dev version of Ubuntu, but needed packaging patches to build against older releases.
<sgnb>
hcarty: creating a PPA is indeed easy... mais Ubuntu is quite painful in general because there are multiple "live" versions
<hcarty>
From what I recall, it was not terribly difficult
<hcarty>
I got part way through setting up an Ubuntu OCaml PPA a while ago, before realizing that GODI was a better fit for what I needed.
<hcarty>
avsm2, sgnb: An interested Ubuntu user may be able to create a PPA for the packages. I don't know how easy this is, but it's probably easier than doing everything by hand.
<gildor_>
hcarty: what we need is to have access to the socket to call an Lwt_unix.read on it
<gildor_>
hcarty: I think it is to transfer data from the socket to the userland
<hcarty>
gildor_: I imagine all of the CURL_*FUNCTION portions could be useful
<hcarty>
gildor_: CURL_WRITEFUNCTION and CURL_READFUNCTION are probably appropriate
2010-12-14
<hcarty>
I'm off for a while, but feel free to leave/PM questions if you are interested.
<hcarty>
flux: Nevermind - from the ltu comments it looks like it is
<hcarty>
flux: Is the meta-future option the Oleg link you posted?
<hcarty>
That's a good question :-)
<hcarty>
adrien: My understanding is that most browsers have security layers which prevent that from happening.
2010-12-10
<hcarty>
metropolis: Good luck on your quest to escape C++ :-)
<metropolis>
hcarty: thanks!
<hcarty>
metropolis: There are also JoCaml, camlp3l and ocamlmpi as options for message passing/multi-processing
<adrien>
hcarty: yeah, of course, I started this the stupid way , I/O will be limitating anyway
<hcarty>
Inset all elements from (1) in to the set, them check each element from (2) against the set
<hcarty>
Or a set
<hcarty>
adrien: Would a map or hash table work?
2010-12-09
<hcarty>
Does Batteries have a string_printer-like function which does not quote strings? I'm looking for an equivalent to "let str_printer tuple out s = IO.nwrite out s"
2010-12-08
<ski>
flux,hcarty,(palomer) : the corresponding Haskell of let apply (f : 'a. 'a -> unit) x = ..x.. works (with extensions, in e.g. GHC and Hugs)
2010-12-07
<hcarty>
thelema: And thank you :-)
<thelema>
hcarty: no problem
<hcarty>
thelema: Of course... sorry, that should have been obvious
<thelema>
hcarty: the map modules in batteries should order elements by the compare function, least to greatest
2010-12-06
<rixed__>
hcarty: thx for remembering me about diml, and thx to him of course.
<hcarty>
rixed__: You're welcome for what little I contributed though
<hcarty>
rixed__: Glad it works! diml is probably the one who deserves credit though :-)
<rixed__>
Ok with latest lwt my program works ! Thank you hcarty!
<palomer>
hcarty, as a new feature; I think everything we need is already there
<hcarty>
thelema: Each function using the elements from a given map in the same order
<hcarty>
thelema: Do you know if all of the Map modules in Batteries order elements the same way when calling the keys, values, map and fold functions?
<hcarty>
palomer: It wouldn't be hard to support rank-2 polymorphism with something currently in OCaml, or as a new feature?
<palomer>
hcarty, come to think of it, it wouldn't be hard to support rank-2 polymorphism (which is what you're doing)
<rixed__>
hcarty: no pb I sshed to a debian box and aptitude installed darcs. Now it's downloading. :)
<hcarty>
rixed__: There were darcs binaries provided online at one point. I haven't used darcs in a long while though, so I don't know if they are still around.
<hcarty>
rixed__: I haven't tried the latest, but it's on my TODO list.
<rixed__>
hcarty: so you recommend using latest code then ? It frightened me at first since they apparently changed the low level part (for libev). Will try to get it from anothermachine because there is no way I install GHC on this host.
<hcarty>
s/latest release/latest code/
<hcarty>
rixed__: I would like to try the latest release as well though - there are apparently some nice fixes to the lwt-ized toplevel in the latest darcs
<hcarty>
rixed__: So it's probably no better
<hcarty>
rixed__: It's actually one release behind (2.1.0 instead of 2.1.1)
<rixed__>
hcarty: maybe I should go for 3.12 if Lwt is more stable there. Because to access the darcs repo seams a little hard, considering my gentoo want to compile GHC first ;)
<hcarty>
rixed__: Ah, ok. Thank you!
<rixed__>
hcarty: I have GODI_SECTION = 3.11
<hcarty>
rixed__: Rather, what section of GODI packages are you using
<hcarty>
rixed__: What version of GODI are you using? I only see 2.1.0 in the OCaml 3.12 release packages
<hcarty>
Or, rather, something which appears very close to that
<hcarty>
flux: Particularly given that the manual has something VERY close to that as an example
<hcarty>
flux: No, sadly not. I tried that before coming here :-)
<hcarty>
palomer: Ok, thank you for the explanation! I clearly need to read up on some definitions.
<hcarty>
to be able to use "let length x = apply Array.length x"
<hcarty>
palomer: Avoid needing records at all
<hcarty>
palomer: Thank you for the work-around though!
<hcarty>
But sadly, it seems that it does not. At least not how I'm trying to do it :-)
<hcarty>
palomer: Ah, it looked like he wanted to avoid infix - "is there a way to refer to those operators without the ability of using infix syntax with them?"
<palomer>
hcarty, he wants infix
<hcarty>
Module.(-) doesn't seem that much worse than Module.-
2010-12-01
<hcarty>
There is a lot of fun stuff going on in OCaml's experimental branches right now
<gildor>
hcarty: thanks, I hope to be able to deliver it before Xmas
<hcarty>
oasis-db! Hooray for gildor :-)
2010-11-30
<hcarty>
palomer: If you want to toy around and contribute, I'm happy to accept input :-)
<hcarty>
Standard OCaml LGPL + linking exception
<hcarty>
Oh... I don't think I've added license info.
<hcarty>
palomer: Very much a work in progress
<hcarty>
palomer: gtk-light.forge.ocamlcore.org
<adrien>
hcarty: I shall be progressing slowly but surely :-)
<hcarty>
adrien: No rush! I don't know when I will have time to do more with it. But it would be nice to concentrate efforts :-)
<adrien>
hcarty: will try to contribute to gtk-light when I have time for it :-)
2010-11-29
<hcarty>
adrien: I can't spend a lot of time on this right now, but if you'd like to collaborate a bit on mixing in your tiling code, I think that could work very well with the minimal pieces I currently have.
<_schulte_>
hcarty: sure, I don't know much about the ocaml ecosystem, but if you can point me towards a url I'm happy to paste this there
<hcarty>
_schulte_: Thanks for figuring out and pasting this. Could you add it as a snippet on the forge, or a wiki somewhere?
<adrien>
(hcarty: and, yeah, didn't get the joke at first, it's too early in the morning :P )
<adrien>
hcarty: week-end is wineconf in paris / people at wineconf in paris :P
<hcarty>
adrien: That sounds like a perfectly reasonable plan for your weekend :-)
2010-11-18
<hcarty>
adrien: That's understandable - I have a rather huge backlog of PLplot tasks I'd like to accomplish
<hcarty>
adrien: Sounds very nice
<adrien>
hcarty: completely unrelated: I started working on support for tiling gtk widgets, that is actually a generalization of vertical and horizontal boxes and it should provide support for constructs like window#add `vertical [ menu_bar; toolbar; some_content; status_bar ]
<flux>
hcarty, yes :)
<hcarty>
Or is that the lack of genericity you're talking about? :-)
<hcarty>
Set, List, etc?
<hcarty>
flux: I haven't looked at the implementation in detail - how difficult would it be to make this a generic multi-value map?
<hcarty>
flux: I'm not sure - I'd probably have to play with it a bit
<flux>
hcarty, how do you feel about the lack of full genericity of the module?
<hcarty>
useful
<hcarty>
flux: That does look usefule
2010-11-16
<rixed>
hcarty: The problem refraining me to use it for now is that I'm working mainly on ARM and MIPS platforms, which does not support dynlink for now...
<hcarty>
rixed: There isn't much :-) But if you have an interest it wouldn't hurt to make it known.
<rixed>
hcarty: Ah, good. I though from this comment that there was no hope whatsoever.
<hcarty>
rixed: If enough interest is expressed then it may gain some traction. But in its current state it's not much more than a "oh neat-o" toy
<hcarty>
Ah, I think it's "make ocamlnat"
<hcarty>
It does not seem intended as anything other than an experiment though - I tried reporting a bug or two against it on Mantis and got a response saying as much.
<hcarty>
Or it was with 3.11.x - I haven't tried with 3.12.x
<hcarty>
You need to do a separate "make nattop" or similar step
<hcarty>
thelema: It's there, just not compiled by default
<rixed>
hcarty: It's there ? A native toplevel ? where ?
<hcarty>
It sounds like this JIT byte-to-native version would work with findlib
<hcarty>
rixed: It's there, it just doesn't play nicely with findlib
<rixed>
hcarty: I'd rather like a native-code toplevel.
<hcarty>
Ooh, a JIT-compiled toplevel. Nifty.
<hcarty>
It does depend on pcre
<hcarty>
hcube: ocamlnet has a mixture of high and low level functions
2010-11-05
<hcarty>
The nasty part, not the OCaml part
<hcarty>
There are some nasty OCaml related comments in that Slashdot thread. But I suppose that's to be expected in any set of Slashdot comments.
<hcarty>
kaustuv: Sparked by the F# code release perhaps?
<hcarty>
kaustuv: Where is that?
2010-11-04
<hcarty>
mfp: It does not appear to be modal out of the box at least
<hcarty>
mfp: What sort of vi/emacs keybindings in particular?
<hcarty>
mfp: I'm not sure what you mean - I didn't know it supported either :-)
<hcarty>
Sadly, it seems to die if the terminal holding the session is resized
<hcarty>
And the editing seems on-par with either of those options
<hcarty>
The history is far superior to rlwrap/ledit + ocaml
<hcarty>
The Lwt toplevel seems cooler and cooler the more I learn about it.
<hcarty>
But it's been tempting
<hcarty>
I doubt that's a good idea
<hcarty>
flux: I've been tempted, when switching between OCaml and C, to let ( =! ) = () so that it always generates type errors :-)
<hcarty>
But you can create a string IntMap.t or a int IntMap.t
<hcarty>
'a IntMap.t will always have integers as keys