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/
itszor has quit [Ping timeout: 252 seconds]
droideqa has quit [Quit: Connection closed for inactivity]
bibi_ has quit [Ping timeout: 260 seconds]
wbooze has quit [Read error: Connection reset by peer]
ygrek has joined #ocaml
wickedshell has joined #ocaml
ygrek has quit [Remote host closed the connection]
Serpent7776 has joined #ocaml
agentcasey has quit [Read error: Connection reset by peer]
Exa has quit [Quit: see ya!]
wbooze has joined #ocaml
wbooze has quit [Quit: Leaving]
Exa has joined #ocaml
domq has joined #ocaml
wbooze has joined #ocaml
domq has quit [Client Quit]
bartholin has joined #ocaml
domq has joined #ocaml
Haudegen has joined #ocaml
<discocaml> <cod1r> how do the ocaml contributors keep track of the many ocaml orgs
<discocaml> <cod1r> how do the ocaml contributors keep track of the many ocaml github orgs
<discocaml> <cod1r> like there's ocaml-flambda, metaocaml, ocaml-community, batteries-included, ocaml-dune, ocaml-multicore, etc
<discocaml> <cod1r> breh
<discocaml> <cod1r> sometimes, i doom scroll ocaml related links and just learn about a new ocaml github org
bartholin has quit [Quit: Leaving]
<rustyne> what do you mean by: “keep track of the orgs”? they just exist to do whatever they do...
<discocaml> <cod1r> I guess im just wondering why it isn't more organized into fewer orgs
<discocaml> <cod1r> makes it harder for a newer person to understand the developments happening in the ocaml space
<discocaml> <cod1r> maybe it's just feels weird only to me...
<discocaml> <cod1r> i guess i could open a PR in the ocaml-org repo for this stuff...
<discocaml> <cod1r> maybe it just feels weird only to me...
<discocaml> <cod1r> i guess i could open a PR in the ocaml.org repo for this stuff...
<discocaml> <cod1r> flambda could be it's own repo under the ocaml org for example. ocaml-dune as well but 🤷‍♂️
<discocaml> <cod1r> ok actually...ocamlverse.net has a lot of it...; AND i just learned the ocamlverse is it's own org too 🤣
<discocaml> <cod1r> add that to the list
bibi_ has joined #ocaml
patrick_ is now known as patrick
patrick has quit [Changing host]
patrick_ has joined #ocaml
domq has quit [Quit: domq]
<rustyne> github orgs are an access control mechanism, not an ecosystem discovery one; discuss (or here, in a limited way) seems the place to go for the info you’re looking for
Anarchos has joined #ocaml
myrkraverk_ has joined #ocaml
myrkraverk has quit [Ping timeout: 252 seconds]
domq has joined #ocaml
<discocaml> <youngkhalid> just out of curiosity what is this bot connected to ?
<companion_cube> IRC
Guest72 has joined #ocaml
Guest72 has quit [Client Quit]
Guest51 has joined #ocaml
<Guest51> `print_endline "Hello World!"`
<discocaml> <youngkhalid> I know, saw the bot's description, but I meant where it’s actually hosted (like which server..etc). , IRC is a protocol. Figured it out already : ) !
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml> <youngkhalid> The libera chat UI is awesome ahah, simple stuff feelt like visiting a 2005 website, love it !
<companion_cube> oh yeah it's libera chat
<companion_cube> sorry :)
noze` has joined #ocaml
<noze`> I just tried to create an opam switch with ocaml-variants.4.14.1+options,ocaml-option-flambda but compilation failed
<noze`> is that expected?
Haudegen has quit [Quit: Bin weg.]
<noze`> (on an updated arch linux x86_64 laptop)
ygrek has joined #ocaml
bhoot has joined #ocaml
wbooze has quit [Quit: Leaving]
<octachron> This is not expected but not utterly suprising. What is the error message? Also 4.14.1 is superseded by 4.14.2.
dmbaturin_ is now known as dmbaturin
bhoot has quit [Read error: Connection reset by peer]
bhoot has joined #ocaml
wbooze has joined #ocaml
wbooze has quit [Max SendQ exceeded]
wbooze has joined #ocaml
wbooze has quit [Max SendQ exceeded]
wbooze has joined #ocaml
Guest51 has quit [Quit: Client closed]
Haudegen has joined #ocaml
wickedshell has quit [Remote host closed the connection]
<noze`> I get the following when opam runs make:
<noze`> # caml/prims.h:33:23: error: too many arguments to function ‘(value (*)(void))*(caml_prim_table.contents + (sizetype)((long unsigned int)*pc * 8))’; expected 0, have 2
<noze`> (there's more output but I'd have to put that into a pastebin somewhere)
patrick_ is now known as patrick
<octachron> That looks like gcc (or clang) breaking backward compatibility, the simplest fix might be to switch to at least 4.14.2
patrick has quit [Changing host]
patrick_ has joined #ocaml
bhoot has quit [Ping timeout: 252 seconds]
myrkraverk has joined #ocaml
wickedshell has joined #ocaml
myrkraverk_ has quit [Ping timeout: 276 seconds]
bhoot has joined #ocaml
domq has quit [Quit: domq]
bhoot has quit [Ping timeout: 276 seconds]
bhoot has joined #ocaml
bhoot has quit [Ping timeout: 272 seconds]
Haudegen has quit [Quit: Bin weg.]
bhoot has joined #ocaml
bhoot has quit [Ping timeout: 260 seconds]
bhoot has joined #ocaml
domq has joined #ocaml
<discocaml> <youngkhalid> Yo guys, I have a quick question. In my side projects to-do list I have to implement a DSL. I'm deciding between implementing everything from scratch or use Menhir (parser generator)
<discocaml> <youngkhalid> I kinda like Menhir but I saw some people saying that it has its cons too and "it suits more for toy projects" (I want to do the things right, but If I can get the same thing using Menhir, I'd rather do that). Any advices ?
<discocaml> <octachron> The OCaml compiler is using Menhir for parsing.
<discocaml> <contificate> Using menhir effectively, like using any LR parser generator, requires you understand the underlying principles of LR parsing (and parser generation).
bhoot has quit [Ping timeout: 248 seconds]
<discocaml> <youngkhalid> Wow ! didn't know that !
<discocaml> <contificate> A lot of people begin using Menhir by copying and pasting and then their intuition falls over when they try to do something themselves or retrofit a grammatical rule
<discocaml> <youngkhalid> Yes, like everything I guess xD. Just like when coding with any language, you have to understand how it works 😅 . I'm ready to take the challenge of learning about Menhir.
<discocaml> <contificate> Yes, but you don't get very good tools for working with the problems
<discocaml> <contificate> you get things invented for use with yacc to parse arithmetic only, in effect (can find a citation for this claim, from Aho and author of yacc, don't have it to hand)
<discocaml> <contificate> don't get me wrong, I was obsessed with LR parsing, but it's like.. for lots of practical use cases, it's better to teach Pratt parsing and normal recursive descent
<discocaml> <contificate> rather than explain "yeah yeah you'll need `%prec` here 😏 "
<discocaml> <youngkhalid> I see I see, so basically it's too much power to be playing around ?
<discocaml> <contificate> You can imagine it as being a somewhat opaque process that, even if you understand the process fully, you still have to reason at a tedious level to resolve grammatical problems - at scale, it's very tedious.
<discocaml> <contificate> There's an art to designing grammars for LR parsing.
<discocaml> <contificate> It's mentioned that OCaml uses an LR parser generator but.. the original view is rather negative
<discocaml> <youngkhalid> I think the main advantage is that you can get straight to the point, focus more on your language design, and have something more robust as these people already solved some problems you don't have to solve again
myrkraverk_ has joined #ocaml
wickedshell has quit [Ping timeout: 252 seconds]
<discocaml> <youngkhalid> I mean you always can learn more by lmplementing it from the ground up
<discocaml> <youngkhalid> what if it's a small language (dsl), isn't that complexity reduced by a lot ?
<discocaml> <contificate> you may still prefer to just write a handwritten parser, honestly
<discocaml> <contificate> it doesn't take much time and is more natural to maintain
myrkraverk has quit [Ping timeout: 248 seconds]
bhoot has joined #ocaml
<discocaml> <contificate> LR parsers are useful in many domains but for certain things, grammatically, I just know they're gonna cause problems and require tedious factorings to work
<discocaml> <contificate> application via juxtaposition is rather problematic, for example
<discocaml> <contificate> you may naively think `expr -> expr expr` is a valid production for application in an ML-like language, it is not
<discocaml> <contificate> people literally copy and paste the "simple" factoring from project to project
<discocaml> <yawaramin> i find Angstrom to be the easiest in practice for whipping up a parser
<discocaml> <contificate> and every SML compiler uses an LR parser generator and basically copies the grammar someone else wrote
bhoot has quit [Ping timeout: 260 seconds]
Haudegen has joined #ocaml
<discocaml> <deepspacejohn> I think quite a lot of projects (including OCaml!) use Menhir, so it's not a bad idea to learn it. Of course, it's a tool with pros and cons, like anything.
<discocaml> <contificate> menhir is definitely the best LR parser generator I know of, in terms of features and usability - I couldn't get anywhere with yacc/bison until I learned menhir and went back to yacc/bison like "this is like menhir, but much more tedious"
bhoot has joined #ocaml
Anarchos has joined #ocaml
bhoot has quit [Ping timeout: 252 seconds]
<discocaml> <deepspacejohn> Menhir's ability to find conflicts and manage error messages is nice, IMO. I admittedly haven't used other parser-generators with similar features to compare it though.
wickedshell has joined #ocaml
bhoot has joined #ocaml
bhoot has quit [Ping timeout: 252 seconds]
domq has quit [Ping timeout: 276 seconds]
<discocaml> <youngkhalid> Well , thanks everybody 🙂 , here's a little poll that can help me see more clearly
slothbee is now known as slothby
<discocaml> <contificate> you are missing the "both" option
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml> <contificate> can come to your own conclusions
bartholin has joined #ocaml
ygrek has quit [Remote host closed the connection]
euphores has quit [Quit: Leaving.]
domq has joined #ocaml
domq has quit [Client Quit]
Anarchos has joined #ocaml
euphores has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
<discocaml> <yawaramin> also missing the 'Other' option (eg https://github.com/inhabitedtype/angstrom )
<discocaml> <contificate> show us the language you intend to parse
<discocaml> <contificate> if it's fairly simple and wel structured, menhir and some basic LR parsing insights will suffice
<discocaml> <contificate> if it's fairly simple and well structured, menhir and some basic LR parsing insights will suffice
bibi_ has quit [Remote host closed the connection]
bibi_ has joined #ocaml
Anarchos has joined #ocaml
<discocaml> <youngkhalid> Something like this
<discocaml> <youngkhalid> ```
<discocaml> <youngkhalid> # Single comment
<discocaml> <youngkhalid>
<discocaml> <youngkhalid> @user {
<discocaml> <youngkhalid> _id : !objectid
<discocaml> <youngkhalid> username : !string >=3
<discocaml> <youngkhalid> email : !string
<discocaml> <youngkhalid> age : ?int >=13 <=1000
<discocaml> <youngkhalid> role : !string [admin, manager, user]
<discocaml> <youngkhalid> }, { timestamps: true }
<discocaml> <youngkhalid> ```
<discocaml> <youngkhalid> will take a look at it, thx !
euphores has quit [Quit: Leaving.]
euphores has joined #ocaml
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Tuplanolla has joined #ocaml
Anarchos has joined #ocaml
bartholin has quit [Quit: Leaving]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
Serpent7776 has quit [Ping timeout: 252 seconds]
gentauro has quit [Ping timeout: 276 seconds]
gentauro has joined #ocaml
Haudegen has quit [Quit: Bin weg.]