<hcarty>
rwmjones: Are you autheticated with NickServ? I get the same "Cannot send to channel" error at times, and doing a /msg NickServ identify <password>
2010-10-02
<hcarty>
dark: There are libraries for json and s-e
<gildor>
hcarty: OASIS generates a META file on its own and use ocamlfind for everything
<hcarty>
gildor: That's wonderful news! As long as the end result is accessible with ocamlfind I'm happy.
<gildor>
hcarty: ok I browse your patch, OASIS can handle almost everything (at least compiling native and installing it)
<hcarty>
gildor: That would work well for GODI
<gildor>
hcarty: and if it is defined this way in _oasis file
<gildor>
hcarty: oasis basically compile the native version if ocamlopt is available
<hcarty>
If you'd rather not add that it's not a problem. I can have GODI apply a patch if it's required.
<hcarty>
gildor: It's not needed, but it is recommended for GODI's packaging
<gildor>
hcarty: why do you need to separate opt/byte building ?
<hcarty>
gildor: Thank you for considering the patches. I fully understand that oasis will negate some of these changes - and I'm looking forward to it :-)
<gildor>
hcarty, junis: my blog post is not really a patch, more an ugly workaround to the most common bug in omlet
<gildor>
hcarty: I will of course accept a patch against ocamlmpi, but I will probably port it to OASIS as well, so basically the makefile target will change as well
<hcarty>
Those vim support files are updated more often, but they don't provide quit as nice indentation or folding support
<hcarty>
gildor: I just submitted a patch to add findlib support to ocamlmpi (META file, "make install" uses ocamlfind)
<hcarty>
gildor: The changes would be renaming a few targets, and not building the native code target by default.
<hcarty>
gildor: Would you accept a patch against ocamlmpi to make the "make" targets a little more GODI-friendly?
2010-09-29
<hcarty>
thelema: I can't offer much help, but I'm happy to provide what I can
<hcarty>
thelema: Thanks - I would most likely end up pulling in something which requires Camomile anyway, so I should probably just ping the GODI Camomile maintainer to see if they're willing to provide an update
<thelema>
hcarty: yes, but even BatIO depends on Camomile. Some reorg could fix this if it's a big deal.
2010-09-28
<hcarty>
adrien: Ah, right - thanks
<hcarty>
thelema: On a related note - is it possible to avoid the Batteries-based binaries dependency on Camomile's data files by avoiding certain Bat* modules?
<hcarty>
lluvia: You don't need any packages, from what I know, unless the compiled binary uses external libraries
<lluvia>
hcarty: do you know packages than can run binaries and don't contain compilers and other stuff?
<hcarty>
OCaml compiled to bytecode may require a bit more (ocamlrun and ...?)
<hcarty>
lluvia: Those extras aren't required for native code binaries, only if you want to compile OCaml code
<hcarty>
You could use that to split a string on against a regexp
<hcarty>
lluvia: Pcre.asplit?
2010-09-27
<hcarty>
gildor: I replied back :-) Sorry for the poor wording on my part - your reply is exactly what I'm hoping for.
<hcarty>
I have some projects coming up which, I hope, will give me a chance to try out Lwt
<gildor>
hcarty: BTW I answered your bug on the forge
<hcarty>
gildor: Thank you. I certainly will if anything comes up
<gildor>
hcarty: I will probably try to adapt it to lwt
<gildor>
hcarty: don't hesitate to bug me, I plan to do some works on ocaml-fileutils in a mid-term future
<hcarty>
gildor: Indeed!
<gildor>
hcarty: do you plan to use ocaml-fileutils?
<hcarty>
gildor: Neither do I
<gildor>
hcarty: don't know who he is
<gildor>
hcarty: it is gremlin
<gildor>
hcarty: wait a second
<hcarty>
gildor: I plan to once I get back to my computer - I don't have my GODI access setup on this system
<gildor>
hcarty: have a look in the commit of the svn
<hcarty>
The package lists you as the maintainer. I'm not sure if there is a way to check who actually added it.
<hcarty>
gildor: Ok, thanks
<gildor>
hcarty: AFAIR, it was to package ocaml-getttext
<gildor>
hcarty: I don't know who upload ocaml-fileutils to GODI
<gildor>
hcarty: no
<hcarty>
gildor: Are you the maintainer of the ocaml-fileutils package in GODI?
<thelema>
hcarty: it might be amusing to have auto-vivifying maps (like perl has)
<thelema>
hcarty: probably not so generally useful
2010-09-23
<hcarty>
Since Hashtbl already has a find_all function.
<hcarty>
I run in to situations where it would be somehow useful to use Map rather than Hashtbl
<hcarty>
Would a Map.accum function (http://codepad.org/fad9wc0Q) be generally useful enough to add to Batteries?
2010-09-22
<hcarty>
Fisherman: Hello
<gildor>
hcarty: one day this will be the reality
<gildor>
hcarty: thanks, for now this is just something written in the technical specification
<hcarty>
gildor: Oh, that sounds really cool
<gildor>
hcarty, adrien: I plan to create an "install" submodule for OASIS
<hcarty>
I could use libcurl for the download, not sure about a file size check
<hcarty>
I don't really - I could use the libcurl bindings for example. I need to query a remote file's size
<hcarty>
The documentation looks a little ominous with regard to how reliable it is
<hcarty>
Has anyone here used the ocamlnet FTP client modules?
<hcarty>
In that case, I don't know :-) I'm still waiting/hoping for a project where I can take advantage of Lwt
<hcarty>
Ah
<flux>
hcarty, well, not really, rather like Thread.create
<hcarty>
flux: As in a Unix.fork?
<hcarty>
Testing with that level of granularity, that is
<hcarty>
Something testing across multiple architectures and OSs would be very cool
<hcarty>
With git
<hcarty>
I saw a post recently about a local auto-test-on-commit for Perl modules
<hcarty>
adrien: That would be quite cool
<hcarty>
Here as well, sadly
<hcarty>
That may be a nice option to have in oasis(db), along with some form of reporting based on those results.
<hcarty>
I think the CPAN client can also report user build + test results
<hcarty>
adrien: CPAN provides that I believe, including running any available test suite
<hcarty>
With luck, the oasis-related tools and infrastructure will help smooth all of this out
<hcarty>
"godi_console perform -build some-package" is another method
<hcarty>
It looks like godi_install has a different purpose
<hcarty>
No, apparently not
<hcarty>
flux: Does it need a godi_install as well? I haven't used the godi command line tools beyond godi_console that much
<hcarty>
adrien: Thanks! That's the message I was looking for.
<hcarty>
So I may be getting that mixed up with custom package sources
<hcarty>
adrien: I think that there is also a way to specify an outside patch source, but I haven't found that message
<hcarty>
I'm looking through the mailing list now - I think I saved a message talking about this
<hcarty>
flux: There is a way to specify a local patch source for GODI IIRC
<adrien>
hcarty: ok, sounds good, I'll definitely help with the testing =)
<hcarty>
adrien: I'm hoping to give deriving a try in the coming weeks/months - if I get it working I'll let you know
<adrien>
hcarty: but it doesn't matter a lot for me: I'm already generating code from .x (xdr, for sun/onc rpc) and it's easy to add that
<adrien>
hcarty: I was asking because deriving did not work on my computer, I should spend more time on it but I don't have that much (well, I guess I could find some...)
2010-09-21
<roconnor>
hcarty: ya, I put the type annotations in my code
<hcarty>
roconnor: That will clamp down the type a bit. Or you can apply all of that in an interface.
<hcarty>
let f (x : baz) : foo option = match x with | #foo as y -> Some y | #bar -> None;;
<hcarty>
Glad I could help - I learned something here too, so thank you as well
<hcarty>
That gives something closer to what you want :-)
<hcarty>
... | #foo as y -> Some y | ...
<hcarty>
roconnor: "as"
<hcarty>
I don't know what you mean by pattern variables
<hcarty>
As a result, so is None
<hcarty>
option
<hcarty>
Some x is a qux potion
<hcarty>
x is a qux
<hcarty>
roconnor: Right right - None has to unify? with Some x
<hcarty>
According to the typechecker at least
<hcarty>
roconnor: Not that I know of - None in this case is not a foo option
<hcarty>
I'm not sure of the proper terminology
<hcarty>
I think that would work - polymorphic variants are not automatically ... specialized? ... in that way
<hcarty>
let f (x : qux) = ...
<hcarty>
roconnor: You would have to specify that
<roconnor>
hcarty: wait maybe not
<hcarty>
roconnor: Does that answer your question?
<hcarty>
with type foo = [ `a | `b | `c ] for example
<hcarty>
val f : ([> foo ] as 'a) -> 'a option = <fun>
<hcarty>
# let f x = match x with | #foo -> Some x | _ -> None;;
<hcarty>
roconnor: Try it? It wouldn't have type foo - it would be an option
<hcarty>
adrien: Were you able to get a version of deriving working?
<hcarty>
adrien: It looks like deriving should be able to do Foo -> "Foo", looking at the Google Code page
<hcarty>
adrien: I thought deriving did that, but I'm guessing not since you're asking :-)
<adrien>
hcarty: bluestorm wrote the deriving godi package it seems (at least, that's what is written on the page :P )
<hcarty>
robthebob: The Batteries Print module + syntax extension is a very nice option for custom printers (regarding your earlier question)
<hcarty>
But it will hopefully provide a useful start
<hcarty>
adrien: I don't remember who wrote the bits for the deriving package, or if it works
<hcarty>
Sorry if that was sent twice. I think my client logged out and back in, so I had to reauthenticate with NickServ
<adrien>
hcarty: hi, I was looking for a META for deriving and saw that a godi package had been done during the packaging sprint last year, but it seems it's not available in godi, or am I missing something?
2010-09-20
<yezariaely>
thx alot, hcarty and adrien
<hcarty>
yezariaely: << and >> have special meanings with camlp4 IIRC. I didn't think they would cause problems in comments.
<yezariaely>
hcarty: hmm it is only an excerpt of the whole AST. I use the following command to compile it. maybe that is the problem?!
<hcarty>
adrien: I agree
<hcarty>
lablgl seems to get pulled in by everything...
<adrien>
hcarty: still doable by hand but I'd really like to have this in godi: I spent quite a lot of time trying to figure out how I ended up requiring lablgl once
<hcarty>
yezariaely: It works here, replacing the first "and" with "type" and the second "and" with "let"
<hcarty>
adrien: It doesn't catch packages further down the chain, unfortunately.
<adrien>
hcarty: it's brute force but it works ;-)
<hcarty>
adrien: That's probably the best approach using existing tools - I think all of the dependency information is in the GODI Makefile
<hcarty>
flux: "godi_console dep -help" may be a start, but it's not obvious to me how/if this would help.
<hcarty>
I was only interested in a small number of packages at that point, so it didn't take long
<hcarty>
flux: I've run in to that before - the solution I came up with was trial and error :-)
2010-09-17
<hcarty>
:-)
<hcarty>
emias: But they're still waiting for the code to finish running! Woo!
<hcarty>
Anarchos: It can't handle anything OCaml can't, from what I understand.
<Anarchos>
hcarty is jocaml able to deal with concurrent C threads calling back ocaml simultaneously ?
<hcarty>
JoCaml adds concurrency primitives to OCaml and it has some support for distributed processing
<hcarty>
I'm unfamiliar with BOINC
<poincare101>
hcarty: I see, is there a port to BOINC for haskell
<hcarty>
I don't know how well that does or does not carry over to spreading the work across CPUs. OCaml does not have a parallel GC, so using multiple processors requires forking, MPI or other non-thread-like approaches.
<hcarty>
poincare101: OCaml has reputation for being faster than Haskell for single-threaded operations
2010-09-13
<hcarty>
adrien, avsm: Thanks for the reminders :-)
<hcarty>
adrien, avsm: I've been wanting to take a look at both ocaml-annot and MarcWeber's vim modifications.
<hcarty>
Does ocamlspotter have vim support?
<hcarty>
th5: If you find anything interesting, please let me know. It looks promising, and among the first questions I get about OCaml is "Does it have an IDE?"
<hcarty>
I don't know if there is a way to get it to use ocamlfind or some other custom compiler/build system.
<hcarty>
Pcre.pm<Ctrl-Space> brings up pmatch, for example.
<hcarty>
But the completion works well
<hcarty>
The autoindent and code folding don't seem to work, at least not the way I have it setup
<hcarty>
I
<hcarty>
th5: I've installed it and toyed around with it a bit, combined with a GODI install of OCaml 3.12.0
<th5>
hcarty: Never tried it. If you try it, please post to caml-list. I'd like to hear how it compares to the others. I think IntelliJ is the best IDE for Java. I'm just waiting for the day when I can ditch emacs for something better (for OCaml).
<hcarty>
It looks similar in functionality to the Eclipse plugin
<Anarchos>
hcarty as i intend to write a first order logic prover, i guess i will need it !
<hcarty>
Anarchos: It's certainly an interesting tool.
<Anarchos>
hcarty i never played with camlp4, maybe i should give it a try !
<hcarty>
mfp: Do you know if it is possible to specify formatting options to pr_o.cmo? Or where I would look to find out?
<hcarty>
mfp: Perhaps - the last time I tried camlp4o it ate comments, among other things. But I may have been using it incorrectly.
<mfp>
hcarty: camlp4o pr_o.cmo foo.ml ?
<hcarty>
Is there an OCaml equivalent to perltidy, or something close?
<hcarty>
adrien: Even more true :-)
<adrien>
hcarty: I'm tempted to say it sounds very similar to Fabrice Le Fessant's CDK: Caml Development Kit ;p
<hcarty>
OCamlPro? That sounds very similar to thelema's Community OCaml.
2010-08-19
<hcarty>
dark: Batteries is largely backwards compatible with the OCaml stdlib, but there are some differences. Internally, it is built on top of OCaml's standard library.
<dark>
hcarty: a new Set.S? hmm, backwards-compatible with ocaml's own?
<hcarty>
dark: Batteries does provide Set.S.map, along with a polymorphic Set (and Map) module
<hcarty>
It was 3.11 still for a while after 3.12 was released, but it has been updated
<hcarty>
dark: The standard tends to be spaces only from the code I've read
2010-08-12
<MarcWeber>
hcarty: Next time try the mailinglist of Vim :)
<hcarty>
I came to the same conclusion when trying it myself a year or few ago, knowing OCaml but not vim scripting :-)
<hcarty>
I think omlet and tuareg (emacs) get it right the first time, but I agree that <c-t> to fix is quite acceptable
<hcarty>
MarcWeber: When writing the code initially
<MarcWeber>
hcarty: So give me a case in which it behaves bad
<hcarty>
MarcWeber: So thumbs up for a much-appreciated first step
<hcarty>
MarcWeber: I tried the indentation patch from your project. It does avoid bad automatic reformatting (ex. gg=G), but it doesn't get the indentation correct when writing the code initially.
2010-08-11
<hcarty>
MarcWeber: No, I apologize - I have not had a chance.
<MarcWeber>
hcarty: Have you trie dmy patch?
<hcarty>
ocamlspotter may only be for local code. There are tools which display the contents of a .cmi
<hcarty>
MarcWeber: There are a few tools which do something similar. ocamlspotter is one
<MarcWeber>
hcarty: If you have time provide some feedback and tell me wether hack solves your annoyances with VIm indentation
<MarcWeber>
hcarty: I don't feel like knowing ocaml enough yet to fix it - however I found a workaround: Dont' change indentation of those lines. So the annoying reindntation should no longer apper
<hcarty>
gildor: Thank you, I'll give it another shot. I've been using Markus Mottl's OCaml vim indentation + highlighting.
<gildor>
hcarty: but so far I was able to write 1kLoC per file without problems (if you know how to prevent bugs in omlet it is fine)
<hcarty>
MarcWeber: I would run in to it on every new line, but this was quite a while ago - probably over a year at this point
<gildor>
hcarty: the main bug with omlet is that it tends to take into acccount extraneous "*)" and fails badly with it
<MarcWeber>
hcarty: Usually you don't indent the whole file. Do the speed issue also occur when coding?
<hcarty>
IIRC it was due to some issue with auto-indentation.
<hcarty>
gildor: Do you run in to speed problems with omlet? I found that it would slow down to the point be being unusable with files longer than ~100 lines.
<hcarty>
Other libraries do provide some functions/modules to ease working with option types. Batteries, Core and ExtLib all have useful Option modules.
2010-08-06
<UKCoder>
hcarty: I see a META file in the xmlm directory, but no joy with ocamlfind. Is there something equiv to ldconfig that has to be run for ocaml?
<hcarty>
UKCoder: It may be worth trying GODI which builds OCaml and a large number of libraries from source. It has a few XML libraries available in its package list.
<hcarty>
UKCoder: xmlm may not provide a META file (extra information needed by ocamlfind)
<hcarty>
That likely has something to do with it
<hcarty>
|marius|: From what I understand, 'when' clauses are not used in checking for potential missing pattern matches
2010-08-05
<hcarty>
That's a good point, thanks
<hcarty>
flux: Ah, ok
<flux>
hcarty, the same issue can often occur with (!): !foo.bar
<flux>
hcarty, well, pretty sure precedency is something that cannot be fixed..
<hcarty>
(-. value.field) works
<hcarty>
flux: Indeed - I'm not sure if it's reasonable or a bug
<hcarty>
Or rather OCaml gives that error
<hcarty>
(~-. value.field) says "has type value_t but an expression was expected of type float"