dylan changed the topic of #ocaml to: OCaml 3.09.1 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/
__DL__ has quit ["Bye Bye"]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Raziel has quit ["Yo soy goma. Tú eres cola."]
Submarine has quit ["Leaving"]
quamaretto has quit [Remote closed the connection]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
pango_ has joined #ocaml
pango has quit [Read error: 110 (Connection timed out)]
batdog|gone is now known as batdog
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
khaladan has quit [Read error: 104 (Connection reset by peer)]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
batdog has left #ocaml []
batdog has joined #ocaml
batdog is now known as batdog|gone
kryptt has joined #ocaml
<kryptt> hi all, i'm interested in an opinion regarding ai, functional languages and embedded systems
<Smerdyakov> You won't know if anyone has one until you ask for it.
<dylan> kryptt: I think they taste like turkey and with half the fat of imperative languages.
batdog|gone is now known as batdog
<kryptt> dylan: lool
<kryptt> where do they meat?
<kryptt> *meet
<dylan> kryptt: O'Leary's irish pub?
<dylan> kryptt: seriously, I'm not sure I understand the question.
<dylan> functional languages have a pretty strong basis in AI, Lisp being the old de-facto language for AI research.
<kryptt> dylan: yeah, but where have functional languages failed?
* dylan blinks
<kryptt> dylan: well i guess i'll probably very salnt towards my own opinion...
<Smerdyakov> kryptt, as far as I'm concerned, you have not yet asked us a concrete question.
<Smerdyakov> kryptt, would you mind doing so?
<kryptt> i know... i didnt want to be baised towards my own opinion...
<Smerdyakov> kryptt, we can't help you if we don't know what you want, regardless of your opinion.
<kryptt> anyways.. the question is basically where can reactive systems and functional languages work together?
<dylan> reactive?
batdog is now known as batdog|gone
<kryptt> um, as in embedded systems...
<kryptt> as a way of thought in a functional language, you have a specific output corresponding to a specific input
<kryptt> in a reactive model, you have a specif state corresponding to a specific previous state and an event
<dylan> functions map very well to state machines.
<dylan> newstate = f(oldstate)
<dylan> er,
<dylan> newstate = f(oldstate, x)
<dylan> where x is an event. :)
<kryptt> well, all you have to do is prove turing completeness
<kryptt> and each model better suites their own paradigms
<dylan> the reactive model seems directly comparable to functions, to me.
<kryptt> in embedded sytems you frequently use statemachines to map functions (like in a communications protocol)
<kryptt> not necesarily
<dylan> I mean, it's not even cumbersome, it's quite common I believe.
<kryptt> ..
<dylan> I guess I fail to understand the question. :(
<kryptt> i'll ask this one:
<kryptt> is there nothing new to learn from a reactive system?
<dylan> You'd have to show me a reactive system
<kryptt> hmm
<kryptt> an alarm is probably a good example:
<kryptt> the alarm is in two basic state:
<kryptt> armed or disarmed
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
<kryptt> inside the armed state, the alarm can be simply armed, firing or fired before
<kryptt> inside the disarmed state it can be normal or disarmed with sensor aciv
<kryptt> so when a normal user sends the disarm event, the alarm will behave differently if it is disarmed, or armed normal, or armed fired
<kryptt> if it is armed fired it might warn that in the past something triggered it
<kryptt> i believe there has been some undermining of memory, of permanence of action. in regards to ai research
<kryptt> dylan: ?
batdog|gone is now known as batdog
batdog is now known as batdog|gone
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Snark has quit ["Leaving"]
kryptt has quit [Read error: 110 (Connection timed out)]
rillig has quit [kornbluth.freenode.net irc.freenode.net]
ski has quit [kornbluth.freenode.net irc.freenode.net]
Bigb[a]ng has quit [kornbluth.freenode.net irc.freenode.net]
chimikal has quit [kornbluth.freenode.net irc.freenode.net]
batdog|gone has quit [kornbluth.freenode.net irc.freenode.net]
Oatmeat|cs has quit [kornbluth.freenode.net irc.freenode.net]
TaXules has quit [kornbluth.freenode.net irc.freenode.net]
alch` has quit [kornbluth.freenode.net irc.freenode.net]
shrimpx has quit [kornbluth.freenode.net irc.freenode.net]
dvekravy has quit [kornbluth.freenode.net irc.freenode.net]
CLxyz has quit [kornbluth.freenode.net irc.freenode.net]
batdog|gone has joined #ocaml
rillig has joined #ocaml
ski has joined #ocaml
Bigb[a]ng has joined #ocaml
alch` has joined #ocaml
chimikal has joined #ocaml
Oatmeat|cs has joined #ocaml
TaXules has joined #ocaml
shrimpx has joined #ocaml
CLxyz has joined #ocaml
dvekravy has joined #ocaml
Skal has joined #ocaml
MisterC has joined #ocaml
clog has quit [^C]
clog has joined #ocaml
Skal has quit [Read error: 110 (Connection timed out)]
_shawn has joined #ocaml
m3ga has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
pango_ has quit [Remote closed the connection]
pango has joined #ocaml
khaladan has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
_shawn has quit [Read error: 60 (Operation timed out)]
_shawn has joined #ocaml
Revision17 has quit [Read error: 110 (Connection timed out)]
rillig has quit [Read error: 104 (Connection reset by peer)]
rillig has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
det has quit [Read error: 110 (Connection timed out)]
det has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Oatmeat|cs has quit [Read error: 104 (Connection reset by peer)]
Oatmeat|umn has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Oatmeat|umn has quit [Read error: 104 (Connection reset by peer)]
Oatmeat|umn has joined #ocaml
Oatmeat|umn has quit [Read error: 104 (Connection reset by peer)]
Oatmeat|umn has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
yangsx has joined #ocaml
yangsx has quit ["离开"]
Snark has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
demitar_ is now known as Demitar
Revision17 has joined #ocaml
Oatmeat|umn has quit [Read error: 110 (Connection timed out)]
Oatmeat|umn has joined #ocaml
Raziel has joined #ocaml
Kerjean has joined #ocaml
<Kerjean> Bonjour
<zmdkrbou> salut
<zmdkrbou> c'est un chan anglophone ici :)
<Kerjean> oups scuse me
<zmdkrbou> no problem
<Kerjean> i shall speak in english thus
<Amorphous> hey. i'm trying to write a parser in ocamlyacc for the following: <group> ::= <groupheader> <entry>* <ini-file> ::= <group>+
<Amorphous> but i fail miserably. is that even possible?
<zmdkrbou> group:
<zmdkrbou> groupheader entrylist
<zmdkrbou> entrylist:
<zmdkrbou> entry
<zmdkrbou> |
<zmdkrbou> etc.
<Kerjean> what is the error you get ?
<Amorphous> exception Parsing.Parse_error and parse_error is syntax error
<Amorphous> one mom. i'll paste to pastebin.com
<Kerjean> have you check for missing semicolon or stuff like that ?
<flux__> amorphous, maybe you want to try out this: http://pauillac.inria.fr/~fpottier/menhir/menhir.html.en
<Amorphous> flux__: is it not possible what i want with ocamlyacc?
<zmdkrbou> Amorphous: it's possible
<Kerjean> Amorphous have you check the documentation of ocamlyacc on the reference site ?
<flux__> sure it is possible
<zmdkrbou> it's easy
<flux__> menhir just provides some syntax for expressing certain things more concisely
<flux__> (plus it is actually a more powerful parser generator)
<flux__> disclaimer: I haven't used menhir, because I haven't had the need
<flux__> (but I did browse through its documentation)
<Amorphous> i have groupheader groupheader and it fails on the second (empty group should be possible)
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
<Amorphous> arg ok the version i pasted didn't allow it
<Kerjean> Amorphous try groupheader : group_empty | group_non_empty groupheader
* Amorphous *sigs* CFGs are so easy in theory
<flux__> I just used libcf's or maybe libmissinglib's configuration parser
<Kerjean> Amorphous your problem is very similar to the parsing of lists
<Amorphous> i don't get it
<Amorphous> Kerjean: is this what you meant http://pastebin.com/537050
<Amorphous> | Group groupentrylist | Group
<Amorphous> (Group is the header)
<Kerjean> yes, does it compile ?
<Amorphous> yes. the parser goes into groupentry: and of course can't put in the next token Group
<Amorphous> tokens come in the following row Group Group Entry
<Amorphous> and it is at the second one
<Amorphous> but he should have returned with the first one because no Entry follows
<Kerjean> Amorphous just remove the first Group, and allow groupentrylist to return empty list !
<Kerjean> thus Group($1,$2) does the job, with $2 = empty list ;)
<Amorphous> doesn't work
<Amorphous> you mean like http://pastebin.com/537056
<Kerjean> just put groupentry befor groupentrylist, to have an LL(1) aprser
<Amorphous> still doesn't work like http://pastebin.com/537063
<Amorphous> the same problem
<Kerjean> Amorphous i just submit you on pastebin a sample of a parser file from the distribution.
<Kerjean> Amorphous source code of ocaml is always a good source of samples !
<Amorphous> what's case?
* Amorphous thinks his brain just melted away
<Kerjean> Amorphous just pick a .mly file from the ocaml distribution and look for the keyword "list", you should understand how to parse lists possibly empty
<Amorphous> but i did just that (i think. but i obviously made an error)
<Amorphous> it seems the parser insists on going to "| groupentry groupentrylist {...}" instead of empty ( "| {...}" )
<Amorphous> and thus fails on the next token because it is not Entry
<Kerjean> i can't help you more. just look the documentation of ocamlyacc , i remember it was clearly explain in it
<Amorphous> oh it is clearly explained for cases where you have parens like "[Groupheader] ( ) [Groupheader] ( entry entry )" but i didn't find any example for something like "[Groupheader] [Groupheader] entry entry"
<Kerjean> Amorphous no idea to go further , sadly :(
<Amorphous> mh :( thx anyway
<Amorphous> anyone?
<Amorphous> else?
<zmdkrbou> < Amorphous> it seems the parser insists on going to "| groupentry groupentrylist {...}" instead of empty ( "| {...}" )
<zmdkrbou> ^^^ try to place the empty part *after* the non-empty one
<Kerjean> zmdkrbou that is what i said, it seems it did'nt help him
<zmdkrbou> erf
<Amorphous> zmdkrbou: both ways it's the same problem
<Amorphous> and as it is supposed to the two .output files only have one state number exchanged
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Raziel has quit ["Yo soy goma. Tú eres cola."]
Kerjean has left #ocaml []
<Amorphous> lol if i reverse the token stream and do groupentrylist Group instead of Group groupentrylist
<Amorphous> it works
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
nooga has joined #ocaml
khaladan has quit [" HydraIRC -> http://www.hydrairc.com <- The future of IRC"]
nooga has left #ocaml []
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
bzzbzz has joined #ocaml
MisterC has quit [Remote closed the connection]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
pango has quit ["Leaving"]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
ski has quit [Read error: 110 (Connection timed out)]
ski has joined #ocaml
pango has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
slipstream has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
smimou has joined #ocaml
zigong has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Snark has quit ["Leaving"]
Skal has joined #ocaml
kral has joined #ocaml
Raziel has joined #ocaml
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
mikeX has joined #ocaml
<mikeX> is there a crc32 lib I can use with ocaml?
<mikeX> something like the digest module
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
<mikeX> hmm, I see now the algorithm should be fairly simple, so I guess there is not need for one
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Skal has quit ["Client exiting"]
mak1 has joined #ocaml
mak1 has left #ocaml []
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
zigong has quit ["using sirc version 2.211+KSIRC/1.3.12"]
kral has quit [""In girum imus nocte et consumimur igni.""]
SmerdyOffice has joined #ocaml
SmerdyOffice has quit [Client Quit]
smimou has quit ["bli"]
Raziel has quit ["Yo soy goma. Tú eres cola."]
Raziel has joined #ocaml
Raziel has quit ["Yo soy goma. Tú eres cola."]
mauke has quit [Remote closed the connection]
mauke has joined #ocaml
Raziel has joined #ocaml
Raziel has quit [Client Quit]
mikeX has quit ["leaving"]