gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
<dsheets> # Str.string_match (Str.regexp "a") "what" 2;;
<dsheets> - : bool = true
qdl has joined #ocaml
<dsheets> technomancy: search_forward maybe?
<technomancy> that raises an exception though =(
<technomancy> but it does actually find what I want; I guess I just have to try
qdl_ has quit [Ping timeout: 246 seconds]
<dsheets> you mean in the Not_found case? is that bad? you could wrap it with 'a option
<technomancy> hm; I haven't gotten that far yet
<technomancy> well, this works as a dmenu replacement already; sweet.
<technomancy> 700 lines of C to 46 lines of ocaml, though I gave up a fair amount of customization.
<dsheets> what wm?
<technomancy> it's not tied to any particular WM. I use xfce though.
<dsheets> k
<dsheets> xmonad for me
<technomancy> it'd be nice if it could skip the window decorations, but I don't think I can do that with the standard library alone.
<technomancy> not bad for my second day =)
<dsheets> not at all
<dsheets> what windowing tk are you using?
<technomancy> just the standard graphics module
<dsheets> ah
dnolen has quit [Quit: dnolen]
lopex has quit []
<technomancy> so any obvious newbie mistakes in http://p.hagelb.org/erythrina.ml.html ?
<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]
StepanKuzmin has joined #ocaml
arubin has joined #ocaml
junsuijin has joined #ocaml
wuj has quit [Ping timeout: 255 seconds]
metasyntax has quit [Quit: WeeChat [quit]]
<technomancy> this seems to indicate that there's no way to use anti-aliased fonts with the standard graphics module; is that right? http://caml.inria.fr/mantis/bug_view_advanced_page.php?bug_id=4917
dnolen has joined #ocaml
dnolen has quit [Quit: dnolen]
<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]
_andre has quit [Quit: leaving]
dnolen has joined #ocaml
iratsu has joined #ocaml
avsm has joined #ocaml
<hcarty> gildor: If you get a chance to update it, the odb download instructions at http://oasis.ocamlcore.org/dev/odb/ fail
ztfw has joined #ocaml
<hcarty> flux: If you are interested in Debian packages for PLplot: http://sourceforge.net/mailarchive/message.php?msg_id=27926177
<adrien> no htons() in the standard library?
<hcarty> adrien: I don't know that there are any byte-order functions in the stdlib
<hcarty> adrien: Maybe ocamlnet?
<adrien> ok, so I'm probably not blind
<adrien> and ocamlnet is not usable: only stdlib (keeping deps very low)
<adrien> but at worse, I could bind the C one (it's very easy when you don't want a library for the bindings)
<adrien> thanks
<hcarty> adrien: You're welcome, and good luck :-)
<hcarty> 3.12.0 seems to have a lot of trouble with "module type of..."
<hcarty> I'm hoping 3.12.1 fixes most or all of them. It's a useful bit of syntax.
<hcarty> Is anyone here using 3.12.0?
<hcarty> Hopefully with Batteries available as well
<gildor> hcarty: what is the problem ?
<hcarty> gildor: http://vpaste.net/t00kx -- This seems to work on 3.12.1 but fail on 3.12.0
<hcarty> gildor: But I want to confirm that before I put a lot of effort into upgrading outside of a test environment
dnolen has quit [Quit: dnolen]
<hcarty> gildor: 3.12.0 complains about a signature mismatch for the find function. 3.12.1 does not on my system.
<gildor> hcarty: it seems like a problem in odb DB, you should ask thelema to fix it ?
<hcarty> gildor: The curl issue is the URL given to retrieve odb.ml
<gildor> hcarty: what is the right URL ?
iratsu has quit [Ping timeout: 240 seconds]
<hcarty> gildor: I think it changed relatively recently
<hcarty> The URL currently on the oasis-db/odb page is a redirect to that URL. curl grabs the redirect HTML rather than following the redirect.
<gildor> hcarty: fixed
<hcarty> gildor: Thank you!
<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
<bobry> sure, just a sec
<gildor> bobry: bwhere did you get your ocamlmod ?
<gildor> and you build it by your self ?
<bobry> ocamlmod you mean?
<gildor> bobry: yes
ftrvxmtrx_ has joined #ocaml
<gildor> bobry: I think the bbinary has been stripped and this is the reason of the message
<bobry> ah! exactly, Arch build system strips all binaries by default :<
avsm has quit [Quit: Leaving.]
ftrvxmtrx has quit [Ping timeout: 250 seconds]
<bobry> rebuilding ocamlmod helped, thanks :)
<gildor> bobry: you should contact arch maintainer of ocamlmod about that
sebz has quit [Quit: Computer has gone to sleep.]
sebz has joined #ocaml
joewilliams is now known as joewilliams_away
lamawithonel_ has quit [Ping timeout: 250 seconds]
wuj has joined #ocaml
<hcarty> gildor: I built GODI from that rocketboost package recently and it worked without any errors
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
wuj has quit [Ping timeout: 276 seconds]
Associat0r has quit [Quit: Associat0r]
Tianon has quit [Ping timeout: 264 seconds]
fraggle_ has quit [Remote host closed the connection]
dnolen has joined #ocaml
fraggle_ has joined #ocaml
ftrvxmtrx_ is now known as ftrvxmtrx