Leonidas changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.13.0 released: https://ocaml.org/releases/4.13.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tuplanolla has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
gzj has joined #ocaml
gzj has quit [Client Quit]
Haudegen has quit [Quit: Bin weg.]
johnel has quit [Ping timeout: 260 seconds]
rgrinberg has quit [Ping timeout: 256 seconds]
johnel has joined #ocaml
micro has quit [Ping timeout: 260 seconds]
rgrinberg has joined #ocaml
micro has joined #ocaml
energizer has quit [Ping timeout: 260 seconds]
energizer has joined #ocaml
shawnw has quit [Remote host closed the connection]
mbuf has joined #ocaml
waleee has quit [Quit: WeeChat 3.3]
gravicappa has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mro has joined #ocaml
mbuf has quit [Quit: Leaving]
mro has quit [Remote host closed the connection]
waleee has joined #ocaml
waleee has quit [Quit: WeeChat 3.3]
hendursa1 has joined #ocaml
hendursaga has quit [Ping timeout: 276 seconds]
<Leonidas> theblatte: I'll talk to Nathan about Yojson. He wanted to do some testing to make sure we're not breaking the entire OCamloverse.
<Leonidas> (Realistically, IRC will also exist long after Discord ceases to be)
<Leonidas> Kinda like vim and Emacs have outlived decades of "modern editors" and are doing better than ever.
hendursa1 has quit [Remote host closed the connection]
hendursa1 has joined #ocaml
olle has joined #ocaml
<d_bot> <darrenldl> neoirc when
mro has joined #ocaml
<d_bot> <leonidas> @BigOof https://ircv3.net/
waleee has joined #ocaml
olle has quit [Ping timeout: 268 seconds]
<d_bot> <darrenldl> oh
<vsiles> vim++
<d_bot> <darrenldl> irc++17
jlrnick has joined #ocaml
ej has joined #ocaml
ej has quit [Client Quit]
ej has joined #ocaml
waleee has quit [Ping timeout: 264 seconds]
mro has quit [Remote host closed the connection]
waleee has joined #ocaml
hightower2 has quit [Ping timeout: 268 seconds]
ski has quit [Ping timeout: 260 seconds]
ski has joined #ocaml
mro has joined #ocaml
average has joined #ocaml
<d_bot> <antron> as a former long-time c++ programmer, i am greatly concerned
Haudegen has joined #ocaml
bartholin has joined #ocaml
bobo has joined #ocaml
spip has quit [Ping timeout: 268 seconds]
olle has joined #ocaml
waleee has quit [Quit: WeeChat 3.3]
waleee has joined #ocaml
mro has quit [Ping timeout: 268 seconds]
mro has joined #ocaml
<d_bot> <darrenldl> irc with oop and template
<Armael> I can't wait
<sim642> Is there some integration problem between dune-site and js_of_ocaml? I get a cryptic error instead of any clear incompatibility message: Error: Could not find the .cmi file for interface gobview/src/.App.eobjs/dune_site_data.ml-gen.
waleee has quit [Quit: WeeChat 3.3]
<d_bot> <darrenldl> TIL dune-site
waleee has joined #ocaml
waleee has quit [Quit: WeeChat 3.3]
waleee has joined #ocaml
waleee has quit [Client Quit]
waleee has joined #ocaml
mro has quit [Quit: Leaving...]
<d_bot> <Splingush> If you mean the message-intent needed for the discord->irc direction, that only needs approval for bots in more than 75 guilds. For small bots you can turn on intents without approval. The bots created for bridges are usually only in very few servers, if they are self-hosted.
<d_bot> <Splingush> That intent would be needed to be able to receive messages sent on discord through the api, i think starting sometime next year. Messages that ping the bot direclty work without intents.
<d_bot> <Splingush> Guess they want folks to use the slash commands interface for bot-interaction, which covers a lot of usecases for bots.
gareppa has joined #ocaml
gareppa has quit [Client Quit]
spip has joined #ocaml
bobo has quit [Ping timeout: 268 seconds]
waleee has quit [Quit: WeeChat 3.3]
waleee has joined #ocaml
rgrinberg has joined #ocaml
Haudegen has quit [Quit: No Ping reply in 180 seconds.]
Haudegen has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
<theblatte> Leonidas: many thanks!
<dmbaturin> Is there a way to include a module signature from an external file in a .mli ?
<companion_cube> include module type of Bar ?
<dmbaturin> companion_cube: Yes.
Anarchos has joined #ocaml
olle has quit [Ping timeout: 268 seconds]
vb has quit [Ping timeout: 260 seconds]
vb has joined #ocaml
zebrag has joined #ocaml
bartholin has quit [Quit: Leaving]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgrinberg has joined #ocaml
cedric has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<Corbin> I'm using the sexp library, `open Sexplib.Sexp`, and reading in single S-expressions using `input_sexp` from stdin and `load_sexp` from files. Can I ignore trailing garbage after the first successful parse?
<Corbin> My rationale is that I want to document each S-expression on a per-file basis, and the other S-expression parser I'm using happens to be able to ignore trailing garbage. So, if I could reliably load exactly one S-expression, then I could have a convention that the trailing garbage is e.g. Markdown.
<companion_cube> some garbage will end up in the lexer's buffer I think
<companion_cube> if it uses ocamllex
<dmbaturin> I wish there were already lexers that would allow passing the state around explicitly.
<companion_cube> I suppose it's possible with angstrom?
<companion_cube> Corbin: you can use comments, btw.
<companion_cube> ; foo
<dmbaturin> companion_cube: HHm, I haven't looked into angstrom, maybe I should.
<companion_cube> but otherwise: ocamllex needs an internal buffer
<companion_cube> you can't just process inputs char by char :p
<dmbaturin> The lexer hacks I made for OTOML are going to become a problem with multicore for sure,
<companion_cube> why?
<dmbaturin> companion_cube: The hacks? Because they rely on hidden mutable state to track the lexing context.
<Corbin> companion_cube: At that point, I might as well use lit.sh since that has better ergonomics for tangling overall. I was hoping to not preprocess too much.
<companion_cube> dmbaturin: so they're already a problem with `Thread`?
<Corbin> I don't know. I should probably stop taking this goblin/raccoon scavenged approach to building a compiler toolchain.
<dmbaturin> companion_cube: I'm pretty sure they are.
<companion_cube> dmbaturin: I think you can pass parameters to lexers
<companion_cube> but probably not through menhir, idk
<Corbin> ...Or maybe I should just rewrite this tool in RPython, since it's the last chunk of OCaml remaining and all it does is parse S-expressions.
<dmbaturin> companion_cube: Well, I'm using Menhir's incremental API anyway, so I can pass whatever I want to the lexer, if the lexer is willing to accept it. :)
<companion_cube> ah! well yeah I think the lexer rules can take arguments
<companion_cube> where you can stash your mutable state
<dmbaturin> This is interesting. Do you know of any project that is doing that?
<companion_cube> hum
<companion_cube> I see that OCaml's lexer has global state :/
<zozozo> Indeed, lexing rules can take ocaml parameters
<zozozo> It's very useful
<zozozo> I use it a bit in dolmen
<dmbaturin> zozozo: Got a link to that place in the source?
<companion_cube> https://paste.isomorphis.me/7iC like this works :D
<companion_cube> at least ocamllex compiles it
<dmbaturin> I need to experiment with it, thanks!
<zozozo> You can also see that at the end of the file, the string rule takes two arguments, one of them being a buffer to store the string
<dmbaturin> If I want to pass immutable state around, how can I make update it inside rules and make sure it's passed further?
<dmbaturin> Alternatively, how can I make sure that a new invocation of the lexer will get a _fresh_ mutable state? Is `foo (ref [])` guaranteed to create a fresh reference every time?
<zozozo> When a rule calls another rule, you need to pass it so it should be straightforward, but if you want to pass it been successive call to a lexer rule, you have to 1) return the state as part of the result of the rule (along with the token) and
<zozozo> Instantiate the parsing loop manually to get the state, and pass it to the next invocation
<dmbaturin> Oh, so I can return a tuple? That makes the job much simpler.
<zozozo> Yeah, and make sure you use the returned state for the next iteration of the lexer
jlrnick has quit [Ping timeout: 264 seconds]
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<d_bot> <Continuation Calculus> hi. I have a `type content = ... and t = { content : content ; some_meta_data : ... } [@@deriving show]`. I'd like to to give a custom pp for `t`, that'd use `pp_content` and that `pp` would use, but I don't know how to do that. Any idea?
olle has joined #ocaml
nfc_ has quit [Ping timeout: 260 seconds]
nfc_ has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
waleee has joined #ocaml
waleee has quit [Ping timeout: 260 seconds]
waleee has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
ralu3 has joined #ocaml
ralu has quit [Read error: Connection reset by peer]
ralu3 is now known as ralu
gravicappa has quit [Ping timeout: 256 seconds]
<dmbaturin> companion_cube, zozozo: Well, it took some time to adjust all rules, but conceptually it was a pretty simple change in the end: https://github.com/dmbaturin/otoml/commit/5b4db76f396c983b0a8abf287515cfda8985bfcb Thanks for the suggestion!
rgrinberg has joined #ocaml
waleee has joined #ocaml
Tuplanolla has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
ansiwen_ has joined #ocaml
Fardale1 has joined #ocaml
ansiwen has quit [Ping timeout: 268 seconds]
habnabit has joined #ocaml
smondet[m] has quit [Ping timeout: 268 seconds]
krnkktz has quit [Ping timeout: 268 seconds]
greenbagels has quit [Ping timeout: 268 seconds]
habnabit_ has quit [Ping timeout: 268 seconds]
st has quit [Ping timeout: 268 seconds]
ts1 has joined #ocaml
greenbagels_ has joined #ocaml
dmbaturin_ has joined #ocaml
Fardale has quit [Ping timeout: 246 seconds]
dmbaturin has quit [Ping timeout: 246 seconds]
CodeBitCookie[m] has quit [Ping timeout: 264 seconds]
leah2 has quit [Ping timeout: 264 seconds]
leah2 has joined #ocaml
CodeBitCookie[m] has joined #ocaml
smondet[m] has joined #ocaml
<d_bot> <hhugo> Can you open an issue for this I'm currently looking at better support for jsoo in dune
krnkktz has joined #ocaml
waleee has joined #ocaml
waleee has quit [Ping timeout: 268 seconds]
bobo has joined #ocaml
Fardale1 is now known as Fardale
spip has quit [Ping timeout: 268 seconds]
JSharp has quit [Ping timeout: 260 seconds]
waleee has joined #ocaml
JSharp has joined #ocaml
<d_bot> <۞๑,¸,ø¤º`°๑۩ ןєคภ ๑۩ ,¸,ø¤º`°๑۞> Hi
<d_bot> <۞๑,¸,ø¤º`°๑۩ ןєคภ ๑۩ ,¸,ø¤º`°๑۞> Where do I ask something about menhir ?
<rgrinberg> Here is as good a place as any. There's also a menhir mailing list
<d_bot> <۞๑,¸,ø¤º`°๑۩ ןєคภ ๑۩ ,¸,ø¤º`°๑۞> Hi, I'm using menhir but I have this warnings :
<d_bot> <۞๑,¸,ø¤º`°๑۩ ןєคภ ๑۩ ,¸,ø¤º`°๑۞> ```
<d_bot> <۞๑,¸,ø¤º`°๑۩ ןєคภ ๑۩ ,¸,ø¤º`°๑۞> Warning: 3 states have shift/reduce conflicts.
<d_bot> <۞๑,¸,ø¤º`°๑۩ ןєคภ ๑۩ ,¸,ø¤º`°๑۞> Warning: 18 shift/reduce conflicts were arbitrarily resolved.
<d_bot> <۞๑,¸,ø¤º`°๑۩ ןєคภ ๑۩ ,¸,ø¤º`°๑۞> ```
<d_bot> <۞๑,¸,ø¤º`°๑۩ ןєคภ ๑۩ ,¸,ø¤º`°๑۞> But I don't know which rule are concerned with these, how can i make menhir tell me ?
<d_bot> <۞๑,¸,ø¤º`°๑۩ ןєคภ ๑۩ ,¸,ø¤º`°๑۞> I tried with `--list-errors --log automaton 1 --log-code 1 --log-grammar 2` but it's not written
<d_bot> <NULL> `--explain` gives you a more readable conflicts explanation in a file
<d_bot> <۞๑,¸,ø¤º`°๑۩ ןєคภ ๑۩ ,¸,ø¤º`°๑۞> Thanks, I will try it tomorrow
<d_bot> <oconnor0> I haven't programmed in OCaml in like 15 years, but every once in a while, I run into a problem and think, "I could really use polymorphic variants" to solve this or "Structural typing would be really useful here".
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cedric has quit [Quit: Konversation terminated!]
faultline has joined #ocaml
faultline has quit [Remote host closed the connection]
faultline has joined #ocaml