azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
cr1901 has quit [Quit: Leaving]
cr1901 has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
dh` has joined #ocaml
dh` has joined #ocaml
dh` has quit [Changing host]
waleee has quit [Ping timeout: 245 seconds]
trev has joined #ocaml
average has quit [Quit: Connection closed for inactivity]
pi3ce has joined #ocaml
gdd has quit [Ping timeout: 245 seconds]
rgrinberg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<discocaml>
<froyo> @dumbpotato : someone compiled stackoverflow developer survey answers and apparently the lang with largest % is apl
Tuplanolla has joined #ocaml
<discocaml>
<froyo> ok I just checked again, it wasn't the biggest lgbtq %, just the biggest trans %, but it's probably indicative.
<discocaml>
<froyo> first place APL at 12%
<discocaml>
<froyo> second crystal and third ocaml apparently
<discocaml>
<froyo> :D
<discocaml>
<froyo> at 7%, beating cl and haskell and lua by the double
<discocaml>
<froyo> (rust is even lower, 11th place)
ehrt74 has joined #ocaml
azimut has joined #ocaml
<greenbagels>
apl huh
<greenbagels>
didnt even realize people still used apl
<leah2>
haha
<discocaml>
<commutativeconjecture> interested in where i should dump feedback that i get from beginners trying to learn ocaml. stuff like: `opam` and `dune` not being bundled together, the lack of good documentation for local opam switches and opam lock files (and them being not recommended by default!), `dune` using s-expr instead of yaml, etc.
<discocaml>
<commutativeconjecture> interested in where i should dump feedback that i get from beginners trying to learn ocaml. stuff like: `opam` and `dune` not being bundled together, the lack of good documentation for local opam switches and opam lock files (and them not being recommended by default!), `dune` using s-expr instead of yaml, etc.
<greenbagels>
I find the yaml feedback to be interesting
<greenbagels>
I feel like if someone is in the programming scene enough to understand yaml then learning the dune syntax shouldn't be so weird
Guest2574 has quit [Killed (iridium.libera.chat (Nickname regained by services))]
patrick__ has joined #ocaml
ehrt74 has quit [Ping timeout: 252 seconds]
<discocaml>
<commutativeconjecture> there's a finite weirdness budget, all things that eat weirdness eat into that budget. most config files have moved toward json and many are moving to yaml/toml
<discocaml>
<commutativeconjecture> better imho to use that weirdness budget on things that are actually relevant / intrinsic complexity, rather than "[X] isn't that weird"
<discocaml>
<commutativeconjecture> also, many ppl i try to move to ocaml used js/ts, python, c/c++ in the pasdt
<discocaml>
<commutativeconjecture> also, many ppl i try to move to ocaml used js/ts, python, c/c++ in the past
<discocaml>
<commutativeconjecture> not prog newbies
<discocaml>
<darrenldl> what does c/c++ use as config?
<discocaml>
<commutativeconjecture> not sure how (non-)representative i am, but in my experience, ocaml is a good general prog lang, and there's a lot of "wooo ocaml is an arcane academic french functional prog lang", and reducing the weirdness helps a lot
<discocaml>
<commutativeconjecture> makefile/cmake iirc, been a while since i personally did
<discocaml>
<commutativeconjecture> not sure how (non-)representative i am, but in my experience, ocaml is a good general prog lang. but there's a lot of "wooo ocaml is an arcane academic french functional prog lang", and reducing the weirdness helps a lot
bartholin has joined #ocaml
<discocaml>
<froyo> yeah cmake hell
<discocaml>
<contificate> the gold standard for any build system is to avoid the general review: "it's painful to use, but then it just works"
<discocaml>
<contificate> as then absolute disasters like cmake stick
<discocaml>
<froyo> greenbagels, interestingly the person who compiled the data also pointed out that the largest intersection between trans programmers and those who use one language only is also in apl
<discocaml>
<froyo> second being python
<discocaml>
<froyo> so it's not just in use, people seem to be using it exclusively
<discocaml>
<froyo> would be nice to have a wiki site hosted on ocaml.org and community-source beginner grievances and their solutions in one big page
<discocaml>
<froyo> syntax weirdnesses, value vs unitary function, modules vs fcms, comparison operator shadowing, the role of ;; ...
<discocaml>
<froyo> those at the top of my head
<discocaml>
<froyo> the meaning of 'a in a type signature and the subtle differences between that and universal variables
<discocaml>
<bluddy5> ocamlverse.org was kinda built for that kind of thing
<discocaml>
<froyo> i say weirdness but rather false expectations
<discocaml>
<bluddy5> sorry ocamlverse.net
<discocaml>
<commutativeconjecture> @bluddy5 which page from ocamlverse do you have in mind?
<discocaml>
<bluddy5> The runtime is written in C, yes.
<discocaml>
<bluddy5> The bytecode's runtime is closer to a virtual machine.
<companion_cube>
There's a runtime in C, yes (with IO primitives, the gc, etc) but your code is typically compiled to native
azimut has quit [Ping timeout: 240 seconds]
azimut has joined #ocaml
romildo_ has joined #ocaml
azimut has quit [Remote host closed the connection]
azimut has joined #ocaml
<discocaml>
<gabyfle> What's the advantage of writing the runtime in C rather than using OCaml itself to write it ?
<discocaml>
<bluddy5> The runtime needs to be extremely efficient.
<discocaml>
<bluddy5> It also needs low-level access to memory.
<discocaml>
<contificate> You would also eventually need to appeal to system calls (at the very minimum) anyway, even if you did try to implement the runtime in OCaml itself. There's always a part that must actually deal with the operating system.
<discocaml>
<.armael.> it wouldn’t even be possible, the runtime provides the memory allocator, garbage collector
<discocaml>
<.armael.> Which ocaml code assumes already exists
<discocaml>
<darrenldl> re yaml: id like to think i have had more confusion with yaml than s-exprs. and parsing yaml in native ocaml needs a lot of effort that no one has done yet i think
<discocaml>
<gabyfle> Would it be possible theoretically to rewrite the OCaml runtime so that its written 100% ? Like for example, rewriting the garbage collector using OCaml
<discocaml>
<gabyfle> Would it be possible theoretically to rewrite the OCaml runtime so that its written 100% in OCaml ? Like for example, rewriting the garbage collector using OCaml
<discocaml>
<contificate> You could make more of it OCaml, definitely. There's no good reason to though.
<discocaml>
<.armael.> It would make more sense to rewrite it in rust, which is a good language for this kind of code
<discocaml>
<contificate> You can imagine languages that would support a kind of awkward runtime bootstrapping process, if designed that way from the beginning.
<discocaml>
<.armael.> (But the distribution / toolchain aspect would probably be cumbersome)
a51 has joined #ocaml
waleee has joined #ocaml
noonien852 has joined #ocaml
noonien85 has quit [Ping timeout: 256 seconds]
noonien852 is now known as noonien85
a51 has quit [Quit: WeeChat 4.1.2]
a51 has joined #ocaml
<discocaml>
<commutativeconjecture> companion_cube: "Dune using sexprs instead of yaml is a blessing, tbh" -> why?
<companion_cube>
Because yaml is terrible to parse and to write, sexprs are simpler and more robust
<discocaml>
<commutativeconjecture> i expect config files are much much more often read and edited than written-a-parser-for
<discocaml>
<contificate> why is yaml center stage when toml seems nicer than yaml
<discocaml>
<commutativeconjecture> but to be fair, i don't care much for _improving ocaml in some ways_, and much more about _documenting why ocaml shall not be improved in those ways_
szkl has joined #ocaml
rgrinberg has joined #ocaml
romildo_ has quit [Quit: Leaving]
<discocaml>
<functionalprogramming> yaml has too many features
neiluj has joined #ocaml
oriba has joined #ocaml
<discocaml>
<commutativeconjecture> i have 0 shares in yaml, and don't care for yaml vs toml vs json vs sexpr vs xml
<discocaml>
<commutativeconjecture> yaml having too many features seems largely independent to the point that i was raising: which was that many ppl used to some type of config files (around js and python) find s-exprs to be a hurdle
<discocaml>
<commutativeconjecture> i have 0 shares in yaml.inc, and don't care for yaml vs toml vs json vs sexpr vs xml
<discocaml>
<commutativeconjecture> yaml having too many features seems largely independent to the point that i was raising: which was that many ppl used to some type of config files (around js and python) find s-exprs to be a hurdle
<discocaml>
<rgrinberg> not having a spec complaint yaml parser written in OCaml is a hurdle to use it in an OCaml build system don't you think?
andrzejku has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andrzejku has joined #ocaml
trev has quit [Quit: trev]
<discocaml>
<contificate> I wouldn't say it's a hurdle, technically - at first glance at many weird config languages, I'd be tempted to use a tried and tested MIT licensed tiny C impl via bindings than a homegrown pure OCaml effort
<discocaml>
<contificate> the syntax of dune files is a surface level concern, I've never felt inconvenienced by S-expressions
andrzejku has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andrzejku has joined #ocaml
andrzejku has quit [Client Quit]
duncan has joined #ocaml
andrzejku has joined #ocaml
andrzejku has quit [Client Quit]
deadmarshal_ has quit [Ping timeout: 268 seconds]
<discocaml>
<deepspacejohn> The only times I’ve disliked dune files is when I’ve wanted to write a script that can parse them or generate them etc. Every language has a library that can parse json/yaml/toml.
cedric has joined #ocaml
olle has joined #ocaml
<olle>
Hmmm a sum type constructor is not first-class in a match clause right?
<olle>
match x with | A x -> ... | B x -> ...
<olle>
But make A and B interchangeable
<olle>
Like `T x` instead of `A x | B x`
<discocaml>
<._null._> You can't have things like `if b then A else B` as a pattern no
<olle>
Hm
deadmarshal_ has joined #ocaml
cedric has quit [Quit: Konversation terminated!]
<greenbagels>
maybe im weird but when i started learning ocaml i didnt even bother trying to mess with build systems
<greenbagels>
and when i did, it was just for very simple programs and i just used ocamlbuild
<olle>
null, you know why?
<discocaml>
<._null._> match are compiled statically, it allows for the exhaustive check and an optimising compilation
<discocaml>
<contificate> can't lie, I still invoke dune with verbose flag on occasion to see how much of the ocaml toolchain I don't know - sometimes I feel compelled to make a dune project, even for tiny little snippets, because of "just works" aspect once it's all there, even if I don't care for the hardly documented stanzas that you can only find by asking around here
<olle>
just wrap the constructor in something...?
<discocaml>
<._null._> It would also make the pattern syntax significantly more complex
<discocaml>
<._null._> Dynamic checks are done using `if` or `when`
<discocaml>
<contificate> I don't really understand olle's desire but you can use or-patterns (so long as bindings agree) and apply a guard to those
<olle>
contificate, link?
<discocaml>
<._null._> `let if_b_then_A_else_B b = function A _ -> b | B _ -> not b`
<discocaml>
<._null._> `match _ with (A x | B x) as a when if_b_then_A_else_B b a -> ...`
<olle>
cool, can I copy-paste it to the ocaml forum? irc is volatile for me.
<discocaml>
<._null._> Discord is also "not volatile", but sure, do as you please with this
<olle>
Right, Discord :d
<olle>
+1
olle has quit [Remote host closed the connection]
neiluj has quit [Remote host closed the connection]
bartholin has quit [Quit: Leaving]
dnh has joined #ocaml
xd1le has quit [Quit: xd1le]
azimut has quit [Ping timeout: 240 seconds]
dnh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]