companion_cube changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.11 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.11/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
Jesin has quit [Quit: Leaving]
Jesin has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
rock64 has quit [Ping timeout: 245 seconds]
rock64 has joined #ocaml
oriba has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
mxns has joined #ocaml
mxns has quit [Ping timeout: 245 seconds]
bobren has quit [Remote host closed the connection]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
Haudegen has quit [Ping timeout: 264 seconds]
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
xandkar1 has quit [Quit: xandkar1]
xandkar1 has joined #ocaml
cartwright has quit [Remote host closed the connection]
cartwright has joined #ocaml
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
andreas31 has quit [Remote host closed the connection]
andreas31 has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
xandkar1 has quit [Quit: xandkar1]
mfp has quit [Ping timeout: 246 seconds]
cartwright has quit [Remote host closed the connection]
cartwright has joined #ocaml
vicfred has quit [Quit: Leaving]
waleee-cl has quit [Quit: Connection closed for inactivity]
decentpenguin has quit [Read error: Connection reset by peer]
decentpenguin has joined #ocaml
neiluj has quit [Remote host closed the connection]
mastensg_ has quit [Ping timeout: 260 seconds]
Tuplanolla has joined #ocaml
bartholin has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
bartholin has quit [Ping timeout: 276 seconds]
bartholin has joined #ocaml
bartholin has quit [Ping timeout: 245 seconds]
bartholin has joined #ocaml
bartholin has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
TheLemonMan has joined #ocaml
<d_bot_> <jonludlam> @hannes Do you want something like this issue describes? https://github.com/ocaml/odoc/issues/564
bartholin has joined #ocaml
tomjack has quit [Quit: Connection closed for inactivity]
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
ewd has joined #ocaml
_whitelogger has joined #ocaml
bartholin has quit [Ping timeout: 260 seconds]
arecaceae has quit [Remote host closed the connection]
arecaceae has joined #ocaml
bartholin has joined #ocaml
mfp has joined #ocaml
ewd has quit [Ping timeout: 264 seconds]
oriba has joined #ocaml
bartholin has quit [Ping timeout: 245 seconds]
bartholin has joined #ocaml
tane has joined #ocaml
bartholin has quit [Ping timeout: 256 seconds]
bartholin has joined #ocaml
spiegelau has joined #ocaml
ewd has joined #ocaml
ewd has quit [Ping timeout: 256 seconds]
zebrag has joined #ocaml
henistein has joined #ocaml
<henistein> I need an algorithm to parse the parenthesis, after I google I find shunting yard algorithm, since I want to make boolean machine is this too exaggerated? My machine boolean must do things like this >  Input: ((v & f) & f) ; Output: f
zebrag has quit [Read error: Connection reset by peer]
zebrag has joined #ocaml
bartholin has quit [Ping timeout: 260 seconds]
spiegelau has quit [Quit: leaving]
<qwr> imho simplest is to just do rec-descent parsing
<qwr> shunting yard should be a way to do precedence parsing, which isn't really needed for parenthesis
<henistein> rec descent parsing seems good
<qwr> for more complicated grammers menhir parser is also good, if you don't have very special requirements, but it takes a bit time to get used to
<qwr> and then there is pratt parsing, a combination of priority parsing and recursive descent, that essentially is really simple, but took quite some time to initially understand for me (or maybe I'm just boneheaded :))
xandkar1 has joined #ocaml
<companion_cube> is it simpler than recursive descent?
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
mxns has joined #ocaml
mxns has quit [Client Quit]
olle has joined #ocaml
<hannes> jonludlam: yes indeed.
arecaceae has quit [Remote host closed the connection]
arecaceae has joined #ocaml
mxns has joined #ocaml
henistein has quit [Quit: Connection closed]
<qwr> companion_cube: if the grammar contains more than few rules resembling operators, then yes
<companion_cube> you mean infix stuff?
<qwr> companion_cube: mostly infix yes, but i think there are also other cases where you can use priority based decisions
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
waleee-cl has joined #ocaml
<companion_cube> I'd be curious to read more about that
<qwr> its basically precedence parser, where right-side parsing is handed over to callback associated with symbol
<companion_cube> but it's not great to write in OCaml because of the control flow
<qwr> i can give a bit convulated example
<qwr> (it does a bit more postfix/infix decisions in the core parse function than strictly needed, as these could also be delegated to callbacks)
mxns has quit [Quit: ZNC 1.8.2 - https://znc.in]
mxns has joined #ocaml
mxns has quit [Ping timeout: 276 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 245 seconds]
mxns has joined #ocaml
higherorder__ has quit [Ping timeout: 240 seconds]
mxns has quit [Ping timeout: 260 seconds]
mxns has joined #ocaml
higherorder__ has joined #ocaml
olle has quit [Remote host closed the connection]
mxns has quit [Ping timeout: 240 seconds]
rak has joined #ocaml
mxns has joined #ocaml
mxns has quit [Quit: ZNC 1.8.2 - https://znc.in]
mxns has joined #ocaml
wingsorc has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
ewd has joined #ocaml
mxns has joined #ocaml
xenu has quit [Quit: leaving]
xenu has joined #ocaml
mxns has quit [Ping timeout: 276 seconds]
mxns has joined #ocaml
motherfsck has joined #ocaml
vicfred has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
<companion_cube> hu
<companion_cube> looks cleaner than what I have indeed
mxns has joined #ocaml
<companion_cube> qwr: is this your code? did you adapt it from some description of the algo?
mxns has quit [Ping timeout: 245 seconds]
<d_bot_> <Cyclomatic Complexity> hey, I am trying to use `opam pin` to use a single package from the regular ocaml repo, but can't do it
<d_bot_> <Cyclomatic Complexity> I'm currently using `opam pin add patdiff https://opam.ocaml.org`
<qwr> companion_cube: yes, my code, used the wikipedia precedence parsing article, https://matklad.github.io/2020/04/13/simple-but-powerful-pratt-parsing.html and http://crockford.com/javascript/tdop/tdop.html
<qwr> hm, no somehow copied your url, http://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/ was meant to be first
<qwr> the java example is actually good, if you can see past the verbose noise of java...
<SquidDev> @Cyclomatic Complexity IIRC The URL is meant to be to the package's git/hg repository or a tarball, not opam itself. You might be able to use https://ocaml.janestreet.com/ocaml-core/v0.14/files/patdiff-v0.14.0.tar.gz.
xenu has quit [Quit: leaving]
xenu has joined #ocaml
mxns has joined #ocaml
xenu has quit [Client Quit]
<companion_cube> ah thank you
<companion_cube> having code directly in the tokens might be the simplifying thing
mxns has quit [Ping timeout: 258 seconds]
xenu has joined #ocaml
xenu has quit [Client Quit]
xenu has joined #ocaml
mxns has joined #ocaml
<qwr> hm what code, Sym of string? the Code token is syntax peculiarity that isn't even recognized by tokenizer there
<qwr> or mean that ahead_op resolves the symbol with callbacks from tokens?
mxns has quit [Ping timeout: 246 seconds]
<companion_cube> yeah the callbacks in the symbols
<companion_cube> with infix, etc.
<companion_cube> if you know of good ways of making extensible parsers, I'm also interested
<companion_cube> (the requirement is to be able to add new infix/postfix/misfix operators)
<companion_cube> (without recompiling)
mxns has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
xenu has quit [Quit: leaving]
xenu has joined #ocaml
mxns has quit [Ping timeout: 240 seconds]
mxns has joined #ocaml
<d_bot_> <EduardoRFS> is it possible to use @@unboxed with FCM? I'm doing some higher kinded types stuff that requires FCM, but I have a single value per module type signature
mxns has quit [Ping timeout: 240 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 272 seconds]
mxns has joined #ocaml
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
mxns has quit [Ping timeout: 260 seconds]
mxns has joined #ocaml
mxns has quit [Client Quit]
mxns has joined #ocaml
<d_bot_> <Drup> Eh, that's an interesting question. As far as I know, no, it's not possible
<d_bot_> <Drup> The better question is if it's even sound .... I think it is, but it'sprobably not immediate
mxns has quit [Ping timeout: 240 seconds]
mxns has joined #ocaml
<d_bot_> <EduardoRFS> I think it is sound, we just need to remember to unbox on call if the module is not inlined
mxns has quit [Quit: ZNC 1.8.2 - https://znc.in]
mxns has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
<qwr> companion_cube: the pratt parser is extensible, one reason why i got interested in it (another way is to embed precedence based parser into recdesc parser, or apply variation of its algorithm to ast from parser that parses all operators in to simple sequence. or you could use the ocaml trick of predefined operator classes depending on first character...
mxns has quit [Ping timeout: 272 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 264 seconds]
henistein has joined #ocaml
ewd has quit [Ping timeout: 264 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 245 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 260 seconds]
mxns has joined #ocaml
mxns has quit [Ping timeout: 258 seconds]
mxns has joined #ocaml
xandkar has quit [Remote host closed the connection]
xandkar1 is now known as xandkar
<companion_cube> Yeah I use that for extensibility too
<companion_cube> I'm not sure how I'd handle custom misfix stuff though
mxns has quit [Ping timeout: 245 seconds]
SrPx has quit [Ping timeout: 240 seconds]
vicfred has quit [Quit: Leaving]
SrPx has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
mxns has joined #ocaml
mxns has quit [Client Quit]
mxns has joined #ocaml
tane has quit [Quit: Leaving]
zebrag has quit [Quit: Konversation terminated!]
vicfred has joined #ocaml