Logs: liberachat/#haskell
| 2026-02-15 19:04:49 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2026-02-15 19:08:24 | × | ft quits (~ft@p4fc2afab.dip0.t-ipconnect.de) (Quit: Lost terminal) |
| 2026-02-15 19:11:07 | <jreicher> | ski: I have a problem with this Cook paper. The model of OO presented here, being based on closures and expressible in lambda calculus, is something that can be done Haskell, but I don't think that's how many people use the term "OO" or think of Haskell. I agree completely with the main point ADTs vs objects, but I suspect it should be explained using a word other than "object", because (IMO) an essential part of OO programming (in |
| 2026-02-15 19:11:08 | <jreicher> | mainstream languages) is the ability to break referential transparency by having direct control over mutable state. |
| 2026-02-15 19:12:11 | → | wickedjargon joins (~user@24.83.46.194) |
| 2026-02-15 19:15:44 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-15 19:16:48 | → | tzh joins (~tzh@c-76-115-131-146.hsd1.or.comcast.net) |
| 2026-02-15 19:18:11 | × | EvanR quits (~EvanR@user/evanr) (Ping timeout: 252 seconds) |
| 2026-02-15 19:20:13 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 2026-02-15 19:20:38 | → | lisbeths joins (uid135845@id-135845.lymington.irccloud.com) |
| 2026-02-15 19:20:56 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2026-02-15 19:22:00 | × | myme quits (~myme@2a01:799:d5e:5f00:30aa:7e47:3c40:13bd) (Ping timeout: 245 seconds) |
| 2026-02-15 19:23:15 | → | myme joins (~myme@2a01:799:d5e:5f00:1efd:1fab:dfd5:7518) |
| 2026-02-15 19:25:54 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 2026-02-15 19:27:01 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 2026-02-15 19:30:56 | × | emmanuelux_ quits (~em@92-184-96-253.mobile.fr.orangecustomers.net) (Quit: bye) |
| 2026-02-15 19:31:31 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-15 19:32:00 | → | emmanuelux joins (~em@user/emmanuelux) |
| 2026-02-15 19:32:07 | → | EvanR joins (~EvanR@user/evanr) |
| 2026-02-15 19:33:14 | → | prdak joins (~Thunderbi@user/prdak) |
| 2026-02-15 19:33:28 | <EvanR> | jreicher, this is arguably the main issue with OOP as a subject, that people can't agree on what it entails. So in the end it's just easier to discuss the subject matter itself |
| 2026-02-15 19:34:12 | <EvanR> | attempt to define the terminology jargon "once and for all" is boiling an ocean |
| 2026-02-15 19:34:35 | <EvanR> | I don't envy someone with a dog in that race xD |
| 2026-02-15 19:34:49 | × | oats quits (~oats@user/oats) (Read error: Connection reset by peer) |
| 2026-02-15 19:35:05 | → | oats joins (~oats@user/oats) |
| 2026-02-15 19:36:53 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2026-02-15 19:37:59 | × | prdak quits (~Thunderbi@user/prdak) (Ping timeout: 252 seconds) |
| 2026-02-15 19:44:32 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 2026-02-15 19:45:41 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds) |
| 2026-02-15 19:45:54 | Lord_of_Life_ | is now known as Lord_of_Life |
| 2026-02-15 19:47:33 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-15 19:49:50 | × | emmanuelux quits (~em@user/emmanuelux) (Quit: bye) |
| 2026-02-15 19:50:56 | → | emmanuelux joins (~em@user/emmanuelux) |
| 2026-02-15 19:52:17 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2026-02-15 19:59:55 | <EvanR> | wow... you can't use the field name "class" ? |
| 2026-02-15 20:00:18 | <int-e> | it is a keyword |
| 2026-02-15 20:00:20 | → | KindFoxo joins (~KindFoxo@user/KindoFoxo) |
| 2026-02-15 20:00:58 | <EvanR> | and jreicher is trying to claim we're not OOP xD |
| 2026-02-15 20:01:23 | <int-e> | trait carefully, or something |
| 2026-02-15 20:01:58 | <EvanR> | *attempts to get around it with NoFieldSelectors |
| 2026-02-15 20:03:17 | × | spew quits (~spew@user/spew) (Ping timeout: 252 seconds) |
| 2026-02-15 20:03:20 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-15 20:03:23 | <EvanR> | doesn't work, though it would see that would avoid syntactic collisions |
| 2026-02-15 20:05:35 | <geekosaur> | I think there's an unimplemented-as-yet proposal for keywords and such to be usable as fields disambiguated by the overloaded dot |
| 2026-02-15 20:06:16 | <int-e> | > let clаss = 42 in clаss |
| 2026-02-15 20:06:17 | <lambdabot> | 42 |
| 2026-02-15 20:06:28 | <int-e> | (you can always play dirty) |
| 2026-02-15 20:08:43 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 264 seconds) |
| 2026-02-15 20:14:28 | → | notzmv joins (~umar@user/notzmv) |
| 2026-02-15 20:14:31 | → | spew joins (~spew@user/spew) |
| 2026-02-15 20:15:02 | × | drlkf quits (~drlkf@chat-1.drlkf.net) (Quit: WeeChat 3.8) |
| 2026-02-15 20:16:00 | × | wickedjargon quits (~user@24.83.46.194) (Remote host closed the connection) |
| 2026-02-15 20:18:41 | × | spew quits (~spew@user/spew) (Ping timeout: 252 seconds) |
| 2026-02-15 20:19:06 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-15 20:21:59 | × | notzmv quits (~umar@user/notzmv) (Ping timeout: 252 seconds) |
| 2026-02-15 20:23:44 | <monochrom> | Coding OO in Haskell becomes annoying once you start subclassing. (Too much boilerplate.) |
| 2026-02-15 20:24:04 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 245 seconds) |
| 2026-02-15 20:25:45 | <larsivi> | Still learning Haskell here, trying some stuff where I want to return a couple of operations in Left and something else in Right, so like this: Left ((+1):(+0)) However, it fails since +1 and +0 are not the same type. Is there some way yo make this into a more generic type? (in addition to addition, I also have subtractions) |
| 2026-02-15 20:26:53 | <[exa]> | larsivi: use Left [(+1),(+0)]? the issue is likely the type of (:), it requires a list on the right |
| 2026-02-15 20:27:11 | <[exa]> | or Left ((+1),(+0)) if you're sure there's always an exact couple |
| 2026-02-15 20:27:37 | <[exa]> | :t ((+1),(+0)) |
| 2026-02-15 20:27:37 | <lambdabot> | (Num a1, Num a2) => (a1 -> a1, a2 -> a2) |
| 2026-02-15 20:27:42 | <[exa]> | :t [(+1),(+0)] |
| 2026-02-15 20:27:43 | <lambdabot> | Num a => [a -> a] |
| 2026-02-15 20:29:28 | <[exa]> | (btw you could do something like (+1):[(+0)] to make it work with : , but that doesn't quite look like what you'd want to do) |
| 2026-02-15 20:30:31 | <larsivi> | exa: In the next step I want to pattern match op1:op2, how does that work with a pair? |
| 2026-02-15 20:30:58 | <[exa]> | (op1,op2) |
| 2026-02-15 20:31:06 | <monochrom> | If you have a pair, the pattern is (p,q). If you have a list of length 2, the pattern is [p,q]. |
| 2026-02-15 20:31:23 | <larsivi> | nice, thanks |
| 2026-02-15 20:31:50 | → | ss4 joins (~wootehfoo@user/wootehfoot) |
| 2026-02-15 20:34:53 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-15 20:36:30 | → | karenw_ joins (~karenw@user/karenw) |
| 2026-02-15 20:40:33 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 260 seconds) |
| 2026-02-15 20:42:19 | ss4 | is now known as wootehfoot |
| 2026-02-15 20:43:05 | → | gmg joins (~user@user/gehmehgeh) |
| 2026-02-15 20:47:42 | × | emmanuelux quits (~em@user/emmanuelux) (Read error: Connection reset by peer) |
| 2026-02-15 20:48:01 | → | emmanuelux joins (~em@user/emmanuelux) |
| 2026-02-15 20:48:52 | × | emmanuelux quits (~em@user/emmanuelux) (Read error: Connection reset by peer) |
| 2026-02-15 20:49:10 | → | emmanuelux joins (~em@user/emmanuelux) |
| 2026-02-15 20:50:02 | × | emmanuelux quits (~em@user/emmanuelux) (Read error: Connection reset by peer) |
| 2026-02-15 20:50:19 | → | emmanuelux joins (~em@user/emmanuelux) |
| 2026-02-15 20:51:18 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-15 20:51:26 | <larsivi> | Ok, still not fully in place, I now get (only for negative ops): error: [GHC-39999] |
| 2026-02-15 20:51:28 | <larsivi> | • No instance for ‘Num (Int -> Int)’ |
| 2026-02-15 20:51:30 | <larsivi> | arising from a use of syntactic negation |
| 2026-02-15 20:51:32 | <larsivi> | (maybe you haven't applied a function to enough arguments?) |
| 2026-02-15 20:52:21 | × | emmanuelux quits (~em@user/emmanuelux) (Read error: Connection reset by peer) |
| 2026-02-15 20:52:58 | → | emmanuelux joins (~em@user/emmanuelux) |
| 2026-02-15 20:56:05 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 252 seconds) |
| 2026-02-15 20:56:31 | × | emmanuelux quits (~em@user/emmanuelux) (Read error: Connection reset by peer) |
| 2026-02-15 20:56:47 | <larsivi> | Ah, the unary negation operator - fixed it with wrapping (-) |
| 2026-02-15 20:56:57 | → | dtman34 joins (~dtman34@c-73-242-68-179.hsd1.mn.comcast.net) |
| 2026-02-15 20:56:58 | → | emmanuelux joins (~em@user/emmanuelux) |
| 2026-02-15 20:58:52 | × | emmanuelux quits (~em@user/emmanuelux) (Read error: Connection reset by peer) |
| 2026-02-15 20:59:28 | → | emmanuelux joins (~em@user/emmanuelux) |
| 2026-02-15 21:01:45 | × | KindFoxo quits (~KindFoxo@user/KindoFoxo) (Remote host closed the connection) |
| 2026-02-15 21:04:52 | × | CiaoSen quits (~Jura@2a02:8071:64e1:da0:5a47:caff:fe78:33db) (Ping timeout: 255 seconds) |
| 2026-02-15 21:05:35 | <monochrom> | There is also subtract, i.e., subtract 5 = \x -> x - 5 |
| 2026-02-15 21:07:05 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-02-15 21:08:42 | × | stefan-__ quits (~m-yh2rcc@42dots.de) (Remote host closed the connection) |
All times are in UTC.