companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.2.0 released: https://ocaml.org/releases/5.2.0 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Tuplanolla has quit [Ping timeout: 264 seconds]
waleee has quit [Ping timeout: 252 seconds]
ansiwen has quit [Quit: ZNC 1.7.1 - https://znc.in]
ansiwen has joined #ocaml
YuGiOhJCJ has joined #ocaml
brettgilio has quit [Quit: The Lounge - https://thelounge.chat]
brettgilio has joined #ocaml
hackinghorn has joined #ocaml
hackinghorn has quit [Remote host closed the connection]
hackinghorn has joined #ocaml
hackinghorn has quit [Ping timeout: 276 seconds]
Serpent7776 has joined #ocaml
pi3ce has quit [Ping timeout: 252 seconds]
<discocaml> <lyhokia> Hello, any one have some experience working with menhir? Is there a way I can run the parser on a stream and being instruct when should I feed more input to the parser?
<discocaml> <lyhokia> Thanks.
pi3ce has joined #ocaml
pi3ce has quit [Client Quit]
pi3ce has joined #ocaml
pi3ce_ has joined #ocaml
pi3ce has quit [Ping timeout: 272 seconds]
olle has joined #ocaml
myrkraverk_ is now known as myrkraverk
Tuplanolla has joined #ocaml
bartholin has joined #ocaml
Inline has joined #ocaml
tomku has quit [Ping timeout: 252 seconds]
tomku has joined #ocaml
toastal has quit [Ping timeout: 252 seconds]
toastal has joined #ocaml
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
mbuf has joined #ocaml
<discocaml> <lyhokia> Looks like there is fmlib
olle has quit [Ping timeout: 252 seconds]
micro has quit [Ping timeout: 248 seconds]
micro has joined #ocaml
micro has quit [Ping timeout: 252 seconds]
micro has joined #ocaml
mbuf has quit [Quit: Leaving]
Inline has quit [Ping timeout: 265 seconds]
Inline has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
germ- has quit [Ping timeout: 276 seconds]
xenu has joined #ocaml
waleee has joined #ocaml
toastal has quit [Quit: Gateway shutdown]
Anarchos has joined #ocaml
Inline has quit [Quit: Leaving]
Inline has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
dreadedfrog has quit [Ping timeout: 260 seconds]
Inline has quit [Ping timeout: 276 seconds]
Serpent7776 has quit [Ping timeout: 252 seconds]
Inline has joined #ocaml
szkl has quit [Quit: Connection closed for inactivity]
<discocaml> <.chubak> How do I simulate Scheme's "let-values" in Ocaml?
<discocaml> <.chubak> Look at this:
<discocaml> <.chubak> ```ocaml
<discocaml> <.chubak> type lexeme =
<discocaml> <.chubak> | LEXM_Integer of string
<discocaml> <.chubak> | LEXM_Ident of string
<discocaml> <.chubak> | LEXM_Real of string
<discocaml> <.chubak>
<discocaml> <.chubak> let scan_scc code acc callback =
<discocaml> <.chubak> let scan_integer code' acc' =
<discocaml> <.chubak> let buf = Buffer.create 20 in
<discocaml> <.chubak>
<discocaml> <.chubak> let consume_digits c =
<discocaml> <.chubak> match c with
<discocaml> <.chubak> | '0' .. '9' -> Buffer.add_char buf c;
<discocaml> <.chubak> consume_digits (next code')
<discocaml> <.chubak> | _ -> Buffer.contents buf
<discocaml> <.chubak> in
<discocaml> <.chubak> consume_digits (next code'), code'
<discocaml> <.chubak> ```
<discocaml> <.chubak> Is this code idomatically correct?
<discocaml> <.chubak> I will make the `next` later.
<discocaml> <.chubak> I don't think I can return multiple values. Messes with combinatory logic. Currying Right
<discocaml> <.chubak> Scheme is based on comb logic too. That's why I would have to use `values` if it were Scheme.
<discocaml> <.chubak> So what I need to know is how to achieve the `values` and `let-values` in this echosystem
Tuplanolla has quit [Quit: Leaving.]
waleee has quit [Ping timeout: 244 seconds]