companion_cube changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 4.12 released: https://ocaml.org/releases/4.12.0.html | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
<companion_cube> it did, it's just spammy on IRC :p
<d_bot> <monk> i know i'm dancing around the issue of generating a list of program values ("malval"), i just don't see where/how to perform the transformation
<d_bot> <monk> or at least that is what i think the problem is
<d_bot> <monk> i'm sorry for the spam 😓
<companion_cube> not sure either
<companion_cube> I'd use merlin and look at the type of intermediate expressions
<d_bot> <monk> here's the error, i want to think it's actually as simple as it suggests: https://bpa.st/3GGQ
<d_bot> <monk> i use emacs with merlin, is looking at the type of an intermediate expression the same as type at point or is that another functionality?
<d_bot> <monk> i use all the facilities provided by user-setup
<d_bot> <monk> only thing i don't use is lsp simply because merlin has been more than good enough thus far
<companion_cube> you can ask for the type of a whole expression
<companion_cube> not sure how it works in emacs
<companion_cube> but it's a thing
<companion_cube> oh wait, you need to do `read_list input` no?
<companion_cube> so
<companion_cube> an interesting quirk of OCaml is that mutually recursive functions are generalized together
<companion_cube> so you cannot use read_list with several types in the same block
nd__ has joined #ocaml
<companion_cube> ah, maybe: `read_atom >>| (fun x -> [x])`
<companion_cube> cause `form` returns a single thing otherwise
<d_bot> <monk> well before i say anything else right now, it's now compiling after having made `read_list`'s body `many (form input)`
<d_bot> <monk> which i do not trust
<d_bot> <monk> at my gut
<companion_cube> ah!
<companion_cube> right, the list is inside
nd__ has quit [Ping timeout: 258 seconds]
<d_bot> <monk> alright yep i've tested it and i get a gnarly stack overflow
<d_bot> <monk> saw that coming from a mile away
<d_bot> <RegularSpatula> Here is what you want: https://github.com/ocaml/merlin/wiki/emacs-from-scratch#getting-the-types-of-expressions. Basically `C-c C-t` then `C-< up>`
<d_bot> <monk> can you give an example of this? doesn't have to be the parser, just something that communicates the point
<companion_cube> you may need to eta-expand
<d_bot> <monk> thank you!
<companion_cube> esp. the recursive parsers at the end
vicfred has joined #ocaml
<d_bot> <monk> so this could be a dead end but i am wondering why changing `read_atom` to `read_atom >>| mlist` where `let mlist x = MalList x`
<d_bot> <monk> then the `read_atom` declaration now fails type checking because it evaluates as a `(char, malval) parser`when it needs to be `(char, malval list) parser`
<d_bot> <monk> so im wondering why read_atom now needs to return a list
<companion_cube> I read it wrong, I thought read_list returned a list
<companion_cube> anyway
<d_bot> <monk> what does eta expansion look like?
<d_bot> <monk> in the general form?
<companion_cube> instead of `let f = …`
<companion_cube> `let f x = foo x` instead of `let f = foo`, I mean
<d_bot> <monk> ty
<companion_cube> in particular it delays the evaluation of `foo` until the call to f
<d_bot> <monk> i currently have a beautiful call list between `form` and `read_list` choking utop and i think that's beautiful
nd__ has joined #ocaml
<companion_cube> the joys of non termination
nd__ has quit [Ping timeout: 272 seconds]
<d_bot> <monk> getting a lot of "this is not a function; it cannot be applied" in response to all my parser shuffling
<d_bot> <monk> haven't tried eta expansion on the smaller combinators, wondering if that's part of the issue
<d_bot> <monk> oof
favonia has quit [Ping timeout: 240 seconds]
favonia has joined #ocaml
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 272 seconds]
<d_bot> <monk> something confusing i've come upon is that `read_atom` doesn't get called even though it's first in the `choice` combinator
<d_bot> <monk> and with input that ought to guarantee it gets called
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 245 seconds]
mbuf has joined #ocaml
gravicappa has joined #ocaml
wagle has joined #ocaml
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 245 seconds]
tomku has joined #ocaml
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 240 seconds]
nd__ has joined #ocaml
nd__ has quit [Ping timeout: 250 seconds]
nd__ has joined #ocaml
bartholin has joined #ocaml
Serpent7776 has joined #ocaml
Guest3131 has joined #ocaml
nd__ has quit [Ping timeout: 258 seconds]
olle has joined #ocaml
olle has quit [Remote host closed the connection]
gzj has joined #ocaml
tengu12 has joined #ocaml
gzj has quit [Ping timeout: 258 seconds]
glassofethanol has joined #ocaml
glassofethanol has quit [Ping timeout: 256 seconds]
glassofethanol has joined #ocaml
olle has joined #ocaml
glassofe1hanol has joined #ocaml
glassofethanol has quit [Ping timeout: 240 seconds]
elf_fortrez has joined #ocaml
nd__ has joined #ocaml
glassofe1hanol has quit [Quit: leaving]
glassofethanol has joined #ocaml
nd__ has quit [Remote host closed the connection]
tengu12 has quit [Quit: Client closed]
Anarchos has joined #ocaml
<Anarchos> in the trunk version of dune, there is a dependency on lwt which should not be, as it is really difficult to install lwt without dune
vicfred_ has joined #ocaml
vicfred has quit [Ping timeout: 272 seconds]
<d_bot> <Kakadu> Output of `dune describe` may contain a sexp `(include_dirs (/media/mand/.opam/4..))`. What is that path in original data type? It looks like it can't be a string, because strings are converted using `ppx_sexp_conv` with quotes...
mbuf has quit [Quit: Leaving]
<d_bot> <Kakadu> maybe I even shouldn't parse 'dune describe' with ppx_sexp_conv...
vicfred_ has quit [Quit: Leaving]
vicfred has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
average has joined #ocaml
Tuplanolla has joined #ocaml
<d_bot> <Kakadu> problem has been resolved
elf_fortrez has quit [Quit: Client closed]
vicfred has quit [Quit: Leaving]
<d_bot> <monk> looks like angstrom doesn't allow general mutual recursion without doing kludgy stuff, it's all `fix` point based
<d_bot> <Kakadu> yep
<d_bot> <monk> angstrom and `fix` isn't kludgy, doing mutual recursion in angstrom is kludgy, to be clear (realize that might have sounded like an insult)
<d_bot> <monk> this kind of sucks for me because it would mean restructuring my code and thinking about this parser
<average> does anyone here have experience with Slack? the workplace chat thing
<average> is there any sane client for it out there? the browser client and their official desktop client are slow and annoying
<olle> average: Ask on their channel?
<average> there is no such channel
<d_bot> <monk> average, i use ripcord
<d_bot> <monk> and it works very well for slack as far as i've experienced
<d_bot> <monk> it's shareware, so you can use it for free
<d_bot> <monk> the creator is a cool guy
zebrag has joined #ocaml
<average> lemme have a look at this ripcord
<average> do you have a link?
<average> d_bot: <monk> : link>?
<d_bot> <monk> should be cancel.fm
<average> hm, it's not OSS
<d_bot> <Kakadu> Probably official discord app is not OSS too
<d_bot> <Kakadu> @average Maybe, some matrix client + discord bridge could help. If you manage to configure it, please, tell me your experience!
<average> how does discord fit into this? we're talking slack
<d_bot> <Kakadu> Matrix has slack bridget too 🙂
<d_bot> <Kakadu> My mistake
haesbaert has joined #ocaml
zebrag has quit [Quit: Konversation terminated!]
zebrag has joined #ocaml
olle has quit [Ping timeout: 258 seconds]
glassofethanol has quit [Quit: leaving]
berberman has joined #ocaml
berberman_ has quit [Ping timeout: 258 seconds]
<d_bot> <Kakadu> Why when we write `(fun x .... ((_,_) as m) _ -> ....)` parenthesis around 'as' are mandatory? The `m` is always a lowercase identifier, isn't it?
<d_bot> <octachron> Where does the as pattern start in `A B x as a`?
<d_bot> <Kakadu> as captures smallest one, i.e. 'x'
<d_bot> <monk> i want to believe that matrix is the future
<d_bot> <monk> and a lot of orgs/communities will eventually move to it
<d_bot> <monk> it just Has Everything That Everyone Wants but is open/free and, just as important, has a long run funding model that makes it development sustainable
<sim642> Even if it did capture just x, it would be incredibly confusing to read
<d_bot> <monk> (massive govt contracts with the EU)
<d_bot> <monk> maybe not the EU but euro countries, all the same
<d_bot> <monk> but it's a massive and huge pain to get people to move. platform capture is super real.
<d_bot> <monk> anyway, tangent over
<d_bot> <monk> i might walk away from this lisp implementation
<d_bot> <monk> don't have motivation to rewrite the parser using a different parser-combinator library and the errors i'm getting right now are confusing
<d_bot> <monk> maybe i just need to keep doing code golf until i get more comfortable with ocaml, idk
<d_bot> <Kakadu> @sim642: I that case it's ok to write parentheses, but I get frustrated when I'm required to write parentheses in `fun ({ asd; qwer } as m) -> ...`
<sim642> I think with "function" you wouldn't have to
kakadu has quit [Remote host closed the connection]
gravicappa has quit [Ping timeout: 245 seconds]
<brettgilio> Is the Unix sockets method the best way of creating a TCP server in OCaml, or is there a better way?
<brettgilio> nvm
<brettgilio> figured it out
Anarchos has joined #ocaml
Anarchos has quit [Ping timeout: 258 seconds]
mro has joined #ocaml
romildo has joined #ocaml
romildo has quit [Remote host closed the connection]
mro has quit [Ping timeout: 252 seconds]
Serpent7776 has quit [Quit: leaving]
zebrag has quit [Quit: Konversation terminated!]
average has quit [Quit: Connection closed for inactivity]
Anarchos has joined #ocaml
Anarchos has quit [Quit: Vision[0.10.3]: i've been blurred!]
<d_bot> <bikal> @Drup How do I get a list of child elements of `div` below when using Tyxml.Html?
<d_bot> <bikal> ```
<d_bot> <bikal> let div1 = div [a [txt "Foo"]];;
<d_bot> <bikal> ```
Tuplanolla has quit [Quit: Leaving.]
rak has joined #ocaml
bartholin has quit [Quit: Leaving]
PinealGlandOptic has joined #ocaml
tizoc has quit [Quit: Coyote finally caught me]
tizoc has joined #ocaml
Melantha has quit [Quit: WeeChat 3.2]
kor1 has joined #ocaml