<maskd>
i know batteries is no stdlib either, but it has 'unique' and 'sort_unique'
ikaros has quit ["Leave the magic to Houdini"]
tmaedaZ is now known as tmaeda0
_unK has quit [Remote closed the connection]
tmaeda0 is now known as tmaedaZ
tmaedaZ is now known as tmaeda0
<orbitz>
Any suggestions for text parsing? I really dislike the lex/yacc look alike
<orbitz>
i guess PCL is supposed to be good
<Camarade_Tux>
Leonidas: yes ;-)
maskd has quit ["leaving"]
tmaeda0 is now known as tmaedaZ
tmaedaZ is now known as tmaeda0
valross has joined #ocaml
valross has quit [farmer.freenode.net irc.freenode.net]
M| has quit [farmer.freenode.net irc.freenode.net]
peper has quit [farmer.freenode.net irc.freenode.net]
fremo_ has quit [farmer.freenode.net irc.freenode.net]
ozzloy has quit [farmer.freenode.net irc.freenode.net]
diml has quit [farmer.freenode.net irc.freenode.net]
gildor has quit [farmer.freenode.net irc.freenode.net]
infoe_ has quit [farmer.freenode.net irc.freenode.net]
WuJiang_ has quit [farmer.freenode.net irc.freenode.net]
Tianon has quit [farmer.freenode.net irc.freenode.net]
smimram has quit [farmer.freenode.net irc.freenode.net]
prigaux_ has quit [farmer.freenode.net irc.freenode.net]
bzzbzz has quit [farmer.freenode.net irc.freenode.net]
willb has quit [farmer.freenode.net irc.freenode.net]
WuJiang_ has joined #ocaml
Tianon has joined #ocaml
smimram has joined #ocaml
willb has joined #ocaml
bzzbzz has joined #ocaml
prigaux_ has joined #ocaml
valross has joined #ocaml
M| has joined #ocaml
peper has joined #ocaml
ozzloy has joined #ocaml
fremo_ has joined #ocaml
infoe_ has joined #ocaml
gildor has joined #ocaml
diml has joined #ocaml
yakischloba has joined #ocaml
yakischloba has quit ["Leaving."]
arquebus has joined #ocaml
jeddhaberstro has quit [Client Quit]
arquebus has left #ocaml []
joewilliams has joined #ocaml
joewilliams has quit ["Leaving..."]
joewilliams has joined #ocaml
CcSsNET has quit [Read error: 110 (Connection timed out)]
BigJ has joined #ocaml
jorgenpt has left #ocaml []
joewilliams has quit [Remote closed the connection]
thrasibule has quit [Read error: 110 (Connection timed out)]
onigiri_ has quit []
yakischloba has joined #ocaml
_zack has joined #ocaml
yakischloba has quit ["Leaving."]
Yoric has joined #ocaml
ttamttam has joined #ocaml
ttamttam has quit ["Leaving."]
avsm has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
avsm has quit ["Leaving."]
flux has quit [Remote closed the connection]
ttamttam has joined #ocaml
Yoric has quit []
<det>
orbitz, I recently wrote a lexer myself and then used parser combinators
rwmjones_lptp has joined #ocaml
<det>
orbitz, parser combinators are very similar to ocamlyacc, with a bit heavier syntax
rwmjones_lptp is now known as rwmjones
ygrek has joined #ocaml
flux has joined #ocaml
fx___ has joined #ocaml
fx___ has quit [Client Quit]
fx___ has joined #ocaml
joewilliams has joined #ocaml
Pimm has joined #ocaml
ikaros has joined #ocaml
Yoric has joined #ocaml
_zack has quit ["Leaving."]
tmaeda0 is now known as tmaedaZ
_andre has joined #ocaml
rwmjones has quit ["This computer has gone to sleep"]
rwmjones_lptp has joined #ocaml
avsm has joined #ocaml
_unK has joined #ocaml
ygrek has quit [Remote closed the connection]
valross has quit ["Ex-Chat"]
ygrek has joined #ocaml
maskd has joined #ocaml
rwmjones_lptp has quit ["This computer has gone to sleep"]
rwmjones_lptp has joined #ocaml
_zack has joined #ocaml
ikaros has quit [Remote closed the connection]
_zack has quit [Read error: 60 (Operation timed out)]
_unK has quit [Remote closed the connection]
<Leonidas>
sgnb: I tried, but ocamlfind only installs into /usr/lib/ocaml/site-lib/stublibs and not it /usr/lib/ocaml/stublibs. And the former is not in the ld.conf
<Leonidas>
(and I'm not sure whether it is a good idea to create it either, since it modifies the behaviour of ocamlfind globally and cound break other package builds)
Pimm has quit [Read error: 104 (Connection reset by peer)]
Pimm has joined #ocaml
pimm_ has joined #ocaml
Camarade_Tux has quit [Remote closed the connection]
Asmadeus has quit [Remote closed the connection]
<Leonidas>
sgnb: So, I installed into /usr/lib/ocaml/ but ocamlfind cannot find it as it only searches in site-lib. Any ideas?
<sgnb>
Leonidas: /usr/lib/ocaml/site-lib/stublibs should be added to ld.conf
pimm_ has quit ["Ik ga weg"]
<sgnb>
(or wherever ocamlfind install tries to install stub libs)
hyperboreean has quit [Read error: 110 (Connection timed out)]
<Leonidas>
sgnb: so I do need a preinstall-script after all.
<sgnb>
Leonidas: this should be done in the ocaml package
<sgnb>
(or the findlib one)
<Leonidas>
or I need to annoy the ocaml maintainers so they'll add it themselves :)
<sgnb>
once and for all
<sgnb>
Leonidas: are you making official packages? or just installing something from sources?
<Leonidas>
sgnb: I'm making semi-official packages ("AUR" - it is a bit like a staging area for later inclusion into the community repository)
<sgnb>
then you should probably put your stublibs in /usr/lib/ocaml/stublibs
<sgnb>
actually, it's a matter of policy
<sgnb>
in Debian, all package-provided libs are in /usr/lib/ocaml
<Leonidas>
sgnb: this is what i'm doing now, but ocamlfind can't find the remaining files.
<sgnb>
and we make thinks so that ocamlfind install called manually installs to /usr/local/lib
<Leonidas>
sgnb: why not install debian-provided packages to /usr/lib/ocaml/site-lib like the Python packagers do?
munga has joined #ocaml
<Leonidas>
this is unfortunate. I'd need to install the lib to /usr/lib/ocaml/stublibs and the other files to /usr/lib/ocaml/site-lib for it to work out of the box
tmaedaZ is now known as tmaeda0
<mrvn>
Puting them all in /usr/lib/ocaml/ is simpler and works
<Leonidas>
mrvn: except that ocamlfind can't find them there by default.
<mrvn>
Leonidas: Look at the sha package for example. That has normal stublib files.
<mrvn>
/usr/lib/ocaml/stublibs/dllsha.so and /usr/lib/ocaml/sha/
<mrvn>
and I don't remember that doing anything special to get that result.
Camarade1Tux has joined #ocaml
<Leonidas>
mrvn: what system are you using?
<sgnb>
Leonidas: I would say it's a problem in ocamlfind
<mrvn>
Leonidas: debian
<Leonidas>
sgnb: might be the case, I guess it would be easiest if ocamlfind would look in /usr/lib/ocaml too.
* Leonidas
boots up his other laptop to check the ocamlfind settings
<Leonidas>
(on debian)
joewilliams has quit [Read error: 113 (No route to host)]
<sgnb>
Leonidas: python guy seem to put their stuff in /usr/{lib,share}/pyshared/<name>
<sgnb>
this is not that much different
<sgnb>
(but I don't know much about python policy)
Camarade1Tux is now known as Camarade_Tux
<Leonidas>
hmm, yep the ocamlfind settings look much saner on debian
<mrvn>
well, it is Debian.
<sgnb>
:-D
<Leonidas>
^^
<Leonidas>
arch packages seem to prefer site-lib
<mrvn>
isn't site-lib compiled locally?
<Leonidas>
mrvn: arch linux is both source and binary distro, so it does not make that much sense to distinguish.
<Leonidas>
but the caml-zip package uses this folder
<Leonidas>
and they add it to ld.conf
<Leonidas>
sometimes I really hate this arch packaging chaos.
<sgnb>
Leonidas: you should write a policy for OCaml libraries
thrasibule has quit [Read error: 110 (Connection timed out)]
demitar has joined #ocaml
_unK has joined #ocaml
itewsh has joined #ocaml
joewilliams has joined #ocaml
emias has quit [":wq"]
<avsm>
why do you need the || return 1 ?
Alpounet has quit ["Quitte"]
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
Ori_B_ is now known as Ori_B
Alpounet has joined #ocaml
_zack has quit ["Leaving."]
emias has joined #ocaml
avsm has quit ["Leaving."]
ttamttam has quit ["Leaving."]
yakischloba has joined #ocaml
ikaros has joined #ocaml
Yoric has quit []
tmaeda0 is now known as tmaedaZ
joewilliams has quit [Remote closed the connection]
_zack has joined #ocaml
joewilliams has joined #ocaml
fx___ has quit [Read error: 60 (Operation timed out)]
ikaros has quit ["Leave the magic to Houdini"]
infoe has joined #ocaml
_zack has quit ["Leaving."]
ttamttam has joined #ocaml
<thelema>
hmm, trying a local install of ocaml on our computing cluster, I get a message that ocamlbuild.cmx can't be found...
<thelema>
which isn't in lib/ocaml/ocamlbuild like it should be.
* thelema
checks if it was built at all
<thelema>
odd... I did a [opt.opt], and it's now telling me it installed it.
<thelema>
err, [make opt.opt]
ulfdoz has joined #ocaml
Pimm has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
_andre has quit ["*puff*"]
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Remote closed the connection]
Yoric has joined #ocaml
<thelema>
* Goal: Introduce Drumbeat to the world. Build compelling projects and vibrant community.
<thelema>
oops, let's try pasting right...
<thelema>
hmm, can't copy from that term...
Submarine has joined #ocaml
<thelema>
short version: undefined reference to caml_sync in camlOmake_exec__28 when compiling Omake
<thelema>
ah, wierd bug in latest release... :(
<thelema>
but as the last release was in Aug, 2007...
<thelema>
at least it's fixed in the SVN, reportedly
joewilliams has quit [Remote closed the connection]
joewilliams has joined #ocaml
babalu has joined #ocaml
<babalu>
hello, i'm looking for ocaml binding for Qt; i've found http://qt-caml.crapulion.org/trac; does someone know about it? for which version of Qt is it?
<thelema>
babalu: ocaml/qt is... not really available/usable
<thelema>
is there a reason you need to use QT?
<babalu>
thelema: for now i don't have a project in mind, but i like Qt, and i like ocaml :D
<thelema>
Well, you're welcome to work in this direction, but know that there are not complete bindings to Qt in OCaml.
<babalu>
thelema: what would you use to make a graphic interface in ocaml?
<thelema>
Some projects have tried to automatically produce bindings
<thelema>
but the consensus is that they just need to be done one at a time by hand.
<thelema>
I've used lablgtk2 for my GUI needs
<babalu>
i guess i'll have to use that too; but what about the website above?
<flux>
I'd also like to have qt-bindings for ocaml, because that's the way the maemo platform is going. too bad the project seems dead, now that the library itself is lgpl too :/
<thelema>
well, something in the source changed 7 months ago, so it's not particularly active. I don't think it's particularly complete.
<thelema>
but be free to try it out.
<babalu>
hm
<babalu>
and what's the problem with automatic generation?
ygrek has joined #ocaml
<thelema>
something with function argument types
<thelema>
I don't recall the details
_unK has quit ["Konversation terminated!"]
_unK has joined #ocaml
_unK has quit [Remote closed the connection]
_unK has joined #ocaml
maskd- has joined #ocaml
maskd has quit [Read error: 104 (Connection reset by peer)]
maskd- is now known as maskd
hyperboreean has joined #ocaml
Modius has joined #ocaml
ofaurax has joined #ocaml
kotrin has joined #ocaml
slash_ has joined #ocaml
ttamttam has quit ["Leaving."]
flux has quit [Remote closed the connection]
ulfdoz has quit [Read error: 60 (Operation timed out)]
pad has joined #ocaml
ygrek has quit [Remote closed the connection]
<Leonidas>
babalu: I think I saw a qt binding somewhere on github
<Leonidas>
oh no, that wasn't for ocaml but for scheme. sorry.
pad has quit [Remote closed the connection]
babalu has quit [Read error: 113 (No route to host)]
Yoric has quit []
optiz0r has joined #ocaml
<optiz0r>
Good evening. I'm hoping someone might be able to help me with a hopefully simple bit of code: http://pastebin.com/m11adacbf What I'm trying to do is read in a single character from stdin, and match what character was typed to return a specific result. What I've got at the moment always hits the default pattern. Could anyone point where I've gone wrong? thanks :)
slash_ has quit [Client Quit]
rwmjones_lptp_ has joined #ocaml
rwmjones_lptp has quit [Read error: 101 (Network is unreachable)]
Yoric has joined #ocaml
ikaros has quit ["Leave the magic to Houdini"]
<julm>
optiz0r: could it be that your stdin has some garbage in it? i.e. no
<julm>
't' 'f' or '0' ?
<det>
optiz0r, use input_char ?
<optiz0r>
julm: when I run the code, the program waits for my input, I type one of those characters and hit enter. stdin should contain t, f or 0, possibly followed by a newline. I'm new to ocaml, I haven't worked out how it behaves in a lot of situations yet
<optiz0r>
det: will look it up now
<det>
match input_char stdin with ...
<det>
optiz0r, you asked yesterday about writing a parser
<det>
optiz0r, you probably dont want to use pattern matching on characters to do this
<det>
and I made a small library for lexing and am using parser combinators on the tokens
Submarine has quit ["Leaving"]
<det>
ocamlyacc is probably best for you
<det>
with ocamllexx
<optiz0r>
This is actually part of a a parser already, The alternative is to figure out how to reinvoke the parser to parse a string from the command line. but that seems like a lot more effort than it's worth, just to tick the last box for this piece of coursework :)
<optiz0r>
I'm not sure the lecturer realised the complexity of what he was asking when he set it
<det>
im pretty sure ocamllex can work on a string as input
<optiz0r>
I checked that out, it can
<det>
regular expression is so much easier for a lexer than matching on characters
<optiz0r>
There's no hidden complexity here btw, I have't oversimplified the code I pasted. That's all I really need to match. just t, f or zero. Setting up a lexer/parser doesn't really seem worth it. Although if it is easy enough to do, it would let me parse the entire language, rather than just grabbing those three values
<optiz0r>
let me paste the main function which invokes this parser
<optiz0r>
I know it's reading the character properly if I printf "char: %c" c; just before the match
<optiz0r>
but even though it passes visual inspection, it still triggers the whildcard pattern
<det>
Do you really have no indentation ?
<det>
you should use a less sucky pastebin
<det>
that one is near unreadable
<optiz0r>
the |nopaste command messed it up, I was being lazy
<optiz0r>
Want me to repaste senisbly?
<det>
yes
<optiz0r>
http://pastebin.com/m7b4e7956 that's the main.ml file, which triggers the parser initially. My input_char code runs when evaluating a specific node in the AST
<det>
I cant imagine it is printing '0' 'f' 't' or '\n' and not matching
<optiz0r>
either nothing, or nonprintable
<det>
...
<det>
you said it was printing an input that should have matched
<optiz0r>
is my "let c = input_char stdin in (printf foo" correct?
<det>
looks fine, yes
<optiz0r>
I've seen it print the correct character after using scanf, I must have had a slightly different piece of code when I did. I've been playing around with this for a couple of hours
<det>
indentation is off on the | _
<det>
and I find it easier to read when you use | on the first case as well
<det>
but that is just stylistic
<det>
and maybe use begin/end instead of parens
ofaurax has quit ["whereis mybed"]
<optiz0r>
ah, it's matching the newline
Yoric has quit []
<optiz0r>
`scanf "%c%c" (fun p nl -> p)` seems to have done the trick