__DL__ changed the topic of #ocaml to: OCaml 3.09.0 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/
whit has joined #ocaml
<mdmkolb1> pango: thx, looks looks like I've got a lot of ready to do, but it looks good
smimou has quit ["bli"]
gim has quit ["zoupladodo"]
batdog is now known as batdog|gone
batdog|gone is now known as batdog
mdmkolb1 has left #ocaml []
shirogane has quit [Read error: 104 (Connection reset by peer)]
knobo has quit [Remote closed the connection]
sebell has joined #ocaml
knobo has joined #ocaml
sebell is now known as sk-away
sk-away is now known as sebell
pango_ has joined #ocaml
pango has quit [Read error: 110 (Connection timed out)]
sebell has left #ocaml []
_fab has quit [Remote closed the connection]
monochrom has joined #ocaml
whit has quit [Read error: 104 (Connection reset by peer)]
whit has joined #ocaml
mdmkolbe has joined #ocaml
<mdmkolbe> does ocaml have call/cc?
<monochrom> my understanding is no
monochrom has quit ["good morning, sweet dream"]
<vincenz> anyone use ocamlgraph?
Skal has joined #ocaml
nodie has joined #ocaml
whit is now known as whit|zZzz
<ski> vincenz : 'tywith' ?
<ski> vincenz : your parser could return as ast a function, which takes the extra args, and returns the real ast
nodie has left #ocaml []
<vincenz> ski: it's a lib
<vincenz> ski: it doesn't work that way tho
<vincenz> ski: see basically you want your parser to change your environment table
<ski> is tywoth a lib ?
<ski> if you want the parser to change the stuff, you could either pass in references or mutable things, or return a pair (or record) of the ast and the new (updated) stuff
<ski> s/tywoth/tywith/
<ski> env_tab -> env_tab * ast
<ski> env_tab ref -> ast
<vincenz> well my env_tab is an object
<vincenz> so it's muitable
<vincenz> just not sure how to pass it to the parser
<vincenz> with the lexer it's easy
<vincenz> just do
<vincenz> rule token env = ...
<vincenz> ior in my case
<vincenz> rule token identenv openv = ...
<vincenz> bt I gotta get this to the parser somehow
demitar_ has joined #ocaml
demitar__ has quit [Read error: 104 (Connection reset by peer)]
demitar__ has joined #ocaml
<ski> | expr OP expr { fun env_tab -> ..env_tab..$1..$3.. }
<ski> vincenz : like that
<ski> hm
<ski> or, will env_tab be used to decide what is correct parse, and what is not ?
demitar_ has quit [Read error: 104 (Connection reset by peer)]
<ski> (in that case, maybe the above won't work)
<ski> hm "The parser also enters error recovery mode if one of the grammar actions raises the Parsing.Parse_error exception."
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
m3ga has joined #ocaml
ppsmimou has joined #ocaml
gim has joined #ocaml
demitar_ has joined #ocaml
revision17_ has joined #ocaml
demitar__ has quit [Read error: 110 (Connection timed out)]
Revision17 has quit [Read error: 110 (Connection timed out)]
<ski> (vincenz : ?)
Snark has joined #ocaml
Deffie has joined #ocaml
<Deffie> hi all, theres any usleep function in ocaml libs ?
_fab has joined #ocaml
<vincenz> sorry
<vincenz> was afk
<vincenz> ski: that works?
<Schmurtz> Deffie, did you look at the Unix module ?
whit|zZzz has quit [Read error: 110 (Connection timed out)]
<ski> vincenz : maybe
<ski> <ski> or, will env_tab be used to decide what is correct parse, and what is not ?
Snark has quit ["Leaving"]
Tachyon76 has joined #ocaml
<pango> Deffie: you can use select with empty filedescriptor sets
<Deffie> pango thank you
<Deffie> pango it works
<vincenz> ski: no it's used like any compiler
<vincenz> ski: parser drives lexer behaviour
<vincenz> like in c where the parser adds types to the environment table so the lexer can recognize em
<ski> ah, didn't think of parser telling lexer stuff, like that (presumably because i'm used to referential transparency)
<ski> but
<ski> presumably, the parser won't wait to parse until the function that it returns is applied
<ski> which means that if you try what i suggested above, you can't tell the parser (or lexer) any info, by passing in env_tab to a function returned by the parser
<vincenz> yeah
<vincenz> but how would that pass stuff to substates?
<ski> so, it seems one'd like a feature like with the lexer, for passing in args
<vincenz> yeah
<vincenz> I think the easiest way is to just set it globally somewhere in the parsing file
<vincenz> unclean
<vincenz> but bleh
<ski> { fun env_tab -> ..env_tab..($1 possibly_changed_env_tab)..($3 possibly_other_changed_env_tab).. }
<ski> yes, using mutable global things should work
<vincenz> I think it'd be easier
<ski> but, it'd be nice if they also provided a way to do this purely, too
<vincenz> true
<vincenz> tho one could argue theres little pure about the parser and lexer :P
<ski> why's that ?
<vincenz> another thiing that annoys me is that I can't use tywith with the %token
<vincenz> meaning that until you have a parser written and you want to write your tester
<vincenz> you have to make a separate file with all the tokens and then use tywith there
<vincenz> anyways, I'm happy
<vincenz> I have a great set of libs
<vincenz> that I'm using
<vincenz> and it makes life SOOOOOOOOOO easy
<ski> what is 'tywith' ?
<vincenz> ski: first link on google:
<vincenz>
<vincenz> it's a camlp4 module
<vincenz> to automaticially generate string_of
<vincenz> for a type
<vincenz> or a map, or fold or parse
<ski> aha, nice
<ski> why did you say one could argue whether there's little pure about the parser and lexer ?
<vincenz> hmm
<vincenz> first of all streaming of input
<vincenz> but don't mind me, I'm tired
<ski> one can have immutable streams
<vincenz> you'd need a pointer for current position
<ski> (possibly implemented in a mutable way, though)
<vincenz> you use alice?
<ski> no, just looked some at ot
<ski> s/ot/it/
<vincenz> yeah me too
<vincenz> but ocaml's my fave cause of raw speed
<ski> you use mercury ?
<ski> :)
<vincenz> no
<vincenz> I was looking at your chans
<vincenz> ski: what do you do
<ski> study
<vincenz> ski: what
<ski> CS, of course :)
<ski> tywith looks cool
<vincenz> yeah
<vincenz> I sent the author a small patch
<vincenz> :D
<ski> :)
<vincenz> anyways it's great
<vincenz> I get an ast printer for free
<ski> can it hook into used-defined printers, etc ?
<ski> or will it only use itself and standard ones ?
<vincenz> well
<vincenz> if you use external modules
<vincenz> that have type t
<vincenz> it'll look for a to_string iin that module
<vincenz> so yeah
<ski> (not thinking specifically about parametric types, here)
<ski> ah, ok
<vincenz> he's planning more customized generators
<ski> pretty-printer ?
<vincenz> ah
<vincenz> hmm
<vincenz> no
<ski> serialization/pickling/marshalling ?
<vincenz> nono
<vincenz> it's still basic
<ski> (or maybe the language already provides adequat such, in a generic manner, like structural equality)
<ski> ok
<vincenz> *handwrote his own pretty printer*
<ski> you or h/im/er ?
<vincenz> me
<vincenz> and it's him
<ski> ok
<ski> anyway, this passing info into parsing process (and possibly also lexin) was an interesting issue
<ski> hm, i think Parsec allows this
<vincenz> parsec?
<ski> for haskell
<ski> monadic combinator library for parsing (can be used for lexing, too)
<vincenz> ah
<vincenz> never used haskell
<ski> anyway, the method i alluded to above is quite nice, if one wants to pass down things into the semantic actions, but i think it cannot communicate with the parsing process
<ski> e.g. one can define a complete interpreter in the semantic actions .. those return a function from variable-environment to value
<ski> { fun env_tab -> ..env_tab..($1 possibly_changed_env_tab)..($3 possibly_other_changed_env_tab).. }
<vincenz> yeah but it gets ugly and messy
<ski> somewhat, maybe
<ski> (a monad could help a bit with that, here ! :)
<vincenz> I never used monads
<vincenz> but I would love them in ocaml
* ski ponders going and trying to define a reflected parser monad in SML/NJ
<ski> that would be really cool
<vincenz> no idea what that is
* vincenz doesn't have a CS background
<ski> SML/NJ is an implementation of SML (the important point here is that it has continuations (and of course, state))
<vincenz> I meant reflected parser monad
<ski> with normal uses of monads, one has to have a monadic type, and use 'return' and 'bind' functions
<ski> (or, instead of 'bind' (and possibly 'return') use some kind of syntactic-sugar, like do-notation in haskell (or the old 'monad comprehensions' syntax stolen from 'list comprehension'))
<ski> anyway
<ski> val myparser : some_arg_type -> ... -> ast parser_monad
<ski> this is with normal uses of monads
<ski> with reflected monads, the monad in question essentially becomes a new effect, alongside state and i/o and exceptions and partiality
<ski> so you get
<ski> val myparser : some_arg_type -> ... -> ast
<ski> so, you can use 'let' to sequence things in this monad, instead of calling the function (or operator) 'bind'
<ski> let myparser = Parse.alt (fun some_arg ... -> let _ = Parse.string "open"; i = Parse.ident; ... in ...) (fun some_arg ... -> let ... in ...)
<ski> hm, something like that
<ski> (of course, reflected monads would be good for other things than parsing, too)
<ski> (Parse.alt would provide alternative ways of parsing)
mdmkolbe has left #ocaml []
<vincenz> hmm
<vincenz> too tired to follow
<ski> ok
Raziel has quit ["Yo soy goma. Tú eres cola."]
demitar_ is now known as Demitar
Deffie| has joined #ocaml
Deffie has quit [Read error: 113 (No route to host)]
<vincenz> sorry
Raziel has joined #ocaml
<ski> np
demitar_ has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
Raziel has quit ["Yo soy goma. Tú eres cola."]
quamaretto has joined #ocaml
Tachyon76 has quit ["Leaving"]
__DL__ has joined #ocaml
__DL__ has quit [Remote closed the connection]
__DL__ has joined #ocaml
__DL__ has quit [Remote closed the connection]
__DL__ has joined #ocaml
__DL__ has quit [Remote closed the connection]
__DL__ has joined #ocaml
Schmurtz has quit [Remote closed the connection]
whit has joined #ocaml
ppsmimou has quit ["Leaving"]
Schmurtz has joined #ocaml
gim has quit []
haakonn has quit [Remote closed the connection]
haakonn has joined #ocaml
ski has quit ["NMI"]
pango has quit ["Leaving"]
pango has joined #ocaml
Snark has joined #ocaml
shirogane has joined #ocaml
smimou has joined #ocaml
poliquin_ has quit [Read error: 110 (Connection timed out)]
Raziel has joined #ocaml
shirogane has quit [Read error: 104 (Connection reset by peer)]
roderyk has joined #ocaml
<roderyk> Hello, I'm hoping to convince someone to rewrite a Java SOAP web service application into ocaml, but I do not have a lot of experience with ocaml and soap. I've found merjis.com/developers/oc-soap but it seems more client oriented
<roderyk> has anyone had any experience with SOAP and OCaml? maybe point me in the right direction? :)
<dylan> What, we're programmers. What makes you think we bathe? ;)
<dylan> Oddly enough, I was wondering about an ocaml SOAP module the other day
Snark has quit ["Leaving"]
<dylan> Haven't found much more than you have. :(
<dylan> (just the merjis thing)
<roderyk> so my suspicion that the merjis thing is client oriented is true, eh?
<dylan> Dunno. I just got this wild hair of an idea last night at 3AM...
<roderyk> :)
m3ga has quit ["disappearing into the sunset"]
<dylan> right now I'm reading about lock free data structures...
<roderyk> I've been semi_forced to work on this current web service, its written in java and jaxb... its really ugly :(
<roderyk> I was hoping to rewrite it into OCaml or Python (completely random, yes... hope I don't get banned ;) I guess maybe more appropriate would be if any one had any real SOAP experience? :)
<dylan> (there's a few pythonists here)
<roderyk> google seems to point out a bit more support for server based python + soap projects... wonder how realistic that is
tom_p has joined #ocaml
revision17_ has quit ["Leaving"]
Revision17 has joined #ocaml
arcticd has joined #ocaml
<arcticd> I need help with the Graphics module...How can I perform operations on a screen outside the function where open_graph ist called? I always get a "graphic screen not opened" error.
arcticd has quit ["leaving"]
ezra_ has joined #ocaml