Logs on 2022-11-03 (liberachat/#haskell)
| 00:01:31 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 00:03:11 | → | crns joins (~netcrns@p4ff5e3ac.dip0.t-ipconnect.de) |
| 00:03:11 | × | crns quits (~netcrns@p4ff5e3ac.dip0.t-ipconnect.de) (Changing host) |
| 00:03:11 | → | crns joins (~netcrns@user/crns) |
| 00:03:33 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 255 seconds) |
| 00:10:50 | × | lambdap237 quits (~lambdap@static.167.190.119.168.clients.your-server.de) (Read error: Software caused connection abort) |
| 00:11:22 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 00:12:06 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::4b68) (Ping timeout: 255 seconds) |
| 00:12:55 | → | lambdap237 joins (~lambdap@static.167.190.119.168.clients.your-server.de) |
| 00:15:48 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 248 seconds) |
| 00:25:15 | × | k8yun_ quits (~k8yun@user/k8yun) (Quit: Leaving) |
| 00:27:06 | × | lbseale quits (~quassel@user/ep1ctetus) (Ping timeout: 260 seconds) |
| 00:27:11 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 00:27:24 | → | lbseale joins (~quassel@user/ep1ctetus) |
| 00:28:29 | × | mmhat quits (~mmh@p200300f1c7307621ee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.7.1) |
| 00:29:24 | → | Topsi1 joins (~Topsi@ipb218f713.dynamic.kabel-deutschland.de) |
| 00:30:34 | × | Topsi quits (~Topsi@ipb218f713.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds) |
| 00:32:13 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 252 seconds) |
| 00:34:24 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 00:35:22 | × | tcard quits (~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9) (Read error: Software caused connection abort) |
| 00:37:00 | → | tcard joins (~tcard@2400:4051:5801:7500:19ce:ed82:2ab7:90f9) |
| 00:37:05 | → | finsternis joins (~X@23.226.237.192) |
| 00:40:54 | → | nilradical joins (~nilradica@user/naso) |
| 00:45:00 | → | olivermead joins (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) |
| 00:51:42 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 00:52:20 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 00:56:51 | × | ski quits (~ski@remote11.chalmers.se) (Read error: Software caused connection abort) |
| 00:58:55 | → | gabiruh_ joins (~gabiruh@vps19177.publiccloud.com.br) |
| 00:59:14 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:756c:6d4e:8007:23ff) (Remote host closed the connection) |
| 00:59:43 | × | gabiruh quits (~gabiruh@vps19177.publiccloud.com.br) (Ping timeout: 252 seconds) |
| 01:00:46 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) |
| 01:01:15 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 01:01:28 | → | ub joins (~Thunderbi@77.119.196.32.wireless.dyn.drei.com) |
| 01:01:47 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 01:02:12 | × | zeenk quits (~zeenk@2a02:2f04:a105:5d00:c862:f190:2ea:d494) (Quit: Konversation terminated!) |
| 01:02:44 | × | ubert quits (~Thunderbi@91.141.39.16.wireless.dyn.drei.com) (Ping timeout: 248 seconds) |
| 01:02:44 | ub | is now known as ubert |
| 01:02:50 | → | califax joins (~califax@user/califx) |
| 01:03:05 | → | ski joins (~ski@remote11.chalmers.se) |
| 01:09:38 | × | chomwitt quits (~chomwitt@athe730-c-multi-217.home.otenet.gr) (Ping timeout: 246 seconds) |
| 01:11:13 | × | nilradical quits (~nilradica@user/naso) () |
| 01:11:51 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:12:00 | → | _leo92_ joins (~emmanuelu@user/emmanuelux) |
| 01:13:22 | × | emmanuelux quits (~emmanuelu@user/emmanuelux) (Ping timeout: 255 seconds) |
| 01:14:34 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 252 seconds) |
| 01:16:36 | → | bgamari_ joins (~bgamari@64.223.168.223) |
| 01:16:44 | × | bgamari quits (~bgamari@64.223.227.132) (Ping timeout: 268 seconds) |
| 01:16:48 | × | monochrom quits (trebla@216.138.220.146) (Read error: Software caused connection abort) |
| 01:17:17 | × | gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 01:17:59 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:20:46 | → | monochrom joins (trebla@216.138.220.146) |
| 01:21:24 | × | Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 248 seconds) |
| 01:21:36 | <chromoblob> | suppose i define reals in [-1, 1] as signed digit streams: data R = M1 R | Z R | P1 R. what is the type that is equivalent to type of functions R -> R? |
| 01:22:44 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 01:25:15 | <chromoblob> | i'm struggling because R is recursive data type, and because of laziness (maybe these both are a same point) |
| 01:25:40 | <ski> | what's the intended interpretation of `M1',`Z',`P1' ? |
| 01:26:14 | <chromoblob> | minus one digit, zero digit, one digit |
| 01:26:41 | <chromoblob> | one could code thus data Digit = M1 | Z | P1; data R = R Digit R |
| 01:27:55 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 01:28:41 | × | califax quits (~califax@user/califx) (Ping timeout: 255 seconds) |
| 01:30:17 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds) |
| 01:30:59 | <ski> | chromoblob : symmetric base three ? |
| 01:31:12 | → | califax joins (~califax@user/califx) |
| 01:31:48 | <ski> | anyway, `R = Nat -> Digit', so `R -> R = (Nat -> Digit) -> Nat -> Digit = Nat -> Cont Digit Nat' |
| 01:32:05 | <ski> | (not sure if that helps, really .. just noting it) |
| 01:32:42 | <ski> | .. i guess maybe you could do some bar recursion or fan theorem kind of thing .. hmm |
| 01:33:13 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 01:34:18 | <ski> | type R_to_R = (Tree,Tree,Tree) |
| 01:34:18 | <ski> | data Tree = Const Digit | Branch Tree Tree Tree |
| 01:34:44 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 248 seconds) |
| 01:36:18 | → | nate3 joins (~nate@98.45.169.16) |
| 01:36:18 | <ski> | (that's a redundant representation, not "tight") |
| 01:36:19 | <chromoblob> | i don't see how it reflects a function |
| 01:36:45 | <chromoblob> | there's only one digit at the end of each path |
| 01:36:57 | <ski> | er, hm, `type R_to_R = Nat -> Tree', rather |
| 01:38:23 | <ski> | imagine writing a `phi :: (Nat -> Digit) -> Digit'. you go `phi p = ..(p 0)..(p 1)....' .. since you produce a finite output, you can only look at finitely many elements of the stream `p' |
| 01:38:48 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 01:39:15 | <ski> | which means that you can encode `phi' as a tree, where you go down the branch which corresponds to the current element of the input stream `p', until you reach `Const d', at which point you ignore the rest of the stream and just return `d' |
| 01:41:21 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 272 seconds) |
| 01:42:21 | <ski> | <https://math.andrej.com/2009/10/12/constructive-gem-double-exponentials/> has the basic idea |
| 01:42:29 | <ski> | you may also want to compare with |
| 01:42:33 | <ski> | @where impossible |
| 01:42:34 | <lambdabot> | <http://math.andrej.com/2007/09/28/seemingly-impossible-functional-programs/>,<http://math.andrej.com/2008/11/21/a-haskell-monad-for-infinite-search-in-finite-time/> |
| 01:48:46 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 01:53:37 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds) |
| 01:58:34 | × | taeaad quits (~taeaad@user/taeaad) (Ping timeout: 252 seconds) |
| 02:01:04 | → | taeaad joins (~taeaad@user/taeaad) |
| 02:04:05 | → | glguy joins (~glguy@libera/staff-emeritus/glguy) |
| 02:04:46 | → | abhiroop joins (~abhiroop@217-209-157-8-no2000.tbcn.telia.com) |
| 02:05:26 | → | nate3 joins (~nate@98.45.169.16) |
| 02:07:54 | → | califax_ joins (~califax@user/califx) |
| 02:07:55 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 02:07:57 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 02:09:37 | califax_ | is now known as califax |
| 02:11:13 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 02:12:35 | → | bilegeek joins (~bilegeek@2600:1008:b044:33bf:f451:b0ca:9bd5:7375) |
| 02:12:59 | × | Kaipei quits (~Kaiepi@108.175.84.104) (Ping timeout: 246 seconds) |
| 02:14:03 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 255 seconds) |
| 02:14:03 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 02:15:20 | Lord_of_Life_ | is now known as Lord_of_Life |
| 02:16:18 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 255 seconds) |
| 02:17:16 | × | olivermead quits (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) (Ping timeout: 252 seconds) |
| 02:21:15 | → | olivermead joins (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) |
| 02:30:47 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
| 02:31:34 | × | lbseale quits (~quassel@user/ep1ctetus) (Ping timeout: 252 seconds) |
| 02:32:05 | → | lbseale joins (~quassel@user/ep1ctetus) |
| 02:32:35 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 02:37:34 | → | mixfix41 joins (~sdeny9ee@user/mixfix41) |
| 02:40:52 | → | ksqsf joins (~ksqsf@2001:da8:d800:611:302c:76b8:e8aa:8bc8) |
| 02:56:52 | × | irrgit quits (~irrgit@89.47.234.74) (Ping timeout: 252 seconds) |
| 02:57:19 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 02:59:32 | × | Sauvin quits (~sauvin@user/Sauvin) (Ping timeout: 248 seconds) |
| 02:59:53 | × | Athas quits (~athas@2a01:7c8:aaac:1cf:ba6c:ed85:faef:e8b1) (Quit: ZNC 1.8.2 - https://znc.in) |
| 03:00:03 | → | Athas joins (~athas@sigkill.dk) |
| 03:01:42 | × | ksqsf quits (~ksqsf@2001:da8:d800:611:302c:76b8:e8aa:8bc8) (Quit: Leaving...) |
| 03:04:01 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 252 seconds) |
| 03:04:52 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 03:09:24 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 255 seconds) |
| 03:09:44 | → | irrgit joins (~irrgit@86.106.90.226) |
| 03:10:37 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds) |
| 03:11:00 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 03:24:05 | polo | is now known as money |
| 03:24:35 | × | td_ quits (~td@83.135.9.45) (Ping timeout: 272 seconds) |
| 03:26:11 | → | td_ joins (~td@83.135.9.44) |
| 03:31:07 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 03:35:59 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds) |
| 03:40:57 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:40:57 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 03:40:57 | finn_elija | is now known as FinnElija |
| 03:41:35 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 03:44:14 | → | tgi joins (~thegeekin@189.180.115.115) |
| 03:47:50 | × | thegeekinside quits (~thegeekin@189.180.115.115) (Ping timeout: 246 seconds) |
| 03:48:57 | → | thegeekinside joins (~thegeekin@189.180.115.115) |
| 03:50:44 | × | tgi quits (~thegeekin@189.180.115.115) (Ping timeout: 248 seconds) |
| 03:51:12 | → | tgi joins (~thegeekin@189.180.115.115) |
| 03:53:24 | × | thegeekinside quits (~thegeekin@189.180.115.115) (Ping timeout: 248 seconds) |
| 03:57:19 | → | cleetus joins (~cleetus@63.239.66.138) |
| 03:57:37 | × | tomboy64 quits (~tomboy64@user/tomboy64) (Ping timeout: 255 seconds) |
| 03:59:23 | ← | cleetus parts (~cleetus@63.239.66.138) () |
| 03:59:25 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 272 seconds) |
| 04:03:47 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 04:05:11 | → | talismanick joins (~talismani@2601:200:c100:c9e0::1b0b) |
| 04:07:59 | <talismanick> | I factored and refactored some old code until it fit into the Procrustean bed of a monadic interpreter, then took the leap of faith and changed the placeholder `type M a = Wrapper a` to `type M a = Either String (Wrapper a)` and... it compiled |
| 04:08:11 | → | abhiroop_ joins (~abhiroop@217-209-157-8-no2000.tbcn.telia.com) |
| 04:08:20 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds) |
| 04:08:22 | × | abhiroop quits (~abhiroop@217-209-157-8-no2000.tbcn.telia.com) (Ping timeout: 252 seconds) |
| 04:08:22 | <talismanick> | does that mean the compiler uses Either String's MonadFail instance to turn all the calls to `error` into `Left`? |
| 04:10:06 | <talismanick> | (leaving aside from the moment that `Left "an error occurred"` isn't that much better than an exception) |
| 04:10:14 | × | niko quits (niko@libera/staff/niko) (Ping timeout: 612 seconds) |
| 04:10:15 | <talismanick> | for the moment* |
| 04:15:25 | <talismanick> | nvm, it needs to be `fail`, not `error`, and no way to declare a non-orphan instance of MonadFail (Either String) :( |
| 04:16:05 | <ski> | "turn all the calls to `error` into `Left`?" -- no, that's just failable `<pat> <- <act>' matches .. and there's no .. yea, what you said |
| 04:16:33 | <ski> | @undo do Just x <- return Nothing; return x |
| 04:16:33 | <lambdabot> | return Nothing >>= \ a -> case a of { Just x -> return x; _ -> fail ""} |
| 04:17:18 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 04:19:27 | <talismanick> | Well, on the bright side, it won't be an orphan MonadFail instance if I write for my own more elaborate error-handling data structure |
| 04:20:34 | <talismanick> | then s/error/fail/g and I'm off to the races |
| 04:24:33 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 255 seconds) |
| 04:27:39 | ← | kadoban parts (~kadoban@user/kadoban) () |
| 04:37:31 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 04:37:43 | → | tomboy64 joins (~tomboy64@user/tomboy64) |
| 04:44:04 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 248 seconds) |
| 04:44:08 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::4b68) |
| 04:44:36 | × | olivermead quits (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) (Ping timeout: 248 seconds) |
| 04:45:57 | × | Vajb quits (~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57) (Read error: Connection reset by peer) |
| 04:46:07 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) |
| 04:46:49 | → | niko joins (niko@libera/staff/niko) |
| 04:50:28 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 248 seconds) |
| 04:52:19 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 04:59:36 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 05:00:43 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 05:08:01 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 05:12:11 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:50b:c529:3f17:f97) (Ping timeout: 246 seconds) |
| 05:14:13 | × | bilegeek quits (~bilegeek@2600:1008:b044:33bf:f451:b0ca:9bd5:7375) (Quit: Leaving) |
| 05:24:26 | × | mixfix41 quits (~sdeny9ee@user/mixfix41) (Ping timeout: 246 seconds) |
| 05:25:57 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 05:26:20 | → | Vajb joins (~Vajb@2001:999:504:1841:9e47:1ec7:a52e:1d57) |
| 05:28:27 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::4b68) (Ping timeout: 255 seconds) |
| 06:05:18 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 06:06:03 | → | jmorris joins (uid537181@id-537181.uxbridge.irccloud.com) |
| 06:17:33 | × | ncf quits (~n@monade.li) (Ping timeout: 268 seconds) |
| 06:17:52 | → | ncf joins (~n@monade.li) |
| 06:22:23 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 06:25:34 | × | drdo quits (~drdo@2a0b:b800:2:31e6::1) (Ping timeout: 268 seconds) |
| 06:25:58 | → | chomwitt joins (~chomwitt@2a02:587:dc18:4a00:1ac0:4dff:fedb:a3f1) |
| 06:26:30 | × | Topsi1 quits (~Topsi@ipb218f713.dynamic.kabel-deutschland.de) (Ping timeout: 255 seconds) |
| 06:27:23 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) (Remote host closed the connection) |
| 06:29:46 | → | olivermead joins (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) |
| 06:34:50 | → | irrgit_ joins (~irrgit@146.70.27.242) |
| 06:35:47 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:37:58 | × | irrgit quits (~irrgit@86.106.90.226) (Ping timeout: 252 seconds) |
| 06:38:31 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 06:42:05 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 06:44:38 | → | abhiroop joins (~abhiroop@217-209-157-8-no2000.tbcn.telia.com) |
| 06:45:21 | × | abhiroop_ quits (~abhiroop@217-209-157-8-no2000.tbcn.telia.com) (Ping timeout: 272 seconds) |
| 06:45:46 | → | kenran joins (~user@user/kenran) |
| 06:53:47 | → | elevenkb joins (~elevenkb@105.184.125.168) |
| 06:55:37 | × | olivermead quits (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) (Remote host closed the connection) |
| 06:56:09 | × | tgi quits (~thegeekin@189.180.115.115) (Ping timeout: 246 seconds) |
| 06:57:22 | → | odnes joins (~odnes@5-203-216-155.pat.nym.cosmote.net) |
| 06:57:40 | × | odnes quits (~odnes@5-203-216-155.pat.nym.cosmote.net) (Remote host closed the connection) |
| 06:58:09 | → | olivermead joins (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) |
| 07:00:00 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 07:01:18 | → | nate3 joins (~nate@98.45.169.16) |
| 07:06:06 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
| 07:08:01 | → | mncheck joins (~mncheck@193.224.205.254) |
| 07:13:35 | × | xax__ quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 07:14:31 | → | acidjnk joins (~acidjnk@p200300d6e7137a343957ed7bae49a26a.dip0.t-ipconnect.de) |
| 07:14:38 | → | titibandit joins (~titibandi@xdsl-87-79-250-160.nc.de) |
| 07:18:55 | → | kenran` joins (~user@user/kenran) |
| 07:21:17 | × | kenran quits (~user@user/kenran) (Ping timeout: 276 seconds) |
| 07:24:08 | <dminuoso> | That being said, I think `fail` abused this way. |
| 07:25:03 | × | Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Quit: leaving) |
| 07:25:39 | → | Maeda joins (~Maeda@91-161-10-149.subs.proxad.net) |
| 07:26:26 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 07:27:53 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) |
| 07:32:59 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) (Ping timeout: 276 seconds) |
| 07:35:16 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 248 seconds) |
| 07:35:31 | × | Unicorn_Princess quits (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving) |
| 07:38:30 | × | kenran` quits (~user@user/kenran) (Remote host closed the connection) |
| 07:39:24 | → | kenran joins (~user@user/kenran) |
| 07:40:34 | → | chele joins (~chele@user/chele) |
| 07:42:02 | → | kenran` joins (~user@user/kenran) |
| 07:43:45 | × | kenran quits (~user@user/kenran) (Ping timeout: 246 seconds) |
| 07:49:27 | → | jonathanx joins (~jonathan@98.128.168.222) |
| 07:52:04 | × | elevenkb quits (~elevenkb@105.184.125.168) (Remote host closed the connection) |
| 07:54:14 | × | statusfailed quits (~statusfai@statusfailed.com) (Quit: leaving) |
| 07:54:29 | × | causal quits (~user@50.35.83.177) (Quit: WeeChat 3.7.1) |
| 07:56:40 | → | mmhat joins (~mmh@2003:f1:c730:7621:ee08:6bff:fe09:5315) |
| 07:58:50 | × | szkl quits (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 08:01:09 | × | hook54321 quits (sid149355@user/hook54321) (Ping timeout: 268 seconds) |
| 08:02:18 | → | CiaoSen joins (~Jura@p200300c9571247002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 08:02:48 | → | Kaipei joins (~Kaiepi@108.175.84.104) |
| 08:03:31 | → | hook54321 joins (sid149355@user/hook54321) |
| 08:04:02 | → | statusfailed joins (~statusfai@statusfailed.com) |
| 08:10:24 | → | zeenk joins (~zeenk@2a02:2f04:a105:5d00:c862:f190:2ea:d494) |
| 08:13:19 | → | Heyting joins (~Heyting@193.198.16.217) |
| 08:15:50 | × | jmorris quits (uid537181@id-537181.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 08:17:32 | × | shriekingnoise quits (~shrieking@186.137.167.202) (Quit: Quit) |
| 08:20:17 | → | RobertKrook joins (~RobertKro@ext-1-087.eduroam.chalmers.se) |
| 08:21:12 | × | RobertKrook quits (~RobertKro@ext-1-087.eduroam.chalmers.se) (Client Quit) |
| 08:22:50 | → | Robert43 joins (~Robert@ext-1-087.eduroam.chalmers.se) |
| 08:24:24 | <Robert43> | Good morning! |
| 08:24:25 | <Robert43> | Brief question -- what kind of overheads does IORef impose? E.g imagine I am passing around a state explicitly in a recursive function. Lifting a component of the state or the complete state out to an IORef and mutating that instead. |
| 08:25:43 | × | Heyting quits (~Heyting@193.198.16.217) (Remote host closed the connection) |
| 08:32:57 | × | talismanick quits (~talismani@2601:200:c100:c9e0::1b0b) (Ping timeout: 255 seconds) |
| 08:35:04 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 08:37:21 | <dminuoso> | Robert43: So in principle IORef has no overhead worthy mentioning, except that there is a linear GC cost in existing mutable references. |
| 08:37:46 | <dminuoso> | If you just use IORef in a singular place, this is not relevant at all. But if you start using large numbers of IORefs concurrently that becomes a penalty worthy considering |
| 08:38:02 | <dminuoso> | Under the hood its just a pointer to memory. |
| 08:38:19 | → | Topsi joins (~Topsi@ipb218f6c1.dynamic.kabel-deutschland.de) |
| 08:38:51 | → | michalz joins (~michalz@185.246.207.203) |
| 08:38:53 | × | Topsi quits (~Topsi@ipb218f6c1.dynamic.kabel-deutschland.de) (Client Quit) |
| 08:40:00 | <dminuoso> | See https://gitlab.haskell.org/ghc/ghc/-/issues/7662\ |
| 08:41:36 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 08:43:08 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 08:43:22 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 08:48:13 | → | jargon_ joins (~jargon@174-22-194-21.phnx.qwest.net) |
| 08:48:17 | <dminuoso> | So as long as you dont keep say a huge tree of IORefs or something along these lines, there's no relevant overhead to talk about. |
| 08:50:07 | × | jargon quits (~jargon@174-22-194-21.phnx.qwest.net) (Ping timeout: 272 seconds) |
| 08:51:18 | <merijn> | dminuoso: I mean the GC cost of IORef seems the same as "literally every other think that might reference something" |
| 08:52:15 | <merijn> | Oh, I guess a tiny bit more maybe, because they can violate generations? but I find it hard to see how they'd create any notable impact worth mentioning separately? |
| 08:52:40 | → | razetime joins (~quassel@117.254.34.146) |
| 08:54:17 | × | titibandit quits (~titibandi@xdsl-87-79-250-160.nc.de) (Remote host closed the connection) |
| 08:54:41 | <dminuoso> | merijn: well yes, but you pay this cost per minor GC |
| 08:55:36 | <dminuoso> | You wouldnt pay this up front for arbitrary references |
| 08:56:06 | → | kuribas joins (~user@ip-188-118-57-242.reverse.destiny.be) |
| 08:56:52 | × | abhiroop quits (~abhiroop@217-209-157-8-no2000.tbcn.telia.com) (Ping timeout: 248 seconds) |
| 08:57:03 | → | abhiroop joins (~abhiroop@217-209-157-8-no2000.tbcn.telia.com) |
| 08:57:56 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 248 seconds) |
| 09:00:03 | × | cp1313[m] quits (~cp1313mat@2001:470:69fc:105::2:9293) (Quit: You have been kicked for being idle) |
| 09:02:00 | × | ft quits (~ft@p508dbd59.dip0.t-ipconnect.de) (Quit: leaving) |
| 09:04:22 | → | fserucas_ joins (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) |
| 09:09:37 | → | mncheckm joins (~mncheck@193.224.205.254) |
| 09:09:54 | <Robert43> | Thanks for the help, I will run some experiments. I'll not have a huge number of them, never more than the number of available HECs |
| 09:11:24 | <merijn> | I mean, I wouldn't even bother testing unless you were planning to go, like, >10k IORefs :p |
| 09:11:55 | <dminuoso> | Even that number may not be too horrible, it really depends on how much GC latency you are willing to accept |
| 09:12:28 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 09:12:31 | × | mncheck quits (~mncheck@193.224.205.254) (Ping timeout: 252 seconds) |
| 09:13:12 | <Robert43> | Hah okay, I'll just assume this cost is negligible then. I will have #HECs processes (at most), and I want to be able to install an exception handler (catch Ctrl-C) to them that can access some data they are continuously working with, and aggregate a result before terminating |
| 09:13:28 | <merijn> | And really, if you have >10k IORef you should probably question what you're doing, tbh |
| 09:13:33 | <Robert43> | Right |
| 09:16:55 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds) |
| 09:18:38 | <dminuoso> | I dont know about that.. Im actually in a spot where I have about that number of IORefs for a while. |
| 09:19:47 | <dminuoso> | I have a DSL that describes a tree, but its written in such a way that I need to continuously lookup previous nodes and mutate them. It turns out that using an IntTree (IORef a) is better than doing this purely on `IntTree a` in my case. |
| 09:23:08 | <Robert43> | Interesting |
| 09:25:04 | <dminuoso> | (But I dont keep this tree long, at the end I just do `traverse readIORef` over it, and all the IORefs are gone. So I guess I just temporarily pay a bit of minor GC latency |
| 09:26:24 | <Robert43> | What about MVar vs IORef? MVars does some extra bookkeeping w.r.t blocked processes etc. There will be no concurrent reads or writes |
| 09:28:28 | <dminuoso> | Robert43: MVar and IORef are exactly the same. |
| 09:28:31 | <dminuoso> | data MVar a = MVar (MVar# RealWorld a) |
| 09:28:40 | <dminuoso> | Ah hold on |
| 09:28:43 | <dminuoso> | No I lied, they are not. |
| 09:28:47 | <merijn> | dminuoso: No they're not?? |
| 09:28:49 | <dminuoso> | I was thinking STRef. |
| 09:28:54 | <dminuoso> | STRef and IORef are the same thing under the hood. |
| 09:29:01 | × | Maeda quits (~Maeda@91-161-10-149.subs.proxad.net) (Ping timeout: 252 seconds) |
| 09:29:02 | <Robert43> | Yes |
| 09:29:20 | × | vito quits (sid1962@user/vito) (Ping timeout: 268 seconds) |
| 09:29:28 | <merijn> | Robert43: The bookkeeping is mostly for blocked threads, but if no threads block on it, then that's not used |
| 09:29:30 | → | vito joins (sid1962@user/vito) |
| 09:29:30 | <Robert43> | I guess I am wondering if I will pay some price for using an MVar instead of an IORef, if I don't use the MVar facilities for blocking etc |
| 09:29:44 | <merijn> | Robert43: I mean, that's like a handful of pointers per MVar, so also fairly negligible |
| 09:29:45 | <Robert43> | It has this nice property that you can create an empty mvar |
| 09:30:17 | <Robert43> | Whereas for an IORef I'd need to do something like `IORef (Maybe a)` to create a logically 'empty' one |
| 09:30:38 | <merijn> | Robert43: Basically, an MVar has 2 pointers to a queue for reads and a queue for writes, but if you never read from empty/write to full, those queues aren't used |
| 09:30:52 | → | Maeda joins (~Maeda@91-161-10-149.subs.proxad.net) |
| 09:30:54 | <dminuoso> | Robert43: You can, if need be, also do `newIORef undefined` - with some discipline it *can* be fine |
| 09:31:12 | <dminuoso> | (Or better yet `newIORef (error "uninitialized foo")`) |
| 09:31:16 | <Robert43> | Ahaha right, I don't trust myself though dminuoso |
| 09:31:17 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 276 seconds) |
| 09:31:33 | <Robert43> | Thanks for the clarification @meri |
| 09:31:36 | <Robert43> | merijn |
| 09:32:13 | <dminuoso> | merijn: interesting, that reminds me a bit about how TChan is implemented. |
| 09:34:29 | × | olivermead quits (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) (Remote host closed the connection) |
| 09:34:55 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 09:35:11 | <[Leary]> | Robert43: When I don't trust myself (which is most of the time), I like to try and craft safe interfaces overtop of the unsafe stuff, which stays confined to an internal module. You could do e.g. `newtype Empty a = Empty (IORef a); newEmpty = Empty <$> newIORef undefined; fill (Empty ref) a = writeIORef ref a $> ref`. |
| 09:36:36 | <kuribas> | The great thing about haskell is not that you don't need low level unsafe stuff, but rather that you can isolute the unsafe parts to a few lines of code, and then create nice (safe) abstractions over it. |
| 09:36:37 | <Robert43> | Sounds good :) |
| 09:37:49 | <merijn> | That seems kinda pointless? |
| 09:38:08 | <merijn> | Like, just delay "newIORef" until your "fill" call |
| 09:38:34 | <merijn> | The type changes anyway and you're doing IO anyway, so you can just delay creation until the fill |
| 09:39:51 | <[Leary]> | I just pulled that out of my arse to get the idea across, I'm not claiming it'll solve the problem as written. |
| 09:40:51 | <[Leary]> | So long as there is a "discipline" for it, you should be able to turn that discipline into an interface and have the compiler make sure you follow it. |
| 09:41:25 | <Robert43> | For my use case, an MVar sounds OK, and it will keep 'tricks' out of the code. While I may enjoy these tricks, I can't trust everyone to read the code to enjoy them as much |
| 09:42:15 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 09:42:17 | → | chele_ joins (~chele@user/chele) |
| 09:42:55 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 09:43:31 | <dminuoso> | Robert43: Honestly, it doesnt really change anything. |
| 09:43:47 | <dminuoso> | Robert43: If you try to read from an uninitialized MVar, it will block - this is just bottom. |
| 09:43:59 | <dminuoso> | If you use an undefined/error from an IORef, it will crash - this too is bottom. |
| 09:44:21 | <dminuoso> | Advantage of `newIORef (error "foo is not initialized")` is that you at least get some indicator about *which* *part* hasnt been initialized yet |
| 09:44:35 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
| 09:44:40 | <dminuoso> | Or you end up using tryTakeMVar everywhere, but that's really the same as `IORef (Maybe a)` anyhow |
| 09:44:58 | × | chele quits (~chele@user/chele) (Ping timeout: 252 seconds) |
| 09:45:02 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 255 seconds) |
| 09:45:13 | <Robert43> | I populate the MVar almost immediately, the rest of the code (rightly) assumes that it is filled |
| 09:45:37 | <kuribas> | at lower cost (no semaphores needed) |
| 09:46:34 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 09:46:45 | <dminuoso> | Robert43: Sure, but like I said: might as well use `error` instead. In the mvar case it will crash anyway (since the RTS can detect if no other thread has references to an MVar you are blocking on) |
| 09:46:48 | <dminuoso> | Except it really wont tell you where. |
| 09:46:59 | <dminuoso> | That makes MVar way less useful for what you're doing |
| 09:47:17 | <dminuoso> | With `error` you at least can include a name for the thing you are planning to initialize |
| 09:47:37 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 09:48:29 | → | __monty__ joins (~toonn@user/toonn) |
| 09:49:20 | <dminuoso> | Robert43: What you *can* do to turn this bottom into a usable exception, is an extension of what [Leary] proposed. Initialize each IORef with `undefined`, and hide `readIORef` behind a wrapper that will `evaluate` the inner thing |
| 09:49:54 | <dminuoso> | Turning the "uninitialized variable" into a proper IO exception (and you have IO anyway, since readIORef demands it) |
| 09:52:05 | <dminuoso> | Along the lines of: readMyRef (MyRef nam ref) = do v <- readIORef ref; catch (evaluate v) (\(e :: SomeException) -> throwIO (InternalError ("Uninitialized variable " <> nam))) |
| 09:52:28 | <dminuoso> | Well you get some other problems with respect to imprecise exception semantics, but oh well |
| 09:55:30 | <Robert43> | I'll experiment with all of these variants |
| 09:55:35 | → | vpan joins (~0@212.117.1.172) |
| 09:57:37 | <dminuoso> | Robert43: Or better yet, in that wrapper use an Maybe internally! |
| 09:58:09 | <dminuoso> | `data MyRef a = MyRef { ref :: IORef (Maybe a), nam :: T.Text }` |
| 09:58:31 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 09:59:33 | × | CiaoSen quits (~Jura@p200300c9571247002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 10:03:08 | → | king_gs joins (~Thunderbi@2806:103e:29:47b9:f34b:ffff:4cfc:90a6) |
| 10:04:17 | → | Kaipii joins (~Kaiepi@108.175.84.104) |
| 10:06:58 | × | Kaipei quits (~Kaiepi@108.175.84.104) (Ping timeout: 252 seconds) |
| 10:10:09 | × | king_gs quits (~Thunderbi@2806:103e:29:47b9:f34b:ffff:4cfc:90a6) (Ping timeout: 268 seconds) |
| 10:14:25 | × | razetime quits (~quassel@117.254.34.146) (Ping timeout: 246 seconds) |
| 10:15:15 | → | razetime joins (~quassel@117.254.34.146) |
| 10:16:01 | → | teo joins (~teo@user/teo) |
| 10:16:19 | × | abhiroop quits (~abhiroop@217-209-157-8-no2000.tbcn.telia.com) (Ping timeout: 252 seconds) |
| 10:20:34 | → | fkjac joins (~fkjac@gw1.compute.dtu.dk) |
| 10:21:50 | × | fkjac quits (~fkjac@gw1.compute.dtu.dk) (Client Quit) |
| 10:22:46 | → | gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
| 10:28:24 | → | MajorBiscuit joins (~MajorBisc@145.94.167.250) |
| 10:32:56 | → | bitmapper joins (uid464869@id-464869.lymington.irccloud.com) |
| 10:35:41 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 10:36:23 | → | vglfr joins (~vglfr@145.224.100.22) |
| 10:36:59 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 10:38:57 | → | jco joins (~jco@90-228-194-139-no542.tbcn.telia.com) |
| 10:42:10 | × | michalz quits (~michalz@185.246.207.203) (Ping timeout: 252 seconds) |
| 10:42:28 | → | michalz joins (~michalz@185.246.207.222) |
| 10:42:34 | <jco> | Hi, using Aeson, can I "flatten" the encoding of a sum type, so that instead of a nested object, I get the constructor name as a field name. It's kind of difficult to explain, so the short code example at https://paste.tomsmeding.com/fShsZw6D is maybe clearer? Is there something other than `ObjectWithSingleField` that I can use to get what I want. Thankful for any help. |
| 10:46:41 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
| 10:49:36 | <kuribas> | jco: TaggedObject? https://hackage.haskell.org/package/aeson-1.3.1.1/docs/Data-Aeson-Types.html#t:SumEncoding |
| 10:49:44 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 10:53:05 | <dminuoso> | jco: Just write out the instance by hand? |
| 10:56:28 | × | _leo92_ quits (~emmanuelu@user/emmanuelux) (Quit: au revoir) |
| 10:57:22 | <jco> | kuribas: `TaggedObject` would only give me something like: `{"field_name":"Dummy","field_x":{"k":"cons_A","v":"Foo"}}` for `sumEncoding = TaggedObject "k" "v"`. |
| 10:58:45 | × | Robert43 quits (~Robert@ext-1-087.eduroam.chalmers.se) (Ping timeout: 255 seconds) |
| 10:59:05 | → | beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 10:59:11 | <kuribas> | "If the constructor is a record the encoded record fields will be unpacked into this object." |
| 10:59:15 | × | zaquest quits (~notzaques@5.130.79.72) (Remote host closed the connection) |
| 10:59:49 | <kuribas> | If you have nested types, then you'll need to write the instance by hand, as dminuoso said. |
| 11:02:30 | → | elevenkb joins (~elevenkb@105.184.125.168) |
| 11:02:47 | → | nate3 joins (~nate@98.45.169.16) |
| 11:04:10 | <jco> | dminuoso: Makes sense! :) |
| 11:07:32 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
| 11:09:56 | → | king_gs joins (~Thunderbi@187.201.83.115) |
| 11:11:14 | ski | notes Clean's `Dynamic' <https://wiki.clean.cs.ru.nl/download/html_report/CleanRep.2.2_10.htm> can store polymorphic (although not overloaded, yet) operations .. although not resources like `World' and `File', because you can serialize/marshall these `Dynamic's |
| 11:15:20 | → | freeside_ joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 11:15:43 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds) |
| 11:17:44 | <ski> | also, due to having language sypport with pattern-matching, you can easily code up stuff like `dynApply :: Dynamic -> Dynamic -> Maybe Dynamic; dynApply (dynamic f :: a -> b) (dynamic x :: a) = Just (dynamic f x :: b); dynApply _ _ = Nothing' and `flexDynApply :: forall b. Typeable b => Dynamic -> Dynamic -> Maybe b; flexDynApply (dynamic f :: a -> b) (dynamic x :: a) = Just (f x); flexDynApply _ _ = |
| 11:17:50 | <ski> | Nothing' yourself |
| 11:18:41 | <ski> | (adapting the actual Clean syntax to an imagined Haskell syntax in those examples) |
| 11:20:12 | <dminuoso> | jco: I think there's generally an overreliance on generic deriving for aeson. In many cases its a bad idea. |
| 11:20:57 | <ski> | @type liftM Data.Dynamic.toDyn (System.IO.openFile "foobar" System.IO.ReadMode) |
| 11:20:58 | <lambdabot> | IO Dynamic |
| 11:21:00 | <ski> | @type liftM Data.Dynamic.toDyn (Data.IORef.newIORef ()) |
| 11:21:01 | <lambdabot> | IO Dynamic |
| 11:27:14 | → | bjourne joins (~bjourne@2001:6b0:1:1140:42bf:ff4:f8fa:50e5) |
| 11:29:52 | × | king_gs quits (~Thunderbi@187.201.83.115) (Read error: Connection reset by peer) |
| 11:29:56 | → | king_gs1 joins (~Thunderbi@2806:103e:29:47b9:f34b:ffff:4cfc:90a6) |
| 11:30:22 | → | CiaoSen joins (~Jura@p200300c9571247002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 11:31:15 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) |
| 11:32:09 | <jco> | dminuoso: Yeah, I wasn't even thinking of doing it manually here. Simplest. |
| 11:32:15 | king_gs1 | is now known as king_gs |
| 11:35:39 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) (Ping timeout: 255 seconds) |
| 11:43:50 | → | Sauvin joins (~sauvin@user/Sauvin) |
| 11:46:10 | × | elevenkb quits (~elevenkb@105.184.125.168) (Remote host closed the connection) |
| 11:49:37 | × | CiaoSen quits (~Jura@p200300c9571247002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 11:56:40 | → | cfricke joins (~cfricke@user/cfricke) |
| 11:57:17 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Read error: Connection reset by peer) |
| 11:57:25 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 12:07:28 | × | king_gs quits (~Thunderbi@2806:103e:29:47b9:f34b:ffff:4cfc:90a6) (Ping timeout: 246 seconds) |
| 12:10:43 | × | freeside_ quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds) |
| 12:11:29 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 12:18:26 | → | zaquest joins (~notzaques@5.130.79.72) |
| 12:18:42 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 12:19:06 | × | cods quits (~fred@82-65-232-44.subs.proxad.net) (Ping timeout: 252 seconds) |
| 12:19:19 | → | cods joins (~fred@82-65-232-44.subs.proxad.net) |
| 12:19:31 | × | teo quits (~teo@user/teo) (Ping timeout: 252 seconds) |
| 12:20:49 | → | teo joins (~teo@user/teo) |
| 12:22:35 | → | abhiroop joins (~abhiroop@ext-1-450.eduroam.chalmers.se) |
| 12:26:39 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 12:29:15 | → | Heyting joins (~Heyting@193.198.16.217) |
| 12:30:12 | × | Guest283 quits (bnc4free@has.arrived.and.is.ready-to.party) (Remote host closed the connection) |
| 12:34:29 | → | nilradical joins (~nilradica@user/naso) |
| 12:34:51 | × | Heyting quits (~Heyting@193.198.16.217) (Remote host closed the connection) |
| 12:35:55 | → | elevenkb joins (~elevenkb@105.184.125.168) |
| 12:37:25 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 12:37:31 | × | kenran` quits (~user@user/kenran) (Remote host closed the connection) |
| 12:39:52 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 12:43:26 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 12:55:13 | nicmollel[m] | is now known as nicm[m] |
| 12:58:24 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 13:01:33 | × | elevenkb quits (~elevenkb@105.184.125.168) (Ping timeout: 272 seconds) |
| 13:02:29 | → | doyougnu joins (~doyougnu@cpe-74-69-132-225.stny.res.rr.com) |
| 13:04:46 | → | elevenkb joins (~elevenkb@197-101-14-138.ip.broadband.is) |
| 13:04:58 | → | king_gs joins (~Thunderbi@187.201.83.115) |
| 13:11:24 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 13:14:42 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:58cc:160d:9dd:aaf4) |
| 13:15:00 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 248 seconds) |
| 13:16:41 | → | ozkutuk5 joins (~ozkutuk@176.240.173.153) |
| 13:17:02 | × | xstill_ quits (xstill@fimu/xstill) (Quit: Ping timeout (120 seconds)) |
| 13:17:19 | → | xstill_ joins (xstill@fimu/xstill) |
| 13:17:25 | → | freeside_ joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 13:18:19 | → | haasn` joins (~nand@haasn.dev) |
| 13:18:55 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds) |
| 13:19:07 | → | kawen_ joins (~quassel@static.208.191.216.95.clients.your-server.de) |
| 13:19:51 | → | CiaoSen joins (~Jura@p200300c9571247002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 13:24:17 | × | freeside_ quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds) |
| 13:27:19 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 13:27:40 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 13:28:15 | × | ozkutuk quits (~ozkutuk@176.240.173.153) (Quit: Ping timeout (120 seconds)) |
| 13:28:15 | ozkutuk5 | is now known as ozkutuk |
| 13:28:36 | × | haasn quits (~nand@haasn.dev) (Killed (NickServ (GHOST command used by haasn`))) |
| 13:28:36 | haasn` | is now known as haasn |
| 13:28:46 | → | Heyting joins (~Heyting@193.198.16.217) |
| 13:32:43 | × | xff0x quits (~xff0x@2405:6580:b080:900:9a4a:3159:118e:c175) (Ping timeout: 255 seconds) |
| 13:33:06 | → | Guest71 joins (~Guest71@ext-1-450.eduroam.chalmers.se) |
| 13:34:07 | → | kenran joins (~user@user/kenran) |
| 13:35:35 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 13:36:53 | → | littlefinger joins (~littlefin@pool-108-53-194-91.nwrknj.fios.verizon.net) |
| 13:37:01 | ← | littlefinger parts (~littlefin@pool-108-53-194-91.nwrknj.fios.verizon.net) () |
| 13:37:24 | × | Heyting quits (~Heyting@193.198.16.217) (Remote host closed the connection) |
| 13:38:13 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 13:39:12 | × | juri_ quits (~juri@84-19-175-179.pool.ovpn.com) (*.net *.split) |
| 13:39:12 | × | drewolson quits (~drewolson@user/drewolson) (*.net *.split) |
| 13:39:12 | × | mtjm quits (~mutantmel@2604:a880:2:d0::208b:d001) (*.net *.split) |
| 13:39:12 | × | wz1000 quits (~zubin@static.11.113.47.78.clients.your-server.de) (*.net *.split) |
| 13:39:12 | × | kawen quits (~quassel@static.208.191.216.95.clients.your-server.de) (*.net *.split) |
| 13:39:12 | × | spider_ quits (~spider@vps-951ce37a.vps.ovh.ca) (*.net *.split) |
| 13:39:12 | × | vulpine quits (xfnw@tilde.team) (*.net *.split) |
| 13:39:12 | × | yaroot quits (~yaroot@2400:4052:ac0:d900:1cf4:2aff:fe51:c04c) (*.net *.split) |
| 13:39:12 | × | hololeap quits (~quassel@user/hololeap) (*.net *.split) |
| 13:42:55 | × | mmhat quits (~mmh@2003:f1:c730:7621:ee08:6bff:fe09:5315) (Quit: WeeChat 3.7.1) |
| 13:43:10 | → | nilradical joins (~nilradica@user/naso) |
| 13:44:08 | → | ygsjg joins (~quassel@189.124.224.160) |
| 13:44:20 | → | jtomas joins (~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) |
| 13:45:15 | → | xff0x joins (~xff0x@2405:6580:b080:900:aa5a:50b3:fed5:3fc2) |
| 13:45:24 | × | doyougnu quits (~doyougnu@cpe-74-69-132-225.stny.res.rr.com) (Ping timeout: 248 seconds) |
| 13:50:02 | → | Guest13 joins (~Guest13@2001:6b0:4f:2801:1467:20e3:85d3:3c07) |
| 13:50:27 | × | elevenkb quits (~elevenkb@197-101-14-138.ip.broadband.is) (Remote host closed the connection) |
| 13:53:33 | × | Guest13 quits (~Guest13@2001:6b0:4f:2801:1467:20e3:85d3:3c07) (Client Quit) |
| 13:55:04 | × | Xeroine quits (~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
| 13:57:37 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 13:58:45 | × | king_gs quits (~Thunderbi@187.201.83.115) (Read error: Connection reset by peer) |
| 13:59:00 | → | comerijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 14:01:16 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 14:01:43 | → | drewolson joins (~drewolson@user/drewolson) |
| 14:01:56 | → | king_gs joins (~Thunderbi@2806:103e:29:47b9:f34b:ffff:4cfc:90a6) |
| 14:04:14 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds) |
| 14:04:27 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 14:06:20 | <vpan> | hi, I'm trying to use a `newtype` to be able to define cassava instances for Data.Fixed types, see the reproducer I've minimized to - https://paste.tomsmeding.com/iHKJQS4D . What am I missing? |
| 14:07:49 | <geekosaur> | that expects "Cents 7" instead of just "7" |
| 14:08:57 | <geekosaur> | what are you trying to accomplish with the newtype, exactly? |
| 14:09:03 | <kuribas> | {- LANGUAGE GeneralizedNewtypeDeriving -} |
| 14:09:57 | <geekosaur> | you missed the pragma marks (`{-#`) and it won't help here |
| 14:10:04 | <vpan> | geekosaur: I need `FromField` cassava instances to parse CSV fields into fields of fixed precision types |
| 14:11:25 | <kuribas> | geekosaur: why not? |
| 14:12:15 | <geekosaur> | it's not a deriving error, it's just not doing what vpan wants. unless you mean using it to auto-derive FromField, and in that case I'm still not sure it would DTRT |
| 14:12:49 | × | jco quits (~jco@90-228-194-139-no542.tbcn.telia.com) (Quit: leaving) |
| 14:12:53 | <kuribas> | that's what I thought he wanted. |
| 14:13:20 | <geekosaur> | instance FromField Centi where … -- may require FlexibleInstances |
| 14:13:31 | → | thegeekinside joins (~thegeekin@189.180.115.115) |
| 14:13:44 | × | Xeroine quits (~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
| 14:17:16 | → | juri_ joins (~juri@84-19-175-179.pool.ovpn.com) |
| 14:17:16 | → | mtjm joins (~mutantmel@2604:a880:2:d0::208b:d001) |
| 14:17:16 | → | wz1000 joins (~zubin@static.11.113.47.78.clients.your-server.de) |
| 14:17:16 | → | spider_ joins (~spider@vps-951ce37a.vps.ovh.ca) |
| 14:17:16 | → | vulpine joins (xfnw@tilde.team) |
| 14:17:16 | → | yaroot joins (~yaroot@2400:4052:ac0:d900:1cf4:2aff:fe51:c04c) |
| 14:17:16 | → | hololeap joins (~quassel@user/hololeap) |
| 14:17:20 | × | hololeap quits (~quassel@user/hololeap) (Max SendQ exceeded) |
| 14:17:21 | × | vulpine quits (xfnw@tilde.team) (Max SendQ exceeded) |
| 14:17:25 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 14:17:36 | → | hololeap joins (~quassel@user/hololeap) |
| 14:17:52 | → | vulpine joins (xfnw@tilde.team) |
| 14:20:34 | <vpan> | geekosaur: trying to define an instance for `Centi` fails - https://paste.tomsmeding.com/8w4ECAVb . That's why I tried a `newtype`. I realise the error is hinting at an extension, but I don't yet have an understanding which/how many extensions it is reasonable to enable, so I was trying to do it the "classic" way. :) |
| 14:21:25 | <vpan> | i.e. without enabling an extension |
| 14:22:09 | <geekosaur> | either use TypeSynonymInstances like it says, or define the instance for Fixed E2 instead of Centi |
| 14:22:10 | × | zaquest quits (~notzaques@5.130.79.72) (Ping timeout: 252 seconds) |
| 14:22:43 | × | cods quits (~fred@82-65-232-44.subs.proxad.net) (Ping timeout: 252 seconds) |
| 14:23:22 | <vpan> | thanks |
| 14:23:27 | <geekosaur> | that may still demand an extension because neither Fixed or E2 is a type variable; you can't escape that one |
| 14:23:39 | <geekosaur> | \s/or/nor/ |
| 14:23:49 | <kuribas> | a newtype is not a type synonym |
| 14:23:52 | <geekosaur> | Fixed uses some type trickery |
| 14:24:00 | → | Tuplanolla joins (~Tuplanoll@91-159-69-11.elisa-laajakaista.fi) |
| 14:24:03 | <comerijn> | kuribas: Centi isn't a newtype, so... |
| 14:24:10 | <kuribas> | oh right |
| 14:24:22 | <geekosaur> | it's a type alias for Fixed E2 |
| 14:24:30 | → | cods joins (~fred@82-65-232-44.subs.proxad.net) |
| 14:25:58 | → | abhiroop_ joins (~abhiroop@ext-1-450.eduroam.chalmers.se) |
| 14:26:01 | × | abhiroop quits (~abhiroop@ext-1-450.eduroam.chalmers.se) (Ping timeout: 252 seconds) |
| 14:28:26 | → | motherfsck joins (~motherfsc@user/motherfsck) |
| 14:32:40 | → | nilradical joins (~nilradica@user/naso) |
| 14:33:24 | × | gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 14:33:53 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) |
| 14:35:35 | → | zaquest joins (~notzaques@5.130.79.72) |
| 14:38:21 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) (Ping timeout: 255 seconds) |
| 14:39:35 | × | xsarnik quits (xsarnik@lounge.fi.muni.cz) (Quit: Ping timeout (120 seconds)) |
| 14:40:15 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 14:40:21 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds) |
| 14:40:36 | → | shriekingnoise joins (~shrieking@186.137.167.202) |
| 14:49:44 | → | xsarnik joins (xsarnik@lounge.fi.muni.cz) |
| 14:52:18 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 14:53:21 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 14:53:56 | → | nil joins (~user@202.38.78.189) |
| 14:54:09 | ← | nil parts (~user@202.38.78.189) () |
| 14:54:28 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 14:55:03 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 14:56:49 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 272 seconds) |
| 15:04:17 | → | nate3 joins (~nate@98.45.169.16) |
| 15:04:24 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) |
| 15:04:32 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
| 15:05:56 | × | vglfr quits (~vglfr@145.224.100.22) (Read error: Connection reset by peer) |
| 15:06:07 | → | vglfr joins (~vglfr@145.224.100.22) |
| 15:06:31 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 15:08:53 | → | drdo joins (~drdo@overlord.drdo.eu) |
| 15:08:56 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 246 seconds) |
| 15:09:14 | × | nilradical quits (~nilradica@user/naso) (Remote host closed the connection) |
| 15:10:32 | → | nilradical joins (~nilradica@user/naso) |
| 15:17:15 | → | hexeme joins (~hexeme@user/hexeme) |
| 15:17:17 | × | hexeme_ quits (~hexeme@user/hexeme) (Ping timeout: 240 seconds) |
| 15:19:22 | × | motherfsck quits (~motherfsc@user/motherfsck) (Ping timeout: 252 seconds) |
| 15:23:14 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 15:29:54 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) (Remote host closed the connection) |
| 15:30:19 | × | vglfr quits (~vglfr@145.224.100.22) (Remote host closed the connection) |
| 15:30:44 | → | vglfr joins (~vglfr@145.224.100.22) |
| 15:35:13 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 15:35:13 | × | AlexNoo quits (~AlexNoo@178.34.163.109) (Read error: Connection reset by peer) |
| 15:35:42 | × | vglfr quits (~vglfr@145.224.100.22) (Remote host closed the connection) |
| 15:35:57 | → | AlexNoo joins (~AlexNoo@178.34.163.109) |
| 15:36:08 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) |
| 15:36:26 | → | vglfr joins (~vglfr@145.224.100.22) |
| 15:39:00 | × | Alex_test quits (~al_test@178.34.163.109) (Ping timeout: 248 seconds) |
| 15:39:32 | × | AlexZenon quits (~alzenon@178.34.163.109) (Ping timeout: 248 seconds) |
| 15:39:38 | → | motherfsck joins (~motherfsc@user/motherfsck) |
| 15:40:37 | → | AlexZenon joins (~alzenon@178.34.163.109) |
| 15:41:21 | × | kenran quits (~user@user/kenran) (Remote host closed the connection) |
| 15:43:46 | → | Alex_test joins (~al_test@178.34.163.109) |
| 15:43:54 | → | zebrag joins (~chris@user/zebrag) |
| 15:44:03 | × | catern quits (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407) (Ping timeout: 255 seconds) |
| 15:47:27 | → | elevenkb joins (~elevenkb@105.184.125.168) |
| 15:47:55 | × | nilradical quits (~nilradica@user/naso) () |
| 15:49:13 | × | AlexNoo quits (~AlexNoo@178.34.163.109) (Read error: Connection reset by peer) |
| 15:49:19 | ← | statusfailed parts (~statusfai@statusfailed.com) () |
| 15:49:36 | → | AlexNoo joins (~AlexNoo@178.34.163.109) |
| 15:57:40 | × | Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 248 seconds) |
| 15:58:46 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 15:59:08 | <bjourne> | are alex and happy supported anymore? they seem very outdated |
| 15:59:56 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) (Remote host closed the connection) |
| 16:00:15 | × | CiaoSen quits (~Jura@p200300c9571247002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 255 seconds) |
| 16:00:52 | × | MajorBiscuit quits (~MajorBisc@145.94.167.250) (Ping timeout: 248 seconds) |
| 16:01:18 | <geekosaur[m]> | They're required to build GHC, not that you will be doing that |
| 16:01:31 | → | econo joins (uid147250@user/econo) |
| 16:01:56 | × | Taneb quits (~Taneb@runciman.hacksoc.org) (Quit: I seem to have stopped.) |
| 16:02:16 | × | jonathanx quits (~jonathan@98.128.168.222) (Ping timeout: 268 seconds) |
| 16:02:36 | <geekosaur[m]> | And happy in particular should be fairly up to date. Alex doesn't generally need changes |
| 16:03:01 | → | Taneb joins (~Taneb@2001:41c8:51:10d:aaaa:0:aaaa:0) |
| 16:03:44 | → | drewolson3 joins (~drewolson@user/drewolson) |
| 16:04:11 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 16:04:44 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 16:05:04 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 16:05:22 | <bjourne> | the code generated by alex contains deprecation warnings |
| 16:05:34 | × | drewolson quits (~drewolson@user/drewolson) (Ping timeout: 252 seconds) |
| 16:05:34 | drewolson3 | is now known as drewolson |
| 16:05:55 | <comerijn> | bjourne: Which deprecation warning(s)? |
| 16:12:54 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 16:12:58 | <Hecate> | haha that fucking sucks |
| 16:13:51 | <Hecate> | I believe ericson2314 has some leverage on Alex |
| 16:14:41 | <AndreasK> | I find all the fun bugs https://gitlab.haskell.org/ghc/ghc/-/issues/22402 |
| 16:15:33 | <Hecate> | AndreasK: :'''') |
| 16:15:34 | <Hecate> | wow |
| 16:15:59 | → | tgi joins (~thegeekin@189.180.115.115) |
| 16:17:07 | × | thegeekinside quits (~thegeekin@189.180.115.115) (Ping timeout: 252 seconds) |
| 16:17:24 | × | comerijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds) |
| 16:18:55 | → | dcoutts__ joins (~duncan@host86-163-164-210.range86-163.btcentralplus.com) |
| 16:19:17 | × | cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.7.1) |
| 16:19:56 | <AndreasK> | I will leave it at the diagnosis for today. But seems like a tricky one |
| 16:21:24 | × | dcoutts_ quits (~duncan@host86-163-164-210.range86-163.btcentralplus.com) (Ping timeout: 255 seconds) |
| 16:21:31 | × | hololeap quits (~quassel@user/hololeap) (Ping timeout: 252 seconds) |
| 16:22:16 | → | hololeap joins (~quassel@user/hololeap) |
| 16:27:24 | → | dcoutts_ joins (~duncan@host86-163-164-210.range86-163.btcentralplus.com) |
| 16:27:34 | × | Tuplanolla quits (~Tuplanoll@91-159-69-11.elisa-laajakaista.fi) (Ping timeout: 252 seconds) |
| 16:27:42 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 255 seconds) |
| 16:28:03 | → | Tuplanolla joins (~Tuplanoll@91-159-69-11.elisa-laajakaista.fi) |
| 16:28:52 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 16:29:46 | × | dcoutts__ quits (~duncan@host86-163-164-210.range86-163.btcentralplus.com) (Ping timeout: 252 seconds) |
| 16:29:55 | → | olivermead joins (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) |
| 16:31:57 | <absence> | if I have a (SomeField r, SomeOtherField r) => ReaderT r m a, i sometimes find myself wanting to temporarily "add" fields to r. i can do that by defining a new record that wraps the old one, i.e. data Wrapper r = Wrapper { x :: ExcitingNewField, oldStuff :: r }, and call withReaderT Wrapper, but then I have to write instances for SomeField and SomeOtherField for the Wrapper. it's just boring boilerplate |
| 16:32:03 | <absence> | that delegates to the oldStuff field, so i wonder if there's a better way to extend a reader? |
| 16:33:50 | → | CiaoSen joins (~Jura@p200300c9571247002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 16:36:31 | × | Spukgespenst quits (~user@user/siracusa) (Quit: Bye!) |
| 16:40:09 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 16:40:15 | <absence> | i suppose it's possible to use DerivingVia and HasField to reduce the amount of boilerplate, but maybe there are better options |
| 16:40:55 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 16:44:08 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 16:47:35 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
| 16:49:58 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 16:50:08 | → | Alex_test_ joins (~al_test@178.34.163.109) |
| 16:50:08 | <[exa]> | absence: anything would prevent you from using the DuplicateRecordFields or so and just feeding it more data structures? |
| 16:50:21 | × | rodental quits (~rodental@38.146.5.222) (Remote host closed the connection) |
| 16:50:21 | → | AlexNoo_ joins (~AlexNoo@178.34.163.109) |
| 16:50:22 | → | rodental joins (~rodental@38.146.5.222) |
| 16:51:39 | <[exa]> | (...still that makes you copy most of the structure definition which is likely not what you want) |
| 16:52:05 | × | Alex_test quits (~al_test@178.34.163.109) (Ping timeout: 272 seconds) |
| 16:52:06 | → | teo_ joins (~teo@user/teo) |
| 16:53:59 | × | AlexNoo quits (~AlexNoo@178.34.163.109) (Ping timeout: 272 seconds) |
| 16:53:59 | × | teo quits (~teo@user/teo) (Ping timeout: 272 seconds) |
| 16:54:57 | <geekosaur> | row types when? |
| 16:58:30 | <Hecate> | I wish |
| 17:01:07 | × | irrgit_ quits (~irrgit@146.70.27.242) (Ping timeout: 252 seconds) |
| 17:04:16 | Alex_test_ | is now known as Alex_test |
| 17:05:28 | AlexNoo_ | is now known as AlexNoo |
| 17:06:51 | <absence> | [exa]: i guess that would move the boilerplate to the conversion function passed to withReaderT |
| 17:08:49 | × | vglfr quits (~vglfr@145.224.100.22) (Ping timeout: 252 seconds) |
| 17:09:07 | → | vglfr joins (~vglfr@145.224.100.22) |
| 17:11:04 | → | drdo5 joins (~drdo@overlord.drdo.eu) |
| 17:11:36 | × | drdo quits (~drdo@overlord.drdo.eu) (Killed (NickServ (GHOST command used by drdo5))) |
| 17:11:47 | drdo5 | is now known as drdo |
| 17:14:06 | → | irrgit_ joins (~irrgit@146.70.27.242) |
| 17:16:47 | → | causal joins (~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0d) |
| 17:17:37 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 17:17:47 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 17:18:07 | × | Kaipii quits (~Kaiepi@108.175.84.104) (Ping timeout: 268 seconds) |
| 17:20:15 | → | ccapndave joins (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) |
| 17:21:19 | × | causal quits (~user@2001:470:ea0f:3:329c:23ff:fe3f:1e0d) (Ping timeout: 255 seconds) |
| 17:24:27 | × | ccapndave quits (~ccapndave@xcpe-62-167-164-99.cgn.res.adslplus.ch) (Client Quit) |
| 17:24:46 | × | teo_ quits (~teo@user/teo) (Ping timeout: 252 seconds) |
| 17:25:23 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 17:29:47 | × | kuribas quits (~user@ip-188-118-57-242.reverse.destiny.be) (Quit: ERC (IRC client for Emacs 27.1)) |
| 17:35:24 | → | causal joins (~user@50.35.83.177) |
| 17:37:31 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::4b68) |
| 17:38:04 | → | Alex_test_ joins (~al_test@178.34.163.109) |
| 17:38:25 | × | chele_ quits (~chele@user/chele) (Remote host closed the connection) |
| 17:39:36 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
| 17:39:37 | × | Alex_test quits (~al_test@178.34.163.109) (Ping timeout: 252 seconds) |
| 17:40:11 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 17:42:01 | × | razetime quits (~quassel@117.254.34.146) (Remote host closed the connection) |
| 17:43:17 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds) |
| 17:44:27 | <Profpatsch> | I wish |
| 17:45:55 | × | CiaoSen quits (~Jura@p200300c9571247002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 17:46:14 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 17:46:57 | → | Guest75 joins (~Guest75@178.141.177.81) |
| 17:47:51 | × | zebrag quits (~chris@user/zebrag) (Read error: Connection reset by peer) |
| 17:48:15 | → | zebrag joins (~chris@user/zebrag) |
| 17:48:21 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 17:50:46 | <monochrom> | Buy row types on wish.com :) |
| 17:51:10 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 17:59:28 | → | Kaipii joins (~Kaiepi@108.175.84.104) |
| 17:59:39 | × | vpan quits (~0@212.117.1.172) (Quit: Leaving.) |
| 18:02:04 | → | ft joins (~ft@80.141.189.89) |
| 18:04:28 | × | olivermead quits (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) (Ping timeout: 246 seconds) |
| 18:07:10 | × | califax quits (~califax@user/califx) (Remote host closed the connection) |
| 18:07:39 | × | fserucas quits (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Quit: Leaving) |
| 18:07:41 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 18:08:26 | → | talismanick joins (~talismani@96-67-197-217-static.hfc.comcastbusiness.net) |
| 18:09:58 | → | califax joins (~califax@user/califx) |
| 18:09:59 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 276 seconds) |
| 18:12:42 | → | freeside joins (~mengwong@115.66.48.84) |
| 18:14:34 | → | jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 18:14:34 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Read error: Connection reset by peer) |
| 18:15:22 | × | EvanR quits (~EvanR@user/evanr) (Remote host closed the connection) |
| 18:16:20 | → | EvanR joins (~EvanR@user/evanr) |
| 18:19:33 | → | olivermead joins (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) |
| 18:24:06 | × | freeside quits (~mengwong@115.66.48.84) (Ping timeout: 268 seconds) |
| 18:24:27 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 18:25:08 | × | Guest75 quits (~Guest75@178.141.177.81) (Ping timeout: 260 seconds) |
| 18:25:35 | × | fserucas_ quits (~fserucas@2001:818:e376:a400:fb92:70c1:dd88:c7d7) (Ping timeout: 276 seconds) |
| 18:26:13 | → | emmanuelux joins (~emmanuelu@user/emmanuelux) |
| 18:33:00 | × | chronon quits (~chronon@user/chronon) (Quit: leaving) |
| 18:33:08 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 18:34:28 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 248 seconds) |
| 18:36:07 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 18:36:08 | → | beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 18:36:13 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 18:39:12 | → | simple joins (skralg@user/simple) |
| 18:40:20 | → | gmg joins (~user@user/gehmehgeh) |
| 18:40:27 | × | beteigeuze quits (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 255 seconds) |
| 18:41:30 | → | eggplant_ joins (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) |
| 18:43:25 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds) |
| 18:45:55 | × | king_gs quits (~Thunderbi@2806:103e:29:47b9:f34b:ffff:4cfc:90a6) (Remote host closed the connection) |
| 18:46:14 | → | king_gs joins (~Thunderbi@2806:103e:29:47b9:f34b:ffff:4cfc:90a6) |
| 18:46:16 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 18:47:23 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 18:49:52 | × | Guest71 quits (~Guest71@ext-1-450.eduroam.chalmers.se) (Quit: Client closed) |
| 18:52:37 | Alex_test_ | is now known as Alex_test |
| 18:52:46 | × | rodental quits (~rodental@38.146.5.222) (Ping timeout: 252 seconds) |
| 18:53:10 | → | rodental joins (~rodental@38.146.5.222) |
| 18:53:32 | × | whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 19:01:40 | × | finsternis quits (~X@23.226.237.192) (Ping timeout: 248 seconds) |
| 19:02:04 | → | finsternis joins (~X@23.226.237.192) |
| 19:03:55 | → | rond_ joins (~rond_@87.74.205.31) |
| 19:04:11 | → | ephemient joins (uid407513@id-407513.lymington.irccloud.com) |
| 19:04:38 | → | chronon joins (~chronon@user/chronon) |
| 19:05:25 | × | irrgit_ quits (~irrgit@146.70.27.242) (Ping timeout: 252 seconds) |
| 19:05:47 | → | nate3 joins (~nate@98.45.169.16) |
| 19:05:47 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 19:10:39 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 255 seconds) |
| 19:12:00 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 19:12:34 | × | vglfr quits (~vglfr@145.224.100.22) (Ping timeout: 252 seconds) |
| 19:13:07 | → | drdo1 joins (~drdo@overlord.drdo.eu) |
| 19:13:17 | → | vglfr joins (~vglfr@145.224.100.22) |
| 19:13:18 | × | drdo quits (~drdo@overlord.drdo.eu) (Killed (NickServ (GHOST command used by drdo1))) |
| 19:13:18 | drdo1 | is now known as drdo |
| 19:13:45 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::4b68) (Ping timeout: 255 seconds) |
| 19:14:48 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 19:17:34 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 19:20:55 | × | jtomas quits (~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) (Ping timeout: 272 seconds) |
| 19:23:26 | → | Alex_test_ joins (~al_test@178.34.163.109) |
| 19:23:34 | → | AlexNoo_ joins (~AlexNoo@178.34.163.109) |
| 19:24:11 | × | AlexNoo quits (~AlexNoo@178.34.163.109) (Read error: Connection reset by peer) |
| 19:25:21 | × | Alex_test quits (~al_test@178.34.163.109) (Ping timeout: 271 seconds) |
| 19:25:57 | → | ss4 joins (~wootehfoo@user/wootehfoot) |
| 19:27:14 | → | caryhartline joins (~caryhartl@2603-8080-6a0e-8d88-01fd-d633-9a8e-c806.res6.spectrum.com) |
| 19:28:38 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 246 seconds) |
| 19:29:04 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Ping timeout: 252 seconds) |
| 19:33:30 | × | ss4 quits (~wootehfoo@user/wootehfoot) (Quit: Leaving) |
| 19:35:52 | × | eggplant_ quits (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) (Remote host closed the connection) |
| 19:37:24 | × | Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 248 seconds) |
| 19:39:29 | × | gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer) |
| 19:43:36 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 19:44:57 | → | gentauro joins (~gentauro@user/gentauro) |
| 19:49:25 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 19:50:29 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:58cc:160d:9dd:aaf4) (Quit: WeeChat 2.8) |
| 19:51:04 | × | zebrag quits (~chris@user/zebrag) (Ping timeout: 252 seconds) |
| 19:51:39 | → | zebrag joins (~chris@user/zebrag) |
| 19:53:31 | AlexNoo_ | is now known as AlexNoo |
| 19:53:47 | Alex_test_ | is now known as Alex_test |
| 19:56:49 | → | redmp joins (~redmp@lib-02-subnet-194.rdns.cenic.net) |
| 19:57:16 | → | burakcan- joins (burakcank@2a01:4f8:c17:efa0::3) |
| 19:57:23 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 20:00:22 | → | Kaipei joins (~Kaiepi@108.175.84.104) |
| 20:01:54 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 255 seconds) |
| 20:03:43 | × | Kaipii quits (~Kaiepi@108.175.84.104) (Ping timeout: 252 seconds) |
| 20:04:11 | → | seriously_guest joins (~seriously@2001:1c06:2715:c200:de2b:899c:1c2e:ded7) |
| 20:09:01 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 20:13:29 | × | acidjnk quits (~acidjnk@p200300d6e7137a343957ed7bae49a26a.dip0.t-ipconnect.de) (Ping timeout: 276 seconds) |
| 20:14:08 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 276 seconds) |
| 20:16:05 | → | jonathanx__ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 20:16:05 | × | jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Read error: Connection reset by peer) |
| 20:16:55 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 20:19:04 | → | acidjnk joins (~acidjnk@p200300d6e7137a515579cbbbe79af53b.dip0.t-ipconnect.de) |
| 20:21:47 | → | pavonia joins (~user@user/siracusa) |
| 20:22:58 | × | olivermead quits (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) (Ping timeout: 252 seconds) |
| 20:23:44 | → | olivermead joins (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) |
| 20:25:03 | × | olivermead quits (~olivermea@cpc72329-sotn15-2-0-cust205.15-1.cable.virginm.net) (Remote host closed the connection) |
| 20:30:11 | → | whatsupdoc joins (uid509081@2a03:5180:f:4::7:c499) |
| 20:30:41 | <ski> | convoluted in the day, or well composed, i effect my actions |
| 20:31:21 | → | sadmax joins (~user@209.205.174.253) |
| 20:33:02 | × | califax quits (~califax@user/califx) (Ping timeout: 255 seconds) |
| 20:34:06 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 20:35:20 | → | califax joins (~califax@user/califx) |
| 20:36:21 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 20:41:07 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds) |
| 20:44:53 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 20:49:36 | × | abhiroop_ quits (~abhiroop@ext-1-450.eduroam.chalmers.se) (Ping timeout: 255 seconds) |
| 20:57:34 | → | jlgw joins (~jw@83-233-104-81.cust.bredband2.com) |
| 21:03:46 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 21:04:10 | → | gqplox joins (~textual@147.188.245.207) |
| 21:05:03 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 21:05:10 | × | seriously_guest quits (~seriously@2001:1c06:2715:c200:de2b:899c:1c2e:ded7) (Quit: Client closed) |
| 21:06:11 | <gqplox> | hello guys |
| 21:06:36 | <[exa]> | o/ |
| 21:06:57 | <gqplox> | im going through some exercises, i wrote this function http://sprunge.us/1JnI85 but it is a bit stupid to see the isfactor 2, 3, etc. |
| 21:07:20 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 21:07:33 | <gqplox> | http://sprunge.us/xIWuRw |
| 21:07:37 | <gqplox> | sorry here is all of it |
| 21:07:42 | <gqplox> | so i wanted to make it better using all |
| 21:07:55 | <gqplox> | but im confused how i can do that as I need two arguments for my isfactor function |
| 21:07:56 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 21:08:14 | <gqplox> | but i want to make it something like all isFactor n x [1..12 |
| 21:08:17 | <byorgey> | gqplox: do you know about lambdas? |
| 21:08:37 | × | chronon quits (~chronon@user/chronon) (Ping timeout: 252 seconds) |
| 21:09:08 | <gqplox> | yes i do |
| 21:09:21 | <[exa]> | :t all |
| 21:09:22 | <lambdabot> | Foldable t => (a -> Bool) -> t a -> Bool |
| 21:09:37 | <[exa]> | > all isEven [2,4,6] |
| 21:09:39 | <lambdabot> | error: |
| 21:09:39 | <lambdabot> | Variable not in scope: isEven :: a0 -> Bool |
| 21:09:46 | <byorgey> | gqplox: you're very much on the right track. You could just use a lambda to create a one-argument function that takes n as input and returns (isFactor n x) |
| 21:10:00 | <byorgey> | then that lambda can be the input to 'all' |
| 21:10:12 | → | chronon joins (~chronon@user/chronon) |
| 21:10:41 | <[exa]> | > all even [2,4,6] -- gqplox corrected example, sorry for the previous one |
| 21:10:42 | <lambdabot> | True |
| 21:11:52 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 21:13:40 | → | harsy joins (~harsy@2409:4072:6211:4f25::169f:60ad) |
| 21:14:45 | → | jtomas joins (~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) |
| 21:14:52 | <harsy> | for every cabal project haskell is downloaded again and again? |
| 21:15:16 | <sclv> | what? no |
| 21:16:19 | × | vglfr quits (~vglfr@145.224.100.22) (Ping timeout: 252 seconds) |
| 21:16:39 | <harsy> | okay thanks. i think its just checking all indexes |
| 21:16:48 | <gqplox> | ah thank you byorgey |
| 21:16:51 | <gqplox> | i have this now |
| 21:16:52 | <gqplox> | http://sprunge.us/cioZM9 |
| 21:17:36 | <gqplox> | so the x inside the lambda is being taken from outside of it? |
| 21:18:45 | <harsy> | i have small doubt. can we use hackage packages in stack project? |
| 21:19:05 | → | oo_miguel[m] joins (~oomiguelm@2001:470:69fc:105::1:5ab0) |
| 21:19:16 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds) |
| 21:19:47 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 276 seconds) |
| 21:19:55 | <[exa]> | harsy: https://github.com/commercialhaskell/stack/issues/2122 might be relevant |
| 21:20:26 | <harsy> | thank you i will look into it. |
| 21:20:33 | <ski> | all (`isFactor` x) [1 .. 12] -- gqplox |
| 21:21:03 | <ski> | x `isFactor` y = y `mod` x == 0 -- is also possible |
| 21:21:43 | <ski> | gqplox : yes, `x' was a nonlocal variable in the lambda abstraction |
| 21:21:54 | <gqplox> | ah nice |
| 21:22:16 | <gqplox> | so thats quite useful then i guess |
| 21:22:21 | × | harsy quits (~harsy@2409:4072:6211:4f25::169f:60ad) (Quit: Client closed) |
| 21:22:44 | <gqplox> | oh cool that's even better `isFactor` x thank you |
| 21:24:04 | <gqplox> | so how does that work? it just assumes because isFactor takes two that you will be supplied the first? |
| 21:24:05 | ski | would call it `divides', though |
| 21:24:13 | <gqplox> | oh yeah true |
| 21:24:22 | <ski> | d `divides` n = n `mod` d == 0 |
| 21:24:46 | × | nisstyre quits (~wes@user/nisstyre) (Ping timeout: 260 seconds) |
| 21:25:11 | <ski> | 0 `divides` n = n == 0 -- might want this special case, since `mod' (and `rem') doesn't like zero denominator/divisor, for silly reasons |
| 21:25:55 | <gqplox> | oh right thanks |
| 21:26:01 | <ski> | (doesn't really matter for `highlyDivisible', though) |
| 21:26:24 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 21:26:28 | <gqplox> | so in the all(`isFactor` x) the way you have left out the first argument, it is just implied? |
| 21:26:46 | × | Alex_test quits (~al_test@178.34.163.109) (Ping timeout: 252 seconds) |
| 21:26:54 | <ski> | it's called a section |
| 21:27:04 | → | Alex_test joins (~al_test@178.34.163.109) |
| 21:27:08 | <ski> | > map (^ 2) [0 .. 9] -- another example |
| 21:27:10 | <lambdabot> | [0,1,4,9,16,25,36,49,64,81] |
| 21:27:27 | <gqplox> | oh nice |
| 21:27:49 | <ski> | `(^ 2)' means `\x -> x ^ 2'. `(2 ^)' means `\y -> 2 ^ y' (or `(^) 2' ..) |
| 21:28:03 | <ski> | ditto for the nonsymbolic infix operators, using the backticks |
| 21:28:32 | <gqplox> | very cool |
| 21:28:33 | <gqplox> | thanks |
| 21:28:50 | <gqplox> | really is very concise |
| 21:29:21 | → | nineonine joins (~nineonine@2604:3d08:7780:cd00:a9d4:e2db:2f89:8800) |
| 21:29:30 | → | abhiroop_ joins (~abhiroop@217-209-157-8-no2000.tbcn.telia.com) |
| 21:29:37 | <Athas> | Like 80% of Haskell's greatness over other functional languages comes from such small syntactic niceties. |
| 21:29:57 | → | sadmax` joins (~user@209.205.174.253) |
| 21:30:49 | × | sadmax` quits (~user@209.205.174.253) (Client Quit) |
| 21:31:00 | <[exa]> | ...such as monads |
| 21:32:54 | → | off^ joins (~off@76.145.185.103) |
| 21:34:01 | × | ystael quits (~ystael@user/ystael) (Quit: Lost terminal) |
| 21:34:53 | × | Xeroine quits (~Xeroine@user/xeroine) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
| 21:37:44 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 21:38:21 | × | abhiroop_ quits (~abhiroop@217-209-157-8-no2000.tbcn.telia.com) (Ping timeout: 272 seconds) |
| 21:39:03 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 21:40:04 | × | gqplox quits (~textual@147.188.245.207) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 21:40:35 | → | AlexNoo_ joins (~AlexNoo@178.34.163.109) |
| 21:44:03 | × | AlexNoo quits (~AlexNoo@178.34.163.109) (Ping timeout: 272 seconds) |
| 21:44:42 | → | gqplox joins (~textual@147.188.245.207) |
| 21:47:55 | × | michalz quits (~michalz@185.246.207.222) (Remote host closed the connection) |
| 21:48:13 | × | gentauro quits (~gentauro@user/gentauro) (Ping timeout: 252 seconds) |
| 21:48:26 | → | gentauro joins (~gentauro@user/gentauro) |
| 21:48:38 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 21:50:12 | × | talismanick quits (~talismani@96-67-197-217-static.hfc.comcastbusiness.net) (Ping timeout: 248 seconds) |
| 21:51:45 | → | madjestic joins (~madjestic@88-159-247-120.fixed.kpn.net) |
| 21:53:10 | × | freeside quits (~mengwong@bb115-66-48-84.singnet.com.sg) (Ping timeout: 252 seconds) |
| 21:54:02 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 21:54:49 | × | sadmax quits (~user@209.205.174.253) (Ping timeout: 272 seconds) |
| 21:55:24 | → | gmg joins (~user@user/gehmehgeh) |
| 21:59:51 | → | ystael joins (~ystael@user/ystael) |
| 22:03:50 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex) |
| 22:04:40 | → | catern joins (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407) |
| 22:05:15 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 22:06:32 | → | freeside joins (~mengwong@bb115-66-48-84.singnet.com.sg) |
| 22:09:07 | → | thegeekinside joins (~thegeekin@189.180.115.115) |
| 22:10:45 | → | enoq joins (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) |
| 22:11:05 | × | gqplox quits (~textual@147.188.245.207) (Quit: Textual IRC Client: www.textualapp.com) |
| 22:11:47 | × | tgi quits (~thegeekin@189.180.115.115) (Ping timeout: 276 seconds) |
| 22:16:35 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::4b68) |
| 22:17:34 | → | jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 22:19:16 | × | acidjnk quits (~acidjnk@p200300d6e7137a515579cbbbe79af53b.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 22:19:50 | → | tgi joins (~thegeekin@189.180.115.115) |
| 22:20:07 | × | jonathanx__ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 252 seconds) |
| 22:22:19 | × | thegeekinside quits (~thegeekin@189.180.115.115) (Ping timeout: 252 seconds) |
| 22:27:27 | × | caryhartline quits (~caryhartl@2603-8080-6a0e-8d88-01fd-d633-9a8e-c806.res6.spectrum.com) (Quit: caryhartline) |
| 22:29:45 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 22:35:57 | → | Topsi joins (~Topsi@ipb218f69e.dynamic.kabel-deutschland.de) |
| 22:37:20 | × | king_gs quits (~Thunderbi@2806:103e:29:47b9:f34b:ffff:4cfc:90a6) (Quit: king_gs) |
| 22:37:35 | → | king_gs joins (~Thunderbi@187.201.83.115) |
| 22:39:19 | × | enoq quits (~enoq@2a05:1141:1f5:5600:b9c9:721a:599:bfe7) (Quit: enoq) |
| 22:39:47 | × | elevenkb quits (~elevenkb@105.184.125.168) (Ping timeout: 272 seconds) |
| 22:39:58 | × | rond_ quits (~rond_@87.74.205.31) (Quit: Client closed) |
| 22:42:06 | × | redmp quits (~redmp@lib-02-subnet-194.rdns.cenic.net) (Ping timeout: 255 seconds) |
| 22:46:00 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 22:52:51 | × | mncheckm quits (~mncheck@193.224.205.254) (Ping timeout: 268 seconds) |
| 22:54:21 | × | madjestic quits (~madjestic@88-159-247-120.fixed.kpn.net) (Remote host closed the connection) |
| 22:55:23 | <Axman6> | anyone know of any parser combinator libraries that let you use regular expressions as part of the parser? |
| 22:57:18 | × | Topsi quits (~Topsi@ipb218f69e.dynamic.kabel-deutschland.de) (Quit: Leaving.) |
| 23:00:01 | <geekosaur> | no parser combinator library that I know of… but perhaps this would be a good use case for alex+happy? |
| 23:00:52 | → | jlgw_ joins (~jw@83-233-104-81.cust.bredband2.com) |
| 23:01:22 | × | jlgw quits (~jw@83-233-104-81.cust.bredband2.com) (Ping timeout: 252 seconds) |
| 23:02:09 | <geekosaur> | also, uh, which variety of regular expression? |
| 23:04:08 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 23:06:52 | ski | . o O ( "Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby, ...)" by Russ Cox in 2007-01 at <https://swtch.com/~rsc/regexp/regexp1.html> ) |
| 23:07:03 | <Axman6> | not sure - i feel it shouldnt be too hard to write a small library that adds attoparsec combinators to parse a given expression 'here'. I'm reading https://keleshev.com/compiling-to-assembly-from-scratch/ and its combination of parser combinators and regular expressions is quite nice |
| 23:07:17 | → | nate3 joins (~nate@98.45.169.16) |
| 23:07:25 | × | jtomas quits (~jtomas@191.red-88-17-199.dynamicip.rima-tde.net) (Ping timeout: 252 seconds) |
| 23:08:00 | <Axman6> | one thing though would be that the regex would need to be resumable, if it hasn't succeeded or failed yet, but we run out of input |
| 23:08:40 | <geekosaur> | it has occurred to me that pretty much any use of regex can be "compiled" to any parser combinator. and if you compile it to attoparsec it should be resumable |
| 23:10:02 | <Axman6> | also, on a completely unrelated note, iGot this iPad Pro recently, and having the Blink app with mosh so I can rejoin IRC from anywhere, is fantastic |
| 23:11:06 | <Axman6> | yeah thats an interesting idea - would the performance be comparable though? I guess all the tricks to make regex parsing linear would also apply to how you'd compile it too |
| 23:12:20 | × | nate3 quits (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
| 23:13:18 | <geekosaur> | I expect it'd be similar performance, but admit to optimizations that might well make it noticeably faster than most regexes can get |
| 23:13:31 | × | absence quits (torgeihe@hildring.pvv.ntnu.no) (Ping timeout: 246 seconds) |
| 23:13:51 | × | teddyc quits (theodorc@cassarossa.samfundet.no) (Ping timeout: 260 seconds) |
| 23:19:27 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 255 seconds) |
| 23:20:33 | → | dcoutts joins (~duncan@host86-171-59-120.range86-171.btcentralplus.com) |
| 23:22:16 | × | dcoutts_ quits (~duncan@host86-163-164-210.range86-163.btcentralplus.com) (Ping timeout: 246 seconds) |
| 23:25:24 | → | dcoutts_ joins (~duncan@86.150.41.170) |
| 23:27:27 | <AndreasK> | I remember hearing a talk about staging a regex compiler which then was a lot faster. But I don't remember where it was |
| 23:27:37 | → | AlexNoo__ joins (~AlexNoo@178.34.163.109) |
| 23:27:46 | × | dcoutts quits (~duncan@host86-171-59-120.range86-171.btcentralplus.com) (Ping timeout: 252 seconds) |
| 23:27:53 | <Axman6> | I'd love to see that if you fi9nd it |
| 23:28:34 | <AndreasK> | https://icfp22.sigplan.org/home/haskellsymp-2022# it was at icfp |
| 23:28:49 | <AndreasK> | https://icfp22.sigplan.org/details/haskellsymp-2022/2/Staging-Regular-Expressions-with-Moore-Cayley-Fusion |
| 23:29:04 | <Axman6> | A few months ago I ported this to our Daml codebase, because we needed a better implementation of regexes, and it happened to be for validating regular expressions defined in XML Schema: https://wiki.haskell.org/Regular_expressions_for_XML_Schema |
| 23:29:11 | geekosaur | completely fails to be surprised |
| 23:29:14 | <AndreasK> | https://www.youtube.com/watch?v=6oTJbtH0PeI |
| 23:29:24 | <AndreasK> | The talk is on youtube it seems |
| 23:30:23 | <Axman6> | You're a champ AndreasK |
| 23:30:31 | × | Alex_test quits (~al_test@178.34.163.109) (Ping timeout: 252 seconds) |
| 23:31:04 | × | AlexNoo_ quits (~AlexNoo@178.34.163.109) (Ping timeout: 252 seconds) |
| 23:33:55 | → | redmp joins (~redmp@mobile-166-170-43-0.mycingular.net) |
| 23:36:01 | → | Alex_test joins (~al_test@178.34.163.109) |
| 23:36:07 | → | dyniec joins (~dyniec@mail.dybiec.info) |
| 23:37:16 | <monochrom> | No, translating regexes to most parser combinator libraries is an uphill battle, because most parser combinator libraries kill the very nondeterminism that regexes stand for. This is right at the API level. |
| 23:38:03 | ski | . o O ( "IrRegex : IrRegular Expressions" at <http://synthcode.com/scheme/irregex/>,"irregex - Portable Efficient IrRegular Expressions" at <https://github.com/ashinn/irregex/>, by foof ) |
| 23:38:04 | <monochrom> | For example, (00)* 0 (000)* is not going to be simply many "00" >> char "0" >> many "000". |
| 23:39:31 | <monochrom> | Unless you go way back to the very original papers that use String -> [(a, String)] so full nondeterminism is restored. |
| 23:39:52 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) |
| 23:39:52 | <monochrom> | (which kills efficiency, which is why everyone ditched it) |
| 23:43:07 | pyrex | is now known as coolbat666 |
| 23:43:30 | <ski> | <https://hackage.haskell.org/package/base-4.17.0.0/docs/Text-ParserCombinators-ReadP.html> |
| 23:43:37 | <ski> | @hackage parsek |
| 23:43:37 | <lambdabot> | https://hackage.haskell.org/package/parsek |
| 23:44:06 | <monochrom> | Yeah, or a few nondet parser libraries like ReadP. |
| 23:44:12 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:b8c3:aabe:4f47:1efb) (Ping timeout: 255 seconds) |
| 23:44:25 | coolbat666 | is now known as pyrex |
| 23:49:33 | → | dcoutts joins (~duncan@host81-156-211-164.range81-156.btcentralplus.com) |
| 23:51:41 | → | teddyc joins (theodorc@cassarossa.samfundet.no) |
| 23:51:58 | × | dcoutts_ quits (~duncan@86.150.41.170) (Ping timeout: 252 seconds) |
| 23:51:58 | × | gentauro quits (~gentauro@user/gentauro) (Ping timeout: 252 seconds) |
| 23:52:05 | → | abhiroop_ joins (~abhiroop@217-209-157-8-no2000.tbcn.telia.com) |
| 23:52:55 | → | dcoutts_ joins (~duncan@host81-156-211-164.range81-156.btcentralplus.com) |
| 23:53:37 | → | gentauro joins (~gentauro@user/gentauro) |
| 23:54:43 | × | dcoutts quits (~duncan@host81-156-211-164.range81-156.btcentralplus.com) (Ping timeout: 252 seconds) |
| 23:58:43 | → | dcoutts joins (~duncan@host81-156-211-164.range81-156.btcentralplus.com) |
| 23:59:58 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
All times are in UTC on 2022-11-03.