mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
LordMetroid has joined #ocaml
jlouis has quit [Remote closed the connection]
det has joined #ocaml
david33 has left #ocaml []
netx has quit [Remote closed the connection]
yziquel has quit [Read error: 110 (Connection timed out)]
sporkmonger has joined #ocaml
<ulfdoz> I don't understand this error: http://rafb.net/p/D8m1K117.html
rby has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
<ulfdoz> ah, got it.
rby_ has quit [Read error: 110 (Connection timed out)]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
seafood_ has joined #ocaml
<seafood_> Hey there. I'm using an "include <module>" directive as a way of collecting together many functions from other modules. However I have the problem that a module N is defined in two of the modules I'm including. ocamlc barfs. Is there some way I can rename this two internal modules so that the conflict doesn't occur?
<thelema> ocamlc barfs whenever two modules have the sae name - included or not
<thelema> *same
LordMetroid has quit ["ZzZzZz"]
<seafood_> Well, if you use "open" then you just get shadowing.
<seafood_> But not with include.
<seafood_> It would be nice if you could include with "hiding"
<seafood_> Much like the import declaration in Haskell.
<seafood_> brb
seafood_ has quit []
seafood_ has joined #ocaml
rodge has joined #ocaml
aryx has quit [leguin.freenode.net irc.freenode.net]
unfo- has quit [leguin.freenode.net irc.freenode.net]
orbitz has quit [leguin.freenode.net irc.freenode.net]
shortcircuit has quit [leguin.freenode.net irc.freenode.net]
Naked has quit [leguin.freenode.net irc.freenode.net]
l_a_m has quit [leguin.freenode.net irc.freenode.net]
seafood_ has quit [leguin.freenode.net irc.freenode.net]
TychoBrahe has quit [leguin.freenode.net irc.freenode.net]
gaja has quit [leguin.freenode.net irc.freenode.net]
TaXules has quit [leguin.freenode.net irc.freenode.net]
cmeme has quit [leguin.freenode.net irc.freenode.net]
flux has quit [leguin.freenode.net irc.freenode.net]
seafood_ has joined #ocaml
flux has joined #ocaml
cmeme has joined #ocaml
TaXules has joined #ocaml
gaja has joined #ocaml
TychoBrahe has joined #ocaml
l_a_m has joined #ocaml
shortcircuit has joined #ocaml
aryx has joined #ocaml
orbitz has joined #ocaml
unfo- has joined #ocaml
l_a_m has quit [leguin.freenode.net irc.freenode.net]
seafood_ has quit [leguin.freenode.net irc.freenode.net]
flux has quit [leguin.freenode.net irc.freenode.net]
TaXules has quit [leguin.freenode.net irc.freenode.net]
gaja has quit [leguin.freenode.net irc.freenode.net]
cmeme has quit [leguin.freenode.net irc.freenode.net]
TychoBrahe has quit [leguin.freenode.net irc.freenode.net]
aryx has quit [leguin.freenode.net irc.freenode.net]
unfo- has quit [leguin.freenode.net irc.freenode.net]
orbitz has quit [leguin.freenode.net irc.freenode.net]
shortcircuit has quit [leguin.freenode.net irc.freenode.net]
shortcircuit has joined #ocaml
aryx has joined #ocaml
orbitz has joined #ocaml
unfo- has joined #ocaml
Naked has joined #ocaml
TychoBrahe has joined #ocaml
seafood_ has joined #ocaml
l_a_m has joined #ocaml
gaja has joined #ocaml
TaXules has joined #ocaml
cmeme has joined #ocaml
flux has joined #ocaml
pattern_ has joined #ocaml
pattern- has joined #ocaml
AxleLonghorn has joined #ocaml
AxleLonghorn has left #ocaml []
Mr_Awesome has joined #ocaml
pattern has quit [Read error: 110 (Connection timed out)]
pattern- is now known as pattern
pattern_ has quit [Read error: 110 (Connection timed out)]
Naked has quit [leguin.freenode.net irc.freenode.net]
TychoBrahe has quit [leguin.freenode.net irc.freenode.net]
l_a_m has quit [leguin.freenode.net irc.freenode.net]
TaXules has quit [leguin.freenode.net irc.freenode.net]
seafood_ has quit [leguin.freenode.net irc.freenode.net]
flux has quit [leguin.freenode.net irc.freenode.net]
cmeme has quit [leguin.freenode.net irc.freenode.net]
gaja has quit [leguin.freenode.net irc.freenode.net]
Naked has joined #ocaml
TychoBrahe has joined #ocaml
seafood_ has joined #ocaml
l_a_m has joined #ocaml
gaja has joined #ocaml
TaXules has joined #ocaml
cmeme has joined #ocaml
flux has joined #ocaml
rodge has left #ocaml []
netx has joined #ocaml
aryx has quit [leguin.freenode.net irc.freenode.net]
unfo- has quit [leguin.freenode.net irc.freenode.net]
orbitz has quit [leguin.freenode.net irc.freenode.net]
shortcircuit has quit [leguin.freenode.net irc.freenode.net]
shortcircuit has joined #ocaml
aryx has joined #ocaml
orbitz has joined #ocaml
unfo- has joined #ocaml
Naked has quit [leguin.freenode.net irc.freenode.net]
TychoBrahe has quit [leguin.freenode.net irc.freenode.net]
l_a_m has quit [leguin.freenode.net irc.freenode.net]
TaXules has quit [leguin.freenode.net irc.freenode.net]
seafood_ has quit [leguin.freenode.net irc.freenode.net]
flux has quit [leguin.freenode.net irc.freenode.net]
cmeme has quit [leguin.freenode.net irc.freenode.net]
gaja has quit [leguin.freenode.net irc.freenode.net]
Naked has joined #ocaml
TychoBrahe has joined #ocaml
seafood_ has joined #ocaml
l_a_m has joined #ocaml
gaja has joined #ocaml
TaXules has joined #ocaml
cmeme has joined #ocaml
flux has joined #ocaml
ozzloy has joined #ocaml
Demitar has quit [Read error: 110 (Connection timed out)]
aryx has quit [leguin.freenode.net irc.freenode.net]
unfo- has quit [leguin.freenode.net irc.freenode.net]
orbitz has quit [leguin.freenode.net irc.freenode.net]
shortcircuit has quit [leguin.freenode.net irc.freenode.net]
shortcircuit has joined #ocaml
aryx has joined #ocaml
orbitz has joined #ocaml
unfo- has joined #ocaml
love-pingoo has joined #ocaml
al-maisan has joined #ocaml
<palomer> Error while linking GUI.cmo: Reference to undefined global `Str' <--how do I fix this?
ozzloy has quit ["leaving"]
ozzloy has joined #ocaml
<pango_> add str.cma to the mix?
<palomer> oh, no caps
<palomer> I was adding Str.cma
<palomer> anyone know if lablgtk can display webpages?
|jeremiah has quit [Read error: 110 (Connection timed out)]
OChameau has joined #ocaml
Yoric[DT] has joined #ocaml
bluestorm has joined #ocaml
jdrake has joined #ocaml
rwmjones_ has quit ["Closed connection"]
rwmjones_ has joined #ocaml
bluestorm has quit [Remote closed the connection]
slumzy has quit [Connection timed out]
seafood_ has quit []
Mr_Awesome has quit ["aunt jemima is the devil!"]
seafood_ has joined #ocaml
seafood_ has quit []
<ulfdoz> This expression has type Lexing.lexbuf -> StatusParser.token
<ulfdoz> but is here used with type Lexing.lexbuf -> token
<ulfdoz> Ist there a way, to find out what exact type (fully qualified) has been inferred?
<ulfdoz> Tret einfach mal meiner Alten in ihren faulen Arsch.
<ulfdoz> ECHAN, sorry
Yoric[DT] has quit ["Ex-Chat"]
jdrake has quit [Read error: 113 (No route to host)]
<rwmjones_> ulfdoz, the "standard trick" is to cast the type to unit and have a look at the error message
<rwmjones_> eg:
<rwmjones_> let a = 1 ;;
<rwmjones_> (a : unit) ;;
<rwmjones_> would print
<rwmjones_> This expression has type int [the real type] but it here used with type unit
jlouis has joined #ocaml
<flux> when compiling stuff, I just compile type errors with failwith "" or assert false; then when it compiles, I can use emacs' C-c C-t to find out the inferred type
<mfp> I use -dtypes and a vim binding to get the type of an expression
rwmjones_ has quit ["Closed connection"]
<ulfdoz> The _really_ strange thing is: When I remove the function, where it fails to compile, StatusParser and StatusLexer compile both. Loading the in the interpreter gives compatible types.
<ulfdoz> hmkay, if I move the function to another module, it works.
ReinoDios is now known as DiosReino
DiosReino is now known as Immmortal
Yoric[DT] has joined #ocaml
al-maisan has quit [Read error: 113 (No route to host)]
seafood_ has joined #ocaml
seafood_ has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
r0bby has quit [Client Quit]
al-maisan has joined #ocaml
seafood__ has joined #ocaml
hkBst has joined #ocaml
seafood___ has joined #ocaml
al-maisan has quit [Read error: 113 (No route to host)]
seafood____ has joined #ocaml
seafood__ has quit [Connection timed out]
seafood_ has quit [Read error: 110 (Connection timed out)]
seafood___ has quit [Connection timed out]
al-maisan has joined #ocaml
al-maisan has quit [Read error: 104 (Connection reset by peer)]
al-maisan_ has joined #ocaml
al-maisan_ has quit [Client Quit]
al-maisan has joined #ocaml
netx has quit ["Leaving"]
netx has joined #ocaml
LordMetroid has joined #ocaml
bluestorm has joined #ocaml
postalchris has joined #ocaml
slumzy has joined #ocaml
Snark has joined #ocaml
al-maisan has quit [Read error: 113 (No route to host)]
al-maisan has joined #ocaml
seafood____ has quit []
slumzy has quit [Remote closed the connection]
middayc has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
postalchris has quit [Read error: 104 (Connection reset by peer)]
Axioplase has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
rodge has joined #ocaml
postalchris has joined #ocaml
Linktim has joined #ocaml
Axioplase has quit ["Lost terminal"]
Axioplase has joined #ocaml
<jonafan> hey i'm trying to compile this: http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html#htoc239 and i'm getting lots of missing float functions
Linktim_ has joined #ocaml
Yoric[DT] has joined #ocaml
Yoric_ has joined #ocaml
Yoric_ has quit [Client Quit]
OChameau has quit [Read error: 110 (Connection timed out)]
OChameau-bis has joined #ocaml
Linktim has quit [Connection timed out]
OChameau-bis has quit ["Leaving"]
OChameau-bis has joined #ocaml
al-maisan has quit ["Bye for now!"]
<struk_atwork> jonafan: maybe you need to add libm to your set of liink libraries
<struk_atwork> jonanfa: /usr/lib/libm.a or /usr/lib/libm.so are the usual locations of the c math lib
<jonafan> awesome
<jonafan> thanks
<struk_atwork> jonafan, so it worked?
<jonafan> yeah
<jonafan> i just added the .a file
<struk_atwork> jonafan, yeah don't know why that solution wasn't obvious to me yesterday when I saw your post.Btw, the .a is a static link reference
Linktim_ has quit [Remote closed the connection]
<jonafan> i'll be missing out on updates to cos and sin
Linktim has joined #ocaml
Linktim has quit [Read error: 104 (Connection reset by peer)]
<struk_atwork> jonafan, which of course are very active areas of research :)
<jonafan> hehe
<jonafan> okay cool, i figured out how to do a dynamic link
<jonafan> now i'm unstoppable
<struk_atwork> jonafan, nice. ok back to work for me. good luck
al-maisan has joined #ocaml
postalchris has quit [Read error: 113 (No route to host)]
postalchris has joined #ocaml
LordMetroid has quit [Remote closed the connection]
yziquel has joined #ocaml
LordMetroid has joined #ocaml
struk_atwork has quit ["Leaving"]
struk_atwork has joined #ocaml
lordmetroid_ has joined #ocaml
OChameau-bis has quit ["Leaving"]
LordMetroid has quit [Connection timed out]
Axioplase has quit [Read error: 104 (Connection reset by peer)]
Axioplase has joined #ocaml
lordmetroid__ has joined #ocaml
lordmetroid_ has quit [Connection timed out]
<jonafan> does anyone know anything about qt-caml?
<struk_atwork> jonafan, I'm a huge fan of the concept and I want to contribute to the project. However, haven't heard much from them on the mailing list yet
<jonafan> there's apparently nothing in their svn repository
<struk_atwork> jonafan, they have a paper that I've read multiple times though. it describes their plan in incremental stages
<jonafan> yeah i've got it open
<struk_atwork> jonafan, well i'm no expert on the project, but I do know as much as any outsider about it. so ask questions if you have any
<jonafan> it does seem like it would be awkward to create a binding for a C++ library... they talk about having to handle two different object systems and runtime systems
<struk_atwork> jonafan, I don't think it's all that bad. that always happen when you make bindings...just in varying difficulty
<jonafan> but i know there is a decent python qt binding. I wonder how they handle it.
<struk_atwork> jonafan, the qt-caml project is modeling their design on py-qt with one distinct feature: pattern matching rather than visitor-design pattern
middayc has quit [Read error: 104 (Connection reset by peer)]
<jonafan> well, good. at least they've got something to go off of
<jonafan> i'm actually kind of thinking about a similar and related project
<jonafan> qgis plugin bindings for ocaml
<jonafan> qgis is c++ and uses qt as well
<Smerdyakov> Both similar _and_ related? What are the chances!
<jonafan> haha
<struk_atwork> jonafan, qgis website seems to be down, will have to review it later
<jonafan> similar and related aren't synonyms
lordmetroid__ has quit [Connection timed out]
<jonafan> it's similar in that it involves wrapping a c++ library, and it's related in that i would like to use qt-caml for these plugins
<struk_atwork> jonafan, well I'm a big proponent of qt-caml, let's hope it gets some momentum this summer (even if I need to get my hands dirty for that to happen)
middayc has joined #ocaml
<jonafan> i'd like to help too, except i don't really know qt or the process of making bindings very well
<struk_atwork> jonafan, unfortunately I kind of do, hence why I feel obligated to contribute :/
<jonafan> i want to learn these things
<jonafan> qt c++ is even extra weird
al-maisan has quit ["Bye for now!"]
<bluestorm> jonafan: the runtime binding part is *quite* easy
<bluestorm> qt have runtime libraries with introspection (smoke) and the like
<bluestorm> the first difficulty is to translate the C++ headers into a meaningful ocaml library
<bluestorm> (and not an infamous low-level blob)
<bluestorm> and to do that mechanically
<palomer> but isn't the C++ header syntax straight forward to write in OCAMLyacc?
<bluestorm> hmm
<bluestorm> the parsing is not that difficult
<bluestorm> and Qt already has a parsing tool used for the other bindings (written in perl)
<struk_atwork> bluestorm, they seem particular concerned about managing resources and doing late binding properly.
<bluestorm> but you can't boldly translate the C++ class description into ocaml and except it will compile
<bluestorm> there is dependency handling and the like, that can make matters quite difficult
<palomer> I thought dependencies were handled by the #include directives
<palomer> as a side note, does anyone have a CFGrammar of HTML?
<Yoric[DT]> Nothing is straightforward when C++ is involved.
<bluestorm> have you eventually written something on your javascript work ?
<bluestorm> there was a "static analysis ..." call for paper on the mailing list recently
<palomer> and a job posting!
<Yoric[DT]> I wrote 16k lines of "something".
<Yoric[DT]> However, that "something" doesn't get anywhere yet.
<palomer> unfortunately, the job is in rennes
<Yoric[DT]> Especially since, in the meantime, my boss has foolishly signed a contract implying that we would work on static analysis of C.
<Yoric[DT]> ... without asking how difficult it was.
<palomer> oh my
<palomer> good luck
<Yoric[DT]> Well, the first prototype is almost ready for testing.
<Yoric[DT]> It's only missing a parser.
<palomer> cool, I'm writing a parser
<Yoric[DT]> I admit that I've been slacking away for the past few days (well, working on something else).
<palomer> is super exponential time good enough?
<Yoric[DT]> As usual, I'm nervous about reaching the testing stage.
<palomer> I'm actually writing a parser generator
<palomer> ugh.
r0bby has joined #ocaml
<Yoric[DT]> Only a one-year contract.
<Yoric[DT]> palomer: what kind ?
* Yoric[DT] is currently working on a parser combinator.
<palomer> something similar to GLR
<Yoric[DT]> ok
<palomer> but I'm skipping the lexing stage altogether
<Yoric[DT]> Why is that ?
<palomer> I've managed to figure out the LR algorithm without reading much about it!
<palomer> Yoric[DT], why would I need a lexing stage?
<palomer> one year is more than enough for me!
<palomer> I hate commitment
<Yoric[DT]> Well, I tend to assume that lexing
<Yoric[DT]> a) improves readability
<Yoric[DT]> b) improves speed
<palomer> my grammars are ambiguous
<palomer> I think that lexing would actually reduce speed
<Yoric[DT]> c) makes it easier to get rid of nuisances (whitespaces, comments, etc.)
<Yoric[DT]> Well, if surely decreases the size of the FSM.
<palomer> oh, there's going to be a minimum of tokenization, but that will be done during parsing
<Yoric[DT]> (by decoupling it into two FSMs)
<bluestorm> palomer: that job position had me thinking "hey, perhaps i could actually do that !", except that i'm not an engineer (and have no static analysis background)
<palomer> bluestorm, the static analysis background is optional
<Yoric[DT]> Now, the usual algorithm for GLR doesn't quite use FSMs, if I understand correctly, but relies on memoization instead, is that it ?
<bluestorm> i'm afraid the diploma are not
<palomer> according to wikipedia, it does have a LR stack, if that's what you mean by FSM
<jonafan> man, i know so little about lexing and parsing
<bluestorm> (what's the plural for diploma ? diplomas, diplomae, diplomai ?)
<palomer> bluestorm, yeah, you need a masters
<palomer> diplomas
<palomer> I have a masters and a background in static analysis!
<palomer> but I'm also starting a PhD in september
<bluestorm> it's only one year, and in brittany
<bluestorm> (apparently)
<palomer> Yoric[DT], you just copy the stack every time you have a conflict
<palomer> bluestorm, yeah, rennes
<palomer> that's the only drawback
<bluestorm> dinner time anyway
<Yoric[DT]> palomer: does it have unbounded stack ?
<Yoric[DT]> bluestorm: bon appétit.
<bluestorm> :)
<palomer> unbounded stack?
<palomer> what does that mean?
<Yoric[DT]> Your stack, how big is it ?
<palomer> my LR stack?
<palomer> as big as I want
<palomer> I'm thinking as big as the input
<Yoric[DT]> I mean, does it have a fixed size or does the size change during execution ?
<Yoric[DT]> Ok.
<Yoric[DT]> So you can't use a FSM anyway :)
<palomer> I plan to just push stuff on the stack and change states depending on what was last pushed
<Yoric[DT]> How do you handle left-recursion ?
<palomer> ok, let's look at a rule
<palomer> A = a | A a
<palomer> the state transition table will look something like so
<palomer> given that you're in state A , if you encounter an 'a' you return to state A
<palomer> if you have an a at the top of the stack, you can reduce it to A
<Yoric[DT]> A = aa | A a ?
<palomer> ok, now i have to states
<palomer> one I call {A} and one I call {a}
<palomer> if im in state A and an 'a' gets pushed, reduce and return to state A
<palomer> if im in {a} and an 'a' gets pushed, also reduce and return to state A
<palomer> that's a relatively obtuse article on it
<palomer> it took me about a year to understand the algorithm
<palomer> it's really simple, but NOONE explains it properly
<palomer> drove me nuts
<palomer> the moral of the story is: I don't think lexing is really even possible if I'm dealing with massively ambiguous grammars
<palomer> unless I don't have any regexps and I simply get stuff from the input stack one word at a time
<palomer> then I can lex ambiguously
<Yoric[DT]> Yeah, sometimes lexing is very impractical.
* Yoric[DT] remembers with fright JS's grammar.
<Yoric[DT]> /* may either be the beginning of a comment or of a regexp...
<palomer> bummer
<palomer> so my GLR will fix all that
<palomer> err GLR parser generator
<palomer> performance will probably suck though
<palomer> I forgot the start stack
<palomer> if you're in the start state {} and you encounter an 'a', go to stack {a}
<palomer> err, state {a}
l_a_m has quit [Remote closed the connection]
<palomer> anyways, another moral of the story is that LR parsers are really simple but really misunderstand
<palomer> in other news, there's a new dragon book out
<flux> palomer, have you taken a look at pacrat parsers, I suggested them to yoric[dt] too once ;)
bluestorm has quit ["Konversation terminated!"]
<palomer> flux, no left recursion
<palomer> also, other performance quirks
<palomer> and, like, noone knows about them or how they're different from CFGs
<Smerdyakov> palomer, you're saying "no one" knows that LR is a subset of CFG?
<Yoric[DT]> I believe palomer meant that there is no readily available material documenting the difference between GLR and Packrat.
<Yoric[DT]> (which sounds likely to me, because iirc packrat is a GLR algorithm, but I may be wrong)
<Smerdyakov> Packrat is for something different called "parsing expression grammars."
<Smerdyakov> Strict subset of CFG in terms of expressivity, or something like that.
<Smerdyakov> But manages to cover most all of what people actually use.
<palomer> Smerdyakov, I'm talking about packrat vs CFG
<palomer> "Unfortunately, the limited support for left recursion in packrat parser implementations makes them difficult to use for a large class of grammars" <-- small problem
<palomer> no left recursion = useless to me
<Smerdyakov> It's sort of a nil issue, since parsing is so cheap no matter how you do it.
<Smerdyakov> Might as well support CFGs in general.
<palomer> oh my, there's a new article out saying that they can support left recursion; sweet!
Snark has quit ["Ex-Chat"]
Demitar has joined #ocaml
aryx has quit ["Leaving."]
tty56 has joined #ocaml
middayc has quit []
jeremiah has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
jdrake has joined #ocaml
LordMetroid has joined #ocaml
LordMetroid has quit [Read error: 104 (Connection reset by peer)]
lordmetroid_ has joined #ocaml
lordmetroid_ is now known as LordMetroid
love-pingoo has quit ["Connection reset by pear"]
tty56 has quit []
rwmjones_ has joined #ocaml
rodge has left #ocaml []
hkBst has quit ["Konversation terminated!"]
tty56 has joined #ocaml
rwmjones_ has quit ["Closed connection"]
LordMetroid has quit [Read error: 110 (Connection timed out)]
Kopophex has joined #ocaml
postalchris has quit [Remote closed the connection]
postalchris has joined #ocaml