Leonidas changed the topic of #ocaml to: Discussion about the OCaml programming language | http://www.ocaml.org | OCaml 5.1.1 released: https://ocaml.org/releases/5.1.1 | Try OCaml in your browser: https://try.ocamlpro.com | Public channel logs at https://libera.irclog.whitequark.org/ocaml/
tri has joined #ocaml
tri has quit [Ping timeout: 260 seconds]
cr1901_ has joined #ocaml
cr1901 has quit [Ping timeout: 268 seconds]
waleee has quit [Ping timeout: 272 seconds]
masterbuilder has quit [Remote host closed the connection]
masterbuilder has joined #ocaml
cr1901_ is now known as cr1901
tri has joined #ocaml
tri has quit [Ping timeout: 260 seconds]
mbuf has joined #ocaml
tomku has quit [Ping timeout: 260 seconds]
tomku has joined #ocaml
Serpent7776 has joined #ocaml
bartholin has joined #ocaml
troydm has joined #ocaml
mro has joined #ocaml
troydm has quit [Ping timeout: 256 seconds]
troydm has joined #ocaml
pie_ has quit []
pie_ has joined #ocaml
tri has joined #ocaml
tri has quit [Ping timeout: 255 seconds]
Tuplanolla has joined #ocaml
* mbuf Reminder: OCaml.org web development Twitch stream starting today, Monday, May 6, 2024 at 1530 GMT | 1630 CEST | 2000 IST https://www.twitch.tv/shakthimaan
tri has joined #ocaml
tri has quit [Ping timeout: 268 seconds]
mro has quit [Remote host closed the connection]
myrkraverk__ has quit [Remote host closed the connection]
myrkraverk__ has joined #ocaml
patrick_ is now known as patrick
tremon has joined #ocaml
ocra8 has joined #ocaml
patrick is now known as Guest4531
Guest4531 has quit [Killed (calcium.libera.chat (Nickname regained by services))]
patrick_ has joined #ocaml
gzar has joined #ocaml
jabuxas has joined #ocaml
tri has joined #ocaml
tri has quit [Ping timeout: 268 seconds]
mbuf has quit [Quit: Leaving]
jabuxas has quit [Ping timeout: 240 seconds]
jabuxas has joined #ocaml
jabuxas has quit [Ping timeout: 246 seconds]
tri has joined #ocaml
tri has quit [Ping timeout: 272 seconds]
chiselfuse has quit [Remote host closed the connection]
chiselfuse has joined #ocaml
SquidDev has quit [Remote host closed the connection]
<gzar> Whats the core difference between haskell and ocaml?
<bartholin> gzar: haskell needs monads to get side-effects, in ocaml you can get side-effect in a simple way, like in an imperative language
<gzar> you can have monads in ocaml as well, but besides that, i hardly could tell whats different
<gzar> so its the imperative features that differentiate it
SquidDev has joined #ocaml
<gzar> thats very cool. It kinda bugs me a bit that i can't really use it anywhere though
<bartholin> also, Haskell has typeclasses, and ocaml has objects, but those are advanced features
<gzar> dont know what typeclasses are, but i familiarized myself with ocamls objects a little
ocra8 has quit [Quit: WeeChat 4.2.2]
<discocaml> <yawaramin> many people are using ocaml in production https://ocaml.org/industrial-users
jabuxas has joined #ocaml
remexre has quit [Remote host closed the connection]
remexre has joined #ocaml
waleee has joined #ocaml
<discocaml> <functionalprogramming> typeclasses vs ML modules is the largest difference i’d say
<gzar> is the syntax also different? from the looks of it its only vaguely simmilar
<discocaml> <Kali> ocaml is imperative, object-oriented, and functional, while haskell is pure functional
<discocaml> <Kali> their methods of semantic organization also differ (ocaml modules, haskell typeclasses)
<discocaml> <Kali> ocaml's language features are non-optional besides a select few while haskell permits you to enable and disable them at will
<discocaml> <Kali> haskell is lazy and ocaml is strict (evaluation)
<gzar> alright, thanks, that clarifies it
<discocaml> <Kali> their syntax is fairly different but there are many parallels
<discocaml> <Kali> ocaml ignores whitespace and haskell uses it semantically
<discocaml> <Kali> ocaml has algebraic effects and haskell does not
<discocaml> <Kali> those are the major differences
<gzar> typeclasses seem to be just variant types, or am i wrong on this
<discocaml> <yawaramin> no they are more like interfaces on a superficial level
<discocaml> <yawaramin> OCaml functions also have named and optional arguments
<gzar> yeah but the named and optional arguments really mess with the type system
<discocaml> <deepspacejohn> I don't think they have any effect on the type system? other than that function types can have named and optional arguments in their signatures in addition to positional arguments.
<discocaml> <yawaramin> there's a recommended way of using them which works well
<discocaml> <yawaramin> oh and huge difference–compile speeds. OCaml is similar to Go (fast), Haskell is similar to Rust (slow)
<discocaml> <yawaramin> personally, fast iteration loop is super important for me
bartholin has quit [Quit: Leaving]
Anarchos has joined #ocaml
Serpent7776 has quit [Ping timeout: 246 seconds]
Anarchos has quit [Quit: Vision[]: i've been blurred!]
jabuxas has quit [Ping timeout: 268 seconds]
tremon has quit [Quit: getting boxed in]
<gzar> true yeah. what i mean is, if you define an ocaml function with a named parameter, you cannot use that function without explicitly stating the named parameter. you cant omit the name. And it has a different signature, meaning even if 2 functions take and return an int, if one of them uses a named parameter, you cannot use them interchangibly
<discocaml> <yawaramin> > you cant omit the name
<discocaml> <yawaramin> that's desirable
Tuplanolla has quit [Quit: Leaving.]
<gzar> maybe, but the type-incompatbility between the functions isnt for me
<gzar> a parameter with a different name will produce a different function signature
<discocaml> <yawaramin> sure, people have different preferences, and can even change with time 🤷‍♂️
<discocaml> <leviroth> I think it would be really annoying and error-prone if the following type-checked: `module M : sig val send_email : require_confirmation:bool -> unit end = struct let send_email ~skip_confirmation = ... end`
<gzar> fair point
<discocaml> <contextfreebeer> can't be overstated how fast the compiler is, it's insane
<discocaml> <contextfreebeer> the compiler is doing a lot less than e.g. ghc but still
waleee has quit [Ping timeout: 268 seconds]