2026/02/09

Newest at the top

2026-02-09 23:17:00 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds)
2026-02-09 23:16:13 +0100peterbecich(~Thunderbi@71.84.33.135) peterbecich
2026-02-09 23:12:08 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-09 23:08:35 +0100comonad(~comonad@pd9e072e5.dip0.t-ipconnect.de)
2026-02-09 23:02:31 +0100comonad(~comonad@p200300d02722ae00dce4ce9451b59974.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
2026-02-09 23:01:34 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds)
2026-02-09 23:00:32 +0100eriedaberrie_eriedaberrie
2026-02-09 22:58:23 +0100Alex_delenda_est(~al_test@85.174.182.86)
2026-02-09 22:56:21 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-09 22:47:42 +0100 <ski> you could define a "class" as a function of type `O -> O' (taking `self'/`this' as input), and to instantiate a new object of this class, you call `fix' on it
2026-02-09 22:46:37 +0100 <ski> you need either mutation, or delaying application of `fix', to implement this
2026-02-09 22:45:30 +0100 <ski> or, you can express it in terms of classes (object templates. not directly related to object types), instead of creating a new object, you create a new subclass, overriding `g' with a new implementation. the old `f' in the new class should now call the new `g'
2026-02-09 22:45:05 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 265 seconds)
2026-02-09 22:44:21 +0100 <ski> EvanR : given an object with two methods `f' and `g', where the implementation of `f' calls `g' (in the same object). now, you construct a new object from this old one, replacing the `g' implementation. "open recursion" means that `f' in this object will now call the new `g', rather than the old
2026-02-09 22:39:59 +0100target_i(~target_i@user/target-i/x-6023099) (Quit: leaving)
2026-02-09 22:38:19 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-09 22:36:55 +0100michalz(~michalz@185.246.207.200) (Remote host closed the connection)
2026-02-09 22:35:57 +0100 <c_wraith> technically you can do it with recursion schemes in Haskell, but no one writes their code that way
2026-02-09 22:35:36 +0100 <c_wraith> open recursion is a term used primarily to describe OOP's late dispatch mechanisms
2026-02-09 22:35:12 +0100 <EvanR> ski, "open recursion" vs general recursion?
2026-02-09 22:30:56 +0100takuan_dozo(~takuan@d8D86B9E9.access.telenet.be) (Ping timeout: 240 seconds)
2026-02-09 22:28:03 +0100 <lambdabot> Nice!
2026-02-09 22:28:03 +0100 <ski> @where+ polymorphic-type-inference "Polymorphic Type Inference" by Michael I. Schwartzbach in 1995-03 at <https://cs.au.dk/~amoeller/mis/typeinf.p(s|df)>,<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.57.1493>
2026-02-09 22:27:20 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 240 seconds)
2026-02-09 22:27:03 +0100 <ski> (oh, try <https://cs.au.dk/~amoeller/mis/typeinf.pdf> for the last one)
2026-02-09 22:26:35 +0100picnoir(~picnoir@about/aquilenet/vodoo/NinjaTrappeur) NinjaTrappeur
2026-02-09 22:25:12 +0100 <ski> might also be helpful
2026-02-09 22:25:05 +0100 <lambdabot> "Polymorphic Type Inference" by Michael I. Schwartzbach in 1995-03 at <https://cs.au.dk/~mis/typeinf.p(s|df)>,<http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.57.1493>
2026-02-09 22:25:05 +0100 <ski> @where polymorphic-type-inference
2026-02-09 22:24:41 +0100picnoir(~picnoir@about/aquilenet/vodoo/NinjaTrappeur) (Quit: WeeChat 4.8.1)
2026-02-09 22:24:37 +0100 <ski> these talk, amongst other things, about subtyping, parametric polymorphism, existential quantification. and how existentials are related to closures & object-orientation, and also (in a different way) to abstract data types
2026-02-09 22:23:41 +0100 <lambdabot> "On Understanding Data Abstraction, Revisited" by William R. Cook in 2009-10 at <http://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf>
2026-02-09 22:23:41 +0100 <ski> @where on-understanding-revisited
2026-02-09 22:23:38 +0100 <lambdabot> "On Understanding Types, Data Abstraction, and Polymorphism" by Luca Cardelli,Peter Wegner in 1985-12 at <http://lucacardelli.name/Papers/OnUnderstanding.A4.pdf>
2026-02-09 22:23:38 +0100 <ski> @where on-understanding
2026-02-09 22:23:12 +0100 <ski> also, you can specify that an argument type, or result type, of a method is of "This" class (like "binary methods" and "clone methods"). this in turn causes not all subclasses to induce subtypes (which OCaml tracks statically)
2026-02-09 22:22:33 +0100merijn(~merijn@host-cl.cgnat-g.v4.dfn.nl) merijn
2026-02-09 22:22:11 +0100 <ski> returning a clone of the current object, but with some of the instance fields swapped out
2026-02-09 22:21:52 +0100 <ski> yea, OCaml has support for immutable OO
2026-02-09 22:21:27 +0100 <ski> and both these two structuring approaches, "FP", and "OO", are important. both are available in Haskell (although message-dispatching syntax, like in Agda, would help encourage it a bit more). VisitorPattern is a way to simulate (via CPA) pattern-matching on variant types, in traditional OO languages
2026-02-09 22:20:46 +0100 <EvanR> functional
2026-02-09 22:20:43 +0100 <EvanR> see also ocaml for a function language that happens to also support OOP
2026-02-09 22:20:01 +0100 <EvanR> jreicher, cardelli theory of objects shows two simplistic OOP "calculi" one with mutable, one without. Both are superficially similar to LC. So yeah
2026-02-09 22:20:00 +0100 <ski> the point is that *one* way to construe "OO" is that the main idea is to structure your program around records with delayed (possibly parameterized) fields. with or without subtyping. with or without implementation inheritance and late binding, open recursion
2026-02-09 22:18:39 +0100 <ski> but they don't have message-dispatching definition syntax (called "copatterns" in Agda. also used, years before that, by e.g. Erik Poll)
2026-02-09 22:18:10 +0100 <KindFoxo> oh, I'm sorry... I don't read while writing...
2026-02-09 22:17:22 +0100 <KindFoxo> also, all the ML-like FP languages have record types, why should it be not an FP thing... I've seen some formalization of classes as coinductive types. In curry or Coq, not sure, sounds interesting to me... As for right now, I don't understand "the idea" behind OOP...
2026-02-09 22:16:23 +0100 <ski> (that's why i used quotes)
2026-02-09 22:16:13 +0100 <ski> yea, those two are very restricted, and highly stylized, alternatives, for the purpose of showing a duality
2026-02-09 22:15:26 +0100 <KindFoxo> ski: you've made Lisps not functional... and I guess the language FP does not fit in the definition being obviously a functional programming language