2025/01/12

Newest at the top

2025-01-12 02:38:40 +0100otto_s(~user@p4ff27ed7.dip0.t-ipconnect.de)
2025-01-12 02:37:02 +0100otto_s(~user@p5de2fce5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
2025-01-12 02:36:56 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2025-01-12 02:32:15 +0100califax(~califax@user/califx) (Remote host closed the connection)
2025-01-12 02:26:18 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
2025-01-12 02:22:11 +0100homo(~homo@user/homo) homo
2025-01-12 02:20:44 +0100homo(~homo@user/homo) (Read error: Connection reset by peer)
2025-01-12 02:18:54 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2025-01-12 02:12:07 +0100TheCoffeMaker(~TheCoffeM@user/thecoffemaker) TheCoffeMaker
2025-01-12 02:11:44 +0100TheCoffeMaker(~TheCoffeM@user/thecoffemaker) (Quit: So long and thanks for all the fish)
2025-01-12 02:08:14 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 265 seconds)
2025-01-12 02:06:58 +0100stiell(~stiell@gateway/tor-sasl/stiell) stiell
2025-01-12 02:05:29 +0100sprotte24(~sprotte24@p200300d16f109200d837c3a3f02cbb16.dip0.t-ipconnect.de) (Quit: Leaving)
2025-01-12 02:05:14 +0100stiell(~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection)
2025-01-12 02:03:32 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2025-01-12 01:52:40 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 252 seconds)
2025-01-12 01:48:09 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2025-01-12 01:46:23 +0100 <haskellbridge> <Bowuigi> c_wraith re:catamorphism https://www.haskellforall.com/2021/01/the-visitor-pattern-is-essentially-same.html this is relevant I guess
2025-01-12 01:37:40 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 260 seconds)
2025-01-12 01:33:09 +0100 <c_wraith> that's less common in java, but not absent. (Same root cause...)
2025-01-12 01:32:47 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2025-01-12 01:32:02 +0100 <c_wraith> It tries to be "friendly" instead of "type safe"
2025-01-12 01:31:45 +0100 <c_wraith> Lots of python code commits crimes against parametricity
2025-01-12 01:30:52 +0100 <monochrom> haha
2025-01-12 01:30:42 +0100 <c_wraith> crimes against parametricity
2025-01-12 01:29:17 +0100 <monochrom> But the whole point of Python and Java is if you write "instanceof" you're commiting a crime.
2025-01-12 01:28:35 +0100 <monochrom> For mere mortals, the composite pattern would be good enough and pretty easy to understand actually.
2025-01-12 01:28:23 +0100 <c_wraith> Huh. I guess the visitor pattern is sort of a catamorphism that uses algebras encoded as an object.
2025-01-12 01:27:55 +0100 <monochrom> I would be very impressed if they used the visitor pattern.
2025-01-12 01:27:23 +0100 <c_wraith> so... they should have used the visitor pattern.
2025-01-12 01:27:01 +0100 <monochrom> But the student was too excited by Haskell, so they went overboard and translate Haskell pattern matching to Python. "if instanceof(e, Or) ... elif instanceof(e, And) .. elif ..."
2025-01-12 01:26:48 +0100 <c_wraith> the python should be using the visitor pattern. :P
2025-01-12 01:26:23 +0100 <c_wraith> but then you've turned the expression problem sideways!
2025-01-12 01:26:07 +0100dtman34(~dtman34@2601:447:d080:1a3c:198e:8888:ba04:6650) dtman34
2025-01-12 01:26:02 +0100 <monochrom> Clearly, in Python you would not make an algebraic type, you would make a Not class, And class, Or class; and the evaluation function would be a common method.
2025-01-12 01:24:55 +0100 <monochrom> In that student's case, the assignment was to first use algebraic data types in Haskell to define a type for boolean expressions and functions for evaluations. Then the next question is "how would you code this up in Python?"
2025-01-12 01:23:14 +0100 <monochrom> I had a student who tried to write Haskell in Python. I gave them a very low mark. If you use Python, you play to the strength of Python. If you use Haskell, you play to the strength of Haskell.
2025-01-12 01:22:28 +0100 <monochrom> Clearly, design patterns and anti-patterns depend on the language.
2025-01-12 01:21:45 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 246 seconds)
2025-01-12 01:17:14 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2025-01-12 01:12:18 +0100notzmv(~umar@user/notzmv) notzmv
2025-01-12 01:11:12 +0100notzmv(~umar@user/notzmv) (Ping timeout: 265 seconds)
2025-01-12 01:08:48 +0100dtman34(~dtman34@2601:447:d080:1a3c:198e:8888:ba04:6650) (Ping timeout: 246 seconds)
2025-01-12 01:07:00 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) (Ping timeout: 276 seconds)
2025-01-12 01:03:23 +0100dtman34(~dtman34@2601:447:d080:1a3c:198e:8888:ba04:6650) dtman34
2025-01-12 01:01:52 +0100merijn(~merijn@128-137-045-062.dynamic.caiway.nl) merijn
2025-01-12 01:01:32 +0100dtman34(~dtman34@c-174-53-203-90.hsd1.mn.comcast.net) (Ping timeout: 265 seconds)
2025-01-12 00:57:44 +0100Garbanzo(~Garbanzo@2602:304:6eac:dc10::46)
2025-01-12 00:56:33 +0100mreh(~matthew@host86-146-25-121.range86-146.btcentralplus.com) (Ping timeout: 246 seconds)
2025-01-12 00:56:30 +0100tomku(~tomku@user/tomku) tomku