2022-04-05 00:00:57 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 256 seconds) |
2022-04-05 00:01:49 +0200 | chomwitt | (~chomwitt@2a02:587:dc19:3600:aabd:edaf:cb83:4282) (Ping timeout: 240 seconds) |
2022-04-05 00:02:14 +0200 | Guest27 | (~Guest27@2601:281:d47f:1590::6b90) |
2022-04-05 00:02:31 +0200 | BlackboardN | (~Blackboar@user/BlackboardN) (Quit: ZNC 1.8.2 - https://znc.in) |
2022-04-05 00:02:52 +0200 | BlackboardN | (~Blackboar@user/BlackboardN) |
2022-04-05 00:03:17 +0200 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2022-04-05 00:03:41 +0200 | juri_ | (~juri@178.63.35.222) (Ping timeout: 245 seconds) |
2022-04-05 00:06:27 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2022-04-05 00:06:37 +0200 | DNH | (~DNH@2a02:8109:b740:2c4:6d7f:99b6:5035:1068) |
2022-04-05 00:08:02 +0200 | redb | (~nmh@user/redb) |
2022-04-05 00:09:22 +0200 | <Guest27> | Is there any Monad like Maybe that short-circuits on success rather than failure? |
2022-04-05 00:09:46 +0200 | <geekosaur> | perhaps you want asum? |
2022-04-05 00:10:01 +0200 | <Guest27> | :t asum |
2022-04-05 00:10:03 +0200 | <lambdabot> | (Foldable t, Alternative f) => t (f a) -> f a |
2022-04-05 00:10:28 +0200 | <geekosaur> | > asum [Nothing, Just 5, Nothing, Just 12] |
2022-04-05 00:10:29 +0200 | <lambdabot> | Just 5 |
2022-04-05 00:10:41 +0200 | <Guest27> | That's exactly what I want, thanks |
2022-04-05 00:10:51 +0200 | <jackdk> | mcgroin: Yes, colons and capitals begin constructors. (Haskell 98 Report, section 2.4) |
2022-04-05 00:11:39 +0200 | <Guest27> | What exactly is Alternative? |
2022-04-05 00:11:44 +0200 | <mcgroin> | jackdk: thx for the reference |
2022-04-05 00:11:45 +0200 | <monochrom> | If you just have 2 operands, then it's x <|> y, i.e., asum [x, y] = x <|> y |
2022-04-05 00:12:14 +0200 | <monochrom> | Alternative is the subclass of Applicative that adds "empty" and "<|>". |
2022-04-05 00:12:43 +0200 | <monochrom> | Its behaviour for Maybe is short-circuiting upon Just. |
2022-04-05 00:12:44 +0200 | <geekosaur> | it's Applicative over a Monoid, meaning it can deal with a notion of "empty" |
2022-04-05 00:12:54 +0200 | <Guest27> | Ohh, it's like the Parsec <|> |
2022-04-05 00:13:01 +0200 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2022-04-05 00:13:23 +0200 | <monochrom> | Yes, parsec was its main inspiration, as can be seen from the names of the methods :) |
2022-04-05 00:14:53 +0200 | <redb> | Hey all, noob here. I'm writing tests for a compiler I'm writing in Haskell, and I'd like some of my test cases to live in files rather than in the test file itself. My idea was to make a list of such files, add the parsed data to a dict keyed on those file names, and then use that dict while creating my Spec for testing. Here was my attempt: https://paste.tomsmeding.com/hdf3Re04 (cobbled from example). My |
2022-04-05 00:14:59 +0200 | <redb> | problem is I'm not sure how to get the list of file names down to a single IO, which will return the filled in (name, data) tuples I can then use to make a dict (Map). |
2022-04-05 00:18:40 +0200 | <geekosaur> | you may like sequence |
2022-04-05 00:19:01 +0200 | <geekosaur> | :t sequence |
2022-04-05 00:19:02 +0200 | <lambdabot> | (Traversable t, Monad m) => t (m a) -> m (t a) |
2022-04-05 00:19:14 +0200 | <geekosaur> | % :t sequence @[] |
2022-04-05 00:19:14 +0200 | <yahb> | geekosaur: Monad m => [m a] -> m [a] |
2022-04-05 00:19:56 +0200 | euandreh | (~euandreh@2804:14c:33:9fe5:67d2:d391:3f5:bf92) (Quit: WeeChat 3.4.1) |
2022-04-05 00:20:24 +0200 | euandreh | (~euandreh@2804:14c:33:9fe5:f37c:486d:e6c4:36d4) |
2022-04-05 00:20:36 +0200 | hololeap_ | (~hololeap@user/hololeap) |
2022-04-05 00:21:30 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 00:21:36 +0200 | <hpc> | @src Const |
2022-04-05 00:21:37 +0200 | <lambdabot> | Source not found. Abort, Retry, Panic? |
2022-04-05 00:21:55 +0200 | hololeap | (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
2022-04-05 00:22:05 +0200 | acidjnk | (~acidjnk@p200300d0c7049f5375c1d267ad8f6a07.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
2022-04-05 00:22:11 +0200 | <hpc> | Guest27: answering the original question because it's interesting, there's also https://hackage.haskell.org/package/base-4.16.1.0/docs/Control-Applicative.html#t:Const |
2022-04-05 00:23:00 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2022-04-05 00:24:03 +0200 | jgeerds | (~jgeerds@d5364b87.access.ecotel.net) (Ping timeout: 260 seconds) |
2022-04-05 00:26:07 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
2022-04-05 00:26:22 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2022-04-05 00:26:53 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) |
2022-04-05 00:28:05 +0200 | hololeap_ | (~hololeap@user/hololeap) (Remote host closed the connection) |
2022-04-05 00:29:23 +0200 | hololeap_ | (~hololeap@user/hololeap) |
2022-04-05 00:30:12 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 00:32:29 +0200 | machinedgod | (~machinedg@24.105.81.50) |
2022-04-05 00:33:49 +0200 | boxscape_ | (~boxscape_@p4ff0be5f.dip0.t-ipconnect.de) |
2022-04-05 00:35:05 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 250 seconds) |
2022-04-05 00:36:30 +0200 | Inst | (~Liam@2601:6c4:4080:3f80:ed81:d418:758d:530d) |
2022-04-05 00:36:35 +0200 | <Inst> | yo |
2022-04-05 00:36:50 +0200 | <geekosaur> | yes? |
2022-04-05 00:36:52 +0200 | <Inst> | if I started a lib collection on Hackage, alongside someone tutoring me Haskell |
2022-04-05 00:36:56 +0200 | <Inst> | called n_n, would anyone object? |
2022-04-05 00:37:20 +0200 | <Inst> | n_n -> Naga Nyaya, or "Rule of Snakes", an indirect reference to Rule of Fish (Matsya Nyaya) in Hindu culture, which refers to big fish eating medium fish eating small fish |
2022-04-05 00:37:37 +0200 | <Inst> | the implicit meaning is Python-eater, or rather, it's intended to be a set of educational libraries |
2022-04-05 00:38:18 +0200 | <Inst> | like, for instance, a self-maintained implementation of CAPI FFI for tinyfiledialogs |
2022-04-05 00:38:26 +0200 | <Inst> | various GUI tools, and so on |
2022-04-05 00:38:37 +0200 | <geekosaur> | I doubt anyone would complain |
2022-04-05 00:38:56 +0200 | <Inst> | but no one would contribute either, right? |
2022-04-05 00:39:21 +0200 | <Inst> | n_n -> cutesy name hiding something ambitious and threatening |
2022-04-05 00:39:48 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
2022-04-05 00:39:56 +0200 | <geekosaur> | that's up to you. contributions would typically be via a github (or gitlab or darcsden or etc.) repo |
2022-04-05 00:40:09 +0200 | <Inst> | yeah, we'll hopefully work on it |
2022-04-05 00:40:27 +0200 | <geekosaur> | if you invite contributions in the README, you may well get them. biggest problem might be discoverability with a "cutesy" name |
2022-04-05 00:40:40 +0200 | <Inst> | it's an umbrella |
2022-04-05 00:42:29 +0200 | Wstfgl0 | Me-me |
2022-04-05 00:42:37 +0200 | Me-me | (~me-me@tunnel690570-pt.tunnel.tserv12.mia1.ipv6.he.net) (Changing host) |
2022-04-05 00:42:37 +0200 | Me-me | (~me-me@user/me-me) |
2022-04-05 00:42:38 +0200 | dextaa_5 | (~dextaa@user/dextaa) (Read error: Connection reset by peer) |
2022-04-05 00:45:19 +0200 | DNH | (~DNH@2a02:8109:b740:2c4:6d7f:99b6:5035:1068) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-04-05 00:45:45 +0200 | alp_ | (~alp@user/alp) (Ping timeout: 248 seconds) |
2022-04-05 00:46:26 +0200 | dextaa_5 | (~dextaa@user/dextaa) |
2022-04-05 00:47:05 +0200 | InstX1 | (~Liam@2601:6c4:4080:3f80:6189:32c1:ad22:f12d) |
2022-04-05 00:47:21 +0200 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 248 seconds) |
2022-04-05 00:47:39 +0200 | Inst | (~Liam@2601:6c4:4080:3f80:ed81:d418:758d:530d) (Ping timeout: 260 seconds) |
2022-04-05 00:48:23 +0200 | zeenk | (~zeenk@2a02:2f04:a313:d600:8d26:ec9f:3ff6:fc94) (Quit: Konversation terminated!) |
2022-04-05 00:50:12 +0200 | crazazy | (~user@130.89.171.62) (Ping timeout: 268 seconds) |
2022-04-05 00:51:16 +0200 | <sm> | -1 on that package name, it's too opaque so makes hackage less useful |
2022-04-05 00:51:23 +0200 | InstX1 | (~Liam@2601:6c4:4080:3f80:6189:32c1:ad22:f12d) (Ping timeout: 256 seconds) |
2022-04-05 00:52:04 +0200 | boxscape_ | (~boxscape_@p4ff0be5f.dip0.t-ipconnect.de) (Quit: Connection closed) |
2022-04-05 00:52:37 +0200 | Guest27 | (~Guest27@2601:281:d47f:1590::6b90) (Quit: Client closed) |
2022-04-05 00:57:52 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 00:59:18 +0200 | dextaa_5 | (~dextaa@user/dextaa) (Read error: Connection reset by peer) |
2022-04-05 01:00:01 +0200 | nahcetan | (~nate@98.45.152.91) |
2022-04-05 01:00:18 +0200 | n8chan | (~nate@98.45.152.91) (Ping timeout: 272 seconds) |
2022-04-05 01:01:03 +0200 | dextaa_5 | (~dextaa@user/dextaa) |
2022-04-05 01:03:00 +0200 | alp_ | (~alp@user/alp) |
2022-04-05 01:03:17 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 256 seconds) |
2022-04-05 01:04:01 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-04-05 01:06:54 +0200 | BlackboardN_ | (~Blackboar@user/BlackboardN) |
2022-04-05 01:07:13 +0200 | BlackboardN | (~Blackboar@user/BlackboardN) (Ping timeout: 260 seconds) |
2022-04-05 01:08:15 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
2022-04-05 01:17:01 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
2022-04-05 01:21:29 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 248 seconds) |
2022-04-05 01:25:17 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex) |
2022-04-05 01:25:47 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-04-05 01:30:52 +0200 | redb | (~nmh@user/redb) (Quit: leaving) |
2022-04-05 01:33:09 +0200 | <jackdk> | Umbrella packages are often not what you want, because (to paraphrase Joe Armstrong) you wanted a banana but what you got was a gorilla to hold the banana and the entire jungle too |
2022-04-05 01:33:38 +0200 | liz | (~liz@cpc84585-newc17-2-0-cust60.16-2.cable.virginm.net) (Quit: Lost terminal) |
2022-04-05 01:34:05 +0200 | <monochrom> | Every tree is an umbrella in a jungle >:) |
2022-04-05 01:35:19 +0200 | machinedgod | (~machinedg@24.105.81.50) (Ping timeout: 250 seconds) |
2022-04-05 01:36:11 +0200 | ft | (~ft@shell.chaostreff-dortmund.de) (Ping timeout: 260 seconds) |
2022-04-05 01:36:46 +0200 | redb | (~nmh@user/redb) |
2022-04-05 01:37:47 +0200 | ft | (~ft@shell.chaostreff-dortmund.de) |
2022-04-05 01:43:21 +0200 | chenqisu12 | (~chenqisu1@183.217.202.44) |
2022-04-05 01:45:24 +0200 | <dons> | moin moin |
2022-04-05 01:45:51 +0200 | <geekosaur> | o/ |
2022-04-05 01:46:43 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-04-05 01:48:45 +0200 | inversed | (~inversed@94.13.111.159) |
2022-04-05 01:48:47 +0200 | sammelweis | (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 268 seconds) |
2022-04-05 01:49:04 +0200 | inversed_ | (~inversed@94.13.111.159) (Ping timeout: 272 seconds) |
2022-04-05 01:50:44 +0200 | juri_ | (~juri@178.63.35.222) |
2022-04-05 01:51:15 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
2022-04-05 01:51:35 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 01:54:59 +0200 | InstX1 | (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) |
2022-04-05 01:56:00 +0200 | <redb> | What's the equivalent of *> that passes the value rather than discarding it? |
2022-04-05 01:56:11 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 268 seconds) |
2022-04-05 01:56:16 +0200 | <dolio> | Passes which value? |
2022-04-05 01:56:33 +0200 | <redb> | Ah, I think it's >>= |
2022-04-05 01:56:43 +0200 | <dons> | :) |
2022-04-05 01:56:48 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
2022-04-05 01:56:51 +0200 | <dons> | :t (>>=) |
2022-04-05 01:56:52 +0200 | <lambdabot> | Monad m => m a -> (a -> m b) -> m b |
2022-04-05 01:56:52 +0200 | <dolio> | Oh, that's what you mean. |
2022-04-05 01:57:02 +0200 | <dons> | :t (*>) |
2022-04-05 01:57:03 +0200 | <lambdabot> | Applicative f => f a -> f b -> f b |
2022-04-05 01:57:32 +0200 | <dons> | good intuition, if you're dealing with the specific value from a computation, you're probably doing something monadic, with bind (>>=) |
2022-04-05 01:57:33 +0200 | xff0x | (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Quit: xff0x) |
2022-04-05 01:57:49 +0200 | <dons> | if its just composition, its more likely something Applicative or Functor-ish. which don't switch on the specific value. |
2022-04-05 01:59:15 +0200 | <hpc> | the "you could have invented monads" prophecy is once again fulfilled |
2022-04-05 01:59:29 +0200 | <dons> | dude you totally just invented monads |
2022-04-05 02:00:14 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-04-05 02:00:28 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-04-05 02:00:54 +0200 | sammelweis | (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
2022-04-05 02:01:53 +0200 | vicfred | (~vicfred@user/vicfred) (Quit: Leaving) |
2022-04-05 02:03:32 +0200 | <InstX1> | question about the dependent types debate |
2022-04-05 02:03:39 +0200 | <InstX1> | why not just syntax a type to indicate it's a dependent type? |
2022-04-05 02:03:43 +0200 | <InstX1> | i.e, data {... |
2022-04-05 02:03:48 +0200 | <InstX1> | unless that's used for something already |
2022-04-05 02:03:50 +0200 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2022-04-05 02:04:01 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine) |
2022-04-05 02:04:50 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2022-04-05 02:05:59 +0200 | statusbot2 | (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) |
2022-04-05 02:07:33 +0200 | MironZ5 | (~MironZ@nat-infra.ehlab.uk) |
2022-04-05 02:07:41 +0200 | SoF9 | (~skius@user/skius) |
2022-04-05 02:07:46 +0200 | Dorkside64 | (~dorkside@208.190.197.222) |
2022-04-05 02:07:48 +0200 | ralu1 | (~ralu@static.211.245.203.116.clients.your-server.de) |
2022-04-05 02:07:49 +0200 | Noinia | (~Frank@77-162-168-71.fixed.kpn.net) |
2022-04-05 02:07:58 +0200 | shapr | (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Remote host closed the connection) |
2022-04-05 02:08:10 +0200 | Dorkside64 | Dorkside6 |
2022-04-05 02:08:14 +0200 | dminuoso | (~dminuoso@user/dminuoso) (Quit: ZNC 1.7.5 - https://znc.in) |
2022-04-05 02:08:16 +0200 | vgtw | (~vgtw@user/vgtw) (Remote host closed the connection) |
2022-04-05 02:08:18 +0200 | shapr | (~user@pool-173-73-44-186.washdc.fios.verizon.net) |
2022-04-05 02:08:18 +0200 | red-snail1 | (~snail@static.151.210.203.116.clients.your-server.de) (Quit: ZNC 1.8.2 - https://znc.in) |
2022-04-05 02:08:34 +0200 | vgtw | (~vgtw@user/vgtw) |
2022-04-05 02:08:37 +0200 | Kaiepi | (~Kaiepi@156.34.47.253) (Read error: Connection reset by peer) |
2022-04-05 02:08:41 +0200 | WhateverRabbit | (~rabbit@206.81.18.26) (Ping timeout: 256 seconds) |
2022-04-05 02:08:41 +0200 | omantere | (~pi@85-156-109-34.elisa-laajakaista.fi) (Ping timeout: 256 seconds) |
2022-04-05 02:08:42 +0200 | Kaipi | (~Kaiepi@156.34.47.253) |
2022-04-05 02:08:42 +0200 | spacenautx | (~spacenaut@user/spacenautx) (Quit: WeeChat 3.4.1) |
2022-04-05 02:08:54 +0200 | SoF | (~skius@user/skius) (Read error: Connection reset by peer) |
2022-04-05 02:08:54 +0200 | SoF9 | SoF |
2022-04-05 02:08:59 +0200 | WhateverRabbit | (~rabbit@206.81.18.26) |
2022-04-05 02:09:04 +0200 | red-snail | (~snail@static.151.210.203.116.clients.your-server.de) |
2022-04-05 02:09:07 +0200 | wolfshappen | (~waff@irc.furworks.de) (Read error: Connection reset by peer) |
2022-04-05 02:09:15 +0200 | sweater | (~sweater@206.81.18.26) (Ping timeout: 256 seconds) |
2022-04-05 02:09:15 +0200 | ralu | (~ralu@static.211.245.203.116.clients.your-server.de) (Ping timeout: 256 seconds) |
2022-04-05 02:09:15 +0200 | ralu1 | ralu |
2022-04-05 02:09:30 +0200 | dminuoso | (~dminuoso@static.88-198-218-68.clients.your-server.de) |
2022-04-05 02:09:38 +0200 | omantere | (~pi@85-156-109-34.elisa-laajakaista.fi) |
2022-04-05 02:09:39 +0200 | sweater | (~sweater@206.81.18.26) |
2022-04-05 02:09:49 +0200 | statusbot | (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Ping timeout: 256 seconds) |
2022-04-05 02:09:49 +0200 | exarkun | (~exarkun@user/exarkun) (Ping timeout: 256 seconds) |
2022-04-05 02:09:49 +0200 | MironZ | (~MironZ@nat-infra.ehlab.uk) (Ping timeout: 256 seconds) |
2022-04-05 02:09:49 +0200 | kawen | (~quassel@static.208.191.216.95.clients.your-server.de) (Ping timeout: 256 seconds) |
2022-04-05 02:09:49 +0200 | WzC | (~Frank@77-162-168-71.fixed.kpn.net) (Ping timeout: 256 seconds) |
2022-04-05 02:09:49 +0200 | MironZ5 | MironZ |
2022-04-05 02:09:52 +0200 | <jackdk> | This is my first time seeing the prophecy |
2022-04-05 02:09:57 +0200 | exarkun_ | (~exarkun@user/exarkun) |
2022-04-05 02:09:58 +0200 | kawen | (~quassel@static.208.191.216.95.clients.your-server.de) |
2022-04-05 02:10:03 +0200 | wolfshappen | (~waff@irc.furworks.de) |
2022-04-05 02:10:15 +0200 | <hpc> | http://blog.sigfpe.com/2006/08/you-could-have-invented-monads-and.html |
2022-04-05 02:10:34 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) |
2022-04-05 02:10:34 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
2022-04-05 02:10:34 +0200 | wroathe | (~wroathe@user/wroathe) |
2022-04-05 02:11:55 +0200 | <geekosaur> | InstX1, the real problem is once they go in people will start using them and then people who don't know or care will suddenly have to turn on -XDependentHaskell or whatever and possibly deal with weird syntax and/or errors |
2022-04-05 02:12:39 +0200 | derelict | (~derelict@user/derelict) (Ping timeout: 256 seconds) |
2022-04-05 02:12:39 +0200 | zzz | (~z@user/zero) (Ping timeout: 256 seconds) |
2022-04-05 02:12:56 +0200 | Unode_ | (~Unode@194.94.44.220) |
2022-04-05 02:12:59 +0200 | bgamari_ | (~bgamari@70.16.102.89) |
2022-04-05 02:13:00 +0200 | zero | (~z@user/zero) |
2022-04-05 02:13:13 +0200 | absence | (torgeihe@hildring.pvv.ntnu.no) (Ping timeout: 256 seconds) |
2022-04-05 02:13:13 +0200 | noctuks | (9wxBRvrIcP@user/noctux) (Ping timeout: 256 seconds) |
2022-04-05 02:13:13 +0200 | wrengr | (~wrengr@249.189.233.35.bc.googleusercontent.com) (Ping timeout: 256 seconds) |
2022-04-05 02:13:13 +0200 | statusfailed | (~statusfai@statusfailed.com) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | Maxdamantus | (~Maxdamant@user/maxdamantus) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | martin02_ | (~silas@141.84.69.76) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | sshine | (~simon@exocortex.online) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | tomku | (~tomku@user/tomku) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | Profpatsch | (~Profpatsc@static.88-198-193-255.clients.your-server.de) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | dixie | (~dixie@real.wilbury.sk) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | meejah | (~meejah@rutas.meejah.ca) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | icebreaker | (~icebreake@user/icebreaker) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | cods | (~fred@82-65-232-44.subs.proxad.net) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | wz1000 | (~zubin@static.11.113.47.78.clients.your-server.de) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | bgamari | (~bgamari@70.16.102.89) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | Unode | (~Unode@194.94.44.220) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | Ekho | (~Ekho@user/ekho) (Ping timeout: 256 seconds) |
2022-04-05 02:13:47 +0200 | Unode_ | Unode |
2022-04-05 02:13:57 +0200 | derelict | (~derelict@user/derelict) |
2022-04-05 02:14:21 +0200 | APic | (apic@apic.name) (Ping timeout: 256 seconds) |
2022-04-05 02:14:21 +0200 | fjmorazan | (~quassel@user/fjmorazan) (Ping timeout: 256 seconds) |
2022-04-05 02:14:21 +0200 | [exa] | (exa@user/exa/x-3587197) (Ping timeout: 256 seconds) |
2022-04-05 02:14:21 +0200 | haveo | (~haveo@sl35.iuwt.fr) (Ping timeout: 256 seconds) |
2022-04-05 02:14:21 +0200 | hltk | (~hltk@hltk.fi) (Ping timeout: 256 seconds) |
2022-04-05 02:14:29 +0200 | fjmorazan_ | (~quassel@user/fjmorazan) |
2022-04-05 02:14:58 +0200 | statusfailed | (~statusfai@statusfailed.com) |
2022-04-05 02:14:59 +0200 | dixie | (~dixie@real.wilbury.sk) |
2022-04-05 02:14:59 +0200 | absence | (torgeihe@hildring.pvv.ntnu.no) |
2022-04-05 02:15:00 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) (Quit: Leaving.) |
2022-04-05 02:15:02 +0200 | wrengr | (~wrengr@249.189.233.35.bc.googleusercontent.com) |
2022-04-05 02:15:09 +0200 | noctuks | (mk6gDPckYi@user/noctux) |
2022-04-05 02:15:11 +0200 | meejah | (~meejah@rutas.meejah.ca) |
2022-04-05 02:15:15 +0200 | sshine | (~simon@exocortex.online) |
2022-04-05 02:15:22 +0200 | cods | (~fred@82-65-232-44.subs.proxad.net) |
2022-04-05 02:15:27 +0200 | icebreaker | (~icebreake@user/icebreaker) |
2022-04-05 02:15:29 +0200 | tomku | (~tomku@user/tomku) |
2022-04-05 02:15:29 +0200 | Maxdamantus | (~Maxdamant@user/maxdamantus) |
2022-04-05 02:15:42 +0200 | haveo | (~haveo@sl35.iuwt.fr) |
2022-04-05 02:15:46 +0200 | [exa] | (exa@srv3.blesmrt.net) |
2022-04-05 02:15:54 +0200 | hltk | (~hltk@hltk.fi) |
2022-04-05 02:23:01 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 02:23:22 +0200 | cjb | (~cjb@user/cjb) (Quit: rcirc on GNU Emacs 29.0.50) |
2022-04-05 02:25:24 +0200 | xff0x | (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) |
2022-04-05 02:26:12 +0200 | APic | (~apic@apic.name) |
2022-04-05 02:26:27 +0200 | wz1000 | (~zubin@static.11.113.47.78.clients.your-server.de) |
2022-04-05 02:26:42 +0200 | Profpatsch | (~Profpatsc@static.88-198-193-255.clients.your-server.de) |
2022-04-05 02:26:45 +0200 | martin02_ | (~silas@141.84.69.76) |
2022-04-05 02:27:07 +0200 | Ekho | (~Ekho@user/ekho) |
2022-04-05 02:27:42 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 272 seconds) |
2022-04-05 02:33:35 +0200 | alp_ | (~alp@user/alp) (Ping timeout: 260 seconds) |
2022-04-05 02:34:33 +0200 | gurkenglas | (~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de) (Ping timeout: 248 seconds) |
2022-04-05 02:35:41 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2022-04-05 02:37:54 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2022-04-05 02:42:04 +0200 | Topsi | (~Tobias@dyndsl-037-138-064-193.ewe-ip-backbone.de) (Quit: Leaving.) |
2022-04-05 02:43:17 +0200 | deadmarshal_ | (~deadmarsh@95.38.113.9) |
2022-04-05 02:46:45 +0200 | InstX1 | (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 268 seconds) |
2022-04-05 02:47:53 +0200 | deadmarshal_ | (~deadmarsh@95.38.113.9) (Ping timeout: 248 seconds) |
2022-04-05 02:48:34 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 02:55:21 +0200 | xff0x | (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Ping timeout: 248 seconds) |
2022-04-05 02:57:53 +0200 | Inst[m] | (~instrmatr@2001:470:69fc:105::1:903e) |
2022-04-05 03:00:58 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2022-04-05 03:01:19 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 03:01:59 +0200 | InstX1 | (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) |
2022-04-05 03:02:04 +0200 | <InstX1> | axman6 |
2022-04-05 03:02:12 +0200 | jbox | (~jbox@user/jbox) |
2022-04-05 03:02:13 +0200 | <InstX1> | if you were making an educational lib collection for Haskell, what would you include? |
2022-04-05 03:02:22 +0200 | <InstX1> | I'd def add an interface for NativeFileDialog or TinyFileDialogs |
2022-04-05 03:02:29 +0200 | redb | (~nmh@user/redb) (Ping timeout: 246 seconds) |
2022-04-05 03:02:49 +0200 | <Axman6> | import Prelude; -- done |
2022-04-05 03:03:01 +0200 | <InstX1> | actually, i'd also consider a custom Prelude |
2022-04-05 03:03:20 +0200 | <InstX1> | so learners could end up reimplementing basic Haskell functions |
2022-04-05 03:03:24 +0200 | redb | (~nmh@136.49.49.211) |
2022-04-05 03:04:09 +0200 | monaaraj | (~MonAaraj@user/mon-aaraj/x-4416475) |
2022-04-05 03:04:14 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 246 seconds) |
2022-04-05 03:05:57 +0200 | vysn | (~vysn@user/vysn) |
2022-04-05 03:06:13 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 260 seconds) |
2022-04-05 03:07:44 +0200 | redb | (~nmh@136.49.49.211) (Ping timeout: 246 seconds) |
2022-04-05 03:08:07 +0200 | Guest27 | (~Guest27@2601:281:d47f:1590::6b90) |
2022-04-05 03:09:29 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
2022-04-05 03:10:02 +0200 | mbuf | (~Shakthi@122.173.67.210) |
2022-04-05 03:10:39 +0200 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2022-04-05 03:15:07 +0200 | <dsal> | I've written a lot of haskell code, but I've not written anything that sounds like "file dialog" |
2022-04-05 03:16:06 +0200 | <Axman6> | yeah me either, sounds like something I have never wanted |
2022-04-05 03:16:46 +0200 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2022-04-05 03:17:00 +0200 | neurocyte861449 | (~neurocyte@IP-045093110082.dynamic.medianet-world.de) |
2022-04-05 03:17:00 +0200 | neurocyte861449 | (~neurocyte@IP-045093110082.dynamic.medianet-world.de) (Changing host) |
2022-04-05 03:17:00 +0200 | neurocyte861449 | (~neurocyte@user/neurocyte) |
2022-04-05 03:17:07 +0200 | <Axman6> | I'm pretty happy writing BS.readFile filePath |
2022-04-05 03:17:13 +0200 | redb | (~nmh@136.49.49.211) |
2022-04-05 03:18:42 +0200 | <dsal> | I do have some file selection stuff in my gopro uploader which is `/some/path/*` (globbed by the shell) -> list of ordered parts of files by filename patterns. That's a little fancy. Similar thing with given a directory, find files that seem like they'd be related to media (which is really a depth traversal through a tree and a map of filename to the path where I found it, I think). Otherwise, argv does me pretty well. |
2022-04-05 03:18:52 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 03:19:26 +0200 | <InstX1> | your former students probably wanted it, though, Axman6 |
2022-04-05 03:19:26 +0200 | neurocyte86144 | (~neurocyte@user/neurocyte) (Ping timeout: 268 seconds) |
2022-04-05 03:19:26 +0200 | neurocyte861449 | neurocyte86144 |
2022-04-05 03:19:32 +0200 | <InstX1> | oh hi romesrf, thanks for everything |
2022-04-05 03:20:12 +0200 | <Axman6> | We never did anything with files |
2022-04-05 03:20:19 +0200 | <dsal> | InstX1: What does one use a file dialog for? |
2022-04-05 03:20:30 +0200 | <InstX1> | dsal: to get a filepath |
2022-04-05 03:20:36 +0200 | <InstX1> | through a GUI |
2022-04-05 03:20:54 +0200 | <InstX1> | basically, the notion is that people are less likely to hurt themselves if they have to do it through the GUI |
2022-04-05 03:21:05 +0200 | <jackdk> | That notion is completely false. |
2022-04-05 03:21:16 +0200 | <dsal> | Oh, you're making GUIs, too? That seems unnecessarily difficult. |
2022-04-05 03:21:45 +0200 | <InstX1> | i mean, not really, but just calling the native OS file selectors |
2022-04-05 03:21:54 +0200 | redb | (~nmh@136.49.49.211) (Ping timeout: 268 seconds) |
2022-04-05 03:22:22 +0200 | <dsal> | I've always seen file dialogs as a compromise for having an application that has a GUI. They're sometimes not in the way, but often are extremely limiting. |
2022-04-05 03:22:44 +0200 | <InstX1> | i mean i'm closer to noob / poweruser levels, as opposed to developer |
2022-04-05 03:22:58 +0200 | <InstX1> | specifying a filepath within the app instead of through args from command line feels safer |
2022-04-05 03:23:13 +0200 | <dsal> | Most of the GUI stuff I work with are photo or video editing which have their own file picker concepts because filesystem paths don't fit the paradigm in any useful way. |
2022-04-05 03:23:23 +0200 | <InstX1> | i see |
2022-04-05 03:23:37 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 248 seconds) |
2022-04-05 03:24:00 +0200 | <dsal> | How is it safer? On a mac, you can always drag a file from Finder into terminal safely. But I don't know that I do that too often. |
2022-04-05 03:24:18 +0200 | <dsal> | I think I've also done that on Linux, but I don't do it often enough to know. heh |
2022-04-05 03:24:31 +0200 | <exarkun_> | What does "safer" even mean? I've never once cut myself while typing a filename into a shell. Is that a thing that happens to people? |
2022-04-05 03:24:54 +0200 | <dsal> | shells can be sharp |
2022-04-05 03:24:58 +0200 | <jackdk> | I cut my feet on a shell once, you gotta be careful when wandering around rock pools |
2022-04-05 03:25:24 +0200 | <Axman6> | hope it wasn't a cone shell |
2022-04-05 03:25:25 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-04-05 03:25:26 +0200 | <InstX1> | hum, windows doesn't have io.sys anymore |
2022-04-05 03:25:35 +0200 | <InstX1> | i sort of worry about accidentally selecting io.sys and causing the system to stop booting |
2022-04-05 03:25:40 +0200 | <jackdk> | `what_year_is_it.jpg` |
2022-04-05 03:25:48 +0200 | <InstX1> | not 1995 |
2022-04-05 03:25:55 +0200 | <jackdk> | `IO.SYS` is an MS-DOS thing |
2022-04-05 03:26:03 +0200 | <InstX1> | but seriously, some people are just not comfortable with shell / command line |
2022-04-05 03:26:09 +0200 | <exarkun_> | Why are you going to accidentally type "io.sys" but you're not going to accidentally click on "io.sys"? |
2022-04-05 03:26:11 +0200 | <InstX1> | it's a convenience factor |
2022-04-05 03:26:17 +0200 | <jackdk> | (and so Win[9x..ME]) |
2022-04-05 03:26:19 +0200 | <dsal> | And you think people are not comfortable with a shell are going to write GUI programs effectively? |
2022-04-05 03:26:30 +0200 | <InstX1> | it's not true GUI |
2022-04-05 03:26:38 +0200 | <InstX1> | just a command prompt program that can call native fileloaders |
2022-04-05 03:26:38 +0200 | <exarkun_> | InstX1: Okay. "I'm more comfortable with a GUI file picker" is fine. It just has nothing to do with safety, I think. |
2022-04-05 03:26:40 +0200 | <monochrom> | Does GHC even run on Win9x? |
2022-04-05 03:26:50 +0200 | redb | (~nmh@136.49.49.211) |
2022-04-05 03:27:28 +0200 | <dsal> | So is the idea to have something like `popUpAWindowToAskAUserForAFile >>= doStuffToFile` ? |
2022-04-05 03:28:21 +0200 | <monochrom> | I once "cut" myself with command line shell things when I mistakenly wrote "cmd infile outfile" when it should be "cmd outfile infile". |
2022-04-05 03:28:43 +0200 | <Axman6> | yeah positional arguments suck |
2022-04-05 03:29:11 +0200 | <monochrom> | <sarcasm>"Clearly", this could have been avoided by popping up one dialog for infile, and another one for outfile</sarcasm> |
2022-04-05 03:29:15 +0200 | <dsal> | The interface feels weird, but in the topic of education, I don't think teaching people to build a strange UX just to avoid argv is good. I'd be pretty sad if I typed `cp` and it popped up two windows. |
2022-04-05 03:29:31 +0200 | <exarkun_> | dsal: maaaybe |
2022-04-05 03:29:48 +0200 | <exarkun_> | dsal: what if it popped up two windows for passing files to cp in a capability-secure manner |
2022-04-05 03:29:50 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
2022-04-05 03:29:53 +0200 | <exarkun_> | dsal: and also your whole os worked like that |
2022-04-05 03:29:59 +0200 | <dsal> | Let's call it scp |
2022-04-05 03:30:33 +0200 | <monochrom> | Axman6: Lest you really think it's only position, I wrote "gcc -o foo.c foo", too. >:) |
2022-04-05 03:30:35 +0200 | <Axman6> | for slow copy |
2022-04-05 03:30:47 +0200 | <Axman6> | monochrom: ha, oof |
2022-04-05 03:30:59 +0200 | <Axman6> | shells need typesd |
2022-04-05 03:31:02 +0200 | <Axman6> | types* |
2022-04-05 03:31:10 +0200 | <dsal> | It just seems frustrating to use. The two programs I use that have file popups occasionally get into a weird state with them and have to be restarted, which is not a great experience. heh |
2022-04-05 03:31:28 +0200 | <InstX1> | dsal: just saying it's what I, and presumably a bucnh of other people, would be accustomed to |
2022-04-05 03:31:30 +0200 | <InstX1> | also iirc visual basic |
2022-04-05 03:31:34 +0200 | <dsal> | monochrom: That looks like you were trying to write that one famous GHC bug. |
2022-04-05 03:31:41 +0200 | <InstX1> | devs don't need to know command line, can do GUI programming |
2022-04-05 03:32:15 +0200 | <exarkun_> | true |
2022-04-05 03:32:26 +0200 | <exarkun_> | but /good/ devs need to know command line |
2022-04-05 03:32:28 +0200 | redb | (~nmh@136.49.49.211) (Ping timeout: 260 seconds) |
2022-04-05 03:32:34 +0200 | <dsal> | I don't know anything about visual basic. I've written smalltalk and some objective C GUI stuff in the past. But that's and environment built around those GUI toolkits. |
2022-04-05 03:32:51 +0200 | <InstX1> | what else would you stuff into a newbie lib? |
2022-04-05 03:32:57 +0200 | <InstX1> | newbie lib collection? |
2022-04-05 03:33:02 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 03:33:11 +0200 | <InstX1> | I'd like to put in edMonad or something like that, i.e, demo programs that can be torn apart |
2022-04-05 03:33:12 +0200 | <dsal> | I think it's totally possible to be born into smalltalk and never see a CLI. |
2022-04-05 03:33:42 +0200 | <exarkun_> | dsal: I don't think you'd get very far |
2022-04-05 03:33:59 +0200 | <exarkun_> | dsal: you'd have almost no one to learn from |
2022-04-05 03:33:59 +0200 | <InstX1> | i'm supposed to be coding something |
2022-04-05 03:34:02 +0200 | <dsal> | I'm imagining an alternate universe where smalltalk is more widely used. :) |
2022-04-05 03:34:04 +0200 | <InstX1> | that's going to take a 56,000 wordlist |
2022-04-05 03:34:06 +0200 | <exarkun_> | ah, well, yes |
2022-04-05 03:34:11 +0200 | <monochrom> | I was born into the handheld calculator era and was spared of the abascus except for historical interest. (I was in Hong Kong.) |
2022-04-05 03:34:15 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 260 seconds) |
2022-04-05 03:34:17 +0200 | <InstX1> | then reprocess it into a 46656 word list with numbers |
2022-04-05 03:34:19 +0200 | <dons> | i think its possible to be born into react/js + vs code and never/rarely see a CI |
2022-04-05 03:34:20 +0200 | <exarkun_> | I was thinking that maybe in another 50 years we'd have developed enough stuff that you could do reasonably well with no cli |
2022-04-05 03:34:26 +0200 | <exarkun_> | but not in 2022 in this timeline |
2022-04-05 03:34:28 +0200 | <InstX1> | monochrom: my aunt was born into the slide rule era |
2022-04-05 03:34:35 +0200 | <dons> | there'a a lot of custom tooling to do UI development without ever knowing your on a unix |
2022-04-05 03:34:42 +0200 | <InstX1> | i hear that you can do mental math with slide rules |
2022-04-05 03:35:02 +0200 | <exarkun_> | dons: still waiting to meet a good programmer who only writes react/js |
2022-04-05 03:35:17 +0200 | <monochrom> | Looking at 40 years of history, I realize that no old technology can stay "must learn" forever. |
2022-04-05 03:35:21 +0200 | <exarkun_> | in fact, if you know any I might hire them |
2022-04-05 03:35:25 +0200 | <InstX1> | monochrom: pencils |
2022-04-05 03:35:30 +0200 | <dsal> | Oh no. I just realized I had a slide rule in my car last night, and I just put my car on a boat. It's supposed to be empty. I don't know where my slide rule is. |
2022-04-05 03:35:42 +0200 | <InstX1> | like, are we going to do everything via touchcreen in the future? |
2022-04-05 03:35:58 +0200 | <InstX1> | trash cans, also |
2022-04-05 03:36:05 +0200 | <InstX1> | toilets transform very quickly, though |
2022-04-05 03:36:24 +0200 | <dsal> | Ugh. Well, that may suck. Finding a new slide rule might be hard. |
2022-04-05 03:36:43 +0200 | <InstX1> | https://www.google.com/search?q=slide+rule&source=lnms&tbm=shop&sa=X&ved=2ahUKEwi47Imz5Pv2AhWvRjAB… |
2022-04-05 03:36:45 +0200 | <exarkun_> | dsal: https://www.instructables.com/Making-Your-Own-Slide-Rule/ |
2022-04-05 03:36:50 +0200 | <dsal> | I used to write a lot of scheme on PalmOS and that was pretty nice. |
2022-04-05 03:36:57 +0200 | <dsal> | exarkun_: I used to do that in elementary school. heh |
2022-04-05 03:37:37 +0200 | <dsal> | Just used a regular ruler and a log table. |
2022-04-05 03:37:46 +0200 | <dsal> | Then I learned the commandline. |
2022-04-05 03:38:32 +0200 | redb | (~nmh@136.49.49.211) |
2022-04-05 03:38:55 +0200 | abastro | (~abab9579@143.248.229.217) (Ping timeout: 260 seconds) |
2022-04-05 03:38:56 +0200 | <dsal> | Actually, I wrote a ton of RPL and Saturn assembler in high school. Not quite what I'd call a CLI there. I used a stack more than dialogs, thoug. |
2022-04-05 03:42:58 +0200 | kaph | (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) (Ping timeout: 260 seconds) |
2022-04-05 03:43:37 +0200 | martin02_ | (~silas@141.84.69.76) (Read error: Connection reset by peer) |
2022-04-05 03:44:02 +0200 | martin02_ | (~silas@141.84.69.76) |
2022-04-05 03:44:58 +0200 | xff0x | (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) |
2022-04-05 03:45:25 +0200 | <Axman6> | my intro to programming was Logo. fun times |
2022-04-05 03:47:12 +0200 | seydar | (~seydar@pool-108-31-245-5.washdc.fios.verizon.net) |
2022-04-05 03:48:18 +0200 | <seydar> | I wrote three styles of an echo server (sequential, forking, process pool): https://paste.tomsmeding.com/aZFwOVUf. I'd love some feedback if anyone is feeling hateful |
2022-04-05 03:48:58 +0200 | <monochrom> | <grumpy>I hate echo servers.</grumpy> |
2022-04-05 03:49:31 +0200 | <Axman6> | @hoogle bracketOnError |
2022-04-05 03:49:31 +0200 | <lambdabot> | Control.Exception bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c |
2022-04-05 03:49:31 +0200 | <lambdabot> | Control.Exception.Base bracketOnError :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c |
2022-04-05 03:49:31 +0200 | <lambdabot> | Control.Monad.Catch bracketOnError :: MonadMask m => m a -> (a -> m c) -> (a -> m b) -> m b |
2022-04-05 03:49:36 +0200 | <monochrom> | Uh what's in Common? |
2022-04-05 03:49:45 +0200 | <jackdk> | it's at the bottom of the paste |
2022-04-05 03:49:55 +0200 | <monochrom> | :( |
2022-04-05 03:49:59 +0200 | <Axman6> | I feel like returjning the socket is unnecessary, it's neber used |
2022-04-05 03:50:10 +0200 | <Axman6> | never* |
2022-04-05 03:50:17 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 248 seconds) |
2022-04-05 03:50:17 +0200 | <Axman6> | fark, learn to type Axman |
2022-04-05 03:53:07 +0200 | <seydar> | Axman6: I have to return the socket in Pool.hs because I need to match the type |
2022-04-05 03:53:39 +0200 | <seydar> | actually I could prolly just change the type signature to match what `concurrently` returns |
2022-04-05 03:54:54 +0200 | <seydar> | monochrom: i'm looking for more practice, do you have a better/more fun server that I should write? |
2022-04-05 03:54:55 +0200 | <Axman6> | you're also redundantly returning the socket everywhere. your code looks like return socket >> return socket >> return socket >> ... if you unrol the recursion |
2022-04-05 03:55:02 +0200 | <dons> | wish i could edit little snippets like that and suggest changes/generate colorized unified diff via web |
2022-04-05 03:55:11 +0200 | <dons> | would be easy to mentor async , very cheaply |
2022-04-05 03:55:24 +0200 | <dons> | we sort of used to do that in hpaste , is there an equiv now? |
2022-04-05 03:55:32 +0200 | <Axman6> | if you need it to return the socket, do something like (\sock -> recursiveHandler socker >> pure socket) |
2022-04-05 03:56:57 +0200 | <Axman6> | seydar: you will create an infinite number of thereads in your forking version. change it to: accept server >>= forkIO . handleClient |
2022-04-05 03:57:42 +0200 | <Axman6> | what you have now is creating as many threads as possible, as quickly as possible, each trying to accept on the socket instead of accepting and then forking |
2022-04-05 03:57:45 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds) |
2022-04-05 03:59:48 +0200 | Guest27 | (~Guest27@2601:281:d47f:1590::6b90) (Ping timeout: 250 seconds) |
2022-04-05 04:00:01 +0200 | mc47 | (~mc47@xmonad/TheMC47) |
2022-04-05 04:00:35 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 04:01:18 +0200 | <dons> | didn't review for semantics, but just stylisticalyl. https://gist.github.com/donsbot/106a83b8d7485bef312917cc714cb913 |
2022-04-05 04:01:41 +0200 | <dons> | you might want to install an LSP (at least, I find it very handy to use the Haskell LSP to help infer types/module imports/lints) |
2022-04-05 04:01:50 +0200 | <jackdk> | Does anyone have a link describing the magic cabal comment you can use to make a single .hs fil depend on hackage packages? My search-fu is failing me |
2022-04-05 04:02:03 +0200 | <dons> | one thing to do is not pass constant arguments around a loop, instead, bind them and share with an inner loop (`go` here) |
2022-04-05 04:02:30 +0200 | <Axman6> | jackdk: it's cabal v2-run |
2022-04-05 04:02:45 +0200 | <Axman6> | comment looks like {- cabal: buildDepends: ... -} IIRC |
2022-04-05 04:02:55 +0200 | <Axman6> | https://cabal.readthedocs.io/en/3.6/cabal-commands.html?highlight=run#cabal-v2-run |
2022-04-05 04:03:05 +0200 | <Axman6> | I actually happened to have the link still open, heh |
2022-04-05 04:03:50 +0200 | monaaraj | (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 268 seconds) |
2022-04-05 04:04:58 +0200 | <seydar> | Axman6: oooooooooooooh that is a very good point |
2022-04-05 04:05:08 +0200 | abastro | (~abab9579@143.248.229.217) (Ping timeout: 260 seconds) |
2022-04-05 04:05:10 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 04:05:15 +0200 | <abastro[m]> | <hpc> "http://blog.sigfpe.com/2006/08/..." <- Well to be fair, the blog states that you might have invented monads while not using haskell, but goes on with haskell examples |
2022-04-05 04:05:16 +0200 | <seydar> | dons: thank you! greatly appreciate the style help |
2022-04-05 04:05:40 +0200 | monaaraj | (~MonAaraj@user/mon-aaraj/x-4416475) |
2022-04-05 04:05:55 +0200 | <abastro[m]> | Like they could easily go "But this is so easy in X language.." |
2022-04-05 04:06:11 +0200 | <abastro[m]> | "Why would I ever have to do that" |
2022-04-05 04:06:40 +0200 | <dons> | can be useful to install hlint, too, to get a few style fixes (the Haskell LSP will pick that up in vs code if you use it) |
2022-04-05 04:07:23 +0200 | <Axman6> | abastro[m]: the answer is "I thought you liked DRY? when you recognise the many shapes Monads come in, you'll see that _a lot_ of code you write can be abstracted to work for all monads" |
2022-04-05 04:08:00 +0200 | <dolio> | The audience is people learning monads in Haskell. |
2022-04-05 04:08:07 +0200 | <abastro[m]> | Only async programming is the one where they could recognize monads, and as that is the only place, they just go with built-in async-await |
2022-04-05 04:08:16 +0200 | nun57 | (~nun@61.140.176.155) |
2022-04-05 04:08:27 +0200 | <nun57> | hey gay |
2022-04-05 04:09:06 +0200 | dextaa_54 | (~dextaa@user/dextaa) |
2022-04-05 04:09:10 +0200 | <seydar> | dons: can you explain why you made `n` eagerly evaluated in gi your paste? (https://gist.github.com/donsbot/106a83b8d7485bef312917cc714cb913) |
2022-04-05 04:09:15 +0200 | <Axman6> | seydar: ... doesn't your `open` code close the socket before it returns it? |
2022-04-05 04:09:19 +0200 | <abastro[m]> | So ppl who are already quite devoted to learn haskell and trying to understand how haskell monads are used? I see. |
2022-04-05 04:09:22 +0200 | res0nat0r0844 | (~Fletch@dia.whatbox.ca) |
2022-04-05 04:09:23 +0200 | haritz | (~hrtz@user/haritz) (Ping timeout: 256 seconds) |
2022-04-05 04:09:23 +0200 | simpleauthority | (~simpleaut@user/simpleauthority) (Ping timeout: 256 seconds) |
2022-04-05 04:09:23 +0200 | fiddlerwoaroof | (~fiddlerwo@user/fiddlerwoaroof) (Ping timeout: 256 seconds) |
2022-04-05 04:09:29 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 248 seconds) |
2022-04-05 04:09:35 +0200 | Goodbye_Vincent1 | (cyvahl@freakshells.net) |
2022-04-05 04:09:40 +0200 | res0nat0r084 | (~Fletch@dia.whatbox.ca) (Read error: Connection reset by peer) |
2022-04-05 04:09:49 +0200 | <abastro[m]> | Yep I somehow read it as an introduction of monads for everyone |
2022-04-05 04:09:56 +0200 | <dons> | seydar: probably just habit at this point, since there was a match against 0 , the strictness can be inferred |
2022-04-05 04:09:57 +0200 | a1paca | (~a1paca@user/a1paca) (Ping timeout: 256 seconds) |
2022-04-05 04:10:07 +0200 | haritz | (~hrtz@62.3.70.206) |
2022-04-05 04:10:07 +0200 | haritz | (~hrtz@62.3.70.206) (Changing host) |
2022-04-05 04:10:07 +0200 | haritz | (~hrtz@user/haritz) |
2022-04-05 04:10:11 +0200 | dysfigured | (~dfg@dfg.rocks) |
2022-04-05 04:10:12 +0200 | simpleauthority | (~simpleaut@user/simpleauthority) |
2022-04-05 04:10:13 +0200 | <seydar> | Axman6: it 100% looks like that. i swear the code works! i stole it from the example on the Network.Socket page |
2022-04-05 04:10:17 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
2022-04-05 04:10:20 +0200 | <seydar> | dons: why does the strictness matter? |
2022-04-05 04:10:28 +0200 | <dons> | generally, if I see a tail call passing an unevaluated arithmetic expression, i'll want to put a ! on it to make sure it compiles without a lazy thunk building in the arg |
2022-04-05 04:10:31 +0200 | dfg | (~dfg@user/dfg) (Ping timeout: 256 seconds) |
2022-04-05 04:10:31 +0200 | fiddlerwoaroof | (~fiddlerwo@user/fiddlerwoaroof) |
2022-04-05 04:10:56 +0200 | <Axman6> | I'm very surprised that code works, I guess I don't know what the semantics of bracketOnError are |
2022-04-05 04:10:57 +0200 | <dons> | go n = .. something ..; go (n-1) -- is lazy in `n` unless there's something that's going to force the value |
2022-04-05 04:11:05 +0200 | dextaa_5 | (~dextaa@user/dextaa) (Ping timeout: 256 seconds) |
2022-04-05 04:11:05 +0200 | noctux | (~noctux@user/noctux) (Ping timeout: 256 seconds) |
2022-04-05 04:11:05 +0200 | Goodbye_Vincent | (cyvahl@freakshells.net) (Ping timeout: 256 seconds) |
2022-04-05 04:11:05 +0200 | Cheery | (~cheery@7-239-179-185.static.tentacle.fi) (Ping timeout: 256 seconds) |
2022-04-05 04:11:05 +0200 | janus | (janus@anubis.0x90.dk) (Ping timeout: 256 seconds) |
2022-04-05 04:11:05 +0200 | ario | (~ario@159.65.220.102) (Ping timeout: 256 seconds) |
2022-04-05 04:11:05 +0200 | dextaa_54 | dextaa_5 |
2022-04-05 04:11:05 +0200 | Goodbye_Vincent1 | Goodbye_Vincent |
2022-04-05 04:11:35 +0200 | <dons> | very common source of unexpected thunks is forgetting to ! an accumulating parameter in a loop. in your case, you have a match against 0 and it counts down from 2, so nothing to worry about |
2022-04-05 04:12:00 +0200 | <dons> | still, i think its good style to be explicit about strictness where it matters (just like writing the type signature) |
2022-04-05 04:12:08 +0200 | a1paca | (~a1paca@user/a1paca) |
2022-04-05 04:12:39 +0200 | janus | (janus@anubis.0x90.dk) |
2022-04-05 04:12:55 +0200 | ario | (~ario@159.65.220.102) |
2022-04-05 04:12:58 +0200 | Cheery | (~cheery@7-239-179-185.static.tentacle.fi) |
2022-04-05 04:13:22 +0200 | noctux | (~noctux@user/noctux) |
2022-04-05 04:14:23 +0200 | dysfigured | dfg |
2022-04-05 04:14:32 +0200 | dfg | (~dfg@dfg.rocks) (Changing host) |
2022-04-05 04:14:32 +0200 | dfg | (~dfg@user/dfg) |
2022-04-05 04:14:36 +0200 | <abastro[m]> | I finally come to realize that why ppl complain about monad tutorials |
2022-04-05 04:15:24 +0200 | <nun57> | monad tutorials? |
2022-04-05 04:15:25 +0200 | <abastro[m]> | It's because haskell is too hard for them, but many ppl started saying about monads, so they try to skim through it to know what it is |
2022-04-05 04:15:57 +0200 | <abastro[m]> | And then frustrated because most monad tutorials are written for haskell programmers. |
2022-04-05 04:16:08 +0200 | <abastro[m]> | Haskell beginners* |
2022-04-05 04:16:23 +0200 | <monochrom> | That's only the beginner side. |
2022-04-05 04:16:33 +0200 | <abastro[m]> | So they are extremely frustrated because now they have to learn this exotic difficult language to learn the concept of monad |
2022-04-05 04:16:56 +0200 | <monochrom> | The those-in-the-know side complain for a different reason, probbably the opposite reason. |
2022-04-05 04:17:03 +0200 | <Axman6> | that's why I send them this: https://tomstu.art/refactoring-ruby-with-monads |
2022-04-05 04:17:06 +0200 | <monochrom> | Those monad tutorials are sacrilegeous. |
2022-04-05 04:17:17 +0200 | <abastro[m]> | When they just want to know what monad broadly is |
2022-04-05 04:17:28 +0200 | <abastro[m]> | Oh, I was talking about the perspective from outside. Yes. |
2022-04-05 04:18:00 +0200 | mc47 | (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
2022-04-05 04:18:14 +0200 | <Axman6> | For anyone who's familliar with <GENERIC OOP LANGUAGE>, the above link is a good introduction to how several things which feel unrelated actually follow the same patterns all the time |
2022-04-05 04:18:21 +0200 | xff0x | (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Quit: xff0x) |
2022-04-05 04:18:34 +0200 | <abastro[m]> | Haskellers have other reasons to dislike monad tutorials |
2022-04-05 04:19:04 +0200 | <dolio> | Yeah, usually they're written by people who don't understand monads. |
2022-04-05 04:19:13 +0200 | <Axman6> | > concat . transpose $ ["ABC","123","wxyz","89"] |
2022-04-05 04:19:15 +0200 | <lambdabot> | "A1w8B2x9C3yz" |
2022-04-05 04:19:27 +0200 | <dons> | cute |
2022-04-05 04:19:40 +0200 | xff0x | (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) |
2022-04-05 04:20:16 +0200 | <Axman6> | just had a though about an alternative monad implementation for lists which interleves instead of concat |
2022-04-05 04:20:55 +0200 | <abastro[m]> | And because the vocal minority does not understand monads and write tutorials, ppl say that monad is not well-researched concepts |
2022-04-05 04:21:13 +0200 | <abastro[m]> | Since they think it should be something that could be explained in a few lines. |
2022-04-05 04:21:58 +0200 | <Axman6> | I've never heard anyone say it's not a well researched concept |
2022-04-05 04:22:18 +0200 | <monochrom> | Find out what's wrong with the example in this monad tutorial: https://betterprogramming.pub/monads-are-just-fancy-semicolons-ffe38401fd0e |
2022-04-05 04:22:25 +0200 | <abastro[m]> | There is a StackOverflow comment on this |
2022-04-05 04:22:31 +0200 | <Axman6> | it literally is something that can be explained in a few lines, the monad concept is _incredibly simple_, but the impleication of such a simple abstraction are massive |
2022-04-05 04:24:17 +0200 | <Axman6> | implications* |
2022-04-05 04:24:21 +0200 | <monochrom> | Ugh I thought people's impression on monad was "academic" so "way too well researched" >:) |
2022-04-05 04:24:39 +0200 | <abastro[m]> | Hm how would you explain monad in a few lines btw |
2022-04-05 04:25:02 +0200 | <monochrom> | I might write the laws. Or I might just decline. |
2022-04-05 04:25:09 +0200 | <Axman6> | return :: a -> m a; (>>=) :: m a -> (a -> m b) -> m b |
2022-04-05 04:25:19 +0200 | <Axman6> | + laws |
2022-04-05 04:25:27 +0200 | AlexNoo_ | (~AlexNoo@178.34.163.99) |
2022-04-05 04:25:31 +0200 | <monochrom> | How would you explain computer programming in a few lines? |
2022-04-05 04:26:24 +0200 | <Axman6> | write words, computer do things |
2022-04-05 04:26:47 +0200 | <abastro[m]> | I will just say wrong things which will still potentially click for them |
2022-04-05 04:27:14 +0200 | <InstX1> | monads are parameterized data types that allow you to access them only through functions designed for them |
2022-04-05 04:27:15 +0200 | <monochrom> | That's a different kind of "explain". It works for people who won't go into computer programming. |
2022-04-05 04:27:29 +0200 | <InstX1> | or through fmap, which calls a method designed for the specific monad |
2022-04-05 04:27:55 +0200 | AlexZenon | (~alzenon@178.34.161.168) (Ping timeout: 260 seconds) |
2022-04-05 04:27:56 +0200 | <InstX1> | the do syntax / bind also causes sequencing by default, whereas with applicatives sequencing requires more specific functions for that to happen |
2022-04-05 04:28:17 +0200 | <InstX1> | sacrilegious? |
2022-04-05 04:28:26 +0200 | <seydar> | dons: i'm learning about unexpected thunks here: https://well-typed.com/blog/2020/09/nothunks/. it sounds like it's saying that they're memory bloat during runtime? |
2022-04-05 04:28:53 +0200 | <seydar> | Axman6: i'm gonna play with the code and see if i can write code that not only works but also makes sense |
2022-04-05 04:28:57 +0200 | <InstX1> | the methods are part of where the magic happens with a monadic type; i.e, you can program logic into the accessor methods |
2022-04-05 04:29:02 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 04:29:07 +0200 | <abastro> | Hmm |
2022-04-05 04:29:18 +0200 | <monochrom> | Whereas "explain monad"'s "explain" is a taller order in this context because this time the target audience will need to write Haskell code successfully. Not a pedestrian wanting just a popsci fix. |
2022-04-05 04:29:18 +0200 | AlexNoo | (~AlexNoo@178.34.161.168) (Ping timeout: 272 seconds) |
2022-04-05 04:29:18 +0200 | <InstX1> | am i doing it wrong? |
2022-04-05 04:29:19 +0200 | Alex_test | (~al_test@178.34.161.168) (Ping timeout: 260 seconds) |
2022-04-05 04:29:45 +0200 | <abastro> | No, I mean, they first wanted to know what is monads |
2022-04-05 04:29:50 +0200 | <abastro> | Yet they did not understood |
2022-04-05 04:29:54 +0200 | <abastro> | in the stackoverflow |
2022-04-05 04:29:57 +0200 | <InstX1> | monads are a meme |
2022-04-05 04:29:58 +0200 | <abastro> | Hm let me dig it up |
2022-04-05 04:30:35 +0200 | <InstX1> | oh, by the way, i finally understood what a category is |
2022-04-05 04:30:41 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-04-05 04:30:53 +0200 | <InstX1> | a set of objects with morphisms (arrows) between them that create 1-1 relations |
2022-04-05 04:30:59 +0200 | <abastro> | Congrats (if you did for real) |
2022-04-05 04:31:08 +0200 | <abastro> | This stackoverflow btw: https://stackoverflow.com/questions/44965/what-is-a-monad |
2022-04-05 04:31:33 +0200 | <abastro> | In the first answer, you can see Breton's comments |
2022-04-05 04:31:53 +0200 | <InstX1> | and iirc a binary operation defined on the morphisms |
2022-04-05 04:32:35 +0200 | <InstX1> | morphisms are associative, there's an identity morphism, and commutative |
2022-04-05 04:32:37 +0200 | <abastro> | https://paste.tomsmeding.com/n5dWSJNU |
2022-04-05 04:32:39 +0200 | <abastro> | The comment part |
2022-04-05 04:32:55 +0200 | <InstX1> | well, not commutative |
2022-04-05 04:33:16 +0200 | Alex_test | (~al_test@178.34.163.99) |
2022-04-05 04:33:20 +0200 | <abastro> | Their impression seems to be: "Because the authors of haskell are sadomasochists and decided that you should do something stupidly complex to accomplish simple things, so you HAVE to learn monads to use haskell, not because they're in any way useful in themselves" |
2022-04-05 04:33:21 +0200 | <InstX1> | ((a->b) apply b-> c) -> (a->c) |
2022-04-05 04:33:25 +0200 | AlexZenon | (~alzenon@178.34.163.99) |
2022-04-05 04:33:58 +0200 | <InstX1> | monads are just (primarily) a way to force you to use the accessor methods, which have embedded logic into them |
2022-04-05 04:34:28 +0200 | <abastro> | monochrom: How do you think of the comment - which seem to explain the general sentiment |
2022-04-05 04:34:47 +0200 | <monochrom> | Soon you will find me badmouthing all of stackoverflow altogether, not just blogs and monad tutorials. |
2022-04-05 04:34:50 +0200 | <InstX1> | abastro: monads are getting into other languages |
2022-04-05 04:34:59 +0200 | <abastro> | Hm are they |
2022-04-05 04:35:02 +0200 | <InstX1> | and monad tutorials in other languages are better than haskell monad tutorials |
2022-04-05 04:35:02 +0200 | <monochrom> | Sorry I don't bother to read stackoverflow. |
2022-04-05 04:35:09 +0200 | <InstX1> | javascript has monads now |
2022-04-05 04:35:22 +0200 | <abastro> | Well, monochrom, my point is that 1. stackoverflow is the go-to site for programmers to solve problems |
2022-04-05 04:35:35 +0200 | <abastro> | 2. The comment is heavily upvoted, which means that there are many sympathizers |
2022-04-05 04:36:11 +0200 | xff0x | (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Quit: xff0x) |
2022-04-05 04:36:16 +0200 | <monochrom> | I know. I still don't care. Let them have cake. |
2022-04-05 04:36:17 +0200 | <abastro> | 3. Just ignoring them as badmouthing could be seen as an elitist attitude for outsiders |
2022-04-05 04:36:24 +0200 | <InstX1> | "because the Haskell community are elitists and refuse to teach monads properly" |
2022-04-05 04:36:29 +0200 | <InstX1> | that's the correct line |
2022-04-05 04:36:37 +0200 | <monochrom> | No, I will be the one badmouthing them. |
2022-04-05 04:36:41 +0200 | <InstX1> | people have concluded monads are gatekeeping in the Haskell community |
2022-04-05 04:37:02 +0200 | <abastro> | InstX1: Yeah, somewhat |
2022-04-05 04:37:08 +0200 | seydar | (~seydar@pool-108-31-245-5.washdc.fios.verizon.net) (Ping timeout: 268 seconds) |
2022-04-05 04:37:57 +0200 | <abastro> | Anyway, tbh I think this is the aspect ppl call out haskell community for being elitist. |
2022-04-05 04:37:58 +0200 | <monochrom> | So I was teaching a C-and-Unix course. I put this question on an exam. Using stdio.h how do you check that stdin has hit end-of-file. |
2022-04-05 04:38:21 +0200 | <monochrom> | A few students answered "fseek then ftell". |
2022-04-05 04:38:59 +0200 | <monochrom> | My marking TA discovered that they probably got this approach from stackoverflow, since stackoverflow had this question and this solution. |
2022-04-05 04:39:11 +0200 | <InstX1> | if i post a "this is what a monad is and haskell community should feel bad for gatekeeping" onto stackoverflow, will I be misinterpreting monads? |
2022-04-05 04:39:35 +0200 | <monochrom> | I am elitist and I think stackoverflow is the blind leading the blind and here is my anecdote. |
2022-04-05 04:39:36 +0200 | <dolio> | Probably. |
2022-04-05 04:39:46 +0200 | <abastro> | Well, InstX1, tbh it kind of would be. |
2022-04-05 04:41:22 +0200 | <abastro> | monochrom: Do you also think knowledge base should be distributed by the ppl who know more & better? |
2022-04-05 04:41:57 +0200 | <monochrom> | I do my share of distribution at my http://www.vex.net/~trebla/haskell/ |
2022-04-05 04:42:17 +0200 | <abastro> | Oh wait, is it yours |
2022-04-05 04:42:28 +0200 | <monochrom> | But stackoverflow has all the wrong mechanics and incentives. |
2022-04-05 04:42:49 +0200 | <abastro> | Hmm, could you elaborate? |
2022-04-05 04:42:54 +0200 | terrorjack | (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat) |
2022-04-05 04:43:00 +0200 | <monochrom> | On that point, it's not just me, there are former stackoverflow answerers who blogged on why they quit. |
2022-04-05 04:43:11 +0200 | <abastro> | ! |
2022-04-05 04:43:16 +0200 | <d34df00d> | As I got slightly older (but in no way wiser, sadly) I figured trying to change somebody else's attitude is both pointless and futile. |
2022-04-05 04:43:29 +0200 | <d34df00d> | So nowi I just use my wannabe-knowledge of certain things to flex. |
2022-04-05 04:43:34 +0200 | <InstX1> | the 1226 is actually good |
2022-04-05 04:43:50 +0200 | <monochrom> | My personal impression though is that upvoting is correlated to length rather than correctness. |
2022-04-05 04:43:59 +0200 | <abastro> | Sorry that my attitude is a bit intimidating and is hard to change... |
2022-04-05 04:44:07 +0200 | terrorjack | (~terrorjac@2a01:4f8:1c1e:509a::1) |
2022-04-05 04:44:16 +0200 | <d34df00d> | abastro: nope that's good, intimidating attitudes are best attitutdes. |
2022-04-05 04:44:19 +0200 | <d34df00d> | I'd buy two. |
2022-04-05 04:44:20 +0200 | <abastro> | Oh, now I see. So they implemented the mechanics in wrong way |
2022-04-05 04:44:25 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-04-05 04:44:28 +0200 | <abastro> | d34df00d: Wait wha |
2022-04-05 04:45:13 +0200 | <abastro> | Basically you mean, SO messed up in being a credible crowd-sourced document site, right? |
2022-04-05 04:45:29 +0200 | <abastro> | (Eh, or Q&A site) |
2022-04-05 04:46:16 +0200 | <abastro> | In that they did not set up the facilities around UX correctly towards the unbiased info sharing |
2022-04-05 04:46:34 +0200 | <abastro> | monochrom: Or did I get you wrong? |
2022-04-05 04:47:53 +0200 | <monochrom> | Ugh unbiasedness is the culprit here. Everyone who don't know can cast their upvote. |
2022-04-05 04:48:29 +0200 | <monochrom> | Even Wikipedia knows that they need privileged moderators. |
2022-04-05 04:48:45 +0200 | xff0x | (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) |
2022-04-05 04:48:48 +0200 | <abastro> | I thought stackoverflow also had privileged moderators |
2022-04-05 04:49:00 +0200 | <monochrom> | You need a bias and need that bias to favour experts. |
2022-04-05 04:49:02 +0200 | ellie | (~ellie@user/ellie) (Remote host closed the connection) |
2022-04-05 04:49:15 +0200 | <abastro> | Well, I mean, *public bias* is a thing |
2022-04-05 04:49:49 +0200 | <abastro> | In my experience, collection of experts more likely know better to try being less biased |
2022-04-05 04:50:02 +0200 | <dolio> | The moderators on stack overflow aren't in charge of judging which things are accurate. |
2022-04-05 04:50:03 +0200 | <monochrom> | I think SO moderators only lock and delete questions? |
2022-04-05 04:50:13 +0200 | <abastro> | That's all they do? |
2022-04-05 04:50:29 +0200 | <monochrom> | I would be on board if SO moderators started deleting wrong answers despite upvotes. |
2022-04-05 04:50:30 +0200 | <dolio> | They, like, tell people not to post too many comments. |
2022-04-05 04:50:31 +0200 | <abastro> | Just able to bluntly lock? |
2022-04-05 04:50:43 +0200 | <abastro> | Oh god |
2022-04-05 04:51:05 +0200 | <monochrom> | Right? Wikipedia moderators delete stuff. |
2022-04-05 04:51:12 +0200 | <abastro> | Now sounds like democracy implemented wrong |
2022-04-05 04:52:49 +0200 | <abastro> | Internet truly became ocean of information... which is mostly trash smh |
2022-04-05 04:55:59 +0200 | <abastro> | For that matter, is Wikipedia better than StackOverflow |
2022-04-05 04:59:02 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 246 seconds) |
2022-04-05 05:00:03 +0200 | <abastro> | Anyway, thanks for TILs. Did not know SO was this problematic |
2022-04-05 05:00:34 +0200 | InstX1 | (~Liam@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 268 seconds) |
2022-04-05 05:01:00 +0200 | InstX1 | (~Liam@2600:1006:b001:e27:388d:a695:9e26:c146) |
2022-04-05 05:04:05 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 05:05:28 +0200 | [_] | (~itchyjunk@user/itchyjunk/x-7353470) |
2022-04-05 05:07:09 +0200 | xff0x | (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Quit: xff0x) |
2022-04-05 05:07:50 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2022-04-05 05:08:27 +0200 | xff0x | (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) |
2022-04-05 05:09:18 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 260 seconds) |
2022-04-05 05:13:50 +0200 | InstX1_ | (~Liam@2601:6c4:4080:3f80:715c:6e2e:e135:d0fa) |
2022-04-05 05:15:59 +0200 | InstX1 | (~Liam@2600:1006:b001:e27:388d:a695:9e26:c146) (Ping timeout: 268 seconds) |
2022-04-05 05:18:41 +0200 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 245 seconds) |
2022-04-05 05:18:49 +0200 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Ping timeout: 248 seconds) |
2022-04-05 05:20:45 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
2022-04-05 05:20:59 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 05:21:08 +0200 | euandreh | (~euandreh@2804:14c:33:9fe5:f37c:486d:e6c4:36d4) (Ping timeout: 260 seconds) |
2022-04-05 05:21:42 +0200 | euandreh | (~euandreh@2804:14c:33:9fe5:7b2e:dcb2:6878:c267) |
2022-04-05 05:33:00 +0200 | chenqisu12 | (~chenqisu1@183.217.202.44) (Quit: Leaving) |
2022-04-05 05:34:39 +0200 | InstX1_ | InstX1 |
2022-04-05 05:39:44 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
2022-04-05 05:40:41 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
2022-04-05 05:43:24 +0200 | erisco | (~erisco@d24-57-249-233.home.cgocable.net) (Ping timeout: 240 seconds) |
2022-04-05 05:43:44 +0200 | erisco | (~erisco@d24-57-249-233.home.cgocable.net) |
2022-04-05 05:46:42 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-04-05 05:52:46 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 05:53:06 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 05:55:19 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 05:57:45 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 248 seconds) |
2022-04-05 05:59:04 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Quit: leaving) |
2022-04-05 05:59:29 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-04-05 06:06:06 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Quit: leaving) |
2022-04-05 06:06:18 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-04-05 06:08:23 +0200 | melonai | (~mel@rnrd.eu) (Ping timeout: 256 seconds) |
2022-04-05 06:08:35 +0200 | melonai | (~mel@rnrd.eu) |
2022-04-05 06:08:51 +0200 | sayola1 | (~vekto@dslb-088-078-152-238.088.078.pools.vodafone-ip.de) |
2022-04-05 06:08:57 +0200 | mcglk | (~mcglk@131.191.49.120) (Ping timeout: 256 seconds) |
2022-04-05 06:08:57 +0200 | sabx | (~sabbas@user/sabbas) (Ping timeout: 256 seconds) |
2022-04-05 06:10:05 +0200 | sayola | (~vekto@dslb-088-078-152-238.088.078.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
2022-04-05 06:10:36 +0200 | sabx | (~sabbas@user/sabbas) |
2022-04-05 06:10:39 +0200 | simeon | (~pi@dslb-090-186-003-168.090.186.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
2022-04-05 06:11:52 +0200 | mcglk | (~mcglk@131.191.49.120) |
2022-04-05 06:12:00 +0200 | simeon | (~pi@dslb-090-186-003-168.090.186.pools.vodafone-ip.de) |
2022-04-05 06:13:30 +0200 | cdman | (~dcm@user/dmc/x-4369397) |
2022-04-05 06:14:17 +0200 | bahamas | (~lucian@84.232.140.158) |
2022-04-05 06:17:23 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2022-04-05 06:20:15 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 06:20:47 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 06:24:46 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 06:26:01 +0200 | bahamas | (~lucian@84.232.140.158) (Ping timeout: 248 seconds) |
2022-04-05 06:26:05 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 06:27:35 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 06:30:46 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 245 seconds) |
2022-04-05 06:40:53 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2022-04-05 06:43:13 +0200 | monaaraj | (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 260 seconds) |
2022-04-05 06:43:49 +0200 | abastro | (~abab9579@143.248.229.217) (Ping timeout: 240 seconds) |
2022-04-05 06:47:35 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 06:51:49 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 240 seconds) |
2022-04-05 06:59:50 +0200 | Guest27 | (~Guest27@2601:281:d47f:1590::6b90) |
2022-04-05 07:01:53 +0200 | deadmarshal_ | (~deadmarsh@95.38.113.9) |
2022-04-05 07:02:57 +0200 | KaitoDaumoto | (Frat@user/kaitodaumoto) |
2022-04-05 07:05:07 +0200 | monaaraj | (~MonAaraj@user/mon-aaraj/x-4416475) |
2022-04-05 07:06:14 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 07:15:25 +0200 | Unicorn_Princess | (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Remote host closed the connection) |
2022-04-05 07:15:48 +0200 | zebrag | (~chris@user/zebrag) (Read error: Connection reset by peer) |
2022-04-05 07:18:55 +0200 | jbox | (~jbox@user/jbox) (Read error: Connection reset by peer) |
2022-04-05 07:18:55 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 07:23:44 +0200 | chomwitt | (~chomwitt@2a02:587:dc19:3600:a66b:8309:cc51:32) |
2022-04-05 07:24:17 +0200 | zmt00 | (~zmt00@user/zmt00) (Quit: Leaving) |
2022-04-05 07:25:28 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Quit: Laa shay'a waqi'un moutlaq bale kouloun moumkine) |
2022-04-05 07:26:17 +0200 | zmt00 | (~zmt00@user/zmt00) |
2022-04-05 07:28:55 +0200 | hololeap_ | (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
2022-04-05 07:30:09 +0200 | hololeap_ | (~hololeap@user/hololeap) |
2022-04-05 07:37:28 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2022-04-05 07:49:54 +0200 | joo-_ | (~joo-_@fsf/member/joo--) (Quit: Lost terminal) |
2022-04-05 07:54:39 +0200 | Guest27 | (~Guest27@2601:281:d47f:1590::6b90) (Quit: Client closed) |
2022-04-05 07:56:21 +0200 | jakalx | (~jakalx@base.jakalx.net) () |
2022-04-05 07:56:32 +0200 | [_] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2022-04-05 07:56:56 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2022-04-05 07:57:08 +0200 | jakalx | (~jakalx@base.jakalx.net) |
2022-04-05 08:01:39 +0200 | [exa] | (exa@srv3.blesmrt.net) (Changing host) |
2022-04-05 08:01:39 +0200 | [exa] | (exa@user/exa/x-3587197) |
2022-04-05 08:03:37 +0200 | deadmarshal_ | (~deadmarsh@95.38.113.9) (Ping timeout: 248 seconds) |
2022-04-05 08:05:41 +0200 | defanor | (~defanor@tart.uberspace.net) (Ping timeout: 256 seconds) |
2022-04-05 08:05:56 +0200 | defanor | (~defanor@tart.uberspace.net) |
2022-04-05 08:06:19 +0200 | caubert_ | (~caubert@136.244.111.235) |
2022-04-05 08:06:45 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2022-04-05 08:07:23 +0200 | sudden | (~cat@user/sudden) (Ping timeout: 256 seconds) |
2022-04-05 08:07:23 +0200 | andjjj23_ | (~irc@107.170.228.47) (Ping timeout: 256 seconds) |
2022-04-05 08:07:57 +0200 | caubert | (~caubert@136.244.111.235) (Ping timeout: 256 seconds) |
2022-04-05 08:08:00 +0200 | <Axman6> | vaibhavsagar[m]: Hey man, you around? |
2022-04-05 08:08:56 +0200 | <vaibhavsagar[m]> | Yup, how can I help? |
2022-04-05 08:09:12 +0200 | sudden | (~cat@user/sudden) |
2022-04-05 08:09:26 +0200 | <Axman6> | I just came across an old tab (yeah I'm one of those people) with https://vaibhavsagar.com/blog/2018/07/29/hamts-from-scratch/, and I wanted to say it's great, really well done man |
2022-04-05 08:09:41 +0200 | <vaibhavsagar[m]> | oh, thank you very much |
2022-04-05 08:10:00 +0200 | <vaibhavsagar[m]> | I actually have been exploring an alternative explanation that starts with binary hash trees and builds from there |
2022-04-05 08:10:08 +0200 | DNH | (~DNH@2a02:8109:b740:2c4:9487:ccc0:d294:ae76) |
2022-04-05 08:10:22 +0200 | <Axman6> | HAMT with branching factor of 2? |
2022-04-05 08:10:29 +0200 | <vaibhavsagar[m]> | https://github.com/vaibhavsagar/notebooks/blob/master/hamt/HashArrayMappedTrieProgression.ipynb |
2022-04-05 08:10:30 +0200 | <vaibhavsagar[m]> | yeah |
2022-04-05 08:11:07 +0200 | <vaibhavsagar[m]> | I think what it needs is diagrams but I have to write a bunch of tedious boilerplate to get graphviz to do what I want so I've been procrastinating on that for a few months now |
2022-04-05 08:11:09 +0200 | <Axman6> | nice - yeah not a bad way to start |
2022-04-05 08:11:37 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds) |
2022-04-05 08:11:49 +0200 | <Axman6> | use the diagrams package - I think I gave a talk once on fingertrees where I generated the diagrams from the actual structure of the tree |
2022-04-05 08:12:15 +0200 | <vaibhavsagar[m]> | I've gotten that advice before but I think graphviz is nicer |
2022-04-05 08:12:27 +0200 | <vaibhavsagar[m]> | (for this specifically) |
2022-04-05 08:12:42 +0200 | <Axman6> | fair enough - IIRC it did have some code specifically for drawing trees |
2022-04-05 08:12:43 +0200 | <vaibhavsagar[m]> | e.g. https://github.com/vaibhavsagar/notebooks/blob/master/hamt/HAMTVisualisation.ipynb |
2022-04-05 08:12:52 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 08:12:58 +0200 | <vaibhavsagar[m]> | maybe I need to take another look at it |
2022-04-05 08:13:26 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 08:13:27 +0200 | <vaibhavsagar[m]> | when I tried it last I ended up fussing with the line spacing and it looked kinda jank |
2022-04-05 08:13:41 +0200 | <vaibhavsagar[m]> | but graphviz doesn't let you configure any of that so it's less trouble that way |
2022-04-05 08:13:56 +0200 | <vaibhavsagar[m]> | you basically just take what you get with graphviz |
2022-04-05 08:14:52 +0200 | <Axman6> | diagrams is worth learning anyway, takes a bit of getting used to, but it's pretty crazy once you get it |
2022-04-05 08:15:08 +0200 | <Axman6> | yeah nice with graphviz is you separate out the graph and its styling |
2022-04-05 08:16:45 +0200 | <vaibhavsagar[m]> | maybe you've already seen https://plume-quokka.glitch.me/, where I put my graphviz HAMT visualisation online |
2022-04-05 08:17:24 +0200 | <vaibhavsagar[m]> | hmm, seems broken now |
2022-04-05 08:18:55 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2022-04-05 08:19:06 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2022-04-05 08:20:01 +0200 | DNH | (~DNH@2a02:8109:b740:2c4:9487:ccc0:d294:ae76) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-04-05 08:20:15 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 08:21:04 +0200 | andjjj23_ | (~irc@107.170.228.47) |
2022-04-05 08:24:15 +0200 | acidjnk | (~acidjnk@p200300d0c7049f07f8ca2b00dd6818e1.dip0.t-ipconnect.de) |
2022-04-05 08:24:16 +0200 | Akiva | (~Akiva@user/Akiva) (Ping timeout: 272 seconds) |
2022-04-05 08:28:08 +0200 | DNH | (~DNH@2a02:8109:b740:2c4:9487:ccc0:d294:ae76) |
2022-04-05 08:28:32 +0200 | bahamas | (~lucian@84.232.140.158) |
2022-04-05 08:29:22 +0200 | InstX1_ | (~Liam@2601:6c4:4080:3f80:99cb:ce04:4b4a:7252) |
2022-04-05 08:29:37 +0200 | InstX1 | (~Liam@2601:6c4:4080:3f80:715c:6e2e:e135:d0fa) (Ping timeout: 268 seconds) |
2022-04-05 08:32:28 +0200 | seydar | (~seydar@pool-108-31-245-5.washdc.fios.verizon.net) |
2022-04-05 08:33:28 +0200 | bahamas | (~lucian@84.232.140.158) (Ping timeout: 260 seconds) |
2022-04-05 08:33:49 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:5d73:ba4b:5267:e012) |
2022-04-05 08:35:03 +0200 | odnes | (~odnes@5-203-209-2.pat.nym.cosmote.net) |
2022-04-05 08:35:30 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 08:35:37 +0200 | cfricke | (~cfricke@user/cfricke) |
2022-04-05 08:36:44 +0200 | seydar | (~seydar@pool-108-31-245-5.washdc.fios.verizon.net) (Ping timeout: 246 seconds) |
2022-04-05 08:39:36 +0200 | DNH | (~DNH@2a02:8109:b740:2c4:9487:ccc0:d294:ae76) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-04-05 08:40:25 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 250 seconds) |
2022-04-05 08:41:35 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 240 seconds) |
2022-04-05 08:42:03 +0200 | abastro | (~abab9579@143.248.229.217) (Remote host closed the connection) |
2022-04-05 08:46:08 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 08:46:22 +0200 | coot | (~coot@213.134.190.95) |
2022-04-05 08:46:38 +0200 | michalz | (~michalz@185.246.204.37) |
2022-04-05 08:49:00 +0200 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) |
2022-04-05 08:49:05 +0200 | shriekingnoise | (~shrieking@201.231.16.156) (Quit: Quit) |
2022-04-05 08:50:01 +0200 | raym | (~raym@user/raym) (Ping timeout: 248 seconds) |
2022-04-05 08:51:00 +0200 | raym | (~raym@user/raym) |
2022-04-05 08:53:06 +0200 | zeenk | (~zeenk@2a02:2f04:a313:d600:8d26:ec9f:3ff6:fc94) |
2022-04-05 08:55:19 +0200 | kaph | (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) |
2022-04-05 08:55:43 +0200 | mixfix41 | (~sdenynine@user/mixfix41) |
2022-04-05 08:57:52 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 08:58:39 +0200 | deadmarshal_ | (~deadmarsh@95.38.113.9) |
2022-04-05 08:59:05 +0200 | abastro | (~abab9579@143.248.229.217) (Remote host closed the connection) |
2022-04-05 09:04:45 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 09:06:01 +0200 | nun57 | (~nun@61.140.176.155) (Ping timeout: 248 seconds) |
2022-04-05 09:06:49 +0200 | random-jellyfish | (~random-je@user/random-jellyfish) |
2022-04-05 09:08:59 +0200 | gurkenglas | (~gurkengla@dslb-178-012-018-212.178.012.pools.vodafone-ip.de) |
2022-04-05 09:09:05 +0200 | alp_ | (~alp@user/alp) |
2022-04-05 09:10:15 +0200 | <random-jellyfish> | every time I learn something new, e.g. haskell and functional programming, I get very excited about it but in the end I fail to create anything meaningful with the new thing I've just learned, the only "achievements" consist of reproducing some tutorials, reading and understanding some articles ans solving very simple problems |
2022-04-05 09:10:51 +0200 | CiaoSen | (~Jura@p200300c957311e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2022-04-05 09:10:58 +0200 | <Axman6> | The curse of curiosity without imagination or a problem to solve |
2022-04-05 09:11:18 +0200 | <random-jellyfish> | could this mean I'm not smart or creative enough to leverage the latest technologies in developing myself and the world? |
2022-04-05 09:12:08 +0200 | <siers> | not "not smart enough". indeed, go try to solve a new problem with the language. this is how it always goes with learning new languages |
2022-04-05 09:12:21 +0200 | <opqdonut> | writing an actual program, with a team, that solves an actual problem, in just plain haskell is cool enough |
2022-04-05 09:12:39 +0200 | <opqdonut> | you probably won't need any fancy techniques or libraries |
2022-04-05 09:12:58 +0200 | <Axman6> | The question "I've learnt X, now what should I make?" is a pretty common one, and not one which had a useful answer because it depends more on you. IMO it's ok to use this point as a time to learn more; I often find that's when I'll come across something cool that I do want to build - go on lobste.rs and find some cool algorithm or project and build it in Haskell, that's often what motivates me |
2022-04-05 09:12:59 +0200 | <opqdonut> | after you've written 5 programs or so, you might start seeing the need for fancy stuff, but even then, it might be better for the team to stick to basics |
2022-04-05 09:13:35 +0200 | <jackdk> | ^ this. most of the haskell I write for work is not that galaxybrained. Some small parts are galactic, but nothing intergalactic |
2022-04-05 09:13:37 +0200 | <opqdonut> | advent of code is a nice source of programming exercises if you can't think of anything real |
2022-04-05 09:14:06 +0200 | <opqdonut> | I know I can't think of anything real, that's why I'm a consultant so people come to me with their real problems |
2022-04-05 09:14:14 +0200 | <Axman6> | I find myself often reading some article about someone else's project and thinking "Hmm, I wonder how I'd write that in Haskell" |
2022-04-05 09:14:36 +0200 | <Axman6> | (jackdk will know what that I ACTUALLY think is "I wonder if I can write that in Haskell and make it faster than theirs") |
2022-04-05 09:16:59 +0200 | kuribas | (~user@ptr-25vy0i7lyxwuflpbsmc.18120a2.ip6.access.telenet.be) |
2022-04-05 09:18:11 +0200 | <random-jellyfish> | thanks, very interesting answers |
2022-04-05 09:18:38 +0200 | <Axman6> | I definitely sympathise with the feeling, I've been there many times, and I'm not organised enough to take on a large project of my own |
2022-04-05 09:18:58 +0200 | Psybur | (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba) (Ping timeout: 260 seconds) |
2022-04-05 09:19:08 +0200 | <[exa]> | random-jellyfish: .........honestly, what's wrong on just learning stuff? :D |
2022-04-05 09:19:37 +0200 | <tdammers> | indeed, people need to stop obsessing about "usefulness" and "goals" and "purpose" and all that |
2022-04-05 09:19:45 +0200 | chenqisu1 | (~chenqisu1@183.217.202.44) |
2022-04-05 09:19:50 +0200 | <Axman6> | Amen |
2022-04-05 09:20:05 +0200 | <Axman6> | the way the world's going, it ain't gonna matter soon enough =) |
2022-04-05 09:20:06 +0200 | <siers> | Axman6, I made something faster than haskell than anyone else in my company (maze solver, just for fun). by a huge margin, but also because I had better algorithms :D |
2022-04-05 09:20:24 +0200 | Neuromancer | (~Neuromanc@user/neuromancer) |
2022-04-05 09:20:25 +0200 | <siers> | it is my most serious, longest haskell program ever |
2022-04-05 09:20:29 +0200 | abastro | (~abab9579@143.248.229.217) (Ping timeout: 246 seconds) |
2022-04-05 09:20:57 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 248 seconds) |
2022-04-05 09:21:00 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 09:21:02 +0200 | abastro | (~abab9579@143.248.229.217) (Remote host closed the connection) |
2022-04-05 09:21:15 +0200 | <Axman6> | As much as a hate it, algorithms trump optimisations nearly anyday, but I love optimisations |
2022-04-05 09:21:49 +0200 | <siers> | I did pack bits and mirror them for easier rot8, so there's that! |
2022-04-05 09:22:23 +0200 | <Axman6> | learning how to write C in Haskell is very fun :P |
2022-04-05 09:22:24 +0200 | <siers> | and I'm pretty sure I had numbers to back up the speed improvements |
2022-04-05 09:22:25 +0200 | <[exa]> | random-jellyfish: anyway, people seem obsessed with results and achievements but you need actual problems to start with, otherwise the results are superfluous. If you can't find a problem then you're happy right? :D |
2022-04-05 09:22:29 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 09:22:35 +0200 | <siers> | Axman6, yes :D |
2022-04-05 09:22:49 +0200 | <[exa]> | Axman6: GPU crowd disagrees, throw array bruteforce at stuff!! |
2022-04-05 09:23:01 +0200 | acidjnk | (~acidjnk@p200300d0c7049f07f8ca2b00dd6818e1.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
2022-04-05 09:23:17 +0200 | <siers> | programming is all problems. if you have no problems, congratulations, you may finally go outside and see the sunshine |
2022-04-05 09:24:15 +0200 | <Axman6> | > let isProblem = const True in any isProblem [] |
2022-04-05 09:24:17 +0200 | <lambdabot> | False |
2022-04-05 09:24:34 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
2022-04-05 09:24:34 +0200 | <siers> | I wrote a solver that solves mazes like these: http://raitis.veinbahs.lv/maze/content/lvl5-2021-06-15-14-32-04-c744.mp4 (also generated the pics for the video with haskell) |
2022-04-05 09:24:39 +0200 | <kuribas> | [exa]: for most problems, moving stuff to the GPU already takes longer than calculating on the CPU. |
2022-04-05 09:25:06 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 09:25:12 +0200 | <tdammers> | that's quite the generalization there |
2022-04-05 09:25:34 +0200 | <Axman6> | unless you're on an M1 mac |
2022-04-05 09:25:39 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 09:25:41 +0200 | <abastro> | Throw array brutefoce works well for multithreading at least |
2022-04-05 09:25:47 +0200 | <Axman6> | or... the many other cases where that is also not true :P |
2022-04-05 09:26:18 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 09:27:20 +0200 | <kuribas> | tdammers: well, depending how you count "most" :) For a game engine programmers, it's probably not true, but most programmers are not game engine programmers. |
2022-04-05 09:27:32 +0200 | <abastro> | How are you guys already awake, it is illegal |
2022-04-05 09:27:43 +0200 | <siers> | it's 10:27 here |
2022-04-05 09:27:55 +0200 | <kuribas> | 9:27 :) |
2022-04-05 09:27:55 +0200 | <Axman6> | it's 17:27 here |
2022-04-05 09:28:14 +0200 | <Axman6> | asn't it like 14:27 where you are abastro? |
2022-04-05 09:28:27 +0200 | <kuribas> | People who claim FP is slow because of immutability are completely clueless IMO. |
2022-04-05 09:28:36 +0200 | MajorBiscuit | (~MajorBisc@c-001-028-054.client.tudelft.eduvpn.nl) |
2022-04-05 09:28:59 +0200 | <siers> | Well, it can be true... |
2022-04-05 09:29:08 +0200 | <siers> | that was supposed to be italics |
2022-04-05 09:29:41 +0200 | <kuribas> | siers: I mean in general, not some specific problem where it "might" be slow. |
2022-04-05 09:29:54 +0200 | <tdammers> | kuribas: so are people who just hand-waive the practical difficulties of compiling functional code into efficient machine code for Von Neumann machines |
2022-04-05 09:30:17 +0200 | <kuribas> | tdammers: perhaps, but that's the job of the compiler, no? |
2022-04-05 09:30:27 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2022-04-05 09:31:49 +0200 | <kuribas> | But in reality "performance" is mostly not a function of the programming language. |
2022-04-05 09:32:08 +0200 | <tdammers> | it is, and it isn't |
2022-04-05 09:32:30 +0200 | <tdammers> | the semantics of a given language may make it impossible to implement it efficiently |
2022-04-05 09:32:32 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
2022-04-05 09:32:49 +0200 | <kuribas> | I mean, people claim FP is slow, but you don't hear that about Python or Javascript, which are an order of magnitude slower. |
2022-04-05 09:33:18 +0200 | <tdammers> | Python is actually pretty famous for being slow |
2022-04-05 09:33:19 +0200 | bahamas | (~lucian@84.232.140.158) |
2022-04-05 09:33:34 +0200 | <kuribas> | still it's more popular than ever. |
2022-04-05 09:33:57 +0200 | <tdammers> | correct; because for the things that people use it for, the speed of the Python interpreter doesn't actually matter |
2022-04-05 09:35:10 +0200 | <kuribas> | Yes, and for that realson, the penalty of immutability doesn't matter either. |
2022-04-05 09:35:21 +0200 | <tdammers> | 90% of Python applications are probably one of 1) ad-hoc scripting; 2) scientific stuff; 3) web dev. For #1, speed doesn't matter *at all*; for #2, the grunt work is offloaded to efficient numeric libraries written in C or Fortran or whatever; and for #3, the majority of time is spent waiting for the network and the database, and what remains can usually be solved with caching and horizontal |
2022-04-05 09:35:23 +0200 | <tdammers> | scaling. |
2022-04-05 09:35:45 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
2022-04-05 09:36:08 +0200 | timCF | (~timCF@200-149-20-81.sta.estpak.ee) |
2022-04-05 09:36:22 +0200 | <tdammers> | The problem with "FP slowness" is that if you implement the compiler naively, it can easily turn quadratic or exponential; unlike Python's slowness, which is largely just a constant factor across the board, "FP slowness" is of the nasty big-O kind |
2022-04-05 09:36:37 +0200 | MajorBiscuit | (~MajorBisc@c-001-028-054.client.tudelft.eduvpn.nl) (Ping timeout: 240 seconds) |
2022-04-05 09:37:23 +0200 | <kuribas> | tdammers: that is not an argument against using a FP language. |
2022-04-05 09:37:27 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 268 seconds) |
2022-04-05 09:37:49 +0200 | bahamas | (~lucian@84.232.140.158) (Ping timeout: 240 seconds) |
2022-04-05 09:37:51 +0200 | <kuribas> | at best, it's an argument against rolling your own FP language, or compiler. |
2022-04-05 09:38:04 +0200 | <siers> | was there some limit how much sharing can functional data structures do at most or something? or is this something that I just dreamt? |
2022-04-05 09:38:09 +0200 | <siers> | I saw something like that a long time ago |
2022-04-05 09:38:12 +0200 | <kuribas> | But there are projects, like GRIN, which can do this step efficiently. |
2022-04-05 09:39:16 +0200 | <tdammers> | kuribas: it used to be an argument, until people figured out how to compile FP languages in such a way that the algorithmic explosion can be avoided. |
2022-04-05 09:39:23 +0200 | <kuribas> | siers: well, there's a log(n) factor which needs to be updated for immutable updates. |
2022-04-05 09:39:40 +0200 | jgeerds | (~jgeerds@d5364b87.access.ecotel.net) |
2022-04-05 09:39:47 +0200 | <kuribas> | siers: for most immutable datastructures. |
2022-04-05 09:40:33 +0200 | michalz | (~michalz@185.246.204.37) (Ping timeout: 260 seconds) |
2022-04-05 09:40:41 +0200 | <abastro> | Axman6: It is indeed about 16:40 now |
2022-04-05 09:40:43 +0200 | <maerwald[m]> | tdammers: absolutely. IME, naive FP implementations do much worse than naive C/java/whatever |
2022-04-05 09:40:58 +0200 | <abastro> | So it is morning for east european folks :) |
2022-04-05 09:41:12 +0200 | dextaa_5 | (~dextaa@user/dextaa) (Remote host closed the connection) |
2022-04-05 09:41:42 +0200 | <abastro> | Is Scala one of the naive FP implementations? |
2022-04-05 09:41:58 +0200 | <abastro> | Idk if it is actually slow in industrial practice |
2022-04-05 09:42:55 +0200 | Codaraxis_ | (~Codaraxis@user/codaraxis) (Ping timeout: 260 seconds) |
2022-04-05 09:43:13 +0200 | <siers> | I couldn't answer that because I haven't consluted any benchmarks, but it is fast enough for us at work, haha |
2022-04-05 09:44:23 +0200 | <siers> | pretty much a non-answer, but I wanted to chime in purely because I write scala every day :D |
2022-04-05 09:44:40 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2022-04-05 09:45:37 +0200 | <kuribas> | clojure is pretty slow, but somehow enthousiast keep claiming how fast it is. |
2022-04-05 09:45:50 +0200 | machinedgod | (~machinedg@24.105.81.50) |
2022-04-05 09:45:56 +0200 | <kuribas> | On the back of a famous clojure book it literally says that clojure is "really, really fast". |
2022-04-05 09:46:11 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 09:46:17 +0200 | <kuribas> | Yet, any evidence I found for the performance of clojure shows it fares pretty bad compared to other languages. |
2022-04-05 09:46:36 +0200 | <tdammers> | I'm pretty sure Scala is not a naive implementation. There is some overhead due to having to run on the JVM, which wasn't designed for this kind of thing, but that's in the same category as what makes Python slow, not in the "accidentally quadratic" category of a naive FP implementation. |
2022-04-05 09:46:43 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 09:46:44 +0200 | <kuribas> | IMO an order of magnitude slower than GHC. |
2022-04-05 09:47:31 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 09:47:43 +0200 | <kuribas> | IMO clojure is slow because it doesn't attempt to tear down abstractions, like GHC does. |
2022-04-05 09:47:59 +0200 | <kuribas> | But the clojure crowd must be the most uncritical ever. |
2022-04-05 09:48:30 +0200 | <lortabac> | I benchmarked both Scala and Clojure recently because I had to choose a JVM language for a specific task |
2022-04-05 09:48:34 +0200 | <tdammers> | It doesn't attempt it, because it can't, due to the whole homoiconic live coding stuff. If you want to be able to manipulate code as data at runtime, then you have to keep the abstractions around, otherwise you can't fiddle with them anymore. |
2022-04-05 09:48:43 +0200 | <opqdonut> | yeah the clojure implementation is naive for sure, all the allocs and calls you see in the code actually happen |
2022-04-05 09:48:54 +0200 | <lortabac> | Clojure segfaulted, Scala was much better |
2022-04-05 09:49:06 +0200 | <tdammers> | Then again, Clojure isn't actually a functional language in any meaningful sense of the word |
2022-04-05 09:49:15 +0200 | <opqdonut> | relying on hotspot inlining works out ~ok~ |
2022-04-05 09:49:26 +0200 | <kuribas> | lortabac: how can the jvm segfault? |
2022-04-05 09:49:44 +0200 | <opqdonut> | tdammers: TBH most clojure code I see is fairly functional, preferring pure functions operating on persistent data |
2022-04-05 09:49:46 +0200 | <abastro> | Oh, scala is fast enough in practive, I see |
2022-04-05 09:50:00 +0200 | <abastro> | s/practive/practice |
2022-04-05 09:50:23 +0200 | <tdammers> | opqdonut: you can't even make sure that a clojure "function" is pure to begin with - the whole thing is so dynamic that whether a "function" is pure or not depends on the arguments you pass |
2022-04-05 09:50:25 +0200 | <kuribas> | opqdonut: but referential transparency also doesn't mean much in clojure, since it's fairly impossible to understand a function without context. |
2022-04-05 09:50:39 +0200 | <abastro> | It is strange how Scala reports v slow speed in competitive sites now |
2022-04-05 09:50:43 +0200 | <kuribas> | opqdonut: due to the "everything is a hashmap" approach. |
2022-04-05 09:50:54 +0200 | <lortabac> | kuribas: no idea, you can try the benchmark yourself, it was the right-associative (non tail-recursive) sum of all the naturals from 0 to 1000000 |
2022-04-05 09:51:10 +0200 | <abastro> | Like, Scala is reported as 10 times slower than other languages in most algorithm problems |
2022-04-05 09:51:18 +0200 | <opqdonut> | kuribas: that depends on how you write your code, it's possible to write clear clojure code, and to document your huge hashmaps with libraries like schema or malli |
2022-04-05 09:51:22 +0200 | <tdammers> | so judging whether a function is pure or not requires that you take its entire implementation into account, and the entire context in which it is called, which is pretty much the same as in Python, C, or literally any other language without built-in FP support |
2022-04-05 09:51:41 +0200 | <opqdonut> | kuribas: tdammers: but for sure, clojure merely enables functional programming, it doesn't really enforce it |
2022-04-05 09:51:54 +0200 | <tdammers> | opqdonut: it "enables" it about as much as Python does |
2022-04-05 09:51:56 +0200 | MajorBiscuit | (~MajorBisc@2a02:a461:129d:1:193d:75d8:745d:e91e) |
2022-04-05 09:51:59 +0200 | <opqdonut> | I think FP is a bit more than "your language tags functions as pure/impure" |
2022-04-05 09:52:10 +0200 | <abastro> | Haskell merely enables functional programming, it doesn't enforce it if you use IO liberally |
2022-04-05 09:52:15 +0200 | <opqdonut> | tdammers: accidental mutation is all over the place in python, never a problem in clojure |
2022-04-05 09:52:20 +0200 | <abastro> | Wait what I said doesn't work meh |
2022-04-05 09:52:46 +0200 | <tdammers> | opqdonut: "never a problem"? my experience was different, in horrible horrible ways |
2022-04-05 09:52:48 +0200 | <kuribas> | opqdonut: yeah, but it is typically only used at boundaries, like database, or REST API. So in order to know which type is being passed to a function you need to trace it back in the code. |
2022-04-05 09:52:53 +0200 | <maerwald[m]> | abastro: whether you use IO or not has nothing to do with "functional" |
2022-04-05 09:53:10 +0200 | <kuribas> | opqdonut: until eventually you arrive at a REST API call, where it has a malli schema. |
2022-04-05 09:53:13 +0200 | <opqdonut> | tdammers: fair enough. it's definitely possible to write horrible code in any language |
2022-04-05 09:53:25 +0200 | <tdammers> | granted, clojure makes it easier to be diligent, but you still depend 100% on manual diligence |
2022-04-05 09:53:48 +0200 | <opqdonut> | kuribas: naming, docs, giving malli schemas to functions all help |
2022-04-05 09:53:54 +0200 | <opqdonut> | but it is dynamic programming in the end |
2022-04-05 09:54:05 +0200 | <abastro> | maerwald[m]: Yep, I momentarily failed to see that |
2022-04-05 09:54:21 +0200 | <abastro> | Well what if you use unsafeInterleaveIO liberally tho |
2022-04-05 09:54:22 +0200 | <opqdonut> | and it's fine to have a problem with dynamic programming, I don't love it either, but saying "Clojure isn't actually a functional language in any meaningful sense of the word" is just bull |
2022-04-05 09:54:23 +0200 | <kuribas> | opqdonut: but then, don't you get a huge performance penalty, because all those functions need to check the type at runtime? |
2022-04-05 09:55:01 +0200 | <abastro> | I think clojure counts as FP since Lisp is FP |
2022-04-05 09:55:02 +0200 | <opqdonut> | a) the penalty might not matter b) you can switch off the validations in production (at least for plumatic schema, probably for malli as well) |
2022-04-05 09:55:16 +0200 | <tdammers> | what FP means to me is "programming with functions", and in order to qualify as a "functional language", it needs to have "functions" as a language feature. clojure does not; it only has "procedures", and if you are diligent enough, you can use them to implement functions, but the compiler doesn't care about the difference, and doesn't help you with it in any way |
2022-04-05 09:55:20 +0200 | <kuribas> | abastro: lisp is multi paradigm. But not particularly functional. |
2022-04-05 09:55:47 +0200 | <kuribas> | tdammers: but following your definition, neither ML, ocaml, or scala is functional. |
2022-04-05 09:55:52 +0200 | <opqdonut> | tdammers: see, if you would've said "Clojure isn't actually a functional language in _my_ sense of the word" I would've agreed |
2022-04-05 09:56:00 +0200 | <opqdonut> | but you said "any meaningful sense" |
2022-04-05 09:56:14 +0200 | <abastro> | Lisp is multi paradigm but many places do consider lisp as FP |
2022-04-05 09:56:27 +0200 | <kuribas> | opqdonut: I find referential transparency one of the most important features of FP, and clojure just isn't referentially transparent. |
2022-04-05 09:56:28 +0200 | <tdammers> | well, OK, but what's a definition of "functional programming language", then, that distinguishes Clojure from, say, JavaScript, or C, or Python? |
2022-04-05 09:56:40 +0200 | <siers> | there's nothing more fulfilling than a debate about semantics early in the morning |
2022-04-05 09:56:50 +0200 | <abastro> | kuribas: So only haskell is FP then? |
2022-04-05 09:57:02 +0200 | <abastro> | Wait, you said "one of the most important features" |
2022-04-05 09:57:20 +0200 | <opqdonut> | tdammers: to me, functionality is a feature of the code, and a language is functional if the idiomatic way of programming is functional, and that's certainly true for clojure |
2022-04-05 09:57:23 +0200 | <abastro> | How I understand it is that, it is not strictly necessary for FP |
2022-04-05 09:57:36 +0200 | <opqdonut> | kuribas: referential transparency is a spectrum, GHC Haskell isn't referentially transparent either |
2022-04-05 09:57:41 +0200 | <kuribas> | abastro: I'd say more precicely, lisp allows you to program in a FP style. But most common lisp programs are pretty imperative. |
2022-04-05 09:58:03 +0200 | <abastro> | Welp true, but many ppl just say "code web server in lisp" when I talk about FP |
2022-04-05 09:58:04 +0200 | <tdammers> | opqdonut: a lot of clojure code I've come across, including a lot of code that is considered perfectly "idiomatic", isn't functional at all |
2022-04-05 09:58:09 +0200 | <opqdonut> | it's nice to program in an architecture where things (apart from well known exceptions) are referentially transparent _enough for the use case_ |
2022-04-05 09:58:30 +0200 | <abastro> | "Code an actual web server then talk about it, otherwise we'll just regard it as toy" |
2022-04-05 09:58:36 +0200 | <tdammers> | IME, idiomatic clojure puts a lot of emphasis on "immutable data structures", but completely ignores all other effects |
2022-04-05 09:58:50 +0200 | <abastro> | I mean "Actual web server in common lisp" |
2022-04-05 09:58:55 +0200 | <opqdonut> | tdammers: for sure |
2022-04-05 09:59:03 +0200 | <tdammers> | abastro: people have done that just fine, what's the problem? |
2022-04-05 09:59:07 +0200 | <opqdonut> | still more functional than your typical python code |
2022-04-05 09:59:26 +0200 | <tdammers> | opqdonut: oh yes; python is outright hostile towards FP |
2022-04-05 09:59:40 +0200 | <abastro> | Many ppl say to "me" that I need to be able to code in common lisp to talk about FP |
2022-04-05 09:59:43 +0200 | <tdammers> | I think Guido did it on purpose |
2022-04-05 10:00:03 +0200 | <abastro> | I know, it is just dumb comment. Yet it shows that many ppl think Lisp is quite close to FP |
2022-04-05 10:00:05 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 10:00:20 +0200 | <abastro> | (Lots of languages are multi-paradigm anyway. Even OCaml has objects) |
2022-04-05 10:00:41 +0200 | <tdammers> | Lisp is definitely worth learning, but the mind-blowing thing about it is not FP, but the whole "homoiconicity" thing |
2022-04-05 10:00:45 +0200 | <kuribas> | opqdonut: clojure simply isn't referentially transparent at all. |
2022-04-05 10:01:14 +0200 | <kuribas> | opqdonut: like, on the spectrum, it's more "not transparent" than transparent. |
2022-04-05 10:01:17 +0200 | <tdammers> | What Lisp, and especially Scheme, beautifully demonstrates is how you can build a full-blown general purpose language on top of a ridiculously small core |
2022-04-05 10:01:25 +0200 | <abastro> | How I understand it is that homoiconicity allows FP-esque programming |
2022-04-05 10:01:32 +0200 | <tdammers> | no, not at all |
2022-04-05 10:01:45 +0200 | <abastro> | Other things allow FP programming as well |
2022-04-05 10:01:49 +0200 | <tdammers> | homoiconicity allows the "meta" level to collapse |
2022-04-05 10:01:51 +0200 | <abastro> | But homoiconicity does, too |
2022-04-05 10:02:07 +0200 | <tdammers> | nope. you can program functionally in a Lisp without macros just fine |
2022-04-05 10:02:11 +0200 | <abastro> | s/allow/enables |
2022-04-05 10:02:38 +0200 | <abastro> | Though doesn't standard FP idioms implemented in macros |
2022-04-05 10:02:47 +0200 | <abastro> | Actually I thought nearly everything in lisp was macros |
2022-04-05 10:03:18 +0200 | ccntrq | (~Thunderbi@2a01:e34:eccb:b060:de80:e6ed:5bb7:2742) |
2022-04-05 10:03:29 +0200 | <tdammers> | in practice, yes, a lot of things in lisp are implemented as macros |
2022-04-05 10:03:34 +0200 | <timCF> | Hello! I have a strange problem with leaking memory in my program. It definitely leaks somewhere in http2-client-grpc code, and I can reproduce it with simple program which polls gRPC endpoint without timeout, and I see memory growth like 2Mb/Sec in task manager. But at the same time, I've tried to profile program memory with all kinds of flags, and output diagram shows very normal constant memory usage by |
2022-04-05 10:03:35 +0200 | <opqdonut> | kuribas: I find the level of referential transparency in _my codebases_ is still very useful compared to python/js |
2022-04-05 10:03:37 +0200 | <tdammers> | but that's not what enables FP |
2022-04-05 10:03:40 +0200 | <timCF> | functions and proccesses. Any ideas why memory leak is not shown in profiler output, and how I can find the leak then? |
2022-04-05 10:03:45 +0200 | <timCF> | Hello! I have a strange problem with leaking memory in my program. It definitely leaks somewhere in http2-client-grpc code, and I can reproduce it with simple program which polls gRPC endpoint without timeout, and I see memory growth like 2Mb/Sec in task manager. But at the same time, I've tried to profile program memory with all kinds of flags, and output diagram shows very normal constant memory usage by |
2022-04-05 10:03:51 +0200 | <timCF> | functions and proccesses. Any ideas why memory leak is not shown in profiler output, and how I can find the leak then? |
2022-04-05 10:04:03 +0200 | <opqdonut> | kuribas: but it's hard to separate experiences with languages from experiences with codebases |
2022-04-05 10:04:07 +0200 | BlackboardN_ | (~Blackboar@user/BlackboardN) (Ping timeout: 256 seconds) |
2022-04-05 10:04:58 +0200 | <timCF> | sorry, accidentaly sent message twice |
2022-04-05 10:05:07 +0200 | <kuribas> | opqdonut: the culture of clojure is not, "let's write this function so I can understand it", but "let's write this function so I can mess around with it in the REPL". |
2022-04-05 10:05:34 +0200 | <abastro> | tdammers: Well, I think it would be harder to implement those concepts in lisp without FP. |
2022-04-05 10:05:42 +0200 | BlackboardN | (~Blackboar@user/BlackboardN) |
2022-04-05 10:05:48 +0200 | <opqdonut> | kuribas: I won't contest that |
2022-04-05 10:05:51 +0200 | <abastro> | All this wordings and classifications are quite tiring tbh |
2022-04-05 10:05:58 +0200 | Codaraxis | (~Codaraxis@user/codaraxis) |
2022-04-05 10:07:39 +0200 | dextaa_54 | (~dextaa@user/dextaa) |
2022-04-05 10:07:51 +0200 | <kuribas> | opqdonut: it's not wrong in itself, it just doesn't feel like it follows the FP ideal of making abstractions on top of abstractions. |
2022-04-05 10:10:45 +0200 | <abastro> | Hm, is Clojure still closer to FP than Common Lisp |
2022-04-05 10:11:03 +0200 | <abastro> | (Btw why some FP servers have common lisp channels) |
2022-04-05 10:11:23 +0200 | <kuribas> | abastro: well, yes :) |
2022-04-05 10:12:00 +0200 | bahamas | (~lucian@86.120.77.115) |
2022-04-05 10:13:37 +0200 | mattil | (~mattil@helsinki.portalify.com) |
2022-04-05 10:13:46 +0200 | <tdammers> | Well, Lisp was originally conceived as a didactic vehicle, a thought experiment designed to illustrate how Lambda Calculus is enough, in theory, to make for a Turing-complete programming language. The first implementation was famously made by a student, based on the professor's comment that all it would take to make a Lisp interpreter would be to implement the `eval` function, which the student |
2022-04-05 10:13:48 +0200 | <tdammers> | mistook for a homework assignment. |
2022-04-05 10:14:15 +0200 | <merijn> | tdammers: naah |
2022-04-05 10:14:23 +0200 | <tdammers> | well, that's how the legend goes |
2022-04-05 10:14:32 +0200 | <merijn> | tdammers: The first implementation was made by a grad student of McCarthy |
2022-04-05 10:15:01 +0200 | <abastro> | "Mistook for a HW assignment" LMAO |
2022-04-05 10:15:03 +0200 | <merijn> | not by accident, but because he was collaborating on the research of McCarthy and was like "man, I bet I can implement this" |
2022-04-05 10:15:05 +0200 | <abastro> | What a legend |
2022-04-05 10:15:17 +0200 | <abastro> | So that is HW assignment then |
2022-04-05 10:15:17 +0200 | <merijn> | abastro: That did actually happen in statistics once |
2022-04-05 10:15:46 +0200 | <abastro> | Perhaps they might actually have considered it as an assignment for practicing their field |
2022-04-05 10:16:08 +0200 | <abastro> | Why is lisp quite far from lambda calculus now tho? |
2022-04-05 10:16:30 +0200 | napping | (~brandon@65.128.49.110) (Quit: leaving) |
2022-04-05 10:16:38 +0200 | lawt | (~lawt@2601:200:8101:f140:dea6:32ff:fea1:adf9) (Ping timeout: 260 seconds) |
2022-04-05 10:16:38 +0200 | <tdammers> | is it? |
2022-04-05 10:16:46 +0200 | <merijn> | tdammers: Perhaps you're mixing up your lisp origin story with Dantzig? :p |
2022-04-05 10:16:51 +0200 | gehmehgeh | (~user@user/gehmehgeh) |
2022-04-05 10:17:13 +0200 | <tdammers> | merijn: ah yes, that might be it |
2022-04-05 10:17:39 +0200 | <merijn> | because Dantzig did mistake two open statistics problems for homework and solve them as a student, and that story is well documented :p |
2022-04-05 10:18:03 +0200 | <merijn> | because he overslept and was late for a lecture xD |
2022-04-05 10:18:42 +0200 | <abastro> | Wow, how could one mistook problems for HW and solve it |
2022-04-05 10:19:00 +0200 | <abastro> | Like I cannot comprehend that level of genius |
2022-04-05 10:20:06 +0200 | Psybur | (~Psybur@c-76-123-45-25.hsd1.va.comcast.net) |
2022-04-05 10:20:40 +0200 | <tdammers> | lesson learned: sleep is more important than punctuality |
2022-04-05 10:21:07 +0200 | <abastro> | Being genius is the most important but anyway |
2022-04-05 10:23:08 +0200 | <kuribas> | abastro: I also think current functional language wouldn't be efficient on hardware of 50 years ago. |
2022-04-05 10:23:25 +0200 | ubert1 | (~Thunderbi@p200300ecdf1588eb09611d41de6fd446.dip0.t-ipconnect.de) |
2022-04-05 10:23:25 +0200 | <abastro> | Hmm. |
2022-04-05 10:23:31 +0200 | <kuribas> | abastro: lisps imperativeness may have been necessary in that day. |
2022-04-05 10:23:52 +0200 | <abastro> | Perhaps imperative programming was an unfortunate path due to performance limitation |
2022-04-05 10:24:16 +0200 | <abastro> | I heard that initially, the memory used to be the bottleneck. Even. |
2022-04-05 10:24:34 +0200 | <abastro> | I cannot imagine such world.. |
2022-04-05 10:24:56 +0200 | __monty__ | (~toonn@user/toonn) |
2022-04-05 10:26:41 +0200 | <kuribas> | abastro: never programmed an arduino? :) |
2022-04-05 10:27:19 +0200 | <kuribas> | bottleneck as in speed bottleneck? |
2022-04-05 10:27:35 +0200 | <kuribas> | memory is still a bottleneck. |
2022-04-05 10:27:49 +0200 | <kuribas> | A cache miss can cost hunderds of cycles. |
2022-04-05 10:28:14 +0200 | cosimone | (~user@93-47-228-79.ip115.fastwebnet.it) (Remote host closed the connection) |
2022-04-05 10:28:23 +0200 | merijn | mumbles something about roofline analysis |
2022-04-05 10:28:54 +0200 | lawt | (~lawt@2601:200:8200:6870:dea6:32ff:fea1:adf9) |
2022-04-05 10:29:06 +0200 | <kuribas> | and hundreds of cycles still aren't much compared to network or disk latency. |
2022-04-05 10:30:00 +0200 | zaquest | (~notzaques@5.130.79.72) (Remote host closed the connection) |
2022-04-05 10:31:00 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2022-04-05 10:31:42 +0200 | zaquest | (~notzaques@5.130.79.72) |
2022-04-05 10:33:22 +0200 | <abastro> | Bottleneck as in, size bottleneck |
2022-04-05 10:33:46 +0200 | <abastro> | Memory access speed is problematic, indeed, but that is less unfavorable to FP |
2022-04-05 10:34:01 +0200 | <abastro> | Hard limit on memory usage, that's a stopper |
2022-04-05 10:34:19 +0200 | abastro | (~abab9579@143.248.229.217) (Remote host closed the connection) |
2022-04-05 10:34:55 +0200 | <kuribas> | http://www.ulisp.com/ |
2022-04-05 10:37:27 +0200 | cosimone | (~user@93-47-228-79.ip115.fastwebnet.it) |
2022-04-05 10:40:53 +0200 | cdman | (~dcm@user/dmc/x-4369397) (Remote host closed the connection) |
2022-04-05 10:41:26 +0200 | cdman | (~dcm@27.2.216.95) |
2022-04-05 10:41:27 +0200 | cdman | (~dcm@27.2.216.95) (Changing host) |
2022-04-05 10:41:27 +0200 | cdman | (~dcm@user/dmc/x-4369397) |
2022-04-05 10:42:10 +0200 | kuribas | (~user@ptr-25vy0i7lyxwuflpbsmc.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
2022-04-05 10:47:38 +0200 | perrierjouet | (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Ping timeout: 260 seconds) |
2022-04-05 10:49:36 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 268 seconds) |
2022-04-05 10:55:06 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 10:55:39 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 11:02:55 +0200 | <vaibhavsagar[m]> | Axman6: I fixed my HAMT visualiser https://plume-quokka.glitch.me/ |
2022-04-05 11:03:55 +0200 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-04-05 11:05:23 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 11:05:50 +0200 | kaph | (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) (Ping timeout: 246 seconds) |
2022-04-05 11:06:26 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 11:06:30 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 11:07:15 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-04-05 11:14:41 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2022-04-05 11:15:22 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2022-04-05 11:22:17 +0200 | bahamas | (~lucian@86.120.77.115) (Ping timeout: 268 seconds) |
2022-04-05 11:29:20 +0200 | michalz | (~michalz@185.246.204.104) |
2022-04-05 11:31:31 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-04-05 11:31:49 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-04-05 11:32:11 +0200 | littlebo1eep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-04-05 11:32:28 +0200 | littlebo1eep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Client Quit) |
2022-04-05 11:32:39 +0200 | asthasr | (~asthasr@208.80.78.154) (Quit: asthasr) |
2022-04-05 11:36:17 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
2022-04-05 11:37:47 +0200 | <abastro[m]> | Is there good monad tutorial written in JS? I might want to see how near complete beginners act to it |
2022-04-05 11:39:14 +0200 | <merijn> | abastro[m]: Doubtful |
2022-04-05 11:39:38 +0200 | <abastro[m]> | Oh no :( |
2022-04-05 11:39:38 +0200 | <merijn> | It's like trying to write one in python. You're gonna be missing 90% of the things that make the abstraction useful and nice |
2022-04-05 11:40:18 +0200 | <abastro[m]> | I think in this channel, I heard of monads being used in other languages |
2022-04-05 11:40:46 +0200 | <merijn> | You really need some form of typesystem and (ideally) something like typeclasses to get real value from |
2022-04-05 11:41:06 +0200 | <abastro[m]> | And I was given with https://tomstu.art/refactoring-ruby-with-monads as well |
2022-04-05 11:41:09 +0200 | <merijn> | So you're gonna mostly see it used in language that are a lot like Haskell |
2022-04-05 11:41:34 +0200 | <abastro[m]> | Then how is the tutorial written in ruby? |
2022-04-05 11:41:51 +0200 | <abastro[m]> | Someone here recommended it iirc |
2022-04-05 11:42:01 +0200 | <merijn> | abastro[m]: The problem is that you can only write code using a *specific* "and_then" |
2022-04-05 11:42:10 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 11:42:14 +0200 | belphegor666 | (~satan@user/belphegor666) (Quit: WeeChat 3.4) |
2022-04-05 11:42:23 +0200 | <merijn> | abastro[m]: Much of the usefulness of the Monad class is that you can write generic code that works for any instance of Monad, not just one |
2022-04-05 11:43:37 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 11:43:57 +0200 | <abastro[m]> | I know, but still, someone made use of it in other languages |
2022-04-05 11:44:16 +0200 | <abastro[m]> | Like, `and_then` even exists in many other langs as well |
2022-04-05 11:44:28 +0200 | belphegor666 | (~satan@ip-046-223-003-068.um13.pools.vodafone-ip.de) |
2022-04-05 11:45:03 +0200 | <kritzefitz> | merijn: Do you really need typeclasses for Monads to be useful as an abstraction? I'd imagine that duck typing would be sufficient for the job in languages like Python. |
2022-04-05 11:45:04 +0200 | belphegor666 | (~satan@ip-046-223-003-068.um13.pools.vodafone-ip.de) (Changing host) |
2022-04-05 11:45:04 +0200 | belphegor666 | (~satan@user/belphegor666) |
2022-04-05 11:45:06 +0200 | chomwitt | (~chomwitt@2a02:587:dc19:3600:a66b:8309:cc51:32) (Read error: Connection reset by peer) |
2022-04-05 11:45:19 +0200 | chomwitt | (~chomwitt@2a02:587:dc19:3600:a66b:8309:cc51:32) |
2022-04-05 11:46:13 +0200 | <merijn> | kritzefitz: Yeah, but then reasoning about stuff like lawfulness becomes a PITA |
2022-04-05 11:46:17 +0200 | <abastro[m]> | Right, you could have verbal contract on that |
2022-04-05 11:46:42 +0200 | <abastro[m]> | In haskell we still have verbal contract about laws without enforcement |
2022-04-05 11:48:11 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
2022-04-05 11:51:32 +0200 | <[exa]> | kritzefitz: without type inference it's actually pretty hard to avoid having to explicitly carry the type duck to each "leaf" expression |
2022-04-05 11:53:14 +0200 | <kritzefitz> | [exa]: I'm not sure what you by “type duck”. |
2022-04-05 11:54:13 +0200 | <[exa]> | the type of the monad that should be executed. If you'd type >>= somewhere in a completely abstract python function (say `traverse`), how does it know whether it should do Maybe or State? |
2022-04-05 11:55:11 +0200 | Raito_Bezarius | (~Raito@2a01:e0a:5f9:9681:a0a0:bb76:611f:9da7) (Ping timeout: 252 seconds) |
2022-04-05 11:55:27 +0200 | <kritzefitz> | merijn: Fair. |
2022-04-05 11:56:08 +0200 | <abastro[m]> | Maybe calculate type explicitly? |
2022-04-05 11:56:08 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2022-04-05 11:56:15 +0200 | <[exa]> | (with >>= it could technically take the type from the left argument, but what do you do with `return` ? :D ) |
2022-04-05 11:56:17 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2022-04-05 11:56:58 +0200 | <kritzefitz> | Ah, yes. return is a problem. I see what you mean now. |
2022-04-05 11:57:15 +0200 | <abastro[m]> | Handle Polymorphic type in runtime |
2022-04-05 11:58:03 +0200 | <[exa]> | anyway I'd certainly love to have some reasonable encoding of the monads into other languages but languages without inference just becomes insanely clumsy |
2022-04-05 11:58:07 +0200 | Raito_Bezarius | (~Raito@wireguard/tunneler/raito-bezarius) |
2022-04-05 11:58:25 +0200 | <[exa]> | last time I tried was in Julia, they have this "workaround" even implemented in Monads.jl and I didn't like it |
2022-04-05 11:59:34 +0200 | <[exa]> | as in, "chances to run parsec: 0" |
2022-04-05 12:00:36 +0200 | <abastro[m]> | I mean, still non-full-fledged monads could be useful |
2022-04-05 12:01:48 +0200 | <[exa]> | they have an ad-hoc specified implicitly defined implementation of half of IO, does that qualify? :] |
2022-04-05 12:02:33 +0200 | swistak | (~swistak@185.21.216.141) (Ping timeout: 256 seconds) |
2022-04-05 12:05:03 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 12:05:29 +0200 | <abastro> | Half of IO? |
2022-04-05 12:05:59 +0200 | <abastro> | Wait how is IO ever practical outside of haskell |
2022-04-05 12:07:19 +0200 | <merijn> | abastro: In any other purely functional language with a strong type system? :p |
2022-04-05 12:07:20 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2022-04-05 12:07:28 +0200 | <[exa]> | abastro: it's not, it was an iMpEraTiVE rEfEreNCe |
2022-04-05 12:07:30 +0200 | <merijn> | It's not too hard to imagine something like Ocaml with IO |
2022-04-05 12:09:21 +0200 | <abastro> | Haha imperative reference of IO |
2022-04-05 12:09:30 +0200 | swistak | (~swistak@185.21.216.141) |
2022-04-05 12:09:54 +0200 | <abastro> | Hm actually yeah it might make sense in langs with very strong FP culture with strong type system |
2022-04-05 12:11:30 +0200 | <abastro> | Anyway, so which mainstream language would be suitable to introduce monads for junior devs |
2022-04-05 12:13:10 +0200 | <merijn> | "haskell" |
2022-04-05 12:13:11 +0200 | CiaoSen | (~Jura@p200300c957311e002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
2022-04-05 12:13:44 +0200 | <abastro> | > Me: Mainstream Programming Language |
2022-04-05 12:13:46 +0200 | <lambdabot> | error: |
2022-04-05 12:13:46 +0200 | <lambdabot> | • Data constructor not in scope: Me |
2022-04-05 12:13:46 +0200 | <lambdabot> | • Perhaps you meant one of these: |
2022-04-05 12:13:49 +0200 | <abastro> | > You: "haskell" |
2022-04-05 12:13:50 +0200 | random-jellyfish | (~random-je@user/random-jellyfish) (Quit: Client closed) |
2022-04-05 12:13:50 +0200 | <lambdabot> | error: |
2022-04-05 12:13:50 +0200 | <lambdabot> | Data constructor not in scope: You :: Char |
2022-04-05 12:14:10 +0200 | acidjnk | (~acidjnk@p200300d0c7049f07a51ab7ce4c98e594.dip0.t-ipconnect.de) |
2022-04-05 12:14:17 +0200 | deadmarshal_ | (~deadmarsh@95.38.113.9) (Ping timeout: 248 seconds) |
2022-04-05 12:14:55 +0200 | <[exa]> | abastro: lambdabot thinks you err with that evaluation. :] |
2022-04-05 12:15:08 +0200 | mc47 | (~mc47@xmonad/TheMC47) |
2022-04-05 12:15:10 +0200 | <abastro> | Welp anyway |
2022-04-05 12:15:27 +0200 | <tdammers> | a monad abstraction in an untyped language is about as useful as classes in Python or PHP |
2022-04-05 12:15:40 +0200 | <abastro> | I usually don't say sth is mainstream programming language unless it is on the top 10~20 |
2022-04-05 12:16:05 +0200 | <abastro> | I've seen ppl using classes daily in Python |
2022-04-05 12:16:23 +0200 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2022-04-05 12:16:35 +0200 | <tdammers> | yes, I know. I don't mean "don't use classes in Python", I mean "Python would be better if it had an OOP system that doesn't depend on classes" |
2022-04-05 12:16:47 +0200 | xkuru | (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
2022-04-05 12:16:59 +0200 | <abastro> | So you mean, still quite useful |
2022-04-05 12:17:13 +0200 | <tdammers> | from an ergonomics perspective, classes in an OOP language are useful because they allow for static checks; but Python doesn't do static checks anyway |
2022-04-05 12:17:36 +0200 | <abastro> | Prototype OOP exists though. |
2022-04-05 12:17:40 +0200 | <abastro> | Oh wait |
2022-04-05 12:17:45 +0200 | <merijn> | abastro: I mean, my girlfriend's first language was Haskell. It's fine for beginners :) |
2022-04-05 12:17:48 +0200 | <abastro> | You said classes |
2022-04-05 12:18:00 +0200 | <tdammers> | so when I say foo.save() in Python, then the class of foo is completely irrelevant, all I care about, and all the interpreter checks for me, is whether foo has a .save() method, and that check happens at runtime, just before the call is made |
2022-04-05 12:18:06 +0200 | akegalj | (~akegalj@93-138-67-213.adsl.net.t-com.hr) |
2022-04-05 12:18:19 +0200 | <abastro> | <del>You have a girlfriend? Wat</del> I mean, it's not good for every beginners at least |
2022-04-05 12:18:23 +0200 | <siers> | merijn, it's way easier, if you don't have to think about mutation :) |
2022-04-05 12:18:31 +0200 | <[exa]> | btw the last time I checked TIOBe popularity index, VisualBasic was in top 10 and MATLAB in top 20 |
2022-04-05 12:18:45 +0200 | <abastro> | Yep, VB is somewhat fine |
2022-04-05 12:18:45 +0200 | <tdammers> | and in fact, this kind of "duck typing" is considered idiomatic; so why bother with classes and class inheritance? it just complicates matters, and it doesn't really buy you anything |
2022-04-05 12:18:52 +0200 | <merijn> | [exa]: TIOBE metrics are so wrong it's laughable |
2022-04-05 12:18:58 +0200 | <abastro> | Tho in this case, I need something within top 5 |
2022-04-05 12:19:03 +0200 | <merijn> | [exa]: It's like "search engine folume" levels of accurate |
2022-04-05 12:19:09 +0200 | <merijn> | s/folume/volume |
2022-04-05 12:19:15 +0200 | <siers> | I taught my girlfriend scala though, because syntax has more carry over to other languages, but maybe that's not much of a biggie |
2022-04-05 12:19:17 +0200 | <tdammers> | (it's just that JavaScript's version of prototype-based OOP has scarred generations of programmers...) |
2022-04-05 12:19:32 +0200 | <tdammers> | merijn: found the Dutch guy! |
2022-04-05 12:19:45 +0200 | <siers> | it's obvious by the ij already anyway :) |
2022-04-05 12:20:07 +0200 | <siers> | (and he's mentioned it a number of times here, but never mind that :P) |
2022-04-05 12:20:10 +0200 | <abastro> | i.e. one of Java, JS, Python, Go |
2022-04-05 12:20:28 +0200 | <[exa]> | merijn: omg, I never checked how they do it but this is really laughable. :D |
2022-04-05 12:20:55 +0200 | <tdammers> | fwiw, there is no way one can measure "programming language popularity" in a meaningful way |
2022-04-05 12:21:01 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 12:21:16 +0200 | <abastro> | Well, still, like there are most common 5~10 languages |
2022-04-05 12:21:23 +0200 | <abastro> | where Java, JS, Python, Go would always be in |
2022-04-05 12:21:37 +0200 | <abastro> | (Maybe there is one more I forgot but anyway) |
2022-04-05 12:22:09 +0200 | <tdammers> | I'm pretty sure there is still vastly more C code running in production than Go code |
2022-04-05 12:22:22 +0200 | <abastro> | I forgot C. Yes. |
2022-04-05 12:22:23 +0200 | <abastro> | Apparently |
2022-04-05 12:22:24 +0200 | <abastro> | Lmao |
2022-04-05 12:22:42 +0200 | <abastro> | Java, JS, C, Python, C++, then Go |
2022-04-05 12:22:53 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
2022-04-05 12:22:55 +0200 | <tdammers> | but really, the whole thing already breaks down when you attempt to quantify "use of a programming language" |
2022-04-05 12:22:58 +0200 | <abastro> | (and I thought I quite like C..) |
2022-04-05 12:23:04 +0200 | <[exa]> | abastro: there's likely more PHP code than Go code |
2022-04-05 12:23:14 +0200 | <[exa]> | (also rust code) |
2022-04-05 12:23:22 +0200 | <abastro> | Oh, one good thing is that I do not need to see PHP code in my neighborhood |
2022-04-05 12:23:29 +0200 | <abastro> | It was abolished in my country |
2022-04-05 12:23:37 +0200 | <abastro> | So that's an accomplishment |
2022-04-05 12:23:38 +0200 | <[exa]> | splendid! |
2022-04-05 12:23:46 +0200 | <tdammers> | e.g., PHP has massive usage on the public internet, but 90% of it is wordpress, joomla, and drupal, i.o.w., millions of copies of the same codebases |
2022-04-05 12:23:48 +0200 | <abastro> | Well, instead we have more Java tho |
2022-04-05 12:23:55 +0200 | <abastro> | Still, might be better |
2022-04-05 12:24:05 +0200 | <abastro> | betteer than PHP, I mean |
2022-04-05 12:24:17 +0200 | KaitoDaumoto | (Frat@user/kaitodaumoto) (Remote host closed the connection) |
2022-04-05 12:24:50 +0200 | <tdammers> | that's not a high bar to clear |
2022-04-05 12:24:58 +0200 | <abastro> | XD |
2022-04-05 12:25:29 +0200 | monaaraj | (~MonAaraj@user/mon-aaraj/x-4416475) (Ping timeout: 248 seconds) |
2022-04-05 12:25:39 +0200 | <abastro> | Anyway, the junior devs I know would only accept Java, JS, C, Python, Go |
2022-04-05 12:25:56 +0200 | <tdammers> | "junior dev" kind of implies that what you "accept" is irrelevant |
2022-04-05 12:26:04 +0200 | <abastro> | They are not so fond of cognitive overhead by learning complex languages |
2022-04-05 12:26:10 +0200 | econo | (uid147250@user/econo) (Quit: Connection closed for inactivity) |
2022-04-05 12:26:12 +0200 | <tdammers> | the "junior dev" deal is usually "here's what we use, learn it" |
2022-04-05 12:26:28 +0200 | <abastro> | Yep, but I mean, I am not a senior dev teaching junior devs |
2022-04-05 12:26:35 +0200 | <abastro> | It's just that I know of a few junior devs |
2022-04-05 12:26:46 +0200 | <abastro> | And just want to see the reaction towards the concept of monads |
2022-04-05 12:27:02 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 246 seconds) |
2022-04-05 12:27:17 +0200 | <abastro> | If I were paying them, ofc they would learn I guess XD |
2022-04-05 12:27:18 +0200 | <tdammers> | also: Python is very complex, and among the most difficult programming languages I have worked with (though PHP easily beats it out of the water) |
2022-04-05 12:27:27 +0200 | monaaraj | (~MonAaraj@user/mon-aaraj/x-4416475) |
2022-04-05 12:28:02 +0200 | <tdammers> | "Monad" is actually a very simple concept. It is not complexity that baffles people when they encounter it; the problem is that 1) it is very abstract, and 2) it is usually taught completely wrong. |
2022-04-05 12:28:03 +0200 | <abastro> | This kind of junior devs will only learn what would help them get a job |
2022-04-05 12:28:08 +0200 | alp_ | (~alp@user/alp) (Ping timeout: 260 seconds) |
2022-04-05 12:28:21 +0200 | <abastro> | You know, ppl do not have quite a leeway in life |
2022-04-05 12:28:27 +0200 | timCF | (~timCF@200-149-20-81.sta.estpak.ee) (Quit: leaving) |
2022-04-05 12:28:42 +0200 | <abastro> | Yea, so that's why I am trying to avoid giving wrong impression |
2022-04-05 12:28:51 +0200 | <abastro> | I just want to see in what way they would dislike the concept |
2022-04-05 12:29:01 +0200 | <tomsmeding> | tdammers: Python is a simple language compared to Haskell. However, using it for complex software is harder if you are used to being helped by a type system. |
2022-04-05 12:29:29 +0200 | xff0x | (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Ping timeout: 246 seconds) |
2022-04-05 12:30:08 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2022-04-05 12:30:30 +0200 | <tomsmeding> | a common pattern among people in general is that they like most what they already know; then if someone is willing to do a bit of learning, of course they are going to prefer something for which it is easy to learn the rules |
2022-04-05 12:30:32 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2022-04-05 12:30:53 +0200 | <abastro> | Yeah |
2022-04-05 12:30:54 +0200 | <tomsmeding> | see also: most people using VSCode instead of vim/emacs |
2022-04-05 12:31:13 +0200 | <abastro> | I use VSCode because of UI tho |
2022-04-05 12:31:13 +0200 | <tomsmeding> | though that does have some confounding factors like MS support |
2022-04-05 12:31:20 +0200 | <tomsmeding> | and UI I guess? |
2022-04-05 12:31:24 +0200 | <abastro> | Yes, UI |
2022-04-05 12:31:40 +0200 | <abastro> | I just cannot get rid of this like towards UI |
2022-04-05 12:31:44 +0200 | <tdammers> | I don't think Python is simpler than Haskell from a user perspective. Sure, *implementing* it is a lot simpler, because you don't need a type checker or anything, but in order to *use* Python, you need to understand more concepts than to use Haskell. Or at least that's my personal impression, I haven't actually done any rigid research on the subject. |
2022-04-05 12:32:03 +0200 | <tdammers> | And yes, "simple" and "easy" are different things. |
2022-04-05 12:32:04 +0200 | <abastro> | I mean, ppl learn python much easier |
2022-04-05 12:32:06 +0200 | <tomsmeding> | tdammers: what more concepts do you need to understand to use python than to use haskell? |
2022-04-05 12:32:15 +0200 | <tomsmeding> | (roughly, example-wise) |
2022-04-05 12:32:52 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-04-05 12:32:54 +0200 | seydar | (~seydar@pool-108-31-245-5.washdc.fios.verizon.net) |
2022-04-05 12:33:34 +0200 | <tomsmeding> | the rules of Go are easier to learn than the rules of Agricola, however arguably it's harder to really understand Go than to really understand Agricola |
2022-04-05 12:33:42 +0200 | <tomsmeding> | Python is Go; Haskell is Agricola |
2022-04-05 12:33:49 +0200 | <tdammers> | well, there's a bit more magic in Python - magic functions like __init__ and all that, generators, annotations, various string formatters, ... |
2022-04-05 12:33:57 +0200 | <tomsmeding> | okay the relative ratios are a bit skewed, but that idea |
2022-04-05 12:34:21 +0200 | <tdammers> | Python is probably subjectively easier though |
2022-04-05 12:34:27 +0200 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2022-04-05 12:34:30 +0200 | <abastro> | For ppl, it is easier to learn handful of general rules and loads of exceptions |
2022-04-05 12:34:44 +0200 | <abastro> | Like, they could memorize `__init__` as one of the exceptions |
2022-04-05 12:34:52 +0200 | <abastro> | Many ppl do better with concrete cases |
2022-04-05 12:34:53 +0200 | <tomsmeding> | good point about generators and annotations; string formatters don't count as that's just instances of "a library" |
2022-04-05 12:35:14 +0200 | <tomsmeding> | the magic functions are also all instances of "an automatic method call" |
2022-04-05 12:35:19 +0200 | <siers> | annotations are so ad-hoc |
2022-04-05 12:35:21 +0200 | <tomsmeding> | or operator overloading, I guess |
2022-04-05 12:35:42 +0200 | <abastro> | Annotations are poor man's declarative programming |
2022-04-05 12:35:49 +0200 | <abastro> | At least that is the impression I got in Java |
2022-04-05 12:36:01 +0200 | <tomsmeding> | annotations are nice syntax but ultimately so dumb |
2022-04-05 12:36:21 +0200 | <tomsmeding> | @f(xyz) def g(abc): ... ==== g = f(xyz)(lambda g(abc): ...) |
2022-04-05 12:36:21 +0200 | <lambdabot> | Unknown command, try @list |
2022-04-05 12:36:27 +0200 | <tomsmeding> | @botsnack |
2022-04-05 12:36:27 +0200 | <lambdabot> | :) |
2022-04-05 12:36:33 +0200 | <siers> | "@annotation; def f()... = ..." are "f = annotate $ rest of the fucking function" |
2022-04-05 12:36:40 +0200 | <tomsmeding> | that |
2022-04-05 12:36:48 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 12:36:49 +0200 | <siers> | and for that they had to invent a whole another syntax |
2022-04-05 12:37:00 +0200 | <tomsmeding> | because python doesn't have multi-line lambdas! |
2022-04-05 12:37:09 +0200 | <tomsmeding> | otherwise my rewrite rule would be generally applicable |
2022-04-05 12:37:18 +0200 | seydar | (~seydar@pool-108-31-245-5.washdc.fios.verizon.net) (Ping timeout: 260 seconds) |
2022-04-05 12:37:31 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
2022-04-05 12:37:34 +0200 | <siers> | python the language makes my python sad :( 💩 |
2022-04-05 12:37:51 +0200 | <tomsmeding> | even though it was named after an actual python |
2022-04-05 12:37:58 +0200 | <tdammers> | and let's please not talk about Python's scoping rules |
2022-04-05 12:38:02 +0200 | <tomsmeding> | lol |
2022-04-05 12:38:05 +0200 | <abastro> | You have a python?(snake?) |
2022-04-05 12:38:10 +0200 | <siers> | (and I'm trying to stay hard out here) |
2022-04-05 12:38:15 +0200 | <tomsmeding> | abastro: Guido has (had?) a python |
2022-04-05 12:38:17 +0200 | <tdammers> | wasn't Python (the language) named after Monty Python? |
2022-04-05 12:38:27 +0200 | <abastro> | Oh |
2022-04-05 12:39:09 +0200 | <tomsmeding> | hm then I misremember |
2022-04-05 12:40:09 +0200 | <siers> | . |
2022-04-05 12:42:33 +0200 | <abastro> | Well anyway, so which language among "Java, JS, C, Python, Go" |
2022-04-05 12:42:40 +0200 | <abastro> | To introduce monad concept |
2022-04-05 12:43:19 +0200 | <siers> | haskell 😅 |
2022-04-05 12:43:51 +0200 | <siers> | ooh, ooh! scala |
2022-04-05 12:44:49 +0200 | <abastro> | I mean, that's not an option |
2022-04-05 12:44:56 +0200 | <siers> | for what it's worth, what others said about the necessity for a type system that can express the concept rings true to me |
2022-04-05 12:45:09 +0200 | <abastro> | They just shooked head when seeing any Scala code |
2022-04-05 12:45:20 +0200 | <abastro> | "How could anyone ever understand this" |
2022-04-05 12:45:28 +0200 | <siers> | do you really need to teach someone "monads"? if they're not in the language, you won't benefit from knowing them much |
2022-04-05 12:45:30 +0200 | <tdammers> | Monad doesn't buy you enough as an abstraction in any of these languages to pull its weight |
2022-04-05 12:45:38 +0200 | <siers> | well then you didn't break it down well enough |
2022-04-05 12:45:57 +0200 | <abastro> | Well, I just wanted to see their reactions |
2022-04-05 12:46:12 +0200 | <tdammers> | also: in order to properly understand the Monad abstraction, you first need to understand typeclasses and such |
2022-04-05 12:46:29 +0200 | <siers> | you can always shock someone by throwing gory, new syntax at anyone, that's not really an achievement |
2022-04-05 12:46:33 +0200 | <abastro> | I guess I shouldn't explain, then. |
2022-04-05 12:46:49 +0200 | <abastro> | I mean, I don't want shock |
2022-04-05 12:46:56 +0200 | <opqdonut> | the bind "design pattern" can be taught in e.g. JS and Java (promise.then / flatmap / whatever) |
2022-04-05 12:47:09 +0200 | <opqdonut> | but languages other than Haskell aren't really capable of expressing the Monad abstraction/library |
2022-04-05 12:47:10 +0200 | <abastro> | I want to see the distaste from its great complexity |
2022-04-05 12:47:20 +0200 | <tdammers> | what complexity |
2022-04-05 12:47:25 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 12:47:34 +0200 | <siers> | abastro, aha! you do want to shock them! |
2022-04-05 12:47:43 +0200 | <abastro> | No. |
2022-04-05 12:47:49 +0200 | <tdammers> | Monad really is just bind, return, and the Monad Laws. None of that is more complex than elementary school algebra. |
2022-04-05 12:48:03 +0200 | <abastro> | Elementary school algebra is quite complex to many. |
2022-04-05 12:48:07 +0200 | <abastro> | That is the point. |
2022-04-05 12:48:18 +0200 | <siers> | ok, well, what do you mean by wanting "to see the distaste" then? |
2022-04-05 12:48:35 +0200 | <abastro> | I mean, I just want to test, that was my expectation |
2022-04-05 12:48:52 +0200 | <tdammers> | Well, but if you find Monad "distastefully complex", then you must really hate multiplication. |
2022-04-05 12:48:58 +0200 | <abastro> | I expect them to show distaste from its complexity, as they are only used to anything so simple |
2022-04-05 12:49:22 +0200 | <tdammers> | class inheritance in Java is a lot more complex than the Monad abstraction, really |
2022-04-05 12:49:25 +0200 | <abastro> | Multiplication is not as complex as monad tho, like in most ways |
2022-04-05 12:49:32 +0200 | <siers> | that's not how you teach anything – by trying to connect with someone's distaste of complexity |
2022-04-05 12:49:43 +0200 | <abastro> | Good point, in fact, they dislike Java because they cannot wrap head around class inheritance |
2022-04-05 12:49:53 +0200 | perrierjouet | (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
2022-04-05 12:50:01 +0200 | <abastro> | No, I was not trying to teach them, because that is unrealistic goal |
2022-04-05 12:50:08 +0200 | <abastro> | Ofc if I could, it would be great |
2022-04-05 12:50:19 +0200 | <siers> | 👀 |
2022-04-05 12:50:20 +0200 | <abastro> | Tho it is too unrealistic for that. |
2022-04-05 12:50:26 +0200 | <tdammers> | Again, Monad isn't complex at all. What makes it tricky to intuit is that, despite its utter simplicity, it is a very abstract and general concept, so it's hard to come up with a tangible intuition for it. |
2022-04-05 12:51:00 +0200 | <abastro> | I mean, yea, if you show sth like `a * b = b * a`, they will cower at its difficulty |
2022-04-05 12:51:01 +0200 | <tdammers> | Multiplication is easier that way: you can picture three piles of four marbles each, and visualize that as "3 x 4", and then you count the mental marbles and arrive at "12" |
2022-04-05 12:51:11 +0200 | <abastro> | Yep, exactly |
2022-04-05 12:51:34 +0200 | <tdammers> | And you can then rearrange those 12 marbles into four piles of 3, and thus intuit "a x b == b x a" |
2022-04-05 12:51:35 +0200 | <abastro> | I guess I conflated complexity with difficulty |
2022-04-05 12:52:12 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
2022-04-05 12:52:16 +0200 | <abastro> | They just intuit `a*b = b*a`, but when they see the equation, they cannot stand the abstraction |
2022-04-05 12:52:19 +0200 | <siers> | tdammers, I'm no expert in the corresponding theory, but I've also landed at that — the bind type makes sense and is intuitive for all the concrete types, but I wouldn't try to claim I can give a good intuition about the general case :) |
2022-04-05 12:52:41 +0200 | <tdammers> | siers: exactly. (also see Diehl's "Eightfold Path To Monad Satori") |
2022-04-05 12:53:06 +0200 | <siers> | abastro, so what are you trying to do, if not teach? |
2022-04-05 12:53:20 +0200 | <abastro> | Just trying to give them a taste of monad |
2022-04-05 12:53:44 +0200 | <[exa]> | that's a very abstract taste |
2022-04-05 12:53:45 +0200 | [exa] | dodges |
2022-04-05 12:53:46 +0200 | crazazy | (~user@130.89.171.62) |
2022-04-05 12:54:00 +0200 | <abastro> | And see if they would really have difficulty at it. |
2022-04-05 12:54:02 +0200 | <siers> | yeah, it'll be an abstract case unless you teach them where they're powerful — in haskell or scala |
2022-04-05 12:54:16 +0200 | <[exa]> | abastro: anyway, throwing examples is best for building trust&intuition |
2022-04-05 12:54:18 +0200 | <abastro> | I see, so it would never be possible then. |
2022-04-05 12:54:29 +0200 | <siers> | well, maybe it would be |
2022-04-05 12:54:44 +0200 | <siers> | but if the type system didn't support it, would they be quite the same? |
2022-04-05 12:54:53 +0200 | <abastro> | They have hard time in front of folding function |
2022-04-05 12:55:19 +0200 | <tdammers> | there's also this thing called "problem-solution-ordering" |
2022-04-05 12:55:24 +0200 | <[exa]> | abastro: for monads the common explanatory topic is the burritos analogy, as in "my precious stuff is wrapped in some complexity and I want to write a program that sanely manages the complexity itself, leaving me with my simply looking code" |
2022-04-05 12:55:30 +0200 | <tdammers> | for effective teaching, you have to present the problem before the solution |
2022-04-05 12:55:46 +0200 | <abastro> | Well at least I am aware that burritos are not useful analogy :) |
2022-04-05 12:55:50 +0200 | <tdammers> | the Monad abstraction is a solution; in order to understand it, you have to first experience the problem it solves |
2022-04-05 12:56:02 +0200 | <abastro> | Ofc I am going to present the problem |
2022-04-05 12:56:05 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
2022-04-05 12:56:09 +0200 | <siers> | tdammers, kind of obvious, but it's nice to see it put into words |
2022-04-05 12:56:13 +0200 | <abastro> | Wait.. they would not understand that it is problem :( |
2022-04-05 12:56:23 +0200 | <tdammers> | see, and that's why you won't be able to teach it |
2022-04-05 12:56:35 +0200 | <abastro> | They will forever think e.g. null check is simple enough |
2022-04-05 12:56:36 +0200 | <abastro> | Meh. |
2022-04-05 12:56:38 +0200 | <tdammers> | siers: not my words, unfortunately :D |
2022-04-05 12:56:52 +0200 | <siers> | I'll believe that, but that is not important :) |
2022-04-05 12:56:54 +0200 | <[exa]> | abastro: for that you can perfectly demonstrate Maybe/Either as "erroring complexity", lists as "multiple results complexity", IO as "ordering the stuff right complexity", HTML builders as "who carries the result out complexity" (blaze is cool!), parsecs as "who tracks what we are actually parsing complexity", and at that point it usually clicks |
2022-04-05 12:57:05 +0200 | <tdammers> | abastro: well, the Monad instance of Maybe is, if you squint a little, nothing more than a null checking framework |
2022-04-05 12:57:15 +0200 | <abastro> | Indeed |
2022-04-05 12:57:18 +0200 | <tdammers> | so there's a good start for a problem definition |
2022-04-05 12:57:25 +0200 | <siers> | re: Eightfold Path to Monad Satori |
2022-04-05 12:57:27 +0200 | <siers> | nice |
2022-04-05 12:57:28 +0200 | <abastro> | Tho they won't have hard time with null check themselves |
2022-04-05 12:57:36 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2022-04-05 12:57:38 +0200 | <maerwald> | the problems aren't so much monads, but what we did with them |
2022-04-05 12:57:54 +0200 | <[exa]> | maerwald: +1 |
2022-04-05 12:57:55 +0200 | <abastro> | At least that is my impression when they love Go |
2022-04-05 12:57:57 +0200 | <tdammers> | null checks are fine, it's just that having to spell them out every time gets old quick |
2022-04-05 12:58:20 +0200 | <tdammers> | so we would like a framework that somehow makes null checking automatic, and warns us when we forgot a null check |
2022-04-05 12:58:29 +0200 | <abastro> | I can already expect their answer: "Explicit null check is great for readability" |
2022-04-05 12:58:42 +0200 | <tdammers> | is it, though? |
2022-04-05 12:59:01 +0200 | <tdammers> | it's great for readability when you have to rely on someone reading the code to make sure you have all the null checks in place |
2022-04-05 12:59:02 +0200 | <abastro> | It isn't, but for them, readability is what they can read :P |
2022-04-05 12:59:19 +0200 | <tdammers> | but what if you could outsource that work to the compiler? |
2022-04-05 12:59:21 +0200 | <siers> | "great for readability" is such a circlejerk, I am immediately reminded about all the pointless arguing over this. I have been traumatized |
2022-04-05 12:59:39 +0200 | <[exa]> | abastro: you need to sink the null checks into several layers of functions and loops before it becomes obvious that manual isn't the way |
2022-04-05 12:59:44 +0200 | <abastro> | Outsourcing the work makes it implicit |
2022-04-05 12:59:53 +0200 | <abastro> | So, they'd argue it hinders readability |
2022-04-05 12:59:55 +0200 | <[exa]> | abastro: craft your examples well! :] |
2022-04-05 12:59:59 +0200 | <abastro> | They want to see when it is actually done |
2022-04-05 13:00:22 +0200 | <abastro> | Well they would be fine with it I guess |
2022-04-05 13:00:23 +0200 | <maerwald> | https://paul.bone.id.au/pub/pbone-2016-haskell-sucks.pdf :p |
2022-04-05 13:00:35 +0200 | <tdammers> | "readability" means that the things you need to know in order to understand the code are explicit, and the things you can safely take for granted are not |
2022-04-05 13:00:41 +0200 | <maerwald> | although it goes only very shortly into the monad problem |
2022-04-05 13:00:50 +0200 | <tdammers> | in Java, you cannot take non-nullability for granted, so explicit null checks are a good thing |
2022-04-05 13:00:51 +0200 | <abastro> | Yep, I mean they don't understand true readability |
2022-04-05 13:01:11 +0200 | <geekosaur> | readability is in the eye of the reader |
2022-04-05 13:01:11 +0200 | <maerwald> | but: 1. monads don't compose and 2. transformers are a kludge for the lack of composability of monads |
2022-04-05 13:01:21 +0200 | <abastro> | Yep, readability is in the eye of the reader |
2022-04-05 13:01:30 +0200 | <tdammers> | but in Haskell, we can encode nullability in the type, and that makes null checks something we can take for granted - if a required check is missing, then the code will simply not compile |
2022-04-05 13:01:33 +0200 | <abastro> | Well, tho they say that Go code is usually readable by everyone |
2022-04-05 13:01:43 +0200 | <abastro> | Thus, Go is great for readability :tm: |
2022-04-05 13:01:56 +0200 | <maerwald> | abastro: depends |
2022-04-05 13:02:03 +0200 | <[exa]> | abastro: that's a cobol argument |
2022-04-05 13:02:04 +0200 | <maerwald> | slices can be very hard |
2022-04-05 13:02:12 +0200 | <abastro> | I am saying what they would be saying |
2022-04-05 13:02:16 +0200 | <tdammers> | also: there are some relatively objective metrics wrt readability, but most people focus too much on "familiarity" |
2022-04-05 13:02:21 +0200 | <maerwald> | every Go interview has something about slices |
2022-04-05 13:02:33 +0200 | <abastro> | Familiarity, yeah |
2022-04-05 13:02:37 +0200 | <maerwald> | because many Go devs don't understand them (thorougly) |
2022-04-05 13:02:41 +0200 | <abastro> | Go is centered towards familiar stuffs |
2022-04-05 13:03:18 +0200 | <tdammers> | Python syntax, for example, has some features that are objectively horrible for readability, such as making all sorts of different constructs (classes, procedures, conditionals) look similar |
2022-04-05 13:03:19 +0200 | <abastro> | Anyway, I'd say, Go is good for junior's readability |
2022-04-05 13:03:31 +0200 | <maerwald> | error handling in Go is extremely verbose |
2022-04-05 13:03:32 +0200 | <abastro> | That is, not so much to learn until being able to read |
2022-04-05 13:03:39 +0200 | <tdammers> | but people think of Python as "very readable", because it looks familiar to someone who doesn't have a lot of programming experience |
2022-04-05 13:03:58 +0200 | <maerwald> | also funny: https://www.innoq.com/en/blog/golang-errors-monads/ |
2022-04-05 13:04:00 +0200 | <abastro> | I think Go would be similar case |
2022-04-05 13:04:06 +0200 | <tdammers> | Perl is much better in that regard - it makes maximal use of the available character set, and makes different things look maximally different |
2022-04-05 13:04:12 +0200 | <abastro> | Go is now taking that place of python at least |
2022-04-05 13:04:28 +0200 | <tdammers> | but Perl is considered hard to read by many, because it looks so unfamiliar |
2022-04-05 13:05:04 +0200 | <maerwald> | the only good thing about go is that their maintainers are *extremely* thorough and conservative about considering new features to the language and their impact |
2022-04-05 13:05:16 +0200 | <maerwald> | something that most don't have |
2022-04-05 13:06:24 +0200 | <maerwald> | but that also means they're still discussing whether ADTs are sensible |
2022-04-05 13:06:35 +0200 | xff0x | (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) |
2022-04-05 13:06:50 +0200 | <abastro> | Well I think ADT would not be sensible in their OOP-oriented eyes |
2022-04-05 13:07:01 +0200 | <maerwald> | OOP? |
2022-04-05 13:07:11 +0200 | <maerwald> | go is a procedural language |
2022-04-05 13:07:23 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 13:07:26 +0200 | <abastro> | I heard Go has this `interface` thing |
2022-04-05 13:07:34 +0200 | <maerwald> | that hardly makes it OOP |
2022-04-05 13:07:37 +0200 | <tdammers> | "interface" isn't object-oriented |
2022-04-05 13:08:13 +0200 | <tdammers> | IMO, "OOP" requires the ability to have open-recursion inheritance |
2022-04-05 13:08:41 +0200 | <abastro> | Oh |
2022-04-05 13:08:52 +0200 | <tdammers> | that is, when an object calls a method of itself, even from within an inherited method, the method call is resolved dynamically, based on the actual runtime object, not the lexical type by which it is accessed |
2022-04-05 13:09:46 +0200 | <abastro> | I see. |
2022-04-05 13:10:02 +0200 | <tdammers> | without open recursion, an "object" is really just a record of procedures |
2022-04-05 13:10:13 +0200 | <tdammers> | or a record, where some fields may be procedures |
2022-04-05 13:10:43 +0200 | <abastro> | Hmm |
2022-04-05 13:10:53 +0200 | <tdammers> | which is of course a very useful thing to have, but it's not a new paradigm, people do this in procedural and functional code all the time |
2022-04-05 13:11:03 +0200 | <abastro> | Then I guess they would put ADT at similar level of OOP |
2022-04-05 13:11:13 +0200 | <abastro> | I do think they would be more eager to accept OOP than ADT |
2022-04-05 13:11:38 +0200 | jgeerds | (~jgeerds@d5364b87.access.ecotel.net) (Ping timeout: 252 seconds) |
2022-04-05 13:11:42 +0200 | <maerwald> | Go devs are concerned about the simplicity of their compiler implementation. Something we don't have in Haskell :p |
2022-04-05 13:11:46 +0200 | DNH | (~DNH@2a02:8108:1100:16d8:7904:da90:b863:898) |
2022-04-05 13:12:12 +0200 | <maerwald> | so when they discuss features, it's also a discussion about whether that can even be implemented without significant increase in implementation complexity |
2022-04-05 13:13:03 +0200 | <maerwald> | It's a controversial stance... because I'd rather have complexity in the compiler than in my program. But yeah, someone has to maintain the compiler too. |
2022-04-05 13:13:46 +0200 | <abastro> | Yeah |
2022-04-05 13:13:55 +0200 | boxscape_ | (~boxscape_@p4ff0be5f.dip0.t-ipconnect.de) |
2022-04-05 13:14:07 +0200 | <abastro> | Also increasing complexity budget does not lead to great consequences |
2022-04-05 13:14:36 +0200 | <maerwald> | I think it would be fascinating to marry some of the principles of the Haskell language with the pragmatism of the Go community. I don't think there is any such language/community, yet. |
2022-04-05 13:14:55 +0200 | <tdammers> | maerwald: I've been thinking about this a bit myself |
2022-04-05 13:15:14 +0200 | <abastro> | Wish it were possible |
2022-04-05 13:16:25 +0200 | <abastro> | Btw, back to monads.. So I should not let them know about monads right? |
2022-04-05 13:17:23 +0200 | <abastro> | Maybe, I should avoid trying to get them touch some concepts of FP |
2022-04-05 13:17:28 +0200 | <abastro> | as that would also be difficult for them |
2022-04-05 13:17:39 +0200 | <maerwald> | tdammers: I think the only way I can see this work is with a *set* of languages, that are even more interoperable than C#/F#/F*. So you can have some really fancy DT based stuff that's used by the maintainers of e.g. tls, but compiles to a more boring API. |
2022-04-05 13:19:26 +0200 | <abastro> | <del>Compiles to JVM?</del> |
2022-04-05 13:21:21 +0200 | <boxscape_> | I'm using mtl, and my main monad is just State at the moment. But I'm also using MonadWriter locally. Now I'd like to add another writer to the main monad, but of course I can't do that because of the functional constraint on MonadWriter. I was thinking maybe I'll just add it to the state, is there a better way? |
2022-04-05 13:21:35 +0200 | <maerwald> | abastro: no, F* compiles to actualy F# code (or OCaml code) |
2022-04-05 13:22:34 +0200 | <maerwald> | but now you're maintaining two (or three) compilers :D |
2022-04-05 13:22:38 +0200 | <maerwald> | so it isn't for free |
2022-04-05 13:22:42 +0200 | <abastro[m]> | I mean, more interpperable than C# etc -> use JVM |
2022-04-05 13:23:56 +0200 | <maerwald> | The problem in Haskell is, you cannot opt out of API complexity. If someone thought it's probably cool to express all of this stuff with type families, you're going to deal with it too. |
2022-04-05 13:25:17 +0200 | <maerwald> | So the ergonomics and image of the language is often dictated by the upper 10% of features. Because they will be used somewhere. |
2022-04-05 13:26:13 +0200 | <abastro[m]> | True |
2022-04-05 13:26:14 +0200 | abastro | (~abab9579@143.248.229.217) (Ping timeout: 268 seconds) |
2022-04-05 13:26:17 +0200 | <maerwald> | transpiling is one solution to this |
2022-04-05 13:26:54 +0200 | <abastro[m]> | How about transpiling to JVM |
2022-04-05 13:27:16 +0200 | <geekosaur> | JVM still has some weaknesses when it comes to Haskell-like code |
2022-04-05 13:27:47 +0200 | <abastro[m]> | Oh, bigger weakness than .NET? |
2022-04-05 13:28:00 +0200 | <geekosaur> | I think it'sonly just getting tail calls? |
2022-04-05 13:28:06 +0200 | <boxscape_> | there's both frege and eta as Haskell for the JVM, though I think neither are being actively developed |
2022-04-05 13:28:14 +0200 | <geekosaur> | which are used heavily by STG |
2022-04-05 13:28:23 +0200 | cfricke | (~cfricke@user/cfricke) (Quit: WeeChat 3.4.1) |
2022-04-05 13:28:38 +0200 | <geekosaur> | CLR is indeed a lot friendlier |
2022-04-05 13:29:31 +0200 | <maerwald> | I mean, typescript is such a success story, partly because it's opt-in imo. You can still have your insane js spaghetti if you like. |
2022-04-05 13:29:57 +0200 | <tdammers> | but opt-in also means that the benefits you get from types are marginal |
2022-04-05 13:30:02 +0200 | <abastro[m]> | Hmm, CLR |
2022-04-05 13:30:18 +0200 | <boxscape_> | at least typescript has the --strict flag |
2022-04-05 13:30:20 +0200 | <abastro[m]> | Then maybe, gradual typing is the future |
2022-04-05 13:30:23 +0200 | <maerwald> | tdammers: well, you can use the types too, but then you gotta write typescript |
2022-04-05 13:30:57 +0200 | <tdammers> | maerwald: but if you're using an untyped library that you don't control, then the type guarantees pretty much end at the API boundary |
2022-04-05 13:31:00 +0200 | <abastro[m]> | Wait, haskell does not mesh well with any imperative code though |
2022-04-05 13:31:14 +0200 | <tdammers> | abastro[m]: it actually meshes surprisingly well |
2022-04-05 13:31:14 +0200 | <abastro[m]> | So it would be hard to have the middleman language |
2022-04-05 13:31:26 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
2022-04-05 13:31:35 +0200 | <tdammers> | FFI-ing C code into Haskell is, IME, easier than into most OOP languages |
2022-04-05 13:31:35 +0200 | <abastro[m]> | I mean, you frequently need IO to connect to those |
2022-04-05 13:31:40 +0200 | <merijn> | abastro[m]: What makes you say that? |
2022-04-05 13:31:40 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 13:31:42 +0200 | <merijn> | abastro[m]: So? |
2022-04-05 13:31:45 +0200 | <maerwald> | tdammers: I'm more thinking about the F* vs F# difference. Both have strong types, but only one has refinement/dependent types. |
2022-04-05 13:31:47 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
2022-04-05 13:31:59 +0200 | <maerwald> | It's your choice at which complexity level you want to work. |
2022-04-05 13:32:02 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 13:32:02 +0200 | <tdammers> | maerwald: I must admit I am not familiar with either of them to any meaningful degree |
2022-04-05 13:32:10 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
2022-04-05 13:32:14 +0200 | <merijn> | abastro[m]: I fail to see how "you need to use IO" and "does not mesh well" are related |
2022-04-05 13:32:19 +0200 | <abastro[m]> | The strong typing is going to have struggle with the system |
2022-04-05 13:32:23 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 13:32:31 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
2022-04-05 13:32:35 +0200 | <abastro[m]> | I mean, this means littering IO in the codebase |
2022-04-05 13:32:43 +0200 | <abastro[m]> | Which fairly many ppl dislike |
2022-04-05 13:32:44 +0200 | <maerwald> | tdammers: so let's say you write a superset language of Haskell with dependent types that compiles back to haskell. So you can provide two APIs. |
2022-04-05 13:32:46 +0200 | <merijn> | "litter" implies something bad |
2022-04-05 13:32:47 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 13:32:47 +0200 | <AndreasK> | If the C FFI function can be treated as a pure mapping from input to output one doesn't even need IO |
2022-04-05 13:32:53 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
2022-04-05 13:33:07 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 13:33:11 +0200 | <tdammers> | abastro[m]: it's just making the littering of effects explicit |
2022-04-05 13:33:15 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
2022-04-05 13:33:23 +0200 | <tdammers> | abastro[m]: which, according to how you described the target audience, should be seen as a good thing |
2022-04-05 13:33:28 +0200 | ChanServ | +o litharge |
2022-04-05 13:33:29 +0200 | litharge | +b *!*@98.38.249.169 |
2022-04-05 13:33:29 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 13:33:32 +0200 | <merijn> | abastro[m]: Over focussing on avoiding IO and acting like IO is bad is a rather common thing many beginners do. In practice I fail to see the problem. Some things just involve a lot of IO |
2022-04-05 13:33:37 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
2022-04-05 13:33:39 +0200 | litharge | -o litharge |
2022-04-05 13:33:52 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 13:33:54 +0200 | <geekosaur> | hm |
2022-04-05 13:33:58 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
2022-04-05 13:34:01 +0200 | <abastro[m]> | Yea, I thought ppl does not make extreme use of FFI because of the purity barrier |
2022-04-05 13:34:12 +0200 | <tdammers> | that is not true |
2022-04-05 13:34:12 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 13:34:16 +0200 | <tdammers> | there is no "purity barrier" |
2022-04-05 13:34:20 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Remote host closed the connection) |
2022-04-05 13:34:23 +0200 | ChanServ | +o litharge |
2022-04-05 13:34:23 +0200 | <abastro[m]> | I mean ofc, IO is common in codd |
2022-04-05 13:34:23 +0200 | litharge | +b *!*@c-174-63-118-52.hsd1.ma.comcast.net |
2022-04-05 13:34:33 +0200 | litharge | -o litharge |
2022-04-05 13:34:46 +0200 | <tdammers> | it's just that when you FFI C procedures into Haskell, it is up to you to decide whether they should be declared in IO on the Haskell side, and if not, to make sure that that is safe |
2022-04-05 13:34:57 +0200 | <abastro[m]> | But then, why are many libraries not thin facade over C codes? |
2022-04-05 13:35:10 +0200 | <tdammers> | because it's often not necessary to resort to C |
2022-04-05 13:35:16 +0200 | <abastro[m]> | I heard langs like python have really thin facades |
2022-04-05 13:35:21 +0200 | <merijn> | abastro[m]: I call BS |
2022-04-05 13:35:25 +0200 | <hpc> | in python it's because the language is hella slow |
2022-04-05 13:35:29 +0200 | <maerwald> | abastro[m]: yaml is |
2022-04-05 13:35:30 +0200 | <geekosaur> | many haskell libs *are* such thin wrappers |
2022-04-05 13:35:33 +0200 | <merijn> | abastro[m]: Haskell's FFI to C is *much* less painful to use |
2022-04-05 13:35:35 +0200 | <hpc> | you're not getting numpy performance in native python |
2022-04-05 13:35:38 +0200 | <merijn> | (than python's) |
2022-04-05 13:35:52 +0200 | <geekosaur> | and then there's higher level interfaces which allow you to work with them in native idiom |
2022-04-05 13:35:58 +0200 | <abastro[m]> | Are many haskell libs thin wrappers? |
2022-04-05 13:35:58 +0200 | <merijn> | And even numpy needs meta libraries to make it fast |
2022-04-05 13:36:09 +0200 | <abastro[m]> | Then why are there still not enough libraries |
2022-04-05 13:36:12 +0200 | <merijn> | abastro[m]: Some, depends on the library. How easy the model fits, etc. |
2022-04-05 13:36:21 +0200 | <hpc> | abastro[m]: look through hackage for anything that's the name of a c lib |
2022-04-05 13:36:25 +0200 | <hpc> | like sdl and such |
2022-04-05 13:36:25 +0200 | <merijn> | abastro[m]: At what point are there "enough" libraries? |
2022-04-05 13:36:35 +0200 | dextaa_54 | (~dextaa@user/dextaa) (Read error: Connection reset by peer) |
2022-04-05 13:36:39 +0200 | <boxscape_> | abastro[m] a lot of graphics-related haskell libraries are such wrappers |
2022-04-05 13:36:53 +0200 | <abastro[m]> | When ppl can find library for some obscure thing as well |
2022-04-05 13:36:56 +0200 | <hpc> | there's a lot out there, but haskell doesn't abdicate its role as a programming language for something like vector math |
2022-04-05 13:36:57 +0200 | <merijn> | abastro[m]: If you know C reasonably well, using GHC's FFI is very trivial |
2022-04-05 13:37:20 +0200 | <geekosaur> | "enough libraries": because someone needs to do the work. even in python it's not just run a script over a C lib to generate the python wrapper |
2022-04-05 13:37:57 +0200 | <abastro[m]> | Like, I recall someone saying that there is no binding to Microsoft SQL Server |
2022-04-05 13:38:17 +0200 | <abastro[m]> | And Oracle DB |
2022-04-05 13:38:35 +0200 | <abastro[m]> | Saw it from a link describing maturity of haskell on domains |
2022-04-05 13:38:43 +0200 | <hpc> | there's absolutely database drivers for those |
2022-04-05 13:38:46 +0200 | dextaa_54 | (~dextaa@user/dextaa) |
2022-04-05 13:39:15 +0200 | <abastro[m]> | Hmmm, what does the link mean then |
2022-04-05 13:39:28 +0200 | <hpc> | no clue, you didn't link it :P |
2022-04-05 13:42:44 +0200 | <maerwald> | I tried to use mongodb once in Haskell |
2022-04-05 13:43:01 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 13:43:07 +0200 | <hpc> | that's a mistake in any language :D |
2022-04-05 13:43:09 +0200 | monaaraj | (~MonAaraj@user/mon-aaraj/x-4416475) (Remote host closed the connection) |
2022-04-05 13:43:10 +0200 | <merijn> | I would consider a lack of mongodb bindings a feature in any language :D |
2022-04-05 13:43:10 +0200 | <abastro[m]> | Let me search it up |
2022-04-05 13:43:13 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 260 seconds) |
2022-04-05 13:43:19 +0200 | <hpc> | merijn: *highfive* |
2022-04-05 13:43:45 +0200 | wolfshappen | (~waff@irc.furworks.de) (Quit: later) |
2022-04-05 13:43:56 +0200 | <abastro> | lmao |
2022-04-05 13:44:10 +0200 | wolfshappen | (~waff@irc.furworks.de) |
2022-04-05 13:44:53 +0200 | <abastro> | https://github.com/Gabriel439/post-rfc/blob/main/sotu.md |
2022-04-05 13:45:05 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 13:45:16 +0200 | <maerwald> | merijn: yeah, there's a library for mongodb schemas... but that doesn't exist in haskell |
2022-04-05 13:45:22 +0200 | <maerwald> | that's the only sane way to use this beast |
2022-04-05 13:45:44 +0200 | <merijn> | I don't think there is a sane way to use mongodb unless you literally don't care about your data :p |
2022-04-05 13:45:51 +0200 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-04-05 13:46:06 +0200 | califax | (~califax@user/califx) |
2022-04-05 13:46:27 +0200 | <maerwald> | it's just money transactions, so why would you |
2022-04-05 13:46:29 +0200 | <maerwald> | :D |
2022-04-05 13:46:47 +0200 | <abastro> | Then what are all the folks praising MongoDB |
2022-04-05 13:46:51 +0200 | <abastro> | And refusing to use other DBs |
2022-04-05 13:47:03 +0200 | <tdammers> | because it's what they know |
2022-04-05 13:47:17 +0200 | <hpc> | if you can call it "knowing" |
2022-04-05 13:47:54 +0200 | <abastro> | I mean, they learned SQL |
2022-04-05 13:48:02 +0200 | <abastro> | And still went to use MongoDB |
2022-04-05 13:48:24 +0200 | <tdammers> | "knowing" as in "feeling familiar" |
2022-04-05 13:48:26 +0200 | <abastro> | https://github.com/Gabriel439/post-rfc/blob/main/sotu.md#databases-and-data-stores |
2022-04-05 13:48:41 +0200 | <tdammers> | they may not have learned SQL properly |
2022-04-05 13:48:43 +0200 | <abastro> | ^ Describes that there is no bindingto MS SQL Server and Oracle |
2022-04-05 13:48:46 +0200 | <merijn> | abastro: So, I don't know how to break this to you. But on the whole, most people don't know what they're talking about :D |
2022-04-05 13:48:54 +0200 | <abastro> | Yep, I mean perhaps learning SQL properly would have been hard to them |
2022-04-05 13:48:54 +0200 | <merijn> | *Especially* on the internet |
2022-04-05 13:48:56 +0200 | <hpc> | being able to write insert, select, update, delete statements does not count as learning sql |
2022-04-05 13:49:18 +0200 | <abastro> | merijn: Indeed, in this case it was more personal engagement tho |
2022-04-05 13:49:37 +0200 | <abastro> | hpc: You forgot "joining" there |
2022-04-05 13:50:08 +0200 | <abastro> | Is there really binding towards Oracle? Is that article outdated? |
2022-04-05 13:50:09 +0200 | <hpc> | not many people actually know joining |
2022-04-05 13:50:17 +0200 | <abastro> | Welp |
2022-04-05 13:50:28 +0200 | <abastro> | I do know that they learned joining quite a bit. Still prefers MongoDB |
2022-04-05 13:50:43 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 260 seconds) |
2022-04-05 13:50:46 +0200 | mixfix41 | (~sdenynine@user/mixfix41) (Quit: and the winter is outta here...) |
2022-04-05 13:50:54 +0200 | <abastro> | What can I say tho, as they love to use ORM as well |
2022-04-05 13:51:05 +0200 | <abastro> | loved to use ORMs when using SQL* |
2022-04-05 13:51:27 +0200 | <merijn> | abastro: Many people believed the claims MongoDB was making ("fast", "distributed", "safe"), and not the actual testing that shows mongodb (at least in the beginning) dropped data on the floor *all the time* |
2022-04-05 13:51:28 +0200 | <tdammers> | so basically, compensating for lack of understanding with superficially easy APIs |
2022-04-05 13:51:54 +0200 | <tdammers> | textbook anti-intellectualism |
2022-04-05 13:51:57 +0200 | <tdammers> | "don't make me think" |
2022-04-05 13:52:02 +0200 | <abastro> | merijn: Well that's true, yes. |
2022-04-05 13:52:16 +0200 | <merijn> | Dammit, I forgot the name of the guy who did those in-depth ACID compliance tests for databases |
2022-04-05 13:52:16 +0200 | <abastro> | tdammers: Yea, it is common everywhere nowadays |
2022-04-05 13:52:25 +0200 | <abastro> | We have to deal with it now |
2022-04-05 13:52:35 +0200 | <tdammers> | also, quasi-mandatory reading in this context: http://www.paulgraham.com/avg.html |
2022-04-05 13:53:06 +0200 | <merijn> | tdammers: Isn't Paul Graham the post child of weird anti-intellectualism when it comes to software dev? :p |
2022-04-05 13:53:13 +0200 | <maerwald> | well, if I had to choose between ultra-correct event sourcing and mongodb... I might actually go with the latter :p But most likely I'd just quit the job on the spot. |
2022-04-05 13:53:43 +0200 | <tdammers> | merijn: Paul Graham is a typical lisper in many regards - principled when it serves him, but then resorting to "pragmatism" in weird places |
2022-04-05 13:53:47 +0200 | abastro | (~abab9579@143.248.229.217) (Remote host closed the connection) |
2022-04-05 13:54:04 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 13:54:10 +0200 | <abastro> | Meh accidentally logged out |
2022-04-05 13:54:14 +0200 | <tdammers> | anyway, I think the Blub Paradox he describes is pretty spot-on, if you ignore the fact that he uses Lisp as an example |
2022-04-05 13:54:31 +0200 | <merijn> | tdammers: He just thinks it doesn't apply to him xD |
2022-04-05 13:54:43 +0200 | <tdammers> | merijn: ah yes, the blub paradox paradox |
2022-04-05 13:55:01 +0200 | <hpc> | that's the nice thing about haskell - it's immune to the blub paradox |
2022-04-05 13:55:09 +0200 | <hpc> | it may be the best language ever, but idris is even better :P |
2022-04-05 13:55:15 +0200 | <merijn> | Ah! |
2022-04-05 13:55:18 +0200 | <merijn> | Jepsen! |
2022-04-05 13:55:20 +0200 | <merijn> | That's the guy |
2022-04-05 13:55:55 +0200 | <abastro> | Well though, it is fair to say that many ppl just cannot stand the difficulty of abstractions and such |
2022-04-05 13:56:23 +0200 | <abastro> | Not just anti-intellectualism, it's that they are trying to do more than what they can |
2022-04-05 13:56:40 +0200 | <maerwald> | well, there's also "elitism" |
2022-04-05 13:56:53 +0200 | <maerwald> | that is ignorance towards intellectual complexity |
2022-04-05 13:56:59 +0200 | <maerwald> | and its impact on engineering |
2022-04-05 13:57:48 +0200 | <abastro> | Elitism was ignorance towards intellectual complexity? |
2022-04-05 13:57:51 +0200 | <abastro> | Wow. |
2022-04-05 13:59:52 +0200 | chexum | (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
2022-04-05 14:00:12 +0200 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2022-04-05 14:00:38 +0200 | <tdammers> | "elitism" in the sense of taking the ability to understand and deal with a certain type of complexity for granted, and refusing to admit that this complexity is detrimental to adoption of the language and its libraries, and that it is a significant problem in production use |
2022-04-05 14:01:02 +0200 | <maerwald> | yes, ecosystem effects |
2022-04-05 14:01:11 +0200 | gehmehgeh | (~user@user/gehmehgeh) (Remote host closed the connection) |
2022-04-05 14:01:11 +0200 | chexum | (~quassel@gateway/tor-sasl/chexum) (Read error: Connection reset by peer) |
2022-04-05 14:01:25 +0200 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2022-04-05 14:01:26 +0200 | <tdammers> | in other words, people have been making horribly complex APIs, and just insisting that if you find them too complex, then the problem is your inability to casually understand them, not that they are simply too complex |
2022-04-05 14:01:51 +0200 | <abastro> | So, haskell? |
2022-04-05 14:01:55 +0200 | <maerwald> | and: just because we understand a concept doesn't mean we understand its *design space* in the practical sense. And most of the latter, that design space is what's going to come back at us |
2022-04-05 14:02:02 +0200 | kaph | (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) |
2022-04-05 14:02:06 +0200 | <tdammers> | yeah |
2022-04-05 14:02:08 +0200 | <merijn> | abastro: Depends on your corner of the Haskell ecosystem |
2022-04-05 14:02:28 +0200 | Psybur | (~Psybur@c-76-123-45-25.hsd1.va.comcast.net) (Ping timeout: 260 seconds) |
2022-04-05 14:02:31 +0200 | <abastro> | I wonder which corner of haskell ecosystem |
2022-04-05 14:02:36 +0200 | <abastro> | I guess Servant |
2022-04-05 14:03:00 +0200 | <maerwald> | servant is a rather good citizen though and has good justification for the approach |
2022-04-05 14:03:06 +0200 | <abastro> | Hmmm. |
2022-04-05 14:03:10 +0200 | <tdammers> | like, it's great that you have discovered how Van Laarhoven lenses magically fit into this self-contained ecosystem of all sorts of functors and traversals and whatnot, and it all beautifully works out; but the reality of it is that you often end up with completely useless error messages that aren't helpful at all |
2022-04-05 14:03:13 +0200 | <abastro> | Which libraries do you mean? |
2022-04-05 14:03:29 +0200 | ChanServ | +o litharge |
2022-04-05 14:03:30 +0200 | litharge | -bo *!*@98.38.249.169 litharge |
2022-04-05 14:03:37 +0200 | <maerwald> | tdammers: heh, are you marketing optics? :p |
2022-04-05 14:03:55 +0200 | <abastro> | optics aren't particularly immune to the criticism as well tho |
2022-04-05 14:04:00 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-04-05 14:04:00 +0200 | <tdammers> | maerwald: given my professional affiliation, I can see why you would think that XD |
2022-04-05 14:04:22 +0200 | <abastro> | I guess I should distance myself from optics, but.. I just cannot. :( |
2022-04-05 14:04:23 +0200 | ChanServ | +o litharge |
2022-04-05 14:04:23 +0200 | agrosant | (~agrosant@79.103.182.92.dsl.dyn.forthnet.gr) (Read error: Connection reset by peer) |
2022-04-05 14:04:23 +0200 | litharge | -bo *!*@c-174-63-118-52.hsd1.ma.comcast.net litharge |
2022-04-05 14:04:30 +0200 | gehmehgeh | (~user@user/gehmehgeh) |
2022-04-05 14:04:49 +0200 | abastro | (~abab9579@143.248.229.217) (Remote host closed the connection) |
2022-04-05 14:04:57 +0200 | agrosant | (~agrosant@79.103.182.92.dsl.dyn.forthnet.gr) |
2022-04-05 14:04:57 +0200 | Psybur | (~Psybur@2600:1003:b138:112:6968:67e7:2717:bba0) |
2022-04-05 14:05:19 +0200 | AlexNoo_ | AlexNoo |
2022-04-05 14:05:31 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 14:06:42 +0200 | <abastro> | Is `lens` somewhat bad concept then? |
2022-04-05 14:06:59 +0200 | <merijn> | Please define "bad" and "concept" :D |
2022-04-05 14:07:00 +0200 | <maerwald> | no, it's just that there's little difference between internals and API |
2022-04-05 14:07:06 +0200 | <maerwald> | it's all the same |
2022-04-05 14:07:08 +0200 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 246 seconds) |
2022-04-05 14:07:18 +0200 | <tdammers> | the concept is solid and useful |
2022-04-05 14:07:29 +0200 | <tdammers> | and it's actually shared between the lens and optics libraries |
2022-04-05 14:07:33 +0200 | <abastro> | Oh, I thought you mean `lens` itself is quite tangled and byzantine invention |
2022-04-05 14:07:37 +0200 | <tdammers> | the difference is how they are im[plemented |
2022-04-05 14:08:01 +0200 | <abastro> | As how ppl outside haskell community says about `lens` |
2022-04-05 14:08:06 +0200 | <tdammers> | the optics library takes a relatively "down to earth" approach, expressing lenses as what they conceptually are - a getter/setter pair. |
2022-04-05 14:08:12 +0200 | briandaed | (~root@109.95.142.93.r.toneticgroup.pl) |
2022-04-05 14:08:13 +0200 | <abastro> | Btw who is this guy nicked `lens` |
2022-04-05 14:08:34 +0200 | <abastro> | Yep I prefer optics library as well |
2022-04-05 14:08:51 +0200 | <tdammers> | the lens library, by contrast, uses a trick known as "van Laarhoven lenses", which allows embedding both getter and setter into a single function, parametrized over a functor type variable |
2022-04-05 14:09:09 +0200 | <tdammers> | by selecting an appropriate functor, one can use the same function as a getter or as a setter |
2022-04-05 14:09:40 +0200 | <abastro> | Hm actually, this is a question I got often and I myself also had as well: |
2022-04-05 14:09:48 +0200 | <maerwald> | https://hackage.haskell.org/package/optics-core-0.4.1/docs/Optics-Optic.html#t:JoinKinds <- pretty self explanatory and these are internals |
2022-04-05 14:09:56 +0200 | <abastro> | What is the benefit of Van Laarhoven implementation? |
2022-04-05 14:10:01 +0200 | <tdammers> | and, by virtue of a happy little coincidence, composing these van Laarhoven lens functions is equivalent to composing the lenses themselves (but with composition order flipped), so the lens library doesn't have to define a dedicated lens composition operator, you can just use (.) to compose lenses |
2022-04-05 14:10:25 +0200 | <tdammers> | and by extension, you get a bunch of other things for free as well, which is what the lens library extensively exploits |
2022-04-05 14:10:29 +0200 | <siers> | so cool |
2022-04-05 14:10:40 +0200 | <abastro> | I think I saw van laarhoven encoding in optics library as well |
2022-04-05 14:10:41 +0200 | <abastro> | Why is that? |
2022-04-05 14:11:29 +0200 | <boxscape_> | edward has a few paragraphs about the benifits/drawbacks of profunctor optics vs van laarhoven here, abastro https://www.reddit.com/r/haskell/comments/73tlhs/dont_fear_the_profunctor_optics/dnt3bx7/ |
2022-04-05 14:12:01 +0200 | <abastro> | Oh, I meant to say profunctor optics implementation, duh |
2022-04-05 14:12:15 +0200 | <abastro> | It is still quite complex |
2022-04-05 14:12:31 +0200 | <tdammers> | the concept itself isn't complex at all |
2022-04-05 14:14:17 +0200 | <abastro> | Welp I meant to say, difficult |
2022-04-05 14:14:49 +0200 | DNH | (~DNH@2a02:8108:1100:16d8:7904:da90:b863:898) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-04-05 14:15:21 +0200 | DNH | (~DNH@2a02:8108:1100:16d8:7904:da90:b863:898) |
2022-04-05 14:15:47 +0200 | <abastro> | Anyway btw, it is still illusive which libraries you mean by being overly complex |
2022-04-05 14:15:56 +0200 | <abastro> | Other than lens, that is |
2022-04-05 14:16:07 +0200 | <merijn> | That one SQL one :p |
2022-04-05 14:16:25 +0200 | <merijn> | I forget the name |
2022-04-05 14:16:32 +0200 | <tdammers> | esqueleto? |
2022-04-05 14:16:36 +0200 | <maerwald> | beam |
2022-04-05 14:16:39 +0200 | <abastro> | Oh. Beam |
2022-04-05 14:16:42 +0200 | <abastro> | I def recall that one |
2022-04-05 14:17:07 +0200 | <tdammers> | something like beam would generally be about my 4th choice |
2022-04-05 14:17:09 +0200 | <abastro> | Looked through documentation, thought, "No, that's nope, I am not learning this" |
2022-04-05 14:17:15 +0200 | <merijn> | oh, right beam |
2022-04-05 14:17:34 +0200 | <abastro> | Is Opaleye also near the limit? |
2022-04-05 14:17:35 +0200 | <tdammers> | but if you have to take that approach, then beam is about as good as it gets |
2022-04-05 14:17:47 +0200 | <merijn> | tdammers: I dislike esqueleto, because overall it just seems less effort to, ya know, just write SQL :p |
2022-04-05 14:17:59 +0200 | <maerwald> | I switched my code to hasql |
2022-04-05 14:18:01 +0200 | <maerwald> | it's ok |
2022-04-05 14:18:01 +0200 | <tdammers> | merijn: yes, indeed; "just write SQL" is approach #1 for me |
2022-04-05 14:18:21 +0200 | <maerwald> | the encoders/decoders approach is a bit confusing at first |
2022-04-05 14:18:24 +0200 | <merijn> | beam is just...madness |
2022-04-05 14:18:28 +0200 | <maerwald> | but in general I appreciate less typeclass foo |
2022-04-05 14:18:29 +0200 | <abastro> | (Well I legit thought of making an SQL library using typed list, glad that I scraped that one) |
2022-04-05 14:18:49 +0200 | <tdammers> | approach #2 is "whip up my own domain-specific SQL query construction automation" |
2022-04-05 14:18:56 +0200 | cfricke | (~cfricke@user/cfricke) |
2022-04-05 14:19:06 +0200 | <maerwald> | and hasql is designed nicely as a library *set* |
2022-04-05 14:19:07 +0200 | <merijn> | tdammers: I'm doing a mix off 1, 2, and persistent |
2022-04-05 14:19:08 +0200 | <abastro> | *Monomer typeclasses are in extreme fear* |
2022-04-05 14:19:27 +0200 | <merijn> | tdammers: Although persistent only for legacy reasons :p |
2022-04-05 14:19:35 +0200 | <merijn> | And once you have it, might as well use it |
2022-04-05 14:19:38 +0200 | <tdammers> | the advantage of making it application-specific is that you can aggressively exploit application-specific conventions, such as "all primary keys will be UUID's" |
2022-04-05 14:19:52 +0200 | <abastro> | Now that is quite useful convention |
2022-04-05 14:20:19 +0200 | <abastro> | Next time I am making DB for my own usage, I will use UUID Primary key |
2022-04-05 14:20:23 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 14:20:37 +0200 | <tdammers> | just an example - but as long as you have those conventions, and consistently apply them, the complexity of your database abstraction layer melts down a lot, because you can ditch a whole lot of generalizations |
2022-04-05 14:20:46 +0200 | abastro | (~abab9579@143.248.229.217) (Remote host closed the connection) |
2022-04-05 14:21:33 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 14:22:14 +0200 | <abastro> | Is "too many typeclasses" bad? |
2022-04-05 14:22:21 +0200 | <abastro> | When used for name overloading |
2022-04-05 14:22:42 +0200 | <merijn> | name overloading in general is a bad idea, imo |
2022-04-05 14:22:43 +0200 | <abastro> | Not using clever\ tricks |
2022-04-05 14:22:50 +0200 | <merijn> | So "yes" |
2022-04-05 14:22:51 +0200 | <abastro> | monomer is a bad idea then hmm |
2022-04-05 14:22:54 +0200 | mikoto-chan | (~mikoto-ch@213.177.151.239) |
2022-04-05 14:23:12 +0200 | <abastro> | Good UI library in haskell when |
2022-04-05 14:26:59 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Ping timeout: 252 seconds) |
2022-04-05 14:27:07 +0200 | acidjnk | (~acidjnk@p200300d0c7049f07a51ab7ce4c98e594.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2022-04-05 14:28:09 +0200 | <abastro> | Btw are common set of libraries of haskell fine? Like, vector, transformers, containers, unordered-containers, text, bytestring, etc |
2022-04-05 14:29:42 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) |
2022-04-05 14:31:11 +0200 | alp_ | (~alp@user/alp) |
2022-04-05 14:31:59 +0200 | akegalj | (~akegalj@93-138-67-213.adsl.net.t-com.hr) (Quit: leaving) |
2022-04-05 14:35:47 +0200 | <maerwald> | Is there a solution for jsonifying a result set from a postgres library at the client side (without knowing the number of columns or even their types)? |
2022-04-05 14:38:36 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 14:39:09 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 14:39:59 +0200 | xff0x | (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Quit: xff0x) |
2022-04-05 14:40:23 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) |
2022-04-05 14:43:25 +0200 | romesrf | (~romes@2001:8a0:6d13:9700:55ae:5d11:5a75:11c3) (Client Quit) |
2022-04-05 14:43:37 +0200 | fryguybob | (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) (Quit: leaving) |
2022-04-05 14:44:12 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 240 seconds) |
2022-04-05 14:46:06 +0200 | jgeerds | (~jgeerds@d5364b87.access.ecotel.net) |
2022-04-05 14:46:37 +0200 | xff0x | (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) |
2022-04-05 14:47:14 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 14:50:01 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds) |
2022-04-05 14:51:51 +0200 | dyeplexer | (~dyeplexer@user/dyeplexer) (Ping timeout: 260 seconds) |
2022-04-05 14:52:30 +0200 | perrierjouet | (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Ping timeout: 272 seconds) |
2022-04-05 14:56:46 +0200 | razetime | (~quassel@117.254.35.74) |
2022-04-05 15:00:40 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) |
2022-04-05 15:00:44 +0200 | mattil | (~mattil@helsinki.portalify.com) (Remote host closed the connection) |
2022-04-05 15:03:01 +0200 | chenqisu1 | (~chenqisu1@183.217.202.44) (Ping timeout: 240 seconds) |
2022-04-05 15:03:57 +0200 | deadmarshal_ | (~deadmarsh@95.38.113.9) |
2022-04-05 15:05:05 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-04-05 15:05:13 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 250 seconds) |
2022-04-05 15:08:09 +0200 | deadmarshal_ | (~deadmarsh@95.38.113.9) (Ping timeout: 248 seconds) |
2022-04-05 15:14:40 +0200 | abastro | (~abab9579@143.248.229.217) (Remote host closed the connection) |
2022-04-05 15:15:31 +0200 | xff0x_ | (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) |
2022-04-05 15:15:33 +0200 | abastro | (~abab9579@143.248.229.217) |
2022-04-05 15:17:41 +0200 | sondre | (~sondre@2001:700:200:f112::2a03) |
2022-04-05 15:18:02 +0200 | sondre | sondr3 |
2022-04-05 15:19:05 +0200 | <sondr3> | anyone have any experience with reading lots of files in parallel? I have an embarrasingly parallel problem where I want to read and parse a few thousand files |
2022-04-05 15:19:55 +0200 | <sondr3> | I tried using the async package, but it spawns as many threads as files I want to parse, which was... a bit too much, haha |
2022-04-05 15:20:13 +0200 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-04-05 15:20:25 +0200 | califax | (~califax@user/califx) |
2022-04-05 15:20:47 +0200 | tito | (tito@tilde.team) |
2022-04-05 15:21:21 +0200 | fask | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 15:21:29 +0200 | <sondr3> | Something like a concurrent mapM that's bound by the available threads would be ideal, sort of like how `par_iter` from `rayon` in Rust |
2022-04-05 15:21:34 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) |
2022-04-05 15:22:06 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
2022-04-05 15:22:07 +0200 | off^ | (~off@c-24-99-107-170.hsd1.ga.comcast.net) |
2022-04-05 15:22:23 +0200 | <abastro[m]> | IIRC there was a package which is similar to Async but also limits thread number |
2022-04-05 15:23:24 +0200 | <abastro[m]> | https://hackage.haskell.org/package/async-pool-0.9.1/docs/Control-Concurrent-Async-Pool.html |
2022-04-05 15:24:01 +0200 | abastro | (~abab9579@143.248.229.217) (Ping timeout: 268 seconds) |
2022-04-05 15:24:01 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 268 seconds) |
2022-04-05 15:24:32 +0200 | <sondr3> | abastro[m]: thanks, I'll try it out |
2022-04-05 15:24:50 +0200 | ystael | (~ystael@user/ystael) (Quit: Lost terminal) |
2022-04-05 15:25:43 +0200 | abastro | (~abab9579@192.249.26.113) |
2022-04-05 15:25:49 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 240 seconds) |
2022-04-05 15:26:51 +0200 | ystael | (~ystael@user/ystael) |
2022-04-05 15:27:12 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 15:27:44 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 15:30:02 +0200 | fask | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 15:30:19 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 15:30:35 +0200 | perrierjouet | (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
2022-04-05 15:31:23 +0200 | <merijn> | I also wrote my own package with bounded concurrency for that sorta thing |
2022-04-05 15:31:29 +0200 | <merijn> | @hackage broadcast-chan |
2022-04-05 15:31:29 +0200 | <lambdabot> | https://hackage.haskell.org/package/broadcast-chan |
2022-04-05 15:32:21 +0200 | <merijn> | sondr3: I specifically wrote that because the lack of bound on mapConcurrently was a problem for my own trivially parallel IO :p |
2022-04-05 15:32:53 +0200 | mikoto-chan | (~mikoto-ch@213.177.151.239) (Ping timeout: 246 seconds) |
2022-04-05 15:33:30 +0200 | <merijn> | The current implementation isn't super fast, so don't expect great scaling for trivial work, but should be fine for stuff like IO |
2022-04-05 15:34:52 +0200 | mikoto-chan | (~mikoto-ch@213.177.151.239) |
2022-04-05 15:35:12 +0200 | <sondr3> | merijn: nice, I'll try that too and see what works best |
2022-04-05 15:35:58 +0200 | <merijn> | (trivial as in less than 1 millisecond or so) |
2022-04-05 15:36:36 +0200 | <merijn> | sondr3: I have a wrapper for conduit to so you can stream data into a conduit that processes N elements in parallel :) |
2022-04-05 15:36:44 +0200 | <merijn> | (if that helps your usecase :p) |
2022-04-05 15:37:47 +0200 | kaph | (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) (Ping timeout: 246 seconds) |
2022-04-05 15:38:01 +0200 | <sondr3> | I've never used conduit so unless it is very straight forward I'm not sure its worth trying it :p |
2022-04-05 15:38:32 +0200 | marquis_andras | (~marquis_a@14-201-230-116.tpgi.com.au) (Remote host closed the connection) |
2022-04-05 15:39:37 +0200 | BlackboardN | (~Blackboar@user/BlackboardN) (Ping timeout: 248 seconds) |
2022-04-05 15:40:53 +0200 | <merijn> | it's quite nice for stream processing. |
2022-04-05 15:41:40 +0200 | BlackboardN | (~Blackboar@user/BlackboardN) |
2022-04-05 15:42:25 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) |
2022-04-05 15:42:36 +0200 | deadmarshal_ | (~deadmarsh@95.38.113.9) |
2022-04-05 15:43:50 +0200 | <sondr3> | Never touched streaming in Haskell, this is basically me running a megaparsec parser on a bunch of small files that right now is somewhat slow |
2022-04-05 15:45:40 +0200 | <maerwald> | streamly has parsers |
2022-04-05 15:46:03 +0200 | <maerwald> | https://hackage.haskell.org/package/streamly-0.8.2/docs/Streamly-Internal-Data-Parser.html |
2022-04-05 15:47:16 +0200 | <sondr3> | The problem isn't really that the parser itself is very slow, it's that it's slow to run the parser sequentially on >10k files all the time, hehe |
2022-04-05 15:47:36 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 272 seconds) |
2022-04-05 15:47:47 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) |
2022-04-05 15:47:47 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
2022-04-05 15:47:47 +0200 | wroathe | (~wroathe@user/wroathe) |
2022-04-05 15:48:07 +0200 | kaph | (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) |
2022-04-05 15:51:09 +0200 | <tdammers> | so... pump the filenames into a Chan, spawn a number of worker threads, have each one pull a filename from the Chan, process it, rinse and repeat |
2022-04-05 15:51:15 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 15:51:50 +0200 | <merijn> | tdammers: Except the library I linked already does that :p |
2022-04-05 15:51:56 +0200 | <tdammers> | merijn: sure |
2022-04-05 15:52:06 +0200 | <merijn> | tdammers: Because I kept having to do it and managing all the edge cases correctly *sucks* |
2022-04-05 15:52:20 +0200 | <merijn> | So I figured I'd just do it correctly once and reuse it :p |
2022-04-05 15:52:21 +0200 | <tdammers> | haha, yeah, I'd expect that |
2022-04-05 15:52:24 +0200 | xff0x | (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Quit: xff0x) |
2022-04-05 15:53:13 +0200 | <merijn> | Bonus of using conduit is that I apply backwards propagation and block the filename writer if you produce to many :) |
2022-04-05 15:53:26 +0200 | <maerwald> | boring, streamly already has async support |
2022-04-05 15:53:35 +0200 | sprout_ | (~quassel@2a02:a467:ccd6:1:70be:3437:d6be:b5ae) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
2022-04-05 15:54:03 +0200 | sprout | (~quassel@2a02:a467:ccd6:1:70be:3437:d6be:b5ae) |
2022-04-05 15:54:07 +0200 | doyougnu | (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) |
2022-04-05 15:54:07 +0200 | <merijn> | maerwald: My dependency footprint is a fraction of streamly's, so there's that :) |
2022-04-05 15:54:35 +0200 | <maerwald> | if you want few dependencies, Haskell isn't the right language |
2022-04-05 15:54:35 +0200 | Katarushisu | (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Ping timeout: 246 seconds) |
2022-04-05 15:54:52 +0200 | <merijn> | base, transformers, and unliftio-core |
2022-04-05 15:56:13 +0200 | alp_ | (~alp@user/alp) (Ping timeout: 260 seconds) |
2022-04-05 15:56:42 +0200 | Psybur | (~Psybur@2600:1003:b138:112:6968:67e7:2717:bba0) (Ping timeout: 268 seconds) |
2022-04-05 15:56:43 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
2022-04-05 15:56:46 +0200 | xff0x | (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) |
2022-04-05 15:57:39 +0200 | Psybur | (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba) |
2022-04-05 15:58:52 +0200 | mikoto-chan | (~mikoto-ch@213.177.151.239) (Quit: mikoto-chan) |
2022-04-05 15:59:09 +0200 | mikoto-chan | (~mikoto-ch@213.177.151.239) |
2022-04-05 16:00:00 +0200 | jpds | (~jpds@gateway/tor-sasl/jpds) (Quit: WeeChat 3.4.1) |
2022-04-05 16:00:09 +0200 | <abastro> | What if I want less than 100GB dependencies |
2022-04-05 16:01:01 +0200 | <geekosaur> | 100GB does sound a bit exscessive; sounds more like you need to gc stack/cabal |
2022-04-05 16:01:19 +0200 | <geekosaur> | (or nix) |
2022-04-05 16:02:07 +0200 | jpds | (~jpds@gateway/tor-sasl/jpds) |
2022-04-05 16:03:15 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) |
2022-04-05 16:04:11 +0200 | shriekingnoise | (~shrieking@201.231.16.156) |
2022-04-05 16:05:53 +0200 | bahamas | (~lucian@84.232.140.158) |
2022-04-05 16:06:08 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 246 seconds) |
2022-04-05 16:06:29 +0200 | <maerwald> | I use cabal-cache with an S3 bucket and just regularly delete all local stuff |
2022-04-05 16:07:11 +0200 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2022-04-05 16:07:53 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 248 seconds) |
2022-04-05 16:09:08 +0200 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-04-05 16:12:22 +0200 | <abastro> | Yep, I mean I could gc but |
2022-04-05 16:12:26 +0200 | <abastro> | It is hard to do |
2022-04-05 16:12:32 +0200 | <merijn> | Not really |
2022-04-05 16:12:41 +0200 | <merijn> | "rm -rf ~/.cabal/store" |
2022-04-05 16:13:18 +0200 | <merijn> | Or only the subdir for a specific GHC if you want to be a bit more targeted |
2022-04-05 16:13:22 +0200 | <geekosaur> | monochrom has a more selective way but just nuking the store and starting over is usually decent |
2022-04-05 16:14:16 +0200 | <geekosaur> | https://github.com/treblacy/cabalgc |
2022-04-05 16:14:49 +0200 | <janus> | we need a bigger store, such that it can survive nuking... like walmart, but planet-sized |
2022-04-05 16:15:43 +0200 | acidjnk | (~acidjnk@p200300d0c7049f074d48d16d808cf7eb.dip0.t-ipconnect.de) |
2022-04-05 16:16:34 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 16:19:46 +0200 | <razetime> | hello. Is this the correct place to talk about Google Summer of Code for Haskell? |
2022-04-05 16:20:09 +0200 | <janus> | razetime: i think so, which project are you looking at? |
2022-04-05 16:20:26 +0200 | <razetime> | Control headless Chrome/Chromium |
2022-04-05 16:20:33 +0200 | <razetime> | I'm interested in this one |
2022-04-05 16:20:39 +0200 | <razetime> | https://summer.haskell.org/ideas.html#chrome-devtools-protocol |
2022-04-05 16:21:09 +0200 | <janus> | oh, that's mentored by Albert Krewinkel and Jasper Van der Jeugt. I know you can reach Jasper on the Discourse, I am not sure he is on IRC |
2022-04-05 16:21:33 +0200 | <razetime> | i see. Will check out the discourse, then. |
2022-04-05 16:21:38 +0200 | <janus> | well, wait a bit |
2022-04-05 16:21:45 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 16:21:53 +0200 | <janus> | maybe Albert Krewinkel is in here, i just don't know his nick name |
2022-04-05 16:22:04 +0200 | <razetime> | I will stay online here. thanks. |
2022-04-05 16:22:22 +0200 | <janus> | generally you have to wait a few hours on IRC because people are not all hyper obsessive about reading it all the time :P |
2022-04-05 16:22:28 +0200 | <janus> | (like me :O) |
2022-04-05 16:22:59 +0200 | <razetime> | good habits. I agree |
2022-04-05 16:23:02 +0200 | sondr3 | (~sondre@2001:700:200:f112::2a03) (Quit: sondr3) |
2022-04-05 16:24:07 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) |
2022-04-05 16:24:14 +0200 | xff0x | (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) (Quit: xff0x) |
2022-04-05 16:24:16 +0200 | cfricke | (~cfricke@user/cfricke) (Quit: WeeChat 3.4.1) |
2022-04-05 16:24:25 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2022-04-05 16:27:01 +0200 | xff0x | (~xff0x@i121-117-52-147.s41.a013.ap.plala.or.jp) |
2022-04-05 16:27:08 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
2022-04-05 16:28:41 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 248 seconds) |
2022-04-05 16:29:29 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 16:30:27 +0200 | Akiva | (~Akiva@user/Akiva) |
2022-04-05 16:30:27 +0200 | <abastro> | merijn: Well, there is a problem: |
2022-04-05 16:30:35 +0200 | <abastro> | I hate how long it takes to compile |
2022-04-05 16:34:11 +0200 | zaquest | (~notzaques@5.130.79.72) (Remote host closed the connection) |
2022-04-05 16:35:31 +0200 | zaquest | (~notzaques@5.130.79.72) |
2022-04-05 16:35:37 +0200 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 248 seconds) |
2022-04-05 16:37:45 +0200 | chomwitt | (~chomwitt@2a02:587:dc19:3600:a66b:8309:cc51:32) (Ping timeout: 248 seconds) |
2022-04-05 16:39:36 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) |
2022-04-05 16:41:16 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 16:41:33 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 16:41:48 +0200 | Chai-T-Rex | (~ChaiTRex@user/chaitrex) |
2022-04-05 16:42:55 +0200 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Ping timeout: 240 seconds) |
2022-04-05 16:45:25 +0200 | abastro | (~abab9579@192.249.26.113) (Ping timeout: 240 seconds) |
2022-04-05 16:47:36 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 16:47:52 +0200 | <merijn> | abastro: I just nuke it once or twice a year |
2022-04-05 16:47:58 +0200 | fax | (~fax@94.6.139.91) |
2022-04-05 16:49:38 +0200 | fax | (~fax@94.6.139.91) (Remote host closed the connection) |
2022-04-05 16:49:44 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 268 seconds) |
2022-04-05 16:49:56 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 16:50:57 +0200 | <maerwald> | I wonder when cabal hooks finally land. Then I'll add a post-build hook that uploads the artifacts to S3 |
2022-04-05 16:51:03 +0200 | <abastro[m]> | I see.. perhaps mine just grew fast this time. |
2022-04-05 16:51:36 +0200 | <abastro[m]> | Every time I run cabal update, things rebuilf |
2022-04-05 16:51:39 +0200 | <abastro[m]> | Rebuild* |
2022-04-05 16:52:16 +0200 | <merijn> | abastro[m]: That's because by default the cabal build plan uses the newest allowed version, so everytime you update the buildplan changes |
2022-04-05 16:52:23 +0200 | <merijn> | It's not rebuilding things at all |
2022-04-05 16:52:28 +0200 | <merijn> | It's building new things |
2022-04-05 16:52:39 +0200 | <merijn> | If you don't want that, freeze the buildplan |
2022-04-05 16:52:56 +0200 | <maerwald> | would be interesting to have a solver setting that prefers installed versions |
2022-04-05 16:53:09 +0200 | <merijn> | maerwald: That's what v1- cabal had |
2022-04-05 16:53:12 +0200 | <merijn> | And it fucking sucked |
2022-04-05 16:53:17 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) |
2022-04-05 16:53:25 +0200 | <merijn> | because build plans were super unpredictable and would randomly break on random machines |
2022-04-05 16:53:58 +0200 | <merijn> | The switch to the new deterministic approach was to avoid those issues and make testing with more recent versions easier |
2022-04-05 16:55:36 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 16:55:53 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 16:57:16 +0200 | <abastro[m]> | Yep, building new things |
2022-04-05 16:57:19 +0200 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2022-04-05 16:58:03 +0200 | jakalx | (~jakalx@base.jakalx.net) |
2022-04-05 16:58:07 +0200 | <abastro[m]> | While it is normally great, with absence of great gc tools, it easily grows the file size |
2022-04-05 16:58:21 +0200 | <maerwald> | you can cabal update but still pin index-state |
2022-04-05 16:58:28 +0200 | <maerwald> | for a certain project |
2022-04-05 16:58:42 +0200 | exarkun_ | exarkun |
2022-04-05 16:58:42 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-04-05 16:58:43 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2022-04-05 16:59:04 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2022-04-05 16:59:13 +0200 | <abastro[m]> | I indeed like the 10 instances of xmonads /s |
2022-04-05 16:59:49 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 240 seconds) |
2022-04-05 17:01:54 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 17:02:11 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 17:03:55 +0200 | danso | (~danso@danso.ca) |
2022-04-05 17:05:49 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 17:05:55 +0200 | chomwitt | (~chomwitt@athedsl-31881.home.otenet.gr) |
2022-04-05 17:06:06 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 17:06:20 +0200 | Katarushisu | (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) |
2022-04-05 17:09:42 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 17:09:59 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 17:15:46 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 17:16:04 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 17:17:23 +0200 | razetime | (~quassel@117.254.35.74) (Ping timeout: 250 seconds) |
2022-04-05 17:17:58 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:5d73:ba4b:5267:e012) (Quit: WeeChat 2.8) |
2022-04-05 17:19:25 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 240 seconds) |
2022-04-05 17:19:33 +0200 | dextaa_54 | (~dextaa@user/dextaa) (Read error: Connection reset by peer) |
2022-04-05 17:20:13 +0200 | Psybur | (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba) (Ping timeout: 260 seconds) |
2022-04-05 17:20:20 +0200 | bahamas | (~lucian@84.232.140.158) (Ping timeout: 246 seconds) |
2022-04-05 17:20:54 +0200 | Psybur | (~Psybur@2600:1003:b138:112:20c5:efb4:887:de9a) |
2022-04-05 17:21:18 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) |
2022-04-05 17:21:44 +0200 | dextaa_54 | (~dextaa@user/dextaa) |
2022-04-05 17:24:00 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 17:24:04 +0200 | mon_aaraj | (~MonAaraj@user/mon-aaraj/x-4416475) |
2022-04-05 17:24:23 +0200 | fax | (~fax@94.6.139.91) |
2022-04-05 17:25:24 +0200 | seydar | (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 240 seconds) |
2022-04-05 17:26:21 +0200 | <tomsmeding> | abastro[m]: `cabal freeze` in your project |
2022-04-05 17:26:32 +0200 | <tomsmeding> | creates a cabal.project.freeze file that fixes dep versions |
2022-04-05 17:27:18 +0200 | razetime | (~quassel@117.254.35.210) |
2022-04-05 17:29:20 +0200 | <abastro[m]> | Yep, I should not forget about that. |
2022-04-05 17:29:28 +0200 | <abastro[m]> | <del>Cabal as package manager when</del> |
2022-04-05 17:29:47 +0200 | <maerwald> | freeze can be annoying if you experimenting with different flag configurations |
2022-04-05 17:29:48 +0200 | joo-_ | (~joo-_@80-62-116-70-mobile.dk.customer.tdc.net) |
2022-04-05 17:29:48 +0200 | joo-_ | (~joo-_@80-62-116-70-mobile.dk.customer.tdc.net) (Changing host) |
2022-04-05 17:29:48 +0200 | joo-_ | (~joo-_@fsf/member/joo--) |
2022-04-05 17:29:58 +0200 | <maerwald> | that's why for dev-ing index-state is more appropriate |
2022-04-05 17:30:25 +0200 | <tomsmeding> | maybe even doing `cabal freeze` then removing everything but 'xmonad' itself from the freeze file would do the trick |
2022-04-05 17:30:54 +0200 | <tomsmeding> | or more generally, only pin the unimportant but large stuff |
2022-04-05 17:31:18 +0200 | acidjnk | (~acidjnk@p200300d0c7049f074d48d16d808cf7eb.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2022-04-05 17:32:02 +0200 | <abastro[m]> | I mean, I don't see xmonad update that often |
2022-04-05 17:32:13 +0200 | <abastro[m]> | Wait |
2022-04-05 17:32:27 +0200 | <abastro[m]> | I guess it is xmonad-contrib being updated |
2022-04-05 17:32:30 +0200 | <abastro[m]> | So I can fix that |
2022-04-05 17:32:44 +0200 | <abastro[m]> | (Btw other packages are also being duplicated it seems) |
2022-04-05 17:33:41 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-04-05 17:33:55 +0200 | <tomsmeding> | abastro[m]: yeah replace 'xmonad' in my message with whatever package you want to be pinned :p |
2022-04-05 17:34:33 +0200 | <tomsmeding> | though if you use freeze, you should remember that you have a freeze file if at somepoint you're wondering why you're not getting updates from upstream :p |
2022-04-05 17:34:43 +0200 | <abastro[m]> | Makes sense. |
2022-04-05 17:35:00 +0200 | <abastro[m]> | "Not getting updates" heh |
2022-04-05 17:35:55 +0200 | <abastro[m]> | Btw I find it a bit annoying that whenever something is built, its dependencies, even the same version ones, are built in new builds |
2022-04-05 17:36:03 +0200 | cdman | (~dcm@user/dmc/x-4369397) (Quit: Leaving) |
2022-04-05 17:36:03 +0200 | <abastro[m]> | Which duplicates stuff further |
2022-04-05 17:36:11 +0200 | <abastro[m]> | Why does this happen? |
2022-04-05 17:36:42 +0200 | bahamas | (~lucian@84.232.140.158) |
2022-04-05 17:36:53 +0200 | <geekosaur> | it shouldn't do that unless something else is changing (compile options, cabal flags, etc.) |
2022-04-05 17:37:00 +0200 | <tomsmeding> | you mean that if you have a dep on package A which itself depends on package B, and A updates to a new version but B does not, but nevertheless B is rebuilt? |
2022-04-05 17:37:08 +0200 | <tomsmeding> | precisely what geekosaur says |
2022-04-05 17:37:29 +0200 | <tomsmeding> | look in the file created by `cabal freeze`, it lists cabal flags for each package |
2022-04-05 17:37:38 +0200 | <tomsmeding> | if those change, a package needs to be rebuilt |
2022-04-05 17:37:50 +0200 | zebrag | (~chris@user/zebrag) |
2022-04-05 17:37:56 +0200 | <tomsmeding> | also, if A depends on B which depends on C, and A and C change, then B needs to be rebuilt as well |
2022-04-05 17:37:59 +0200 | <abastro[m]> | Cabal flags change, hmm |
2022-04-05 17:38:13 +0200 | tomsmeding | is not sure if you can have two different versions of the same package in a build plan |
2022-04-05 17:38:13 +0200 | <abastro[m]> | Oh |
2022-04-05 17:38:29 +0200 | <abastro[m]> | I guess it happens since both A and C changes |
2022-04-05 17:38:35 +0200 | <abastro[m]> | And I get the illusion |
2022-04-05 17:38:57 +0200 | <tomsmeding> | probably C is a tiny package that you're skipping in your analysis of the issue because it's small and "hence" irrelevant :p |
2022-04-05 17:39:05 +0200 | <abastro[m]> | Well ye, never seen two different versions of same package in single build plan |
2022-04-05 17:39:27 +0200 | <abastro[m]> | I mean there are too many packages |
2022-04-05 17:39:30 +0200 | <geekosaur> | pretty sure cabal does not handle that although there are cases where it's technically safe |
2022-04-05 17:39:34 +0200 | <abastro[m]> | So I cannot check every package |
2022-04-05 17:40:00 +0200 | <geekosaur> | ftr I have 4.1G in my local store and I update xmonad and xmonad-contrib from git once a week |
2022-04-05 17:40:23 +0200 | <geekosaur> | and this is unusually large because my config depends on dbus which sucks in lens and acouple of other big-footprint packages |
2022-04-05 17:41:59 +0200 | <abastro[m]> | 4G? Sounds quite small |
2022-04-05 17:42:42 +0200 | <geekosaur> | for xmonad being the primary pressure on it, it's big :) |
2022-04-05 17:43:00 +0200 | <abastro[m]> | Aha |
2022-04-05 17:43:16 +0200 | <abastro[m]> | Wait, `dbus` depends on lens? |
2022-04-05 17:43:26 +0200 | tomsmeding | just removed 14G of cabal store because I don't work with agda anymore |
2022-04-05 17:43:32 +0200 | <geekosaur> | one of its dependencies does, for some reason |
2022-04-05 17:43:40 +0200 | <abastro[m]> | Btw my dependency footprint is greatly exploded by taffybar |
2022-04-05 17:43:52 +0200 | <geekosaur> | I haven't tried to work out the full dep tree |
2022-04-05 17:47:53 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2022-04-05 17:48:29 +0200 | <danso> | when would somebody want to save the .hi and .o files for their Main module? |
2022-04-05 17:48:47 +0200 | <danso> | it seems to me that those have to be rebuilt any time the source for Main changes, or anything it depends on |
2022-04-05 17:49:11 +0200 | Unicorn_Princess | (~Unicorn_P@93-103-228-248.dynamic.t-2.net) |
2022-04-05 17:49:38 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
2022-04-05 17:49:40 +0200 | <tomsmeding> | danso: the .o is the compiled form of the module, necessary to produce the final executable; the .hi is a by-product of compilation that I guess would be redundant for Main |
2022-04-05 17:49:44 +0200 | <danso> | i guess the point of storing .hi and .o files in general is to avoid recompiling things that don't need it |
2022-04-05 17:50:09 +0200 | <geekosaur> | in this case I think it's more thatnotkeeping them would require special-casing handling of maoin modules |
2022-04-05 17:50:12 +0200 | <geekosaur> | *main |
2022-04-05 17:50:16 +0200 | <abastro[m]> | Well doesn't other modules require those caching schemes? |
2022-04-05 17:50:25 +0200 | <tomsmeding> | but in general .hi files of other modules are used by ghc and are necessary, they store haskell type info, inlining info, etc. of the modules |
2022-04-05 17:50:35 +0200 | <abastro[m]> | Yep, I also think it is just avoiding special-casing |
2022-04-05 17:50:44 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
2022-04-05 17:50:50 +0200 | <tomsmeding> | also not storing them wouldn't really give much of a speedup for that one module |
2022-04-05 17:51:16 +0200 | <geekosaur> | it'd be a very slight slowdown as it wouldneed to remove them after; it needs them to link it all together |
2022-04-05 17:51:20 +0200 | <abastro[m]> | Oh, that gave me an idea |
2022-04-05 17:51:31 +0200 | <abastro[m]> | .hsig for file with type declarations |
2022-04-05 17:51:49 +0200 | <tomsmeding> | isn't that .hs-boot |
2022-04-05 17:51:58 +0200 | <danso> | okay, thanks all for the input. the actual reason i don't want to store them is because i have two Main modules for two different binaries, and sometimes they get confused when Main.hi and Main.o exist |
2022-04-05 17:52:21 +0200 | <tomsmeding> | danso: how are you compiling your binaries? |
2022-04-05 17:52:25 +0200 | <geekosaur> | I think .hsig is taken by backpack |
2022-04-05 17:52:32 +0200 | <geekosaur> | but fat .hi files are coming |
2022-04-05 17:52:48 +0200 | <danso> | take a look at the demo i created here: https://gitlab.com/danso/ghc-demo/-/tree/main |
2022-04-05 17:53:24 +0200 | <geekosaur> | storing more information for use by haddock, HIE/HLS, etc. |
2022-04-05 17:54:14 +0200 | <tomsmeding> | danso: usually the answer would be different -hidir and -odir for the two binaries, but now you're sharing a module so that doesn't work |
2022-04-05 17:54:31 +0200 | <abastro[m]> | I mean .hsig to be supplied by user |
2022-04-05 17:54:47 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
2022-04-05 17:54:52 +0200 | <abastro[m]> | Supply your types in separate header! |
2022-04-05 17:55:09 +0200 | <abastro[m]> | And its implementation in the correlated source file |
2022-04-05 17:55:18 +0200 | <tomsmeding> | danso: hack: compile Common.hs with -hidir and -odir set to cache/common/, then symlink/copy those files in the makefile to cache/hello/ and cache/greetings/, then compile the two executables |
2022-04-05 17:55:22 +0200 | <geekosaur> | that sounds like a maintenance nightmare |
2022-04-05 17:55:30 +0200 | <tomsmeding> | abastro[m]: are you trying to revert back to C |
2022-04-05 17:55:38 +0200 | <geekosaur> | (abastro[m]) |
2022-04-05 17:55:38 +0200 | <tomsmeding> | there is a reason that most languages did _not_ copy that style |
2022-04-05 17:57:13 +0200 | boxscape_ | (~boxscape_@p4ff0be5f.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
2022-04-05 17:57:40 +0200 | <danso> | tomsmeding, the hack i've been using in my actual projects is to run `rm cache/Main.hi cache/Main.o` in the makefile after GHC finishes |
2022-04-05 17:58:41 +0200 | caubert_ | (~caubert@136.244.111.235) (Quit: WeeChat 3.4) |
2022-04-05 17:58:48 +0200 | <abastro[m]> | tomsmeding: Exactly! |
2022-04-05 17:59:01 +0200 | caubert | (~caubert@136.244.111.235) |
2022-04-05 17:59:20 +0200 | <abastro[m]> | C++ copied C at least :^) |
2022-04-05 18:00:06 +0200 | <danso> | is it a bug that Main.o and Main.hi are created even tho the source files have the -no-keep-*-files specified in pragmas? |
2022-04-05 18:01:58 +0200 | <tomsmeding> | hm, users guide doesn't say much about where the options are allowed https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/separate_compilation.html#keeping-… |
2022-04-05 18:02:45 +0200 | <danso> | this page says they are dynamic that have been reported in GHC but not yet fixed: see the |
2022-04-05 18:02:49 +0200 | <danso> | that have been reported in GHC but not yet fixed: see the |
2022-04-05 18:02:54 +0200 | lbseale | (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer) |
2022-04-05 18:03:00 +0200 | <danso> | oops, sorry. wrong paste twice >_> |
2022-04-05 18:03:04 +0200 | <danso> | https://ghc.gitlab.haskell.org/ghc/doc/users_guide/flags.html#keeping-intermediate-files |
2022-04-05 18:03:21 +0200 | <danso> | "dynamic" flags are ones that can be invoked by pragmas in source files |
2022-04-05 18:04:17 +0200 | lbseale | (~ep1ctetus@user/ep1ctetus) |
2022-04-05 18:05:08 +0200 | bahamas | (~lucian@84.232.140.158) (Ping timeout: 260 seconds) |
2022-04-05 18:05:09 +0200 | <tomsmeding> | danso: given that "keep-o-files" and "keep-hi-files" give 0 hits in the ghc issue tracker, it might be worth opening an issue about this (https://gitlab.haskell.org/ghc/ghc/-/issues); even if it's intended, perhaps the documentation should be clarified |
2022-04-05 18:10:01 +0200 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-04-05 18:16:00 +0200 | fax | (~fax@94.6.139.91) (Remote host closed the connection) |
2022-04-05 18:16:17 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 18:16:19 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-04-05 18:16:25 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 18:17:19 +0200 | Psybur | (~Psybur@2600:1003:b138:112:20c5:efb4:887:de9a) (Read error: Connection reset by peer) |
2022-04-05 18:17:38 +0200 | Psybur | (~Psybur@2600:1003:b138:112:20c5:efb4:887:de9a) |
2022-04-05 18:18:02 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-04-05 18:20:18 +0200 | jgeerds | (~jgeerds@d5364b87.access.ecotel.net) (Ping timeout: 260 seconds) |
2022-04-05 18:21:06 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) |
2022-04-05 18:22:39 +0200 | ubert | (~Thunderbi@p548c8d44.dip0.t-ipconnect.de) (Quit: ubert) |
2022-04-05 18:22:39 +0200 | ubert1 | ubert |
2022-04-05 18:24:19 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 18:24:36 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 18:25:54 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
2022-04-05 18:28:43 +0200 | mbuf | (~Shakthi@122.173.67.210) (Quit: Leaving) |
2022-04-05 18:31:19 +0200 | zer0bitz | (~zer0bitz@2001:2003:f750:a200:5019:823:a50e:5ee6) |
2022-04-05 18:33:39 +0200 | ph88 | (~ph88@ip5f5af71f.dynamic.kabel-deutschland.de) |
2022-04-05 18:34:58 +0200 | wolfshappen | (~waff@irc.furworks.de) (Read error: Connection reset by peer) |
2022-04-05 18:37:13 +0200 | doyougnu | (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 260 seconds) |
2022-04-05 18:40:32 +0200 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 252 seconds) |
2022-04-05 18:41:07 +0200 | <danso> | thanks tomsmeding, it is done https://gitlab.haskell.org/ghc/ghc/-/issues/21349 |
2022-04-05 18:42:04 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Ping timeout: 250 seconds) |
2022-04-05 18:42:50 +0200 | <geekosaur> | I expect that to be more of a labeling issue (they should not be considered dynamic): they need to stick around for the linking step, after which it's too late for a source pragma to fire |
2022-04-05 18:43:42 +0200 | <danso> | i'm fine with that. a bug in the docs is still a bug ;^) |
2022-04-05 18:46:54 +0200 | MajorBiscuit | (~MajorBisc@2a02:a461:129d:1:193d:75d8:745d:e91e) (Ping timeout: 268 seconds) |
2022-04-05 18:51:56 +0200 | xkuru | (~xkuru@user/xkuru) |
2022-04-05 18:56:09 +0200 | redb | (~nmh@136.49.49.211) (Ping timeout: 268 seconds) |
2022-04-05 18:59:15 +0200 | napping | (~brandon@65.128.49.110) |
2022-04-05 19:00:40 +0200 | bahamas | (~lucian@84.232.140.158) |
2022-04-05 19:01:55 +0200 | liz | (~liz@host109-151-125-217.range109-151.btcentralplus.com) |
2022-04-05 19:02:17 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 248 seconds) |
2022-04-05 19:06:23 +0200 | bahamas | (~lucian@84.232.140.158) (Ping timeout: 260 seconds) |
2022-04-05 19:06:36 +0200 | razetime | (~quassel@117.254.35.210) (Ping timeout: 240 seconds) |
2022-04-05 19:06:42 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2022-04-05 19:06:49 +0200 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) |
2022-04-05 19:08:12 +0200 | econo | (uid147250@user/econo) |
2022-04-05 19:08:22 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2022-04-05 19:15:10 +0200 | redb | (~nmh@136.49.49.211) |
2022-04-05 19:22:20 +0200 | cheater | (~Username@user/cheater) (Read error: Connection reset by peer) |
2022-04-05 19:23:02 +0200 | cheater | (~Username@user/cheater) |
2022-04-05 19:27:00 +0200 | dextaa_54 | (~dextaa@user/dextaa) (Read error: Connection reset by peer) |
2022-04-05 19:29:02 +0200 | dextaa_54 | (~dextaa@user/dextaa) |
2022-04-05 19:29:55 +0200 | hololeap_ | (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
2022-04-05 19:30:23 +0200 | hololeap_ | (~hololeap@user/hololeap) |
2022-04-05 19:37:28 +0200 | redb | (~nmh@136.49.49.211) (Ping timeout: 268 seconds) |
2022-04-05 19:41:51 +0200 | zeenk | (~zeenk@2a02:2f04:a313:d600:8d26:ec9f:3ff6:fc94) (Quit: Konversation terminated!) |
2022-04-05 19:44:31 +0200 | alp_ | (~alp@user/alp) |
2022-04-05 19:48:13 +0200 | bahamas | (~lucian@84.232.140.158) |
2022-04-05 19:51:03 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) |
2022-04-05 19:52:53 +0200 | chomwitt | (~chomwitt@athedsl-31881.home.otenet.gr) (Ping timeout: 268 seconds) |
2022-04-05 19:54:33 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2022-04-05 19:54:48 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2022-04-05 19:58:15 +0200 | chomwitt | (~chomwitt@athedsl-20549.home.otenet.gr) |
2022-04-05 19:58:59 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2022-04-05 19:59:39 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2022-04-05 20:00:17 +0200 | deadmarshal_ | (~deadmarsh@95.38.113.9) (Ping timeout: 252 seconds) |
2022-04-05 20:01:44 +0200 | TonyStone | (~TonyStone@2603-7080-8607-c36a-e4f8-bd3f-9136-d580.res6.spectrum.com) (Ping timeout: 260 seconds) |
2022-04-05 20:04:59 +0200 | redb | (~nmh@136.49.49.211) |
2022-04-05 20:05:46 +0200 | Xplorator | (~Xplorator@176.166.206.65) |
2022-04-05 20:05:50 +0200 | vysn | (~vysn@user/vysn) (Ping timeout: 268 seconds) |
2022-04-05 20:06:55 +0200 | Macbethwin | (~chargen@8.31.163.87) |
2022-04-05 20:07:50 +0200 | Macbethwin | Chargen |
2022-04-05 20:10:44 +0200 | Psybur | (~Psybur@2600:1003:b138:112:20c5:efb4:887:de9a) (Ping timeout: 252 seconds) |
2022-04-05 20:10:59 +0200 | Psybur | (~Psybur@75.145.205.201) |
2022-04-05 20:12:09 +0200 | redb | (~nmh@136.49.49.211) (Ping timeout: 248 seconds) |
2022-04-05 20:13:55 +0200 | redb | (~nmh@136.49.49.211) |
2022-04-05 20:14:21 +0200 | TonyStone | (~TonyStone@2603-7080-8607-c36a-f1ec-d7f3-37e1-032c.res6.spectrum.com) |
2022-04-05 20:15:13 +0200 | vicfred | (~vicfred@user/vicfred) |
2022-04-05 20:15:31 +0200 | cosimone | (~user@93-47-228-79.ip115.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1)) |
2022-04-05 20:16:16 +0200 | jakalx | (~jakalx@base.jakalx.net) () |
2022-04-05 20:17:49 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 20:17:56 +0200 | cosimone | (~user@93-47-228-79.ip115.fastwebnet.it) |
2022-04-05 20:18:26 +0200 | redb | (~nmh@136.49.49.211) (Ping timeout: 252 seconds) |
2022-04-05 20:20:11 +0200 | redb | (~nmh@136.49.49.211) |
2022-04-05 20:20:34 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
2022-04-05 20:24:26 +0200 | redb | (~nmh@136.49.49.211) (Ping timeout: 246 seconds) |
2022-04-05 20:24:32 +0200 | jakalx | (~jakalx@base.jakalx.net) |
2022-04-05 20:27:21 +0200 | mvr_ | (uid36976@id-36976.tinside.irccloud.com) |
2022-04-05 20:28:24 +0200 | <odnes> | tdammers |
2022-04-05 20:28:42 +0200 | wolfshappen | (~waff@irc.furworks.de) |
2022-04-05 20:29:22 +0200 | michalz | (~michalz@185.246.204.104) (Remote host closed the connection) |
2022-04-05 20:29:25 +0200 | <odnes> | tdammers: sry, mistakenly pinged. amazing read, this whole discussion though |
2022-04-05 20:31:21 +0200 | <SrPx> | give me ideas of non-recursive, non-polymorphic types to teach FP newcomers, that are related to some intuitive real-world concept, and that have some cool functions to implement. example: Rock | Paper | Scizor, with functions like "equals : RPS -> RPS -> Bool" and "beats : RPS -> RPS -> Bool". what else? |
2022-04-05 20:34:07 +0200 | tfeb | (~tfb@88.98.95.237) |
2022-04-05 20:36:25 +0200 | <geekosaur> | notes, with things like major and minor thirds and fifths leading to chords? |
2022-04-05 20:36:57 +0200 | <SrPx> | that's great, thanks geekosaur |
2022-04-05 20:37:01 +0200 | <geekosaur> | (optionally including patsyns to support C# and Db being the same note) |
2022-04-05 20:37:06 +0200 | <SrPx> | nice |
2022-04-05 20:42:21 +0200 | coot | (~coot@213.134.190.95) (Quit: coot) |
2022-04-05 20:43:37 +0200 | dyeplexer | (~dyeplexer@user/dyeplexer) (Ping timeout: 248 seconds) |
2022-04-05 20:44:38 +0200 | odnes | (~odnes@5-203-209-2.pat.nym.cosmote.net) (Quit: Leaving) |
2022-04-05 20:45:07 +0200 | Chargen | (~chargen@8.31.163.87) (Remote host closed the connection) |
2022-04-05 20:45:11 +0200 | <tomsmeding> | (scissor, btw, in english) |
2022-04-05 20:45:11 +0200 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
2022-04-05 20:45:13 +0200 | whatsupdoc | (uid509081@id-509081.hampstead.irccloud.com) |
2022-04-05 20:45:27 +0200 | <tomsmeding> | (not that the spelling necessarily makes much sense) |
2022-04-05 20:45:45 +0200 | doyougnu | (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) |
2022-04-05 20:45:51 +0200 | Chargen | (~chargen@8.31.163.87) |
2022-04-05 20:46:04 +0200 | chomwitt | (~chomwitt@athedsl-20549.home.otenet.gr) (Ping timeout: 260 seconds) |
2022-04-05 20:46:53 +0200 | Chargen | (~chargen@8.31.163.87) (Remote host closed the connection) |
2022-04-05 20:47:08 +0200 | <geekosaur> | it's usually plural even in that context: one scissor blade does not reliably cut paper… |
2022-04-05 20:47:18 +0200 | Chargen | (~chargen@8.31.163.87) |
2022-04-05 20:47:22 +0200 | chomwitt | (~chomwitt@athedsl-369869.home.otenet.gr) |
2022-04-05 20:47:36 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) |
2022-04-05 20:47:36 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
2022-04-05 20:47:36 +0200 | wroathe | (~wroathe@user/wroathe) |
2022-04-05 20:47:48 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds) |
2022-04-05 20:48:30 +0200 | Chargen | (~chargen@8.31.163.87) (Remote host closed the connection) |
2022-04-05 20:49:05 +0200 | Chargen | (~chargen@8.31.163.87) |
2022-04-05 20:50:17 +0200 | simendsjo | (~user@84.211.91.241) |
2022-04-05 20:51:44 +0200 | stef204 | (~stef204@user/stef204) |
2022-04-05 20:52:22 +0200 | Chargen | (~chargen@8.31.163.87) (Remote host closed the connection) |
2022-04-05 20:53:51 +0200 | redb | (~nmh@136.49.49.211) |
2022-04-05 20:55:13 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) |
2022-04-05 20:57:14 +0200 | zincy | (~zincy@2a00:23c8:970c:4801:9dee:240c:5988:ddb8) |
2022-04-05 20:58:23 +0200 | redb | (~nmh@136.49.49.211) (Ping timeout: 260 seconds) |
2022-04-05 21:00:51 +0200 | <tdammers> | geekosaur: C# and Db are not the same note, and you shouldn't treat them as being the same |
2022-04-05 21:01:18 +0200 | <geekosaur> | this all becomes much harder if you're not using a tempered chromatic scale… |
2022-04-05 21:01:45 +0200 | <tdammers> | even with equal temperament, the difference usually matters enough |
2022-04-05 21:01:54 +0200 | <tdammers> | unless you're into 12-tone serialism or sth like that |
2022-04-05 21:01:58 +0200 | <tomsmeding> | right, not sure it's helpful to go full music theory if the point of the exercise is to find some interesting ADTs :) |
2022-04-05 21:02:14 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 246 seconds) |
2022-04-05 21:02:27 +0200 | tfeb | (~tfb@88.98.95.237) (Quit: died) |
2022-04-05 21:02:51 +0200 | geekosaur | is quite aware of music theory, but what tomsmeding said |
2022-04-05 21:02:54 +0200 | <tdammers> | anyway, how about making a toy JSON parser |
2022-04-05 21:03:22 +0200 | redb | (~nmh@136.49.49.211) |
2022-04-05 21:04:13 +0200 | toulene | (~toulene@user/toulene) (Ping timeout: 260 seconds) |
2022-04-05 21:05:24 +0200 | Psybur | (~Psybur@75.145.205.201) (Remote host closed the connection) |
2022-04-05 21:05:37 +0200 | Psybur | (~Psybur@75.145.205.201) |
2022-04-05 21:06:47 +0200 | ccntrq | (~Thunderbi@2a01:e34:eccb:b060:de80:e6ed:5bb7:2742) (Remote host closed the connection) |
2022-04-05 21:06:58 +0200 | jgeerds | (~jgeerds@d5364b87.access.ecotel.net) |
2022-04-05 21:08:57 +0200 | mikoto-c1 | (~mikoto-ch@213.177.151.239) |
2022-04-05 21:09:28 +0200 | mikoto-chan | (~mikoto-ch@213.177.151.239) (Ping timeout: 260 seconds) |
2022-04-05 21:10:25 +0200 | coot | (~coot@213.134.190.95) |
2022-04-05 21:14:46 +0200 | euandreh_ | (~euandreh@2804:14c:33:9fe5:8f6:b4e8:3c37:fe15) |
2022-04-05 21:14:55 +0200 | <maerwald> | can you have infix pattern synonyms? |
2022-04-05 21:15:06 +0200 | neurocyte861449 | (~neurocyte@IP-045093110082.dynamic.medianet-world.de) |
2022-04-05 21:15:06 +0200 | neurocyte861449 | (~neurocyte@IP-045093110082.dynamic.medianet-world.de) (Changing host) |
2022-04-05 21:15:06 +0200 | neurocyte861449 | (~neurocyte@user/neurocyte) |
2022-04-05 21:15:31 +0200 | <maerwald> | wondering if (:) could be made a type-class based pattern synonym |
2022-04-05 21:15:51 +0200 | <tomsmeding> | this works fine for me: data A = A Int Int ; pattern (:*) :: Int -> Int -> A ; pattern n :* m = A n m |
2022-04-05 21:15:52 +0200 | <maerwald> | for matching on text-like things |
2022-04-05 21:15:53 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
2022-04-05 21:16:08 +0200 | neurocyte86144 | (~neurocyte@user/neurocyte) (Ping timeout: 268 seconds) |
2022-04-05 21:16:27 +0200 | <tomsmeding> | however (:) leads to "Illegal binding of built-in syntax: :" |
2022-04-05 21:16:47 +0200 | <maerwald> | excellent... will propose this to libraries ML and endure 3 decades of bikeshedding :D |
2022-04-05 21:16:52 +0200 | <geekosaur> | right, : itself is too magic |
2022-04-05 21:17:13 +0200 | euandreh | (~euandreh@2804:14c:33:9fe5:7b2e:dcb2:6878:c267) (Ping timeout: 248 seconds) |
2022-04-05 21:19:58 +0200 | euandreh_ | (~euandreh@2804:14c:33:9fe5:8f6:b4e8:3c37:fe15) (Ping timeout: 260 seconds) |
2022-04-05 21:20:27 +0200 | bahamas | (~lucian@84.232.140.158) (Ping timeout: 268 seconds) |
2022-04-05 21:23:26 +0200 | euandreh | (~euandreh@2804:14c:33:9fe5:f0c2:a39b:5024:51c6) |
2022-04-05 21:23:33 +0200 | Nahra | (~user@static.161.95.99.88.clients.your-server.de) |
2022-04-05 21:26:44 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:631:4f7a:e035:2184) |
2022-04-05 21:27:48 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2022-04-05 21:29:39 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 21:31:19 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 21:31:36 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 21:31:44 +0200 | jackhill | KM4MBG |
2022-04-05 21:32:23 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection) |
2022-04-05 21:32:43 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) |
2022-04-05 21:33:00 +0200 | KM4MBG | jackhill |
2022-04-05 21:33:33 +0200 | Pickchea | (~private@user/pickchea) |
2022-04-05 21:34:04 +0200 | benin | (~benin@183.82.204.110) (Quit: The Lounge - https://thelounge.chat) |
2022-04-05 21:35:21 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection) |
2022-04-05 21:35:40 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) |
2022-04-05 21:36:29 +0200 | dextaa_54 | (~dextaa@user/dextaa) (Remote host closed the connection) |
2022-04-05 21:36:45 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection) |
2022-04-05 21:37:04 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) |
2022-04-05 21:37:34 +0200 | lbseale | (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer) |
2022-04-05 21:41:36 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) |
2022-04-05 21:43:53 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection) |
2022-04-05 21:44:13 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) |
2022-04-05 21:46:43 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
2022-04-05 21:47:12 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
2022-04-05 21:47:37 +0200 | doyougnu | (~doyougnu@cpe-67-249-83-190.twcny.res.rr.com) (Ping timeout: 248 seconds) |
2022-04-05 21:50:04 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 21:50:21 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 21:50:36 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection) |
2022-04-05 21:50:56 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) |
2022-04-05 21:51:15 +0200 | mud | (~mud@user/kadoban) (Quit: quit) |
2022-04-05 21:51:51 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 260 seconds) |
2022-04-05 21:56:08 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 21:56:22 +0200 | fizbin | (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
2022-04-05 21:56:30 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 21:56:52 +0200 | acidjnk | (~acidjnk@p200300d0c7049f07dcc64cf45a5e1d49.dip0.t-ipconnect.de) |
2022-04-05 21:58:01 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection) |
2022-04-05 21:58:19 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) |
2022-04-05 21:59:53 +0200 | alp_ | (~alp@user/alp) (Ping timeout: 248 seconds) |
2022-04-05 22:01:01 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection) |
2022-04-05 22:01:21 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) |
2022-04-05 22:03:06 +0200 | DNH | (~DNH@2a02:8108:1100:16d8:7904:da90:b863:898) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-04-05 22:03:24 +0200 | DNH | (~DNH@2a02:8108:1100:16d8:7904:da90:b863:898) |
2022-04-05 22:05:59 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) |
2022-04-05 22:07:15 +0200 | gehmehgeh | (~user@user/gehmehgeh) (Ping timeout: 240 seconds) |
2022-04-05 22:07:50 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-04-05 22:09:08 +0200 | MajorBiscuit | (~MajorBisc@2a02:a461:129d:1:6d4c:38a4:18b7:4b48) |
2022-04-05 22:09:58 +0200 | gehmehgeh | (~user@user/gehmehgeh) |
2022-04-05 22:11:24 +0200 | merijn | (~merijn@c-001-001-001.client.esciencecenter.eduvpn.nl) (Ping timeout: 272 seconds) |
2022-04-05 22:12:26 +0200 | zer0bitz | (~zer0bitz@2001:2003:f750:a200:5019:823:a50e:5ee6) (Ping timeout: 245 seconds) |
2022-04-05 22:14:13 +0200 | simendsjo | (~user@84.211.91.241) (Ping timeout: 260 seconds) |
2022-04-05 22:14:34 +0200 | HotblackDesiato_ | (~HotblackD@gateway/tor-sasl/hotblackdesiato) (Remote host closed the connection) |
2022-04-05 22:16:54 +0200 | briandaed | (~root@109.95.142.93.r.toneticgroup.pl) (Remote host closed the connection) |
2022-04-05 22:17:39 +0200 | yauhsien | (~yauhsien@61-231-37-33.dynamic-ip.hinet.net) (Read error: Connection reset by peer) |
2022-04-05 22:18:11 +0200 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2022-04-05 22:18:53 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
2022-04-05 22:20:38 +0200 | yauhsien | (~yauhsien@61-231-21-149.dynamic-ip.hinet.net) |
2022-04-05 22:20:54 +0200 | Lord_of_Life_ | Lord_of_Life |
2022-04-05 22:22:35 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 22:22:49 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2022-04-05 22:22:53 +0200 | fax | (~fax@94.6.139.91) |
2022-04-05 22:24:33 +0200 | fax | (~fax@94.6.139.91) (Remote host closed the connection) |
2022-04-05 22:24:51 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 22:25:12 +0200 | redb | (~nmh@136.49.49.211) (Ping timeout: 268 seconds) |
2022-04-05 22:25:56 +0200 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-04-05 22:26:42 +0200 | jil | (~user@host-105-235-71-134.afnet.net) |
2022-04-05 22:26:57 +0200 | <jil> | hi |
2022-04-05 22:27:22 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:631:4f7a:e035:2184) (Quit: WeeChat 2.8) |
2022-04-05 22:27:59 +0200 | <jil> | I don't understand types in Haskell and the ghci message arising from `sqrt (length "abcd")` |
2022-04-05 22:28:16 +0200 | <Rembane> | > sqrt (length "abcd") |
2022-04-05 22:28:18 +0200 | <lambdabot> | error: |
2022-04-05 22:28:18 +0200 | <lambdabot> | • No instance for (Floating Int) arising from a use of ‘sqrt’ |
2022-04-05 22:28:18 +0200 | <lambdabot> | • In the expression: sqrt (length "abcd") |
2022-04-05 22:28:32 +0200 | <geekosaur> | :t sqrt |
2022-04-05 22:28:34 +0200 | <lambdabot> | Floating a => a -> a |
2022-04-05 22:29:18 +0200 | <jil> | ok, but in ghci sqrt 4 will work fine. is 4 parsed as Floating ? |
2022-04-05 22:29:20 +0200 | <jil> | :t 4 |
2022-04-05 22:29:21 +0200 | <lambdabot> | Num p => p |
2022-04-05 22:29:29 +0200 | redb | (~nmh@136.49.49.211) |
2022-04-05 22:29:31 +0200 | Psybur | (~Psybur@75.145.205.201) (Read error: Connection reset by peer) |
2022-04-05 22:29:46 +0200 | <geekosaur> | sqrt requires a type which is an instance of Floating (that is, Float or Double or Complex Float or Complex Double) |
2022-04-05 22:29:52 +0200 | <geekosaur> | :t 4 |
2022-04-05 22:29:53 +0200 | <lambdabot> | Num p => p |
2022-04-05 22:30:11 +0200 | <geekosaur> | numeric literals (only) can take any numeric type |
2022-04-05 22:30:17 +0200 | <jil> | :doc Num |
2022-04-05 22:30:34 +0200 | <geekosaur> | % :doc Num |
2022-04-05 22:30:34 +0200 | <yahb> | geekosaur: Basic numeric class.; The Haskell Report defines no laws for 'Num'. However, @('+')@ and @('*')@ are; customarily expected to define a ring and have the following properties:; [__Associativity of @('+')@__]: @(x + y) + z@ = @x + (y + z)@; [__Commutativity of @('+')@__]: @x + y@ = @y + x@; [__@'fromInteger' 0@ is the additive identity__]: @x + fromInteger 0@ = @x@; [__'negate' gives the additive |
2022-04-05 22:30:42 +0200 | ph88 | (~ph88@ip5f5af71f.dynamic.kabel-deutschland.de) (Quit: Leaving) |
2022-04-05 22:30:48 +0200 | <geekosaur> | %% :doc Num |
2022-04-05 22:30:48 +0200 | <yahb> | geekosaur: http://qp.mniip.com/y/50 |
2022-04-05 22:31:20 +0200 | Psybur | (~Psybur@2600:1003:b1ac:150e:b940:2818:ff1a:d340) |
2022-04-05 22:31:32 +0200 | ix | (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) (Remote host closed the connection) |
2022-04-05 22:31:42 +0200 | ix | (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
2022-04-05 22:32:23 +0200 | <janus> | oh cool , i didn't know you could give it two percentage signs |
2022-04-05 22:33:53 +0200 | <jil> | Can I coerce an Int to a Float ? |
2022-04-05 22:34:01 +0200 | Psybur | (~Psybur@2600:1003:b1ac:150e:b940:2818:ff1a:d340) (Read error: Connection reset by peer) |
2022-04-05 22:34:21 +0200 | Psybur | (~Psybur@2600:1003:b1ac:150e:b940:2818:ff1a:d340) |
2022-04-05 22:34:22 +0200 | ec | (~ec@gateway/tor-sasl/ec) |
2022-04-05 22:34:32 +0200 | <jil> | I feel that coercing is not haskelish |
2022-04-05 22:35:02 +0200 | <geekosaur> | > fromIntegral (4 :: Int) :: Float |
2022-04-05 22:35:05 +0200 | <lambdabot> | 4.0 |
2022-04-05 22:35:14 +0200 | <geekosaur> | you just have to be explicit about it |
2022-04-05 22:35:23 +0200 | <geekosaur> | (note that fromIntegral has shortcomings though) |
2022-04-05 22:36:08 +0200 | pavonia | (~user@user/siracusa) |
2022-04-05 22:36:13 +0200 | mvr_ | (uid36976@id-36976.tinside.irccloud.com) (Quit: Connection closed for inactivity) |
2022-04-05 22:37:08 +0200 | <jil> | so coercion is not banded from Haskell world. Thank you. |
2022-04-05 22:37:30 +0200 | <janus> | is it safer to use realToFrac than using fromIntegral? |
2022-04-05 22:37:33 +0200 | <janus> | % realToFrac (5 :: Int) :: Float |
2022-04-05 22:37:33 +0200 | <yahb> | janus: 5.0 |
2022-04-05 22:38:43 +0200 | <danso> | jil, it's helpful to not think of fromIntegral as a "coercion" or a "cast". it's a function that maps integer-ish things to numerical-ish things |
2022-04-05 22:39:03 +0200 | <geekosaur> | > realToFrac (9223372036854775808 :: Integer) :: Float |
2022-04-05 22:39:04 +0200 | <lambdabot> | 9.223372e18 |
2022-04-05 22:39:23 +0200 | <geekosaur> | hm, need to format that better |
2022-04-05 22:39:37 +0200 | zincy | (~zincy@2a00:23c8:970c:4801:9dee:240c:5988:ddb8) (Remote host closed the connection) |
2022-04-05 22:39:46 +0200 | mud | (~mud@user/kadoban) |
2022-04-05 22:40:20 +0200 | <geekosaur> | > Numeric.showFFloat (Just 18) (realToFrac (9223372036854775808 :: Integer) :: Float) "" |
2022-04-05 22:40:22 +0200 | <lambdabot> | "9223372000000000000.000000000000000000" |
2022-04-05 22:40:29 +0200 | <jil> | hum mapping between infinit set... Cantor is in the corner... |
2022-04-05 22:40:36 +0200 | <geekosaur> | whoops, overshot that mark |
2022-04-05 22:40:47 +0200 | <geekosaur> | also, Float can't handle the full precision, need Double |
2022-04-05 22:41:05 +0200 | <geekosaur> | > Numeric.showFFloat (Just 1) (realToFrac (9223372036854775808 :: Integer) :: Double) "" |
2022-04-05 22:41:07 +0200 | <lambdabot> | "9223372036854776000.0" |
2022-04-05 22:41:29 +0200 | motherfsck | (~motherfsc@user/motherfsck) (Quit: bye) |
2022-04-05 22:41:51 +0200 | <geekosaur> | this is a limitation of the type, though, not of realToFrac |
2022-04-05 22:42:02 +0200 | <geekosaur> | wonder if we have a 128 bit floating type around |
2022-04-05 22:43:23 +0200 | MajorBiscuit | (~MajorBisc@2a02:a461:129d:1:6d4c:38a4:18b7:4b48) (Ping timeout: 260 seconds) |
2022-04-05 22:46:23 +0200 | <janus> | I guess it is slightly worse since it is too complicated for this use case. But not less safe because it loses precision just the same |
2022-04-05 22:47:05 +0200 | <geekosaur> | well, the key point is it's not truncating at 4GB |
2022-04-05 22:49:29 +0200 | lavaman | (~lavaman@c-174-63-118-52.hsd1.ma.comcast.net) (Ping timeout: 248 seconds) |
2022-04-05 22:50:47 +0200 | <janus> | Oh, so it is actually preferrable to use realToFrac when able, because you rule out a certain class of precision loss? |
2022-04-05 22:51:53 +0200 | <janus> | Like, it seems I can't go from Int64 -> Int32 with realToFrac, but I can with fromInteger. And that is a weird operation where you e.g. put in maxBound and you get -1 out |
2022-04-05 22:52:04 +0200 | <janus> | % fromIntegral (maxBound :: Int64) :: Int32 |
2022-04-05 22:52:04 +0200 | <yahb> | janus: -1 |
2022-04-05 22:52:55 +0200 | hololeap | (~hololeap@user/hololeap) |
2022-04-05 22:53:35 +0200 | hololeap_ | (~hololeap@user/hololeap) (Ping timeout: 240 seconds) |
2022-04-05 22:54:30 +0200 | <jil> | sorry I still do get how to use realToFrac say |
2022-04-05 22:54:35 +0200 | <jil> | perfect_sqrt :: [Char] -> Int |
2022-04-05 22:54:42 +0200 | <jil> | perfect_sqrt xs = sqrt ((realToFrac (length xs) :: Int) :: Float) |
2022-04-05 22:55:34 +0200 | <monochrom> | I was hoping that Foreign.C.Type would have CLongDouble heh. (But no, boo...) |
2022-04-05 22:56:53 +0200 | <monochrom> | readToFrac clearly targets Fractional codomains; Intwhatever clearly is not an instance. |
2022-04-05 22:57:38 +0200 | crazazy | (~user@130.89.171.62) (Ping timeout: 272 seconds) |
2022-04-05 22:57:52 +0200 | <monochrom> | For Int* -> Double though, I don't expect that it matters which one you use. Toss a coin. |
2022-04-05 22:58:32 +0200 | MajorBiscuit | (~MajorBisc@2a02:a461:129d:1:6d4c:38a4:18b7:4b48) |
2022-04-05 22:59:20 +0200 | <telser> | jil: Note that sqrt is 'Floating a => a -> a' so you cannot return an 'Int' like your type signature says. That is to say it gives back a type matching the input (as you have written it, Float). and that type must have an instance of the 'Floating' class (some options were mentioned above). |
2022-04-05 23:00:00 +0200 | jushur | (~human@user/jushur) (Quit: ¯\_(ツ)_/¯) |
2022-04-05 23:00:04 +0200 | <jil> | sqrt (realToFrac ((length "abcd") :: Int) :: Float) |
2022-04-05 23:00:31 +0200 | <geekosaur> | :t sqrt (realToFrac ((length "abcd") :: Int) :: Float) |
2022-04-05 23:00:33 +0200 | <lambdabot> | Float |
2022-04-05 23:00:39 +0200 | <geekosaur> | not Int |
2022-04-05 23:01:07 +0200 | <jil> | yes |
2022-04-05 23:01:15 +0200 | <monochrom> | You can omit ":: Float" and you'll get Double by default, which is actually better most of the time. |
2022-04-05 23:01:35 +0200 | <jil> | ok |
2022-04-05 23:02:42 +0200 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 272 seconds) |
2022-04-05 23:02:49 +0200 | <jil> | I'm starting to get it. Thank you |
2022-04-05 23:04:34 +0200 | <jil> | What is that * for in Int* and why is it similar to Double ? |
2022-04-05 23:05:02 +0200 | <monochrom> | My notation for covering all of Int8, Int16, Int32, Int64, Int, Integer. |
2022-04-05 23:05:51 +0200 | <monochrom> | But where did I say it's similar to Double? |
2022-04-05 23:07:21 +0200 | <jil> | I'm not sure. What did you mean then by "I don't expect that it matters which one you use. Toss a coin" |
2022-04-05 23:08:01 +0200 | <monochrom> | For Int -> Double you can use fromIntegral or you can use realToFrac and at the end of the day it doesn't matter. |
2022-04-05 23:08:17 +0200 | <jil> | ok |
2022-04-05 23:08:18 +0200 | Psybur | (~Psybur@2600:1003:b1ac:150e:b940:2818:ff1a:d340) (Read error: Connection reset by peer) |
2022-04-05 23:08:26 +0200 | <monochrom> | For some other conversions, one of them is a type error so it's an easy choice: use the other. |
2022-04-05 23:08:37 +0200 | Psybur | (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba) |
2022-04-05 23:10:10 +0200 | <jil> | Thank you again. |
2022-04-05 23:10:15 +0200 | jil | (~user@host-105-235-71-134.afnet.net) (ERC (IRC client for Emacs 27.2)) |
2022-04-05 23:11:03 +0200 | kaph | (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) (Read error: Connection reset by peer) |
2022-04-05 23:14:08 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 23:14:26 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 23:15:29 +0200 | Tuplanolla | (~Tuplanoll@91-159-69-98.elisa-laajakaista.fi) (Remote host closed the connection) |
2022-04-05 23:15:42 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) (Remote host closed the connection) |
2022-04-05 23:16:01 +0200 | Macbethwin | (~chargen@D964062A.static.ziggozakelijk.nl) |
2022-04-05 23:16:41 +0200 | MajorBiscuit | (~MajorBisc@2a02:a461:129d:1:6d4c:38a4:18b7:4b48) (Ping timeout: 248 seconds) |
2022-04-05 23:17:40 +0200 | vysn | (~vysn@user/vysn) |
2022-04-05 23:17:48 +0200 | <geekosaur> | well, there's also https://github.com/haskell-crypto/cryptonite/issues/330 |
2022-04-05 23:17:57 +0200 | <geekosaur> | which has fromIntegral truncating |
2022-04-05 23:18:04 +0200 | <geekosaur> | so some care is needed |
2022-04-05 23:19:31 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-04-05 23:19:43 +0200 | <monochrom> | But I suspect that most programmers from other languages expect, even rely on, truncations already. |
2022-04-05 23:19:57 +0200 | stef204 | (~stef204@user/stef204) (Quit: WeeChat 3.5) |
2022-04-05 23:24:32 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 23:24:48 +0200 | euandreh | (~euandreh@2804:14c:33:9fe5:f0c2:a39b:5024:51c6) (Ping timeout: 260 seconds) |
2022-04-05 23:24:50 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) |
2022-04-05 23:28:26 +0200 | fax | (~fax@2a02:c7f:f097:7f00:8c5c:bbbe:c07f:5d1b) (Remote host closed the connection) |
2022-04-05 23:29:44 +0200 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2022-04-05 23:31:16 +0200 | mc47 | (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
2022-04-05 23:37:47 +0200 | acidjnk | (~acidjnk@p200300d0c7049f07dcc64cf45a5e1d49.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2022-04-05 23:37:58 +0200 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-04-05 23:39:07 +0200 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |
2022-04-05 23:42:55 +0200 | wyrd | (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 240 seconds) |
2022-04-05 23:43:47 +0200 | ss- | (~ss-@187.83.249.216.dyn.smithville.net) |
2022-04-05 23:44:44 +0200 | kaph | (~kaph@dynamic-adsl-78-12-162-98.clienti.tiscali.it) |
2022-04-05 23:45:06 +0200 | wyrd | (~wyrd@gateway/tor-sasl/wyrd) |
2022-04-05 23:47:21 +0200 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2022-04-05 23:49:11 +0200 | Xplorator | (~Xplorator@176.166.206.65) (Quit: Leaving) |
2022-04-05 23:49:33 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2022-04-05 23:50:29 +0200 | MajorBiscuit | (~MajorBisc@2a02:a461:129d:1:6d4c:38a4:18b7:4b48) |
2022-04-05 23:56:12 +0200 | Psybur | (~Psybur@2601:5c9:4201:3220:19c2:a1cd:6600:38ba) (Ping timeout: 240 seconds) |
2022-04-05 23:59:33 +0200 | p3n_ | (~p3n@217.198.124.246) (Ping timeout: 268 seconds) |