mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
crathman has quit [Read error: 110 (Connection timed out)]
seafoodX has joined #ocaml
Smerdyakov has quit ["sleep"]
screwt820 has joined #ocaml
Mr_Awesome has quit [Remote closed the connection]
smimou has quit ["bli"]
mordaunt has joined #ocaml
lde` has joined #ocaml
lde has quit [Read error: 104 (Connection reset by peer)]
crabstick_ has quit []
crabstick has joined #ocaml
crabstick has quit [Client Quit]
crabstick has joined #ocaml
seafoodX has quit []
Mr_Awesome has joined #ocaml
Abo-Marwan10 has quit [Read error: 104 (Connection reset by peer)]
screwt820 has quit [Read error: 104 (Connection reset by peer)]
seafoodX has joined #ocaml
ggyy has joined #ocaml
mvitale has joined #ocaml
screwt820 has joined #ocaml
rutlov has joined #ocaml
pants1 has quit [Read error: 110 (Connection timed out)]
nuncanada has quit ["Leaving"]
rutlov has left #ocaml []
mordaunt has quit [Read error: 104 (Connection reset by peer)]
mvitale has quit [Read error: 113 (No route to host)]
pants1 has joined #ocaml
EliasAmaral has joined #ocaml
drice has joined #ocaml
crathman has joined #ocaml
crathman has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.6/2007072518]"]
Tetsuo has joined #ocaml
seafoodX has quit []
seafoodX has joined #ocaml
Administrator_ has joined #ocaml
seafoodX has quit [Read error: 104 (Connection reset by peer)]
seafoodX has joined #ocaml
patrick__ has joined #ocaml
seafoodX has quit [Client Quit]
seafoodX has joined #ocaml
patrick_ has quit [Read error: 110 (Connection timed out)]
ggyy has quit [Read error: 110 (Connection timed out)]
seafoodX has quit []
love-pingoo has joined #ocaml
drice has quit [Read error: 110 (Connection timed out)]
Demitar has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
rwmjones has quit [Remote closed the connection]
piggybox has joined #ocaml
rwmjones has joined #ocaml
rwmjones has quit [Remote closed the connection]
rwmjones has joined #ocaml
patrick_ has joined #ocaml
seafoodX has joined #ocaml
patrick__ has quit [Read error: 113 (No route to host)]
slipstream-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
olegfink has quit [Read error: 104 (Connection reset by peer)]
olegfink has joined #ocaml
love-pingoo has quit [Read error: 104 (Connection reset by peer)]
love-pingoo has joined #ocaml
pedro_dgv has joined #ocaml
Cygaal has joined #ocaml
smimou has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
Administrator_ has quit [Read error: 110 (Connection timed out)]
rwmjones has quit [Remote closed the connection]
rwmjones has joined #ocaml
smimou has quit ["bli"]
Smerdyakov has joined #ocaml
smimou has joined #ocaml
slipstream-- is now known as slipstream
rwmjones has quit [Remote closed the connection]
rwmjones has joined #ocaml
rwmjones has quit [Read error: 104 (Connection reset by peer)]
rwmjones has joined #ocaml
rwmjones has quit [Remote closed the connection]
rwmjones has joined #ocaml
smimou has quit [Remote closed the connection]
smkl_ has joined #ocaml
smkl has quit [Read error: 110 (Connection timed out)]
Abo-Marwan10 has joined #ocaml
Smerdyakov has quit ["Leaving"]
Demitar has joined #ocaml
seafoodX has quit []
seafoodX has joined #ocaml
<flux> hello.
ita has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
mvitale has joined #ocaml
drice has joined #ocaml
bluestorm_ has joined #ocaml
Demitar has joined #ocaml
pango has quit [Remote closed the connection]
drice has quit ["Leaving."]
seafoodX has quit []
CRathman has joined #ocaml
pango has joined #ocaml
Demitar has quit ["Burn the land and boil the sea. You can't take the sky from me."]
mr_hugo has joined #ocaml
<mr_hugo> hello!
<mr_hugo> how do i call bash commands from OCaml ?
<rwmjones> mr_hugo, Unix.system
<rwmjones> or Unix.open_process_{in,out}
<mr_hugo> ah thanks
mr_hugo has left #ocaml []
<flux> there are some libraries with more advanced facilities
<bluestorm_> hum
<bluestorm_> Sys.command
<flux> but if those suit you, that's great :)
<bluestorm_> if you're not really interested in the result
Smerdyakov has joined #ocaml
ygrek has joined #ocaml
screwt820 has quit [Read error: 104 (Connection reset by peer)]
Abo-Marwan10 has quit [Read error: 104 (Connection reset by peer)]
screwt820 has joined #ocaml
CRathman has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.6/2007072518]"]
<flux> hmm.. I have a tree of nodes, which can be, among other elements, concatenations of two nodes, unions of two nodes or repetitions of a node (this forming the tree)
<flux> I'm trying to simplify such a tree with inner unions into a one that only has top-level unions
<flux> hm, actually perhaps just running the algorithm I though of (pattern match Concat (Union, _)) recursively until equilibrium would work
Tetsuo has quit ["Leaving"]
<bluestorm_> you could insert the equilibrium check into the recursion
<flux> I actually have variants such as Concat of (rule * rule), Union of (rule * rule), Repeat of rule, Accept
<flux> I would like to handle the case C(R(U..),R(U..)) also
<flux> the simple version can handle C(U(..), x) and C(x, U(..))
* rwmjones yawns
<rwmjones> time to resurrect xavierbot
Abo-Marwan67 has joined #ocaml
<flux> actually I'm writing (part for fun, part for using it in a course (not returning as the course work per se)) an bnf->regular expression->nfa->dfa->invert->regular-expression-piece of code
<flux> and that part if of the dfa->re code
<flux> s/if/is/
<Smerdyakov> You know not all BNF grammars have corresponding regular expressions, right?
xavierbot has joined #ocaml
<xavierbot> /var/local/xavierbot/chroot: No such file or directory
<flux> well, I think those cases don't matter in my case
<xavierbot> /var/local/xavierbot/chroot: No such file or directory
<xavierbot> /var/local/xavierbot/chroot: No such file or directory
<xavierbot> /var/local/xavierbot/chroot: No such file or directory
<xavierbot> /var/local/xavierbot/chroot: No such file or directory
xavierbot has quit [Remote closed the connection]
<flux> the one I'm processing is a pretty simple one
<flux> of course: not every programming language can be recognized with a regular expression
<Smerdyakov> I wonder if it's decidable whether a BNF grammar describes a regular language.
<flux> I think it's possible to define a subset of bnf that maps to regular expressions
<flux> well, and still have a meaningful one..
<flux> perhaps it would not be a subset per se
<rwmjones> oops, sorry :-(
xavierbot has joined #ocaml
<rwmjones> xavierbot, help
<xavierbot> hello rwmjones, I am xavierbot 0.7, an OCaml toplevel
<xavierbot> expr ;; evaluate expr in toplevel and print result
<xavierbot> help help message
<xavierbot> restart restart the toplevel
<xavierbot> sleep go to sleep
<xavierbot> wake wake me up from sleep
<rwmjones> let foo () = print_endline "hello" ;;
<xavierbot> val foo : unit -> unit = <fun>
<rwmjones> foo () ;;
<flux> I don't know if it's possible to reverse a push-down automata though..
<xavierbot> hello
<xavierbot> - : unit = ()
<Smerdyakov> flux, of course it's possible to "define a subset."
<Smerdyakov> flux, take the empty subset, for instance. All of those grammars define regular languages.
<flux> smerdyakov, yes, I realized that, hence the following clarification
<flux> infact, a set of clarifications, the last being a retraction of that statement :-)
<Smerdyakov> flux, also, take a simple (complete) algorithm for translating regular expressions into context-free grammars, and make your subset be the image of the regular languages under that algorithm.
lde` has quit [Remote closed the connection]
<flux> what I actually have (I think I have) is a regular expression expressed in bnf form: all references to other rules can be simply copied into the original place and the algorithm still terminates
<Smerdyakov> Then you must have no need for *.
<flux> *. ?
<Smerdyakov> The Kleene star. Repetition.
<flux> well, one rule might be for example effectively [a-z]*, I need repetition for that, right? and that's a re. or are we talking about different things?
<bluestorm_> you could define * as a bnf rule, couldn't you ?
<Smerdyakov> Your description of "copying into the original place" was too vague to let us continue.
<Smerdyakov> bluestorm_, no. BNF allows no parametric operators.
<flux> ah, I meant that if I have a = b b, I can copy the definition of b into that, twice
<bluestorm_> hm
<flux> not that the repetition would be opened
<bluestorm_> you're right
<Smerdyakov> bluestorm_, you can define an equivalent to any regular expression, of course, but the translation isn't a BNF itself.
<bluestorm_> i was thinking of a specialized * rule
* Smerdyakov wonders... or is it?
<flux> special rules in my case are bad if they cannot be mapped to a regular expression, because I don't want to think the nfa/dfa/re-algorithms all over again :)
<Smerdyakov> Is the (input, output) pair language describing any regexp-to-CFG algorithm itself context-free?
<Smerdyakov> There's probably a simple pumping lemma argument that says "no."
<Smerdyakov> There's probably a simple pumping lemma argument that says "no."
screwt820 has quit [Read error: 104 (Connection reset by peer)]
Abo-Marwan67 has quit [Read error: 104 (Connection reset by peer)]
bluestorm_ has quit ["Konversation terminated!"]
lde has joined #ocaml
<flux> I think I'll need to reverse the whole thing somehow.. dig recursively into the tree until I find a Union, then rebuild the tree from the Union's point of view
lde has quit [Client Quit]
lde has joined #ocaml
Abo-Marwan67 has joined #ocaml
<flux> btw, graphviz once again has shown its greatness when I've been writing this.. much easier to see how the code fails - or works
lde has quit [Client Quit]
lde has joined #ocaml
piggybox_ has joined #ocaml
screwt820 has joined #ocaml
Tetsuo has joined #ocaml
piggybox has quit [Connection timed out]
ygrek has quit [Remote closed the connection]
<jonathanv> are you guys familiar with binary random access lists?
schme has quit [Remote closed the connection]
<flux> I don't think the term is familiar to me, but it sounds like a binary tree built from randomized source data to provide simple tree balancing_
<flux> ?
<flux> hm, not really actually
<jonathanv> no
<flux> I somehow read "tree" somewhere there
<flux> perhaps because I've been doing trees for the last few hours..
<jonathanv> they're purely funcional data structures that give array like random access times
<jonathanv> they're nuts
schme has joined #ocaml
<flux> I think I've read of something like that lately, most probably a link from programming.reddit
<jonathanv> i read about them in someone's thesis on functional data structures
<jonathanv> i have an ocaml implementation
<flux> okasaki's?
<jonathanv> yes
<jonathanv> a very interesting document
EliasAmaral has quit [Connection timed out]
<flux> even though it is amortized (?) constrant time access, I'm thinking the constrant factor will still be much larger than just using arrays.. but of course, the functional aspect can be very nice.
<flux> uh
<flux> constant typoed twice
<flux> perhaps signaling me to go to sleep..
<flux> the ocaml summer code project has one algorithm library, that tries to bring something like (well, not really similar at all, but in the same territory) C++'s STL to OCaml
<jonathanv> i'm willing to pay a LITTLE for functional
schme has quit [Remote closed the connection]
schme has joined #ocaml
Abo-Marwan67 has quit [Read error: 104 (Connection reset by peer)]
screwt820 has quit [Read error: 104 (Connection reset by peer)]
love-pingoo has quit ["thx"]
Abo-Marwan67 has joined #ocaml
screwt820 has joined #ocaml
<mbishop> Hmm
<mbishop> I've still yet to see anything from the ocaml summer code project
schme` has joined #ocaml
<flux> the one I was talking about is called ocaml-reins
<flux> it's on some subversion repository
<mbishop> hmm
<flux> one interesting project is the functional reactive gui-wrapper for gtk, the programming model seemed very simple
<mbishop> actually, I think I did see someone working on STM for ocaml as a summer project
<flux> perhaps it breaks down on real world scenarios :)
<mbishop> flux: these projects listed anywhere online?
<flux> listed atleast here: http://osp2007.janestcapital.com/
<flux> so this is not the google one
<flux> perhaps there are other projects also, which were not presented there
<flux> svn ls svn://osprepo.janestcapital.com/osp/2007 | wc -l gives me 12
<mbishop> they list the 12 projects on their page
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
crabstick_ has joined #ocaml
schme` has quit [Read error: 104 (Connection reset by peer)]
schme` has joined #ocaml
crabstick_ has quit []
crabstick has quit [Read error: 110 (Connection timed out)]
mr_hugo has joined #ocaml
<mr_hugo> hello
<mr_hugo> im using Unix.system to execute system commands on linux, but how do i get their output without making an execve ?
smimou has joined #ocaml
<mr_hugo> ill try create_process
<jonathanv> no i take it all back
<jonathanv> i would pay anything for functional data structures
smimram has joined #ocaml
schme has quit [Read error: 104 (Connection reset by peer)]
schme` has quit [Read error: 104 (Connection reset by peer)]
schme has joined #ocaml
smimou has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
<mr_hugo> ish!
<mr_hugo> i just did
<mr_hugo> a
<mr_hugo> open Unix;;
<mr_hugo> and it replaced the stdout from pervasives with the stdout from Unix.file_descr :(
<mr_hugo> this sucks very much
<mr_hugo> how can i avoid it ?
<hcarty> mr_hugo: You could try Pervasives.stdout
<pango> or not use open Unix
<mr_hugo> hmm ok
<mr_hugo> thank you
<Tetsuo> there was some camlp4 magic to open a module locally, with the "open Foo in" syntax. The extension was on Nicolas Pouillard site iirc, however it was not camlp4 3.10 compatible
Tetsuo has quit ["sleep"]
schme has quit [Remote closed the connection]
schme has joined #ocaml
schme` has joined #ocaml
schme has quit [Read error: 104 (Connection reset by peer)]
Cygaal has quit ["kthxbye"]
schme` is now known as schme
pants1 has quit ["Leaving."]
pedro_dgv has left #ocaml []
Smerdyakov has quit ["Leaving"]
schme has quit [Read error: 104 (Connection reset by peer)]
schme has joined #ocaml
delamon has joined #ocaml
delamon has quit ["WeeChat 0.2.1"]
<mr_hugo> i actually like OCaml labels and optional arguments :)
mordaunt has joined #ocaml
<mbishop> camlp5 looks neat
<mbishop> Scheme syntax :o
Smerdyakov has joined #ocaml
magius_pendragon has quit [Nick collision from services.]
screwt820 has quit [Read error: 104 (Connection reset by peer)]
Abo-Marwan67 has quit [Success]
Smerdyakov has quit ["Leaving"]
Smerdyakov has joined #ocaml