adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://www.ocaml.org | OCaml 4.06.0 release notes: https://caml.inria.fr/pub/distrib/ocaml-4.06/notes/Changes | Try OCaml in your browser: http://try.ocamlpro.com | Public channel logs at http://irclog.whitequark.org/ocaml
JimmyRcom_ has joined #ocaml
Jesin has quit [Quit: Leaving]
halogenandtoast has joined #ocaml
Jesin has joined #ocaml
markoong has quit [Read error: Connection reset by peer]
markoong has joined #ocaml
silver_ has joined #ocaml
markoong has quit [Ping timeout: 256 seconds]
silver has quit [Ping timeout: 260 seconds]
halogenandtoast has quit [Ping timeout: 264 seconds]
halogenandtoast has joined #ocaml
zolk3ri has quit [Remote host closed the connection]
zolk3ri has joined #ocaml
zolk3ri has quit [Client Quit]
zolk3ri has joined #ocaml
zolk3ri has quit [Client Quit]
ygrek has quit [Ping timeout: 240 seconds]
zolk3ri has joined #ocaml
mfp has quit [Ping timeout: 276 seconds]
tormen_ has joined #ocaml
zolk3ri has quit [Quit: leaving]
tormen has quit [Ping timeout: 240 seconds]
ratschance has quit [Remote host closed the connection]
ratschance has joined #ocaml
hdon has quit [Ping timeout: 256 seconds]
hdon has joined #ocaml
hdon has quit [Ping timeout: 265 seconds]
halogena1dtoast has joined #ocaml
halogenandtoast has quit [Ping timeout: 265 seconds]
pierpa has quit [Quit: Page closed]
silver_ has quit [Quit: rakede]
tormen has joined #ocaml
tormen_ has quit [Ping timeout: 248 seconds]
halogenandtoast has joined #ocaml
halogena1dtoast has quit [Ping timeout: 255 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
cbot_ has joined #ocaml
cbot has quit [Ping timeout: 240 seconds]
pierpal has quit [Read error: Connection reset by peer]
NingaLeaf has joined #ocaml
NingaLeaf has quit [Client Quit]
jao has quit [Ping timeout: 256 seconds]
jbrown has quit [Ping timeout: 240 seconds]
pierpal has joined #ocaml
pierpal has quit [Ping timeout: 240 seconds]
nopf has quit [Remote host closed the connection]
hdon has joined #ocaml
hdon has quit [Ping timeout: 240 seconds]
iitalics has joined #ocaml
al-damiri has quit [Quit: Connection closed for inactivity]
mbuf has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 256 seconds]
nullifidian has quit [Remote host closed the connection]
FreeBird_ has quit [Remote host closed the connection]
sgnb has joined #ocaml
Haudegen has joined #ocaml
freyr69 has joined #ocaml
sagotch has joined #ocaml
tarptaeya has joined #ocaml
hdon has joined #ocaml
cbot_ has quit [Quit: Leaving]
hdon has quit [Ping timeout: 264 seconds]
JimmyRcom_ has quit [Ping timeout: 256 seconds]
tarptaeya has quit [Remote host closed the connection]
tarptaeya has joined #ocaml
TarVanimelde has joined #ocaml
argent_smith has joined #ocaml
TarVanimelde has quit [Quit: TarVanimelde]
aubian is now known as Fistine
iitalics has quit [Quit: WeeChat 2.1]
<freyr69> I have a heterogeneous GADT list of type (_,_) l = Cons : 'a * ('b,'c) l -> ('a -> 'b, 'c) l | Nil : ('a,'a) l
<bartholin> yes
<freyr69> Is it possible to write a function using label with the default GADT value?
<freyr69> let cons : type a b c. ?l:(a, b)l -> c -> (c -> a, b) l = fun ?(l = Nil) x -> Cons (x,l)
<freyr69> Like this
<freyr69> general enough
<def`> No because Nil is less general.
<def`> It fixates a = b.
<freyr69> I see, thanks
nahra has quit [Remote host closed the connection]
dhil has joined #ocaml
malina has joined #ocaml
malina has quit [Remote host closed the connection]
pierpal has joined #ocaml
hdon has joined #ocaml
hdon has quit [Ping timeout: 240 seconds]
mfp has joined #ocaml
nullifidian has joined #ocaml
ziyourenxiang has joined #ocaml
malina has joined #ocaml
zolk3ri has joined #ocaml
jaar has joined #ocaml
carton has quit [Ping timeout: 264 seconds]
sagotch has quit [Ping timeout: 240 seconds]
carton has joined #ocaml
jao has joined #ocaml
hdon has joined #ocaml
Haudegen has quit [Remote host closed the connection]
hdon has quit [Ping timeout: 260 seconds]
markoong has joined #ocaml
Strollman has joined #ocaml
sagotch has joined #ocaml
<Strollman> what's so good about this channel that it has so many users?
<Fardale> Strollman: because it's about ocaml
<Strollman> Fardale: what's so good about it, never heard of it before?
<Fardale> ocaml or this chan ?
<Strollman> Fardale: ocaml
<Drup> It's the best programming language ever! \O/
<ZirconiumX> Strollman: The community keeps itself quiet, which is why it's not very well known
<ZirconiumX> It's rather flexible, without being complex
<ZirconiumX> It's used for writing compilers, for example; Rust was initially written in OCaml.
<Strollman> ZirconiumX: well this is interesting af
<Drup> ZirconiumX: while OCaml is good at writing compilers, please don't propagate the myth that it's *only* good for that ;)
<Strollman> Drup, what else?
<Drup> It's a general purpose language, it has been used for a lot of things
<Strollman> i just stumbled upon the channel while browsing freenodes chan list and asap googled ocaml
<ZirconiumX> Drup: "for example"
<discord> <rizo> We need to update that page...
<Drup> We do, but it's still pretty relevant
<Drup> https://ocaml.org/learn/companies.html is probably more up to date, and paints a pretty interesting picture by itself
<discord> <rizo> Strollman: depending on your background you might find it interesting for many things.
nullifidian has quit [Remote host closed the connection]
<ZirconiumX> Strollman: How much programming experience do you have?
<gonz_> Strollman: Read "Real World OCaml" (https://v1.realworldocaml.org/v1/en/html/) and start playing with it
<ZirconiumX> V2 might be better
<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/
<Drup> Strollman: https://www.besport.com/
<discord> <rizo> Hm.... well technically messenger.com is OCaml too! 😃
<Strollman> Unix system programming in OCaml no way
<Strollman> i hangout in most tech forums chans e.t.c and never come across oCaml how?
<Drup> Strollman: have you heard of Reason ?
<ZirconiumX> Granted, the standard library Unix module is a very thin layer on top of POSIX, but that has its advantages as well as its disadvantages.
sgnb has quit [Remote host closed the connection]
<steenuil> it's an old language so people aren't s hyped about it as they would be with e.g. Rust
<steenuil> though ReasonML is pretty new and shiny
<Strollman> Drup: no, what is Reason?
<Drup> I'm surprised you missed that particular hype :p
sgnb has joined #ocaml
<steenuil> Strollman: https://reasonml.github.io/
<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> from what i've gathered if i can be leet with oCaml i can preety much write software that runs on web, desktop, mobile and embedded right?
<discord> <Christophe> Yepa
<Strollman> what's would you recommend as an intro text?
<Strollman> what*
<ZirconiumX> Strollman: Real World OCaml
dhil has quit [Ping timeout: 240 seconds]
<Strollman> Thanks
<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.
<discord> <rizo> Supported with some caveats.
<discord> <n4323> on that page they say .mli only is tricky but .ml only is more safe. so it seems the .ml only version i described above may work ok.
<discord> <rizo> Right!
tarptaeya has quit [Quit: Konversation terminated!]
ygrek has quit [Remote host closed the connection]
hdon has joined #ocaml
malina has quit [Ping timeout: 256 seconds]
<Drup> Hm, I would have to check that I don't have an issue with tyxml
NingaLeaf has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JimmyRcom_ has joined #ocaml
cbot has quit [Ping timeout: 256 seconds]
hdon has quit [Ping timeout: 248 seconds]
pierpal has quit [Ping timeout: 260 seconds]
pierpal has joined #ocaml
malina has joined #ocaml
larhat1 has quit [Quit: Leaving.]
halogenandtoast has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
halogenandtoast has quit [Ping timeout: 268 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #ocaml
neatonk has joined #ocaml
dhil has quit [Ping timeout: 276 seconds]
jack5638 has quit [Ping timeout: 260 seconds]
neatonk has quit [Ping timeout: 276 seconds]
pierpa has joined #ocaml
freyr69 has joined #ocaml
freyr69 has quit [Quit: ERC (IRC client for Emacs 26.1)]
al-damiri has joined #ocaml
jack5638 has joined #ocaml
Haudegen has joined #ocaml
jnavila has joined #ocaml
shinnya has joined #ocaml
cryptocat1094 has quit [Quit: later]
neatonk has joined #ocaml
neatonk has quit [Ping timeout: 276 seconds]
jnavila has quit [Remote host closed the connection]
noitakomentaja has joined #ocaml
argent_smith has quit [Quit: Leaving.]
andrewalker has quit [Quit: ZNC 1.6.2 - http://znc.in]
haesbaer1 has joined #ocaml
haesbaert has quit [Read error: Connection reset by peer]
markoong has quit [Quit: Konversation terminated!]
markoong has joined #ocaml
markoong has quit [Ping timeout: 264 seconds]
JimmyRcom_ has quit [Ping timeout: 240 seconds]
Jesin has quit [Quit: Leaving]
pioneer42 has joined #ocaml
Haudegen has quit [Remote host closed the connection]
pioneer42 has quit [Quit: Leaving.]