<hcarty>
Camarade_Tux: Ah. With that much work, I may as well use Perl4OCaml and Net::FTP
<Camarade_Tux>
hcarty, by hand I thought opening a connection, checking the first few messages from the server, sending three messages and that's it, it's a plain-text protocol after all
<hcarty>
Camarade_Tux: Yes, I'm thinking I may just use ftp, wget or similar directly
<hcarty>
Any suggestions on a simple OCaml FTP library? I only need to log in (usually anonymous), list files in a directory and download them
<Yoric[DT]>
hcarty: yeah, I know about this project, and we might eventually integrate it into Batteries.
<xevz>
A quick test shows your code works (with the modification hcarty mentioned).
<hcarty>
paul424: I think you need a ; after the "if ... begin ... end"
2009-02-22
<hcarty>
So discovering OCaml and the surrounding community has been quite fun
<hcarty>
No, definitely not CS :-) But physical sciences are sorely lacking when it comes to using recent (last 30 years??) CS developments
<hcarty>
It is a study of variations in rain structure in the tropics
<hcarty>
Yoric[DT]: PhD proposal/topic defense
<Yoric[DT]>
hcarty: what kind of deadline is that?
<hcarty>
_zack, thelema: Care to take a look at a Batteries patch for ExtBigarray? It adds map, mapi, to_array to 1D, 2D and 3D Bigarrays
<hcarty>
Sometimes work has to come first :-) I'm coming up on a grad school deadline, so the issue is at the front of my mind
<hcarty>
Yoric[DT]: Understood. Thanks for information
<Yoric[DT]>
hcarty: not yet, sorry.
<hcarty>
Yoric[DT]: Have you had a chance to look at the Bigarray map/mapi/to_array patch?
2009-02-21
<hcarty>
tsuyoshi: What is the camlzip bug?
2009-02-20
<hcarty>
munga: You're welcome - even after finding that, it frustrated the heck out of me because I didn't realize I had to change my myocamlbuild.ml to take proper advantage of it
<munga>
hcarty: thanks !!
<hcarty>
munga: It may require some extra steps in myocamlbuild.ml or _tags, depending on the build process you use
<hcarty>
munga: ocamlbuild foo.inferred.mli -- "man ocamlbuild" should give you that information under the Target Names section
<hcarty>
Yoric[DT]: Darn... I was just about to submit a patch to address the missing Bigarray unsafe functions
<kaustuv>
hcarty: according to src/core/extlib/_tags, all .mli files have use_optcomp
<Yoric[DT]>
hcarty: you need a change in the _tags file.
<hcarty>
Yoric[DT]: Do I need to change anything in the build system to have extBigarray.mli preprocessed by optcomp? (I think that's the name)
<hcarty>
thelema_: Do I need to make any changes to the build system to have extBigarray.mli preprocessed with whatever handles the "#if ocaml_version..." directives?
<hcarty>
kaustuv: Thanks. I think I may stick with git-diff in this case, as it really is just a simple patch
<thelema_>
hcarty: I can also take git-diff patches, if you're really just submitting one set of changes (no history)
<kaustuv>
hcarty: What I do is rebase a topic branch onto whatever (master, post-1.0, etc.), then run git-bundle create whatever.bdl master..HEAD
<hcarty>
kaustuv: I've never submitted a patch using git before, aside from using git-diff to make a patch
<kaustuv>
hcarty: Do you know how to use git-format-patch? If so, you already know everything you need to use git-bundle.
<hcarty>
kaustuv: Any tips on creation?
<thelema_>
hcarty: I can't tell you how to create them, but kaustuv probably can
<thelema_>
hcarty: as of today, I know what to do with git bundles
<Alpounet>
hcarty, probably reporting the bug and explaining + attaching the patch, using the tracker
<hcarty>
thelema_: What is the proper way to create a git patch for submission to Batteries?
<hcarty>
Ok, cool. I have the functions written for my own ExtBigarray library. I just need to move the code over to Batteries and add some documentation.
<Yoric[DT]>
hcarty: definitely
<thelema_>
hcarty: I'm quite inclusive in what can/should go into batteries. I lean towards yes.
<hcarty>
Yoric[DT], thelema_: Would map, mapi(j|jk) and to_array functions be accepted for ExtBigarray in Batteries?
<kaustuv>
hcarty: ah, good idea. I could just change the configure.ac.
<hcarty>
alias ocamlbuild="ocamlbuild -j 4" ... though I have no idea if that would actually work or not
<hcarty>
kaustuv: -j 4 or -j 5 according to "ocamlbuild --help"
2009-02-18
<hcarty>
Poor OCaml. Being lulz-d at like that.
<hcarty>
"val sum : float array array -> float" or something similar?
<hcarty>
jeromeg: Sum a list/array of vectors?
2009-02-17
<adrian_2002ca>
hcarty: kk, thanks!
<hcarty>
adrian_2002ca: If someone here has time and can help they will likely offer their assistance
2009-02-16
<hcarty>
That's why I thought "with" would work well, as it reads appropriately and I think it should avoid ambiguities
<hcarty>
Yoric[DT]: Does the Batteries "module Foo = Foo open Bar" syntax have the same ambiguity problem as the previous "include" form?
2009-02-15
<hcarty>
Though they still require some inline C to properly wrap the functions
<hcarty>
oleg|log: There are some interesting examples in the ciml darcs repo
<hcarty>
At least for functions with simple interfaces
<hcarty>
oleg|log: I haven't used it, but it seems very promising
<oleg|log>
hcarty: thanks, looks nice
<flux>
hcarty, might be it. I doubt there are two :)
<hcarty>
Yoric[DT]: I should be around then - just let me know
<Yoric[DT]>
hcarty: not right at this moment but in 1 or 2 hours, with pleasure.
<hcarty>
"hacked/patched" meaning that I made some changes to the code to make it GODI+godiva friendly
<hcarty>
If this works, I'll try the process a bit cleaner
<hcarty>
Yoric[DT]: I have a godiva file for a (hacked/patched) cairo-ocaml which seems to work properly on my system. Would you be interested in/willing to test?
2009-02-13
<hcarty>
Wow... that's pretty nifty
<hcarty>
Ah, I'm unfamiliar with colors in the toplevel
<hcarty>
And the set output is ... long
<hcarty>
Just an underline
<hcarty>
Camarade_Tux: No colors
<Camarade_Tux>
hcarty, could you paste the output of 'set' from your computer ? I can't get the colours
<hcarty>
Camarade_Tux: It works in an xterm here
<hcarty>
It's been a long while since I've looked though
<hcarty>
but the last time I looked the documentation wasn't very clear
<hcarty>
Yoric[DT]: What are the steps to make a GODI package using godiva? The Batteries .godiva looks fairly straightforward...
<hcarty>
Take a look at the META file and the .spec file in the F-10 directory
<hcarty>
AxleLonghorn: You can also get the source package directly
<hcarty>
They each have a META file and you can (roughly) follow their methods for building and installation
<hcarty>
AxleLonghorn: I'd recommend looking at the Debian and/of Fedora packages for cairo-ocaml
2009-02-12
<hcarty>
brendan: I tried hg, and it seemed quite similar to git, but without the in-place branches
<hcarty>
I need to leave for a seminar. I'm happy to catch up on comments here and discuss this later though.
<hcarty>
I'm not sure
<hcarty>
Would ~step:-1.0 work?
<hcarty>
I may be outvoted on this
<hcarty>
thelema_: I think that is harder to read, and still needs () or an extra ~ for negative values
<hcarty>
At least that's what I have in the feature request
<hcarty>
thelema_: It's (start, step) --. end
<hcarty>
I would personally prefer float in Pervasives (op-plus-. generally refers to floating point operators) but versions for other types could be added to the other numeric modules
<hcarty>
I'm not sure what the default in Pervasives should be, then
<hcarty>
Yoric[DT]: True
<hcarty>
Where are the other enum operators placed?
<hcarty>
Yoric[DT]: Pervasives would be my preference. But I don't know how often others would use it.
<Yoric[DT]>
hcarty: about your RfF on --.
<hcarty>
Regarding the use of with - do "open X with init ()" and "module X = Y with A, B" interfere with one another?
<hcarty>
From the definition of Bar, that is
<hcarty>
I'm not sure how useful "include foo_t from Bar" would be for a type foo_t unless camlp4 could find and pick out the definition of foo_t from Bar
<hcarty>
Well, I'm thinking specifically of values in the case of "include foo from Bar"
<hcarty>
Oh, right... UIDENT and IDENT or something along those lines
<hcarty>
Yoric[DT]: True
<Yoric[DT]>
hcarty: mmmmhhhhh....
<hcarty>
Yoric[DT]: Could it be used for both? IIRC, camlp4 can distinguish between modules and values
<hcarty>
So it's not really type inference as much as "I expect this to be the default type here"
<hcarty>
flux: Well, "your self" is the programmer here
<Yoric[DT]>
hcarty: "with" doesn't work, we already use keyword "with" for initialisation of modules.
<hcarty>
Though I'm quite happy with the results of pa-do. I have found it wonderfully useful.
<hcarty>
pa-do uses Int.(), Float.(), etc to do things along those lines. But this is, as you said, effectively doing the inference your self
<hcarty>
Yes, it would be interesting to witness what people come up with given, for example, type information
<hcarty>
Definitely :-) As long as the processing terminates
<hcarty>
I don't know if camlp4 can get without a lot of extra work
<hcarty>
Would that require the full type definition though?
<hcarty>
I think modules may not save any typing or clarity. I'm not sure about types though
<hcarty>
Does "let function_a = Module.function_a" introduce any extra runtime overhead if one then uses function_a rather than Module.function_a?
<hcarty>
Yoric[DT]: Will do!
<Yoric[DT]>
hcarty: not yet
<hcarty>
Does Batteries currently have an extension to provide syntax like "include printf, eprintf from Printf" --> "let printf = Printf.printf let eprintf = Printf.eprintf"? I remember some discussion of this in the past but I don't know if it happened or not
<hcarty>
module List = List with Labels, ExceptionLess
<hcarty>
Yoric[DT]: Would "module List = List with Labels" be ok?
<hcarty>
Submitted. And I am glad to help.
<Yoric[DT]>
hcarty: please do
<flux>
hcarty, well thank you, or perhaps the Batteries community should thank you :)
<hcarty>
flux, Yoric[DT]: The "module Foo = Foo\ninclude Bar" concern with Batteries seems to be valid, at least when using the toplevel and OCaml 3.11 -- I can submit a bug if you'd like
2009-02-10
<hcarty>
s/much//
<hcarty>
Or perhaps the problem runs much deeper... I'm just toying with a simple file here
<hcarty>
Would -sep " " work any better?
<hcarty>
Ah, ok. How do you get it to keep comments after preprocessing?
<hcarty>
Yoric[DT]: Why, out of curiosity, -sep?
2009-02-09
<hcarty>
jado: I'm far from an emacs expert... I just added that to my .emacs (or .emacs.d/init.el) and (re)start emacs
<jado>
hcarty: how can i test it ?
<hcarty>
You're welcome. I hope it works for you as well
<jado>
hcarty: thanks : )
<hcarty>
jado: That's the hope :-)
<jado>
hcarty: that will re-highlight the code correctly on C-x C-x ?
<hcarty>
jonasb: I don't think you included the comprehension extension
<hcarty>
Without omake installed
<hcarty>
Not omake, but Batteries
<hcarty>
I was able to get it build here on godi + 3.11
<hcarty>
Does it?
<hcarty>
It looks like it is trying and failing to build omake, perhaps?
<hcarty>
jonasb: I don't think that's a Batteries error
<hcarty>
ttamttam: I imagine that does (approximately?) the same thing
<hcarty>
After that the install seemed to work properly
<hcarty>
And batteries_nothreads
<hcarty>
Then repeated for the packages batteries_threads
<hcarty>
I used: "ocamlfind remove batteries -destdir $GODI_DIR/lib/ocaml/pkg-lib"
<hcarty>
ttamttam: I had the same problem
<hcarty>
Yoric[DT]: Submitted.
<Yoric[DT]>
hcarty: yes, please, could you submit this as a bug?
<hcarty>
Yoric[DT]: Or, if it would be better, I can submit that as a bug report on the forge instead
<hcarty>
Yoric[DT]: It may be worth noting in the Batteries syntax extension documentation that comprehesions do work in the 3.11 toplevel
<hcarty>
I use Calendar in a lot of my code
<hcarty>
Yoric[DT]: Ok, will do
<Yoric[DT]>
hcarty: it will depend on whether it's not too hard to get Netdate and Calendar to interoperate.
<hcarty>
It may be too large or outside of the intended scope of Batteries
<hcarty>
Yoric[DT]: Are there any plans to use/integrate the OCaml Calendar library in Batteries for time/date functions? I haven't used Netdate, so I'm not sure how they compare...
<hcarty>
Anything new or exciting in the INRIA OCaml talk? That seems to be the only one which doesn't have slides available on cocan
<rwmjones>
hcarty, yes, it was good
<hcarty>
rwmjones: The ping was just to ask how the OCaml meeting went, since your name was here in IRC
<rwmjones>
hcarty, pong
2009-02-05
<Yoric[DT]>
hcarty: thanks
<Snark>
hcarty, that was pretty interesting
<hcarty>
Snark: How were the talks overall? The slides look interesting all around
<Snark>
hcarty, the talk was good too :-)
<hcarty>
Yoric[DT]: Very nice Batteries slides
<hcarty>
rwmjones: ping
2009-02-01
<hcarty>
Yoric[DT]: I need to go for a bit, but if there is extra testing or information I can provide please leave a message here and I'll be happy to do so
<hcarty>
Yoric[DT]: Yes
<Yoric[DT]>
hcarty: mmmhh....
<Yoric[DT]>
hcarty: ok
<hcarty>
As does "the tutorial"
<hcarty>
#man "for programmers";; does work
<hcarty>
Same error
<hcarty>
And using the godi package for section 3.11
<hcarty>
Oh, yes
<hcarty>
godi, 3.11
<hcarty>
Everything else seems to work properly lthough
<hcarty>
# Error showing url: Operation not supported
<hcarty>
Yoric[DT]: # #man "print_endline";;
<hcarty>
This is mainly for plotting purposes though, so appropriate structures may be different
<hcarty>
I'm not sure of a appropriate data structures. I'm working on reading and interpreting GMT's coast and country outline data, though I haven't had much time to spend on it
<Camarade_Tux>
hcarty, I'd like to store openstreetmap data and I've just started looking at the different data structures (I currently know fast nothing about them)
<hcarty>
Camarade_Tux: Of what sort?
<hcarty>
That's reasonable, it would just be nice to have while testing from git
<hcarty>
Or add a "make uninstall-docs" target if that seems better
<hcarty>
Yoric[DT]: One request (godi may handle this): Could you alter "make uninstall" so that it also removes the docs?
<hcarty>
Yoric[DT]: Ah, ok. I'll give it a shot
<Yoric[DT]>
hcarty: I was looking for testers for the new GODI package.
<hcarty>
Yoric[DT]: pong
<Yoric[DT]>
hcarty: ping
<hcarty>
If you use estring or some other wide character-aware string library and write a special toplevel printer for it then you could probably get what you want
<hcarty>
If you print it, everything comes out fine
<hcarty>
There was talk at last year's meeting about adding support. But I have no idea if this is happening or not.
<hcarty>
xah_lee: Not that I know of. Camomile may have some sort of support, but vanilla OCaml does not have >8bit character support as far as I know
<xah_lee>
hcarty: is there a way to get it to print a star instead?
<hcarty>
- : string = "\226\152\133"
<hcarty>
# "★";;
<hcarty>
xah_lee: That's what happens here
2009-01-31
<hcarty>
That's unfortunate
<hcarty>
bluestorm: I'm not sure if there is built-in support for something other than Module.() syntax. There is support in the API for arbitrary rewriting within the () though.
<bluestorm>
hcarty: i considered pa_do for other things recently
<hcarty>
JoCaml uses &, so I don't know if that would cause long-term problems
<hcarty>
I've never done much with Haskell
<hcarty>
Ok, I thought it was something like that
<hcarty>
No, $ would be (I think?) the oppposite of Haskell
<hcarty>
( & ) and ( $ ) work, but they don't indicate direction as nicely and they clash with other things
<hcarty>
bluestorm: pa-do/examples/pa_compos.ml in pa-do
<hcarty>
bluestorm: ocaml-3.11.0/camlp4/examples/apply_operator.ml in the main distribution
<hcarty>
More an extra optimization pass than anything else, I suppose
<hcarty>
Yes
<hcarty>
Yes, it would probably be best as a separate and user-specified extension if it were included
<hcarty>
There is an example in the ocaml sources, and in pa-do (two different methods, somewhat obviously)
<bluestorm>
hcarty: actually
<hcarty>
bluestorm: Would you use pa-do or "raw" camlp4 for the <| and |> implementation and optimization in Batteries?
2009-01-30
<hcarty>
There is a doc/godi-batteries/html/ but not doc/godi-batteries/doc/
<hcarty>
Oh, sorry... had that on the pastebin
<hcarty>
Then "ocamlfind batteries/ocaml"
<hcarty>
Yoric[DT]: make all opt install install-doc
<Yoric[DT]>
hcarty: how did you install?
<Yoric[DT]>
hcarty: weird.
<hcarty>
mfp: You're quite welcome... good luck! :-)