<darkf>
what's the best parsing library/tool for OCaml?
contempt has quit [Ping timeout: 264 seconds]
gnuvince has joined #ocaml
contempt has joined #ocaml
<hongboz>
darkf: try menhir, but I don't think it's the best
<hongboz>
it is easiest to learn
ulfdoz has quit [Read error: Operation timed out]
ulfdoz has joined #ocaml
ahokaomaeha has joined #ocaml
GonzoChurch has joined #ocaml
q66 has quit [Quit: Quit]
hongboz has quit [Ping timeout: 256 seconds]
tac-tics has quit [Ping timeout: 245 seconds]
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
ahokaomaeha has quit [Ping timeout: 255 seconds]
leoncamel has joined #ocaml
sivoais has quit [Remote host closed the connection]
sivoais has joined #ocaml
ahokaomaeha has joined #ocaml
tac has joined #ocaml
darinmorrison has quit []
<darkf>
Anyone know how to get basic error reporting from ocamlyacc? Something like "Error at line %d:%d: Expected ..." ?
leoncamel has quit [Ping timeout: 251 seconds]
ahokaomaeha has quit [Ping timeout: 276 seconds]
ahokaomaeha has joined #ocaml
ahokaomaeha has quit [Client Quit]
tac has quit [Ping timeout: 245 seconds]
mye has quit [Quit: mye]
oriba_ has quit [Quit: oriba_]
ivan\ has quit [Ping timeout: 260 seconds]
tac has joined #ocaml
ivan\ has joined #ocaml
<flux>
companion_cube, I don't think Streams are supposed to work that way. I suppose it might work in your use, though.
yacks has quit [Ping timeout: 255 seconds]
yacks has joined #ocaml
fayden has quit [Quit: Bye]
cdidd has joined #ocaml
fayden has joined #ocaml
fayden has quit [Client Quit]
fayden has joined #ocaml
tac has quit [Quit: Page closed]
Yoric has joined #ocaml
dabd has quit [Ping timeout: 245 seconds]
thomasga has joined #ocaml
yacks has quit [Ping timeout: 256 seconds]
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
yacks has joined #ocaml
fasta_ is now known as fasta
ontologiae has joined #ocaml
djcoin has joined #ocaml
thomasga has quit [Quit: Leaving.]
yacks has quit [Quit: Leaving]
anderse has joined #ocaml
ontologiae has quit [Ping timeout: 244 seconds]
adotbrown has quit [Ping timeout: 252 seconds]
mika1 has joined #ocaml
cago has joined #ocaml
Kakadu has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
Snark has joined #ocaml
yacks has joined #ocaml
thomasga has joined #ocaml
Kakadu_ has joined #ocaml
thomasga has quit [Ping timeout: 256 seconds]
thomasga has joined #ocaml
Kakadu has quit [Remote host closed the connection]
Kakadu has joined #ocaml
yacks has quit [Ping timeout: 260 seconds]
tic has joined #ocaml
tic has quit [Client Quit]
ottbot has joined #ocaml
anderse has quit [Quit: anderse]
ftrvxmtrx_ has joined #ocaml
<djcoin>
Is there a list of database (all kind, sql or nosql -graph, key/value etc.-) made in OCaml (or maybe haskell) ? Sometimes I'm tired to see all those new databases in java :) I saw arakoon recently a new key/value store, seems interesting.
yacks has joined #ocaml
<djcoin>
(Well there is also erlang that has maybe more databases - riak etc. -) Just being curious
Yoric has joined #ocaml
Kakadu_ has quit [Quit: Page closed]
anderse has joined #ocaml
mcclurmc has quit [Ping timeout: 240 seconds]
Kakadu has quit [Read error: Connection reset by peer]
adotbrown has joined #ocaml
GonzoChurch has quit [Quit: Leaving]
chambart has joined #ocaml
ontologiae has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
chambart has quit [Ping timeout: 246 seconds]
<orbitz>
djcoin: I'm not aware of any list. I'm also not aware of Ocaml being a big player in the DB impl world
<flux>
djcoin, in principle caml hump could have such a list, but I doubt it's up-to-date
<companion_cube>
the future is the opam package list!
tane has joined #ocaml
yacks has quit [Quit: Leaving]
<adrien>
definitely not =]
<adrien>
the hump is maintained by a human who will collect more than what is packaged
adotbrown has quit [Ping timeout: 256 seconds]
ollehar has joined #ocaml
<flux>
maybe a human could package stuff :)
<flux>
but at much more effort..
<adrien>
:-)
<adrien>
and Maxence Guesdon already spends quite a lot of time on that
yacks has joined #ocaml
hkBst has quit [Ping timeout: 256 seconds]
ocp has joined #ocaml
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
mcclurmc has joined #ocaml
<avsm>
djcoin: arakoon.org
<avsm>
is very good, if you need a consistent k/v store
Kakadu has joined #ocaml
<Kakadu>
can somebody try to install tyxml 2.2.0 for ocaml 4.00.1 using opam? Does your error log looks like this one: http://paste.in.ua/8021/raw/ ?
<avsm>
Kakadu: works fine in opam jenkins from a clean ocaml 4.00.1 chroot
<Kakadu>
TT
<djcoin>
avsm: yeah I mentionned it. I hope it gains traction, as data is very sensible, using a rather unknow database is a bit frightening. But it's great :)
chambart has joined #ocaml
<Kakadu>
Can I override default location ~/.opam when I call `opam init`?
Snark has quit [Ping timeout: 246 seconds]
<Kakadu>
I can't find this information in `opam help init`
<avsm>
it's a global command, in 'opam help'
<avsm>
-r or --root
<avsm>
or set OPAMROOT
ftrvxmtrx has quit [Ping timeout: 256 seconds]
<Kakadu>
thanks
dwmw2_gone is now known as dwmw2
chambart has quit [Ping timeout: 272 seconds]
hkBst has quit [Ping timeout: 272 seconds]
<Kakadu>
TT. On another machine tyxml succeeded to install
hkBst has joined #ocaml
<Kakadu>
heh. It seems that while installing tyxml opam uses system ocamlducefind
ftrvxmtrx has joined #ocaml
chambart has joined #ocaml
yacks has quit [Remote host closed the connection]
hkBst has quit [Ping timeout: 260 seconds]
tane has quit [Quit: Verlassend]
hkBst has joined #ocaml
q66 has joined #ocaml
hkBst has quit [Ping timeout: 260 seconds]
Snark has joined #ocaml
mk270 has left #ocaml []
ottbot has quit [Quit: WeeChat 0.4.0]
ottbot has joined #ocaml
ollehar has quit [Quit: ollehar]
hkBst_ has joined #ocaml
hkBst__ has joined #ocaml
hkBst_ has quit [Ping timeout: 255 seconds]
hkBst__ has quit [Ping timeout: 245 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
dwmw2 is now known as dwmw2_gone
ottbot has quit [Ping timeout: 252 seconds]
anderse has quit [Quit: anderse]
cross_ has quit [Quit: leaving]
chattered has joined #ocaml
cross has joined #ocaml
anderse has joined #ocaml
tane has joined #ocaml
ftrvxmtrx_ has quit [Quit: Leaving]
ftrvxmtrx_ has joined #ocaml
chattered has quit [Remote host closed the connection]
Anarchos has joined #ocaml
tane has quit [Quit: Verlassend]
fasta_ has joined #ocaml
fasta has quit [Ping timeout: 264 seconds]
vpm has quit [Excess Flood]
vpm has joined #ocaml
mye has joined #ocaml
tane has joined #ocaml
mattrepl has joined #ocaml
mattrepl has quit [Client Quit]
Kakadu has quit [Ping timeout: 245 seconds]
yacks has joined #ocaml
Kakadu has joined #ocaml
watermind has joined #ocaml
hkBst has quit [Ping timeout: 256 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
fogus has joined #ocaml
<fogus>
I can run whatever intermecdiate OS makes this most straightforward.
<mfp>
the above paste shows that finalizers registed with Gc.finalise (which is used internally by Lwt_gc.finalise) can run, as expected, in any thread (not only the main one)
<mfp>
... which means code in the Lwt monad running concurrently with the main thread and breakage ?
mye has quit [Ping timeout: 244 seconds]
cross has joined #ocaml
hkBst has quit [Ping timeout: 252 seconds]
hkBst has joined #ocaml
Kakadu has quit [Quit: Page closed]
travisbrady has quit [Quit: travisbrady]
dabd has joined #ocaml
trep is now known as sysop_fb
travisbrady has joined #ocaml
hkBst has quit [Ping timeout: 272 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
ocp has quit [Ping timeout: 255 seconds]
mye has joined #ocaml
mye_ has joined #ocaml
mye has quit [Ping timeout: 260 seconds]
mye_ is now known as mye
S11001001 has joined #ocaml
S11001001 has quit [Changing host]
S11001001 has joined #ocaml
ahokaomaeha has joined #ocaml
yacks has quit [Ping timeout: 240 seconds]
smondet has joined #ocaml
tac has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 260 seconds]
tlockney has quit [Excess Flood]
tlockney has joined #ocaml
ahokaomaeha has quit [Read error: Connection reset by peer]
yacks has joined #ocaml
jamii has joined #ocaml
ftrvxmtrx has joined #ocaml
hkBst has quit [Quit: Konversation terminated!]
thomasga has quit [Quit: Leaving.]
dwmw2_gone is now known as dwmw2
jamii has quit [Ping timeout: 260 seconds]
mcclurmc has quit [Read error: Operation timed out]
mika1 has quit [Quit: Leaving.]
cago has left #ocaml []
ahokaomaeha has joined #ocaml
Cyanure has joined #ocaml
osa1 has joined #ocaml
lusory has joined #ocaml
mcclurmc has joined #ocaml
tlockney has quit [Excess Flood]
<Reventlov>
Hello. Any idea on how to store a Num in binary ?
tlockney has joined #ocaml
tlockney has quit [Excess Flood]
tlockney has joined #ocaml
ontologiae has quit [Ping timeout: 260 seconds]
mye has quit [Ping timeout: 248 seconds]
<orbitz>
Reventlov: what do you mean 'store a num in binary'?
<orbitz>
you want to convert it to a string where every byte represents a 1 or 0?
<Reventlov>
yes.
<Reventlov>
but, well, i don't want to use ascii
<orbitz>
so what do you want?
<Reventlov>
I want a binary representation of the numerator/denominator
<orbitz>
does Num store ratios?
<orbitz>
I still don't know what 'bianry representation' means beyond what I just said
<Reventlov>
well, 12345
<orbitz>
what are you trying to accomplish?
<Reventlov>
12 to binary -> 1100
q66 has quit [Quit: Quit]
<S11001001>
Reventlov: what about -12?
<Reventlov>
I have only positive num
<Reventlov>
(in [0,1])
<orbitz>
Reventlov: yes but how do you want to represent tha? a sequenc eof bytes where each byte represents a '0' or '1'?
<orbitz>
Reventlov: so floats or integers?
<Reventlov>
orbitz: yes
<thelema>
num stores ratios
<Reventlov>
the num I want to convert are in [0,1]
<Reventlov>
not in {0,1}
<orbitz>
(although shouldn't soemone be usign zarith these days?)
<thelema>
yes, zarith is better, but num is included already
<orbitz>
Reventlov: 12 isn't in [0, 1]
<Reventlov>
orbitz: it was an examble.
<orbitz>
:)
<Reventlov>
example*
<thelema>
Reventlov: how many bits do you want to use to store the numerator and denominator?
<Reventlov>
thelema: enough
<Reventlov>
orbitz: 12/13 in in [0,1]
<orbitz>
indeed it is
<orbitz>
does Num expose the numerator an denominator?
<thelema>
Reventlov: when reading back, how will you know that you've read "enough"?
<Reventlov>
orbitz: the string format of num is
<Reventlov>
<num numerator/denominator>
<Reventlov>
thelema: well, when I get the '/' character, it is enough.
<thelema>
Reventlov: how is / any different from just more numerator bits?
<orbitz>
i think he wants to store '0' and '1'
<thelema>
if you want binary string representations of numerator and denominator...
<thelema>
hmm, afaict, Num doesn't expose the numerator and denominator other than through string_of_num
<orbitz>
yeah, poking around the docs doesn't seem like you can actually get access to the ratio unless you do some things you probably shouldn't
<Anarchos>
Is it possible to force ocaml to throw an overflow when you do something like 1+max_int ?
<thelema>
Anarchos: no
<thelema>
Anarchos: best is to use batteries' Safe_int (in Int module)
<orbitz>
is Ada the only language that gets this fixed size integer overflow thign right?
<orbitz>
i susepct more to do with them not guarnteeing ratio, i doubt it matter sfor Reventlov
<adrien>
well, should not be called directly :P
<adrien>
it's written in the file but I doubt you can do any harm by only reading from values
<orbitz>
will namespaces fix this 'internal API' issue a lot of languages, including ocaml, have?
<thelema>
orbitz: probably not; the intent of this "internal api" stuff is to have private/protected functions
<Reventlov>
well
<Reventlov>
I'll use this algorithm I guess:
<Reventlov>
the first binary character represent 1/2
<Reventlov>
the second, 1/4, etc…
<Reventlov>
since the Num i want to encode are in [0,1], it will do the job
ftrvxmtrx has quit [Quit: Leaving]
<thelema>
Reventlov: how to encode 1/3? the expansion is infinite
<orbitz>
thelema: what do you mean intent? I'm talking more about how sometimes you want to only expsoe certain functions in a collection to the outside world but they should be able to call each other
<thelema>
Reventlov: I recommend using the numerator/denominator_ratio functions and then possibly BatBig_int's to_string_in_binary (or roll your own)
ftrvxmtrx has joined #ocaml
tlockney has quit [Excess Flood]
<thelema>
orbitz: AFAIK, namespaces only solve the problem of identifier collision. And might help with the problem of package management
<orbitz>
ok
tlockney has joined #ocaml
bobry has quit [Read error: Operation timed out]
lopex has quit [Read error: Operation timed out]
ttamttam has joined #ocaml
sivoais has quit [Quit: leaving]
sivoais has joined #ocaml
travisbrady has quit [Quit: travisbrady]
mye has joined #ocaml
<Reventlov>
window 28
<Reventlov>
miss
anderse has quit [Quit: anderse]
ahokaomaeha has quit [Ping timeout: 240 seconds]
ttamttam has quit [Remote host closed the connection]
chambart has quit [Ping timeout: 272 seconds]
yacks has quit [Quit: Leaving]
ahokaomaeha has joined #ocaml
fogus has quit [Ping timeout: 245 seconds]
mattrepl has joined #ocaml
mye has quit [Ping timeout: 252 seconds]
tlockney has quit [Excess Flood]
tlockney has joined #ocaml
ontologiae has joined #ocaml
mcsquiggedy has joined #ocaml
ahokaomaeha has quit [Ping timeout: 252 seconds]
ocp has joined #ocaml
travisbrady has joined #ocaml
srcerer has quit [Ping timeout: 248 seconds]
q66 has joined #ocaml
ollehar has joined #ocaml
mye_ has joined #ocaml
anderse has joined #ocaml
<orbitz>
Hello
q66 has quit [Quit: Quit]
travisbrady has quit [Quit: travisbrady]
lopex has joined #ocaml
oriba has joined #ocaml
bobry has joined #ocaml
q66 has joined #ocaml
mcsquiggedy has quit [Ping timeout: 252 seconds]
ontologiae has quit [Ping timeout: 260 seconds]
q66 has quit [Quit: Quit]
travisbrady has joined #ocaml
myx has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
mcsquiggedy has joined #ocaml
mattrepl has quit [Quit: mattrepl]
mattrepl has joined #ocaml
smondet has quit [Ping timeout: 272 seconds]
chambart has joined #ocaml
q66 has joined #ocaml
q66 has quit [Quit: Quit]
q66 has joined #ocaml
ollehar has quit [Ping timeout: 252 seconds]
mattrepl_ has joined #ocaml
mattrepl has quit [Ping timeout: 248 seconds]
mattrepl_ is now known as mattrepl
Cyanure has quit [Remote host closed the connection]
darinmorrison has joined #ocaml
mattrepl has quit [Quit: mattrepl]
chambart has quit [Ping timeout: 246 seconds]
Snark has quit [Quit: Quitte]
thomasga has joined #ocaml
<orbitz>
ohh i'm so close on this monad thingy
q66 has quit [Quit: Quit]
<tac>
monads D:
adotbrown has joined #ocaml
ocp has quit [Read error: Operation timed out]
tane has quit [Quit: Verlassend]
<orbitz>
implementing my first
<jonafan>
how do i convert a Js.t to a typed value in js_of_ocaml?
<thelema>
jonafan: like float_of_number, but for any kind of value?
<jonafan>
yes
<thelema>
so you want some function that has type 'a Js.t -> 'a?
<jonafan>
no, i want to add type checking to javascript
<jonafan>
for me, there is no point to js_of_ocaml if it's just an awkward way to write a js file
<thelema>
many here would say that ocaml isn't awkward
ahokaomaeha has joined #ocaml
<jonafan>
ocaml is not what makes that awkward
q66 has joined #ocaml
<jonafan>
i've made a class type that represents the type of the object, but it doesn't actually let me use the value with that class type
<djcoin>
I'm sorry jonafan I can't help you because I did not started yet to look at js_of_ocaml, but i'm pretty much interested in it for the type safety of course. I'm curious, what are you developping, and maybe what motivated your choice for choosing ocaml to generate javascript ?
<jonafan>
i'm just trying to learn how to use js_of_ocaml best
<jonafan>
i'm trying to port an example from the openlayers (a js lib i use a lot) website to ocaml
<thelema>
jonafan: this is a tedious thing, mapping a dynamically typed language to a statically typed language, as each value in the dynamic language needs to have an explicit tag in the static one.
<jonafan>
more tedious than debugging a language that doesn't do compile time or runtime type checking?
<jonafan>
that's what i'm trying to find out
<djcoin>
jonafan: ahah, one of my main idea is very similar to yours: port leaflet (cartography javascript lib too)
<thelema>
I don't know how much of the work has been done by the js_of_ocaml people, possibly sufficient that it should be easy to do what you want, but I can't find the ('a Js.t -> 'a) function, or rather the function to call methods on a 'a Js.meth
<jonafan>
i think i'm going to try doing the same thing with dart and typescript to see which one works best, but i went for ocaml first
<ousado>
jonafan: check out haxe
<ousado>
jonafan: if you don't want to use js_of_ocaml, that is
<jonafan>
it has to interface with exist js libs
<ousado>
well, you need to write down parts of the API as externs for any statically typed language
<thelema>
jonafan: ah, there's a syntax extension to make calling methods safe
<jonafan>
obviously the boogers method at the bottom is not a real method
<thelema>
Js.Unsafe.variable
<thelema>
that looks like the cause of the problem, not ##
<jonafan>
that's how the docs say to do it
<thelema>
if you want type safety, you'll have to specify the full type of openlayersmapconstr when it's declared
<thelema>
let openlayersmapcontr : ... Js.t = ...
<djcoin>
jonafan: have you a github repo or something so I could see how you manipulate some cartography library from ocaml ? I would be interested by anyone doing so
<thelema>
or access it directly instead of through a clearly-marked-unsafe abstraction
anderse has quit [Quit: anderse]
<jonafan>
i don't know cartography
<djcoin>
i mean, like openlayers
<jonafan>
oh right, cartography!
<jonafan>
thelema: aren't i doing that though
<jonafan>
with the mli file
<thelema>
the .mli file is only for external access to values defined in the .ml file
<jonafan>
if i add a type to the ml file, it says it expected type 'a12112916 Js.t Js.constr
<jonafan>
this is ... not a type i am familiar with
<jonafan>
i don't know how else to access a js value, other than Js.Unsafe.variable
<thelema>
you're not trying to access a js value, you're trying to access an ocaml value
<thelema>
and I dunno what's up with that type either.
<jonafan>
no i think i'm trying to get a js value
<jonafan>
OpenLayers.Map
<thelema>
ah, I misunderstood the class type...
<thelema>
you're right.
<mfp>
jonafan: I believe you need to annotate the type in the .ml, as in let openlayersmapconstr : (unit -> openlayersmapclass t) constr = Js.Unsafe.variable "OpenLayers.Map"
<jonafan>
i guess i could make an ocaml object that actually wraps the js object at runtime
<jonafan>
then i only have to get the runtime method calls correct in one place
<jonafan>
mfp that does not work and gives the very strange type error above
<mfp>
hmm I missed that paste
emmanuelux has joined #ocaml
<thelema>
jonafan: my example was different from mfp's example; what's your exact code that gives the type error?
<ousado>
jonafan: the docs say you need to "Write in .ml and in .mli:" the type def
<jonafan>
exactly what he wrote
<thelema>
jonafan: ah, ok.
<jonafan>
i have basically the same thing in the mli file, but the syntax there is different because mli files are different
<thelema>
ousado: this is so that the value is accessible from outside the module
<ousado>
thelema: yes, both inside and outside
<thelema>
ousado: mli doesn't apply to inside, so there's no type safety inside