<discocaml>
<darrenldl> noob1: no inherent issues - for computer science, you can find open source curriculum that looks on par with what uni provides, if just for programming, then you'll find plenty of resources online
<discocaml>
<darrenldl> there's debate on which lang is best as your first programming lang, and people seem to lean toward "mainstream" ones with very large community, e.g. python, java, but i think ocaml is a pretty alright choice
<discocaml>
<Kali> if i was going to teach someone how to program who didn't know anything about programming, i would likely choose lua or ocaml
<discocaml>
<uberpyro181> personally i think ocaml is quite good educationally, but if you are trying to get a programming job then a more mainstream language may provide more opportunities
<discocaml>
<Kali> ^
spip has quit [Quit: Konversation terminated!]
count3rmeasure has joined #ocaml
count3rmeasure has quit [Read error: Connection reset by peer]
Serpent7776 has joined #ocaml
ds-ac has joined #ocaml
bartholin has joined #ocaml
random-jellyfish has quit [Quit: Client closed]
TrillionEuroNote has quit [Ping timeout: 246 seconds]
TrillionEuroNote has joined #ocaml
mongol has joined #ocaml
mongol has quit [Remote host closed the connection]
bartholin has quit [Quit: Leaving]
gareppa has joined #ocaml
John_Ivan_ has joined #ocaml
John_Ivan has quit [Ping timeout: 250 seconds]
spip has joined #ocaml
azimut_ has quit [Ping timeout: 240 seconds]
m5zs7k has quit [Ping timeout: 246 seconds]
m5zs7k has joined #ocaml
<discocaml>
<vompura> Does anyone here think object oriented programming sucks?
<discocaml>
<vompura> I don't mean simply not liking it, but thinking that it is actually bad from a technical point of view?
<discocaml>
<octachron> `sucks` is too broad and pointlessly agressive.
<discocaml>
<vompura> I worked as a Java developer for 7 years and the more experienced I became the closer I was getting to a functional style with heavy use of immutability and closures etc.
<discocaml>
<vompura> Sure, I don't mean to be aggressive, I don't take it that way. I am not a purist either
<discocaml>
<octachron> I tend to think that many OO programming languages ended up accidentally mixing up separate concerns in a non-ideal way while trying to get away from imperative programming languages.
<discocaml>
<octachron> Neither abstraction, nor modularity, nor polymorphism should be tied to an object system.
<discocaml>
<octachron> And I don't know how to characterize the lack of algebraic types and pattern matching.
<discocaml>
<vompura> You make good points
<discocaml>
<vompura> One thing that I think about is how OO seems like a natural progression from imperative
<discocaml>
<vompura> For example in C you often will have a data structure and a file with a load of mehods for manipulating the structure, taking a pointer to the structure as the first argument
<discocaml>
<vompura> So C++ classes would be a natural extension of it, and this makes sense. In this way of thinking, I can't see a huge difference between imperative and OO
<discocaml>
<vompura> Of course OO added all kinds of stuff like inheritance
<discocaml>
<vompura> Inheritance really seems like a bad idea in most cases
<discocaml>
<octachron> Having a bunch of functions manipulating a main data type and taking it as a first main parameter is also how OCaml modules are organized.
<discocaml>
<vompura> We were taught to think how to make code fit into inheritance hierarchies to "reuse" code, but I quickly learned it was an absolute mess
<discocaml>
<vompura> Yeah, in that sense it feels a bit OO-like
<discocaml>
<octachron> I disagree, that's one the point where modularity + abstraction is conflated with objects in OO systems.
<discocaml>
<vompura> What do you mean?
<discocaml>
<octachron> There is no reason to add all other features of object system to solve a code organization problem.
<discocaml>
<vompura> Do you think functional programming produces better results than OO for a given project? Assuming both are well-implemented?
<discocaml>
<octachron> I don't know, even more so when `well-implemented` is doing a lot of heavy lifting.
<discocaml>
<octachron> I prefer to think that functional programming strikes a better balance of expressiveness, complexity and nudging towards correctness.
<discocaml>
<bluddy5> There are things OOP handles better. For example, any time you want to let the users expand functionality, functional programming has a hard time dealing with it.
<discocaml>
<bluddy5> OOP's bundling of code and data, however, while nice in theory, is almost always too constraining.
<adrien>
I'm starting to use alcotest and I'm running processes which write to stderr; is there a way to get that (when a test fail)?
<adrien>
hmmm, that's maybe lwt
<adrien>
yeah, that was lwt: Lwt_process.open_process_full was taking precedence on reading stderr, and Lwt_process.open_process doesn't default to `Keep for ?stderr
<adrien>
ok, that last part was too weird and I can't reproduce it: ?stderr indeed defaults to `Keep
waleee has joined #ocaml
waleee has quit [Ping timeout: 240 seconds]
SquidDev0 has joined #ocaml
SquidDev has quit [Ping timeout: 250 seconds]
SquidDev0 is now known as SquidDev
ridcully_ has joined #ocaml
ridcully has quit [Ping timeout: 250 seconds]
<reynir>
I think I had success with adding %!, but my memory is fuzzy and it may have been something else
<adrien>
another alcotest question: is it possible to check that a call to Lwt functions raise an exception?
olle has joined #ocaml
azimut has quit [Ping timeout: 240 seconds]
midgard has quit [Ping timeout: 250 seconds]
midgard has joined #ocaml
azimut has joined #ocaml
waleee has joined #ocaml
waleee has quit [Ping timeout: 260 seconds]
Tuplanolla has joined #ocaml
mechap has joined #ocaml
mechap has left #ocaml [WeeChat 4.0.0]
mechap has joined #ocaml
gareppa has quit [Quit: WeeChat 3.8]
gareppa has joined #ocaml
gareppa has quit [Quit: WeeChat 3.8]
fdisotto_ has left #ocaml [Leaving]
midgard has quit [Quit: Bye]
midgard has joined #ocaml
gareppa has joined #ocaml
gareppa has quit [Quit: gareppa]
olle has quit [Remote host closed the connection]
Serpent7776 has quit [Quit: leaving]
mithromdir has quit [Quit: Connection closed for inactivity]
bartholin has quit [Quit: Leaving]
<discocaml>
<xavierm02_> It there a way to tell the compiler "trust me it's fine" when there is an error `Error: Cannot safely evaluate the definition of the following cycle of recursively-defined modules: Self -> F_Self -> Self. There are no safe modules in this cycle (see manual section 12.2).`?
<discocaml>
<xavierm02_> (I have a module type `Calculus = sig type t val uid : t Type_equal.Id.t ... end` , and am building the calculus obtained by iterating a functor `F : Calculus -> Calculus`, and the `uid` can not simply be added at the end because it is used to simplify coercions. I know I could just have `val uid : unit -> t Type_equal.Id.t`, but I'd prefer just disabling the safety check (locally if possible).
<discocaml>
<xavierm02_> (I have a module type `Calculus = sig type t val uid : t Type_equal.Id.t ... end` , and am building the calculus obtained by iterating a functor `F : Calculus -> Calculus`, and the `uid` can not simply be added at the end because it is used to simplify coercions. I know I could just have `val uid : unit -> t Type_equal.Id.t`, but I'd prefer just disabling the safety check (locally if possible).)