ayrnieu changed the topic of #ocaml to: OCaml 3.08.4 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/
Matoras has joined #ocaml
Bigbang is now known as Bigb[a]ng
Matoras has left #ocaml []
ellisonch has joined #ocaml
<ellisonch> hello, can someone tell me if there is any way to stop ocamllex from matching greedily? this isn't the same thing as "shortest" instead of "parse"
<ellisonch> or if maybe there is a trick around it
kryptt has joined #ocaml
kryptt has left #ocaml []
revision17_ has quit [Remote closed the connection]
Revision17 has joined #ocaml
ellisonch has quit []
ski_ has joined #ocaml
ski__ has quit [Read error: 110 (Connection timed out)]
premchai21 has quit ["Hey! Where'd my controlling terminal go?"]
premchai21 has joined #ocaml
premchai21 has left #ocaml []
Oatmeat has joined #ocaml
Oatly has quit [Read error: 110 (Connection timed out)]
pango_ has joined #ocaml
chs_ has quit []
vincenz has joined #ocaml
<vincenz> Hello
pango has quit [Read error: 110 (Connection timed out)]
<Revision17> hello
shirogane has joined #ocaml
vezenchio has joined #ocaml
Snark has joined #ocaml
Oatly has joined #ocaml
Schmurtz has quit [calvino.freenode.net irc.freenode.net]
Oatmeat|cs has quit [calvino.freenode.net irc.freenode.net]
Demitar has quit [calvino.freenode.net irc.freenode.net]
haelix has quit [calvino.freenode.net irc.freenode.net]
lispy has quit [calvino.freenode.net irc.freenode.net]
Hipo has quit [calvino.freenode.net irc.freenode.net]
Amorphous has quit [calvino.freenode.net irc.freenode.net]
KrispyKringle has quit [calvino.freenode.net irc.freenode.net]
Schmurtz has joined #ocaml
Oatmeat|cs has joined #ocaml
Demitar has joined #ocaml
haelix has joined #ocaml
KrispyKringle has joined #ocaml
Hipo has joined #ocaml
lispy has joined #ocaml
Amorphous has joined #ocaml
<vincenz> How do you define constants that can be used in pattern matching?
<Smerdyakov> You can't without using campl4 or something in a similar vein.
<vincenz> alright. thank you
<vincenz> just that I have a lot of code that is repetitive and it's becoming dangerous
<Smerdyakov> Small example?
<vincenz> type log_type = LOG_VAR_READ | LOG_VAR_WRITE
<vincenz> let read_type x = (do fileinput) match input with | 0 -> LOG_VAR_READ | 1 -> LOG_VAR_WRITE
<vincenz> let read x = let log_type = read_type x in match log_type with LOG_VAR_READ -> LogVarRead(with extra stuff from file) | LOG_VAR_WRITE -> LogVarWritie(with extra stuff from file)
<vincenz> in addition
<vincenz> these constants must be in sync with my c++ logger
<Smerdyakov> You're getting bent out of shape over pattern matching on a type isomorphic to 'bool'? :D
<vincenz> Smerdyakov: you said small example
<vincenz> there are many more types
<Smerdyakov> There's no general way to answer your question.
<Smerdyakov> Helpful answers would probably point out some pattern (not in the sense of "pattern matching") in your code that suggests appropriate higher-order functions.
<vincenz> just stupid to match an int and then make a type, just to match the type
Oatmeat has quit [Connection timed out]
<Smerdyakov> In the above example, all you need is a map from constructors of log_type to pairs of an integer and a handler function.
<Smerdyakov> That should be easy to write without significant boilerplate.
<vincenz> maybe
<vincenz> hmm
<Smerdyakov> Clearly it is for the example you gave.
<Smerdyakov> I can't generalize to the unknown circumstances of your actual case.
<vincenz> got a better way
<vincenz> much better
<vincenz> I was doing redundant work
Schmurtz has quit [calvino.freenode.net irc.freenode.net]
Amorphous has quit [calvino.freenode.net irc.freenode.net]
Hipo has quit [calvino.freenode.net irc.freenode.net]
KrispyKringle has quit [calvino.freenode.net irc.freenode.net]
lispy has quit [calvino.freenode.net irc.freenode.net]
haelix has quit [calvino.freenode.net irc.freenode.net]
Demitar has quit [calvino.freenode.net irc.freenode.net]
Oatmeat|cs has quit [calvino.freenode.net irc.freenode.net]
Schmurtz has joined #ocaml
Oatmeat|cs has joined #ocaml
Demitar has joined #ocaml
haelix has joined #ocaml
KrispyKringle has joined #ocaml
Hipo has joined #ocaml
lispy has joined #ocaml
Amorphous has joined #ocaml
ramkrsna_ has joined #ocaml
OtherAlfie has quit ["Sleepytime for Alfiekat"]
Oatmeat has joined #ocaml
chs_ has joined #ocaml
Oatly has quit [Read error: 110 (Connection timed out)]
Oatly has joined #ocaml
Oatmeat has quit [Read error: 110 (Connection timed out)]
hegemoOn has quit [Read error: 110 (Connection timed out)]
ramkrsna_ has quit [Read error: 113 (No route to host)]
hegemoOn has joined #ocaml
chs_ has quit []
chs_ has joined #ocaml
ski__ has joined #ocaml
shirogane has quit [Remote closed the connection]
Chipster1 has joined #ocaml
<Chipster1> salut tout le monde
Chipster1 has left #ocaml []
ski has quit [Read error: 110 (Connection timed out)]
chs_ has quit []
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
Skal has joined #ocaml
ppsmimou has joined #ocaml
Oatmeat has joined #ocaml
Chipster1 has joined #ocaml
Oatly has quit [Read error: 110 (Connection timed out)]
Oatly has joined #ocaml
mlh_ has quit [Client Quit]
Oatmeat has quit [Read error: 110 (Connection timed out)]
revision17_ has joined #ocaml
ramkrsna has joined #ocaml
Revision17 has quit [Read error: 110 (Connection timed out)]
Oatmeat has joined #ocaml
Bigb[a]ng is now known as Bigbang
exa has joined #ocaml
Oatly has quit [Read error: 110 (Connection timed out)]
Oatly has joined #ocaml
Oatmeat has quit [Read error: 110 (Connection timed out)]
Chipster1 has quit []
Oatmeat has joined #ocaml
ramkrsna has quit [Read error: 113 (No route to host)]
Oatly has quit [Read error: 110 (Connection timed out)]
Oatmeat has quit [Read error: 110 (Connection timed out)]
Chipster1 has joined #ocaml
Chipster1 has left #ocaml []
Chipster1 has joined #ocaml
Raziel has joined #ocaml
Chipster1 has left #ocaml []
ramkrsna has joined #ocaml
Oatmeat has joined #ocaml
ski has joined #ocaml
ramkrsna has quit [Read error: 110 (Connection timed out)]
pango has quit [calvino.freenode.net irc.freenode.net]
ski__ has quit [calvino.freenode.net irc.freenode.net]
mattam_ is now known as mattam
pango has joined #ocaml
ski__ has joined #ocaml
pango has quit [Read error: 104 (Connection reset by peer)]
petchema_ has joined #ocaml
petchema_ is now known as pango
ski__ has quit [Connection timed out]
Oatly has joined #ocaml
Chipster1 has joined #ocaml
Oatmeat has quit [Read error: 110 (Connection timed out)]
Raziel has quit ["Yo soy goma. Tú eres cola."]
chs_ has joined #ocaml
Chipster1 has quit []
Bigbang is now known as Bigb[a]ng
vodka-goo has joined #ocaml
brx has joined #ocaml
Bigb[a]ng is now known as Bigbang
<Oatmeat|cs> If in my compile line I have "-I +site-packages/oUnit" where does it get the path for site-packages from?
__DL__ has joined #ocaml
pango has quit ["brb"]
Hipo has quit [Read error: 110 (Connection timed out)]
pango has joined #ocaml
kryptt has joined #ocaml
kryptt has left #ocaml []
smimou has joined #ocaml
vezenchio has quit ["\o/ kitto shiawase wa kanashimi ni mite iru, kokoro no hitomi tojite, sotto sora wo daku \o/"]
shirogane has joined #ocaml
Schmurtz has quit ["Dodo !"]
shirogane has quit [Remote closed the connection]
Snark has quit ["Parti"]
_fab has quit [Read error: 104 (Connection reset by peer)]
<Demitar> Oatmeat|cs, short answer: use ocamlfind, long answer: http://caml.inria.fr/pub/docs/manual-ocaml/manual022.html
<Oatmeat|cs> thanks
OtherAlfie has joined #ocaml
__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/
Skal has quit [Remote closed the connection]
__DL__ has quit ["Bye Bye"]
brx has quit [Remote closed the connection]
brx has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
ski has quit [Nick collision from services.]
ski__ is now known as ski
vodka-goo has quit [Read error: 110 (Connection timed out)]
Submarine has joined #ocaml
Bigbang is now known as Bigb[a]ng
brx has quit [Remote closed the connection]
brx has joined #ocaml
faigo has joined #ocaml
smimou has quit ["bli"]
menace has joined #ocaml
menace has quit ["Verlassend"]