<technomancy>
apart from I guess using option with search_forward as you mentioned
<dsheets>
looks pretty good to me
<dsheets>
could use "function" for escape but that is just sugar
<technomancy>
oh, that's right
<technomancy>
thanks
<dsheets>
do you want finish to only print the last match?
<technomancy>
yeah, it's a GUI chooser, so only one should be chosen
<dsheets>
ok
<dsheets>
the only other nit i have is with lines_matching conditional
<technomancy>
hm; tuareg indents escape with function oddly
<technomancy>
unless I start the first match with |
<dsheets>
let escape = function \n | '' -> … | c -> ...
<technomancy>
ok, I can give it a little hint
<technomancy>
I understand that indentation is hard to get right =)
<technomancy>
with lines_matching you are refering to using the 'a option as you mentioned earlier?
<dsheets>
either that or simply try (Str.search_forward pattern line 0; line::matched) with Not_found -> matched
<dsheets>
if search_forward raises then you get matched, if not, you get line::matched
<technomancy>
oh, that's tidy.
<dsheets>
you might have to ignore (Str.search_forward pattern line 0)
<dsheets>
ignore is 'a -> unit
<dsheets>
or you could do "let _ = Str.search_forward pattern line 0 in line::matched"
<technomancy>
yeah, it's giving a warning
<dsheets>
yeah, you either have to call ignore on its result or bind it to an unused var
<technomancy>
binding works; cool
<technomancy>
it feels like there should be a simple regex function to do what I want
<dsheets>
yeah, i looked at the docs and nothing jumped out at me
<technomancy>
there probably is if I bring in pcre, but I couldn't get oasis installed, so that's probably not day 2 material. =)
<dsheets>
but the function you want is just a projection of search_forward to boolean
<dsheets>
so you could wrap this little idiom into your own function like "pattern_exists"
<technomancy>
hm; ok.
<technomancy>
well I need to take off for now; thanks for your help
<dsheets>
you're welcome. have fun!
darkf has joined #ocaml
metasyntax has joined #ocaml
joewilliams is now known as joewilliams_away
sebz has quit [Quit: Computer has gone to sleep.]
wuj has joined #ocaml
<hcarty>
_habnabit: You can play with the *.print functions' optional parameters. Those allow you to choose what strings to use to separate values in a list or set, for example.
sebz has joined #ocaml
sebz has quit [Client Quit]
Reaganomicon has quit [Read error: No route to host]
<technomancy>
it's really a shame that ocaml-tutorial.org is down; I'm finding the mirrored version very useful and it could really use some more google juice
<technomancy>
maybe I should notify the registrant if it hasn't been fixed in a few days?
ulfdoz has joined #ocaml
StepanKuzmin has quit [Remote host closed the connection]
<adrien>
technomancy: Graphics is very basic, if you want something beautiful, it's not the right module ;-)
<adrien>
technomancy: he's aware iirc
junsuijin has quit [Quit: Leaving.]
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 250 seconds]
ulfdoz has quit [Read error: Operation timed out]
arubin has quit [Quit: arubin]
sebz has joined #ocaml
ttamttam has joined #ocaml
avsm has joined #ocaml
larhat has joined #ocaml
sebz has quit [Ping timeout: 276 seconds]
avsm has quit [Quit: Leaving.]
Ptival has joined #ocaml
thomasga has joined #ocaml
Cyanure has joined #ocaml
sebz has joined #ocaml
rothwell has quit [Ping timeout: 240 seconds]
sebz has quit [Quit: Computer has gone to sleep.]
darkf_ has joined #ocaml
avsm has joined #ocaml
darkf has quit [Ping timeout: 240 seconds]
bobry1 has joined #ocaml
darkf_ is now known as darkf
darkf has quit [Changing host]
darkf has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
<gildor>
technomancy: there should be an oasis package on Ubuntu
<gildor>
technomancy: at least there is one in Debian
Amorphous has quit [Ping timeout: 250 seconds]
BiDOrD_ has quit [Quit: No Ping reply in 180 seconds.]
BiDOrD has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
NaCl has quit [Ping timeout: 255 seconds]
NaCl has joined #ocaml
hnrgrgr has joined #ocaml
Amorphous has joined #ocaml
iratsu has quit [Ping timeout: 255 seconds]
lopex has joined #ocaml
lamawithonel_ has joined #ocaml
qdl has quit [Quit: qdl]
lamawithonel has quit [Remote host closed the connection]
bobry1 has quit [Ping timeout: 255 seconds]
betta_y_omega has quit [Ping timeout: 260 seconds]
betta_y_omega has joined #ocaml
bobry1 has joined #ocaml
_andre has joined #ocaml
noj has quit [Ping timeout: 276 seconds]
noj has joined #ocaml
Reaganomicon has joined #ocaml
darkf has quit [Quit: Leaving]
StepanKuzmin has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
avsm1 has joined #ocaml
avsm has joined #ocaml
avsm1 has quit [Read error: Connection reset by peer]
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
betta_y_omega has quit [Ping timeout: 250 seconds]
avsm1 has quit [Quit: Leaving.]
StepanKuzmin has quit [Remote host closed the connection]
<hcarty>
gildor: I have been enjoying the oasis-db web interface. oasis-db-web + oasis have made it very convenient to add new packages.
<gildor>
hcarty: thx, when I'll have time I'll update to my current version (~alpha3)
<gildor>
hcarty: which includes _oasis online edit and synchronization with debian
pr has quit [Ping timeout: 276 seconds]
<gildor>
hcarty: but it takes time because I have a problem with libc6 version mismatch between my computer and the server
pr has joined #ocaml
pr has quit [Changing host]
pr has joined #ocaml
StepanKuzmin has joined #ocaml
<hcarty>
gildor: Take your time - I look forward to the update
iratsu has joined #ocaml
avsm has quit [Quit: Leaving.]
ttamttam has quit [Remote host closed the connection]
<sgnb>
gildor: is there any reason why ocaml-posix-resource is not part of ocaml-extunix?
lopex has quit [Ping timeout: 252 seconds]
ttamttam has joined #ocaml
larhat has quit [Quit: Leaving.]
ttamttam has quit [Remote host closed the connection]
lopex has joined #ocaml
<gildor>
sgnb: I have included resources stuff in extunix
<gildor>
sgnb: the tarball in oasis-db was just a test upload
<gildor>
(remember, this is a dev server)
ulfdoz has joined #ocaml
bobry1 has quit [Quit: Leaving.]
joewilliams_away is now known as joewilliams
<technomancy>
adrien: yeah, I know graphics is simple, but it has the advantage of being portable. doesn't cairo tie you to X?
<technomancy>
I just mean it's a shame that the patch is already written and it's just sitting there languishing.
<hcarty>
technomancy: Cairo won't tie you to a windowing system at all
<technomancy>
aha; good to know
<technomancy>
it would mean beefing up my build a bit, right now it's a one-line shell script
<technomancy>
maybe once I can get oasis installed
<technomancy>
gildor: looks like oasis is packaged for oneric, the release that's coming out in october
<adrien>
technomancy: cairo will work on windows and os x; installing it might be more annoying but it works
<sgnb>
gildor: getrusage is not there
<sgnb>
I don't quite understand the comment that it is useless: how does one get e.g. ru_maxrss?
<hcarty>
technomancy: You could probably do a relatively simple backport if you've built Debian/Ubuntu packages from source before
<technomancy>
hcarty: oh yeah, good point. I will give that a shot later.
<gildor>
sgnb: I don't remember precisely, but there are certains variable that are not updated by linux in rusage
<gildor>
sgnb: don't remember which one (probably the one related to memory)
<gildor>
sgnb: but my real target when doing the binding was AIX -- which is quite different
<sgnb>
well, ru_maxrss is (since Linux 2.6.32)
<gildor>
sgnb: yep, that was far before I do the bindings
goncalo has joined #ocaml
Ptival has quit [Quit: Leaving]
Associat0r has joined #ocaml
betta_y_omega has joined #ocaml
thomasga has quit [Remote host closed the connection]
Tobu_ has joined #ocaml
avsm has joined #ocaml
<_habnabit>
hmm, it seems like I'm doing `fun f g (a, b) (c, d) -> f a c, g b d` frequently.
<_habnabit>
there's not a function for that expansion, is there? I've gotten `((fst *** fst) &&& (snd *** snd)) |- (uncurry f *** uncurry g)`, but that's a bit ugly.
<_habnabit>
oh, er, I forgot the |> curry on the end.
<technomancy>
looks like there are quite a few oasis deps unavailable on natty, so grabbing the source package from oneric is a bit beyond me at this point
zorun has joined #ocaml
Reaganomicon has quit [Read error: Connection reset by peer]
milosn_ has joined #ocaml
milosn_ has quit [Client Quit]
Reaganomicon has joined #ocaml
chrissbx has quit [Read error: Operation timed out]
Ptival has joined #ocaml
ygrek has joined #ocaml
munga has quit [Remote host closed the connection]
chrissbx has joined #ocaml
avsm1 has joined #ocaml
avsm has quit [Ping timeout: 255 seconds]
Anarchos has joined #ocaml
junsuijin has joined #ocaml
chee1 has quit [Quit: leaving]
cizra2 has quit [Remote host closed the connection]
<adrien>
bah, and since List.filter calls List.rev before returning, I can't simply do [ List.rev_map f (List.filter pref l) ] : I'd have to do one more call to List.rev, meaning two of them uselessly
chee1 has joined #ocaml
avsm1 has quit [Quit: Leaving.]
<gildor>
is there any GODI specialist aroun (hcarty ?)
<gildor>
I have errors trying to install godi due to .o/.a files in the tarball
<adrien>
in which tarball? and which errors?
<gildor>
in godi-rocketboost-20110717
<adrien>
hmmm, indeed, that doesn't seem very good
<adrien>
I don't have an older tarball available here however
<bobry>
Hello, I have a library which contains an *internal* module Helpers; unfortunately, when I try to link it with another library, which also has an internal Helpers module, I get an error: http://paste.in.ua/2889. Is there any way to get over this?
<bobry>
*without renaming one of the modules
<gildor>
bobry: I don't think so
<bobry>
oh, okay -- thanks
<flux>
bobry, there is packing, though, which is one strategy for reducing global namespace pollution
<flux>
but it needs to be applied to the package during its build process
iratsu has quit [Ping timeout: 255 seconds]
avsm has joined #ocaml
<flux>
basically it takes a bunch of cmo-files and puts them into YourNewTopLevelSymbol.*, resulting in a single .cmo
<bobry>
yeah, but I haven't found a way to make oasis add -pack and -for-pack while building
<flux>
well, that sounds like an omission in oasis that should be fixed :)
<bobry>
or maybe I just need to RTFM :)
<flux>
possibly.. and failing to do that, RTFS :)
ygrek has quit [Ping timeout: 250 seconds]
<flux>
(failing to get the information from TFM that is)
<bobry>
hah, right
<gildor>
bobry: this was an omission, but Till Varoquaux fixed it
<gildor>
bobry: there is a patch to make oasis support -pack option
<bobry>
great -- I guess I should switch to the darcs version of oasis :)
iratsu has joined #ocaml
<gildor>
bobry: the patch has not yet been applied, it will probably be for 0.3.0 version
ulfdoz has quit [Ping timeout: 276 seconds]
sebz has joined #ocaml
<bobry>
hm, I get the following error when building OASIS from darcs with ocamlmod 0.0.1: "Fatal error: the file src/oasis/OASISSys.mod is not a bytecode executable file"
<bobry>
is this expected?
<gildor>
bobry: not at all
<gildor>
bobry: can you copy/paste the output somewhere