Alpounet changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.1 out now! Get yours from http://caml.inria.fr/ocaml/release.html
tmaedaZ has quit [Read error: 110 (Connection timed out)]
<antegallya> spicey, but seeing the translate3 function, you may do [ let call_xyz func point = func (point.x, point.y, point.z) ] and call it with GlMat.translate3
<antegallya> going to bed, 'night
<spicey> night, thanks for the idea
antegallya has left #ocaml []
tmaeda is now known as tmaedaZ
julm_ has joined #ocaml
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has joined #ocaml
Alpounet has quit ["Leaving"]
Alpounet has joined #ocaml
tmaedaZ0 has joined #ocaml
julm has quit [Read error: 113 (No route to host)]
<spicey> What exactly does Some do? if I have a function idle, then [ Glut.idlefunc idle ] doesn't work (expected (unit -> unit), got unit -> unit instead) but [ Glut.idlefunc (Some idle) ] works
struktured_ has joined #ocaml
ulfdoz_ has joined #ocaml
tmaedaZ has quit [Read error: 110 (Connection timed out)]
struktured has quit [Read error: 145 (Connection timed out)]
Mr_Awesome_ has joined #ocaml
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ is now known as ulfdoz
kaustuv_` has joined #ocaml
ski_ has joined #ocaml
kaustuv_ has quit [Read error: 110 (Connection timed out)]
Mr_Awesome_ has quit [Read error: 110 (Connection timed out)]
Mr_Awesome__ has joined #ocaml
tmaedaZ0 is now known as tmaedaZ
nb has quit [Client Quit]
nb has joined #ocaml
nb has quit [Client Quit]
struktured_ is now known as struktured
nb has joined #ocaml
jeddhaberstro has quit [Client Quit]
Alpounet has quit [No route to host]
Mr_Awesome__ has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has joined #ocaml
struktured has quit [Remote closed the connection]
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
<thelema> spicey: are you sure there isn't "option" in the type somewhere?
<thelema> "Some foo" and "None" are the options for an option type
<spicey> Indeed, val idleFunc: cb:((unit->unit) option)->unit
struktured has joined #ocaml
_unK has quit [Read error: 104 (Connection reset by peer)]
vindimy has joined #ocaml
<vindimy> hi all... i'm back again
<vindimy> trying to get anyone to help me with parsing a simple string using simple grammar - i'm stuck as usual :/
<vindimy> any takers? :D
<thelema> keep a list of tokens that you need to reduce
<thelema> non-terminals
<vindimy> hi thelema :)
<thelema> hi
<vindimy> your last advice was good but unfortunately my coding skills could not take it to an advantage :/
<vindimy> maybe i should start with pseudocode
<thelema> to_match := Expr
* thelema forgets the example grammar
<vindimy> i tried to post a question on stackoverflow... grammar is there - stackoverflow.com/questions/1584247
<thelema> if the head is a non-terminal, you have to use your replacement function to expand it
<thelema> if the head is a terminal, try matching it against the head of your string
<thelema> if it succeeds, remove both and continue
<thelema> if it fails, backtrack
<vindimy> remove both the head of the string and the member of the grammar? what if i need to use the member of the grammar later?
<thelema> remove that token from the "to-match" list
<vindimy> to_match list is set up first, then i chop off a piece of string from the front and try to match it with one of non-terminals, right?
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
<thelema> process the head of the string and the head of the "to-match" list
<vindimy> if my string is ["4";"+";"3"] then i would first match "4" with [N Num]...
<vindimy> oh.. :O
<thelema> I think you'll have to keep your string as one big string
Mr_Awesome has joined #ocaml
<vindimy> to_match list is looking like a replica of the grammar to me...
<vindimy> wait, i just said something stupid
<thelema> not the grammar, a partially expanded version of the grammar
<vindimy> that's right!
<vindimy> ooh that's starting to make a little more sense
<vindimy> thanks, thelema... out of curiosity - you've been using ocaml at work, or just a fan of it for personal projects?
* thelema is a PhD student
* vindimy is a lowly undergrad :/
* vindimy somehow got into ucla's cs program and loves every minute of it
<thelema> I use ocaml for my research.
<vindimy> thelema: what sort of research?
<thelema> networks & security
<thelema> at the moment I'm working out details of using a certain kind of firewall chip for doing regular expressions
<vindimy> you use ocaml to model the chip's behavior? i've heard ocaml's useful in EE
<vindimy> 'model the behavior' might be a wrong way to put it.. maybe i meant 'test certain conditions in the chip'
<thelema> no, I use ocaml to build the program for the chip
<thelema> I guess I may write a simulator too, but that'll be pretty straghtforward
<thelema> this chip has very straightforward semantics, so I don't have to deal with its complexity much
jknick has quit ["leaving"]
<vindimy> thelema: has it been done before? doing regex in a chip (i imagine to match firewall rules and whatnot)
<thelema> for line-speed parsing of data flows
<thelema> there's an existing chip designed for something else.
<thelema> It's become commodity, so it's cheaper and faster than a custom chip
<thelema> and it may very well enable very efficient flow analysis
<vindimy> that's worthy a PhD thesis, i imeagine
<thelema> it's just a side project - I'm helping someone else with this project.
<thelema> I doubt it'll become my thesis - it's just interesting research
<vindimy> you're the first PhD i've spoken to on my topic.. a few masters students in my class have no clue (or wouldn't share)..
<thelema> I don't have my PhD yet
<vindimy> i understand - but there's a high chance that you will - and good luck, btw
<thelema> thank you. Do you have the idea for your parsing?
<vindimy> yes.. i'm excited that i see some light at the end of the tunnel so i'll get to work now
<vindimy> thanks again
<thelema> you're welcome
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
thelema_ has joined #ocaml
Mr_Awesome has joined #ocaml
kaustuv_ has joined #ocaml
kaustuv_` has quit [verne.freenode.net irc.freenode.net]
valross has quit [verne.freenode.net irc.freenode.net]
slash_ has quit [verne.freenode.net irc.freenode.net]
thelema has quit [verne.freenode.net irc.freenode.net]
Asmadeus has quit [verne.freenode.net irc.freenode.net]
valross has joined #ocaml
slash_ has joined #ocaml
thelema has joined #ocaml
Asmadeus has joined #ocaml
thelema has quit [Read error: 104 (Connection reset by peer)]
* thelema_ just found a bug in Vect (I think)
thelema_ is now known as thelema
<thelema> at least a problem with how it generates vectors - too much sharing.
vindimy_ has joined #ocaml
vindimy has quit [Read error: 145 (Connection timed out)]
tmaedaZ is now known as tmaedaZ0
tmaedaZ0 is now known as tmaeda
vindimy_ is now known as vindimy
seanmcl has quit []
gim has quit [Remote closed the connection]
ulfdoz has quit [Read error: 60 (Operation timed out)]
ikaros has joined #ocaml
ulfdoz has joined #ocaml
thrasibule has quit [Read error: 110 (Connection timed out)]
dimi__ has joined #ocaml
dimi__ is now known as vindimy_
<vindimy_> :)
julm has joined #ocaml
ikaros has quit ["Leave the magic to Houdini"]
ski_ has quit ["Lost terminal"]
julm_ has quit [Read error: 110 (Connection timed out)]
ulfdoz has quit [Read error: 110 (Connection timed out)]
julm_ has joined #ocaml
mishok13 has joined #ocaml
julm has quit [Read error: 113 (No route to host)]
tonyIII_ has quit [Read error: 60 (Operation timed out)]
tonyIII_ has joined #ocaml
julm has joined #ocaml
ttamttam has joined #ocaml
julm_ has quit [Read error: 110 (Connection timed out)]
julm_ has joined #ocaml
<vindimy> haw haw ocaml is great for parsing, only if i knew how to make it do what i want!
<Camarade_Tux> :)
* vindimy wonders if Camarade_Tux is an ocaml expert
<Camarade_Tux> I know almost nothing in parsing :)
julm has quit [Read error: 60 (Operation timed out)]
<vindimy> <- same here
<Camarade_Tux> but ask, someone will probably answer you
<Camarade_Tux> it's hard to know if you can answer a question without seeing the question first ;)
<vindimy> so far thelema has been helpful :)
<vindimy> true.. well, i posted my question on stackoverflow.com/questions/1584247 to try my luck.. fyi it's a part of a bigger assignment
<vindimy> i can link you to that assignment if you're curious
<vindimy> as you can see, stackoverflow does not posess many ocaml experts..
<valross> vindimy, why you make that restriction - do not use any libs except list?
<vindimy> valross: it's a class assignment, that's why.. you can see it in its full glory here: cs.ucla.edu/classes/fall09/cs131/hw/hw2.html
<vindimy> i was here yesterday and thelema did give me a few useful pointers, so i've been looking to translate them into code..
<Camarade_Tux> (stackoverflow has some knowledgeable ocaml people ;-) )
<valross> vindimy, you can easily write recursive descendant parser.
<vindimy> valross: i have encountered ocaml and functional programming ~3 weeks ago.. i'd probably have an easy time writing one in C++/Java.. ocaml is just really new to me
<valross> vindimy, I have to return to job. If nobody helps you within 30-40 minutes, I'll assist you
<vindimy> :O thanks..
<vindimy> i'm currently trying to implement parse_frag.. it's at http://pastebin.com/m21a1063c
<vindimy> i'll try a few things out to see how ocaml takes it..
<vindimy> Camarade_Tux: do you like my assignment? :D
<Camarade_Tux> I'm far too sleepy to be able to read it ^^
<vindimy> ah, i'm most active at nights
<Camarade_Tux> I'm most inactive at mornings after bad nights ;-)
<vindimy> i wonder how would i use replacement function to expand Expr into [[Term;Binop;Expr][Term]]..
<Camarade_Tux> I was concerned ocaml-gir produced bad code, then I saw this from dbus-python.h : (*(DBusConnection *(*)(PyObject *))dbus_bindings_API[1]) , I'm not saying it's bad but it doesn't look great either
<vindimy> hehe.. /* you are not expected to understand this */
h3 has joined #ocaml
h3r3tic has quit [Read error: 104 (Connection reset by peer)]
munga has joined #ocaml
h3r3tic has joined #ocaml
h3 has quit [Read error: 104 (Connection reset by peer)]
h3r3tic has quit [Read error: 104 (Connection reset by peer)]
<vindimy> my Expr becomes [[Term;Binop;Expr];[Term]] but then what? :(
dmentre has joined #ocaml
tmaeda has quit [Read error: 110 (Connection timed out)]
tmaeda has joined #ocaml
tonyIII__ has joined #ocaml
<valross> vindimy, here?
_zack has joined #ocaml
lutter has joined #ocaml
tonyIII_ has quit [Read error: 110 (Connection timed out)]
verte has joined #ocaml
_andre has joined #ocaml
h3r3tic has joined #ocaml
h3 has joined #ocaml
h3r3tic has quit [Read error: 104 (Connection reset by peer)]
<kaustuv_> vindimy: Your problem is ideally suited for parser combinators. A simple example: http://ocaml.pastebin.com/m6782e71c -- adapting it to your needs left as an exercise.
h3r3tic has joined #ocaml
h3 has quit [Read error: 104 (Connection reset by peer)]
h3r3tic has quit [Read error: 131 (Connection reset by peer)]
h3r3tic has joined #ocaml
tmaeda is now known as tmaedaZ
h3r3tic has quit [Read error: 131 (Connection reset by peer)]
dmentre has quit ["Leaving."]
Alpounet has joined #ocaml
flx__ has joined #ocaml
flux has quit [Nick collision from services.]
flx__ is now known as flux
<flux> hm, qtcaml doesn't seem too good, apparently QtCaml Alpha 'deadline' as it is on their website has been missed by 7 weeks :-o
<thelema> kaustuv_: he is doing a homework assignment and has to write a simple parser generator
kaustuv_` has joined #ocaml
ikaros has joined #ocaml
gim has joined #ocaml
kaustuv_ has quit [Read error: 110 (Connection timed out)]
Vital303 has joined #ocaml
Vital303 has quit [Remote closed the connection]
Vital303 has joined #ocaml
seanmcl has joined #ocaml
kaustuv_` is now known as kaustuv
<kaustuv> thelema: write a parser *generator*? That's hella complex even for someone who knows OCaml well.
<flux> I suppose he didn't mean a generator per se, but rather a program that takes a grammar and input and produces something useful out of them :)
<flux> his full problem description is here: http://cs.ucla.edu/classes/fall09/cs131/hw/hw2.html
<flux> "Given a grammar in the style of Homework 1, your program will generate a function that is a parser."
<flux> or if that's still ambigious: "Write a function parse_prefix gram that returns a matcher for the grammar gram." :)
<thelema> kaustuv: it's a pretty simple model for a parser generator
<thelema> but I agree, it's quite a task.
<kaustuv> It's way too hard for an intro class, I think. Especially as their reference grammar is left recursive.
tmaedaZ has quit ["Quit Nadoka 0.7.1-trunk (rev: 187) - http://www.atdot.net/nadoka/"]
<flux> I don't think a class with name "Programming Languages" is an intro one
<thelema> I'm surprised at the numbering too.
<thelema> But IIRC, he did say he was a freshman
tmaedaZ has joined #ocaml
<kaustuv> Wait, I take that back. The grammar is not left recursive.
<munga> I get this error while linking to ocaml-postgresql ... Mutex referenced from /usr/lib/ocaml/postgresql/postgresql.cmxa
<munga> what am I missing in _tags ?
<flux> pkg_threads ?
<flux> or threads in general if you don't use findlib support
<kaustuv> use_threads perhaps
<Camarade_Tux> flux: have you seen recent activity for qtcaml?
<flux> no
willb1 has joined #ocaml
<flux> the qtcaml commits are 4 months old
<munga> pkg_threads ... I would expect this as a findlib dependency ...
<Camarade_Tux> I'd really like to know what they have and what they don't have, and if they're using qtscriptgenerator (or a name like that)
<Camarade_Tux> munga: but it's not specified by default
<Camarade_Tux> flux: 4 months is more recent than I'd thought
<munga> I see ...
albacker has joined #ocaml
willb1 has quit [Remote closed the connection]
<Camarade_Tux> are ocaml's Nativeint the same width as C ints?
<Camarade_Tux> (hopefully found the doc), gasp, they're not ='(
<orbitz> they are boxed right?
<Camarade_Tux> as far as I know, they are
<Camarade_Tux> my problem is that my C ints are 32bits wide :)
<orbitz> As in, you don't thin kthey should be boxed
<Camarade_Tux> well, I don't see another solution
<orbitz> The Ocaml VM is quite tyrannical
<orbitz> boxing everyone!
<Camarade_Tux> maybe int32 could be { int32_t; tag }, would slow the GC but might be faster for regular operations (if it's possible to have such a layout and still perform regular operations)
tmaedaZ is now known as tmaeda
tmaeda is now known as tmaedaZ
tmaedaZ is now known as tmaeda
tmaeda has quit [Remote closed the connection]
tmaeda has joined #ocaml
tonyIII_ has joined #ocaml
hcarty has quit [Remote closed the connection]
julm has joined #ocaml
<thelema> completely regular representation for everything!
<thelema> boxing for anything 32-bits and larger
tmaeda is now known as tmaedaZ
tmaedaZ is now known as tmaeda
julm_ has quit [Read error: 110 (Connection timed out)]
tonyIII__ has quit [Read error: 110 (Connection timed out)]
h3r3tic has joined #ocaml
tonyIII_ has quit [Read error: 60 (Operation timed out)]
tonyIII_ has joined #ocaml
thelema has quit [Remote closed the connection]
thelema has joined #ocaml
willb1 has joined #ocaml
<thelema> today is the day for bug fixes... Need to fix bug in camomile's ISet
verte has quit ["~~~ Crash in JIT!"]
ikaros_ has joined #ocaml
willb1 is now known as willb-wfh
ikaros has quit [Read error: 110 (Connection timed out)]
hcarty has joined #ocaml
smimou has joined #ocaml
mishok13 has quit [Read error: 110 (Connection timed out)]
_unK has joined #ocaml
tonyIII_ has quit [Read error: 145 (Connection timed out)]
tonyIII_ has joined #ocaml
valross has quit [Remote closed the connection]
churchill has quit [Read error: 104 (Connection reset by peer)]
seanmcl has quit []
ttamttam has quit ["Leaving."]
<thelema> Grr. Long-term copy and paste errors
slash_ has quit [Client Quit]
<thelema> fix done in batteries and patch sent upstream
ua has joined #ocaml
<thelema> This fix might obselete a ton of code in another project trying to deal with the bad representation.
* thelema should audit the code more fully
ulfdoz has joined #ocaml
<Camarade_Tux> fix for what?
<thelema> ISet.t, in the camomile source
<Camarade_Tux> I never really used camomile
<thelema> I use the DIET set/map implementations from camomile more than anything else.
peddie has quit ["leaving"]
peddie has joined #ocaml
Snark has joined #ocaml
_unK has quit [Remote closed the connection]
seanmcl has joined #ocaml
ttamttam has joined #ocaml
tmaeda has quit ["Quit Nadoka 0.7.1-trunk (rev: 187) - http://www.atdot.net/nadoka/"]
tmaeda has joined #ocaml
Submarine has joined #ocaml
munga has quit [Read error: 113 (No route to host)]
ttamttam has quit ["Leaving."]
ygrek has joined #ocaml
ttamttam has joined #ocaml
_zack has quit ["Leaving."]
itewsh has joined #ocaml
ikaros has joined #ocaml
itewsh has quit [Read error: 60 (Operation timed out)]
itewsh has joined #ocaml
antegallya has joined #ocaml
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
ttamttam has quit ["Leaving."]
antegallya has quit [Read error: 104 (Connection reset by peer)]
antegallya has joined #ocaml
_andre has quit ["Lost terminal"]
ikaros has quit ["Leave the magic to Houdini"]
Submarine has quit [Remote closed the connection]
seanmcl has quit []
ikaros has joined #ocaml
Associat0r has joined #ocaml
_unK has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
Snark has quit [Read error: 60 (Operation timed out)]
seanmcl has joined #ocaml
slash_ has joined #ocaml
itewsh has quit [Remote closed the connection]
itewsh has joined #ocaml
ygrek has quit [Remote closed the connection]
ikaros has quit ["Leave the magic to Houdini"]
albacker has quit [Remote closed the connection]
antegallya has quit [Success]
antegallya has joined #ocaml
antegallya has quit [Read error: 104 (Connection reset by peer)]
antegallya has joined #ocaml
itewsh has quit [Read error: 60 (Operation timed out)]
itewsh has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
sgnb has joined #ocaml
antegallya has quit [Read error: 54 (Connection reset by peer)]
antegallya has joined #ocaml
antegallya has quit [Read error: 54 (Connection reset by peer)]
antegallya has joined #ocaml
itewsh has quit ["Quitte"]
seanmcl has quit []
antegallya has quit [Read error: 54 (Connection reset by peer)]
antegallya has joined #ocaml
antegallya has quit [Read error: 54 (Connection reset by peer)]
antegallya has joined #ocaml
antegallya has left #ocaml []
rjack has joined #ocaml
jonafan has quit ["Leaving"]
rjack has quit [Client Quit]
willb-wfh has quit [Remote closed the connection]
seanmcl has joined #ocaml
ikaros_ has quit ["Leave the magic to Houdini"]
smimou has quit ["bli"]
kaustuv_ has joined #ocaml
ccasin has joined #ocaml
kaustuv has quit [Read error: 110 (Connection timed out)]
verte has joined #ocaml
eydaimon has joined #ocaml
valross has joined #ocaml
Yokitx has joined #ocaml