Logs on 2021-03-31 (freenode/#haskell)
| 00:00:01 | → | Alleria joins (~textual@2603-7000-3040-0000-1143-d148-dab6-7a8a.res6.spectrum.com) |
| 00:00:06 | × | ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 240 seconds) |
| 00:00:24 | Alleria | is now known as Guest90356 |
| 00:01:33 | × | ephemient quits (uid407513@gateway/web/irccloud.com/x-abcfjjixtrhtzzix) (Quit: Connection closed for inactivity) |
| 00:04:17 | × | Guest90356 quits (~textual@2603-7000-3040-0000-1143-d148-dab6-7a8a.res6.spectrum.com) (Ping timeout: 250 seconds) |
| 00:05:43 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 00:10:31 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
| 00:11:31 | infinisi1 | is now known as infinisil |
| 00:12:42 | × | gitgood quits (~gitgood@80-44-12-39.dynamic.dsl.as9105.com) (Ping timeout: 246 seconds) |
| 00:12:45 | × | xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Ping timeout: 240 seconds) |
| 00:12:49 | → | DataComputist joins (~lumeng@50.43.26.251) |
| 00:12:55 | → | xelxebar_ joins (~xelxebar@gateway/tor-sasl/xelxebar) |
| 00:15:33 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
| 00:15:43 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 00:15:48 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 00:15:52 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 00:16:50 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 00:20:44 | × | bodisiw quits (~bodiskw@cpe-74-138-114-237.kya.res.rr.com) (Quit: Leaving) |
| 00:21:25 | × | eldritch quits (~eldritch@unaffiliated/eldritch) (Read error: Connection reset by peer) |
| 00:21:56 | → | unyu joins (~pyon@unaffiliated/pyon) |
| 00:25:44 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood) |
| 00:26:31 | <koz_> | I have some trouble understanding the second and third case of this: https://hackage.haskell.org/package/extra-1.7.9/docs/src/Data.List.Extra.html#split |
| 00:26:37 | × | Yumasi quits (~guillaume@2a01:e0a:5cb:4430:6c9e:d835:53cb:dfd2) (Quit: WeeChat 2.8) |
| 00:26:48 | <koz_> | What is this actually saying? |
| 00:26:59 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 00:27:11 | × | jpp_ quits (~jpp@47-220-44-237.htvlcmtk02.res.dyn.suddenlink.net) (Remote host closed the connection) |
| 00:29:06 | → | Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 00:31:52 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 00:32:06 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 00:32:25 | <infinisil> | koz_: These lines are using pattern guards |
| 00:32:34 | × | Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Client Quit) |
| 00:32:37 | <int-e> | the second one is just a boolean guard |
| 00:32:37 | → | lordyod joins (~lordyod@c-67-169-144-132.hsd1.ca.comcast.net) |
| 00:32:50 | <koz_> | What about the third? |
| 00:33:06 | <monochrom> | if split f xs matches the pattern y:ys |
| 00:33:15 | <koz_> | And what happens if not? |
| 00:33:32 | <int-e> | koz_: then it falls through, but it cannot happen |
| 00:33:40 | <int-e> | since split never returns an empty list |
| 00:33:52 | <koz_> | GHC doesn't believe me though. |
| 00:34:07 | <koz_> | I tried reimplementing this using constructs I understand, and GHC says I have an incomplete match. |
| 00:34:09 | <int-e> | sure, that's not surprising. it's still true |
| 00:34:53 | <monochrom> | Right, this is an external reasoning based on the base case producing a non-empty list so the recursion produces a non-empty list by induction. |
| 00:35:26 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
| 00:35:32 | <koz_> | So the honest type of split would be (a -> Bool) -> [a] -> NonEmpty [a] or so? |
| 00:35:50 | <infinisil> | Yeah I think so |
| 00:36:03 | <monochrom> | -fno-warn-obviously-total-functions |
| 00:36:11 | × | usr25 quits (~usr25@unaffiliated/usr25) (Quit: Leaving) |
| 00:36:13 | <infinisil> | > words "" |
| 00:36:14 | <lambdabot> | [] |
| 00:36:21 | <infinisil> | The words function unfortunately doesn't work like that |
| 00:36:42 | <koz_> | monochrom: Is that you being sarcastic or is that an actual option? :P |
| 00:36:49 | <monochrom> | joke |
| 00:37:00 | <koz_> | I figured, but had to be sure. |
| 00:37:11 | × | Guest55480 quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 268 seconds) |
| 00:37:14 | <monochrom> | And satire on warnings of all sorts of non-problems |
| 00:37:58 | <int-e> | Hmm not sure I'd call that unfortunate. `word` is lossy, but it's a feature. |
| 00:38:03 | <infinisil> | koz_: I'd add a final pattern match returning `error "Can't happen"` |
| 00:38:03 | <monochrom> | Seriously IMO a warning on "do { foo; bar ; zed }" is ridiculous. |
| 00:38:23 | <infinisil> | monochrom: What's the warning/ |
| 00:38:25 | <koz_> | infinisil: Lol, fair. |
| 00:38:25 | <infinisil> | ? |
| 00:38:26 | <monochrom> | i.e., a warning on using "foo" instead of "pat <- foo" |
| 00:38:55 | <infinisil> | monochrom: Doesn't it only do that if pattern wouldn't be ()? |
| 00:38:55 | <monochrom> | I forgot the exact option name because good riddance. |
| 00:39:13 | <monochrom> | Oh here is what I think is hypocritic about that. |
| 00:39:39 | × | geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 268 seconds) |
| 00:39:42 | <monochrom> | Suppose I have "data U = U". So it's should be of the same status as (), right? RIGHT? |
| 00:40:08 | <monochrom> | So if foo :: IO U, I'm warned; if foo :: IO (), I'm not warned. |
| 00:40:13 | <monochrom> | WHAT KIND OF LOGIC IS THAT |
| 00:40:29 | <monochrom> | Answer: Hypocrisy. |
| 00:41:37 | <int-e> | thought shalt have no other unit type before () |
| 00:41:45 | <int-e> | thou |
| 00:41:48 | <monochrom> | OK, this and other warnings are not in the default. They are "merely" in -Wall. |
| 00:41:51 | <int-e> | stupid auto-correcting fingers |
| 00:42:05 | <infinisil> | -Wall -Werror all the way |
| 00:42:10 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 00:42:33 | → | Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 00:42:53 | <infinisil> | I haven't tried out -Weverything but now I want to |
| 00:42:59 | <monochrom> | So over the years I gathered that -Wall is full of these useless warnings. Or worse, halfly full of these useless warnings and so the value of -Wall is devalued. |
| 00:43:21 | <monochrom> | This phenomenon is well-known as the cry-wolf fable. |
| 00:43:45 | <infinisil> | I'm so far quite pleased by -Wall |
| 00:44:00 | <monochrom> | It means that if -Wall cries wolf false alarm too many times, when one day it actually finds a real issue, you won't notice. |
| 00:44:48 | <infinisil> | Honestly, I can't really relate |
| 00:44:57 | <infinisil> | Maybe I'm not doing fancy enough things to trigger the false alarms |
| 00:45:01 | <int-e> | monochrom: so to make warnings useful, you fix all the warnings that you don't disable, even if it makes the code less readable :-/ |
| 00:45:13 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 00:45:17 | → | enya[m] joins (enyaismatr@gateway/shell/matrix.org/x-wlpxchczeengvguo) |
| 00:46:11 | × | andi- quits (~andi-@NixOS/user/andi-) (Ping timeout: 248 seconds) |
| 00:51:25 | → | obfusk joins (~quassel@a82-161-150-56.adsl.xs4all.nl) |
| 00:51:36 | <int-e> | infinisil: well that split code is an example of code that is correct, but in order to squelch the warning you either need to change the type (inducing conversions between NonEmpty [a] and [a] down the line) or add a useless line of code like | [] <- split f xs = error "impossible case" |
| 00:52:03 | <int-e> | infinisil: and I don't think that particular code is fancy at all. |
| 00:52:11 | <monochrom> | In the split case, NonEmpty is the way to go. |
| 00:52:43 | <infinisil> | Hmm, though I'm with the compiler there. There's no way for it to infer that the function can't return an empty list |
| 00:52:49 | <int-e> | I can't bring myself to like NonEmpty. |
| 00:53:07 | <int-e> | infinisil: oh sure, I don't expect it to figure that one out either |
| 00:53:40 | <monochrom> | In the absence of NonEmpty, I wouldn't mind adding a final clause "= error "should not happen"" either. At least it benefits human readers. |
| 00:53:45 | <int-e> | and the particular warning... missing cases... tends to be useful, so I might actually add the useless case instead. |
| 00:54:48 | <koz_> | I agree with the useless case. |
| 00:54:59 | <koz_> | I'd rather not disable such a useful warning for a whole module cause of one function. |
| 00:56:37 | → | gnumonic joins (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net) |
| 00:57:17 | <monochrom> | But I would do it for human readers, not for -Wall |
| 00:58:19 | × | carlomagno quits (~cararell@148.87.23.5) (Quit: Leaving.) |
| 01:00:04 | × | obfusk quits (~quassel@a82-161-150-56.adsl.xs4all.nl) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 01:00:53 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 01:01:54 | → | andi- joins (~andi-@NixOS/user/andi-) |
| 01:03:01 | → | conal joins (~conal@64.71.133.70) |
| 01:05:39 | → | eldritch joins (~eldritch@unaffiliated/eldritch) |
| 01:06:02 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 01:06:38 | <DigitalKiwi> | but would you do it for -Werror? |
| 01:07:23 | <monochrom> | No |
| 01:07:40 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:8050:1fea:250d:e11e) |
| 01:07:56 | <monochrom> | If Buddha is in my way, I kill Buddha. If -Werror is in my way, I kill -Werror. |
| 01:08:04 | <DigitalKiwi> | ;( |
| 01:08:52 | <monochrom> | But I would write a long comment to explain or remind the reader why there is a certain syntactic case doesn't need to be handled. |
| 01:09:12 | <DigitalKiwi> | in soviet russia Buddha/-Werror kill you |
| 01:09:52 | → | solvr joins (57e3c46d@87.227.196.109) |
| 01:09:53 | × | evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Read error: Connection reset by peer) |
| 01:10:06 | <monochrom> | And if I'm willing to write that long comment, adding a short '= error "doesn't happen"' is no big deal. I can do that for the reader. |
| 01:10:10 | × | Tario quits (~Tario@201.192.165.173) (Remote host closed the connection) |
| 01:10:44 | × | whataday quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:11:51 | → | whataday joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:12:06 | → | evanjs joins (~evanjs@075-129-098-007.res.spectrum.com) |
| 01:12:36 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:14ea:f44:a077:bc09) |
| 01:15:46 | × | Erutuon_ quits (~Erutuon@97-116-27-119.mpls.qwest.net) (Ping timeout: 240 seconds) |
| 01:17:54 | → | Erutuon_ joins (~Erutuon@97-116-27-119.mpls.qwest.net) |
| 01:21:01 | → | carlomagno joins (~cararell@148.87.23.6) |
| 01:21:20 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving) |
| 01:29:39 | → | ddellacosta joins (~ddellacos@86.106.143.144) |
| 01:30:55 | → | Tario joins (~Tario@201.192.165.173) |
| 01:37:12 | → | Guest41032 joins (~laudiacay@67.176.215.84) |
| 01:37:54 | × | ddellacosta quits (~ddellacos@86.106.143.144) (Remote host closed the connection) |
| 01:38:04 | → | ddellacosta joins (~ddellacos@86.106.143.144) |
| 01:38:41 | × | ddellacosta quits (~ddellacos@86.106.143.144) (Remote host closed the connection) |
| 01:39:10 | → | ddellacosta joins (~ddellacos@86.106.143.144) |
| 01:39:29 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 268 seconds) |
| 01:41:26 | × | Guest41032 quits (~laudiacay@67.176.215.84) (Ping timeout: 240 seconds) |
| 01:43:39 | <styledash> | l |
| 01:43:47 | × | ddellacosta quits (~ddellacos@86.106.143.144) (Ping timeout: 268 seconds) |
| 01:47:26 | Guest54397 | is now known as shapr |
| 01:47:38 | × | shapr quits (~shapr@162.243.9.169) (Changing host) |
| 01:47:38 | → | shapr joins (~shapr@haskell/developer/shapr) |
| 01:49:40 | × | lewky quits (~lewky@159.65.37.240) (Ping timeout: 252 seconds) |
| 01:51:11 | → | elliott_ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) |
| 01:52:01 | → | stree joins (~stree@68.36.8.116) |
| 01:57:01 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 01:57:05 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 260 seconds) |
| 01:58:28 | → | Tario joins (~Tario@201.192.165.173) |
| 02:00:59 | × | xff0x quits (~xff0x@2001:1a81:52a1:b000:b050:426f:481c:717d) (Ping timeout: 252 seconds) |
| 02:01:08 | → | rajivr joins (uid269651@gateway/web/irccloud.com/x-vhalmegvcwkpzygm) |
| 02:01:45 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 02:02:06 | × | RusAlex quits (~Chel@unaffiliated/rusalex) (Ping timeout: 240 seconds) |
| 02:02:33 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 02:02:55 | → | xff0x joins (~xff0x@2001:1a81:52d9:7900:960c:6609:3a45:b460) |
| 02:04:38 | → | FinnElija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) |
| 02:04:38 | finn_elija | is now known as Guest1130 |
| 02:04:38 | FinnElija | is now known as finn_elija |
| 02:05:13 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-jjboehqzacazreox) (Quit: Connection closed for inactivity) |
| 02:06:11 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 02:07:57 | × | Guest1130 quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Ping timeout: 240 seconds) |
| 02:08:37 | × | urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna) |
| 02:10:17 | → | Vadrigar_ joins (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) |
| 02:10:46 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 02:10:51 | × | viluon quits (uid453725@gateway/web/irccloud.com/x-fqedziywpebcqkui) (Quit: Connection closed for inactivity) |
| 02:13:34 | → | Guest41032 joins (~laudiacay@67.176.215.84) |
| 02:14:58 | × | haritz quits (~hrtz@unaffiliated/haritz) (Quit: ZNC 1.7.2+deb3 - https://znc.in) |
| 02:15:21 | × | Vadrigar_ quits (~Vadrigar@ip5b417208.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds) |
| 02:17:08 | → | drakonis joins (~drakonis@unaffiliated/drakonis) |
| 02:17:49 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 02:18:20 | × | Guest41032 quits (~laudiacay@67.176.215.84) (Ping timeout: 268 seconds) |
| 02:20:40 | × | carlomagno quits (~cararell@148.87.23.6) (Remote host closed the connection) |
| 02:20:46 | → | drbean_ joins (~drbean@TC210-63-209-55.static.apol.com.tw) |
| 02:21:00 | × | Aquazi quits (uid312403@gateway/web/irccloud.com/x-uawxrfrpxwexcklr) (Quit: Connection closed for inactivity) |
| 02:22:38 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 268 seconds) |
| 02:24:00 | → | conal joins (~conal@64.71.133.70) |
| 02:24:04 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 02:27:02 | → | ezrakilty joins (~ezrakilty@97-113-35-199.tukw.qwest.net) |
| 02:27:23 | × | average quits (uid473595@gateway/web/irccloud.com/x-mdzvkbciicshchec) (Quit: Connection closed for inactivity) |
| 02:30:50 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 02:33:21 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 02:33:53 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 02:34:33 | → | conal joins (~conal@64.71.133.70) |
| 02:38:04 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 252 seconds) |
| 02:42:17 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) (Quit: WeeChat 3.0.1) |
| 02:44:49 | × | ezrakilty quits (~ezrakilty@97-113-35-199.tukw.qwest.net) (Remote host closed the connection) |
| 02:45:32 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 02:45:34 | → | shad0w_ joins (a0ca25aa@160.202.37.170) |
| 02:50:07 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 258 seconds) |
| 02:50:21 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 260 seconds) |
| 02:51:22 | → | ddellacosta joins (~ddellacos@86.106.143.66) |
| 02:55:28 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:14ea:f44:a077:bc09) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:56:02 | × | ddellacosta quits (~ddellacos@86.106.143.66) (Ping timeout: 252 seconds) |
| 02:56:49 | → | lewky joins (~lewky@159.65.37.240) |
| 02:57:00 | → | DTZUZU_ joins (~DTZUZO@207.81.119.43) |
| 02:57:05 | → | RusAlex joins (~Chel@unaffiliated/rusalex) |
| 02:58:59 | × | DTZUZU quits (~DTZUZO@205.ip-149-56-132.net) (Ping timeout: 246 seconds) |
| 03:02:29 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:04:08 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 03:16:46 | × | motherfsck quits (~motherfsc@unaffiliated/motherfsck) (Ping timeout: 240 seconds) |
| 03:17:58 | × | drbean_ quits (~drbean@TC210-63-209-55.static.apol.com.tw) (Ping timeout: 240 seconds) |
| 03:22:32 | → | pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 03:23:02 | → | motherfsck joins (~motherfsc@unaffiliated/motherfsck) |
| 03:23:07 | → | matryoshka` joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 03:24:06 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Read error: Connection reset by peer) |
| 03:25:21 | × | dpl quits (~dpl@77.121.78.163) (Ping timeout: 260 seconds) |
| 03:31:03 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 03:32:09 | → | ddellaco_ joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 03:33:01 | → | poljar1 joins (~poljar@93-139-86-101.adsl.net.t-com.hr) |
| 03:35:33 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds) |
| 03:36:02 | × | poljar quits (~poljar@93-143-162-187.adsl.net.t-com.hr) (Ping timeout: 268 seconds) |
| 03:36:20 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
| 03:36:24 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 03:36:26 | × | ddellaco_ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
| 03:36:38 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 03:39:35 | × | matryoshka` quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
| 03:44:58 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 03:45:26 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection) |
| 03:46:16 | × | _xor quits (~xor@74.215.46.133) (Quit: WeeChat 3.1) |
| 03:56:50 | → | raym joins (~ray@115.187.32.14) |
| 03:59:29 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 03:59:40 | → | _xor joins (~xor@74.215.46.133) |
| 04:00:19 | → | Alleria joins (~textual@2603-7000-3040-0000-1143-d148-dab6-7a8a.res6.spectrum.com) |
| 04:00:41 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 268 seconds) |
| 04:00:42 | Alleria | is now known as Guest30185 |
| 04:01:23 | → | borne joins (~fritjof@200116b864cfc800f7ed9fd86a2491f0.dip.versatel-1u1.de) |
| 04:01:41 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Quit: Lost terminal) |
| 04:01:55 | × | electricityZZZZ quits (~electrici@135-180-3-82.static.sonic.net) (Ping timeout: 268 seconds) |
| 04:03:07 | → | Kaeipi joins (~Kaiepi@47.54.252.148) |
| 04:03:09 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
| 04:03:38 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 04:04:31 | × | Guest30185 quits (~textual@2603-7000-3040-0000-1143-d148-dab6-7a8a.res6.spectrum.com) (Ping timeout: 245 seconds) |
| 04:07:01 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 04:08:14 | → | Rudd0 joins (~Rudd0@185.189.115.103) |
| 04:08:47 | → | Guest41032 joins (~laudiacay@67.176.215.84) |
| 04:12:01 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 04:12:25 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 268 seconds) |
| 04:13:07 | → | stree joins (~stree@68.36.8.116) |
| 04:13:53 | × | borne quits (~fritjof@200116b864cfc800f7ed9fd86a2491f0.dip.versatel-1u1.de) (Ping timeout: 250 seconds) |
| 04:15:00 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 04:15:33 | → | borne joins (~fritjof@200116b86411e500998fce1c43ef4e0a.dip.versatel-1u1.de) |
| 04:16:26 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
| 04:20:25 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
| 04:20:49 | → | Nobita joins (ca0e7816@202.14.120.22) |
| 04:21:19 | × | Nobita quits (ca0e7816@202.14.120.22) (Client Quit) |
| 04:23:38 | × | deviantfero quits (~deviantfe@190.150.27.58) (Ping timeout: 260 seconds) |
| 04:24:02 | <edwardk> | these linear logic proofs are making me go cross-eyed |
| 04:24:58 | <edwardk> | https://github.com/ekmett/linear-logic/blob/main/src/Linear/Logic/Functor.hs#L1270 |
| 04:27:38 | × | alx741 quits (~alx741@181.196.68.106) (Quit: alx741) |
| 04:30:24 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 04:30:30 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:cdc8:88ee:4ef9:ae5c) |
| 04:33:27 | → | JanBessa1 joins (~JanB@85-22-26-176.ip.dokom21.de) |
| 04:33:37 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 04:35:27 | <glguy> | edwardk, how much of that is blindly following the types, and how much is creative? |
| 04:35:51 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 268 seconds) |
| 04:37:06 | × | JanBessai quits (~JanB@85-22-13-230.ip.dokom21.de) (Ping timeout: 260 seconds) |
| 04:37:30 | <edwardk> | it actually gets difficult at times, but a lot os blind type following |
| 04:37:38 | <edwardk> | a little tactic engine would knock these out fast |
| 04:38:02 | <nshepperd2> | is this coq but in haskell |
| 04:40:06 | <edwardk> | nshepperd2: in https://github.com/ekmett/linear-logic/blob/main/src/Linear/Logic/Internal.hs#L54 i define a 'full' intuitionistic linear logic suite using the limited linear haskell a %1 -> b arrow as half of my arrow, and by attaching involutively the notion of what evidence it takes to refute a given proof. |
| 04:40:31 | <edwardk> | then once i have that, and build with and par, which are the missing connectives, its off to the races. |
| 04:41:05 | <edwardk> | then i wanted a place to put all my boilerplate proofs, so i started adding bifunctors, monoidal category structure, etc. |
| 04:41:30 | <edwardk> | but once i had that it was somewhat disappointing that the proofs couldn't flow back into the arguments for bimap, etc. |
| 04:41:45 | <edwardk> | because they were external to the logic program itself. |
| 04:41:53 | <edwardk> | but i was able to internalize them too |
| 04:42:10 | × | evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Read error: Connection reset by peer) |
| 04:43:09 | <edwardk> | glguy: as for hard parts, i'd say it takes a good deal of creativity to figure out how to plumb apartness information around when you get more complicated proofs involving isos |
| 04:43:25 | <edwardk> | using holes is critical to getting anything done |
| 04:43:48 | <edwardk> | lenses/traversals are coming soon |
| 04:43:50 | <edwardk> | =) |
| 04:43:56 | → | evanjs joins (~evanjs@075-129-098-007.res.spectrum.com) |
| 04:44:24 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 04:46:04 | × | Wuzzy quits (~Wuzzy@p57a2fb8a.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 04:46:47 | <edwardk> | the type of https://github.com/ekmett/linear-logic/blob/main/src/Linear/Logic/Functor.hs#L853 was what fmap' used to be, but that top level arrow wasn't contradictable. |
| 04:47:50 | → | acidjnk_new joins (~acidjnk@p200300d0c72b9549c1d5f2f7c60f6477.dip0.t-ipconnect.de) |
| 04:48:38 | <edwardk> | glguy: i was particularly proud of figuring out a way to overload lollipops to work with actual function application, while still letting me work backwards through the refutations because refutations for lollipops and haskell functions are isomorphic, and the ones for unrestricted haskell functions can also fit in |
| 04:48:51 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 246 seconds) |
| 04:51:11 | → | egorbelibov joins (55f7af94@bl14-175-148.dsl.telepac.pt) |
| 04:51:31 | × | JanBessa1 quits (~JanB@85-22-26-176.ip.dokom21.de) (Quit: leaving) |
| 04:51:56 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:8050:1fea:250d:e11e) (Remote host closed the connection) |
| 04:52:37 | ← | egorbelibov parts (55f7af94@bl14-175-148.dsl.telepac.pt) () |
| 04:53:03 | × | elliott_ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 246 seconds) |
| 04:53:50 | × | raym quits (~ray@115.187.32.14) (Quit: leaving) |
| 04:54:40 | × | solvr quits (57e3c46d@87.227.196.109) (Quit: Connection closed) |
| 04:55:29 | × | acidjnk_new quits (~acidjnk@p200300d0c72b9549c1d5f2f7c60f6477.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 04:56:52 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 05:02:27 | → | ezrakilty joins (~ezrakilty@97-113-35-199.tukw.qwest.net) |
| 05:04:58 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 05:07:20 | × | Z3ph0d quits (~peter@061092022201.ctinets.com) (Quit: Leaving) |
| 05:10:24 | × | pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Quit: gone to sleep. ZZZzzz…) |
| 05:10:55 | → | mawk joins (mawk@serveur.io) |
| 05:15:07 | × | evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Read error: Connection reset by peer) |
| 05:15:42 | × | conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer) |
| 05:17:02 | → | evanjs joins (~evanjs@075-129-098-007.res.spectrum.com) |
| 05:19:41 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 05:20:46 | × | borne quits (~fritjof@200116b86411e500998fce1c43ef4e0a.dip.versatel-1u1.de) (Ping timeout: 245 seconds) |
| 05:20:46 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 258 seconds) |
| 05:20:52 | → | berberman_ joins (~berberman@unaffiliated/berberman) |
| 05:21:23 | → | conal joins (~conal@64.71.133.70) |
| 05:22:22 | × | evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 05:23:34 | → | evanjs joins (~evanjs@075-129-098-007.res.spectrum.com) |
| 05:24:00 | → | ddellacosta joins (~ddellacos@86.106.143.118) |
| 05:24:02 | → | Lowl3v3l joins (~Lowl3v3l@dslb-002-207-103-026.002.207.pools.vodafone-ip.de) |
| 05:24:09 | × | Feuermagier_ quits (~CatWithMo@gateway/tor-sasl/catwithmoustache) (Quit: Leaving) |
| 05:24:25 | × | ezrakilty quits (~ezrakilty@97-113-35-199.tukw.qwest.net) (Remote host closed the connection) |
| 05:24:32 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 252 seconds) |
| 05:25:22 | → | CatWithMoustache joins (~CatWithMo@gateway/tor-sasl/catwithmoustache) |
| 05:28:34 | × | ddellacosta quits (~ddellacos@86.106.143.118) (Ping timeout: 252 seconds) |
| 05:33:06 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:35:30 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 260 seconds) |
| 05:36:38 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 05:37:23 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 05:38:21 | → | raym joins (~ray@115.187.32.14) |
| 05:38:21 | → | acidjnk_new joins (~acidjnk@p200300d0c72b9549c1d5f2f7c60f6477.dip0.t-ipconnect.de) |
| 05:40:37 | × | xff0x quits (~xff0x@2001:1a81:52d9:7900:960c:6609:3a45:b460) (Ping timeout: 276 seconds) |
| 05:41:08 | → | xff0x joins (~xff0x@2001:1a81:52d9:7900:6b0c:e3df:c0c:8727) |
| 05:45:00 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 05:47:31 | → | v01d4lph4 joins (~v01d4lph4@223.190.20.92) |
| 05:48:18 | × | v01d4lph4 quits (~v01d4lph4@223.190.20.92) (Remote host closed the connection) |
| 05:48:30 | → | v01d4lph4 joins (~v01d4lph4@223.190.20.92) |
| 05:49:29 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 05:57:40 | → | plutoniix joins (~q@184.82.196.30) |
| 05:57:51 | → | ddellacosta joins (~ddellacos@86.106.143.27) |
| 05:59:46 | × | Guest41032 quits (~laudiacay@67.176.215.84) (Ping timeout: 240 seconds) |
| 06:00:24 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 06:02:33 | × | ddellacosta quits (~ddellacos@86.106.143.27) (Ping timeout: 260 seconds) |
| 06:02:46 | × | Alleria_ quits (~AllahuAkb@2603-7000-3040-0000-f003-eca1-8bf8-0ed7.res6.spectrum.com) (Read error: Connection reset by peer) |
| 06:03:30 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 06:05:44 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 06:05:59 | <CatWithMoustache> | how do I use an element twice in a list comprehension? |
| 06:06:09 | <CatWithMoustache> | so x : x : xs |
| 06:06:46 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 06:06:52 | → | Alleria_ joins (~AllahuAkb@2603-7000-3040-0000-501f-0d46-1115-b500.res6.spectrum.com) |
| 06:07:23 | → | malumore joins (~malumore@151.62.117.70) |
| 06:07:54 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 06:09:30 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 06:09:37 | <edwardk> | CatWithMoustache: not sure what you are asking. you want a pattern or a comprehension that returns one or what? |
| 06:10:31 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 06:10:38 | <edwardk> | > let foo (x:y:zs) | x == y = "hit" | otherwise = "miss" in foo "oooh" |
| 06:10:41 | <lambdabot> | "hit" |
| 06:11:07 | <edwardk> | there's no syntax for a literal match with a previous variable per se. though you can use view patterns to fake it |
| 06:12:38 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 06:12:42 | <edwardk> | > let foo (x:((==) x -> True):zs) = "hit"; foo (x:y:zs) = "miss" in foo "oooh" |
| 06:12:44 | <lambdabot> | "hit" |
| 06:12:45 | × | CatWithMoustache quits (~CatWithMo@gateway/tor-sasl/catwithmoustache) (Ping timeout: 240 seconds) |
| 06:12:59 | <edwardk> | but for actual comprehensions you can use filter equations |
| 06:13:08 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 06:13:57 | <edwardk> | > [ (x,y) | x <- [1..3], y <- [1..3] , x < y ] |
| 06:13:59 | <lambdabot> | [(1,2),(1,3),(2,3)] |
| 06:14:29 | <edwardk> | replacing < with == there might be what you asked for. but its hard to parse your meaning from that one line |
| 06:14:59 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 06:15:05 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 06:15:28 | → | Guest41032 joins (~laudiacay@67.176.215.84) |
| 06:15:39 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 06:17:33 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 06:18:29 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 06:18:52 | → | CatWithMoustache joins (~CatWithMo@gateway/tor-sasl/catwithmoustache) |
| 06:20:21 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 06:20:22 | × | unyu quits (~pyon@unaffiliated/pyon) (Quit: brb) |
| 06:20:29 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 06:20:50 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 06:20:59 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:21:00 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 252 seconds) |
| 06:23:22 | × | malumore quits (~malumore@151.62.117.70) (Remote host closed the connection) |
| 06:24:45 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
| 06:25:21 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 06:28:01 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 06:30:46 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 06:31:44 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 06:32:06 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 240 seconds) |
| 06:32:40 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 06:32:53 | → | unyu joins (~pyon@unaffiliated/pyon) |
| 06:33:43 | → | stree joins (~stree@68.36.8.116) |
| 06:34:12 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 246 seconds) |
| 06:36:03 | <Axman6> | CatWithMoustache: can you elaborate on what you want? we haven't been able to make sense of your question |
| 06:36:06 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 06:37:46 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 06:37:57 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 268 seconds) |
| 06:39:05 | → | Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362) |
| 06:40:34 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 06:40:54 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 06:41:05 | ← | jakalx parts (~jakalx@base.jakalx.net) ("Error from remote client") |
| 06:43:36 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 06:44:38 | × | quinn quits (~quinn@c-73-223-224-163.hsd1.ca.comcast.net) (Quit: ZNC 1.8.1 - https://znc.in) |
| 06:45:30 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 260 seconds) |
| 06:48:10 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:cdc8:88ee:4ef9:ae5c) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 06:49:32 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 06:49:56 | → | quinn joins (~quinn@c-73-223-224-163.hsd1.ca.comcast.net) |
| 06:51:08 | <xsperry> | CatWithMoustache, something like this? |
| 06:51:08 | <xsperry> | > [x : x : [] | x <- [1,2,3]] |
| 06:51:10 | <lambdabot> | [[1,1],[2,2],[3,3]] |
| 06:51:20 | <CatWithMoustache> | Axman6, I have a list comprehension, [x, x * 34 | x <- xs ] where I want to put x twice |
| 06:51:38 | <CatWithMoustache> | flattened, so just an int list |
| 06:52:11 | <Axman6> | > let xs = [1, 10, 100] in [ y | x <- xs, y <- [x, x*34]] |
| 06:52:13 | <lambdabot> | [1,34,10,340,100,3400] |
| 06:53:20 | <xsperry> | > concat [[x, x * 34] | x <- [1,2,3] ] |
| 06:53:21 | <lambdabot> | [1,34,2,68,3,102] |
| 06:53:31 | × | Jd007 quits (~Jd007@162.156.11.151) (Quit: Jd007) |
| 06:55:36 | <xsperry> | > concatMap (\x -> [x, x*34]) [1,2,3] |
| 06:55:38 | <lambdabot> | [1,34,2,68,3,102] |
| 06:56:15 | → | Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas) |
| 06:56:21 | × | andreas31 quits (~andreas@gateway/tor-sasl/andreas303) (Ping timeout: 240 seconds) |
| 06:56:46 | <Axman6> | so many different but requivalent implementations, it's almost like there's some pattern here... |
| 06:57:15 | <Axman6> | > [1,10,100] >>= \x -> [x, x*34] |
| 06:57:16 | → | Tario joins (~Tario@201.192.165.173) |
| 06:57:16 | <lambdabot> | [1,34,10,340,100,3400] |
| 06:57:36 | → | coot joins (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl) |
| 06:58:45 | <[exa]> | > (*) <$> [1,10,100] <*> [1,34] |
| 06:58:48 | <lambdabot> | [1,34,10,340,100,3400] |
| 07:00:20 | × | pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!) |
| 07:00:26 | → | Franciman joins (~francesco@host-79-53-62-46.retail.telecomitalia.it) |
| 07:01:50 | → | rmk236 joins (~lcampos@ip-37-201-211-26.hsi13.unitymediagroup.de) |
| 07:02:40 | × | Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer) |
| 07:06:11 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:b177:1e40:d97b:578c) |
| 07:07:12 | × | raym quits (~ray@115.187.32.14) (Read error: Connection reset by peer) |
| 07:08:02 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 07:08:31 | × | unyu quits (~pyon@unaffiliated/pyon) (Quit: brb) |
| 07:08:55 | <gnumonic> | I'm writing lenses for kind-indexed GADTs w/ singletons. It doesn't violate any lens laws if I write "conditional" lenses with setters that just return the original object if some dependently typed predicate fails to obtain, right? |
| 07:09:35 | × | rmk236 quits (~lcampos@ip-37-201-211-26.hsi13.unitymediagroup.de) (Ping timeout: 246 seconds) |
| 07:09:40 | → | raym joins (~ray@115.187.32.14) |
| 07:09:56 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 246 seconds) |
| 07:10:34 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 07:10:49 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:b177:1e40:d97b:578c) (Ping timeout: 252 seconds) |
| 07:10:49 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 07:10:53 | <edwardk> | gnumonic: it does. |
| 07:11:13 | <edwardk> | the 'you get what you set' law is the one being violated here |
| 07:11:55 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 07:12:03 | <edwardk> | now you can still use the library, and still compose these with other lenses that also violate this law and all that is lost is that you can sometimes see the fact that the lens library fuses everything into one pass over your structure, so the operations aren't necessarily canonical aside from they are the 'most fused' version. |
| 07:12:57 | → | rmk236 joins (~lcampos@2a02:908:3616:b100:e41f:37c6:378f:6062) |
| 07:13:00 | <edwardk> | gnumonic: lenses are deliberately very dumb things. |
| 07:13:24 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 07:14:58 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
| 07:16:05 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 07:16:39 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 07:16:55 | <gnumonic> | Hm. Would it work if I wrote the lenses over some wrapper type that hides the kind index? So if I did something like :: forall a. Lens' (IndexedType 'KindIndex) SomeComponent where SomeComponent is a wrapper over Component 'ComponentKindIndex? Then I think I'd actually be getting out what I put in |
| 07:17:29 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 245 seconds) |
| 07:18:01 | <edwardk> | not sure, it at least sounds plausible. |
| 07:18:39 | × | mawk quits (mawk@serveur.io) (Ping timeout: 268 seconds) |
| 07:20:58 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 260 seconds) |
| 07:21:46 | <CatWithMoustache> | Axman6, can i do something similar to that with a map? |
| 07:22:00 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 07:23:34 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 07:25:48 | → | dpl joins (~dpl@77.121.78.163) |
| 07:26:13 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 07:26:29 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 07:30:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:30:25 | → | kadoban_ joins (~mud@unaffiliated/kadoban) |
| 07:30:40 | × | kadoban__ quits (~mud@unaffiliated/kadoban) (Ping timeout: 252 seconds) |
| 07:30:42 | <gnumonic> | Thanks btw edwardk. I'm trying to figure out if I can prove that the existential wrapper thing works, but it's good to know that even if it doesn't I can still use them and nothing will explode :) |
| 07:31:02 | × | tessier quits (~treed@kernel-panic/copilotco) (Ping timeout: 265 seconds) |
| 07:35:01 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 07:35:45 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 07:36:59 | → | mawk joins (mawk@serveur.io) |
| 07:39:35 | → | tessier joins (~treed@98.171.210.130) |
| 07:39:35 | × | tessier quits (~treed@98.171.210.130) (Changing host) |
| 07:39:35 | → | tessier joins (~treed@kernel-panic/copilotco) |
| 07:39:38 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 240 seconds) |
| 07:39:53 | × | Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Remote host closed the connection) |
| 07:40:18 | → | Aquazi joins (uid312403@gateway/web/irccloud.com/x-afninwolvrucszhg) |
| 07:42:43 | <gnumonic> | Actually while I'm thinking about lenses, I wrote a function that "lifts" traversals over a (particular) kind-indexed GADT to operate over the GADT's existential wrapper. https://gist.github.com/gnumonik/a321defc6ba0af9035653f5ac3693c24 Is that like... an ok thing to do? (I just started using the not-just-record-accessors parts of lens recently) |
| 07:43:56 | → | Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck) |
| 07:46:06 | × | Guest41032 quits (~laudiacay@67.176.215.84) (Ping timeout: 240 seconds) |
| 07:46:44 | → | maroloccio joins (~marolocci@pousada3ja.mma.com.br) |
| 07:46:53 | → | kritzefitz joins (~kritzefit@fw-front.credativ.com) |
| 07:48:13 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 07:48:26 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 07:49:48 | × | hiroaki quits (~hiroaki@2a02:8108:8c40:2bb8:3745:335c:aec7:833d) (Ping timeout: 246 seconds) |
| 07:49:57 | → | borne joins (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de) |
| 07:51:41 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 07:52:40 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 07:52:57 | → | LKoen joins (~LKoen@65.250.88.92.rev.sfr.net) |
| 07:52:57 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 246 seconds) |
| 07:53:02 | → | gitgood joins (~gitgood@80-44-12-39.dynamic.dsl.as9105.com) |
| 07:53:08 | × | gitgood quits (~gitgood@80-44-12-39.dynamic.dsl.as9105.com) (Remote host closed the connection) |
| 07:53:11 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 07:53:20 | → | Sorny joins (~Sornaensi@79.142.232.102.static.router4.bolignet.dk) |
| 07:53:55 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 07:56:26 | × | Sorna quits (~Sornaensi@077213203030.dynamic.telenor.dk) (Ping timeout: 260 seconds) |
| 07:57:25 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 07:58:26 | → | gorbelibove joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 07:59:04 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 07:59:04 | × | gorbelibove quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 07:59:29 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 08:01:35 | → | hiroaki joins (~hiroaki@2a02:8108:8c40:2bb8:1351:13b7:f6af:b97a) |
| 08:01:51 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 08:02:06 | × | evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Read error: Connection reset by peer) |
| 08:02:12 | × | kirb1 quits (~kirb@178.239.168.171) (Remote host closed the connection) |
| 08:02:56 | → | Guest41032 joins (~laudiacay@67.176.215.84) |
| 08:03:28 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 08:03:51 | → | jacob11 joins (~jacob1@185.163.110.108) |
| 08:03:54 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 08:04:13 | → | Wizek joins (uid191769@gateway/web/irccloud.com/x-auesgaiuendcjtgu) |
| 08:05:00 | → | thc202 joins (~thc202@unaffiliated/thc202) |
| 08:05:20 | → | evanjs joins (~evanjs@075-129-098-007.res.spectrum.com) |
| 08:05:48 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 08:06:11 | → | Guest55480 joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) |
| 08:07:21 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 08:08:12 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 08:09:00 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 08:09:11 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 08:09:40 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 08:11:35 | → | xourt joins (d4c620ea@212-198-32-234.rev.numericable.fr) |
| 08:14:06 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
| 08:14:33 | → | gorbelibove joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 08:14:47 | × | gorbelibove quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 08:14:47 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 08:15:37 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 08:17:26 | × | LiaoTao_ quits (~LiaoTao@gateway/tor-sasl/liaotao) (Remote host closed the connection) |
| 08:17:47 | → | LiaoTao joins (~LiaoTao@gateway/tor-sasl/liaotao) |
| 08:18:14 | × | CatWithMoustache quits (~CatWithMo@gateway/tor-sasl/catwithmoustache) (Quit: Leaving) |
| 08:19:48 | × | LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
| 08:21:10 | → | ddellacosta joins (~ddellacos@86.106.143.144) |
| 08:23:02 | × | shad0w_ quits (a0ca25aa@160.202.37.170) (Ping timeout: 240 seconds) |
| 08:25:32 | × | ddellacosta quits (~ddellacos@86.106.143.144) (Ping timeout: 246 seconds) |
| 08:26:06 | → | __minoru__shirae joins (~shiraeesh@109.166.57.161) |
| 08:26:33 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 08:27:15 | × | rmk236 quits (~lcampos@2a02:908:3616:b100:e41f:37c6:378f:6062) (Ping timeout: 246 seconds) |
| 08:30:31 | → | andreas303 joins (~andreas@gateway/tor-sasl/andreas303) |
| 08:32:15 | → | Sornaensis joins (~Sornaensi@077213203030.dynamic.telenor.dk) |
| 08:33:06 | × | Guest41032 quits (~laudiacay@67.176.215.84) (Ping timeout: 240 seconds) |
| 08:35:34 | × | Sorny quits (~Sornaensi@79.142.232.102.static.router4.bolignet.dk) (Ping timeout: 252 seconds) |
| 08:35:56 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 252 seconds) |
| 08:39:55 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 08:42:06 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds) |
| 08:47:20 | → | tionos joins (~tionos@185.173.235.27) |
| 08:48:23 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 08:50:52 | → | Sorna joins (~Sornaensi@79.142.232.102.static.router4.bolignet.dk) |
| 08:53:31 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 258 seconds) |
| 08:53:31 | × | Sornaensis quits (~Sornaensi@077213203030.dynamic.telenor.dk) (Ping timeout: 258 seconds) |
| 08:55:07 | → | stree joins (~stree@68.36.8.116) |
| 08:55:09 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 08:56:11 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 08:56:16 | → | idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 09:00:10 | × | invent[m] quits (inventmatr@gateway/shell/matrix.org/x-szzijrqsdjgoiqjh) (Quit: Idle for 30+ days) |
| 09:00:30 | → | ddellacosta joins (~ddellacos@86.106.143.79) |
| 09:00:56 | → | fendor joins (~fendor@178.165.130.8.wireless.dyn.drei.com) |
| 09:01:03 | → | LKoen joins (~LKoen@65.250.88.92.rev.sfr.net) |
| 09:02:19 | × | petersen quits (~petersen@redhat/juhp) (Quit: petersen) |
| 09:03:02 | → | petersen joins (~petersen@redhat/juhp) |
| 09:05:16 | × | ddellacosta quits (~ddellacos@86.106.143.79) (Ping timeout: 252 seconds) |
| 09:13:08 | × | astroanax quits (astroanax@gateway/shell/ircnow/x-himxsnhawzzdfgwb) (Quit: quit) |
| 09:15:01 | → | michalz joins (~user@185.246.204.56) |
| 09:16:54 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 09:17:42 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 09:19:01 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 09:19:29 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 09:19:51 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 09:19:57 | Guest28699 | is now known as mstruebing |
| 09:20:02 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 09:22:36 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 268 seconds) |
| 09:26:56 | × | vgtw quits (~vgtw@gateway/tor-sasl/vgtw) (Remote host closed the connection) |
| 09:27:11 | → | vgtw joins (~vgtw@gateway/tor-sasl/vgtw) |
| 09:27:30 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 09:32:24 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 09:32:27 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 268 seconds) |
| 09:34:03 | → | yunusaydin joins (4eb8266d@78.184.38.109) |
| 09:37:12 | → | dpl_ joins (~dpl@77.121.78.163) |
| 09:37:13 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 258 seconds) |
| 09:37:59 | → | kuribas joins (~user@ptr-25vy0i8a26pq5ck0xjc.18120a2.ip6.access.telenet.be) |
| 09:39:08 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Ping timeout: 258 seconds) |
| 09:39:47 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 09:40:06 | × | dpl quits (~dpl@77.121.78.163) (Ping timeout: 240 seconds) |
| 09:40:07 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 09:40:51 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 09:41:12 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 09:42:45 | × | Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Ping timeout: 240 seconds) |
| 09:43:10 | → | ubert joins (~Thunderbi@p200300ecdf25d9fde6b318fffe838f33.dip0.t-ipconnect.de) |
| 09:43:10 | × | grumble quits (~Thunderbi@freenode/staff/grumble) (Quit: K-Lined) |
| 09:43:54 | × | NinjaTrappeur quits (~ninja@unaffiliated/ninjatrappeur) (Ping timeout: 246 seconds) |
| 09:45:29 | → | grumble joins (~Thunderbi@freenode/staff/grumble) |
| 09:45:33 | → | CaptainIRS joins (9d3386ab@157.51.134.171) |
| 09:45:38 | → | NinjaTrappeur joins (~ninja@unaffiliated/ninjatrappeur) |
| 09:48:40 | → | DavidEichmann joins (~david@47.27.93.209.dyn.plus.net) |
| 09:50:36 | → | neiluj joins (~jco@91-167-203-101.subs.proxad.net) |
| 09:50:36 | × | neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Changing host) |
| 09:50:36 | → | neiluj joins (~jco@unaffiliated/neiluj) |
| 09:51:32 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 09:55:28 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 09:57:07 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 09:57:26 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 09:59:05 | <CrabMan> | I am working on a project which uses stack. Thus, it has a stack.yaml file. I use ghc from nix-shell, thus I need to pass `--nix` to stack. I can either pass it as an argument or include it in stack.yaml. But stack.yaml is used by everyone on the team and thus it's bad to add `nix: enable: true` there. Is there some kind of local version of stack.yaml that's used only on my computer? |
| 10:01:48 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 10:02:06 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 252 seconds) |
| 10:03:53 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 10:04:36 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 10:04:58 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 10:06:06 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 10:07:38 | × | maroloccio quits (~marolocci@pousada3ja.mma.com.br) (Ping timeout: 240 seconds) |
| 10:08:04 | → | rond_ joins (594020a1@89-64-32-161.dynamic.chello.pl) |
| 10:09:09 | Xnuk- | is now known as Xnuk |
| 10:11:18 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 268 seconds) |
| 10:13:38 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 10:14:12 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 10:14:50 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:17:05 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Ping timeout: 258 seconds) |
| 10:19:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 10:20:00 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 10:20:39 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:22:04 | → | Guest41032 joins (~laudiacay@67.176.215.84) |
| 10:24:27 | → | gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 10:24:42 | × | xourt quits (d4c620ea@212-198-32-234.rev.numericable.fr) (Ping timeout: 240 seconds) |
| 10:24:50 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 10:26:06 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 10:26:43 | × | Guest41032 quits (~laudiacay@67.176.215.84) (Ping timeout: 268 seconds) |
| 10:26:44 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:26:52 | → | sQVe joins (~sQVe@unaffiliated/sqve) |
| 10:27:07 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 10:27:59 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 10:29:26 | × | Erutuon_ quits (~Erutuon@97-116-27-119.mpls.qwest.net) (Ping timeout: 260 seconds) |
| 10:30:13 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 10:30:48 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 10:31:13 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 10:31:53 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 10:32:15 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:33:41 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 10:36:22 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 10:36:39 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 10:37:25 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 10:37:34 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 10:37:38 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
| 10:37:39 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 10:38:03 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 10:38:11 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 10:38:23 | × | yunusaydin quits (4eb8266d@78.184.38.109) (Quit: Connection closed) |
| 10:38:43 | → | malumore joins (~malumore@151.62.117.70) |
| 10:39:11 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) |
| 10:40:43 | → | ph88 joins (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) |
| 10:40:49 | <ph88> | hi all |
| 10:41:02 | <ph88> | i have trouble to understand this compiler error https://bpa.st/X5DA could someone take a look ? |
| 10:41:02 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:211f:91f5:87eb:894) (Remote host closed the connection) |
| 10:41:58 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
| 10:42:45 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 10:42:50 | <tomsmeding> | ph88: what's the type of 'tryIOError'? |
| 10:43:46 | <tomsmeding> | ph88: oh right, perhaps you need to 'lift' the result of 'throwError' |
| 10:43:52 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:44:32 | <tomsmeding> | nah, that depends on the type of tryIOError |
| 10:45:38 | × | ph88 quits (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds) |
| 10:47:55 | → | ph88 joins (~ph88@2a02:8109:9e00:7e5c:80c0:e61:5729:782) |
| 10:48:04 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 10:49:05 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 10:49:18 | <ph88> | tomsmeding, hi, i got disconneted. saw you replied from the logs of this channel |
| 10:49:36 | <ph88> | tryIOError :: IO a -> IO (Either IOError a) |
| 10:49:47 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:49:53 | <tomsmeding> | how is tryIOError going to work in a non-IO monad then? it's only MonadIO, not real IO |
| 10:50:04 | <tomsmeding> | I admit the error is inscrutable though :p |
| 10:52:02 | <ph88> | https://bpa.st/26ZQ |
| 10:52:32 | <tomsmeding> | ph88: in general tryIOError can't work on arbitrary MonadIO monads, I believe; e.g. the unliftio version, https://hackage.haskell.org/package/unliftio-0.2.14/docs/UnliftIO-Exception.html#v:tryIO , requires MonadUnliftIO which doesn't allow state in the transformer stack: https://hackage.haskell.org/package/unliftio-core-0.2.0.1/docs/Control-Monad-IO-Unlift.html#t:MonadUnliftIO |
| 10:52:34 | <merijn> | tomsmeding: "liftIO . tryIOError"? :p |
| 10:53:10 | <merijn> | eh |
| 10:53:31 | <merijn> | ph88: That code example won't use MonadError |
| 10:53:36 | <tomsmeding> | merijn: 'action' is in MonadIO, not in IO :p |
| 10:53:45 | <merijn> | Or rather, it will |
| 10:54:18 | <tomsmeding> | ph88: I think you can only make it work if 'action' is not of type 'm a' but of 'IO a', or more generically MonadUnliftIO m => m a but that won't help you much |
| 10:54:21 | <merijn> | tomsmeding: I misunderstood what you mean |
| 10:54:24 | <merijn> | *meant |
| 10:54:41 | <merijn> | MonadUnliftIO is profoundly dangerous, tbh |
| 10:55:13 | <tomsmeding> | the documentation for MonadUnliftIO states you can only really use it with ReaderT and IdentityT, in which case I guess it's safe? |
| 10:55:16 | <tomsmeding> | haven't used it myself |
| 10:55:36 | <merijn> | tomsmeding: The problem isn't "what is MonadUnliftIO" *that* is fine |
| 10:55:48 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 258 seconds) |
| 10:56:07 | <merijn> | tomsmeding: THe problem is that it is tempting for people to use the unlift stuff to run stuff in other threads/async |
| 10:56:18 | <merijn> | But unliftIO doesn't handle that nicely at all |
| 10:56:45 | <merijn> | For example, ResourceT is MonadUnliftIO, but when you introduce threads that ruins everything |
| 10:57:17 | <tomsmeding> | so basically the problem is that people write instances of MonadUnliftIO that are thread-unsafe? |
| 10:58:22 | <merijn> | Basically, the problem is that everyone who is not me or approved by me should be banned from writing concurrent code and threads >.< |
| 10:58:42 | <tomsmeding> | 🤔 |
| 10:59:25 | → | ephemient joins (uid407513@gateway/web/irccloud.com/x-kreuktrxowjvrjcm) |
| 10:59:51 | × | LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
| 11:00:06 | → | Alleria joins (~textual@2603-7000-3040-0000-1143-d148-dab6-7a8a.res6.spectrum.com) |
| 11:00:30 | Alleria | is now known as Guest22240 |
| 11:00:46 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 260 seconds) |
| 11:01:14 | <merijn> | tomsmeding: https://github.com/snoyberg/conduit/issues/425 |
| 11:02:09 | <merijn> | tomsmeding: A lot of the FPComplete ecosystem of "safe by default" libraries leave a considerable of undocumented uncertain pitfalls, tbh |
| 11:02:58 | → | peanut_ joins (~peanut_@2a02:8388:a101:2600:1fde:3e3:f7a:66f2) |
| 11:02:58 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds) |
| 11:03:51 | <ph88> | tomsmeding, thanks for your help. Your comment here was correct: I think you can only make it work if 'action' is not of type 'm a' but of 'IO a' |
| 11:04:03 | <tomsmeding> | merijn: hah! interesting |
| 11:04:15 | tomsmeding | has to go for a while |
| 11:04:32 | × | sQVe quits (~sQVe@unaffiliated/sqve) (Quit: Bye!) |
| 11:04:58 | × | Guest22240 quits (~textual@2603-7000-3040-0000-1143-d148-dab6-7a8a.res6.spectrum.com) (Ping timeout: 276 seconds) |
| 11:05:31 | → | SaitamaPlus joins (uid272474@gateway/web/irccloud.com/x-fidhhtxlftktthli) |
| 11:06:57 | × | nf quits (~n@monade.li) (Quit: Fairfarren.) |
| 11:07:40 | → | nf joins (~n@monade.li) |
| 11:11:46 | × | lawid quits (~quassel@dslb-090-186-122-181.090.186.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
| 11:12:53 | → | lawid joins (~quassel@dslb-178-000-142-147.178.000.pools.vodafone-ip.de) |
| 11:13:25 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 11:14:26 | × | tefter quits (~bmaxa@62.240.24.69) (Ping timeout: 240 seconds) |
| 11:16:21 | → | stree joins (~stree@68.36.8.116) |
| 11:16:40 | → | tefter joins (~bmaxa@62.240.24.69) |
| 11:18:00 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds) |
| 11:18:02 | × | lawid quits (~quassel@dslb-178-000-142-147.178.000.pools.vodafone-ip.de) (Ping timeout: 260 seconds) |
| 11:19:31 | → | jamm__ joins (~jamm@unaffiliated/jamm) |
| 11:22:57 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 246 seconds) |
| 11:23:32 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 11:24:19 | → | mouseghost joins (~draco@87-206-9-185.dynamic.chello.pl) |
| 11:24:19 | × | mouseghost quits (~draco@87-206-9-185.dynamic.chello.pl) (Changing host) |
| 11:24:19 | → | mouseghost joins (~draco@wikipedia/desperek) |
| 11:26:37 | → | dpl__ joins (~dpl@77.121.78.163) |
| 11:28:25 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 11:29:22 | × | rond_ quits (594020a1@89-64-32-161.dynamic.chello.pl) (Ping timeout: 240 seconds) |
| 11:29:26 | × | dpl_ quits (~dpl@77.121.78.163) (Ping timeout: 240 seconds) |
| 11:29:29 | → | ph88^ joins (~ph88@ip5f5af71a.dynamic.kabel-deutschland.de) |
| 11:30:40 | → | lawid joins (~quassel@dslb-090-186-122-181.090.186.pools.vodafone-ip.de) |
| 11:31:51 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
| 11:33:06 | × | ph88 quits (~ph88@2a02:8109:9e00:7e5c:80c0:e61:5729:782) (Ping timeout: 246 seconds) |
| 11:33:36 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 260 seconds) |
| 11:33:43 | → | Alleria__ joins (~textual@mskresolve-a.mskcc.org) |
| 11:35:03 | → | lawid_ joins (~quassel@ipservice-092-219-052-236.092.219.pools.vodafone-ip.de) |
| 11:35:47 | × | lawid quits (~quassel@dslb-090-186-122-181.090.186.pools.vodafone-ip.de) (Ping timeout: 268 seconds) |
| 11:36:24 | <ph88^> | are debug builds slower than normal builds ? |
| 11:36:43 | → | o1lo01ol1o joins (~o1lo01ol1@bl7-88-181.dsl.telepac.pt) |
| 11:37:06 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 11:38:03 | → | LKoen joins (~LKoen@65.250.88.92.rev.sfr.net) |
| 11:38:22 | × | LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Remote host closed the connection) |
| 11:38:34 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 11:39:49 | <merijn> | ph88^: THe resulting code, you mean? |
| 11:40:19 | → | kafl joins (~kafl@unaffiliated/kafl) |
| 11:40:36 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 11:40:42 | <ph88^> | i mean the time waiting for GHC# |
| 11:41:00 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 11:41:58 | <merijn> | It should't? |
| 11:43:42 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 260 seconds) |
| 11:44:31 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 11:44:37 | <tomsmeding> | ph88^: what do you mean by "debug build"? non-optimising, or also profiling? |
| 11:45:01 | <ph88^> | non optimising and profiling |
| 11:45:06 | <tomsmeding> | non-optimising should always be faster than, or at least as fast as, optimising |
| 11:45:13 | <tomsmeding> | but profiling may take a little longer, don't know about that |
| 11:45:39 | <tomsmeding> | that adds instrumentation that inhibits optimisations that may make the compiler run faster |
| 11:45:40 | <ph88^> | by the way is there a way to get string/text overloading with a type ? just because i would like to put a top level signature |
| 11:45:53 | <tomsmeding> | ph88^: IsString s => ... s ... ? |
| 11:45:57 | <ph88^> | oki |
| 11:46:03 | <ph88^> | thank you |
| 11:46:11 | <tomsmeding> | that overloads with a lot more than just String/Text though |
| 11:48:28 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) |
| 11:49:32 | → | rmk236 joins (~lcampos@ip-37-201-211-26.hsi13.unitymediagroup.de) |
| 11:50:38 | × | tmciver quits (~tmciver@cpe-172-101-40-226.maine.res.rr.com) (Ping timeout: 246 seconds) |
| 11:50:43 | → | gorbelibove joins (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) |
| 11:50:45 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
| 11:52:45 | → | tmciver joins (~tmciver@cpe-172-101-40-226.maine.res.rr.com) |
| 11:53:33 | → | ddellacosta joins (~ddellacos@86.106.143.209) |
| 11:53:49 | × | plutoniix quits (~q@184.82.196.30) (Quit: Leaving) |
| 11:54:37 | → | orbeliboveg joins (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) |
| 11:55:01 | × | orbeliboveg quits (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) (Remote host closed the connection) |
| 11:55:01 | × | gorbelibove quits (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) (Remote host closed the connection) |
| 11:55:02 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) (Remote host closed the connection) |
| 11:56:20 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) |
| 11:57:10 | <ph88^> | can i throw my own IOError ? |
| 11:57:59 | × | __minoru__shirae quits (~shiraeesh@109.166.57.161) (Ping timeout: 246 seconds) |
| 11:58:20 | × | ddellacosta quits (~ddellacos@86.106.143.209) (Ping timeout: 252 seconds) |
| 11:59:22 | <ph88^> | hhm scrap that question :p |
| 12:00:13 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 12:01:41 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 268 seconds) |
| 12:02:53 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Ping timeout: 246 seconds) |
| 12:02:58 | × | rmk236 quits (~lcampos@ip-37-201-211-26.hsi13.unitymediagroup.de) (Ping timeout: 240 seconds) |
| 12:07:02 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 12:08:02 | → | rmk236 joins (~lcampos@2a02:908:3616:b100:96f1:d4a5:d139:4f48) |
| 12:09:46 | → | viluon joins (uid453725@gateway/web/irccloud.com/x-uyquvhnfkmiqllxw) |
| 12:10:32 | → | solvr joins (57e3c46d@87.227.196.109) |
| 12:11:25 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 12:12:02 | → | Yuu-chan joins (bcaa545d@188.170.84.93) |
| 12:13:03 | m1dnight_ | is now known as m1dnight__ |
| 12:13:11 | m1dnight__ | is now known as m1dnight_ |
| 12:13:17 | <Yuu-chan> | @djinn Alternative f => f (Maybe a) -> f a |
| 12:13:17 | <lambdabot> | Error: Class not found: Alternative |
| 12:13:51 | <Yuu-chan> | @djinn Control.Applicative.Alternative f => f (Maybe a) -> f a |
| 12:13:51 | <lambdabot> | Error: Class not found: Control.Applicative.Alternative |
| 12:14:50 | × | Benzi-Junior quits (~BenziJuni@88-149-67-143.du.xdsl.is) (Ping timeout: 252 seconds) |
| 12:15:00 | <geekosaur> | djinn is a bit out of date |
| 12:15:16 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 268 seconds) |
| 12:15:21 | <ski> | @type (maybe mempty return =<<) |
| 12:15:23 | <lambdabot> | (Monad m, Monoid (m b)) => m (Maybe b) -> m b |
| 12:15:34 | × | idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 252 seconds) |
| 12:15:42 | <ski> | @type (maybe mzero return =<<) -- er, rather |
| 12:15:43 | <lambdabot> | MonadPlus m => m (Maybe b) -> m b |
| 12:15:45 | × | ubert quits (~Thunderbi@p200300ecdf25d9fde6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 12:15:47 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:3823:8d85:637f:874d) |
| 12:16:01 | <Yuu-chan> | @type (maybe empty return =<<) |
| 12:16:02 | <lambdabot> | (Monad m, Alternative m) => m (Maybe b) -> m b |
| 12:16:24 | → | ubert joins (~Thunderbi@p200300ecdf25d9fde6b318fffe838f33.dip0.t-ipconnect.de) |
| 12:16:43 | × | rmk236 quits (~lcampos@2a02:908:3616:b100:96f1:d4a5:d139:4f48) (Quit: Leaving.) |
| 12:17:54 | → | gorbelibove joins (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) |
| 12:17:56 | <Yuu-chan> | ski thanks |
| 12:18:03 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) (Remote host closed the connection) |
| 12:18:03 | × | gorbelibove quits (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) (Remote host closed the connection) |
| 12:18:03 | → | Benzi-Junior joins (~BenziJuni@dsl-149-67-143.hive.is) |
| 12:18:28 | <ski> | it seems to me, with that problem formulation, you won't get around `Monad'. except for trivial solutions like `const empty' |
| 12:18:58 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) |
| 12:19:01 | <ski> | (`Maybe (f a) -> f a' would be another thing, of course) |
| 12:19:18 | × | AkechiShiro quits (~AkechiShi@2a01:e0a:5f9:9681:1473:3dff:fe42:56a9) (Quit: WeeChat 2.9) |
| 12:19:37 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) (Remote host closed the connection) |
| 12:19:56 | <Yuu-chan> | Monad constraint is fine |
| 12:19:57 | → | AkechiShiro joins (~AkechiShi@2a01:e0a:5f9:9681:1473:3dff:fe42:56a9) |
| 12:20:12 | <ski> | you want the effects that the output action performs to depend on the result produced by the input action. that's dynamic sequencing, iow monads |
| 12:20:36 | <Yuu-chan> | Yep, I understand now |
| 12:20:50 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) |
| 12:21:10 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) (Remote host closed the connection) |
| 12:21:50 | → | egorbelibov joins (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) |
| 12:22:02 | × | egorbelibov quits (~65676f72@2001:8a0:5708:2a00:bc7d:b8d3:66cd:f4d7) (Remote host closed the connection) |
| 12:24:37 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:3823:8d85:637f:874d) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 12:25:26 | × | jacob11 quits (~jacob1@185.163.110.108) (Remote host closed the connection) |
| 12:27:26 | × | gnumonic quits (~gnumonic@c-73-170-91-210.hsd1.ca.comcast.net) (Ping timeout: 240 seconds) |
| 12:28:13 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:3823:8d85:637f:874d) |
| 12:28:48 | → | ddellacosta joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 12:30:52 | × | Yuu-chan quits (bcaa545d@188.170.84.93) (Quit: Ping timeout (120 seconds)) |
| 12:31:58 | × | v01d4lph4 quits (~v01d4lph4@223.190.20.92) (Remote host closed the connection) |
| 12:31:59 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 12:32:19 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 12:33:38 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:3823:8d85:637f:874d) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 12:33:38 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds) |
| 12:33:57 | × | solvr quits (57e3c46d@87.227.196.109) (Quit: Connection closed) |
| 12:37:11 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
| 12:38:08 | → | solvr joins (57e3c46d@87.227.196.109) |
| 12:40:03 | → | LKoen joins (~LKoen@65.250.88.92.rev.sfr.net) |
| 12:41:24 | → | idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 12:42:42 | × | geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds) |
| 12:43:03 | × | AkechiShiro quits (~AkechiShi@2a01:e0a:5f9:9681:1473:3dff:fe42:56a9) (Quit: WeeChat 2.9) |
| 12:44:08 | → | dpl_ joins (~dpl@77.121.78.163) |
| 12:44:11 | × | dpl__ quits (~dpl@77.121.78.163) (Ping timeout: 260 seconds) |
| 12:44:32 | → | rmk236 joins (~lcampos@ip-37-201-211-26.hsi13.unitymediagroup.de) |
| 12:53:17 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 12:54:42 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 12:59:27 | <ph88^> | i am using vscode and haskell language server. I get a popup that GHC is not installed, but it is through stack. Anyone know how to make it work ? |
| 13:03:30 | → | ddellacosta joins (~ddellacos@86.106.143.157) |
| 13:03:46 | → | geowiesnot joins (~user@87-89-181-157.abo.bbox.fr) |
| 13:04:13 | <maerwald> | I thought the plugin installs GHC for you |
| 13:04:51 | → | dandart joins (~Thunderbi@home.dandart.co.uk) |
| 13:07:04 | × | acidjnk_new quits (~acidjnk@p200300d0c72b9549c1d5f2f7c60f6477.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
| 13:08:41 | × | ddellacosta quits (~ddellacos@86.106.143.157) (Ping timeout: 260 seconds) |
| 13:08:53 | → | alx741 joins (~alx741@181.196.69.168) |
| 13:09:52 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 13:10:06 | × | rmk236 quits (~lcampos@ip-37-201-211-26.hsi13.unitymediagroup.de) (Quit: Leaving.) |
| 13:10:20 | → | bitmagie joins (~Thunderbi@200116b806372b00585283af1f69c7fb.dip.versatel-1u1.de) |
| 13:10:35 | sajith_ | is now known as sajith |
| 13:11:09 | × | idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Remote host closed the connection) |
| 13:11:37 | → | idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 13:11:37 | → | ddellacosta joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 13:12:18 | <ph88^> | hhmm then something didnt go right there |
| 13:12:27 | → | Sorny joins (~Sornaensi@077213203030.dynamic.telenor.dk) |
| 13:15:04 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 268 seconds) |
| 13:16:34 | × | Sorna quits (~Sornaensi@79.142.232.102.static.router4.bolignet.dk) (Ping timeout: 260 seconds) |
| 13:17:01 | × | idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 260 seconds) |
| 13:17:03 | → | carlomagno joins (~cararell@148.87.23.10) |
| 13:17:16 | × | jamm__ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 13:17:25 | → | egwor joins (520bc907@cpc110777-lewi20-2-0-cust262.2-4.cable.virginm.net) |
| 13:20:57 | → | grrandi joins (mlp@kapsi.fi) |
| 13:21:08 | <egwor> | I'm trying to get to grips with cabal project layouts. Are there good example structures (along with the cabal project files) that are available to see? |
| 13:22:58 | <maerwald> | egwor: the cabal project |
| 13:24:40 | <merijn> | egwor: I mean, how much structure do you need? That mostly only becomes relevant when projects start hitting a certain size |
| 13:24:49 | <merijn> | Doesn't seem much point in worrying about it too early on... |
| 13:24:50 | → | idhugo joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 13:24:57 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 268 seconds) |
| 13:25:19 | <egwor> | I want to take some of my uni projects (very simple) and add tests/get them to build |
| 13:25:53 | <egwor> | What I'd quite like is a single project for an exercise/practical and then a library or executable for each part of the practical |
| 13:25:55 | <merijn> | egwor: I mean, the only extra structure you'd really need is "a test directory that has the tests"? :) |
| 13:26:43 | <merijn> | egwor: 1 directory per executable and then either the library in src or just in the root of the directory? |
| 13:29:53 | × | idhugo quits (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) (Ping timeout: 268 seconds) |
| 13:30:21 | <egwor> | I guess what I'm struggling with is that in app I have a Main.lhs. That refers to the Factor module, where I have my code. That sits inside src. To get that to compile, under the 'executable Factor' section I added a build-depends of Factor. |
| 13:30:50 | <egwor> | I was a bit surprised that I needed to add an explicit 'build-depends' dependency on the Factor module |
| 13:31:16 | <egwor> | so I assumed I'd some something wrong => hence the questions of whether there are some examples (with actual structure commited) |
| 13:31:30 | → | glaceon joins (~glaceon@117.222.65.198) |
| 13:32:05 | <merijn> | egwor: No, that's correct |
| 13:32:33 | <egwor> | ahh, ok, thanks! |
| 13:33:02 | <merijn> | egwor: The fact that your library and executable are in the same package doesn't (automatically) mean your executable uses/depends on that library |
| 13:33:19 | × | xff0x quits (~xff0x@2001:1a81:52d9:7900:6b0c:e3df:c0c:8727) (Ping timeout: 245 seconds) |
| 13:33:54 | <merijn> | egwor: A fact that seems strange in the current hackage version of "max 1 library per package", but cabal already supports multiple libraries per package (and hackage eventually will too), in which case not all executables necessarily depend on all libraries in the same package |
| 13:34:26 | → | xff0x joins (~xff0x@2001:1a81:52d9:7900:a1dd:11c7:dd0c:6878) |
| 13:34:29 | → | vchlup joins (~vchlup@nat.brnet.cz) |
| 13:34:35 | <egwor> | thanks, that's helpful. |
| 13:34:55 | <merijn> | explicit is better than implicit, and all that ;) |
| 13:34:58 | <egwor> | I appreciate that I'm doing some pretty basic stuff here, but that's sort of the point-- to figure this out:) |
| 13:35:03 | <egwor> | thanks :) |
| 13:37:08 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 13:37:28 | → | stree joins (~stree@68.36.8.116) |
| 13:37:29 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 3.1) |
| 13:38:46 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:7ca5:80cc:e540:ad18) |
| 13:38:57 | × | hexfive quits (~hexfive@50.35.83.177) (Quit: i must go. my people need me.) |
| 13:39:31 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 13:40:35 | → | acidjnk_new joins (~acidjnk@p200300d0c72b95496cfd1d07fe22841d.dip0.t-ipconnect.de) |
| 13:40:37 | → | ddellac__ joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 13:41:34 | → | deviantfero joins (~deviantfe@190.150.27.58) |
| 13:43:03 | ← | glaceon parts (~glaceon@117.222.65.198) () |
| 13:43:58 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 240 seconds) |
| 13:44:58 | × | ddellac__ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 240 seconds) |
| 13:45:29 | × | geekosaur quits (82650c7a@130.101.12.122) (Quit: Connection closed) |
| 13:45:39 | → | ep1ctetus joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 13:49:42 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 13:50:31 | × | coot quits (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 13:51:54 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 13:52:28 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 13:54:26 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 240 seconds) |
| 13:55:51 | × | xff0x quits (~xff0x@2001:1a81:52d9:7900:a1dd:11c7:dd0c:6878) (Ping timeout: 250 seconds) |
| 13:56:39 | → | xff0x joins (~xff0x@2001:1a81:52d9:7900:c563:7e1d:2a51:3033) |
| 13:56:44 | → | pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net) |
| 13:57:28 | × | solvr quits (57e3c46d@87.227.196.109) (Quit: Connection closed) |
| 13:57:35 | × | acidjnk_new quits (~acidjnk@p200300d0c72b95496cfd1d07fe22841d.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 13:58:54 | → | malumore_ joins (~malumore@151.62.117.70) |
| 14:01:06 | × | malumore quits (~malumore@151.62.117.70) (Ping timeout: 240 seconds) |
| 14:02:26 | × | egwor quits (520bc907@cpc110777-lewi20-2-0-cust262.2-4.cable.virginm.net) (Quit: Connection closed) |
| 14:05:02 | × | cheater quits (~user@unaffiliated/cheater) (Ping timeout: 246 seconds) |
| 14:06:59 | siers | is now known as ij |
| 14:07:39 | → | cheater joins (~user@unaffiliated/cheater) |
| 14:11:26 | × | dandart quits (~Thunderbi@home.dandart.co.uk) (Quit: dandart) |
| 14:14:01 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 14:14:21 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 14:18:10 | → | ddellac__ joins (ddellacost@gateway/vpn/mullvad/ddellacosta) |
| 14:18:15 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 14:18:23 | × | berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 250 seconds) |
| 14:18:45 | × | caubert_ quits (~caubert@136.244.111.235) (Quit: WeeChat 3.0) |
| 14:18:46 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 252 seconds) |
| 14:18:58 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 14:19:00 | → | caubert joins (~caubert@136.244.111.235) |
| 14:21:47 | × | Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Read error: Connection reset by peer) |
| 14:21:59 | → | Jd007 joins (~Jd007@162.156.11.151) |
| 14:22:31 | → | Guest41032 joins (~laudiacay@67.176.215.84) |
| 14:22:34 | × | motherfsck quits (~motherfsc@unaffiliated/motherfsck) (Remote host closed the connection) |
| 14:22:54 | × | ddellac__ quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 268 seconds) |
| 14:23:09 | × | ubert quits (~Thunderbi@p200300ecdf25d9fde6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 14:23:22 | → | hololeap joins (~hololeap@unaffiliated/hololeap) |
| 14:24:50 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 14:26:46 | × | Guest41032 quits (~laudiacay@67.176.215.84) (Ping timeout: 240 seconds) |
| 14:27:18 | → | maroloccio joins (~marolocci@pousada3ja.mma.com.br) |
| 14:30:50 | → | coot joins (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl) |
| 14:33:14 | → | fancyremarker joins (~fancyrema@185.169.233.10) |
| 14:33:29 | → | Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 14:34:19 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 14:34:26 | × | dpl_ quits (~dpl@77.121.78.163) (Ping timeout: 260 seconds) |
| 14:34:53 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) |
| 14:36:55 | × | raym quits (~ray@115.187.32.14) (Quit: leaving) |
| 14:36:55 | → | solvr joins (57e3c46d@87.227.196.109) |
| 14:39:14 | × | hololeap quits (~hololeap@unaffiliated/hololeap) (Remote host closed the connection) |
| 14:39:44 | → | hololeap joins (~hololeap@unaffiliated/hololeap) |
| 14:46:06 | × | maroloccio quits (~marolocci@pousada3ja.mma.com.br) (Ping timeout: 240 seconds) |
| 14:46:41 | × | evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Ping timeout: 260 seconds) |
| 14:49:33 | → | evanjs joins (~evanjs@075-129-098-007.res.spectrum.com) |
| 14:50:40 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 268 seconds) |
| 14:51:00 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 14:52:13 | → | enoq joins (~textual@194-208-146-143.lampert.tv) |
| 14:52:18 | → | maroloccio joins (~marolocci@pousada3ja.mma.com.br) |
| 14:53:54 | × | maroloccio quits (~marolocci@pousada3ja.mma.com.br) (Read error: Connection reset by peer) |
| 14:55:30 | → | kritzefitz_ joins (~kritzefit@212.86.56.80) |
| 14:55:46 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 14:56:24 | × | kritzefitz_ quits (~kritzefit@212.86.56.80) (Client Quit) |
| 14:57:11 | × | evanjs quits (~evanjs@075-129-098-007.res.spectrum.com) (Ping timeout: 260 seconds) |
| 14:57:24 | → | evanjs- joins (~evanjs@075-129-098-007.res.spectrum.com) |
| 15:01:49 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 15:02:20 | → | Eoco joins (~ian@x-160-94-179-157.acm.umn.edu) |
| 15:02:29 | → | kritzefitz_ joins (~kritzefit@212.86.56.80) |
| 15:03:36 | × | kritzefitz quits (~kritzefit@fw-front.credativ.com) (Ping timeout: 268 seconds) |
| 15:10:56 | → | bodisiw joins (~bodiskw@cpe-74-138-114-237.kya.res.rr.com) |
| 15:11:18 | × | bitmagie quits (~Thunderbi@200116b806372b00585283af1f69c7fb.dip.versatel-1u1.de) (Quit: bitmagie) |
| 15:14:51 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 15:16:30 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 15:18:00 | × | xff0x quits (~xff0x@2001:1a81:52d9:7900:c563:7e1d:2a51:3033) (Ping timeout: 258 seconds) |
| 15:18:42 | → | kiweun joins (~kiweun@2607:fea8:2a62:9600:f936:9f33:4140:eb88) |
| 15:18:55 | → | xff0x joins (~xff0x@2001:1a81:52d9:7900:4e7f:f403:b0b5:ef3) |
| 15:21:56 | → | wonko7 joins (~wonko7@62.115.229.50) |
| 15:22:05 | × | peanut_ quits (~peanut_@2a02:8388:a101:2600:1fde:3e3:f7a:66f2) (Quit: Leaving) |
| 15:24:26 | → | Tario joins (~Tario@201.192.165.173) |
| 15:26:14 | × | tilaiti_ quits (~tilaiti@static.144.156.216.95.clients.your-server.de) (Ping timeout: 246 seconds) |
| 15:26:24 | → | tilaiti joins (~tilaiti@static.144.156.216.95.clients.your-server.de) |
| 15:27:12 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 15:27:29 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 15:27:35 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 15:29:24 | → | dandart joins (~Thunderbi@home.dandart.co.uk) |
| 15:30:39 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 15:32:47 | × | CaptainIRS quits (9d3386ab@157.51.134.171) (Quit: Connection closed) |
| 15:33:39 | × | mjlbach quits (atriusmatr@gateway/shell/matrix.org/x-xpyboyzatqyxnpnd) (Ping timeout: 248 seconds) |
| 15:35:02 | → | mjlbach joins (atriusmatr@gateway/shell/matrix.org/x-ijeyeywqmxydamrw) |
| 15:37:32 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 15:40:37 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Ping timeout: 268 seconds) |
| 15:40:50 | → | __minoru__shirae joins (~shiraeesh@109.166.57.243) |
| 15:43:05 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 260 seconds) |
| 15:45:18 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 240 seconds) |
| 15:46:18 | → | mrlazos joins (~mrlazos@46-44-92.adsl.cyta.gr) |
| 15:47:55 | × | mrlazos quits (~mrlazos@46-44-92.adsl.cyta.gr) (Remote host closed the connection) |
| 15:48:00 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 15:48:30 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 15:48:31 | → | mrlazos joins (~mrlazos@46-44-92.adsl.cyta.gr) |
| 15:48:50 | × | mrlazos quits (~mrlazos@46-44-92.adsl.cyta.gr) (Client Quit) |
| 15:49:06 | → | mrlazos joins (~mrlazos@46-44-92.adsl.cyta.gr) |
| 15:49:09 | × | mrlazos quits (~mrlazos@46-44-92.adsl.cyta.gr) (Client Quit) |
| 15:49:21 | → | mrlazos joins (~mrlazos@46-44-92.adsl.cyta.gr) |
| 15:50:34 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 15:51:02 | × | deviantfero quits (~deviantfe@190.150.27.58) (Quit: WeeChat 3.1) |
| 15:51:11 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 15:51:20 | × | enoq quits (~textual@194-208-146-143.lampert.tv) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 15:52:49 | × | dandart quits (~Thunderbi@home.dandart.co.uk) (Remote host closed the connection) |
| 15:55:15 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 246 seconds) |
| 15:56:53 | → | solvr35 joins (57e3c46d@87.227.196.109) |
| 15:57:42 | × | solvr quits (57e3c46d@87.227.196.109) (Ping timeout: 240 seconds) |
| 15:58:09 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) (Remote host closed the connection) |
| 15:58:10 | → | masterplain joins (ce7fb161@ics177-97.icsincorporated.com) |
| 15:58:51 | → | stree joins (~stree@68.36.8.116) |
| 15:59:59 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) |
| 16:00:03 | × | joe[m]1 quits (joemonoida@gateway/shell/matrix.org/x-ddskqwzpoidneuno) (Quit: Idle for 30+ days) |
| 16:00:18 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 16:00:28 | → | electricityZZZZ joins (~electrici@135-180-3-82.static.sonic.net) |
| 16:00:49 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 16:01:00 | → | solvr joins (57e3c46d@87.227.196.109) |
| 16:01:56 | × | ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Ping timeout: 260 seconds) |
| 16:03:06 | × | malumore_ quits (~malumore@151.62.117.70) (Ping timeout: 240 seconds) |
| 16:03:10 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 16:04:02 | × | solvr35 quits (57e3c46d@87.227.196.109) (Ping timeout: 240 seconds) |
| 16:04:34 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) (Ping timeout: 245 seconds) |
| 16:04:45 | × | mouseghost quits (~draco@wikipedia/desperek) (Quit: mew wew) |
| 16:04:50 | → | ep1ctetus joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 16:05:54 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 268 seconds) |
| 16:05:55 | → | supercoven joins (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) |
| 16:07:51 | → | ezrakilty joins (~ezrakilty@97-126-86-140.tukw.qwest.net) |
| 16:15:43 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 16:17:26 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 16:18:25 | × | xff0x quits (~xff0x@2001:1a81:52d9:7900:4e7f:f403:b0b5:ef3) (Ping timeout: 250 seconds) |
| 16:19:10 | → | xff0x joins (~xff0x@2001:1a81:52d9:7900:15bf:3601:850c:fab3) |
| 16:20:10 | × | ezrakilty quits (~ezrakilty@97-126-86-140.tukw.qwest.net) (Remote host closed the connection) |
| 16:20:46 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 16:24:43 | → | malumore_ joins (~malumore@151.62.117.70) |
| 16:28:16 | → | fuzzy_id joins (~user@1.red-88-0-41.dynamicip.rima-tde.net) |
| 16:29:23 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) |
| 16:30:20 | <fuzzy_id> | What's the lens way to apply a getter to a Maybe? |
| 16:31:15 | <fuzzy_id> | i.e. an alternative for 'fmap (^. g) $ x ^. f' |
| 16:31:30 | <fuzzy_id> | where 'x ^. f' is of type Maybe a |
| 16:32:00 | <fuzzy_id> | I'm starring at prisms and my head is melting. :/ |
| 16:32:42 | <kuribas> | fuzzy_id: traverse? |
| 16:32:51 | → | Guest41032 joins (~laudiacay@67.176.215.84) |
| 16:33:49 | × | evanjs- quits (~evanjs@075-129-098-007.res.spectrum.com) (Quit: ZNC 1.8.2 - https://znc.in) |
| 16:33:50 | <kuribas> | > preview (_1 . traverse) (Just 3, "foo") |
| 16:33:52 | <lambdabot> | Just 3 |
| 16:34:00 | <kuribas> | or _Just |
| 16:34:05 | <kuribas> | > preview (_1 . _Just) (Just 3, "foo") |
| 16:34:07 | <lambdabot> | Just 3 |
| 16:34:11 | → | chele joins (~chele@ip5b40237d.dynamic.kabel-deutschland.de) |
| 16:34:37 | <kuribas> | > tolistOf (_1 . traverse) (Just 3, "foo") |
| 16:34:39 | <lambdabot> | error: |
| 16:34:39 | <lambdabot> | • Variable not in scope: |
| 16:34:39 | <lambdabot> | tolistOf |
| 16:35:18 | <kuribas> | > toListOf (_1 . traverse) (Just 3, "foo") |
| 16:35:20 | <lambdabot> | [3] |
| 16:35:31 | <kuribas> | > toListOf (_1 . _Just) (Nothing, "foo") |
| 16:35:32 | <lambdabot> | [] |
| 16:36:10 | → | evanjs joins (~evanjs@075-129-098-007.res.spectrum.com) |
| 16:36:52 | <raehik> | fuzzy_id: using view and (<$>) might make it look nicer? |
| 16:36:58 | × | Guest41032 quits (~laudiacay@67.176.215.84) (Ping timeout: 240 seconds) |
| 16:37:07 | <raehik> | > view _1 <$> (Just (1, 2)) |
| 16:37:09 | <lambdabot> | Just 1 |
| 16:37:26 | <raehik> | (apologies I don't do enough lenses to rewrite your example) |
| 16:38:07 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) (Ping timeout: 258 seconds) |
| 16:38:49 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 16:38:57 | → | Deide joins (~Deide@217.155.19.23) |
| 16:39:49 | <fuzzy_id> | raehik: Yeah, I guess I go with that. |
| 16:40:05 | <fuzzy_id> | kuribas: tbh I don't have any idea how to apply your suggestions. :P |
| 16:40:16 | <kuribas> | raehik: that only works if the Maybe is outer. |
| 16:40:43 | <raehik> | yes |
| 16:41:37 | × | solvr quits (57e3c46d@87.227.196.109) (Quit: Connection closed) |
| 16:41:37 | <kuribas> | raehik: give an example where you are failing? |
| 16:42:48 | <raehik> | kuribas: I think you meant to tag fuzzy_id! |
| 16:42:58 | <kuribas> | eh, right |
| 16:43:19 | → | pavonia joins (~user@unaffiliated/siracusa) |
| 16:44:13 | → | gaff joins (~user@49.207.224.136) |
| 16:44:20 | <kuribas> | fuzzy_id: traverse targets all elements of a Traversable. _Just targets a maybe value if it is a Just. |
| 16:44:27 | <kuribas> | fuzzy_id: which means the same thing in the end. |
| 16:44:42 | <gaff> | i have some code pasted at https://pastebin.com/mBevWnT4 |
| 16:44:57 | <kuribas> | fuzzy_id: also, since you may return no values, you need to use preview or toListOf. |
| 16:45:20 | <kuribas> | fuzzy_id: because view always returns a value, but that doesn't work when the Maybe is Nothing. |
| 16:45:50 | → | argento joins (~argent0@191.81.225.82) |
| 16:45:55 | → | average joins (uid473595@gateway/web/irccloud.com/x-ygfxxolhucppzalr) |
| 16:46:00 | <fuzzy_id> | Hmm. Let's see, I need something to fetch the 2 in 'x = (Just (1, 2), 3)' |
| 16:46:38 | <kuribas> | > preview (_Just . _2) (Just (1, 2), 3) |
| 16:46:40 | <lambdabot> | error: |
| 16:46:40 | <lambdabot> | • Couldn't match type ‘(Maybe (a0, b1), b2)’ with ‘Maybe b0’ |
| 16:46:40 | <lambdabot> | arising from a functional dependency between: |
| 16:46:50 | <kuribas> | > preview (_1 . _Just . _2) (Just (1, 2), 3) |
| 16:46:51 | <lambdabot> | Just 2 |
| 16:46:59 | <kuribas> | > view (_1 . _Just . _2) (Just (1, 2), 3) |
| 16:47:00 | <gaff> | basically, if the function is one module, the call works fine, but if the code is located in another module, it hangs. i am not sure why. |
| 16:47:01 | <lambdabot> | error: |
| 16:47:01 | <lambdabot> | • Ambiguous type variable ‘a0’ arising from a use of ‘show_M623296576548... |
| 16:47:01 | <lambdabot> | prevents the constraint ‘(Show a0)’ from being solved. |
| 16:47:13 | <kuribas> | > view (_1 . _Just . _2) (Just (1, 2), 3) :: Int |
| 16:47:15 | <lambdabot> | error: |
| 16:47:15 | <lambdabot> | • No instance for (Monoid Int) arising from a use of ‘_Just’ |
| 16:47:15 | <lambdabot> | • In the first argument of ‘(.)’, namely ‘_Just’ |
| 16:47:22 | × | masterplain quits (ce7fb161@ics177-97.icsincorporated.com) (Changing host) |
| 16:47:22 | → | masterplain joins (ce7fb161@unaffiliated/sayo-) |
| 16:47:41 | <kuribas> | fuzzy_id: so that fails, because view tries to collect all the results in a monoid, but the result isn't a monoid. |
| 16:48:08 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 246 seconds) |
| 16:48:37 | ← | masterplain parts (ce7fb161@unaffiliated/sayo-) () |
| 16:48:46 | <kuribas> | fuzzy_id: it's a detail which you may forget :) Just remember that view can only be used if you always return a value. |
| 16:48:53 | <gaff> | it is quite strange behaviour. |
| 16:49:33 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 16:50:37 | <fuzzy_id> | kuribas: ok. that clearifies things a bit. |
| 16:50:39 | <fuzzy_id> | I guess. |
| 16:51:29 | <kuribas> | fuzzy_id: preview return (Just x), where x is the first value, or Nothing, when there are no values. |
| 16:51:36 | × | chele quits (~chele@ip5b40237d.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 16:51:40 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:7ca5:80cc:e540:ad18) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 16:51:52 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 16:51:56 | <ski> | gaff : what if you change from using `i' in `Integral', to using `Integer' ? |
| 16:53:03 | <gaff> | well, i haven't tried that, but how would it affect which module the code lives? |
| 16:53:22 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 16:53:24 | <gaff> | also, for smaller inputs, things work just fine. |
| 16:53:43 | <geekosaur> | gaff, inlining will vary depending on where the code is |
| 16:53:57 | <geekosaur> | among other things |
| 16:54:05 | × | cheater quits (~user@unaffiliated/cheater) (Ping timeout: 246 seconds) |
| 16:54:07 | <geekosaur> | and specialisation |
| 16:54:12 | <gaff> | i see |
| 16:54:35 | <gaff> | that's a nasty surprise. |
| 16:54:39 | <ski> | gaff : it could possibly affect efficiency |
| 16:54:44 | → | cheater joins (~user@unaffiliated/cheater) |
| 16:54:54 | × | kuribas quits (~user@ptr-25vy0i8a26pq5ck0xjc.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 16:55:30 | <fuzzy_id> | kuribas: thanks a lot. I guess I just have to sit down and study lenses properly. |
| 16:55:32 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) |
| 16:55:32 | <ski> | in any case, using a constrained polymorphic `primes' like that is probably not that good, in the first place |
| 16:56:10 | <ski> | (i guess possibly it floats the instantiation out of the lambda) |
| 16:56:20 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 16:58:46 | × | conal quits (~conal@64.71.133.70) (Ping timeout: 240 seconds) |
| 16:59:59 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) (Ping timeout: 245 seconds) |
| 16:59:59 | <gaff> | ski: that works! i changed it to INT |
| 17:00:17 | → | conal joins (~conal@64.71.133.70) |
| 17:00:26 | <ski> | gaff : because, now `primes' is shared |
| 17:00:29 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 17:01:10 | <gaff> | ski: i din't catch you. shared? |
| 17:01:29 | <ski> | gaff : probably, with `dff', it didn't really hang indefinitely, just took a very long time (possibly exponentially slower), while `df' didn't experience that, due to inlining or specialization or so happening, because it was in the same module |
| 17:01:51 | <gaff> | ok |
| 17:02:11 | <gaff> | and why is it working when i change it to INT, as you suggested? |
| 17:02:25 | <ski> | gaff : with lazy / by-need evaluation, if you do `let x = 2 + 3 in x * x', then the computation of `2 * 3' is shared, so that it's not redone, when the value of the second `x' in `x * x' is demanded |
| 17:02:50 | <gaff> | correct. |
| 17:02:59 | → | Neuromancer joins (~Neuromanc@unaffiliated/neuromancer) |
| 17:03:28 | <ski> | such a memoization/sharing does not happen, if you have a function. if you write `f x = 2 + 3', then `f 4 * f 4' won't share the result of `2 + 3', under by-need |
| 17:03:54 | <gaff> | i see |
| 17:04:20 | <ski> | there is no automatic memoization, caching of an association from input values to output values (such a thing would require some kind of equality check on inputs. also there's other possible issues ..) |
| 17:04:25 | <ski> | however |
| 17:04:29 | <ski> | if you have |
| 17:04:45 | <ski> | counting :: Integer i => [i] |
| 17:04:58 | <ski> | counting = 0 : map (1 +) counting |
| 17:05:43 | <ski> | even though it *looks* like `counting' would be shared here, it won't. because, under the dictionary-passing translation (/ implementation) of type classes, this will correspond to something like |
| 17:06:01 | <ski> | counting :: IntegralDict i -> [i] |
| 17:06:43 | <ski> | counting iDict = fromInteger iDict (0 :: Integer) : map ((+) iDict (fromInteger iDict (1 :: Integer))) (counting iDict) |
| 17:06:57 | <ski> | (sorry, obviously `Integer i' should have been `Integral i') |
| 17:07:14 | <gaff> | yeah, i was wondering about that |
| 17:07:32 | <ski> | where `IntegralDict i' is a data type, a record of implementations of the methods of `Integral' (and superclasses), for `i' |
| 17:07:44 | <gaff> | i see |
| 17:07:53 | <ski> | so, "secretly", under this implementation, `counting' will be a function. so, no sharing |
| 17:08:00 | <ski> | this is the reason for the DMR existing |
| 17:08:03 | <gaff> | i see |
| 17:09:35 | <ski> | if you had skipped the type signature on `counting' or `primes', then you'd either gotten an error that it was ambiguous (it refusing to infer it as a *constrained* polymorphic operation), or else it might have picked a default type for `i' (like `Integer'), in case one was available (and then your operation would be monomorphic) |
| 17:10:06 | <gaff> | okay |
| 17:10:07 | <ski> | (in this case, i think you'd get the defaulting .. but in general, it might not find a suitable default, and so it would complain) |
| 17:10:08 | × | zfnmxt quits (~zfnmxt@unaffiliated/zfnmxt) (Quit: Bye!) |
| 17:10:15 | → | zfnmxt_ joins (~zfnmxt@unaffiliated/zfnmxt) |
| 17:10:19 | × | Jello_Raptor quits (~Jello_Rap@li641-12.members.linode.com) (Ping timeout: 252 seconds) |
| 17:10:46 | <gaff> | so in this case, when i cahnge to `INT`, `primes` get shared? |
| 17:10:53 | × | CitizenSnips quits (~CitizenSn@irc.refl.club) (Quit: ZNC 1.8.2 - https://znc.in) |
| 17:10:54 | × | fredcy| quits (fredcy@2600:3c00::f03c:91ff:feae:15ae) (Quit: ZNC - http://znc.in) |
| 17:11:04 | → | fredcy joins (fredcy@2600:3c00::f03c:91ff:feae:15ae) |
| 17:11:08 | <gaff> | sorry, *change* |
| 17:12:20 | → | CitizenSnips joins (~CitizenSn@irc.refl.club) |
| 17:12:20 | <ski> | (the way to avoid dealing with DMR is to either (a) add an explicit type signature, signalling that you're aware that it's *constrained* polymorphic (so no sharing); or (b), in case it's a function, add explicit parameter to the left of `='. so instead of `f = ...' do `f x = (...) x', or instead of `f = \x -> ..x..', do `f x = ..x..'; or (c) turn off DMR (but then you don't get warned by it, when you lose |
| 17:12:26 | <ski> | sharing like this)) |
| 17:12:28 | <ski> | gaff : yes |
| 17:13:10 | <ski> | if you load the module, then do `take 4 primes', it will show the primes under ten |
| 17:13:12 | → | Jello_Raptor joins (~Jello_Rap@li641-12.members.linode.com) |
| 17:13:25 | <gaff> | yes |
| 17:13:47 | <ski> | if you then do `take 25 primes', it will show the primes under one hundred, but not recompute the first four, sharing them from the previous computation, only recomputing the remaining twentyone |
| 17:14:14 | <ski> | with `primes' constrained polymorphic, you'll recompute each time. at least under a naïve by-need / lazy implementation |
| 17:14:17 | → | Forlorn_ joins (~Forlorn@unaffiliated/forlorn) |
| 17:14:26 | <gaff> | i see |
| 17:14:41 | <ski> | and then, each call to one of your operations using `primes' would recompute it from the start again, each time it used it |
| 17:14:49 | <gaff> | correct |
| 17:15:28 | <ski> | i think even each recursive call might recompute it (unless it does `let'-floating of the specialization to `i') .. and this could likely cause exponential worsening of time |
| 17:15:44 | → | __monty__ joins (~toonn@unaffiliated/toonn) |
| 17:16:16 | <ski> | however, it seemed to happen that with `df' in the same module, it managed to, in that case, avoid this. probably due to specialization, and possibly also inlining. but it didn't manage to do that with `dff' in a different module |
| 17:16:31 | <ski> | that's my theory about the behaviour you observed, anyway |
| 17:16:39 | <gaff> | ski: primes is shared because it is not a function, is suppose? |
| 17:16:46 | <ski> | if you're curious, you could dive into core, or profile, or so |
| 17:16:49 | <ski> | yep |
| 17:16:57 | <gaff> | reasoning from your statements |
| 17:18:35 | <gaff> | ski: i am not familiar with `DMR`. what does it stand for, in full? |
| 17:18:36 | <ski> | it's like if you had said `isPrime n = ..n.. where primes = ...', or `isPrime n = let primes = ... in ..n..' (or, in the `let'-floating case, it would be `isPrime = let primes = ... in \n -> ..n..', which would share `primes' over the body of `isPrime', but not across calls to it. i guess whether it would share among recursive calls depends on whether it would float it out of the recursion or not) |
| 17:19:11 | <geekosaur> | "dreaded monomorphism restriction" |
| 17:19:35 | <gaff> | ah, i know that, just didn't know the abbreviation. |
| 17:19:45 | <geekosaur> | "monomorphism restriction" is its proper name. "dreaded" is more or less because of this :) |
| 17:20:01 | <gaff> | i see |
| 17:20:37 | <ski> | (also, in actuality, it would probably be more like `isPrime @i n = ..i..n.. where myPrimes = primes @i', where `primes' is the polymorphic one, defined on the top-level, and `myPrimes' is the specialization of it, to the particular type `i' (with corresponding `Integral' instance dictionary) that was used for this particular call to `isPrime') |
| 17:21:14 | <gaff> | i see |
| 17:21:59 | <ski> | (so that `isPrime @i n = ..i..n.. where myPrimes = primes @i' would then be translated into `isPrime @i iDict n = ..i..n.. where myPrimes = primes @i iDict', passing the dictionary to `primes' to get the resulting list, then sharing that list, by naming it `myPrimes' and reusing that name) |
| 17:22:03 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:4485:5098:cb7a:cbe1) |
| 17:22:26 | <gaff> | ah |
| 17:23:08 | <ski> | anyway, i'm not totally sure on the details that it actually does. but it could do something along these lines |
| 17:24:20 | <gaff> | ski: using rank types does entail a performance cost sometimes. |
| 17:24:55 | <gaff> | in this case, at least, for example. |
| 17:26:56 | <ski> | there's no higher-rank stuff here |
| 17:27:18 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 17:27:27 | <ski> | the performance related stuff here is about the class constraints, implemented by passing dictionaries |
| 17:27:38 | <gaff> | i see |
| 17:27:50 | <ski> | (and how that precludes the sharing of results) |
| 17:27:57 | <gaff> | okay, i will have to remember that |
| 17:28:05 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 17:28:45 | <gaff> | this problem came as a surprise to me. i have never seen it before. |
| 17:29:05 | <gaff> | i suppose that's things come to you when you are young |
| 17:30:03 | <gaff> | ski: thanks much. appreciate your help, indeed. |
| 17:30:34 | → | dyeplexer joins (~lol@unaffiliated/terpin) |
| 17:30:48 | <ski> | np |
| 17:32:12 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 246 seconds) |
| 17:32:35 | <gaff> | ski: one way i could track this kind of stuff is to load the code in ghci and step through it line by line. |
| 17:32:47 | <ski> | i guess |
| 17:32:54 | <gaff> | ah |
| 17:33:27 | → | MartinR23 joins (d9f579b1@pd9f579b1.dip0.t-ipconnect.de) |
| 17:33:43 | <ski> | one can learn to watch out for things that are intended to be shared, but are overloaded |
| 17:34:10 | <ski> | (or, at least, to relatively quickly realize that could be the culprit, in the case of a problem) |
| 17:34:37 | <gaff> | also, the thought of changing the type to INT came to me earlier, but i, for some reason, dismissed it without checking it out. |
| 17:34:54 | <gaff> | i see |
| 17:35:16 | <gaff> | nice tips. thanks |
| 17:35:58 | <gaff> | despite these issues, i love writing code in haskell. it is so elegant. |
| 17:38:52 | × | borne quits (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de) (Ping timeout: 276 seconds) |
| 17:40:12 | × | gaff quits (~user@49.207.224.136) (Quit: ERC (IRC client for Emacs 27.1)) |
| 17:41:33 | → | DTZUZU joins (~DTZUZO@205.ip-149-56-132.net) |
| 17:44:05 | ← | jakalx parts (~jakalx@base.jakalx.net) ("Error from remote client") |
| 17:44:34 | × | DTZUZU_ quits (~DTZUZO@207.81.119.43) (Ping timeout: 268 seconds) |
| 17:44:47 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving) |
| 17:45:10 | × | argento quits (~argent0@191.81.225.82) (Ping timeout: 268 seconds) |
| 17:51:22 | × | geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds) |
| 17:52:11 | → | isBEKaml joins (~isBEKaml@unaffiliated/isbekaml) |
| 17:54:00 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 252 seconds) |
| 17:54:22 | → | gitgood joins (~gitgood@80-44-12-39.dynamic.dsl.as9105.com) |
| 17:55:02 | → | DTZUZU_ joins (~DTZUZO@205.ip-149-56-132.net) |
| 17:55:39 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 17:55:41 | × | fuzzy_id quits (~user@1.red-88-0-41.dynamicip.rima-tde.net) (Ping timeout: 260 seconds) |
| 17:55:47 | × | DTZUZU quits (~DTZUZO@205.ip-149-56-132.net) (Read error: Connection reset by peer) |
| 17:56:15 | → | TheMule joins (~TheMule@aftr-37-201-195-154.unity-media.net) |
| 17:56:20 | × | TheMule quits (~TheMule@aftr-37-201-195-154.unity-media.net) (Client Quit) |
| 17:56:20 | × | gitgood quits (~gitgood@80-44-12-39.dynamic.dsl.as9105.com) (Client Quit) |
| 17:56:26 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 17:58:35 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 17:58:45 | → | Guest41032 joins (~laudiacay@67.176.215.84) |
| 17:59:20 | → | gitgood joins (~gitgood@80-44-12-39.dynamic.dsl.as9105.com) |
| 17:59:32 | × | MartinR23 quits (d9f579b1@pd9f579b1.dip0.t-ipconnect.de) (Quit: Connection closed) |
| 18:01:02 | DTZUZU_ | is now known as DTZUZU |
| 18:01:13 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 18:02:19 | → | mouseghost joins (~draco@wikipedia/desperek) |
| 18:03:33 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 260 seconds) |
| 18:04:43 | <Uniaika> | MrMobius: |
| 18:04:43 | × | mrlazos quits (~mrlazos@46-44-92.adsl.cyta.gr) (Read error: Connection reset by peer) |
| 18:04:47 | <Uniaika> | woops, sorry! |
| 18:05:28 | → | mrlazos joins (~mrlazos@46-44-92.adsl.cyta.gr) |
| 18:06:14 | × | mrlazos quits (~mrlazos@46-44-92.adsl.cyta.gr) (Remote host closed the connection) |
| 18:06:49 | → | borne joins (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de) |
| 18:06:50 | × | Guest41032 quits (~laudiacay@67.176.215.84) (Ping timeout: 260 seconds) |
| 18:06:50 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds) |
| 18:06:53 | × | bodisiw quits (~bodiskw@cpe-74-138-114-237.kya.res.rr.com) (Quit: Leaving) |
| 18:07:27 | ← | isBEKaml parts (~isBEKaml@unaffiliated/isbekaml) () |
| 18:07:53 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 18:08:12 | → | TheMule joins (~TheMule@2a02:908:3a3:8660:e095:501c:2700:5d7c) |
| 18:10:25 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 18:10:55 | × | TheMule quits (~TheMule@2a02:908:3a3:8660:e095:501c:2700:5d7c) (Client Quit) |
| 18:11:23 | → | TheMule joins (~TheMule@aftr-37-201-195-154.unity-media.net) |
| 18:11:39 | × | dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection) |
| 18:11:56 | TheMule | is now known as mkDoku |
| 18:12:13 | → | conal joins (~conal@64.71.133.70) |
| 18:12:26 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 18:12:39 | × | rajivr quits (uid269651@gateway/web/irccloud.com/x-vhalmegvcwkpzygm) (Quit: Connection closed for inactivity) |
| 18:19:05 | × | __minoru__shirae quits (~shiraeesh@109.166.57.243) (Ping timeout: 268 seconds) |
| 18:19:45 | → | Pickchea joins (~private@unaffiliated/pickchea) |
| 18:19:58 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 18:20:07 | → | stree joins (~stree@68.36.8.116) |
| 18:22:36 | <tomsmeding> | Under what conditions is a ByteString null-terminated? |
| 18:23:03 | → | Sgeo_ joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 18:23:24 | <tomsmeding> | as in: does bytestring itself null-terminate things sometimes, or is this always the user's task? |
| 18:24:18 | → | Sgeo__ joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 18:24:55 | → | olle joins (~olle@i5E8666BD.versanet.de) |
| 18:24:57 | <tomsmeding> | context: snap-core defines this function: https://hackage.haskell.org/package/snap-core-1.0.4.2/docs/src/Snap.Internal.Http.Types.html#parseHttpTime |
| 18:25:12 | <olle> | Question: Is exceptions in Haskell a regular monad? Or does it have some extras built in? |
| 18:25:17 | <olle> | Are* |
| 18:25:57 | <tomsmeding> | S.unsafeUseAsCString (where S = Data.ByteString.Unsafe) requires that the bytestring is null-terminated, but my application is crashing (segfault) within the C function called here and I'm not sure how to debug why |
| 18:26:34 | <tomsmeding> | olle: are you talking about ExceptT, or something else? |
| 18:27:04 | <geekosaur> | I'd expect it to be the user's job, since it may be e.g. part of a network stream |
| 18:27:06 | × | Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Ping timeout: 268 seconds) |
| 18:27:07 | <geekosaur> | fwiw |
| 18:27:11 | <olle> | tomsmeding: dunno |
| 18:27:12 | <tomsmeding> | also not sure what you mean with "extras"; every monad implements some kind of functionality apart from supporting 'return' and '>>=' |
| 18:27:20 | <tomsmeding> | except I guess Identity |
| 18:27:34 | <tomsmeding> | geekosaur: that's what I'd think too |
| 18:27:34 | <olle> | tomsmeding: extras = special language support that makes it different than any other monad |
| 18:27:43 | <tomsmeding> | olle: if you're talking about ExceptT, no |
| 18:27:51 | <olle> | alright |
| 18:28:06 | × | Sgeo_ quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Ping timeout: 252 seconds) |
| 18:28:08 | <olle> | Is there a concsensus in Haskell community of which error handling design pattern is best? |
| 18:28:20 | <tomsmeding> | olle: reason why I'm asking: haskell also has IO exceptions and asynchronous exceptions, which are two different things that are also different from ExceptT, and both are not monads at all :p |
| 18:28:21 | <olle> | Exceptions vs result types, etc |
| 18:28:29 | <olle> | tomsmeding: oh? |
| 18:28:34 | <tomsmeding> | "Is there a consensus in Haskell community of " -- no |
| 18:28:40 | <olle> | ^^ |
| 18:28:49 | <Uniaika> | olle: my own consensus is that MonadError is great |
| 18:28:56 | <Uniaika> | if you handle business data-types |
| 18:29:05 | <tomsmeding> | well that may be overstating the case, but there are many different opinions about many different things |
| 18:29:09 | <Uniaika> | when it comes to file-system, network, etc, then Exceptions are a better way to go |
| 18:29:16 | <olle> | OK |
| 18:31:01 | <tomsmeding> | new question: if I define a local library with the name 'foo' in my cabal.project, will that shadow any 'foo' from hackage in the dependencies of my dependencies? |
| 18:31:12 | <tomsmeding> | (foo = snap-core >:D) |
| 18:32:00 | → | argento joins (~argent0@191.81.225.82) |
| 18:32:00 | → | acidjnk_new joins (~acidjnk@p200300d0c72b95486cfd1d07fe22841d.dip0.t-ipconnect.de) |
| 18:33:54 | <geekosaur> | I think it's supposed to. It did here, at least |
| 18:34:05 | <tomsmeding> | thanks! |
| 18:35:01 | <tomsmeding> | reason why I'm asking: ircbrowse is crashing, like, often |
| 18:35:55 | <tomsmeding> | like, a total of 7700 times in the past two months |
| 18:36:04 | × | viluon quits (uid453725@gateway/web/irccloud.com/x-uyquvhnfkmiqllxw) (Quit: Connection closed for inactivity) |
| 18:36:18 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) |
| 18:36:19 | <geekosaur> | I had wondered why 502 Bad Gateway was so relatively common… |
| 18:36:35 | <tomsmeding> | >.> |
| 18:37:05 | <geekosaur> | I think most of the time that would show up as a link time error, though, not as a crash. At least if it exposes any of the ABI |
| 18:37:06 | <tomsmeding> | for some reason I never looked in my core dump log; I assumed it was an uncommon occurrence |
| 18:37:14 | <tomsmeding> | link time error? |
| 18:38:02 | <geekosaur> | either duplicate symbols, or if it exposes any of the ABI at Haskell level then a compile time error showing two apparently identical types as not matching |
| 18:38:06 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds) |
| 18:38:36 | <tomsmeding> | I'm talking about a segfault in C that comes seems to come from a null pointer dereference |
| 18:38:56 | <tomsmeding> | and I'm not trusting that unsafeUseAsCString, but maybe I'm mistaken |
| 18:39:09 | <tomsmeding> | (the crash seems to always be in that C function c_parse_http_time) |
| 18:39:40 | × | conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer) |
| 18:39:50 | <geekosaur> | that doesn't sound like missing \0, to be honest |
| 18:39:59 | <geekosaur> | don't confuse \NUL with null pointers |
| 18:40:03 | × | Alleria__ quits (~textual@mskresolve-a.mskcc.org) (Ping timeout: 268 seconds) |
| 18:40:08 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 18:40:10 | → | Sgeo_ joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 18:40:19 | <tomsmeding> | very true |
| 18:40:27 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 18:40:45 | <tomsmeding> | can unsafeUseAsCString every provide a null pointer? |
| 18:40:47 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) (Ping timeout: 258 seconds) |
| 18:41:33 | <geekosaur> | I don't think so, unless maybe it was fed one |
| 18:41:40 | × | lawid_ quits (~quassel@ipservice-092-219-052-236.092.219.pools.vodafone-ip.de) (Ping timeout: 252 seconds) |
| 18:42:17 | <tomsmeding> | I'm going to instrument the C function anyway |
| 18:42:39 | <tomsmeding> | the coredumps tell me precious little without going through the pages of assembly listing in strptime() |
| 18:42:45 | → | lawid joins (~quassel@dslb-178-005-075-217.178.005.pools.vodafone-ip.de) |
| 18:42:54 | <geekosaur> | but it shouldn't be possible to feed it one since you're feeding it a ByteArray# allocated by the bytestring package, and if that's generating null pointers I'd expect a lot more to break |
| 18:43:45 | × | Sgeo__ quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Ping timeout: 268 seconds) |
| 18:44:14 | <geekosaur> | hm. you may need to initialize the locale |
| 18:44:40 | → | conal joins (~conal@64.71.133.70) |
| 18:45:06 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 18:46:20 | → | howdoi joins (uid224@gateway/web/irccloud.com/x-qufpuczcdkidmfvl) |
| 18:47:36 | <tomsmeding> | running the function on sane input from 'cabal repl' works on my server, so I'm not sure it's an environment problem |
| 18:50:13 | → | Alleria joins (~textual@zrcout.mskcc.org) |
| 18:50:19 | → | _fcntl joins (~jaroslawj@185.234.208.208.r.toneticgroup.pl) |
| 18:50:21 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 18:50:37 | Alleria | is now known as Guest90523 |
| 18:51:32 | → | lampowner joins (~xblow@2a02:2168:b03:3b74::1) |
| 18:53:52 | <tomsmeding> | (in any case it seems my server's system locale is C.UTF-8) |
| 18:55:08 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 18:55:26 | geekosaur | wonders if that's the problem. it may not be fully set up, since that's a somewhat weird-looking locale |
| 18:56:08 | <geekosaur> | I'd use either C or en_US.UTF-8, not a combination of the two that might be half specified or something |
| 18:56:18 | tomsmeding | doesn't remember changing it from the ubuntu default |
| 18:57:22 | <tomsmeding> | then again, a segfault in an http time parsing function that only occurs sometimes? |
| 18:57:28 | <geekosaur> | /etc/default/locale here is en_US.UTF-8 fwiw |
| 18:57:33 | <tomsmeding> | s/segfault/null pointer dereference/ |
| 18:57:54 | <geekosaur> | I dunno, I'm spitballing since I don't have enough information |
| 18:58:19 | <tomsmeding> | thanks anyway :) |
| 18:58:28 | <tomsmeding> | I'm going to try some instrumentation |
| 18:59:00 | <geekosaur> | and strptime() uses locale stuff heavily |
| 18:59:49 | <tomsmeding> | hm good point |
| 19:01:01 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
| 19:01:10 | <tomsmeding> | changed locale to en_US.UTF-8 and restarted ircbrowse, let's first see if this fixes things |
| 19:01:56 | → | Erutuon_ joins (~Erutuon@97-116-27-119.mpls.qwest.net) |
| 19:02:41 | × | lawid quits (~quassel@dslb-178-005-075-217.178.005.pools.vodafone-ip.de) (Ping timeout: 265 seconds) |
| 19:02:58 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 19:05:20 | → | dpl_ joins (~dpl@77.121.78.163) |
| 19:07:10 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 19:12:46 | × | mkDoku quits (~TheMule@aftr-37-201-195-154.unity-media.net) (Ping timeout: 240 seconds) |
| 19:14:09 | × | aarvar quits (~foewfoiew@2601:602:a080:fa0:906c:b23f:e55d:e8aa) (Ping timeout: 245 seconds) |
| 19:14:54 | <_fcntl> | wanted to play with ghc hacking, followed docs, bet on docker and got image that is based on project which is 1.5yo... does anyone use docker for ghc hacking? |
| 19:17:29 | ← | olle parts (~olle@i5E8666BD.versanet.de) () |
| 19:18:18 | <Clint> | what? |
| 19:19:06 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 19:19:11 | → | larryba joins (~bc8134e3@199.204.85.195) |
| 19:19:47 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) |
| 19:21:17 | → | kenran joins (~kenran@mue-88-130-62-062.dsl.tropolys.de) |
| 19:21:48 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 19:21:56 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 19:23:46 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 260 seconds) |
| 19:25:53 | <tomsmeding> | hm? |
| 19:26:45 | <tomsmeding> | _fcntl: I think most people working on ghc just checkout the git repository directly on their machine and work in that |
| 19:26:46 | × | dbmikus quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 252 seconds) |
| 19:27:25 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 19:27:26 | <geekosaur> | yes, docker images are more to install particular ghc versions to build programs that need those versions |
| 19:27:35 | <geekosaur> | and there are other/better ways to do that |
| 19:27:49 | <_fcntl> | @toms: tried, but have only ghc 8.8 in repository, and it needs 8.10 not available on Ubuntu, so tried with docker |
| 19:27:49 | <lambdabot> | Unknown command, try @list |
| 19:27:49 | ← | jakalx parts (~jakalx@base.jakalx.net) ("Error from remote client") |
| 19:28:38 | → | fuzzy_id joins (~user@1.red-88-0-41.dynamicip.rima-tde.net) |
| 19:28:42 | <tomsmeding> | _fcntl: people generally use either hvr's ppa, or ghcup to install their ghc; using ghc from the standard distro repositories is fairly uncommon |
| 19:28:51 | × | malumore_ quits (~malumore@151.62.117.70) (Remote host closed the connection) |
| 19:29:07 | ← | fuzzy_id parts (~user@1.red-88-0-41.dynamicip.rima-tde.net) () |
| 19:29:07 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 19:29:08 | <_fcntl> | tomsmending: understood, thanks! |
| 19:29:35 | → | malumore joins (~malumore@151.62.117.70) |
| 19:29:56 | <tomsmeding> | _fcntl: though I guess installing ghc in a docker container shouldn't be that difficult, nor would updating the image you got be, I guess? |
| 19:30:20 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 19:30:42 | <_fcntl> | @tomsmending: true, but I'm 'newcomer' followed official docs, and couldn't do anything... |
| 19:30:42 | <lambdabot> | Unknown command, try @list |
| 19:30:47 | × | Pickchea quits (~private@unaffiliated/pickchea) (Quit: Leaving) |
| 19:31:27 | <tomsmeding> | _fcntl: which docs recommended using an outdated docker image? Perhaps those docs need to be updated :) |
| 19:31:59 | → | ubert joins (~Thunderbi@p200300ecdf25d9fde6b318fffe838f33.dip0.t-ipconnect.de) |
| 19:32:07 | <_fcntl> | tomsmeding: https://gitlab.haskell.org/ghc/ghc/-/wikis/building/preparation/linux |
| 19:34:18 | <Clint> | what's the problem you're trying to solve? |
| 19:34:42 | <tomsmeding> | Clint: they're trying to follow official docs to build ghc for local development and obtain a ghc that is quite old |
| 19:35:29 | <_fcntl> | Clint: exactly, as tomsmeding said... I'd like to contribute to ghc somehow... |
| 19:36:05 | <Clint> | but doesn't that page tell you how to build whatever version of ghc you want? |
| 19:36:06 | <tomsmeding> | _fcntl: regardless of what the docs say, anyway, I recommend using hvr's ppa or ghcup and doing it locally |
| 19:36:43 | <tomsmeding> | hm, interesting |
| 19:36:52 | <tomsmeding> | _fcntl: where did you get the old stuff from? |
| 19:37:01 | <tomsmeding> | does the docker container not work as specified? |
| 19:37:08 | <_fcntl> | ok, but now my env is getting a little bit messy ;) I've got ghc from aptitude, some local stack installs, not sure if not installed something via cabal and now ... ghcup, must clean that first.. |
| 19:37:35 | tomsmeding | assumed without checking that the docker image came with a pre-loaded ghc source tree that was old somehow, but in retrospect that makes no sense |
| 19:37:58 | <_fcntl> | toms: not working as current (> 9.1 I suspect) requires 8.10 ghc, and docke image has only 8.4 installed |
| 19:38:20 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 19:38:29 | <tomsmeding> | _fcntl: the potential problem with not getting ghc from apt is that if you install some system package that requires haskell libraries, that may pull in the system ghc package anyway |
| 19:38:33 | <tomsmeding> | _fcntl: ah |
| 19:38:47 | <_fcntl> | configure: error: GHC version 8.10 or later is required to compile GHC. |
| 19:38:54 | <_fcntl> | that's the message I got |
| 19:39:04 | <Clint> | aha |
| 19:39:05 | <_fcntl> | pity docker images are not inside ghc repo |
| 19:39:15 | <_fcntl> | *docker descriptos |
| 19:39:32 | <Clint> | you might want to file a bug on https://github.com/gregwebs/ghc-docker-dev/issues |
| 19:39:41 | <Clint> | or send a pull request after tweaking the Dockerfile yourself |
| 19:39:51 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 19:40:04 | × | o1lo01ol1o quits (~o1lo01ol1@bl7-88-181.dsl.telepac.pt) (Remote host closed the connection) |
| 19:40:10 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 19:40:32 | <tomsmeding> | _fcntl: the Dockerfile is there though |
| 19:40:43 | <_fcntl> | I may do that but I think it would be easier (?) to introduce dockerfile to ghc source tree |
| 19:40:46 | <_fcntl> | lemme check |
| 19:41:06 | <tomsmeding> | though debian testing only seems to have ghc-8.8.4 |
| 19:41:41 | <Clint> | doesn't matter, he's getting it from hvr |
| 19:42:20 | <tomsmeding> | Clint: where do you see that Dockerfile adding hvr's repo? |
| 19:42:25 | → | Guest_17 joins (6029f825@096-041-248-037.res.spectrum.com) |
| 19:42:40 | <tomsmeding> | oh lol hvr's name isn't in there |
| 19:42:55 | <Clint> | tomsmeding: https://github.com/gregwebs/ghc-docker-dev/blob/master/Dockerfile#L30 |
| 19:42:55 | tomsmeding | is stupid |
| 19:43:04 | <tomsmeding> | yes indeed thanks |
| 19:43:07 | <Clint> | np |
| 19:44:43 | → | Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362) |
| 19:47:07 | → | ircbrowse_tom joins (~ircbrowse@64.225.78.177) |
| 19:47:07 | Server | sets mode +CLnt |
| 19:47:24 | <tomsmeding> | monochrom: I'm using digitalocean's standard ubuntu image for this particular server |
| 19:47:36 | <tomsmeding> | though I changed the system locale to en_US.UTF-8 and it's still crashing :p |
| 19:47:44 | Lord_of_Life_ | is now known as Lord_of_Life |
| 19:47:47 | <monochrom> | haha yikes |
| 19:48:01 | <geekosaur> | ick |
| 19:48:21 | × | vgtw quits (~vgtw@gateway/tor-sasl/vgtw) (Ping timeout: 240 seconds) |
| 19:50:12 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 19:50:41 | <monochrom> | Yikes, so Strachey was responsible for the name "currying". |
| 19:50:51 | → | vgtw joins (~vgtw@gateway/tor-sasl/vgtw) |
| 19:51:10 | <dolio> | Oh really? |
| 19:51:34 | <monochrom> | https://en.wikipedia.org/wiki/Christopher_Strachey#Work |
| 19:52:09 | <dolio> | So it's his fault that Schönfinkel doesn't get his due? |
| 19:52:11 | <monochrom> | haha [citation needed] OK I am not so sure now |
| 19:54:15 | <tomsmeding> | relevant: https://en.wikipedia.org/wiki/Currying#History |
| 19:55:06 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 19:55:22 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 252 seconds) |
| 19:55:33 | <tomsmeding> | searching "strachey 1967" turns up https://www.cs.cmu.edu/~crary/819-f09/Strachey67.pdf which doesn't contain the word 'currying' |
| 19:56:28 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:56:47 | <monochrom> | Um, and he got to patent "base registers for program relocation"??!!! |
| 19:56:48 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 19:57:58 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 19:58:26 | <tomsmeding> | patent? |
| 19:58:41 | <tomsmeding> | did every cpu manufacturer ever pay royalties |
| 19:58:52 | <monochrom> | Yeah. The good old days of being able to patent base registers and xor tricks. |
| 19:59:42 | <monochrom> | Then again, today we also get to patent 1-click-buy and touch-the-icon-to-open. |
| 20:00:17 | <tomsmeding> | patent "using foldl' instead of foldl" and make every haskell program slower |
| 20:00:17 | × | borne quits (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de) (Ping timeout: 250 seconds) |
| 20:00:39 | <monochrom> | >:) |
| 20:01:29 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 20:04:33 | × | argento quits (~argent0@191.81.225.82) (Ping timeout: 268 seconds) |
| 20:05:06 | × | petersen quits (~petersen@redhat/juhp) (Ping timeout: 240 seconds) |
| 20:05:14 | × | kritzefitz_ quits (~kritzefit@212.86.56.80) (Remote host closed the connection) |
| 20:06:14 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 20:06:21 | × | geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 260 seconds) |
| 20:07:13 | → | petersen joins (~petersen@redhat/juhp) |
| 20:09:08 | <maerwald> | computer scientists are to blame for most of our modern day problems |
| 20:10:17 | × | abrar quits (~abrar@static-108-30-103-121.nycmny.fios.verizon.net) (Quit: WeeChat 2.9) |
| 20:10:35 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 20:10:38 | <[exa]> | (including computers) |
| 20:11:01 | × | Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 260 seconds) |
| 20:11:33 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 20:11:55 | → | usr25 joins (~usr25@unaffiliated/usr25) |
| 20:12:17 | <maerwald> | I'm glad many high-IQ ppl waste their life on chess. That creates less problems for us. |
| 20:12:56 | → | borne joins (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de) |
| 20:13:38 | → | kenran_ joins (~kenran@mue-88-130-62-062.dsl.tropolys.de) |
| 20:16:11 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 20:16:11 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 20:16:15 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 20:16:35 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 20:18:11 | → | v01d4lph4 joins (~v01d4lph4@223.190.20.92) |
| 20:18:27 | × | fancyremarker quits (~fancyrema@185.169.233.10) (Remote host closed the connection) |
| 20:18:47 | × | geekosaur quits (82650c7a@130.101.12.122) (Quit: Connection closed) |
| 20:18:48 | × | hiroaki quits (~hiroaki@2a02:8108:8c40:2bb8:1351:13b7:f6af:b97a) (Ping timeout: 246 seconds) |
| 20:21:11 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 240 seconds) |
| 20:22:18 | × | v01d4lph4 quits (~v01d4lph4@223.190.20.92) (Ping timeout: 240 seconds) |
| 20:23:12 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 20:23:51 | <fryguybob> | Is there a straight forward way to write "shortest" so that shortest [[1..], [1,2,3]] -> [1,2,3] ? |
| 20:25:01 | × | kenran quits (~kenran@mue-88-130-62-062.dsl.tropolys.de) (Quit: Lost terminal) |
| 20:25:41 | <sclv> | fryguybob: sure, just use `genericLength` and peano numbers, I think :-) |
| 20:25:54 | <justsomeguy> | Maybe by using a type other than list, that requries a finite length. |
| 20:25:58 | <sclv> | actually you can do it directly by induction |
| 20:26:24 | <[exa]> | fryguybob: experiment with `map tail` |
| 20:26:26 | <sclv> | pair each list with itself, using the first element as the "index" |
| 20:26:58 | <sclv> | if there's something for which the "index" is nil, return it, if not drop one from each index, repeat |
| 20:27:47 | <fryguybob> | I was thinking something silly like map head . sequence ... |
| 20:28:14 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 260 seconds) |
| 20:28:17 | <sclv> | oh yeah can't imagine a fully golfed one, but i can imagine a "slick" looking one with generic peanos at least |
| 20:28:34 | → | conal joins (~conal@64.71.133.70) |
| 20:30:11 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 20:31:10 | → | hiroaki joins (~hiroaki@2a02:8108:8c40:2bb8:461b:1426:c666:74bc) |
| 20:33:24 | <[exa]> | concatIterate would help |
| 20:34:52 | → | kenanmarasli joins (1fdf0dda@31.223.13.218) |
| 20:37:16 | × | supercoven quits (~Supercove@dsl-hkibng31-54fabd-233.dhcp.inet.fi) (Ping timeout: 260 seconds) |
| 20:38:13 | × | kenran_ quits (~kenran@mue-88-130-62-062.dsl.tropolys.de) (Quit: leaving) |
| 20:38:52 | <kenanmarasli> | I am having a bit of a terminology problem. |
| 20:38:53 | <kenanmarasli> | Why are *if* *else* *case* expressions in Haskell, but in C they are statements? |
| 20:39:28 | <Rembane> | kenanmarasli: Because Haskell doesn't have statements. This might actually be a lie, but it's a good lie imo. |
| 20:39:54 | <maerwald> | Rembane: it's not a lie |
| 20:40:00 | <[exa]> | kenanmarasli: counterexample-- in C, there's no sense doing `a = if (123) printf("123");` |
| 20:40:11 | <ph88^> | does anyone know how this site came into existence ? https://riptutorial.com/haskell |
| 20:40:30 | × | ubert quits (~Thunderbi@p200300ecdf25d9fde6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 20:40:50 | <Rembane> | maerwald: Cool. Are the functions in a module expressions? Or are they something else? |
| 20:40:55 | → | solidus-river joins (~mike@174.127.249.180) |
| 20:41:26 | → | stree joins (~stree@68.36.8.116) |
| 20:41:32 | <yushyin> | declarations/definitions |
| 20:41:43 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 20:41:52 | <Rembane> | Of course! Thank you! |
| 20:41:55 | <solidus-river> | hey all, i have to parse a bunch of binary blobs sent over the wire and each parse returns an Either Err Result. It winds up being an unwieldly number of nested case statements to parse is there a better way to do this syntactically? |
| 20:41:57 | <maerwald> | haskell report doesn't say anything about execution either |
| 20:42:04 | <maerwald> | it's not specified |
| 20:42:18 | → | hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net) |
| 20:42:52 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 20:42:56 | <[exa]> | solidus-river: attoparsec? (not sure how much "binary" it is but if it fits in bytestrings then attoparsec should just work) |
| 20:43:56 | ← | usr25 parts (~usr25@unaffiliated/usr25) ("Leaving") |
| 20:44:03 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 20:44:07 | <ephemient> | @hackage attoparsec |
| 20:44:07 | <lambdabot> | https://hackage.haskell.org/package/attoparsec |
| 20:44:11 | <ephemient> | @hackage binary |
| 20:44:11 | <lambdabot> | https://hackage.haskell.org/package/binary |
| 20:44:24 | <[exa]> | solidus-river: ah you already have the functions for parsing these, sorry. You might want to exploit the monad instance for Either then, it works like "returning Left means an error" |
| 20:45:40 | <solidus-river> | [exa]: ooo, the monad instance looks like exactly what I want, I can just print out the whole sequence on any error and then not worry so much about reporting exactly what failed to parse |
| 20:45:46 | <ephemient> | Either Err Result is in the correct order for that already, but I am not sure given the previous statement whether the awkwardness is in the parsing or in handling the parse result? |
| 20:47:20 | <[exa]> | solidus-river: it usually helps, given there's not much other complexity that would break it. Generally, you can rewrite your program with `do` statements, "bind" each Either with say `subResult <- parsingOperation`, and you get the "Right" type and can completely ignore Lefts |
| 20:47:31 | <[exa]> | if anything breaks, the first Left gets returned |
| 20:48:07 | <[exa]> | > do { a <- Right 5; b <- Right 3; Right (a+b); } |
| 20:48:09 | <lambdabot> | Right 8 |
| 20:48:24 | <[exa]> | (you can use `return` or `pure` instead of the last `Right`) |
| 20:48:29 | <[exa]> | compare to: |
| 20:48:33 | <[exa]> | > do { a <- Right 5; b <- Left "sorry"; Right (a+b); } |
| 20:48:35 | <lambdabot> | Left "sorry" |
| 20:48:58 | <solidus-river> | i think the monad instance would collapse things nicely. I was being kinda derpy and logging each parse error nad the case statments were running of the right end of the screen. the do syntax looks tasty though, every error ends up being the same. I need to be better about reading how things are instanced that I'm using |
| 20:49:10 | <kenanmarasli> | Rembane: I see. Well for me it looks like I can think of these keywords in Haskell like they are wrapped in a function. *if* *else* eventually returns a value and that's why they are expressions. Is it correct? |
| 20:49:24 | <solidus-river> | side note, I don't think the monadic instance in zeromq4-haskell is actually usefull in a real world scenario. |
| 20:49:39 | × | Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer) |
| 20:49:58 | <solidus-river> | but I should also :X until I have a pr with a different instance to back my thoughts |
| 20:50:00 | × | Guest_17 quits (6029f825@096-041-248-037.res.spectrum.com) (Quit: Connection closed) |
| 20:50:20 | <Rembane> | kenanmarasli: Yeah, they evaluate to a value. Both branches evaluate to values of the same type too which is a nice property. |
| 20:50:25 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 20:50:49 | <solidus-river> | * not actually useful |
| 20:51:00 | <kenanmarasli> | Thank you :) |
| 20:51:08 | <Rembane> | np :) |
| 20:51:22 | × | son0p quits (~son0p@181.136.122.143) (Quit: Lost terminal) |
| 20:52:09 | <[exa]> | solidus-river: it may be good for demos. it kinda reminds me the Action monad from Scotty (takes care about simple mistakes, causes trouble later) |
| 20:52:30 | → | Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net) |
| 20:53:24 | <[exa]> | (/me -> afk) |
| 20:53:47 | × | stree quits (~stree@68.36.8.116) (Quit: Caught exception) |
| 20:54:08 | <sm2n> | kenanmarasli, [exa], note that the C example could return a value, it is just that C was designed not to |
| 20:54:09 | → | stree joins (~stree@68.36.8.116) |
| 20:54:40 | <sm2n> | most lisps will return a value in that example, for example |
| 20:54:47 | <sm2n> | C is just not very compositional |
| 20:54:50 | <wz1000> | is there a variant of Data.Sequence on hackage that is strict in the elements? |
| 20:55:18 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 265 seconds) |
| 20:55:49 | <sm2n> | though I should point out, C has the ternary operator a ? b : c, which is essentially if expressions |
| 20:55:55 | <wz1000> | I guess Vector would also work, but I can't use Data.Vector.Unboxed or Data.Vector.Storable |
| 20:56:49 | <monochrom> | Right, Haskell's if-then-else is really better off compared to C's ?: |
| 20:57:27 | → | bitmapper joins (uid464869@gateway/web/irccloud.com/x-lksmeqawycwfpajp) |
| 20:57:54 | <systemfault> | No... but Haskell has alternatives when you need to do multiple comparisons. C does not. |
| 20:58:06 | × | cyphase quits (~cyphase@unaffiliated/cyphase) (Ping timeout: 240 seconds) |
| 20:58:21 | × | RusAlex quits (~Chel@unaffiliated/rusalex) (Ping timeout: 246 seconds) |
| 20:59:03 | <monochrom> | I am just talking about if-then-else. |
| 20:59:28 | <sm2n> | yeah, of course |
| 20:59:40 | <monochrom> | and on the C side, just ?: vs if(){}else{} |
| 20:59:59 | × | acidjnk_new quits (~acidjnk@p200300d0c72b95486cfd1d07fe22841d.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
| 21:00:45 | <monochrom> | If I relate Haskell's Int32#->Int32# to C's int(int), you don't go "no, Haskell has polymorphic types, C does not". |
| 21:01:06 | × | Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 265 seconds) |
| 21:01:49 | <monochrom> | Or maybe you should! Someone please tell me "no, GHC has levity polymorphism, C does not". >:) |
| 21:02:18 | <solidus-river> | [exa]: yeah it hides timing around closing sockets and provides an easy way to do something in another thread but unless I'm missing something about forkFinally, in doing so it takes away your ability to be smart about coordinating shutdown or reacting to fatal errors in threads |
| 21:02:26 | <Rembane> | I don't know about levity polymorphism, but I could sure use some levitating polymorphism. |
| 21:02:33 | <solidus-river> | sm2n: i missed the paste but I"m curious |
| 21:02:34 | <monochrom> | :) |
| 21:02:51 | × | hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 252 seconds) |
| 21:03:28 | <sm2n> | paste? |
| 21:04:03 | <solidus-river> | i thought there was some code being referenced in the if-then-else discussion |
| 21:05:00 | ian_ | is now known as Igloo |
| 21:05:30 | → | cyphase joins (~cyphase@unaffiliated/cyphase) |
| 21:05:33 | → | yunusaydin joins (4eb8266d@78.184.38.109) |
| 21:06:12 | <sm2n> | <[exa]> kenanmarasli: counterexample-- in C, there's no sense doing `a = if (123) printf("123");` |
| 21:06:45 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 21:06:58 | × | kenanmarasli quits (1fdf0dda@31.223.13.218) (Quit: Connection closed) |
| 21:07:08 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 21:07:10 | <Rembane> | sm2n: You could do that in Haskell for about the same amount of sense. |
| 21:07:25 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 21:08:09 | × | lampowner quits (~xblow@2a02:2168:b03:3b74::1) (Ping timeout: 246 seconds) |
| 21:09:56 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:4485:5098:cb7a:cbe1) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 21:09:56 | <sm2n> | my point is that is a language design thing |
| 21:10:28 | <monochrom> | The story of the imperative, statement version of if(){} is also interesting in its own right. |
| 21:11:29 | <monochrom> | First, realize that sequential composition of two statements is an associative operator. Indeed, in Pascal, the semicolon is a binary operator, you cannot write "s; t;", you can only write "s; t". |
| 21:11:34 | × | int-e quits (~noone@int-e.eu) (Remote host closed the connection) |
| 21:12:02 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection) |
| 21:12:16 | → | int-e joins (~noone@int-e.eu) |
| 21:12:22 | <monochrom> | So next you ask "does it have an identity?". Yes, that would be the no-op statement, syntactically as various ways of writing "the empty statement". |
| 21:12:55 | <monochrom> | With that, if(){} is best viewed as syntax sugar for if(){}else{no-op}. |
| 21:13:04 | <ephemient> | in IO, `when` acts like a single-branch imperative if. you don't get a (useful) result out of it either |
| 21:13:32 | → | tolwiz joins (4f028693@host-79-2-134-147.business.telecomitalia.it) |
| 21:13:47 | <monochrom> | If you ever try to reason about imperative programs (euphemism for "give the language a semantics"), you need to be aware of this, and not be blinded by the slick "if(){}" syntax. |
| 21:14:13 | × | lambdabot quits (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection) |
| 21:14:41 | → | lambdabot joins (~lambdabot@silicon.int-e.eu) |
| 21:14:41 | × | lambdabot quits (~lambdabot@silicon.int-e.eu) (Changing host) |
| 21:14:41 | → | lambdabot joins (~lambdabot@haskell/bot/lambdabot) |
| 21:16:12 | × | borne quits (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de) (Ping timeout: 246 seconds) |
| 21:17:53 | → | jules_ joins (~jules@ip201.ip-135-125-227.eu) |
| 21:19:58 | → | gzj joins (~gzj@unaffiliated/gzj) |
| 21:22:07 | → | bugbot joins (~bugbot@185.169.233.10) |
| 21:22:14 | × | wonko7 quits (~wonko7@62.115.229.50) (Ping timeout: 268 seconds) |
| 21:22:55 | → | wonko7 joins (~wonko7@62.115.229.50) |
| 21:23:56 | → | borne joins (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de) |
| 21:28:24 | × | wonko7 quits (~wonko7@62.115.229.50) (Ping timeout: 268 seconds) |
| 21:28:34 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 21:32:54 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 258 seconds) |
| 21:33:58 | × | dpl_ quits (~dpl@77.121.78.163) (Read error: Connection reset by peer) |
| 21:36:04 | × | Guest90523 quits (~textual@zrcout.mskcc.org) (Quit: Textual IRC Client: www.textualapp.com) |
| 21:36:09 | → | fendor_ joins (~fendor@91.141.3.64.wireless.dyn.drei.com) |
| 21:37:06 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 21:38:25 | × | fendor quits (~fendor@178.165.130.8.wireless.dyn.drei.com) (Ping timeout: 252 seconds) |
| 21:38:52 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 21:40:10 | → | Alleria joins (~textual@zrcout.mskcc.org) |
| 21:40:33 | Alleria | is now known as Guest50609 |
| 21:42:33 | → | Lycurgus joins (~niemand@98.4.120.166) |
| 21:46:03 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 265 seconds) |
| 21:46:29 | × | sqrt2 quits (~ben@unaffiliated/sqrt2) (Read error: Connection reset by peer) |
| 21:46:39 | → | sqrt2 joins (~ben@unaffiliated/sqrt2) |
| 21:48:35 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 21:51:52 | <_fcntl> | (woohoo! at last, built ghc 9.2...) |
| 21:52:44 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
| 21:53:03 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 21:54:17 | → | RusAlex joins (~Chel@unaffiliated/rusalex) |
| 21:54:34 | × | coot quits (~coot@37.30.55.131.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 21:55:19 | × | neiluj quits (~jco@unaffiliated/neiluj) (Quit: leaving) |
| 21:56:13 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 21:57:11 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds) |
| 21:59:41 | → | conal_ joins (~conal@64.71.133.70) |
| 22:00:02 | × | vgtw quits (~vgtw@gateway/tor-sasl/vgtw) (Remote host closed the connection) |
| 22:00:18 | → | vgtw joins (~vgtw@gateway/tor-sasl/vgtw) |
| 22:00:35 | → | Rudd0 joins (~Rudd0@185.189.115.108) |
| 22:02:11 | × | sqrt2 quits (~ben@unaffiliated/sqrt2) (Ping timeout: 240 seconds) |
| 22:02:23 | → | sqrt2_ joins (~ben@unaffiliated/sqrt2) |
| 22:02:29 | × | _fcntl quits (~jaroslawj@185.234.208.208.r.toneticgroup.pl) (Quit: leaving) |
| 22:02:58 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood) |
| 22:04:13 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 22:09:13 | × | Franciman quits (~francesco@host-79-53-62-46.retail.telecomitalia.it) (Quit: Leaving) |
| 22:11:11 | × | malumore quits (~malumore@151.62.117.70) (Ping timeout: 260 seconds) |
| 22:12:06 | × | kiweun quits (~kiweun@2607:fea8:2a62:9600:f936:9f33:4140:eb88) (Remote host closed the connection) |
| 22:14:40 | × | ddellacosta quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Remote host closed the connection) |
| 22:15:43 | → | ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 22:18:44 | × | Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.) |
| 22:20:12 | × | ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 268 seconds) |
| 22:23:17 | × | MrMobius quits (~MrMobius@208.58.206.154) (Ping timeout: 268 seconds) |
| 22:24:43 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 22:27:05 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 22:27:48 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 22:30:19 | → | MrMobius joins (~MrMobius@208.58.206.154) |
| 22:32:25 | → | geowiesnot joins (~user@87-89-181-157.abo.bbox.fr) |
| 22:35:29 | × | LKoen quits (~LKoen@65.250.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
| 22:39:18 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 22:40:12 | × | borne quits (~fritjof@200116b86411e500f7ed9fd86a2491f0.dip.versatel-1u1.de) (Ping timeout: 246 seconds) |
| 22:42:37 | → | borne joins (~fritjof@vpn05.bremen.freifunk.net) |
| 22:43:05 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 22:43:17 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Client Quit) |
| 22:43:55 | × | michalz quits (~user@185.246.204.56) (Remote host closed the connection) |
| 22:45:18 | × | elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Ping timeout: 240 seconds) |
| 22:46:12 | → | cmeans joins (0cbb7484@12.187.116.132) |
| 22:46:21 | → | ddellaco_ joins (~ddellacos@ool-44c73afa.dyn.optonline.net) |
| 22:48:26 | <cmeans> | Hi, newbie to Haskell...going through Youtube videos at present...got a random question...is there a way to declare a type of List that has a fixed length? |
| 22:48:55 | <cmeans> | Sort of, type Row a = [a], length [a] == 7 |
| 22:49:17 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 22:50:18 | × | zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving) |
| 22:52:07 | × | ddellaco_ quits (~ddellacos@ool-44c73afa.dyn.optonline.net) (Ping timeout: 252 seconds) |
| 22:52:25 | → | zaquest joins (~notzaques@5.128.210.178) |
| 22:53:41 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds) |
| 22:54:50 | <hpc> | is this a "point me at a package" question or a "how would it work" question? |
| 22:55:42 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 22:55:48 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) (Remote host closed the connection) |
| 22:55:59 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 246 seconds) |
| 22:56:20 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) |
| 22:56:57 | × | notzmv quits (~zmv@unaffiliated/zmv) (Read error: Connection reset by peer) |
| 22:58:57 | → | argento joins (~argent0@191.81.225.82) |
| 23:00:07 | <cmeans> | More of a can it be done, if it even makes sense, and if so, how. |
| 23:00:52 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 23:00:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 23:01:03 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:513e:9602:428e:657f) |
| 23:01:21 | → | Guest89795 joins (~zmv@unaffiliated/zmv) |
| 23:01:34 | <cmeans> | I'm a seasoned programmer, but new to functional programming. |
| 23:01:46 | <hpc> | so, it does make sense |
| 23:02:07 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:513e:9602:428e:657f) (Client Quit) |
| 23:02:09 | <hpc> | and the generalization of that idea is one of my favorite topics in computer science |
| 23:02:17 | <cmeans> | OK, I'm ahead by 1. |
| 23:02:17 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 246 seconds) |
| 23:02:32 | <hpc> | the thing to google is "dependent types", meaning types that depend on values |
| 23:02:36 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) (Ping timeout: 258 seconds) |
| 23:02:59 | <cmeans> | Excellent. I'm off. Thanks hpc. |
| 23:03:09 | <hpc> | or in other words, type-level functions that take value-level things as parameters |
| 23:03:14 | <hpc> | :D |
| 23:03:43 | <cmeans> | =L |
| 23:03:46 | × | finn_elija quits (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) (Remote host closed the connection) |
| 23:04:34 | × | conal_ quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 23:05:03 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:9ef:d80a:d8b:a18d) |
| 23:05:22 | × | mouseghost quits (~draco@wikipedia/desperek) (Quit: mew wew) |
| 23:05:50 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 268 seconds) |
| 23:06:39 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 23:07:25 | → | finn_elija joins (~finn_elij@gateway/tor-sasl/finnelija/x-67402716) |
| 23:07:47 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 23:08:07 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 23:09:11 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 23:09:17 | Guest89795 | is now known as notzmv |
| 23:09:57 | × | argento quits (~argent0@191.81.225.82) (Quit: leaving) |
| 23:10:41 | × | Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Ping timeout: 260 seconds) |
| 23:15:27 | → | stree joins (~stree@68.36.8.116) |
| 23:16:54 | × | tionos quits (~tionos@185.173.235.27) (Quit: leaving) |
| 23:17:23 | → | tionos joins (~tionos@2a0b:b7c4:1:731::1) |
| 23:17:24 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 23:18:09 | → | Tario joins (~Tario@201.192.165.173) |
| 23:21:42 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 23:22:41 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 23:25:10 | <dmwit> | ?pl \n -> scanl (\v i -> v * (n-i+1) `div` i) 1 [1..n] |
| 23:25:10 | <lambdabot> | ap (flip scanl 1 . flip ((.) . (*)) . join . (div .) . flip flip 1 . ((+) .) . (-)) (enumFromTo 1) |
| 23:25:36 | <dmwit> | ?let f = \n -> scanl (\v i -> v * (n-i+1) `div` i) 1 [1..n]; g = ap (flip scanl 1 . flip ((.) . (*)) . join . (div .) . flip flip 1 . ((+) .) . (-)) (enumFromTo 1) |
| 23:25:38 | <lambdabot> | Defined. |
| 23:25:42 | <dmwit> | > f 10 |
| 23:25:43 | <lambdabot> | error: |
| 23:25:43 | <lambdabot> | Ambiguous occurrence ‘f’ |
| 23:25:43 | <lambdabot> | It could refer to |
| 23:25:47 | <dmwit> | ?undefine |
| 23:25:47 | <lambdabot> | Undefined. |
| 23:25:57 | <dmwit> | ?let pointful = \n -> scanl (\v i -> v * (n-i+1) `div` i) 1 [1..n]; pointless = ap (flip scanl 1 . flip ((.) . (*)) . join . (div .) . flip flip 1 . ((+) .) . (-)) (enumFromTo 1) |
| 23:25:58 | <lambdabot> | Defined. |
| 23:26:01 | <dmwit> | > pointful 10 |
| 23:26:03 | <lambdabot> | [1,10,45,120,210,252,210,120,45,10,1] |
| 23:26:04 | <dmwit> | > pointless 10 |
| 23:26:05 | <lambdabot> | [1,10,40,80,80,80,0,0,0,0,0] |
| 23:26:23 | <dmwit> | ? |
| 23:27:12 | → | Guest41032 joins (~laudiacay@67.176.215.84) |
| 23:27:30 | <hpc> | :t pointful |
| 23:27:31 | <lambdabot> | Integral a => a -> [a] |
| 23:27:34 | <hpc> | :t pointless |
| 23:27:35 | <lambdabot> | Integral a => a -> [a] |
| 23:27:35 | × | __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving) |
| 23:27:40 | <hpc> | oh wait, duh |
| 23:27:52 | → | molehillish joins (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) |
| 23:29:16 | <dmwit> | Ah, I bet this is the bug: |
| 23:29:22 | <dmwit> | ?pl \x y z -> x * y `div` z |
| 23:29:22 | <lambdabot> | (. div) . (.) . (*) |
| 23:29:29 | <dmwit> | ?pl \x y z -> x * (y `div` z) |
| 23:29:29 | <lambdabot> | (. div) . (.) . (*) |
| 23:29:57 | <hpc> | > 6 * 4 `div` 3 |
| 23:29:59 | <lambdabot> | 8 |
| 23:30:01 | <dmwit> | ?pl \n -> scanl (\v i -> (v * (n-i+1)) `div` i) 1 [1..n] |
| 23:30:01 | <lambdabot> | ap (flip scanl 1 . flip flip id . (liftM2 div .) . flip ((.) . (*)) . flip flip 1 . ((+) .) . (-)) (enumFromTo 1) |
| 23:30:19 | <hpc> | > ((. div) . (.) . (*)) 6 4 3 |
| 23:30:21 | <lambdabot> | 6 |
| 23:30:24 | <hpc> | fun |
| 23:30:30 | <dmwit> | ?let pointless' = ap (flip scanl 1 . flip flip id . (liftM2 div .) . flip ((.) . (*)) . flip flip 1 . ((+) .) . (-)) (enumFromTo 1) |
| 23:30:31 | <lambdabot> | Defined. |
| 23:30:35 | × | yunusaydin quits (4eb8266d@78.184.38.109) (Quit: Connection closed) |
| 23:30:37 | <dmwit> | > pointless' 10 |
| 23:30:39 | <lambdabot> | [1,10,45,120,210,252,210,120,45,10,1] |
| 23:30:47 | <dmwit> | yay! |
| 23:31:00 | <larryba> | dmwit, does that relate to haskell in any way? using dependent types for fixed length arrays |
| 23:31:58 | <dmwit> | ...what? |
| 23:32:25 | <larryba> | s/dmwit/hpc |
| 23:33:02 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 23:33:03 | <hpc> | someday, yes |
| 23:33:19 | <hpc> | i considered explaining the current methods, but figured it was cleaner to point straight to the end goal |
| 23:33:39 | <hpc> | then when they come back they have a better frame of reference for data kinds and whatnot |
| 23:33:58 | <larryba> | seems like a waste of time for someone who is just trying to learn haskell, which is the impression I got |
| 23:34:03 | <hpc> | ghc is eventually getting full dependent types |
| 23:34:20 | <hpc> | yeah, i clarified first and it was academic curiosity |
| 23:35:13 | × | molehillish quits (~molehilli@2600:8800:8d06:1800:49e2:dd02:cb68:846) (Ping timeout: 250 seconds) |
| 23:35:27 | → | ezrakilty joins (~ezrakilty@97-126-95-37.tukw.qwest.net) |
| 23:35:36 | <dmwit> | For what it's worth, I found the whole singletons thing much easier to follow once I had seen the dependent types version. |
| 23:36:12 | <dmwit> | So even if you just want to learn how to do this kind of thing in today's Haskell it may not be a waste of time. |
| 23:37:11 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Ping timeout: 240 seconds) |
| 23:37:22 | <larryba> | when someone new to haskell asks for fixed-length list, I think they are thinking more in terms of int array[20];, not dependent types in idris |
| 23:37:30 | <dmwit> | Although reading back, another answer I would consider giving in this situation is `data ListOfLength7 a = ListOfLength7 a a a a a a a`. =P |
| 23:37:58 | <dmwit> | Well, see, `int array[20]` is a really interesting declaration. This property is not actually checked by the compiler. |
| 23:38:35 | <dmwit> | e.g. if you write `void foo(int array[20]); int bar[7];`, then `foo(bar)` is "well-typed" according to the C compiler. |
| 23:38:38 | <larryba> | dmwit, it certainly is. sizeof array, which is evaluated at compile time, returns sizeof(int) * 20 |
| 23:38:48 | <pjb> | or something like: data ListOfLength n a = a ListOfLength (n-1) a ; ListOfLength 0 a = () -- ? |
| 23:38:59 | <hpc> | int array[20] is more like foo :: Array a; foo = newEmptyArray 20 |
| 23:39:17 | <hpc> | because when you write your functions that operate on that array, the type signature is int[], not int[20] |
| 23:39:46 | <dmwit> | pjb: That kind of thing is cromulent with dependent types, but not with plain Haskell. (There is a variant that works in today's GHC-based Haskell, but it's much more verbose.) |
| 23:39:57 | <pjb> | ok |
| 23:40:15 | <hpc> | and not particularly satisfying for someone to which "I'm a seasoned programmer, but new to functional programming." applies |
| 23:40:18 | × | Axman6 quits (~Axman6@pdpc/supporter/student/Axman6) (Ping timeout: 240 seconds) |
| 23:40:42 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 23:40:54 | <hpc> | tuples aren't terribly new either, anyone can write struct {a thingone; a thingtwo; ...} |
| 23:40:58 | <dmwit> | larryba: Yes, but (as I allude to above) `sizeof` is not the only consumer of arrays. |
| 23:41:25 | × | larryba quits (~bc8134e3@199.204.85.195) (Disconnected by services) |
| 23:41:28 | <dmwit> | larryba: And indeed even `sizeof` does not survive a function-call boundary. |
| 23:41:35 | → | larryba joins (~bc8134e3@1582020-static.lxtnkya3.metronetinc.net) |
| 23:41:39 | <larryba> | dmwit, that's because array in void foo(int array[20]) is not an array, it is a pointer to int |
| 23:42:18 | <dmwit> | larryba: Right. So in C, it's not possible to write a type that is an array of a given length and have the compiler check this property. |
| 23:42:26 | <larryba> | it is C's syntactic weirdness, that applies only to function arguments |
| 23:42:39 | <dmwit> | Functions are kind a core to programming. =) |
| 23:43:45 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 23:43:47 | <larryba> | dmwit, that's not correct; int main() { int array[100]; sizeof array returns sizeof(int) * 100 |
| 23:44:04 | <dmwit> | larryba: Right. So? |
| 23:44:06 | × | geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 23:44:24 | <larryba> | so.. compiled checked that property (length), with compile-time construct, sizeof |
| 23:44:27 | <dmwit> | larryba: Just because one part of the language gets this right doesn't mean all parts of the language get it right. |
| 23:44:29 | <larryba> | compiler* |
| 23:44:30 | × | ezrakilty quits (~ezrakilty@97-126-95-37.tukw.qwest.net) (Remote host closed the connection) |
| 23:45:23 | <dmwit> | (I am perfectly happy to ignore the bit of the language that lets you write an incorrect cast. Pretty much every language offers this.) |
| 23:46:47 | <dmwit> | larryba: Or, for another example that doesn't involve function boundaries: how would I write the type "pointer to array[20]" and have the compiler check that I only ever write pointers to correct-length arrays in there? |
| 23:46:55 | <larryba> | btw I'm not sure what C's array-to-pointer decay has to do with my initial point |
| 23:47:36 | <dmwit> | My point is that you think `int[20]` is easy. But it isn't, and the fact that it "appears" easy in C is deceptive. |
| 23:47:46 | <larryba> | so now you want bounds checking? |
| 23:47:50 | <dmwit> | To do a good job of it, you more or less have to go all the way to dependent types. |
| 23:47:57 | <dmwit> | No, not bounds checking. Only length checking. |
| 23:48:00 | <dmwit> | Which was the original request. |
| 23:48:25 | <dmwit> | I do not demand that my runtime index be checked to be in bounds. Only that arrays stored in a variable have a given length. |
| 23:48:45 | → | Axman6 joins (~Axman6@pdpc/supporter/student/Axman6) |
| 23:49:08 | <larryba> | void foo(int (*array)[20]) <- ignoring casts, you can only pass a pointer to array of 20 ints to this function. if you try to pass a pointer to 21 ints, you will get a compile time diagnostic |
| 23:49:35 | <larryba> | but arrays in C have the knowledge of their length. you are confusing them with pointers, which is what you get when you pass an array to a function |
| 23:49:47 | <larryba> | (unless you wrap it in a struct) |
| 23:53:04 | <dmwit> | Okay! |
| 23:53:30 | <dmwit> | There's lots of fun operations that int[20] doesn't offer. But I agree that it is better than I thought it was. |
| 23:55:42 | <dmwit> | (e.g. I doubt you can implement `void concat(int (*out)[m+n], int(*a)[m], int(*b)[n])` in any meaningful way. But then C doesn't pretend to offer polymorphism in the first place.) |
| 23:57:27 | <larryba> | of course you can't, but that was my point, I'm pretty sure OP just wondered if there's a fixed size list-like data structure, like plain, dumb array in C, and now he's googling about dependent types :) |
| 23:58:33 | <dmwit> | Maybe! Hard to know what was in OP's head. |
| 23:59:15 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
All times are in UTC on 2021-03-31.