<Strollman>
this might be the best stumble upon ever
<gonz_>
Strollman: You might also be interested to know that there is an excellent compiler frontend that enables you to compile OCaml to JavaScript. Since OCaml has a proper type system with sound type theory behind it, it means you can effectively write better web apps.
<gonz_>
Or you can write them more safely, I suppose I should say
steenuil__ is now known as steenuil
<gonz_>
Accidentally displaying "null" on a page wouldn't happen for even a novice, for example, whereas this happens even in JS code bases that should be more disciplined.
<Strollman>
ZirconiumX: not much currently learning C to do low level stuff and tinker with linux
<ZirconiumX>
You might like OCaml then. We're not as low level as C, but we can get higher-level stuff done much easier
<ZirconiumX>
Plus we have a package manager
<ZirconiumX>
Even better: we have *a* package manager. It's one of the few things the community can agree on...
<ZirconiumX>
(I jest, mostly)
<Strollman>
gonz_: i would like to do web apps but loathe javascript so ocaml can be the escape?
<ZirconiumX>
Yeah
<gonz_>
Strollman: Yes. We're currently using it as an escape in a project for that very reason.
<ZirconiumX>
You can write both front and back end in OCaml
<Strollman>
wtf
<Strollman>
no css????
<steenuil>
you'll still have to do styling in css
<ZirconiumX>
We replace JS, not HTML and CSS
<gonz_>
We haven't shopped around for a way to write CSS in OCaml yet. I'm not the one writing it. :D
<gonz_>
We use a library called `bucklescript-tea` to generate the content itself, so we do write (most) HTML in OCaml
<gonz_>
What we don't write we insert into elements dynamically (SVG stuff, etc.)
<Strollman>
mind = blown
<gonz_>
Not really dynamically, but yeah, as text
<Strollman>
any example of web app in ocaml link?
<Drup>
gonz_: I should try to take time to make tyxml fit on top of that, it's a better API ...
<discord>
<rizo> Strollman: If you're learning C I highly recommend looking at "Unix system programming in OCaml" https://ocaml.github.io/ocamlunix/
<discord>
<rizo> If you want to understand a little bit of the history of OCaml and how it compares to other languages I suggest watching this: https://vimeo.com/153042584
Haudegen has joined #ocaml
<Strollman>
can write mobile apps with reason too?
_andre has joined #ocaml
<Drup>
People have written them in OCaml, so yes
<Drup>
(Well, and Facebook messenger is mostly Reason nowadays I think ?)
<discord>
<rizo> The web app yes. The mobile one I'm not sure. But you can use ReasonReact native.
<discord>
<rizo> There were some examples of actual iOS apps written directly in OCaml but I'm not sure how polished is the tooling for that.
<Strollman>
"being able to compile to barebone assembly, iOS, Android and even microcontrollers!"
<Strollman>
i like how the language is low-key with a really great community
<Strollman>
g2g this was fun
<Strollman>
thanks a lot people
Strollman has quit [Quit: Leaving]
<reynir>
that was cool
<ZirconiumX>
I guess "Strollman" was a good name for somebody who wanders into IRC channels
jao has quit [Remote host closed the connection]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
hdon has joined #ocaml
<reynir>
heh
hdon has quit [Ping timeout: 240 seconds]
neatonk has quit [Ping timeout: 255 seconds]
NingaLeaf has joined #ocaml
dejanr has quit [Ping timeout: 264 seconds]
dhil has joined #ocaml
malina has quit [Ping timeout: 256 seconds]
jao has joined #ocaml
dejanr has joined #ocaml
dhil has quit [Ping timeout: 276 seconds]
dejanr has quit [Ping timeout: 256 seconds]
dejanr has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 256 seconds]
jbrown has joined #ocaml
FreeBirdLjj has joined #ocaml
dhil has joined #ocaml
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
NingaLeaf has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
NingaLeaf has joined #ocaml
jaar has quit [Ping timeout: 245 seconds]
malina has joined #ocaml
Haudegen has quit [Remote host closed the connection]
sagotch has quit [Ping timeout: 256 seconds]
manas has joined #ocaml
manas has quit [Client Quit]
freyr69 has quit [Remote host closed the connection]
ziyourenxiang has quit [Quit: Leaving]
halogenandtoast has quit [Ping timeout: 260 seconds]
ygrek has joined #ocaml
larhat has joined #ocaml
wilfredh has joined #ocaml
<wilfredh>
am I correct in saying that .mli files are edited by humans, not generated?
<wilfredh>
should I always write a foo.mli for a foo.ml file?
<steenuil>
wilfredh, yes and not always
<Fardale>
wilfredh: for what I know you need mli to restrict the interface of your module
<Fardale>
If you don't have any restriction you don't need it
<wilfredh>
OK, so I only want a .mli file if I want some of my functions to be private?
<wilfredh>
ah, OK
<Fardale>
You can use the compiler to generate it for you and made change to it
<steenuil>
mli files are usually where the documentation should go
<wilfredh>
looking at some ocaml code in the wild, there seems to be some duplication -- I've seen type definitions in both .ml and .mli
<Fardale>
The .mli file can be use to put the docstring in it to generate documentation with odoc
<wilfredh>
is there any nice way to keep them in sync?
lfish has joined #ocaml
larhat1 has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
nullifidian has joined #ocaml
<lfish>
hello, I have a problem: I'm trying to install some ocaml libraries, but keep getting 'Error: this expression has type string but an expression was expected of type bytes' in several files, what should I do?
<reynir>
Your files or in the libraries?
<wilfredh>
Fardale, steenuil: thanks :)
<lfish>
libraries
cbot has joined #ocaml
<lfish>
pa_ounit, pa_test and sqlexpr so far
<steenuil>
wilfredh, I don't think so, you'll have to copy and paste
<octachron>
lfish, pa_ounit and pa_test are deprecated
larhat has joined #ocaml
larhat1 has quit [Read error: Connection reset by peer]
larhat1 has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
<steenuil>
yeah, I don't think the pa_ libraries are mantained anymore
wilfredh has quit [Ping timeout: 268 seconds]
larhat has joined #ocaml
larhat1 has quit [Read error: Connection reset by peer]
larhat1 has joined #ocaml
larhat has quit [Read error: Connection reset by peer]
larhat1 has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
jnavila has joined #ocaml
Haudegen has joined #ocaml
<lfish>
makes sense... I was trying to run an example I found somewhere, so I wondered. Thanks
larhat has quit [Read error: Connection reset by peer]
larhat1 has joined #ocaml
lfish has quit [Quit: Page closed]
shinnya has quit [Ping timeout: 265 seconds]
jnavila has quit [Ping timeout: 240 seconds]
cryptocat1094 has joined #ocaml
mbuf has quit [Quit: Leaving]
<discord>
<Christophe> Wasn't there talk about not needing in .ml file what is defined in the .mli, like types ? Or was for type annotations?
<discord>
<n4323> hmm, i remember a scheme where an upstream .ml file contains only the type definitions and is included in both the downstream .ml and .mli ? am i wrong?
<discord>
<rizo> That is supported now by dune I think. It’s possible to have mli-only files and import those.