smimou changed the topic of #ocaml to: OCaml 3.08.3 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
stepcut has joined #ocaml
<vincenz> Smerdyakov: you going to participate in the ICFP contest?
<stepcut> So... Is there a standard tool to generate .pot files from ocaml source ?
<stepcut> (I believe the answer is no...)
<vincenz> .pot?
<stepcut> a .pot file contains a list of all the strings marked for translation in the .ml file
<stepcut> so you might write -> print_endline (gettext "Hello, World!");;
<stepcut> An the analyzer would see the "Hello, World!" and put it into the .pot file so people can translate it into different languages
<stepcut> I can do 'fun str = Grammar.Entry.parse implem (Stream.of_string str)' to turn a .ml into a nice AST, but it is then rather tedious to write a function that drills down into resulting tree looking for instances of (ExApp ... (ExLid "gettext" ...)) because there are atleast 50 constructors that can contain expressions...
<stepcut> In haskell I can use generics... but I am not sure how best to do this in ocaml...
<stepcut> maybe I need to parse the mLast.mli file, and then walk over that tree to generate a function that does what I want...
* stepcut scratches his head
<stepcut> or maybe I should just make a new parser that just parses the stuff I need
<stepcut> I can reuse the existing lexer which correctly parses strings and identifiers according to ocaml rules...
<stepcut> open Generics;;
<Smerdyakov> Can't you just use regular expression matching?
<vincenz> stepcut: use dynamic linking
<vincenz> stepcut: and make the dynamically linked module register the strings
<Smerdyakov> vincenz, you've just reduced the problem to the same one of finding out which strings there are, so that the dynamic module can register them.
<vincenz> yes but remove the need for a lexer
<vincenz> and I misread the problem :D I thought the problem was the loading
<Smerdyakov> I don't think that removes the need for a lexer.
<vincenz> nope
<vincenz> I thought the lexer issue was for the loading of the preference file
<Smerdyakov> Oh, vincenz.
<stepcut> Smerdyakov: I was hopefully for an easier alternative to regular expression matching, but there may not be one
<Smerdyakov> stepcut, what could be easier than regular expression matching?
<Smerdyakov> Find: gettext \"([^\"]|
<Smerdyakov> Find: gettext \"([^\"]|\\\")*\"
<stepcut> Smerdyakov: the string could be on the next line
<stepcut> and I need to know the line number the string is found on
<Smerdyakov> Find: gettext[:whitespace:]*\"([^\"]|\\\")*\"
<stepcut> in any case, I think that is what I will end up doing
<stepcut> and I have to match differently for dgettext dcgettext and gettext
<stepcut> and the * on the \( \) does not behave as one might expect under sed...
<stepcut> for example, sed -n 's,\(.\)*,\1,p' somefile appears to only print the last letter of each line...
<stepcut> which is why I was hoping to avoid regex madness and use the pre-existing and bug free camlp4 lexers/parsers :)
mattam has quit [Read error: 104 (Connection reset by peer)]
mattam has joined #ocaml
gl` has quit [Read error: 131 (Connection reset by peer)]
gl` has joined #ocaml
znutar has quit [Connection timed out]
Banana has quit [Read error: 60 (Operation timed out)]
stepcut has quit ["home"]
cognominal has quit [Read error: 60 (Operation timed out)]
mattam has quit [Read error: 101 (Network is unreachable)]
cognominal has joined #ocaml
_fab has quit [Read error: 145 (Connection timed out)]
bzzbzz has joined #ocaml
monochrom has quit ["me!"]
mattam has joined #ocaml
_fab has joined #ocaml
Banana has joined #ocaml
hangman4 has quit [Connection timed out]
bzzbzz has quit ["leaving"]
mr_pengy has quit [Remote closed the connection]
ulfdoz has joined #ocaml
ulfdoz_ has quit [Read error: 110 (Connection timed out)]
budjet has joined #ocaml
budjet has quit [Remote closed the connection]
Sonarman has joined #ocaml
olczyk_ has joined #ocaml
olczyk_ has left #ocaml []
vezenchio has joined #ocaml
bubba123 has joined #ocaml
<bubba123> Hi I'm having trouble building ocalidl.
<bubba123> ocamlidl
<bubba123> The makefile says that there is no rule to build config.cmi.
<bubba123> But there is a suffix rule in the makefile.
budjet has joined #ocaml
Snark has joined #ocaml
budjet has quit [Remote closed the connection]
bubba123 has quit []
budjet has joined #ocaml
Sonarman has quit ["leaving"]
budjet has quit [Remote closed the connection]
Submarine has joined #ocaml
__DL__ has joined #ocaml
vodka-goo has quit [Remote closed the connection]
Snark has quit ["Leaving"]
shawn_ has joined #ocaml
shawn has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml
Submarine has quit ["Leaving"]
mr_pengy has joined #ocaml
tintin has quit [Read error: 131 (Connection reset by peer)]
tintin has joined #ocaml
mr_pengy has quit [Remote closed the connection]
cognominal has quit [Read error: 54 (Connection reset by peer)]
cognominal has joined #ocaml
vezenchio has quit [""Under democracy one party always devotes its chief energies to trying to prove that the other party is unfit to rule—and both"]
vezenchio has joined #ocaml
Banana has quit [Read error: 110 (Connection timed out)]
pango_ has joined #ocaml
vezenchio has quit [""Under democracy one party always devotes its chief energies to trying to prove that the other party is unfit to rule—and bot]
tintin has quit [Read error: 110 (Connection timed out)]
tintin has joined #ocaml
pango has quit [Read error: 110 (Connection timed out)]
Submarine has joined #ocaml
dross has joined #ocaml
<dross> be happy! :)
<dross> YAYAYAYAY AYAYAYAYYA
<dross> WideStudio now supports ocaml, yay
<dross> Hirabayashi-san is a genious, yay. He fixed the problem he was having 5 days ago :)
<smimou> what's that ?
<smimou> (widestudio)
<dross> smimou: WideStudio is a GUI+Other widgets toolkit
<dross> smimou: its free too(MIT licensed)
<dross> smimou: it might not look as pretty as Qt, but its a great toolkit.
<smimou> is it portable ? does ig have a gtk frontend ?
<dross> smimou: I tried wxWidgets and remember why I dislike it
<dross> wxWidgets sucks because platform features aren't portable
<dross> smimou: it has its own.
<smimou> argl
<dross> has its own designer too
<dross> which is a definite plus.
<dross> dnd, use fav editor/code, and done.
<dross> Hirabayashi-san was having trouble with adapting ocaml, but he figured it out.
<dross> swig-caml was acting broken like it always does :)
<smimou> swig produces horrible bindings
budjet has joined #ocaml
<dross> smimou: I know :)
<dross> smimou: he used swig then hand crafted code :)
<dross> smimou: defintely, because theres no way swig produced all of this code :P
monochrom has joined #ocaml
dross is now known as lilo
lilo is now known as dross
budjet has quit [Remote closed the connection]
dross is now known as Guilmon
Banana has joined #ocaml
__DL__ has quit ["Bye Bye"]
<humasect> hello guilmon
budjet has joined #ocaml
budjet has quit [Read error: 104 (Connection reset by peer)]
monochrom has quit ["me!"]
Submarine has quit ["Leaving"]
smimou has quit ["?"]
humasect has quit ["Leaving.."]
yangsx has joined #ocaml