ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
silver_ has joined #ocaml
Soni has joined #ocaml
shinnya has quit [Ping timeout: 250 seconds]
silver has quit [Ping timeout: 246 seconds]
ctrlsbstr has joined #ocaml
pierpa has quit [Quit: Page closed]
isd has quit [Quit: Leaving.]
govg has quit [Ping timeout: 250 seconds]
kleimkuhler has joined #ocaml
govg has joined #ocaml
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mk9 has quit [Ping timeout: 260 seconds]
gtrak has quit [Ping timeout: 246 seconds]
govg has quit [Ping timeout: 256 seconds]
ctrlsbstr has joined #ocaml
silver_ has quit [Read error: Connection reset by peer]
kleimkuhler has quit [Quit: kleimkuhler]
zolk3ri has quit [Quit: Lost terminal]
pierpal has joined #ocaml
pierpal has quit [Client Quit]
pierpal has joined #ocaml
muelleme has joined #ocaml
csljq has joined #ocaml
muelleme has quit [Ping timeout: 256 seconds]
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nicoo has quit [Write error: Connection reset by peer]
nicoo has joined #ocaml
tarptaeya_ has joined #ocaml
tarptaeya has quit [Ping timeout: 264 seconds]
kleimkuhler has joined #ocaml
spew has quit [Ping timeout: 260 seconds]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 264 seconds]
tarptaeya_ is now known as tarptaeya
pierpal has quit [Ping timeout: 260 seconds]
sz0 has joined #ocaml
pierpal has joined #ocaml
exarkun has quit [Read error: Connection reset by peer]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
h11 has joined #ocaml
exarkun has joined #ocaml
pierpal has quit [Remote host closed the connection]
zmzm has joined #ocaml
spew has joined #ocaml
kleimkuhler has quit [Quit: kleimkuhler]
kleimkuhler has joined #ocaml
ctrlsbstr has joined #ocaml
ctrlsbstr has quit [Client Quit]
govg has joined #ocaml
jimmyrcom_ has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 276 seconds]
govg has joined #ocaml
moolc has joined #ocaml
MercurialAlchemi has joined #ocaml
sh0t has quit [Remote host closed the connection]
spew has quit [Read error: Connection reset by peer]
mcc has quit [Quit: Connection closed for inactivity]
kleimkuhler has quit [Quit: kleimkuhler]
mbuf has joined #ocaml
Haudegen has joined #ocaml
cbot has quit [Quit: Leaving]
csljq has quit [Remote host closed the connection]
moolc has quit [Ping timeout: 265 seconds]
pierpal has joined #ocaml
mfp has joined #ocaml
muelleme has joined #ocaml
muelleme has quit [Ping timeout: 246 seconds]
exarkun has quit [Read error: Connection reset by peer]
csljq has joined #ocaml
muelleme has joined #ocaml
exarkun has joined #ocaml
zmzm has quit [Quit: zmzm]
muelleme has quit [Ping timeout: 256 seconds]
orbifx has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
noitakomentaja has joined #ocaml
orbifx has quit [Ping timeout: 256 seconds]
MercurialAlchemi has quit [Ping timeout: 256 seconds]
MercurialAlchemi has joined #ocaml
noitakomentaja has quit [Ping timeout: 255 seconds]
noitakomentaja has joined #ocaml
muelleme has joined #ocaml
muelleme has quit [Ping timeout: 256 seconds]
moolc has joined #ocaml
malina has joined #ocaml
sl33rr has joined #ocaml
sz0 has quit [Quit: Connection closed for inactivity]
malina has quit [Ping timeout: 260 seconds]
malina has joined #ocaml
malina has quit [Max SendQ exceeded]
malina has joined #ocaml
sl33rr has quit [Quit: sl33rr]
picolino has quit [Ping timeout: 248 seconds]
tizoc has quit [Ping timeout: 248 seconds]
tizoc has joined #ocaml
ziyourenxiang has joined #ocaml
picolino has joined #ocaml
ragepandemic has joined #ocaml
muelleme has joined #ocaml
zolk3ri has joined #ocaml
muelleme has quit [Ping timeout: 265 seconds]
dhil has joined #ocaml
johnelse is now known as johnel_away
govg has quit [Ping timeout: 265 seconds]
govg has joined #ocaml
johnel_away is now known as johnelse
Haudegen has quit [Read error: Connection reset by peer]
<ragepandemic>
Bluddy[m]: hi, I thought I'd introduce myself. I'm one of your co-contributors on ocamlverse
<discord2>
<loxs> Seems like js_of_ocaml uses ints of different size than ocaml native (my machine is 64 bits) so I get overflows. How should I write my code to always use 64 bit ints (or maybe 63 bit ints?) so that it works both on all machines (albeit maybe slower) the same way?
<Drup>
loxs: javascript doesn't have integers, jsoo does the best that it can. If you need more, use arbitrary precision integers
<discord2>
<loxs> ah, alright, I thought jsoo did something like this under the blankets
<discord2>
<loxs> just with lower precision
argent_smith has joined #ocaml
gtrak has joined #ocaml
gtrak has quit [Ping timeout: 240 seconds]
gtrak has joined #ocaml
moolc has quit [Ping timeout: 260 seconds]
moolc has joined #ocaml
Haudegen has joined #ocaml
<discord2>
<loxs> hmm, there isn't exponentiation in Zarith.Q why is that?
<Drup>
hm, that's weird, it shouldn't be hard to add
hnrgrgr has quit [Read error: Connection reset by peer]
<rgr[m]>
How come OCaml thinks that Set.Make(String).t and Set.Make(StringLabels).t are different types?
<Drup>
because String ≠ StringLabels
<rgr[m]>
Yeah, I guess that's obvious...
<rgr[m]>
but really annoying
<rgr[m]>
So I suppose I should be careful about ever exposing a type like Set.Make(StringLabels).t in an API
<rgr[m]>
Since the vast majority of users construct their sets out of String
<Drup>
or just never create it in the first place. You can always use Make(String)
<Drup>
there is not reason to use StringLabels here
<rgr[m]>
Yup.. it happened by accident since I module String = StringLabels elsewhere
muelleme has joined #ocaml
<Drup>
yeah
<rgr[m]>
okay, but this is really pesky: Set.Make(String) .t <> MoreLabels.Set.Make(String).t
<rgr[m]>
so this makes MoreLabels.Set kind of useless for me :/
<zozozo>
rgr[m]: in any case, wouldn't it be better to create the set module *once*, and then expose it as : module S : Set.S with type key = string ?
<rgr[m]>
zozozo: What if the user already has his own String_set module that he's using everywhere?
gtrak has quit [Ping timeout: 250 seconds]
<steenuil>
though luck
<zozozo>
rgr[m]: well, then you probably have to either accept some perf penalty to re-build a set internally from the list of elements in his/her set, or you can parametrize your functions over the set functions that the user can provide with his/her String_set module ?
<rgr[m]>
zozozo: neither options are reasonable
<Drup>
you have some strong constraints. What's the context ?
<rgr[m]>
Do I really have strong constraints? I just want a string set :/
<Drup>
you want a string set that is not implemented as the usual string set, and you want it to be compatible with the normal one without ever copying anything
hnrgrgr has joined #ocaml
<rgr[m]>
The context is that in dune we have an sexp library and I'd like to add some string set parsers: `Set.Make(String).t parser`. But unfortuantely, the string set we use in dune is `MoreLabels.Set.Make(String).t`
<Drup>
and you assume that your user 1) don't use your string set 2) already has lot's of string sets lying around
hnrgrgr is now known as Guest28017
gtrak has joined #ocaml
<Drup>
rgr[m]: just expose your string set module in the API
<rgr[m]>
yup. sounds quite reasonable to me. string sets are awfully common
<rgr[m]>
Yes, I have to do that. But then I must waste time converting it to the other string set type
<rgr[m]>
Or change dune's string set type
hnrgrgr_ has joined #ocaml
malina has quit [Ping timeout: 268 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
kakadu has joined #ocaml
kakadu has quit [Remote host closed the connection]
mbuf has quit [Quit: Leaving]
_andre has joined #ocaml
m4lvin has quit [Remote host closed the connection]
gtrak has quit [Ping timeout: 248 seconds]
m4lvin has joined #ocaml
dhil has quit [Ping timeout: 248 seconds]
muelleme has quit [Ping timeout: 260 seconds]
ragepandemic has quit [Quit: Lost terminal]
spew has joined #ocaml
baroud has joined #ocaml
sh0t has joined #ocaml
dhil has joined #ocaml
inr has quit [Ping timeout: 255 seconds]
moolc has quit [Remote host closed the connection]
gtrak has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
mk9 has joined #ocaml
mk9 has quit [Remote host closed the connection]
mk9 has joined #ocaml
gtrak has quit [Ping timeout: 260 seconds]
pierpal has quit [Read error: Connection reset by peer]
mk9 has quit [Quit: mk9]
tarptaeya_ has joined #ocaml
tarptaeya has quit [Ping timeout: 268 seconds]
malina has joined #ocaml
gtrak has joined #ocaml
tarptaeya_ is now known as tarptaeya
shinnya has joined #ocaml
muelleme has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 246 seconds]
muelleme has quit [Ping timeout: 240 seconds]
jbrown has joined #ocaml
sh0t has quit [Remote host closed the connection]
gtrak has quit [Quit: WeeChat 2.1]
gtrak has joined #ocaml
dhil has quit [Ping timeout: 264 seconds]
pierpal has joined #ocaml
<discord2>
<Perry> Drup: kudos on your regexp test infra! It looks very cool!
noitakomentaja has quit [Ping timeout: 255 seconds]
inr has joined #ocaml
<Drup>
thanks :)
pierpal has quit [Read error: Connection reset by peer]
<discord2>
<Perry> I'm playing around with the web page -- not entirely sure how to use it.
<Drup>
You type a regular expression in, press "Generate" and it it'll give you positive and negative samples
<discord2>
<Perry> not working right for me. Not sure why.
<Drup>
press "Go!"*
<discord2>
<Perry> gotcha
bigs has left #ocaml [#ocaml]
<discord2>
<Perry> what does "generate" do?
<discord2>
<Perry> just generate random regexes?
<Drup>
It generates a random regular expression
<Drup>
suggestions to improve the UI welcome :D
Haudegen has quit [Remote host closed the connection]
<discord2>
<Perry> I may make some 😃
<discord2>
<Perry> The UI doesn't support anchoring etc., I presume neither does the library yet?
<Drup>
No, this is only aboug *regular* expressions
<Drup>
so, no backreferences, predicate or any of that perl nonsense
<discord2>
<Perry> backreferences aren't regular but anchoring and lookahead/behind is still regular.
<Drup>
ah, anchoring, right
<discord2>
<Perry> backrefs are exponential to implement. 😦
<discord2>
<Perry> And painful.
<Drup>
yes, we don't have any lookaround/boundary operators yet, because they are not really compositional
<Drup>
I'm interested in adding that in the long run
<discord2>
<Perry> I need to add those to sedlex at some point.
<discord2>
<Perry> BTW, on slightly richer grammars, I've been thinking of a PPX context free parser generator. The notion being that it's syntactically sweeter to write in OCaml and have things like tuareg and merlin work with your syntax.
<discord2>
<Perry> When I say "thinking" I do not mean at all seriously.
<Drup>
a PPX frontend to menhir wouldn't be a bad thing
<discord2>
<Perry> but for a long time I've dreamed of having CFGs be as easy to use as regexps.
<Drup>
there was some work on a metaocaml library that take CFGs described by combinators and synthethize the optimized parser out of it
jbrown has quit [Ping timeout: 268 seconds]
<Drup>
by Runhang LI and jeremy yallop. I think the big issue was properly dealing with recursion
baroud has quit [Ping timeout: 264 seconds]
<discord2>
<Perry> So this brings up an interesting question theoretical question. Say I want to build a PPX that will generate a parser. I want generated parsers to take input from strings or from files or from network sockets or other things. How should I specify an implementation of an interface to the PPX so that any of them can be used? Perhaps pass a module to the PPX somehow?
<Drup>
Perry: just do like menhir
<discord2>
<Perry> I'm thinking more what syntax is sane. It's clearly feasible in general.
<discord2>
<Perry> But one wants to make it comfortable and convenient.
<discord2>
<Perry> especially if one file might have different bits of code that parse different things.
<Drup>
Ah, yeah, you'll have to come up with some ppx-fueld syntax
sh0t has joined #ocaml
Haudegen has joined #ocaml
<discord2>
<loxs> Where are the docs for what is allowed in Format strings? Things like %s, %f %d etc?
<Drup>
Format module, bottom of the page or Printf module, top of the page
<discord2>
<loxs> ah, that's about the boxes - I thought that you mean that Format too has the explanations for the % directives
nicootje has joined #ocaml
nicoo has quit [Ping timeout: 255 seconds]
<discord2>
<Perry> look at the bottom
dhil has joined #ocaml
<chindy>
I installed zipperposition with opam. I wonder how do I import or open the modules in there? In particular the Logtk module. open Zipperposition does give an unbound module error.
<companion_cube>
`opam install logtk` should do it
<companion_cube>
(it's several libs/binaries in the same repository, it should work but not tested much so don't hesitate to reach to me if you have problems)
<chindy>
ahhh companion_cube... I was looking for c-cube in the irc list.. :D
<companion_cube>
^^
<chindy>
companion_cube: anyways, I am mostly interested in parsing tptp formulas and getting them in a term tree
<companion_cube>
oh, there might be simpler ways
<companion_cube>
zozozo: has this lib called dolmen
<zozozo>
chindy: ah, well, one of my goal for dolmen was for it to be a replacement for the parsers in various projects so actually, you can define your own terms, instantiate a functor, e.g. Tptp.Make, and then get a parse that outputs your own terms; so any type that implements the operations describes in ast_tptp.ml can be used. Alternatively, if you don not already have some ast representation, a default
<chindy>
It seems like I only get 1 statement per file in tptp fof format. Seems like it only considers conjecture terms
<zozozo>
everything in the tptp language specification is parsed
<zozozo>
is your code available somewhere ?
<chindy>
zozozo: nvm.. I had a stupid mistake
<zozozo>
^^
jimmyrcom_ has quit [Ping timeout: 260 seconds]
cslqj has quit [Remote host closed the connection]
philtor has quit [Remote host closed the connection]
jbrown has quit [Ping timeout: 276 seconds]
Haudegen has joined #ocaml
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ctrlsbstr has joined #ocaml
tane has joined #ocaml
dhil has quit [Ping timeout: 268 seconds]
nicootje has quit [Remote host closed the connection]
nicootje has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 248 seconds]
weird_error has joined #ocaml
csljq has joined #ocaml
exarkun has quit [Read error: Connection reset by peer]
orbifx has joined #ocaml
dtornabene has joined #ocaml
exarkun has joined #ocaml
orbifx has quit [Ping timeout: 268 seconds]
arthur_rainbow has joined #ocaml
<arthur_rainbow>
Hi
<arthur_rainbow>
I'm writting a program using ocamllex and ocamlyacc.
<arthur_rainbow>
I can't find any place where it is clairly explained. How do I know where the Parsing.Parse_error occur in the parsed file, please ?
<Drup>
arthur_rainbow: 1) use menhir 2) You can retrieve the error position from the parser/lexer
<discord2>
<Perry> Menhir has on difficulty, which is that it has made it difficult to use only the "easy" YACC style error handling method. Otherwise it is a general win.
<arthur_rainbow>
1) If it's not too hard to switch, I may. Alas, it's not my own code I'm debugging, but the one from a post doc who left
<discord2>
<Perry> Er, one.
orbifx has joined #ocaml
<arthur_rainbow>
2) I certainly hope that it is possible to retrieve them. I just can't figure out how.
<Drup>
Perry: hm, not really, it's just that there is a better way now
<arthur_rainbow>
Another question (in second thought, it should have been the first one). How can I see the list of token which have been produced ? Thus I'll know whether the trouble is in the lexer or in the parser
<arthur_rainbow>
Drup: thank you. I'm looking at the link right now
<Drup>
if the trouble is in the lexer, you'll get a Lexer.Error, iirc
mk9 has joined #ocaml
<arthur_rainbow>
I'm trying to debug the lexer right now. So I assume it may output token which are not the one it should
<arthur_rainbow>
if it output wrong token, I assume that I'll guet a Parser Error
mk9 has quit [Client Quit]
mk9 has joined #ocaml
<Drup>
well, you could also just ask the lexer to output all the tokens and check manually
<discord2>
<Perry> You should be able to see all the tokens it can generate by looking at the lexer description
<arthur_rainbow>
The error message is «Fatal error: exception MightyL.ParseError(_)», so everything which may present an interest is in fact hidden
jnavila has joined #ocaml
dtornabene has quit [Ping timeout: 276 seconds]
sz0 has joined #ocaml
Muzer has quit [Ping timeout: 265 seconds]
<arthur_rainbow>
Oh, is this normal that, I never have any backtrace. I would surely love to know where exception was raised. And I kind of remember this used to exists in ocaml
muelleme has joined #ocaml
muelleme has quit [Ping timeout: 264 seconds]
<Drup>
arthur_rainbow: well, that's because you never print a decent error message out of it. In any case, this piece of code show you how to retrieve all the information you need
noitakomentaja has joined #ocaml
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
keep_away has quit [Quit: Ping timeout (120 seconds)]
zshipko has joined #ocaml
orbifx has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
ctrlsbstr has joined #ocaml
pierpal has joined #ocaml
kakadu has joined #ocaml
pierpal has quit [Read error: Connection reset by peer]
spew has quit []
pierpal has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #ocaml
Muzer has joined #ocaml
bairui has quit [Read error: Connection reset by peer]
bairui has joined #ocaml
muelleme has joined #ocaml
Haudegen has joined #ocaml
muelleme has quit [Ping timeout: 268 seconds]
muelleme has joined #ocaml
zshipko has quit [Quit: leaving]
jnavila has quit [Remote host closed the connection]
hdon has joined #ocaml
noitakomentaja has quit [Quit: WeeChat 2.0.1]
argent_smith has quit [Ping timeout: 240 seconds]
muelleme has quit [Ping timeout: 268 seconds]
argent_smith has joined #ocaml
jbrown has joined #ocaml
argent_smith has quit [Ping timeout: 264 seconds]
argent_smith has joined #ocaml
tane has quit [Quit: Leaving]
gtrak has quit [Ping timeout: 276 seconds]
argent_smith1 has joined #ocaml
argent_smith has quit [Ping timeout: 256 seconds]
gtrak has joined #ocaml
argent_smith has joined #ocaml
argent_smith1 has quit [Ping timeout: 255 seconds]
moei has quit [Quit: Leaving...]
gtrak has quit [Ping timeout: 260 seconds]
jimmyrcom has quit [Remote host closed the connection]
jimmyrcom has joined #ocaml
kakadu has quit [Remote host closed the connection]
pierpal has quit [Ping timeout: 256 seconds]
mk9 has quit [Quit: mk9]
sh0t has quit [Remote host closed the connection]
hdon has quit [Ping timeout: 256 seconds]
philtor has joined #ocaml
jimmyrcom_ has joined #ocaml
hdon has joined #ocaml
tarptaeya has quit [Quit: Konversation terminated!]
argent_smith1 has joined #ocaml
hdon has quit [Changing host]
hdon has joined #ocaml
argent_smith1 has quit [Read error: Connection reset by peer]
argent_smith1 has joined #ocaml
argent_smith has quit [Ping timeout: 255 seconds]
argent_smith has joined #ocaml
argent_smith1 has quit [Ping timeout: 255 seconds]
ctrlsbstr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
argent_smith1 has joined #ocaml
argent_smith has quit [Ping timeout: 240 seconds]
spew has joined #ocaml
Haudegen has quit [Ping timeout: 256 seconds]
shinnya has joined #ocaml
argent_smith has joined #ocaml
argent_smith1 has quit [Ping timeout: 240 seconds]
ziyourenxiang has quit [Ping timeout: 240 seconds]
exarkun has quit [Read error: Connection reset by peer]
argent_smith has quit [Read error: Connection reset by peer]
argent_smith has joined #ocaml
sh0t has joined #ocaml
argent_smith1 has joined #ocaml
argent_smith has quit [Ping timeout: 256 seconds]
tormen has quit [Ping timeout: 265 seconds]
argent_smith has joined #ocaml
zshipko has joined #ocaml
argent_smith2 has joined #ocaml
exarkun has joined #ocaml
argent_smith1 has quit [Read error: Connection reset by peer]
argent_smith1 has joined #ocaml
tormen has joined #ocaml
argent_smith2 has quit [Ping timeout: 240 seconds]
argent_smith has quit [Ping timeout: 240 seconds]
argent_smith1 has quit [Ping timeout: 256 seconds]