<hcarty>
Drakken: For what it's worth, I agree with adrien. 'and' has certain implications that will make it more difficult for a human to reason about the code at a glance.
<adrien>
hcarty: yup: "cairo2" is maintained (Cristophe Troestler involved), but not the other ones and porting is going to be annoying
<hcarty>
adrien: I don't think the original bindings (the ones currently in GODI) are maintained.
<hcarty>
thelema_: Thanks for the pointer. Is that the Camomile interface Batteries 1.4 uses?
<hcarty>
No luck sadly. I'll have to take another look tomorrow.
<hcarty>
thelema_: I tried both CAMOMILE_BASE and CAMOMILE_DIR - this one should be 0.8.1.
<thelema_>
hcarty: if 0.8.*, use CAMOMILE_DIR per // outgoing credit, by VC
<thelema_>
hcarty: what version of camomile?
<hcarty>
thelema_: Is there anything beyond this which should be required to point a Batteries 1.x program to the location of the appropriate Camomile data? export CAMOMILE_BASE=/path/to/share/camomile/ && ./batteries_program
<hcarty>
gildor: Does oasis-db support .tar.bz2/.tbz uploads? Or .tar.gz only?
2012-07-12
<orbitz>
hcarty: Upside is, I have a project that I'm goign ot use this on which is a dependency for other people so I have some pressure, at least
<orbitz>
hcarty: yeah, too many dead projects under my belt :(
<hcarty>
orbitz: Always a project killer
<hcarty>
orbitz: Ah, free time :-)
<orbitz>
hcarty: i'm web_typed. It does absolutely nothing currently, free time and all...
<hcarty>
orbitz: I saw one on github recently... Ohm maybe?
<hcarty>
orbitz: But if you do this at a university you have infinite funding. Clearly.
<hcarty>
orbitz: And that
<hcarty>
Assuming you can take advantage of the N local cores/CPUs available
<fasta>
hcarty: which means your point is moot.
<fasta>
hcarty: and if it needs to run on the server, then it would compute faster than on your local machine.
<fasta>
hcarty: in which case you wouldn't notice it.
<fasta>
hcarty: the code could run locally in lots of cases too.
<hcarty>
fasta: I notice it ever time I try to display a plot or other graphic
<hcarty>
And a number of other ... interesting ... observations
<fasta>
hcarty: I don't think you would notice the latency.
<hcarty>
thelema: And how latency between a local and remote system doesn't matter
<hcarty>
thelema: Indeed
<thelema>
hcarty: clearly to tell us all how terrible our chosen language is.
<hcarty>
fasta: Why are you here in #ocaml?
2012-07-11
<hcarty>
* Not as reliable for multi-file programs as it is for a single file program
<hcarty>
flux: It supports programs with multiple source files as well, although it's not as reliable in knowing when to rebuild the program.
<hcarty>
flux: It's not an actual mix of toplevel + compiled, but ocamlscript provides a simplified compilation approach for single-file projects
2012-07-05
<hcarty>
tbrady: You're welcome - I'm glad to hear that it worked for you.
<tbrady>
hcarty: ocamlbrew worked for me. I've been happily using utop since. Thank you.
2012-07-04
<hcarty>
Ah, never mind. The tunes.org logs showed what I was missing.
<hcarty>
Reading the recent logs is a little surreal...
<hcarty>
That seems reasonable
<hcarty>
thelema_: Ah, ok. I wasn't sure if there was something extra there.
<thelema_>
hcarty: not fixed
<hcarty>
thelema_: How did the oasis-db work/testing go yesterday?
2012-07-03
<hcarty>
jonafan: vim here, or Komodo Edit when I need to work over a higher latency connection. But OcaIDE has some nice features.
<hcarty>
orbitz: They do
<hcarty>
)
<hcarty>
gasche: You're welcome - I'm happy to help with sayings even if I can't with OCaml :-
<hcarty>
gasche: "fell off the wagon" - at least as I've heard it
<hcarty>
gasche: Just like sliced bread!
<hcarty>
slash ignore is your friend
<tbrady>
hcarty: thank you
<hcarty>
tbrady: Good luck - feel free to leave other questions and I'll take a look tomorrow.
<hcarty>
tbrady: I should be on tomorrow and I'll look back through the IRC logs then. For now I'm off to sleep.
<hcarty>
Also, on RHEL6/CentOS6 + EPEL and/or Fedora I think some extra configuration is required - setting C_INCLUDE_PATH=/usr/include/libev/ or some similar path in the environment if I recall correctly
<hcarty>
Probably libev-dev or it's equivalent, depending on your distribution/OS
<hcarty>
tbrady: It may be a missing library
<hcarty>
tbrady: Can you pastebin the full Lwt-portion of the log (or the full log) somewhere?
<tbrady>
hcarty: ok, making progress but if failed with: E: Command 'ocaml discover.ml -ocamlc /Users/tbrady/ocamlbrew/ocaml-3.12.1/bin/ocamlc.opt -ext-obj .o -exec-name a.out -use libev true -os-type Unix' terminated with error code 1Exception: Failure "Could not configure lwt"
<hcarty>
It doesn't cover everything (ex. Foo.(...) doesn't open Foo in (...)) but it's quite good
<hcarty>
utop's tab-completion + (basic) syntax highlighting has me pretty spoiled
<hcarty>
It's a really nice tool but there are a lot of dependencies to get right
<hcarty>
tbrady: utop is ~50% of why I created ocamlbrew
<hcarty>
tbrady: Good luck :-) It should work properly at this point as long as you have all of the appropriate libraries available
<tbrady>
hcarty: ahhh, thank you.Trying again now.
<hcarty>
tbrady: I think the issue was caused by a change in findlib to work with OCaml 4.00
<hcarty>
tbrady, _habnabit: The toploop.cmi problem should be fixed now
2012-07-02
<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
<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.
<_habnabit>
hcarty, oh, great
<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.
<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.
<tbrady>
thank you, hcarty!
<thelema>
tbrady: thank hcarty
<orbitz>
hcarty: I'm not sure honestly. This is my first dive into functors
<hcarty>
orbitz: Could you apply the functor in a function to get what you want?
2012-06-26
<gildor_>
thelema, hcarty: oasis-db 0.1.0~alpha3 is out
2012-06-21
<gildor_>
hcarty: fighting with stublibs detection right now
<hcarty>
gildor_: I'm looking forward to it :-)
<gildor_>
hcarty: I need to fix ocsigen-bundler before deploying oasis-db 0.1.0~alpha3
<hcarty>
gildor_: I should be around for another 30 minutes or so
<hcarty>
gildor_: pong
<gildor_>
hcarty, thelema: ping (I need your odb.ml expertise soon)
<hcarty>
gildor_: I'll only be here for a few minutes though
<hcarty>
gildor_: pong - not an expert, but I've used and dug into it a fair amount.
2012-06-20
<gildor_>
hcarty: ping
<gildor_>
hcarty: do you consider yourself as a odb.ml expert ?
<gildor_>
hcarty: ping
2012-06-14
<_andre>
hcarty: thanks
<hcarty>
And after reading your question again it looks like you want the linux-nantes page
<hcarty>
That covers variant and polymorphic variant values
<hcarty>
flux: I think line 135 and on are the interesting bits. The rest seems like boilerplate which could hopefully be eliminated/limited before an official release.
<hcarty>
flux: That was my reaction, which is part of why I haven't spent much time looking at it :-)
<hcarty>
flux: I think it's similar though, if not the same.
<hcarty>
flux: I'm not sure - there is an example in the source tree but I haven't gone into it too much yet.
<flux>
hcarty, hmm, the one based on attributes or something?
<avsm>
hcarty: %.p.cmx is pretty broken at first glance
<hcarty>
We have camlp4-less syntax extensions/AST transformations in trunk... nifty
<hcarty>
avsm: I expect it was missed somewhere. It took a long while for ocamlfind integration to support all of the options it should, so this may be a similarly missed feature.
<hcarty>
avsm: Oversight?
2012-06-13
<SigmaVirus24>
hcarty: will do
<hcarty>
SigmaVirus24: Have fun learning!
<SigmaVirus24>
Thanks hcarty
<hcarty>
SigmaVirus24: I second the vote for the book Qrntz linked to. It's a nice learning resource.
2012-06-11
<hcarty>
mrvn: It may not be perfect, but with a few more functions the externally accessible moves could be locked down effectively.
<hcarty>
mrvn: You could have type board_t type valid_moves_t (* = move_t list *) val get_valid_moves : board_t -> valid_moves_t ... in the interface
2012-06-08
<thelema_>
hcarty: I'm working on hashtbl; I want the new interface but without dropping support for 3.12, so I have to pull the code from 4.00 into batteries
2012-06-07
<hcarty>
thelema_: And thanks regarding oasis-db - I thought I was logged in but wasn't.
<hcarty>
thelema_: What is the state of Batteries + OCaml 4.0?
<hcarty>
thelema_: Do you know how long the oasis-db admin interface has been down?
2012-05-31
<hcarty>
thelema_: You're welcome. I'm glad I got the lineage correct for bench :-)
2012-05-30
<thelema_>
hcarty: thanks for pointing out bench, yes it's intended to be similar to criterion
<hcarty>
Or something similar from R
<hcarty>
eikke: You're welcome. I haven't used it, but I think it was designed with criterion in mind.
<eikke>
hcarty: ah, a 'bench' github repository in that account indeed :) will check it out, thanks!
<hcarty>
eikke: I think thelema worked on something similar
2012-05-24
<hcarty>
I'm expect that "functor function" is the wrong terminology here. I'm not sure what the correct term is.
<hcarty>
Is it possible to create a functor function, along the lines of: val make_map : ordered_type_module -> map_module_with_ordered_type_key
<hcarty>
orbitz: Very cool - Iwas able to get it installed that way too. I'm not sure I'll do anything with it... but I have it installed.
<orbitz>
hcarty: I got Core installed! (Well, I ran thelema's odb script"
<hcarty>
jonafan: If you do anything with OCaml + openlayers I'm quite interested in hearing how it goes
<hcarty>
jonafan: The hip crowd is using PXP
<hcarty>
jonafan: Word on the street is that the cool kids are using Xmlm
<wmeyer``>
hcarty: Lately I have done some Scheme - not being particulary excited - after 2hours the walls started to melt :-)
<wmeyer``>
hcarty: It's very dangeorus
<wmeyer``>
hcarty: Later you will find your data turns to code :-)
<hcarty>
I have a sudden urge to serialize all of my data types as s-expressions...
<thelema>
hcarty: great.
<hcarty>
thelema: Works here - 64 bit Linux, OCaml 3.12.1 (ocamlbrew), odb.ml snapshot downloaded yesterday
<thelema>
hcarty: thanks
<hcarty>
thelema: Trying now on a relatively fresh (yesterday) ocamlbrew install
<hcarty>
thelema: Do you think you'll provide that package file in the odb repository or send it to Jane St. to include in their repository/repositories?
2012-05-23
<orbitz>
hcarty: thanks
<hcarty>
When there are multiple arguments I have found that throwing "= function" on the end makes it more difficult to parse the function at a glance.
<hcarty>
ssbr_: That's why I have that split - I find it a bit easier to read the resulting code as a human.
<hcarty>
ssbr_: I'm not sure which is generally considered more idiomatic, but I use the first when there are multiple arguments and the second when there is only one.
<hcarty>
orbitz: The upstream PCRE file is missing. I sent the author an email asking about it.
<hcarty>
orbitz: If you need/want to install oasis you can give odb a try
2012-05-20
<hcarty>
s/may be/may get to be/
<hcarty>
That may be awkward at some point. But it would keep odb's size and direct dependencies down.
<hcarty>
If oasis doesn't have/add that, it may be an easy enough thing to create and make odb-installable
2012-05-19
<hcarty>
Or the two could be made to cover separate cases. odb for interaction with oasis-db, new-unwritten-odb for local/special/outside-of-oasis-db packages
<hcarty>
odb.ml could stay close to where it is. odb dot nothing (.native, .heavy, .full...) could provide more comprehensive support.
<hcarty>
thelema: That would ease the burden of having a dependency on oasis, not to mention Batteries and other libraries.
<hcarty>
thelema: Perhaps an odb-heavy version which can be installed with odb
2012-05-18
<thelema>
hcarty: breaking up the pieces
<hcarty>
thelema: Are you wrapping the script to be odb-installable or breaking up the pieces so each one can be installed separately?
<thelema>
hcarty: no, helping them be odb-installable
<wmeyer>
hcarty: Hey
<hcarty>
wmeyer: Hello
<hcarty>
thelema: Checking out the competition?
<hcarty>
There is a feature being proposed on mantis which supports type t = A { x: int; y: int }
<hcarty>
I see the same issue here. If I unset OCAML_BASE then oUnit still installs to site-lib
<hcarty>
It was working before though, wasn't it?
<hcarty>
Yep
<hcarty>
Maybe that's only by accident
<hcarty>
Ah
<hcarty>
Except that it's /home/hcarty/ocamlbrew/ocaml-3.12.1/bin/ocamlfind
<hcarty>
thelema: Yep
<hcarty>
Install architecture-dependent files in dir: ... $prefix
<hcarty>
It did something like that. The same thing GODI_BASE did IIRC.
<hcarty>
and PATH. Everything else is left to odb.
<hcarty>
and ODB_BUILD_DIR
<hcarty>
OCAML_BASE
<hcarty>
But that installs to $OCAML_BASE rather than ~/.odb
<hcarty>
Odd. I don't have any trouble here with an ocamlbrew-based install of OCaml + odb.ml + ounit.
<hcarty>
thelema: Fixed the oasis build problem? Or something unrelated in odb?
<hcarty>
ounit
<hcarty>
thelema: For which library? ouint?
<hcarty>
thelema: Very
<hcarty>
I tried flipping some package versions around but the permutations I tried didn't help.
<hcarty>
I can pastebin the error if that would help
<hcarty>
Drat.
<hcarty>
Error in completion 'oasis' on 'oasis-0.3.0~rc5.tar.gz': OASIS format version '0.3' is not supported.
<hcarty>
I can give it a try
<hcarty>
The latest oasis rc is a good candidate
<hcarty>
thelema: Has that been pushed to the live site?
<hcarty>
thelema: If it does then I'm all for upgrading
<hcarty>
thelema: I just tried a fresh ocamlbrew install and I got the same error
<hcarty>
thelema: Something broke oasis-2.1~alpha1's build in oasis-db
<hcarty>
thelema: Submitted
<thelema>
hcarty: gildor can do it manually; this makes a good feature request
<hcarty>
gildor_: For example, there are multiple zip and uint packages on oasis-db right now.
<hcarty>
gildor_: Is it possible to remove/completely disable a package in the upcoming version of oasis-db?
2012-05-17
<hcarty>
adrien: archimedes seems to be going in the other direction - wrapping Graphics so that it supports Cairo's primitives.
<hcarty>
mrvn: Things like reading the value at a pixel.
<hcarty>
mrvn: The interface shouldn't be too difficult to replicate, but getting the side effects correct could be challenging in some cases.
<hcarty>
It would be a bit of a challenge to get a 100% replication of Graphics, but something close should be possible.
<hcarty>
A Graphics-compatible wrapper around Cairo would be nice
<hcarty>
I don't know how efficient the clear operation is in Cairo for image or xlib surfaces.
<hcarty>
adrien: Ah. I havne't tested that.
<adrien>
hcarty: but I had to clear everything between frames
<hcarty>
adrien: You should be able to reuse a context as much as you want...
<hcarty>
adrien: Cairo works beautifully if (a) speed is not a concern; (b) you want to reuse the same code for vector and raster output (ex. screen, PNG, SVG)
<hcarty>
adrien: Ah - I was agreeing with you... but that wasn't entirely clear.
<adrien>
hcarty: cairo slower than graphics ;p
<hcarty>
adrien: What are they doing that you don't agree with?
<hcarty>
adrien: OCaml bindings? Cool.
<mrvn>
hcarty: sure, it reaches a fixpoint when it stops.
<hcarty>
adrien: Cairo is slower than Cairo? :-)
<hcarty>
adrien: No, sadly. It's often painfully slow.
<mrvn>
hcarty: Graphics is to slow. I would use sdl there.
<hcarty>
Bonus points for writing it up in tutorial form :-)
<hcarty>
mrvn: You could functorize the drawing code so it works with Graphics/Cairo/Gtk canvas without Cairo/js_of_ocaml + canvas
<hcarty>
forward/backward/turn left/turn right
<hcarty>
Although forward + turn left should be sufficient
<hcarty>
Or, no... four :-)
<mrvn>
hcarty: oehm, you can go forward or turn left?
<hcarty>
mrvn: 2 (early dungeon crawlers)
<mrvn>
hcarty: 4 (doom), 5 (quake) or 6 (descent) degrees of freedom?
<hcarty>
A much simpler but still interesting approach would be allowing the user to navigate using a 2D, overhead perspective.
<hcarty>
Stick the user at the start of the maze, give them a first-person view, and allow them to navigate through tile-by-tile.
<hcarty>
A jumping in with both feet option could be creating a 3D navigator for one of the maze generators.
<mrvn>
hcarty: yeah. I would have expected it to have all the functions from Graphics but extended to include a window_id as first argument.
<hcarty>
mrvn: That's unfortunate... multiple windows may be overkill for something like the Graphics module. But it's still unfortunate.
<hcarty>
Mazes, pong, and sprite animation all tend to be fun projects
<mrvn>
hcarty: I wonder who wrote the Graphics.X11. All it can do is open and close sub windows. But you can't do a single thing with them.
<mrvn>
hcarty: changes the type of Graphics.status. status.button would go from bool to int, int list or bool array.
<hcarty>
worthwhile. Ack, I can't type.
<hcarty>
mrvn: That may be a worthwhil addition/patch. I don't know how easy it would be to add.
<mrvn>
hcarty: One thing bugs me though. Graphics doesn't have a concept of different mouse buttons. Sometimes I needed more than one.
<hcarty>
s/it/I/
<hcarty>
That kind of thing was huge when it learned BASIC. It was equally useful when learning OCaml.
<hcarty>
mrvn: True. Even down to things like easily grabbing the value of a specific pixel.
<mrvn>
hcarty: esspecially since it isn't sophisticated. It needs to be trivial to use.
<hcarty>
I haven't used the Graphics module past the first six months or so of using OCaml, but I'm really glad it's there. It's nice to have a built-in visualization mechanism, even if it isn't sophisticated.
<hcarty>
mrvn: Agreed. An experts tutorial like that would be particularly helpful when features like GADTs are added to the language.
<hcarty>
Maybe ocamlpro can be convinced to add mock Graphics module support using canvas to tryocaml...
<hcarty>
mrvn: Those would be nice additions. From a tutorial standpoint, that gives a lot of room to grow from beginner to advanced topics.
<mrvn>
hcarty: The square and hex tiles would make a great exercise for functors too.
<mrvn>
hcarty: he has every other row indented half a tile to form the hex grid. So going top-left changes depending on which row you are.
<hcarty>
mrvn: I haven't read through the hex field one much for that reason. But the square tile implementation looks like it would be an excellent candidate for exansion into a tutorial
<mrvn>
hcarty: nice but the coordinate system is ugly for hex tiles.