companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.14.0 released: https://ocaml.org/releases/4.14.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
Soni has quit [Ping timeout: 260 seconds]
Tuplanolla has quit [Quit: Leaving.]
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #ocaml
Soni has joined #ocaml
vicfred has quit [Quit: Leaving]
Soni has quit [Ping timeout: 240 seconds]
Soni has joined #ocaml
vicfred has joined #ocaml
raskol has joined #ocaml
raskol has quit [Ping timeout: 246 seconds]
waleee has quit [Ping timeout: 240 seconds]
bobo_ has quit [Ping timeout: 240 seconds]
bobo_ has joined #ocaml
szkl has joined #ocaml
Haudegen has joined #ocaml
mbuf has joined #ocaml
<d_bot> <Eden> It's not.
szkl has quit [Quit: Connection closed for inactivity]
gravicappa has joined #ocaml
kurfen has quit [Ping timeout: 240 seconds]
kurfen has joined #ocaml
bobo_ has quit [Ping timeout: 244 seconds]
bobo_ has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
<d_bot> <Residue Theorem> Is it fine to add a whole library to dune when I just want to use a specific independent module, or should I instead just rewrite that specific module
<d_bot> <Ambika E.> It's fine to add the library
<d_bot> <Ambika E.> It's fine to add the library
olle has joined #ocaml
<d_bot> <Residue Theorem> I am concerned about size and runtime speed of the executable
<d_bot> <Residue Theorem> I conducted some tests and realized that size does not increase needlessly
aspe has joined #ocaml
<d_bot> <Butanium (@me on reply)> you could try to copy the modules from the github source code
<d_bot> <Butanium (@me on reply)> and see if it makes any difference
<d_bot> <Bluddy> in general, ocaml has gotten good at removing unnecessary module code
<d_bot> <octachron> For (non-packed) libraries, only the modules that are used will be linked in the executable.
<d_bot> <Butanium (@me on reply)> non packed ?
<d_bot> <octachron> Libraries built with the `-pack` option which is not used much nowadays.
<d_bot> <Butanium (@me on reply)> I see
<olle> OCaml compiler aborts at first error, right?
<olle> E.g. conflict between mli and usage of function as defined in that mli
<d_bot> <Bluddy> @Butanium packs were a solution for ocaml's lack of module hierarchies. dune makes things much easier nowadays.
bartholin has joined #ocaml
wingsorc has quit [Ping timeout: 244 seconds]
gravicappa has quit [Ping timeout: 258 seconds]
Haudegen has quit [Quit: Bin weg.]
tetrislife has joined #ocaml
mro has joined #ocaml
gravicappa has joined #ocaml
mro has quit [Remote host closed the connection]
aspe has quit [Quit: aspe]
gravicappa has quit [Ping timeout: 240 seconds]
mbuf has quit [Ping timeout: 246 seconds]
mbuf has joined #ocaml
<d_bot> <Lewis Campbell> is there an equivalent of `|>` that works with functions that return options?
Haudegen has joined #ocaml
mbuf has quit [Ping timeout: 276 seconds]
mbuf has joined #ocaml
<d_bot> <leviroth> You want it to work like Option.map (or bind)?
mro has joined #ocaml
<d_bot> <undu> the `let ( let* ) = Option.bind` is the closest, you can then chain `let*`s: `let* sprout = transform seed in let* plant = transform sprout in ...`
<d_bot> <NULL> If you really want to pipe, you can `let (|>*) = Option.bind`
gravicappa has joined #ocaml
Sankalp- has joined #ocaml
Sankalp has quit [Ping timeout: 256 seconds]
Sankalp- is now known as Sankalp
mro has quit [Remote host closed the connection]
mro has joined #ocaml
<d_bot> <.kodwx> or `>>=`
Anarchos has joined #ocaml
mro has quit [Remote host closed the connection]
mro has joined #ocaml
mro has quit [Remote host closed the connection]
<d_bot> <Et7f3 (@me on reply)> Do you have mnemonic to remember order of parameter of monadic let
<d_bot> <NULL> `let*` is bind, look up any already defined one
<d_bot> <Et7f3 (@me on reply)> `let (let*) = Option.bind` ? I always have the same question for bind. value or function first
<d_bot> <Et7f3 (@me on reply)> for binary operator I know that it is: `let ( + ) lhs rhs` because we write `lfs + rhs`
mro has joined #ocaml
<olle> Which internal AST is Merlin working on?
<octachron> Merlin is working on the parsetree, typedtree, and shape metadata.
<olle> octachron: Hmmmm ok ok ok
<olle> Wonder why they couldn't make it work for ReScript
Anarchos has quit [Quit: Vision[]: i've been blurred!]
raskol has joined #ocaml
mro has quit [Remote host closed the connection]
<d_bot> <NULL> @Et7t3 yes, you only have to look up the type of `Option.bind` (or any other one) to know the argument order of your `let*`
mro has joined #ocaml
dstein64- has joined #ocaml
mro has quit [Ping timeout: 255 seconds]
dstein64 has quit [Ping timeout: 240 seconds]
dstein64- is now known as dstein64
mro has joined #ocaml
raskol has quit [Ping timeout: 246 seconds]
hyphen has quit [Ping timeout: 240 seconds]
hyphen has joined #ocaml
waleee has joined #ocaml
hyphen has quit [Ping timeout: 244 seconds]
hyphen has joined #ocaml
Haudegen has quit [Quit: Bin weg.]
raskol has joined #ocaml
kakadu has joined #ocaml
mbuf has quit [Quit: Leaving]
mro has quit [Quit: Leaving...]
kakadu has quit [Quit: Konversation terminated!]
raskol has quit [Ping timeout: 246 seconds]
Tuplanolla has joined #ocaml
hyphen has quit [Ping timeout: 240 seconds]
Haudegen has joined #ocaml
hyphen has joined #ocaml
bartholin has quit [Quit: Leaving]
aspe has joined #ocaml
hyphen has quit [Ping timeout: 260 seconds]
hyphen has joined #ocaml
aspe has quit [Quit: aspe]
hyphen has quit [Ping timeout: 258 seconds]
hyphen has joined #ocaml
hyphen has quit [Ping timeout: 240 seconds]
hyphen has joined #ocaml
vicfred has quit [Quit: Leaving]
rgrinberg has joined #ocaml
bobo_ has quit [Ping timeout: 246 seconds]
bobo_ has joined #ocaml
hyphen has quit [Read error: Connection reset by peer]
hyphen has joined #ocaml
rak has quit [Ping timeout: 276 seconds]
hyphen has quit [Ping timeout: 255 seconds]
hyphen has joined #ocaml
<sleepydog> gah. i just spent like a day debugging a dune/ctypes build that turned out to be totally my fault
<sleepydog> it turns out you cannot name your dune library that links against libfoo "libfoo", because your local "libfoo.a" will shadow the external "libfoo"
<d_bot> <VPhantom> Oh that's a fun one.
<sleepydog> it's so obvious in hindsight but i was neck deep in gcc documentation before i just had a drink and thought, "oh"
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rak has joined #ocaml
<d_bot> <deepspacejohn> I have a Menhir rule where I want to check if the strings in two tokens are equal and raise an error if they aren't. Is there an idiomatic way of doing that with Menhir? Just define an exception in another file, and raise that?
<sleepydog> i had a similar problem awhile ago. i defined the exception in the header of the .mly file, but i'm curious to hear what others recommend. what i really wanted to do was only match the rule when the tokens' strings had the same value
gravicappa has quit [Ping timeout: 256 seconds]
<d_bot> <deepspacejohn> if it's in the header of the `mly` file, won't it be hidden by the interface Menhir generates?
<dh`> general rule of thumb for parsers: defer any checks (or other logic) that don't need to be in the parser to a subsequent pass
<sleepydog> deepspacejohn: i went back and looked at it. i think you're right, it is hidden. hah! if i did it again i would follow dh`'s advice
mro has joined #ocaml
zebrag has joined #ocaml
<d_bot> <deepspacejohn> Hm, that's probably the right way of doing it. Although this case feels like it should be a "parser" error to me. I'm parsing something that works like XML-style tags, e.g. `<foo></foo>` parses and `<foo></bar>` fails. In either case, thanks for the advice!
raskol has joined #ocaml
<dh`> the reason to keep other logic out of the parser is very pragmatic: you want the parser to be maintainable, and part of that is being able to read the grammar without having large amounts of extra code stuck into it
<dh`> also there are, as you noted, some complications associated with producing additional errors in most parser generators
<dh`> the only stuff that really needs to be in there is stuff that affects the parsing logic, and with most parser generators you can't do that, so... consing only
<sleepydog> it would be cool if binding the same name to two actuals stipulated that they had the same value
<sleepydog> e.g. ` | name = OpenTag content name = CloseTag { ... }` or something like that
<d_bot> <NULL> It doesn't fit with the LR(1) algorithm
mro has quit [Quit: Leaving...]
<dh`> the other reason: most parser generators are very stingy about producing useful error messages so any error you can produce yourself later will generally be more tractable for users
szkl has joined #ocaml
rgrinberg has joined #ocaml
bgs has quit [Remote host closed the connection]
bgs has joined #ocaml
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<d_bot> <anmonteiro> BTW, `stdune` is an underappreciated "Stdlib replacement"
<d_bot> <anmonteiro> Just wanted to make folks aware. It's modern, very well-written, and has a very pleasant API to use
hyphen has quit [Ping timeout: 255 seconds]
rgrinberg has joined #ocaml
hyphen has joined #ocaml
<sleepydog> anmonteiro: aren't there warnings about it being unstable?
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
* qwr is unsure, why the stdlib needs to be replaced
<dh`> seems to be an article of faith
raskol has quit [Ping timeout: 258 seconds]
<d_bot> <anmonteiro> the unstable warnings is a fair argument. it's been worth it for me
rgrinberg has joined #ocaml
olle has quit [Ping timeout: 246 seconds]
wingsorc has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
kurfen has quit [Quit: ZNC 1.8.2 - https://znc.in]
kurfen has joined #ocaml
wonko has joined #ocaml
wonko has quit [Ping timeout: 260 seconds]
<d_bot> <rgrinberg> stdune isn't very ambitious
rgrinberg has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bgs has quit [Remote host closed the connection]
bgs has joined #ocaml
vicfred has joined #ocaml
Tuplanolla has quit [Quit: Leaving.]
zebrag has quit [Quit: Konversation terminated!]