Logs on 2021-06-09 (liberachat/#haskell)
| 00:00:00 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90fb:e693:9986:91e0) (Remote host closed the connection) |
| 00:00:33 | × | derelict quits (~winter@2603-6011-f901-9e5b-78b5-8b2f-cdb2-4171.res6.spectrum.com) (Quit: WeeChat 3.1) |
| 00:02:02 | sm_ | is now known as sm |
| 00:02:46 | → | ddellacosta joins (~ddellacos@86.106.121.116) |
| 00:07:10 | × | ddellacosta quits (~ddellacos@86.106.121.116) (Ping timeout: 250 seconds) |
| 00:07:53 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:90fb:e693:9986:91e0) |
| 00:09:10 | × | marinelli quits (~marinelli@gateway/tor-sasl/marinelli) (Ping timeout: 252 seconds) |
| 00:09:38 | → | marinelli joins (~marinelli@gateway/tor-sasl/marinelli) |
| 00:10:36 | → | hmmmas joins (~chenqisu1@183.217.201.236) |
| 00:11:08 | → | agumonke` joins (~user@88.163.231.79) |
| 00:11:39 | → | thedward[m] joins (~thedwardm@2001:470:69fc:105::f79) |
| 00:13:31 | × | Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.) |
| 00:17:11 | → | pe200012 joins (~pe200012@58.248.179.180) |
| 00:17:27 | × | nkpart quits (uid3844@id-3844.highgate.irccloud.com) (Quit: Connection closed for inactivity) |
| 00:17:46 | → | Guest53 joins (~Guest53@2601:640:4080:dca0:196f:8963:ff06:765b) |
| 00:18:37 | × | agumonke` quits (~user@88.163.231.79) (Read error: Connection reset by peer) |
| 00:18:39 | × | Guest53 quits (~Guest53@2601:640:4080:dca0:196f:8963:ff06:765b) (Client Quit) |
| 00:20:50 | → | agumonke` joins (~user@88.163.231.79) |
| 00:22:28 | <slack1256> | If I define `newtype Supremum a b = MkS a deriving Eq` and I load that module on ghci, run `:info Supremum` that prints `instance (Eq a) => Eq (Supremum a)`. That instance context is implicitly declared on my `deriving` clause, is that part of the haskell report? Is that "smartness" specified somewhere? |
| 00:22:45 | × | Deide quits (~Deide@user/deide) (Quit: Seeee yaaaa) |
| 00:22:49 | × | zeenk quits (~zeenk@2a02:2f04:a310:b600:b098:bf18:df4d:4c41) (Quit: Konversation terminated!) |
| 00:25:27 | → | trent joins (~trent@2001:8003:340d:d00:b2de:b98:7a93:b0ea) |
| 00:25:46 | <jaevanko> | If you replace the `MkS a` with `MkS b`, would the instance bound change to Eq b? |
| 00:27:08 | <slack1256> | Yes. It seems it does some analysis. |
| 00:29:09 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
| 00:29:41 | → | derelict joins (~winter@2603-6011-f901-9e5b-78b5-8b2f-cdb2-4171.res6.spectrum.com) |
| 00:33:43 | <geekosaur> | yes, this is defined in the Report |
| 00:34:01 | → | FunctorPunk joins (~igloo@c-73-119-137-166.hsd1.ma.comcast.net) |
| 00:34:33 | <ski> | slack1256 : <https://www.haskell.org/onlinereport/derived.html> |
| 00:34:35 | × | FunctorPunk quits (~igloo@c-73-119-137-166.hsd1.ma.comcast.net) (Client Quit) |
| 00:34:49 | <slack1256> | Thank god. |
| 00:34:53 | <geekosaur> | https://www.haskell.org/onlinereport/haskell2010/haskellch11.html#x18-18300011.1 |
| 00:35:52 | <slack1256> | This is awesome, I feel I can rely on such behaviour now! |
| 00:36:18 | <slack1256> | I was exploring if we should enable some kind of instance context specification on the deriving clauses :fear: . |
| 00:38:04 | → | renzhi joins (~xp@2607:fa49:6500:bc00::e7b) |
| 00:38:58 | × | xkuru quits (~xkuru@user/xkuru) (Ping timeout: 258 seconds) |
| 00:39:10 | <ski> | slack1256 : you can write `deriving instance Eq a => Eq (Supremum a b)' as a separate declaration, if you enable `StandaloneDeriving' |
| 00:41:16 | <slack1256> | Got it. |
| 00:41:40 | → | xkuru joins (~xkuru@user/xkuru) |
| 00:41:55 | × | renzhi quits (~xp@2607:fa49:6500:bc00::e7b) (Client Quit) |
| 00:43:04 | → | renzhi joins (~xp@2607:fa49:6500:bc00::e7b) |
| 00:45:17 | <slack1256> | TIL: `StandaloneDeriving` helps recover `stock` deriving for GADTs and have more specific instance context with stock deriving. |
| 00:45:20 | <slack1256> | Awesome stuff. |
| 00:47:01 | × | MQ-17J quits (~MQ-17J@8.21.10.116) (Ping timeout: 258 seconds) |
| 00:53:03 | × | fjmorazan quits (~quassel@user/fjmorazan) (Quit: fjmorazan) |
| 00:53:45 | → | fjmorazan joins (~quassel@user/fjmorazan) |
| 01:02:10 | × | lbseale quits (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer) |
| 01:03:59 | → | yd502 joins (~yd502@180.168.212.6) |
| 01:08:09 | → | yd502_ joins (~yd502@180.168.212.6) |
| 01:08:12 | × | xkuru quits (~xkuru@user/xkuru) (Ping timeout: 252 seconds) |
| 01:10:29 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 245 seconds) |
| 01:10:31 | × | Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Ping timeout: 264 seconds) |
| 01:10:33 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:90fb:e693:9986:91e0) (Remote host closed the connection) |
| 01:10:52 | × | otto_s quits (~user@p5de2f98e.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 01:12:26 | → | xff0x_ joins (~xff0x@2001:1a81:52c9:6b00:ea05:f1db:1e96:7c29) |
| 01:14:43 | × | geekosaur quits (~geekosaur@069-135-003-034.biz.spectrum.com) (Ping timeout: 264 seconds) |
| 01:15:38 | × | xff0x quits (~xff0x@port-92-193-150-196.dynamic.as20676.net) (Ping timeout: 250 seconds) |
| 01:15:55 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b95b:27c0:9816:d7ad) |
| 01:22:06 | × | fluffyballoon quits (~fluffybal@2620:72:0:6480::10f7) (Ping timeout: 250 seconds) |
| 01:22:43 | → | dualinverter[m] joins (~dualinver@2001:470:69fc:105::16a7) |
| 01:25:34 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 01:28:46 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 01:31:58 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Remote host closed the connection) |
| 01:34:47 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 01:37:09 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 272 seconds) |
| 01:38:27 | × | pe200012 quits (~pe200012@58.248.179.180) (Ping timeout: 252 seconds) |
| 01:38:41 | → | pe200012 joins (~pe200012@58.248.179.180) |
| 01:38:48 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 01:41:54 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 01:43:48 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 01:44:38 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 01:45:03 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 252 seconds) |
| 01:48:28 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 01:50:25 | → | haltux joins (~haltux@a89-154-181-47.cpe.netcabo.pt) |
| 01:57:42 | × | pbrisbin quits (~patrick@pool-72-92-38-164.phlapa.fios.verizon.net) (Ping timeout: 252 seconds) |
| 01:58:57 | → | AgentM joins (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net) |
| 02:00:42 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 250 seconds) |
| 02:00:58 | → | lavaman joins (~lavaman@98.38.249.169) |
| 02:03:51 | → | ddellacosta joins (~ddellacos@86.106.121.84) |
| 02:05:22 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 244 seconds) |
| 02:05:34 | → | unyu joins (~pyon@user/pyon) |
| 02:06:24 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:06:24 | FinnElija | is now known as Guest2126 |
| 02:06:24 | finn_elija | is now known as FinnElija |
| 02:07:57 | × | ddellacosta quits (~ddellacos@86.106.121.84) (Ping timeout: 244 seconds) |
| 02:09:26 | × | Guest2126 quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 258 seconds) |
| 02:11:44 | × | td_ quits (~td@muedsl-82-207-238-242.citykom.de) (Ping timeout: 258 seconds) |
| 02:13:51 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 02:15:38 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 02:18:19 | × | qoelet quits (~kumo@139.180.144.166) (Ping timeout: 264 seconds) |
| 02:20:13 | × | trent quits (~trent@2001:8003:340d:d00:b2de:b98:7a93:b0ea) (Ping timeout: 272 seconds) |
| 02:21:50 | → | qoelet joins (~kumo@139.180.144.166) |
| 02:22:09 | → | ddellacosta joins (~ddellacos@86.106.121.69) |
| 02:23:17 | → | myShoggoth joins (~myShoggot@97-120-89-117.ptld.qwest.net) |
| 02:26:33 | × | ddellacosta quits (~ddellacos@86.106.121.69) (Ping timeout: 244 seconds) |
| 02:27:31 | → | wei2912 joins (~wei2912@112.199.250.21) |
| 02:27:35 | × | myShoggoth quits (~myShoggot@97-120-89-117.ptld.qwest.net) (Ping timeout: 244 seconds) |
| 02:27:57 | → | myShoggoth joins (~myShoggot@97-120-89-117.ptld.qwest.net) |
| 02:28:45 | × | qoelet quits (~kumo@139.180.144.166) (Quit: WeeChat 2.9) |
| 02:29:46 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 02:29:47 | → | c_wraith joins (~c_wraith@adjoint.us) |
| 02:30:46 | × | danso quits (~danso@23-233-111-52.cpe.pppoe.ca) (Quit: WeeChat 3.1) |
| 02:31:51 | × | nattiestnate quits (~nate@36.70.194.182) (Quit: WeeChat 3.1) |
| 02:33:03 | → | Bartosz joins (~textual@24.35.90.211) |
| 02:34:21 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 258 seconds) |
| 02:35:30 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 258 seconds) |
| 02:35:48 | × | c_l_ste quits (~celeste@ip68-12-146-37.ok.ok.cox.net) (Ping timeout: 250 seconds) |
| 02:37:25 | × | nilof quits (~olofs@90-227-86-119-no542.tbcn.telia.com) (Ping timeout: 258 seconds) |
| 02:43:02 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 02:45:30 | → | a6a45081-2b83 joins (~aditya@223.226.227.160) |
| 02:47:12 | × | peterhil quits (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) (Ping timeout: 252 seconds) |
| 02:49:39 | → | fresheyeball joins (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) |
| 02:57:23 | × | fresheyeball quits (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9) |
| 02:57:28 | × | a6a45081-2b83 quits (~aditya@223.226.227.160) (Quit: Konversation terminated!) |
| 02:59:57 | × | Bartosz quits (~textual@24.35.90.211) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 03:00:03 | → | realtime joins (~realtime@177.18.185.16) |
| 03:00:12 | × | realtime quits (~realtime@177.18.185.16) (Remote host closed the connection) |
| 03:01:52 | → | fresheyeball joins (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) |
| 03:01:55 | → | realtime joins (~realtime@177.18.185.16) |
| 03:03:26 | × | realtime quits (~realtime@177.18.185.16) (Client Quit) |
| 03:03:49 | → | realtime joins (~realtime@177.18.185.16) |
| 03:07:41 | → | c_l_ste joins (~celeste@ip68-12-146-37.ok.ok.cox.net) |
| 03:08:51 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 258 seconds) |
| 03:11:40 | → | notzmv joins (~zmv@user/notzmv) |
| 03:13:05 | → | lavaman joins (~lavaman@98.38.249.169) |
| 03:14:41 | × | Codaraxis quits (~Codaraxis@89.45.7.142) (Remote host closed the connection) |
| 03:14:59 | → | Codaraxis joins (~Codaraxis@89.45.7.142) |
| 03:17:31 | × | emergence quits (~emergence@vm0.max-p.me) (Quit: emergence) |
| 03:18:15 | → | emergence joins (~emergence@vm0.max-p.me) |
| 03:19:59 | → | relrod joins (~relrod@redhat/ansible.staff.relrod) |
| 03:21:11 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 03:22:56 | → | trent joins (~trent@2001:8003:340d:d00:b2de:b98:7a93:b0ea) |
| 03:25:42 | <guest61> | ski yes I did, use case of instead of !! or use data structure |
| 03:29:23 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 03:30:24 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 250 seconds) |
| 03:30:37 | Lord_of_Life_ | is now known as Lord_of_Life |
| 03:36:14 | <trent> | Hi everyone, I have started reading about GADTs and want to see if my intuition is correct about them. Are they basically used over standard unions as a way to do 'overloading' of a function's return type? Overloading in the sense of OOP method overloading. |
| 03:38:54 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 252 seconds) |
| 03:42:09 | <glguy> | trent, I don't think they have much to do with OOP method overloading |
| 03:43:42 | <trent> | Damn, I was hoping thats all they were used for - to handle different return types |
| 03:44:12 | <trent> | What use are they then? I guess I have started reading about them before I have a use case |
| 03:44:57 | <monochrom> | The GHC user's guide has a very prototypical example. |
| 03:47:12 | <trent> | monochrom: The Term example? Thats where I thought I understood them in this way |
| 03:47:44 | × | yd502_ quits (~yd502@180.168.212.6) (Ping timeout: 250 seconds) |
| 03:48:44 | × | bitmapper quits (uid464869@id-464869.tooting.irccloud.com) (Quit: Connection closed for inactivity) |
| 03:50:29 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds) |
| 04:00:46 | × | realtime quits (~realtime@177.18.185.16) (Quit: Leaving) |
| 04:01:14 | × | Adran quits (adran@botters/adran) (Quit: Este é o fim.) |
| 04:01:25 | × | zebrag quits (~chris@user/zebrag) (Remote host closed the connection) |
| 04:01:32 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 04:01:44 | → | yd502_ joins (~yd502@180.168.212.6) |
| 04:01:45 | <c_wraith> | trent: if all you care about is returning multiple types, you can use regular data types to do that. |
| 04:02:00 | × | pe200012 quits (~pe200012@58.248.179.180) (Ping timeout: 252 seconds) |
| 04:02:13 | → | pe200012 joins (~pe200012@58.248.179.180) |
| 04:02:54 | → | Adran joins (~adran@botters/adran) |
| 04:02:55 | <glguy> | trent, here's a little GADT example: https://bpa.st/FHHA |
| 04:02:56 | <trent> | Then I think I am not 'getting' the use of GADT's. |
| 04:03:43 | <glguy> | With GADTs you can constraint what types each constructor works at, and you can learn those constraints through pattern matching |
| 04:04:03 | <glguy> | parameterized data types no longer have to work for all possible instantiations of their parameters |
| 04:04:27 | <trent> | glguy: What does GADT give you in that example that you wouldnt get with a simple union type? |
| 04:04:49 | <glguy> | trent, change the example not to use a gadt |
| 04:05:14 | <glguy> | make it a simple union type and then fix the file and see where it goes |
| 04:05:37 | <glguy> | ideally you'll have a realization along the way where you get stuck :) |
| 04:06:13 | <glguy> | if not come back with questions, but it's a chance to figure some stuff out |
| 04:06:24 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 252 seconds) |
| 04:07:18 | × | Adran quits (~adran@botters/adran) (Client Quit) |
| 04:07:18 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 04:08:05 | → | MQ-17J joins (~MQ-17J@8.21.10.116) |
| 04:09:24 | → | Adran joins (~adran@botters/adran) |
| 04:11:38 | × | hmmmas quits (~chenqisu1@183.217.201.236) (Quit: Leaving.) |
| 04:14:02 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 04:15:44 | <trent> | glguy: thank you for that, I am working through it now. |
| 04:16:11 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 04:18:15 | → | wallymathieu[m] joins (~wallymath@2001:470:69fc:105::16ae) |
| 04:21:31 | × | Adran quits (~adran@botters/adran) (Quit: Este é o fim.) |
| 04:22:15 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 04:23:19 | → | Hoch joins (~Hoch@191.96.170.83) |
| 04:23:41 | → | ddellacosta joins (~ddellacos@89.46.62.125) |
| 04:24:35 | → | Sgeo_ joins (~Sgeo@ool-18b9875e.dyn.optonline.net) |
| 04:25:02 | → | fendor__ joins (~fendor@178.165.130.85.wireless.dyn.drei.com) |
| 04:25:04 | ← | Hoch parts (~Hoch@191.96.170.83) () |
| 04:25:05 | → | spatchkaa_ joins (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) |
| 04:25:45 | → | MidAutumnMoon3 joins (~MidAutumn@user/midautumnmoon) |
| 04:26:43 | → | pierrot_ joins (~pi@user/pierrot) |
| 04:27:02 | → | Adran joins (~adran@botters/adran) |
| 04:27:58 | × | ddellacosta quits (~ddellacos@89.46.62.125) (Ping timeout: 244 seconds) |
| 04:28:06 | → | cheater1__ joins (~Username@user/cheater) |
| 04:28:42 | → | Solarion_ joins (~solarion@mail.digitasaru.net) |
| 04:28:56 | → | evie1 joins (~evie@188.27.66.89) |
| 04:28:58 | → | kmein_ joins (~weechat@user/kmein) |
| 04:29:03 | → | xerox_ joins (~edi@user/edi) |
| 04:29:06 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 04:29:06 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (strontium.libera.chat (Nickname regained by services))) |
| 04:29:06 | finn_elija | is now known as FinnElija |
| 04:29:12 | → | fresheye1 joins (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) |
| 04:29:14 | → | Clint_ joins (~Clint@user/clint) |
| 04:29:35 | × | alx741 quits (~alx741@181.196.69.18) (Quit: alx741) |
| 04:29:37 | → | Erutuon_ joins (~Erutuon@user/erutuon) |
| 04:30:41 | × | derelict quits (~winter@2603-6011-f901-9e5b-78b5-8b2f-cdb2-4171.res6.spectrum.com) (Ping timeout: 272 seconds) |
| 04:31:01 | → | jespada_ joins (~jespada@90.254.242.55) |
| 04:32:21 | × | yd502_ quits (~yd502@180.168.212.6) (Remote host closed the connection) |
| 04:32:40 | → | TheCoffeMaker_ joins (~TheCoffeM@125-121-245-190.fibertel.com.ar) |
| 04:32:58 | × | Adran quits (~adran@botters/adran) (Quit: Este é o fim.) |
| 04:33:58 | × | fresheyeball quits (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) (*.net *.split) |
| 04:33:58 | × | fendor_ quits (~fendor@178.165.130.85.wireless.dyn.drei.com) (*.net *.split) |
| 04:33:58 | × | jespada quits (~jespada@90.254.242.55) (*.net *.split) |
| 04:33:58 | × | xsperry quits (~as@user/xsperry) (*.net *.split) |
| 04:33:58 | × | ukari quits (~ukari@user/ukari) (*.net *.split) |
| 04:33:58 | × | Erutuon quits (~Erutuon@user/erutuon) (*.net *.split) |
| 04:33:58 | × | kmein quits (~weechat@user/kmein) (*.net *.split) |
| 04:33:58 | × | pierrot quits (~pi@user/pierrot) (*.net *.split) |
| 04:33:58 | × | kaol quits (~kaol@178.62.241.234) (*.net *.split) |
| 04:33:58 | × | Clint quits (~Clint@user/clint) (*.net *.split) |
| 04:33:58 | × | davean quits (~davean@davean.sciesnet.net) (*.net *.split) |
| 04:33:58 | × | asm quits (~alexander@user/asm) (*.net *.split) |
| 04:33:58 | × | Solarion quits (~solarion@mail.digitasaru.net) (*.net *.split) |
| 04:33:58 | × | spatchkaa quits (~spatchkaa@s010600fc8da47b63.gv.shawcable.net) (*.net *.split) |
| 04:33:58 | × | cheater quits (~Username@user/cheater) (*.net *.split) |
| 04:33:58 | × | Sgeo quits (~Sgeo@user/sgeo) (*.net *.split) |
| 04:33:58 | × | fabfianda quits (~fabfianda@net-93-148-121-206.cust.vodafonedsl.it) (*.net *.split) |
| 04:33:58 | × | TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (*.net *.split) |
| 04:33:58 | × | MidAutumnMoon quits (~MidAutumn@user/midautumnmoon) (*.net *.split) |
| 04:33:58 | × | Evie- quits (~evie@user/evie-) (*.net *.split) |
| 04:33:58 | × | xerox quits (~edi@user/edi) (*.net *.split) |
| 04:33:58 | × | tv quits (~tv@user/tv) (*.net *.split) |
| 04:33:59 | MidAutumnMoon3 | is now known as MidAutumnMoon |
| 04:34:02 | cheater1__ | is now known as cheater |
| 04:34:23 | → | kaol joins (~kaol@178.62.241.234) |
| 04:35:11 | → | mrufrufin joins (~dxk@108.235.170.90) |
| 04:36:28 | → | awth13 joins (~user@185.209.196.143) |
| 04:36:34 | → | Adran joins (adran@botters/adran) |
| 04:36:58 | × | Adran quits (adran@botters/adran) (Remote host closed the connection) |
| 04:37:24 | × | awth13 quits (~user@185.209.196.143) (Remote host closed the connection) |
| 04:37:40 | × | ordinate quits (~ordinate@c-68-38-144-3.hsd1.in.comcast.net) (Quit: Leaving) |
| 04:37:47 | → | awth13 joins (~user@185.209.196.143) |
| 04:38:16 | × | awth13 quits (~user@185.209.196.143) (Remote host closed the connection) |
| 04:38:38 | → | awth13 joins (~user@185.209.196.143) |
| 04:40:01 | → | asm joins (~alexander@burner.asm89.io) |
| 04:40:02 | → | paddymahoney joins (~paddymaho@cpe9050ca207f83-cm9050ca207f80.cpe.net.cable.rogers.com) |
| 04:40:13 | → | tv joins (~tv@user/tv) |
| 04:40:46 | → | davean joins (~davean@davean.sciesnet.net) |
| 04:40:49 | × | jao quits (~mail@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Read error: No route to host) |
| 04:41:15 | → | ukari joins (~ukari@user/ukari) |
| 04:41:54 | × | slack1256 quits (~slack1256@191.125.38.7) (Ping timeout: 250 seconds) |
| 04:43:30 | × | awth13 quits (~user@185.209.196.143) (Quit: ERC (IRC client for Emacs 27.2)) |
| 04:43:56 | → | awth13 joins (~user@185.209.196.143) |
| 04:44:03 | → | Adran joins (adran@botters/adran) |
| 04:44:43 | ← | awth13 parts (~user@185.209.196.143) () |
| 04:45:45 | → | awth13 joins (~user@185.209.196.143) |
| 04:45:48 | × | awth13 quits (~user@185.209.196.143) (Remote host closed the connection) |
| 04:46:19 | × | renzhi quits (~xp@2607:fa49:6500:bc00::e7b) (Ping timeout: 245 seconds) |
| 04:46:25 | → | awth13 joins (~user@user/awth13) |
| 04:46:58 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 04:47:11 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Remote host closed the connection) |
| 04:48:11 | × | awth13 quits (~user@user/awth13) (Client Quit) |
| 04:48:44 | → | juhp joins (~juhp@128.106.188.66) |
| 04:49:22 | <guest61> | cabal and cabal-install are not same thing? |
| 04:49:26 | → | awth13 joins (~user@user/awth13) |
| 04:49:47 | <guest61> | I saw there are cabal and cabal-install in downloads.haskell.org |
| 05:00:54 | × | UpstreamSalmon quits (uid12077@id-12077.stonehaven.irccloud.com) (Quit: Connection closed for inactivity) |
| 05:01:27 | <int-e> | guest61: There are two packages, Cabal (capital C) is a library that can be used to build stand-alone Setup programs, but is also used by the 'cabal-install' package that provides an executable called 'cabal'... |
| 05:02:17 | × | awth13 quits (~user@user/awth13) (Remote host closed the connection) |
| 05:02:30 | × | pe200012 quits (~pe200012@58.248.179.180) (Ping timeout: 252 seconds) |
| 05:02:45 | → | pe200012 joins (~pe200012@183.236.83.76) |
| 05:04:10 | <int-e> | historically, Cabal the library predates cabal the program by a few years, otherwise the package names would probably be different (say, cabal-lib and cabal) |
| 05:09:53 | × | AgentM quits (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net) (Quit: Leaving.) |
| 05:10:07 | → | derelict joins (~winter@2603-6011-f901-9e5b-78b5-8b2f-cdb2-4171.res6.spectrum.com) |
| 05:10:50 | × | charukiewicz quits (~quassel@irouteince04.i.subnet.rcn.com) (Ping timeout: 252 seconds) |
| 05:10:53 | → | charukiewicz_ joins (~quassel@irouteince04.i.subnet.rcn.com) |
| 05:13:09 | → | awth13 joins (~user@user/awth13) |
| 05:16:20 | × | statusbot quits (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Remote host closed the connection) |
| 05:16:35 | → | statusbot joins (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) |
| 05:17:05 | → | Cajun joins (~Cajun@ip98-163-211-112.no.no.cox.net) |
| 05:17:24 | → | yd502 joins (~yd502@180.168.212.6) |
| 05:18:42 | → | phma joins (phma@2001:5b0:211f:5688:8179:a979:62a:8bf6) |
| 05:19:22 | → | Bartosz joins (~textual@24.35.90.211) |
| 05:19:22 | × | Bartosz quits (~textual@24.35.90.211) (Client Quit) |
| 05:19:53 | → | ddellacosta joins (~ddellacos@86.106.121.90) |
| 05:20:24 | → | arjun joins (~user@user/arjun) |
| 05:20:28 | × | phma_ quits (phma@2001:5b0:211f:5688:8179:a979:62a:8bf6) (Ping timeout: 244 seconds) |
| 05:20:48 | <arjun> | https://www.manning.com/books/haskell-in-depth, any reviews on this one people? |
| 05:20:56 | <arjun> | on the fence wether to buy |
| 05:22:38 | × | blankhart quits (~blankhart@pool-72-88-174-206.nwrknj.fios.verizon.net) (Ping timeout: 250 seconds) |
| 05:23:00 | → | blankhart joins (~blankhart@pool-72-88-174-206.nwrknj.fios.verizon.net) |
| 05:24:17 | × | ddellacosta quits (~ddellacos@86.106.121.90) (Ping timeout: 244 seconds) |
| 05:24:30 | → | fabfianda joins (~fabfianda@net-93-148-121-206.cust.dsl.teletu.it) |
| 05:26:38 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 05:27:11 | → | Bartosz joins (~textual@24.35.90.211) |
| 05:30:28 | <arjun> | hi Bartosz : P |
| 05:31:03 | → | chomwitt joins (~Pitsikoko@2a02:587:dc02:b00:98b0:cd42:bd6f:8295) |
| 05:31:46 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 05:32:45 | × | xff0x_ quits (~xff0x@2001:1a81:52c9:6b00:ea05:f1db:1e96:7c29) (Ping timeout: 272 seconds) |
| 05:33:22 | → | mikoto-chan joins (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) |
| 05:33:27 | → | xff0x_ joins (~xff0x@2001:1a81:52c9:6b00:ad16:d7f9:3b66:59f3) |
| 05:35:01 | → | dut joins (~dut@user/dut) |
| 05:38:59 | → | lavaman joins (~lavaman@98.38.249.169) |
| 05:40:32 | → | wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com) |
| 05:42:08 | → | Guest78 joins (~Guest78@115.236.91.18) |
| 05:42:36 | <Guest78> | hello all |
| 05:46:07 | → | danidiaz joins (~ESDPC@static-35-0-85-188.ipcom.comunitel.net) |
| 05:47:49 | <Axman6> | Hello |
| 05:48:09 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 05:48:14 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Read error: Connection reset by peer) |
| 05:48:52 | → | TheRAt joins (~TheRAt@user/therat) |
| 05:50:32 | × | zmt01 quits (~zmt00@user/zmt00) (Quit: Gone.) |
| 05:50:43 | × | Guest78 quits (~Guest78@115.236.91.18) (Quit: Client closed) |
| 05:52:20 | <guest61> | aha, compile ghc on arm successfully |
| 05:52:28 | <Axman6> | noice |
| 05:53:57 | <guest61> | by the way, there's an error in that configure file |
| 05:54:23 | <guest61> | gcc -V -qversion , those two parameters are invalid |
| 05:55:28 | <Axman6> | if it's the ghc configure file, this isn't really the place to report it, the GHC gitlab is probably a better place (perhaps asking in #ghc might help) |
| 05:56:27 | <guest61> | ok |
| 05:56:43 | → | statusbot1 joins (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) |
| 05:56:52 | → | Codaraxis_ joins (~Codaraxis@89.45.7.142) |
| 05:57:16 | × | statusbot quits (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Remote host closed the connection) |
| 05:57:21 | × | Codaraxis quits (~Codaraxis@89.45.7.142) (Read error: Connection reset by peer) |
| 05:57:21 | × | arjun quits (~user@user/arjun) (Ping timeout: 244 seconds) |
| 05:57:27 | × | Scotty_Trees quits (~Scotty_Tr@162-234-179-169.lightspeed.brhmal.sbcglobal.net) (Read error: Connection reset by peer) |
| 05:57:31 | × | aerona quits (~aerona@2600:6c54:4600:f300:7c57:ac62:2191:e44b) (Read error: Connection reset by peer) |
| 05:57:47 | → | Scotty_Trees joins (~Scotty_Tr@162-234-179-169.lightspeed.brhmal.sbcglobal.net) |
| 05:58:40 | × | marinelli quits (~marinelli@gateway/tor-sasl/marinelli) (Quit: marinelli) |
| 06:01:44 | × | chomwitt quits (~Pitsikoko@2a02:587:dc02:b00:98b0:cd42:bd6f:8295) (Quit: Leaving) |
| 06:01:57 | → | chomwitt joins (~Pitsikoko@2a02:587:dc02:b00:98b0:cd42:bd6f:8295) |
| 06:04:43 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 06:07:17 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 06:13:29 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 06:13:53 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 244 seconds) |
| 06:13:59 | → | yd502_ joins (~yd502@180.168.212.6) |
| 06:14:57 | → | bryan[m] joins (~bchreekat@2001:470:69fc:105::16b5) |
| 06:24:44 | × | xff0x_ quits (~xff0x@2001:1a81:52c9:6b00:ad16:d7f9:3b66:59f3) (Ping timeout: 244 seconds) |
| 06:25:37 | → | xff0x_ joins (~xff0x@2001:1a81:52c9:6b00:a719:2b91:3f7b:5d25) |
| 06:26:20 | × | ridcully quits (~ridcully@pd951f269.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
| 06:27:02 | → | ridcully joins (~ridcully@p508ac428.dip0.t-ipconnect.de) |
| 06:27:02 | × | Sgeo_ quits (~Sgeo@ool-18b9875e.dyn.optonline.net) (Read error: Connection reset by peer) |
| 06:28:04 | × | yd502_ quits (~yd502@180.168.212.6) (Ping timeout: 250 seconds) |
| 06:28:11 | → | yd502 joins (~yd502@180.168.212.6) |
| 06:28:26 | → | Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com) |
| 06:29:04 | xerox_ | is now known as xerox |
| 06:29:37 | → | yd502_ joins (~yd502@180.168.212.6) |
| 06:30:00 | → | tose joins (~tose@ip-85-160-1-181.eurotel.cz) |
| 06:30:33 | → | dunkeln joins (~dunkeln@94.129.65.28) |
| 06:32:29 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 244 seconds) |
| 06:33:31 | × | Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt) |
| 06:33:34 | → | yd502 joins (~yd502@180.168.212.6) |
| 06:34:19 | → | chele joins (~chele@user/chele) |
| 06:35:27 | × | yd502_ quits (~yd502@180.168.212.6) (Ping timeout: 252 seconds) |
| 06:37:38 | → | hughjfchen joins (~hughjfche@vmi556545.contaboserver.net) |
| 06:38:16 | × | hughjfchen quits (~hughjfche@vmi556545.contaboserver.net) (Client Quit) |
| 06:39:12 | × | derelict quits (~winter@2603-6011-f901-9e5b-78b5-8b2f-cdb2-4171.res6.spectrum.com) (Ping timeout: 244 seconds) |
| 06:40:51 | → | v01d4lph4 joins (~v01d4lph4@user/v01d4lph4) |
| 06:41:45 | <dminuoso> | optics question. would you rather use `each %> someIx` or `traversed % someIx`? I cant for my life decide which one is better. |
| 06:41:56 | dminuoso | is bikeshedding quite hard here |
| 06:42:20 | <c_wraith> | is each anything like lens's each? |
| 06:43:32 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 06:43:36 | <c_wraith> | ah, yes it is. |
| 06:43:39 | <dminuoso> | c_wraith: Yeah, except it's fixed to be an indexed traversal |
| 06:43:57 | <c_wraith> | I'd prefer traversed anywhere it works |
| 06:44:44 | <dminuoso> | c_wraith: The key difference is that in optics, `traversed` is a non-indexed traversal, and `each` gives a guaranteed indexed traversal. |
| 06:45:04 | <dminuoso> | And (%) forbids composition if both sides are indexed (requiring you to explicitly opt into <%> which (,)'s the indexes together |
| 06:45:50 | <c_wraith> | Each is the weird ad-hoc class that does whatever someone decided it should. I kind of don't like that. |
| 06:46:04 | <c_wraith> | well, there's itraversed |
| 06:46:21 | <c_wraith> | Not quite as universal as traversed, but it's a lot more obvious what it does |
| 06:46:29 | <dminuoso> | I guess the primary motivation of each is to support tuples |
| 06:46:47 | <dminuoso> | There's also the bit that `each` reads nicely in the optics DSL.. :p |
| 06:47:04 | → | hmmmas joins (~chenqisu1@183.217.201.236) |
| 06:47:56 | → | michalz joins (~michalz@185.246.204.125) |
| 06:48:30 | × | Scotty_Trees quits (~Scotty_Tr@162-234-179-169.lightspeed.brhmal.sbcglobal.net) (Ping timeout: 244 seconds) |
| 06:48:30 | × | myShoggoth quits (~myShoggot@97-120-89-117.ptld.qwest.net) (Ping timeout: 244 seconds) |
| 06:50:48 | × | chomwitt quits (~Pitsikoko@2a02:587:dc02:b00:98b0:cd42:bd6f:8295) (Remote host closed the connection) |
| 06:51:01 | <dminuoso> | or well, I guess that's not entirely true. the index types get combined at the type level, but many combinators require only a single index |
| 06:51:08 | → | nschoe joins (~quassel@178.251.84.79) |
| 06:51:12 | → | chomwitt joins (~Pitsikoko@2a02:587:dc02:b00:98b0:cd42:bd6f:8295) |
| 06:51:26 | <dminuoso> | (i.e. (%) allows composition just fine, but most of the time your optic must have only a single index type) |
| 06:51:40 | <dminuoso> | c_wraith: Yeah I guess. |
| 06:53:03 | × | tose quits (~tose@ip-85-160-1-181.eurotel.cz) (Remote host closed the connection) |
| 06:53:09 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 244 seconds) |
| 06:54:11 | → | jophish joins (~jophish@2001:470:69fc:105::670) |
| 06:54:17 | → | yd502 joins (~yd502@180.168.212.6) |
| 06:55:13 | × | nschoe quits (~quassel@178.251.84.79) (Ping timeout: 244 seconds) |
| 06:55:25 | × | dunkeln quits (~dunkeln@94.129.65.28) (Quit: leaving) |
| 06:56:20 | → | yd502_ joins (~yd502@180.168.212.6) |
| 06:57:23 | → | yd502__ joins (~yd502@180.168.212.6) |
| 06:58:33 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 252 seconds) |
| 06:59:37 | → | yd502 joins (~yd502@180.168.212.6) |
| 07:00:55 | × | yd502_ quits (~yd502@180.168.212.6) (Ping timeout: 264 seconds) |
| 07:01:27 | → | Scotty_Trees joins (~Scotty_Tr@162-234-179-169.lightspeed.brhmal.sbcglobal.net) |
| 07:01:50 | → | nsilv joins (~nsilv@212.103.198.210) |
| 07:01:56 | × | yd502__ quits (~yd502@180.168.212.6) (Ping timeout: 244 seconds) |
| 07:03:07 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:69cc:8900:882e:bc6e) |
| 07:09:41 | × | xff0x_ quits (~xff0x@2001:1a81:52c9:6b00:a719:2b91:3f7b:5d25) (Ping timeout: 244 seconds) |
| 07:10:46 | × | Bartosz quits (~textual@24.35.90.211) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 07:10:48 | → | xff0x_ joins (~xff0x@port-92-195-66-229.dynamic.as20676.net) |
| 07:12:52 | o | is now known as niko |
| 07:13:54 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 07:14:30 | → | Bartosz joins (~textual@24.35.90.211) |
| 07:16:24 | × | MQ-17J quits (~MQ-17J@8.21.10.116) (Ping timeout: 244 seconds) |
| 07:16:41 | → | MQ-17J joins (~MQ-17J@8.21.10.116) |
| 07:17:10 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 07:17:44 | <siers> | can I use lens (in combo with th) to access the "a" which is inside all cases of a disjoint union? Simplest example "Either a a" |
| 07:18:45 | <dminuoso> | siers: use `failing` |
| 07:19:17 | <dminuoso> | Together with unsafeSingular you can even reconstruct a lens from this. |
| 07:19:17 | → | kenran joins (~kenran@200116b82b683c006ea54bdc3ffd5a0f.dip.versatel-1u1.de) |
| 07:19:32 | → | dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 07:20:31 | <dminuoso> | % f :: Lens' (Either (Int, Char) (String, Int)) Int; f = unsafeSingular (_Left . _1 `failing` _Right . _2) -- siers |
| 07:20:31 | <yahb> | dminuoso: |
| 07:21:00 | → | ddellacosta joins (~ddellacos@89.46.62.109) |
| 07:21:30 | → | ramon joins (~ramon@user/ramon) |
| 07:21:41 | <siers> | nice |
| 07:23:20 | <siers> | I think unsafeSingular could be mentioned here then: https://stackoverflow.com/questions/36521208/how-to-make-the-product-of-two-lenses |
| 07:23:22 | <dminuoso> | (I guess you can even use `singular` here) |
| 07:23:32 | × | agumonke` quits (~user@88.163.231.79) (Ping timeout: 250 seconds) |
| 07:24:12 | <siers> | never mind, probably not |
| 07:24:25 | <dminuoso> | % f :: Lens' (Either (Int, Char) (String, Int)) Int; f = singular (_Left . _1 `failing` _Right . _2) |
| 07:24:25 | <yahb> | dminuoso: |
| 07:24:47 | → | teaSlurper joins (~chris@81.96.113.213) |
| 07:24:56 | <dminuoso> | % Left (1, 'f') & f .~ 10 |
| 07:24:56 | <yahb> | dminuoso: Left (10,'f') |
| 07:25:04 | <dminuoso> | % Right ("foo", 20) & f .~ 10 |
| 07:25:04 | <yahb> | dminuoso: Right ("foo",10) |
| 07:25:07 | <siers> | nice |
| 07:25:30 | × | ddellacosta quits (~ddellacos@89.46.62.109) (Ping timeout: 252 seconds) |
| 07:26:03 | <dminuoso> | Yeah, I make heavy use of this trick, as ugly as it is. |
| 07:26:53 | <siers> | why do you think it's ugly? :) |
| 07:27:15 | <siers> | because requires human proof? |
| 07:27:18 | <siers> | it* |
| 07:29:46 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:30:09 | <dminuoso> | siers: It's rather, in the type algebra, it's very obvious and visible that this shouldnt even need proof. |
| 07:31:00 | × | teaSlurper quits (~chris@81.96.113.213) (Ping timeout: 252 seconds) |
| 07:31:35 | <dminuoso> | siers: Its the same thing with the article you mentioned |
| 07:31:52 | Erutuon_ | is now known as Erutuon |
| 07:33:34 | <dminuoso> | Often I get away with just Folds instead, but if you stare at this, it makes you crave for a more fitting abstraction |
| 07:33:35 | <dminuoso> | https://gist.github.com/dminuoso/d73bf2520faf4e36d3168c8db789727a |
| 07:33:44 | → | nschoe joins (~quassel@178.251.84.79) |
| 07:33:50 | <siers> | you mean shouldn't need proof or should be possible to encode as a proof? |
| 07:34:46 | × | asm quits (~alexander@burner.asm89.io) (Changing host) |
| 07:34:46 | → | asm joins (~alexander@user/asm) |
| 07:36:05 | <dminuoso> | siers: In my problem domain, at least with the representation I chose, sum types are sort of like diamonds. I constantly split them up (with say filteredBy), or I want to join them back together (with summing/unsafeSingular+failingT) |
| 07:37:05 | <dminuoso> | But there's no way to track "these prism-like things are disjoint" for example in the lens/optics ergonomics |
| 07:37:14 | <dminuoso> | You need manual human written proof |
| 07:37:17 | <dminuoso> | Every time. |
| 07:37:26 | <dminuoso> | Or you just shrug and pretend its alright |
| 07:38:00 | <siers> | right, but it's due to a language limitation? or could you technically encode that and carry it along in haskell? |
| 07:38:39 | → | ubert joins (~Thunderbi@p200300ecdf259da7d446db1a2ac53d1c.dip0.t-ipconnect.de) |
| 07:38:40 | <dminuoso> | No idea, really. I just know this act of "splitting/joining sum types" doesnt fit well into lens/optics. |
| 07:39:02 | <siers> | gotcha |
| 07:40:21 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 07:41:07 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 264 seconds) |
| 07:42:16 | → | yd502 joins (~yd502@180.168.212.6) |
| 07:44:19 | <dminuoso> | The primitive I originally wanted, was some: partition :: (Is k An_AffineFold, Is l An_AffineFold) => Optic' k is a i -> Optic' l is a j -> IxAffineFold (Either i j) a a -- or some such. |
| 07:45:23 | <dminuoso> | But even this representation completely throws away the information, since you're back to square one with the index of (Either i j) |
| 07:46:22 | × | trent quits (~trent@2001:8003:340d:d00:b2de:b98:7a93:b0ea) (Ping timeout: 244 seconds) |
| 07:46:25 | lode | is now known as Aardwolf |
| 07:46:43 | ← | Aardwolf parts (~lode@77-56-208-202.dclient.hispeed.ch) (Leaving) |
| 07:47:42 | <dminuoso> | And of course its unsafe already, since it demands proof that the provided affine folds are disjoint |
| 07:49:27 | × | ukari quits (~ukari@user/ukari) (Remote host closed the connection) |
| 07:50:48 | × | hnOsmium0001 quits (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity) |
| 07:55:02 | → | ukari joins (~ukari@user/ukari) |
| 07:56:21 | → | mastarija joins (~mastarija@31.217.11.88) |
| 07:56:23 | × | Chobbes quits (~Chobbes@user/chobbes) (Ping timeout: 252 seconds) |
| 07:56:41 | → | zeenk joins (~zeenk@2a02:2f04:a310:b600:b098:bf18:df4d:4c41) |
| 07:56:46 | → | yd502_ joins (~yd502@180.168.212.6) |
| 07:57:03 | <mastarija> | Can't remember, how does one "install" a package globally so I can use it from ghci without having to create a project? |
| 07:57:16 | <mastarija> | I thought it was cabal install --lib random |
| 07:57:25 | → | peterhil joins (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) |
| 07:57:34 | <Cajun> | last i recall it was `cabal install --lib PACKAGE` |
| 07:57:50 | → | cfricke joins (~cfricke@user/cfricke) |
| 07:58:01 | <mastarija> | Yes, that's what I tried, but ghci still can not find System.Random for some reason |
| 07:59:04 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 250 seconds) |
| 07:59:10 | <mastarija> | Oh, I tried for a second time and now I get some error |
| 07:59:17 | <lortabac> | mastarija: you need to make the package visible in ghci |
| 07:59:22 | → | yd502 joins (~yd502@180.168.212.6) |
| 07:59:28 | <mastarija> | Yes, in that one file |
| 07:59:33 | <mastarija> | I'm gonna check now |
| 08:00:03 | <lortabac> | you can also do it interactively: :set -package PACKAGE_NAME |
| 08:00:31 | <merijn> | mastarija: --lib is *at best* in beta atm |
| 08:00:49 | <mastarija> | That's ok, I just wanted to try something out quickly |
| 08:01:03 | → | Chobbes joins (~Chobbes@user/chobbes) |
| 08:01:21 | <merijn> | mastarija: you can start ghci with a package in scope via "cabal repl --build-depends" |
| 08:01:41 | <merijn> | i.e. "cabal repl --build-depends random-x.y.z" |
| 08:01:52 | × | yd502_ quits (~yd502@180.168.212.6) (Ping timeout: 244 seconds) |
| 08:02:31 | <lortabac> | yes, merijn's suggestion is more reliable than mine |
| 08:02:44 | <dminuoso> | +1 to merijn's suggestion |
| 08:02:50 | <merijn> | Also less likely to make your life a pain later :p |
| 08:03:25 | <merijn> | "install --lib" is, effectively, the same as pinning all future build plans/installs to the package version you happen to install right now |
| 08:03:37 | <merijn> | Which, uh, is rather limiting |
| 08:05:29 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 244 seconds) |
| 08:05:32 | <mastarija> | meh.. I just erase that pinning file every so often |
| 08:05:52 | <mastarija> | but yes, --build-depends work nicely |
| 08:05:57 | <mastarija> | Although it's a bit slow to load |
| 08:06:06 | <mastarija> | thanks merijn |
| 08:07:29 | × | phanf quits (~phanf@226.148.192.35.bc.googleusercontent.com) (Quit: leaving) |
| 08:07:42 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 08:09:40 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b95b:27c0:9816:d7ad) (Remote host closed the connection) |
| 08:10:52 | → | yd502 joins (~yd502@180.168.212.6) |
| 08:10:58 | × | hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 252 seconds) |
| 08:12:12 | × | GIANTWORLDKEEPER quits (~pjetcetal@2.95.204.25) (Quit: EXIT) |
| 08:14:13 | <merijn> | Should only be slow the first time, I think? |
| 08:14:14 | <dminuoso> | with `cabal install --lib` you very rapidly end up with failure to install anything further from experience. |
| 08:14:24 | <dminuoso> | It works for the first 1-2 packages, and then you cant install anything else. |
| 08:14:28 | <merijn> | It JIT installs the package you need, then loads it inside ghci |
| 08:14:34 | → | ikex joins (~ash@user/ikex) |
| 08:14:45 | <merijn> | If the package is already in the global store (after the first run) it can skip that step |
| 08:15:10 | <dminuoso> | *package with the resolved version + flags. |
| 08:15:19 | → | brandonh joins (~brandonh@151.44.80.15) |
| 08:15:25 | <dminuoso> | If in a different projects you have other constraints that would result in a different version of the same library, it'd have to be rebuilt of course. |
| 08:16:39 | → | phanf joins (~phanf@226.148.192.35.bc.googleusercontent.com) |
| 08:17:56 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:3429:27e5:c9dc:b9d2) |
| 08:19:09 | → | emliunix_ joins (~emliunix@b4kebweac68.route-server.jp) |
| 08:19:45 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 08:20:07 | × | hendursa1 quits (~weechat@user/hendursaga) (Remote host closed the connection) |
| 08:20:12 | → | hendursaga joins (~weechat@user/hendursaga) |
| 08:21:38 | → | BosonCollider joins (~olofs@90-227-86-119-no542.tbcn.telia.com) |
| 08:22:02 | × | emliunix__ quits (~emliunix@198.144.166.57) (Ping timeout: 250 seconds) |
| 08:22:09 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:3429:27e5:c9dc:b9d2) (Ping timeout: 245 seconds) |
| 08:27:14 | → | pera joins (~pera@user/pera) |
| 08:28:16 | → | involans joins (~alex@cpc92718-cmbg20-2-0-cust157.5-4.cable.virginm.net) |
| 08:28:24 | × | azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Ping timeout: 245 seconds) |
| 08:29:27 | → | azeem joins (~azeem@176.201.21.77) |
| 08:30:03 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 08:30:18 | fendor__ | is now known as fendor |
| 08:30:39 | → | GIANTWORLDKEEPER joins (~pjetcetal@2.95.204.25) |
| 08:33:15 | → | neceve joins (~quassel@2a02:c7f:607e:d600:a95a:ecd2:e57a:3130) |
| 08:33:37 | → | xsperry joins (~as@user/xsperry) |
| 08:33:55 | → | thyriaen joins (~thyriaen@45.178.73.238) |
| 08:34:12 | <thyriaen> | good morning, my friends - what fun tutorialy resources do you recommend to get into haskell ? I think best would be some kind of problemset to solve - any suggestions ? |
| 08:35:06 | <dexterfoo> | how can I run these 3 ghci commands all together? ":r" ":!clear" "main" |
| 08:35:19 | × | wallymathieu[m] quits (~wallymath@2001:470:69fc:105::16ae) (Read error: Connection reset by peer) |
| 08:35:19 | × | oak- quits (~oakuniver@2001:470:69fc:105::fcd) (Read error: Connection reset by peer) |
| 08:35:19 | × | dualinverter[m] quits (~dualinver@2001:470:69fc:105::16a7) (Read error: Connection reset by peer) |
| 08:35:19 | × | autrim64[m] quits (~autrim64m@2001:470:69fc:105::16a1) (Read error: Connection reset by peer) |
| 08:35:19 | × | bryan[m] quits (~bchreekat@2001:470:69fc:105::16b5) (Read error: Connection reset by peer) |
| 08:35:19 | × | ServerStatsDisco quits (~serversta@2001:470:69fc:105::1a) (Write error: Connection reset by peer) |
| 08:35:19 | × | psydroid quits (~psydroidm@user/psydroid) (Write error: Connection reset by peer) |
| 08:35:20 | × | jaror[m] quits (~jaror@2001:470:69fc:105::265) (Read error: Connection reset by peer) |
| 08:35:20 | × | Morrow[m] quits (~morrowmma@2001:470:69fc:105::1d0) (Read error: Connection reset by peer) |
| 08:35:20 | × | hjulle[m] quits (~hjullemat@2001:470:69fc:105::1dd) (Read error: Connection reset by peer) |
| 08:35:20 | × | Artem[m] quits (~artemtype@2001:470:69fc:105::75b) (Read error: Connection reset by peer) |
| 08:35:20 | × | bb010g quits (~bb010gmat@2001:470:69fc:105::9a5) (Read error: Connection reset by peer) |
| 08:35:20 | × | eddiemundo quits (~eddiemund@2001:470:69fc:105::a9c) (Read error: Connection reset by peer) |
| 08:35:20 | × | cdsmith quits (~cdsmithma@2001:470:69fc:105::284) (Read error: Connection reset by peer) |
| 08:35:20 | × | marinelli[m] quits (~marinelli@2001:470:69fc:105::2d8) (Read error: Connection reset by peer) |
| 08:35:20 | × | Soft quits (~soft-matr@2001:470:69fc:105::c75) (Read error: Connection reset by peer) |
| 08:35:20 | × | maralorn quits (~maralorn@2001:470:69fc:105::251) (Read error: Connection reset by peer) |
| 08:35:20 | × | ac quits (~aloiscoch@2001:470:69fc:105::65) (Read error: Connection reset by peer) |
| 08:35:20 | × | amesgen[m] quits (~amesgenam@2001:470:69fc:105::82b) (Read error: Connection reset by peer) |
| 08:35:20 | × | kosmikus[m] quits (~andresloe@2001:470:69fc:105::95d) (Read error: Connection reset by peer) |
| 08:35:20 | × | Las[m] quits (~lasmatrix@2001:470:69fc:105::74e) (Read error: Connection reset by peer) |
| 08:35:20 | × | ru0mad[m] quits (~ru0madmat@2001:470:69fc:105::9b2) (Read error: Connection reset by peer) |
| 08:35:20 | × | the-coot[m] quits (~the-cootm@2001:470:69fc:105::95f) (Read error: Connection reset by peer) |
| 08:35:20 | × | jophish quits (~jophish@2001:470:69fc:105::670) (Read error: Connection reset by peer) |
| 08:35:20 | × | fgaz quits (~fgaz@2001:470:69fc:105::842) (Read error: Connection reset by peer) |
| 08:35:20 | × | MatrixTravelerbo quits (~voyagert2@2001:470:69fc:105::22) (Write error: Connection reset by peer) |
| 08:35:20 | × | thedward[m] quits (~thedwardm@2001:470:69fc:105::f79) (Read error: Connection reset by peer) |
| 08:35:20 | × | adziahel[m] quits (~adziahelm@2001:470:69fc:105::b4d) (Read error: Connection reset by peer) |
| 08:35:20 | × | srid[m] quits (~sridmatri@2001:470:69fc:105::1c2) (Read error: Connection reset by peer) |
| 08:35:20 | × | cdepillabout[m] quits (~cdepillab@2001:470:69fc:105::3d3) (Read error: Connection reset by peer) |
| 08:35:20 | × | Drezil quits (~drezilkif@2001:470:69fc:105::7f8) (Read error: Connection reset by peer) |
| 08:35:20 | × | tomferon[m] quits (~tomferon@2001:470:69fc:105::268) (Read error: Connection reset by peer) |
| 08:35:20 | × | fabfianda[m] quits (~fabfianda@2001:470:69fc:105::6db) (Read error: Connection reset by peer) |
| 08:35:20 | × | siraben quits (~siraben@user/siraben) (Read error: Connection reset by peer) |
| 08:35:20 | × | sm[m] quits (~sm@plaintextaccounting/sm) (Read error: Connection reset by peer) |
| 08:35:20 | × | vaibhavsagar[m] quits (~vaibhavsa@2001:470:69fc:105::ffe) (Read error: Connection reset by peer) |
| 08:35:20 | × | maerwald[m] quits (~maerwaldm@2001:470:69fc:105::1ee) (Read error: Connection reset by peer) |
| 08:35:20 | × | kadoban quits (~kadoban@user/kadoban) (Read error: Connection reset by peer) |
| 08:35:20 | × | peddie quits (~peddie@2001:470:69fc:105::25d) (Read error: Connection reset by peer) |
| 08:35:53 | → | thedward[m] joins (~thedwardm@2001:470:69fc:105::f79) |
| 08:35:54 | → | mastarija_ joins (~mastarija@31.217.8.68) |
| 08:36:20 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 250 seconds) |
| 08:36:36 | → | ac joins (~aloiscoch@2001:470:69fc:105::65) |
| 08:36:36 | → | sm[m] joins (~sm@plaintextaccounting/sm) |
| 08:36:36 | → | MatrixTravelerbo joins (~voyagert2@2001:470:69fc:105::22) |
| 08:36:36 | → | fgaz joins (~fgaz@2001:470:69fc:105::842) |
| 08:36:36 | → | peddie joins (~peddie@2001:470:69fc:105::25d) |
| 08:36:36 | → | maralorn joins (~maralorn@2001:470:69fc:105::251) |
| 08:36:36 | → | psydroid joins (~psydroidm@2001:470:69fc:105::165) |
| 08:36:36 | → | fabfianda[m] joins (~fabfianda@2001:470:69fc:105::6db) |
| 08:36:36 | → | ServerStatsDisco joins (~serversta@2001:470:69fc:105::1a) |
| 08:36:36 | → | Artem[m] joins (~artemtype@2001:470:69fc:105::75b) |
| 08:36:36 | → | the-coot[m] joins (~the-cootm@2001:470:69fc:105::95f) |
| 08:36:37 | → | Las[m] joins (~lasmatrix@2001:470:69fc:105::74e) |
| 08:36:37 | → | kadoban joins (~kadoban@user/kadoban) |
| 08:36:37 | → | jophish joins (~jophish@2001:470:69fc:105::670) |
| 08:36:38 | → | vaibhavsagar[m] joins (~vaibhavsa@2001:470:69fc:105::ffe) |
| 08:36:48 | → | maerwald[m] joins (~maerwaldm@2001:470:69fc:105::1ee) |
| 08:36:48 | → | Morrow[m] joins (~morrowmma@2001:470:69fc:105::1d0) |
| 08:36:48 | → | srid[m] joins (~sridmatri@2001:470:69fc:105::1c2) |
| 08:36:48 | → | wallymathieu[m] joins (~wallymath@2001:470:69fc:105::16ae) |
| 08:36:48 | → | adziahel[m] joins (~adziahelm@2001:470:69fc:105::b4d) |
| 08:36:48 | → | amesgen[m] joins (~amesgenam@2001:470:69fc:105::82b) |
| 08:36:48 | → | kosmikus[m] joins (~andresloe@2001:470:69fc:105::95d) |
| 08:36:48 | → | hjulle[m] joins (~hjullemat@2001:470:69fc:105::1dd) |
| 08:36:48 | → | bb010g joins (~bb010gmat@2001:470:69fc:105::9a5) |
| 08:36:48 | → | cdepillabout[m] joins (~cdepillab@2001:470:69fc:105::3d3) |
| 08:36:48 | → | dualinverter[m] joins (~dualinver@2001:470:69fc:105::16a7) |
| 08:36:48 | → | tomferon[m] joins (~tomferon@2001:470:69fc:105::268) |
| 08:36:48 | → | marinelli[m] joins (~marinelli@2001:470:69fc:105::2d8) |
| 08:36:48 | → | Drezil joins (~drezilkif@2001:470:69fc:105::7f8) |
| 08:36:49 | → | bryan[m] joins (~bchreekat@2001:470:69fc:105::16b5) |
| 08:36:49 | → | Soft joins (~soft-matr@2001:470:69fc:105::c75) |
| 08:36:49 | → | eddiemundo joins (~eddiemund@2001:470:69fc:105::a9c) |
| 08:36:49 | → | autrim64[m] joins (~autrim64m@2001:470:69fc:105::16a1) |
| 08:36:50 | → | cdsmith joins (~cdsmithma@2001:470:69fc:105::284) |
| 08:36:50 | → | jaror[m] joins (~jaror@2001:470:69fc:105::265) |
| 08:36:50 | → | ru0mad[m] joins (~ru0madmat@2001:470:69fc:105::9b2) |
| 08:36:51 | → | oak- joins (~oakuniver@2001:470:69fc:105::fcd) |
| 08:37:33 | × | Bartosz quits (~textual@24.35.90.211) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 08:38:56 | × | mastarija quits (~mastarija@31.217.11.88) (Ping timeout: 250 seconds) |
| 08:39:19 | × | ubert quits (~Thunderbi@p200300ecdf259da7d446db1a2ac53d1c.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 08:41:49 | → | yd502 joins (~yd502@180.168.212.6) |
| 08:41:59 | → | Bartosz joins (~textual@24.35.90.211) |
| 08:42:24 | <yushyin> | thyriaen: https://www.cis.upenn.edu/~cis194/spring13/lectures.html https://github.com/system-f/fp-course ( https://wiki.haskell.org/Tutorials ) |
| 08:42:25 | → | siraben joins (~siraben@user/siraben) |
| 08:43:05 | <dminuoso> | @where learning |
| 08:43:05 | <lambdabot> | I know nothing about learning. |
| 08:43:07 | <dminuoso> | @where learn |
| 08:43:07 | <lambdabot> | https://wiki.haskell.org/Learning_Haskell |
| 08:43:18 | <thyriaen> | thanks |
| 08:43:32 | × | ikex quits (~ash@user/ikex) (Ping timeout: 264 seconds) |
| 08:47:14 | → | yoctocell joins (~user@h87-96-130-155.cust.a3fiber.se) |
| 08:48:10 | → | yd502_ joins (~yd502@180.168.212.6) |
| 08:48:18 | → | benin033 joins (~benin@183.82.206.233) |
| 08:48:33 | × | benin03 quits (~benin@183.82.206.233) (Ping timeout: 252 seconds) |
| 08:48:33 | benin033 | is now known as benin03 |
| 08:48:38 | × | yoctocell quits (~user@h87-96-130-155.cust.a3fiber.se) (Client Quit) |
| 08:48:58 | <dmwit> | dexterfoo: What's wrong with `:r\n:!clear\nmain\n`? |
| 08:49:24 | × | nsilv quits (~nsilv@212.103.198.210) (Ping timeout: 244 seconds) |
| 08:49:49 | <dmwit> | (NB I'm not claiming that meets your needs. I just don't know what your needs are and this is my best idea about how to find them out.) |
| 08:50:15 | → | yd502__ joins (~yd502@58.32.9.235) |
| 08:51:28 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 244 seconds) |
| 08:53:28 | × | yd502_ quits (~yd502@180.168.212.6) (Ping timeout: 272 seconds) |
| 08:53:39 | → | yoctocell joins (~yoctocell@h87-96-130-155.cust.a3fiber.se) |
| 08:54:18 | → | wonko joins (~wjc@62.115.229.50) |
| 08:56:41 | → | nsilv joins (~nsilv@212.103.198.210) |
| 08:56:42 | → | dhil joins (~dhil@195.213.192.47) |
| 09:00:35 | → | lavaman joins (~lavaman@98.38.249.169) |
| 09:00:38 | × | thyriaen quits (~thyriaen@45.178.73.238) (Quit: Leaving) |
| 09:01:04 | × | yoctocell quits (~yoctocell@h87-96-130-155.cust.a3fiber.se) (Remote host closed the connection) |
| 09:02:00 | → | yoctocell joins (~yoctocell@h87-96-130-155.cust.a3fiber.se) |
| 09:03:09 | × | yd502__ quits (~yd502@58.32.9.235) (Ping timeout: 244 seconds) |
| 09:04:17 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds) |
| 09:04:35 | → | yd502__ joins (~yd502@58.32.9.235) |
| 09:05:03 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
| 09:10:34 | → | kris joins (~quassel@82-69-3-58.dsl.in-addr.zen.co.uk) |
| 09:10:58 | × | kris quits (~quassel@82-69-3-58.dsl.in-addr.zen.co.uk) (Client Quit) |
| 09:11:01 | → | ubert joins (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) |
| 09:11:37 | × | neceve quits (~quassel@2a02:c7f:607e:d600:a95a:ecd2:e57a:3130) (Ping timeout: 244 seconds) |
| 09:11:59 | × | yoctocell quits (~yoctocell@h87-96-130-155.cust.a3fiber.se) (Remote host closed the connection) |
| 09:12:22 | → | zelmac joins (~quassel@82-69-3-58.dsl.in-addr.zen.co.uk) |
| 09:14:01 | → | ddellacosta joins (~ddellacos@89.46.62.112) |
| 09:14:30 | <tomsmeding> | dexterfoo: in case it doesn't, what about `:def R \_ -> Prelude.return (":r\n:!clear\nmain\n")`? Then :R runs that |
| 09:15:20 | <jophish> | The topic here needs updating, the matrix bridge is up and running |
| 09:15:29 | <jophish> | ignore that if you can't see my messages |
| 09:15:46 | × | jrm quits (~jrm@156.34.187.65) (Read error: Connection reset by peer) |
| 09:15:49 | <tomsmeding> | jophish: I can :) |
| 09:15:59 | × | nsilv quits (~nsilv@212.103.198.210) (Remote host closed the connection) |
| 09:16:02 | <tomsmeding> | but isn't it in some kind of beta state? |
| 09:16:18 | → | jrm joins (~jrm@156.34.187.65) |
| 09:17:55 | <jophish> | oh, perhaps |
| 09:18:56 | × | ddellacosta quits (~ddellacos@89.46.62.112) (Ping timeout: 264 seconds) |
| 09:21:55 | → | mastarija__ joins (~mastarija@46.188.129.109) |
| 09:22:42 | × | yd502__ quits (~yd502@58.32.9.235) (Ping timeout: 250 seconds) |
| 09:22:59 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 244 seconds) |
| 09:23:15 | → | koishi_ joins (~koishi_@160.16.113.140) |
| 09:23:32 | → | nsilv joins (~nsilv@212.103.198.210) |
| 09:23:51 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:24:46 | → | pagnol joins (~user@014198154145.ctinets.com) |
| 09:25:05 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 09:25:32 | × | mastarija_ quits (~mastarija@31.217.8.68) (Ping timeout: 264 seconds) |
| 09:25:33 | → | xprlgjf joins (~gavin@60.27.93.209.dyn.plus.net) |
| 09:26:11 | → | yoctocell joins (~yoctocell@h87-96-130-155.cust.a3fiber.se) |
| 09:27:39 | × | nsilv quits (~nsilv@212.103.198.210) (Client Quit) |
| 09:28:06 | × | Bartosz quits (~textual@24.35.90.211) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 09:28:43 | <gentauro> | If I try to subscract 1 from each value in a list: `map ((-) 1) [1 .. 10]` why is this not equal `[0 .. 9]`? |
| 09:28:58 | <gentauro> | oh |
| 09:29:09 | <wallymathieu[m]> | Hi gentauro |
| 09:29:11 | <gentauro> | `(-) 1 x` got it |
| 09:29:30 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 09:29:51 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:30:03 | <gentauro> | wallymathieu[m]: hi |
| 09:30:15 | <involans> | @gentauro: you might want to user `subtract` here |
| 09:30:15 | <lambdabot> | Unknown command, try @list |
| 09:30:37 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 09:30:39 | <involans> | `map (subtract 1) [1 .. 10]` |
| 09:31:24 | <dexterfoo> | dmwit: this doesn't seem to work :| tomsmeding: thanks this works! |
| 09:31:44 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 09:31:54 | <gentauro> | involans: do you know why `(flip (-) 1)` doesn't work? |
| 09:32:12 | <gentauro> | oh, it does :) |
| 09:32:50 | <involans> | Yes - was about to say :) `subtract === flip (-)` |
| 09:33:01 | × | bramhaag quits (~bramhaag@endeavour.servers.alpaca.engineer) (Ping timeout: 265 seconds) |
| 09:34:23 | → | chddr joins (~Thunderbi@31.148.23.125) |
| 09:34:38 | → | yd502 joins (~yd502@180.168.212.6) |
| 09:35:18 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 09:35:42 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:36:03 | → | lavaman joins (~lavaman@98.38.249.169) |
| 09:37:23 | <yushyin> | or (- 1) with -XLexicalNegation :) |
| 09:40:48 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
| 09:40:55 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:3429:27e5:c9dc:b9d2) |
| 09:41:13 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
| 09:41:32 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:42:52 | → | nsilv joins (~nsilv@212.103.198.210) |
| 09:45:12 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 09:45:32 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:3429:27e5:c9dc:b9d2) (Ping timeout: 268 seconds) |
| 09:46:35 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 09:46:44 | × | chomwitt quits (~Pitsikoko@2a02:587:dc02:b00:98b0:cd42:bd6f:8295) (Ping timeout: 245 seconds) |
| 09:47:24 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:48:54 | × | emliunix_ quits (~emliunix@b4kebweac68.route-server.jp) (Remote host closed the connection) |
| 09:52:54 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 09:53:17 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 09:56:11 | → | bramhaag joins (~bramhaag@134.195.121.39) |
| 09:56:40 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 09:58:40 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
| 09:59:16 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:00:07 | <involans> | ooh, `LexicalNegation` looks great. Thanks yushyin |
| 10:00:45 | → | jippiedoe joins (~david@77-171-152-62.fixed.kpn.net) |
| 10:02:26 | → | abraham joins (~abraham@173.239.198.148) |
| 10:04:21 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 10:04:27 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 10:05:11 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:06:44 | → | Torro joins (Torro@gateway/vpn/protonvpn/torro) |
| 10:09:00 | × | Erutuon quits (~Erutuon@user/erutuon) (Quit: WeeChat 2.8) |
| 10:09:12 | → | lavaman joins (~lavaman@98.38.249.169) |
| 10:09:37 | → | pbrisbin joins (~patrick@pool-72-92-38-164.phlapa.fios.verizon.net) |
| 10:10:22 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
| 10:11:13 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:12:09 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:69cc:8900:882e:bc6e) (Ping timeout: 245 seconds) |
| 10:12:34 | × | chexum quits (~chexum@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 10:13:24 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 250 seconds) |
| 10:16:10 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 10:16:56 | × | abraham quits (~abraham@173.239.198.148) (Quit: Textual IRC Client: www.textualapp.com) |
| 10:17:02 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:18:55 | → | agumonke` joins (~user@88.160.31.174) |
| 10:22:04 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
| 10:22:42 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:23:10 | × | mc47 quits (~mc47@xmonad/TheMC47) (Quit: Leaving) |
| 10:23:33 | × | brandonh quits (~brandonh@151.44.80.15) (Read error: Connection reset by peer) |
| 10:26:22 | → | poljar1 joins (~poljar@93-141-130-48.adsl.net.t-com.hr) |
| 10:27:50 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 10:28:07 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:28:19 | Clint_ | is now known as Clint |
| 10:28:21 | → | brandonh joins (~brandonh@151.44.23.230) |
| 10:28:34 | × | poljar quits (~poljar@93-139-12-109.adsl.net.t-com.hr) (Ping timeout: 250 seconds) |
| 10:30:57 | × | brandonh quits (~brandonh@151.44.23.230) (Client Quit) |
| 10:31:13 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 10:31:24 | × | agumonke` quits (~user@88.160.31.174) (Ping timeout: 252 seconds) |
| 10:31:25 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 10:33:36 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds) |
| 10:35:37 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 10:35:56 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 250 seconds) |
| 10:36:25 | ← | mrufrufin parts (~dxk@108.235.170.90) () |
| 10:37:00 | × | nsilv quits (~nsilv@212.103.198.210) (Ping timeout: 245 seconds) |
| 10:40:04 | × | niko quits (~niko@libera/staff/niko) (Remote host closed the connection) |
| 10:40:36 | → | niko joins (~niko@libera/staff/niko) |
| 10:41:18 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 10:41:19 | × | fabfianda quits (~fabfianda@net-93-148-121-206.cust.dsl.teletu.it) (Ping timeout: 245 seconds) |
| 10:41:31 | → | RohitGoswami[m] joins (~rgoswamim@2001:470:69fc:105::16cc) |
| 10:41:46 | → | fabfianda joins (~fabfianda@mob-5-90-253-108.net.vodafone.it) |
| 10:42:01 | × | hmmmas quits (~chenqisu1@183.217.201.236) (Quit: Leaving.) |
| 10:42:20 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:3429:27e5:c9dc:b9d2) |
| 10:43:54 | × | yd502 quits (~yd502@180.168.212.6) (Ping timeout: 244 seconds) |
| 10:44:08 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 10:45:50 | → | neceve joins (~quassel@2a02:c7f:607e:d600:a95a:ecd2:e57a:3130) |
| 10:46:51 | × | koishi_ quits (~koishi_@160.16.113.140) (Quit: /ragequit) |
| 10:47:12 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:3429:27e5:c9dc:b9d2) (Ping timeout: 268 seconds) |
| 10:47:44 | <raehik> | Years ago there was a handy GHC plugin framework HERMIT. I'm interested in using it but can't get it to build with GHC 8.10 (originally for 7.10? lots of functions now missing). Anyone here who may know more about HERMIT and possibility of using it in 2021? |
| 10:48:24 | × | _________ quits (~nobody@user//x-7881368) (Ping timeout: 245 seconds) |
| 10:48:45 | <gentauro> | involans: hmmm, `-1` should be a number and `- 1` should be a function awaiting for it's second value |
| 10:49:06 | <gentauro> | I mean, you don't write a decimal number like this: `10 . 24` |
| 10:50:51 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:51:12 | → | poljar joins (~poljar@93-143-149-172.adsl.net.t-com.hr) |
| 10:51:17 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 10:51:20 | → | koishi_ joins (~koishi_@185.209.85.134) |
| 10:52:50 | × | wonko quits (~wjc@62.115.229.50) (Ping timeout: 250 seconds) |
| 10:53:07 | <maerwald> | a single whitespace deciding on semantics is a dangerous path |
| 10:53:42 | × | poljar1 quits (~poljar@93-141-130-48.adsl.net.t-com.hr) (Ping timeout: 250 seconds) |
| 10:54:20 | <tomsmeding> | raehik: does it talk to the GHC library interface? If so, I think making it work with the GHC api of a few years later is basically impossible without a rewrite |
| 10:54:54 | <yushyin> | gentauro: you can have that since ghc9.0.1 and LexicalNegation extension |
| 10:55:06 | <tomsmeding> | unless it uses a very limited portion of the api or something |
| 10:55:29 | <yushyin> | gentauro: https://downloads.haskell.org/ghc/9.0.1/docs/html/users_guide/exts/lexical_negation.html#extension-LexicalNegation |
| 10:55:35 | → | _________ joins (~nobody@user//x-7881368) |
| 10:56:10 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
| 10:56:23 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 10:56:34 | <raehik> | tomsmeding: yes it does seem to hook in quite deep into GHC |
| 10:56:36 | dyniec_ | is now known as dyniec |
| 10:56:50 | <raehik> | most of the now-missing functions and constructors left in 8.0 - 8.4 :( |
| 10:58:35 | × | dyniec quits (~dyniec@mail.dybiec.info) (Quit: WeeChat 3.0) |
| 10:58:46 | → | dyniec joins (~dyniec@mail.dybiec.info) |
| 11:02:42 | × | mikoto-chan quits (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) (Ping timeout: 244 seconds) |
| 11:02:48 | × | pbrisbin quits (~patrick@pool-72-92-38-164.phlapa.fios.verizon.net) (Ping timeout: 250 seconds) |
| 11:03:14 | × | jespada_ quits (~jespada@90.254.242.55) (Ping timeout: 250 seconds) |
| 11:05:12 | → | hendursa1 joins (~weechat@user/hendursaga) |
| 11:05:19 | × | hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 252 seconds) |
| 11:06:19 | × | neceve quits (~quassel@2a02:c7f:607e:d600:a95a:ecd2:e57a:3130) (Ping timeout: 268 seconds) |
| 11:06:30 | → | jespada joins (~jespada@90.254.242.55) |
| 11:06:38 | → | agumonke` joins (~user@88.160.31.174) |
| 11:10:52 | × | koishi_ quits (~koishi_@185.209.85.134) (Quit: /ragequit) |
| 11:11:00 | × | Cajun quits (~Cajun@ip98-163-211-112.no.no.cox.net) (Ping timeout: 250 seconds) |
| 11:11:23 | × | maerwald quits (~maerwald@user/maerwald) (Quit: gone) |
| 11:11:54 | → | maerwald joins (~maerwald@mail.hasufell.de) |
| 11:14:03 | × | maerwald quits (~maerwald@mail.hasufell.de) (Changing host) |
| 11:14:03 | → | maerwald joins (~maerwald@user/maerwald) |
| 11:15:09 | → | ddellacosta joins (~ddellacos@89.46.62.17) |
| 11:15:10 | → | sciencentistguy joins (~sciencent@hacksoc/ordinary-member) |
| 11:15:23 | <gentauro> | 12:53 < maerwald> a single whitespace deciding on semantics is a dangerous path |
| 11:15:25 | <gentauro> | howcome? |
| 11:15:35 | <gentauro> | we do it for decimal numbers right? |
| 11:15:48 | <maerwald> | gentauro: bugs |
| 11:15:51 | <gentauro> | `10.24` is valid while `10 . 24` isn't |
| 11:16:08 | <merijn> | hah |
| 11:16:15 | <merijn> | that's what you think |
| 11:16:18 | <merijn> | :t 10 . 24 |
| 11:16:19 | <lambdabot> | (Num (b -> c), Num (a -> b)) => a -> c |
| 11:16:39 | <gentauro> | maerwald: I understand it would be problematic for `backwards compatibility` reasons |
| 11:16:44 | <gentauro> | merijn: :o |
| 11:16:44 | <maerwald> | no, bugs |
| 11:17:13 | <gentauro> | :t 1 2 7 |
| 11:17:14 | <lambdabot> | (Num t1, Num t2, Num (t1 -> t2 -> t3)) => t3 |
| 11:17:19 | <gentauro> | :| |
| 11:17:21 | <gentauro> | what was that? |
| 11:17:23 | <merijn> | maerwald: tbh, the biggest flaw in haskell is allowing operators without whitespace around them |
| 11:17:23 | <gentauro> | I mean |
| 11:17:27 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:fef:c229:4466:542) |
| 11:17:28 | <maerwald> | Compare with rusts misfeature of omitting `return` when the last line doesn't end with a `;` |
| 11:17:35 | → | brandonh joins (~brandonh@151.46.91.125) |
| 11:17:40 | <merijn> | gentauro: "1 :: Num a => a" there is no reason 'a' can't be a function |
| 11:17:42 | <maerwald> | so now you have to BLINK every time at the end of a function body |
| 11:17:52 | <maerwald> | to be sure you don't miss the damn `;` |
| 11:17:55 | <maerwald> | or the lack thereof |
| 11:17:56 | <merijn> | In fact, Num instances exist for functions |
| 11:18:11 | <gentauro> | merijn: `λ> 1 . 2 <interactive>:2:1: error: ` |
| 11:18:17 | <gentauro> | I get an error with my `ghci` |
| 11:18:23 | <gentauro> | do I need to enable `stuff`? |
| 11:18:30 | <merijn> | maerwald: If we had just specified Haskell from the start to make whitespace mandatory around operators 90% of these problems where nonexistent |
| 11:18:37 | <merijn> | gentauro: It's an error because functions aren't printable |
| 11:18:45 | <merijn> | > 1 . 2 -- this errors too |
| 11:18:47 | <lambdabot> | error: |
| 11:18:47 | <lambdabot> | • Could not deduce (Num (b0 -> c)) |
| 11:18:47 | <lambdabot> | (maybe you haven't applied a function to enough arguments?) |
| 11:18:57 | <merijn> | Because there's no Num instance for functions in scope |
| 11:19:04 | <gentauro> | merijn: yeah, but my point was that: |
| 11:19:05 | <gentauro> | > 1.2 |
| 11:19:07 | <lambdabot> | 1.2 |
| 11:19:11 | <gentauro> | is a decimal number |
| 11:19:14 | <dminuoso> | This suggestion "maybe you haven't applied..." is particularly helpful here, merijn! |
| 11:19:15 | <gentauro> | while |
| 11:19:18 | <gentauro> | > 1 . 2 |
| 11:19:20 | <lambdabot> | error: |
| 11:19:20 | <lambdabot> | • Could not deduce (Num (b0 -> c)) |
| 11:19:20 | <lambdabot> | (maybe you haven't applied a function to enough arguments?) |
| 11:19:22 | <gentauro> | becomes a function |
| 11:19:24 | <dminuoso> | (I know where it comes from, but it can be terribly deceiving) |
| 11:19:30 | <merijn> | gentauro: "1 . 2" is valid Haskell expression that can compile just by importing a module |
| 11:19:42 | × | ddellacosta quits (~ddellacos@89.46.62.17) (Ping timeout: 250 seconds) |
| 11:19:44 | <maerwald> | gentauro: in sufficiently polymorphic code, both may compile |
| 11:19:53 | <merijn> | gentauro: https://hackage.haskell.org/package/NumInstances |
| 11:20:10 | <maerwald> | I've had impossible to guess bugs in lens code too, where you'd think it should have been an error |
| 11:20:16 | <maerwald> | but it wasn't |
| 11:20:33 | <merijn> | The other mistakes in Haskell was having unary - |
| 11:21:22 | <merijn> | I swear, we could massively improve Haskell with a time machine, AMP proposal, and the sane plan for mandatory whitespace around operators and removing unary - |
| 11:21:43 | <gentauro> | merijn: do you want to start over again? |
| 11:21:45 | <gentauro> | xD |
| 11:21:49 | <merijn> | Yes |
| 11:21:51 | <maerwald> | merijn: nah, we're busy implementing type level features... no time for cleaning up the language |
| 11:22:16 | <gentauro> | is this how Java become Java? :o |
| 11:22:19 | <dminuoso> | % fix 1 |
| 11:22:19 | <yahb> | dminuoso: ; <interactive>:3:1: error:; * No instance for (Num (() -> ())) arising from a use of `it'; (maybe you haven't applied a function to enough arguments?); * In the first argument of `print', namely `it'; In a stmt of an interactive GHCi command: print it |
| 11:22:21 | <merijn> | maerwald: Can't really clean up some of these issues without Python2-to-3 scenarios, because old code might break |
| 11:22:25 | <dminuoso> | % fix 1 |
| 11:22:28 | <maerwald> | :: for kind signatures is confusing af for me |
| 11:22:30 | <yahb> | dminuoso: [Timed out] |
| 11:22:32 | <dminuoso> | Here. Compiles and runs just fine! |
| 11:22:38 | <gentauro> | :t fix |
| 11:22:39 | <lambdabot> | (a -> a) -> a |
| 11:22:40 | <merijn> | maerwald: TypeInType is crazy nonsense, tbh |
| 11:22:44 | <dminuoso> | If you ever want to fix your numbers, that's the way to go. |
| 11:22:47 | <gentauro> | :t fix 1 |
| 11:22:48 | <lambdabot> | Num (a -> a) => a |
| 11:23:07 | <gentauro> | to `fix 1` equals infinite recursion? |
| 11:23:15 | <merijn> | "maybe" |
| 11:23:56 | <DigitalKiwi> | what is fix |
| 11:24:06 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 11:24:19 | <dminuoso> | DigitalKiwi: think of it as a tool to create anonymous loops |
| 11:24:25 | <dminuoso> | or anonymous recursion, rather |
| 11:24:56 | × | edwtjo quits (~edwtjo@user/edwtjo) (Quit: WeeChat 3.0) |
| 11:25:02 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 11:25:11 | <dminuoso> | `ones = 1 : ones` requires a binding, so this is named recursion. Or you can just write `fix (1:)` |
| 11:25:22 | <dminuoso> | (Ignoring tying-the-not here, which you should do) |
| 11:25:29 | <merijn> | DigitalKiwi: fix is the most primitive distilled form of recursion |
| 11:25:50 | <merijn> | DigitalKiwi: Any recursive function can be rewritten as fix + non-recursive function |
| 11:26:02 | <dminuoso> | And any use of fix can be turned into just simple recursion. |
| 11:26:19 | <merijn> | DigitalKiwi: See: https://gist.github.com/merijn/b86649a6aa21bd140803 |
| 11:26:30 | <dminuoso> | One part where fix is particularly handy, is you have a data type and want to create mutually referencing fields |
| 11:26:31 | <Taneb> | merijn: being pedantic, I'm not sure all instances of recursion can be written that way. In particular, polymorphic recursion fails |
| 11:27:02 | <dminuoso> | You can just write `fix $ \d -> Data { f1 = [1,2,3]; f2 = [2,3,4]; f3 = f1 d <> f2 d }` for example |
| 11:27:06 | <merijn> | Taneb: polymorphic recursion requires typeclasses or some such anyway, no? |
| 11:27:15 | <Taneb> | No? Let me write something |
| 11:27:16 | × | zelmac quits (~quassel@82-69-3-58.dsl.in-addr.zen.co.uk) (Quit: zelmac) |
| 11:27:17 | × | chddr quits (~Thunderbi@31.148.23.125) (Ping timeout: 268 seconds) |
| 11:27:25 | <dminuoso> | (This is compact and eloquent, and will use sharing) |
| 11:28:55 | <Taneb> | merijn: https://gist.github.com/Taneb/e17d338384a62297002983e123d8d59d |
| 11:29:01 | <dminuoso> | mfix is far more interesting than fix I think |
| 11:29:27 | <dminuoso> | fix is just handy, but mfix can do things that take a lot more effort than without |
| 11:29:57 | <Taneb> | merijn: I don't think it's possible to write "size" there with fix and a non-recursive function |
| 11:29:57 | <tomsmeding> | maerwald: out of context reply, but re the semicolon issue on the last line with rust: it's not going to typecheck when you make the wrong decision in at most one place, I think |
| 11:30:03 | <Taneb> | Happy to be proven wrong here |
| 11:30:27 | <maerwald> | tomsmeding: it hinders reading flow |
| 11:30:31 | <tomsmeding> | not sure if it's possible to conceive a situation where getting two semicolons wrong makes a type correct program again |
| 11:30:45 | <merijn> | Taneb: hmm, maybe |
| 11:31:02 | <tomsmeding> | agree about the incongruity with the rest of the imperative language though; go full let...in or have a return keyword |
| 11:31:07 | <merijn> | Taneb: You're probably right, but I'm too tired to dedicate any brain cycles too considering a way around it :p |
| 11:31:08 | <hpc> | DigitalKiwi: since it hasn't been mentioned yet, the easiest way to understand fix is that fix (\f -> expression that mentions f) is analogous to f = expression that mentions f |
| 11:31:27 | <merijn> | hpc: I already did that via my map implementation above ;) |
| 11:31:34 | <dminuoso> | hpc: modulo knot tying! |
| 11:31:39 | <Taneb> | merijn: I believe this kind of recursion is invalid in ML, incidentally, but Haskell accepts it without complaint |
| 11:31:52 | → | pavonia joins (~user@user/siracusa) |
| 11:31:56 | <dminuoso> | Which I think should still be mentioned. If you naively write `f = expression that mentions f` your stack will suffer |
| 11:32:07 | <dminuoso> | With fix it wouldnt |
| 11:33:12 | <merijn> | dminuoso: huh? |
| 11:33:14 | <merijn> | dminuoso: Why? |
| 11:33:26 | → | hmmmas joins (~chenqisu1@183.217.201.236) |
| 11:33:41 | <dminuoso> | mmm |
| 11:33:47 | <dminuoso> | ah I guess it wouldnt |
| 11:33:51 | <tomsmeding> | @src fix |
| 11:33:51 | <lambdabot> | fix f = let x = f x in x |
| 11:34:32 | × | nschoe quits (~quassel@178.251.84.79) (Ping timeout: 264 seconds) |
| 11:35:20 | <tomsmeding> | looks like it would be exactly the same, to me |
| 11:35:32 | → | koishi_ joins (~koishi_@67.209.186.120.16clouds.com) |
| 11:35:34 | <dminuoso> | Yeah, I think I misremembered something. |
| 11:35:41 | <dminuoso> | @src cycle |
| 11:35:41 | <lambdabot> | cycle [] = undefined |
| 11:35:41 | <lambdabot> | cycle xs = xs' where xs' = xs ++ xs' |
| 11:35:44 | × | fabfianda quits (~fabfianda@mob-5-90-253-108.net.vodafone.it) (Ping timeout: 250 seconds) |
| 11:35:52 | <dminuoso> | Maybe my brain was wired wrong with this in mind |
| 11:36:00 | → | fabfianda joins (~fabfianda@net-93-148-121-206.cust.vodafonedsl.it) |
| 11:36:30 | <merijn> | yeah |
| 11:36:39 | × | koishi_ quits (~koishi_@67.209.186.120.16clouds.com) (Remote host closed the connection) |
| 11:36:42 | <merijn> | "cycle xs = xs ++ cycle xs" is where you'd lose sharing |
| 11:36:58 | <tomsmeding> | ooooo right sharing |
| 11:37:38 | × | benin03 quits (~benin@183.82.206.233) (Ping timeout: 244 seconds) |
| 11:41:14 | <merijn> | but the problem here is the sharing of the *result* of the recursion, rather than the function itself |
| 11:43:32 | <dminuoso> | That makes sense |
| 11:43:58 | × | agumonke` quits (~user@88.160.31.174) (Ping timeout: 250 seconds) |
| 11:44:01 | → | boxscape joins (~boxscape@user/boxscape) |
| 11:49:53 | × | kenran quits (~kenran@200116b82b683c006ea54bdc3ffd5a0f.dip.versatel-1u1.de) (Quit: WeeChat info:version) |
| 11:50:42 | × | curiousgay quits (~quassel@178.217.208.8) (Ping timeout: 264 seconds) |
| 11:52:39 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 11:53:08 | × | Natch quits (~natch@c-e070e255.014-297-73746f25.bbcust.telenor.se) (Ping timeout: 264 seconds) |
| 11:54:25 | <DigitalKiwi> | what is sharing |
| 11:54:59 | → | Natch joins (~natch@c-e070e255.014-297-73746f25.bbcust.telenor.se) |
| 11:56:00 | → | um joins (niahifz5l1@user/um) |
| 11:56:10 | ← | um parts (niahifz5l1@user/um) () |
| 11:56:43 | × | hmmmas quits (~chenqisu1@183.217.201.236) (Quit: Leaving.) |
| 11:56:59 | <tomsmeding> | let x = complicated_stuff in x + x |
| 11:57:12 | <tomsmeding> | will only compute x once, because its result is _shared_ between its usages |
| 11:57:30 | × | ubert quits (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Ping timeout: 268 seconds) |
| 11:57:38 | <tomsmeding> | let l = 1 : l in ... |
| 11:57:52 | <tomsmeding> | there the list and its tail are shared (i.e. point to the same thing in memory) |
| 11:57:59 | <dminuoso> | This is something you can only get with purity in the language. With an impure language, you demand the compiler prove this is a legit transformation., |
| 11:58:34 | <dminuoso> | This might be a good teaser why unsafePerformIO can behave really unexpected, because GHC will make assumptions like the above. |
| 11:59:03 | <dminuoso> | % cycle [1,2,3] |
| 11:59:09 | <yahb> | dminuoso: [1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2,3,1,2 |
| 11:59:12 | <boxscape> | dminuoso when you say "This", do you mean having the compiler automatically introduce sharing into an expression that wouldn't otherwise have it? |
| 11:59:59 | → | lavaman joins (~lavaman@98.38.249.169) |
| 12:00:01 | → | renzhi joins (~xp@2607:fa49:6500:bc00::e7b) |
| 12:01:00 | <dminuoso> | boxscape: fsvo of "automatically", anyhow |
| 12:01:06 | <boxscape> | ok |
| 12:01:18 | × | pagnol quits (~user@014198154145.ctinets.com) (Ping timeout: 250 seconds) |
| 12:01:52 | → | andreypopp joins (~andreypop@94.188.42.16) |
| 12:02:57 | <merijn> | boxscape: CSE (Common Sub-expression Elimination) is an optimisation that exists in GHC, yes |
| 12:03:09 | <boxscape> | right, okay |
| 12:03:36 | <merijn> | boxscape: So if you write "(2 + 2) * (2 + 2)" ghc may decide to compile it as "let x = 2 + 2 in x * x" |
| 12:03:59 | <boxscape> | I remember when I first read (I think in LYAH) that being lazy means every expression is evaluated at most once, I assumed that means CSE is applied to everything |
| 12:04:21 | <boxscape> | (which of course was not at all what was meant by it) |
| 12:04:32 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 264 seconds) |
| 12:04:42 | <merijn> | boxscape: Well, that also gets is in the pedantic argument that Haskell is "non-strict" and *not* lazy ;) |
| 12:04:51 | <boxscape> | yes, but I don't think LYAH made that distinction |
| 12:04:57 | <merijn> | Probably not, no |
| 12:05:12 | → | nsilv joins (~nsilv@212.103.198.210) |
| 12:06:21 | × | Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection) |
| 12:06:52 | → | Kaiepi joins (~Kaiepi@nwcsnbsc03w-47-54-173-93.dhcp-dynamic.fibreop.nb.bellaliant.net) |
| 12:07:40 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 12:09:12 | <boxscape> | (looking at google though, it doesn't seem as though the phrase "at most once" appears in LYAH, actually. It does appear in that context in a few other places) |
| 12:10:53 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 12:11:22 | × | V quits (~v@anomalous.eu) (Quit: We're here. We're queer. Connection reset by peer) |
| 12:11:55 | → | V joins (~v@anomalous.eu) |
| 12:13:16 | ← | andreypopp parts (~andreypop@94.188.42.16) (Textual IRC Client: www.textualapp.com) |
| 12:14:33 | <boxscape> | LYAH does seem to say on the first page though that laziness implies fusion of list operations |
| 12:16:31 | → | curiousgay joins (~quassel@178.217.208.8) |
| 12:17:25 | <boxscape> | also in another chapter: "Thanks to Haskell's laziness, even if you map something over a list several times and filter it several times, it will only pass over the list once." http://learnyouahaskell.com/higher-order-functions |
| 12:17:30 | <boxscape> | which strikes me as wrong |
| 12:17:33 | <int-e> | boxscape: not really... laziness means that doubleMe(doubleMe(doubleMe(xs))) is evaluated without ever fully evaluating the intermediate lists |
| 12:18:12 | <int-e> | boxscape: fusion is about completely eliminating the intermediate lists; they don't even exist as a cons with unevaluated tail anymore |
| 12:18:38 | <boxscape> | int-e yes, I'd agree with that, I think the text is ignoring that fusion is necessary at all though |
| 12:19:01 | → | delYsid joins (~user@84-115-55-45.cable.dynamic.surfer.at) |
| 12:19:16 | <int-e> | maybe |
| 12:19:51 | <boxscape> | (or rather, implying that you get fusion for free as soon as you have laziness) |
| 12:20:58 | <int-e> | the text is imprecise because it focuses on the values of the list, ignoring its spine |
| 12:21:19 | <boxscape> | yeah that's true |
| 12:21:57 | → | tose joins (~tose@ip-85-160-36-186.eurotel.cz) |
| 12:23:53 | → | ddellacosta joins (~ddellacos@86.106.121.83) |
| 12:26:33 | <merijn> | Even without fusion laziness reduces the operational cost |
| 12:26:43 | <merijn> | Since allocating and GCing in GHC is cheap |
| 12:26:54 | <merijn> | not having to store the entire spine N times certainly matters |
| 12:27:12 | <boxscape> | that's fair |
| 12:27:43 | × | Torro quits (Torro@gateway/vpn/protonvpn/torro) (Quit: leaving) |
| 12:28:33 | × | ddellacosta quits (~ddellacos@86.106.121.83) (Ping timeout: 252 seconds) |
| 12:29:28 | <delYsid> | How do I run Haskell code at build-time to generate a datafile which will be includeed via file-embed? |
| 12:30:01 | <delYsid> | I guess I need to hook into Setup.hs? But I didnt find any good examples yet. |
| 12:32:42 | <merijn> | I would strongly advice on reconsidering at least one of those two >.> |
| 12:33:55 | → | zebrag joins (~chris@user/zebrag) |
| 12:35:39 | <delYsid> | care to elaborate? |
| 12:35:58 | <merijn> | Hooking Setup.hs is super brittle |
| 12:36:01 | <xerox> | delYsid: looks like it, I found this https://cabal.readthedocs.io/en/3.4/cabal-package.html#autogenerated-modules-and-includes and an example in the wild https://github.com/ArgonDesign/acov/search?q=buildversion |
| 12:36:11 | <merijn> | It will break lots of things, such as doctests, etc. |
| 12:36:35 | <merijn> | delYsid: What kinda data do you need to embed? |
| 12:36:49 | <delYsid> | merijn: So is there a better way then Setup.hs? |
| 12:37:42 | <merijn> | Not if you need an external file. But then, if you are gonna generate the file at compile time, do you even need an external file? |
| 12:38:13 | <delYsid> | merijn: I lookup table, essentially... The data is in a text file, and I'd like to move the parser step from runtime to compile-time, since decoding via the Binary instance is way faster... |
| 12:38:43 | <delYsid> | s/I/A/ |
| 12:38:58 | <merijn> | delYsid: But you can just generate your lookup table at compile and embed that, rather than using file-embed, no? |
| 12:39:43 | <delYsid> | I dont understand. I was planning to use decode . embedFile |
| 12:39:46 | <merijn> | file-embed lets you embed external file as ByteString. But TemplateHaskell is much more powerful than that, you can simply convert to your final data structure at compile time and embed that data structure |
| 12:39:59 | <merijn> | delYsid: Right, but that's like, the worst of both worlds? |
| 12:40:09 | <merijn> | delYsid: The decode still happens at runtime |
| 12:40:37 | <delYsid> | true, but its less worse then what I currently have, which is running megaparsec at runtime |
| 12:41:11 | <delYsid> | But I get the idea, however, I have to admit, I am afraid of TH. Whenever I touched it, I almost went mad. |
| 12:41:12 | <merijn> | delYsid: Is your text file generated or static? |
| 12:41:23 | <merijn> | delYsid: file-embed *is* TH, though :p |
| 12:41:43 | → | pbrisbin joins (~patrick@pool-72-92-38-164.phlapa.fios.verizon.net) |
| 12:42:00 | <delYsid> | Well, the text file is sort of static, yeah. |
| 12:42:17 | <delYsid> | It might change sometime, but its not autogenerated. |
| 12:42:37 | <merijn> | ok, then I think your initial question was already confusing |
| 12:43:06 | <delYsid> | likely, my questions here tend to do that. |
| 12:43:27 | <merijn> | delYsid: Your question parses as: I want to generate a text-file using Haskell code, then embed that file using file-embed. Which is a major PITA, because that'd involve hooking Setup.hs and some kinda preprocessor setup |
| 12:43:41 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:3429:27e5:c9dc:b9d2) |
| 12:43:51 | <merijn> | delYsid: Whereas "I already have a file and want to embed that" is much less painful |
| 12:44:12 | <merijn> | Because that can be done entirely in TH |
| 12:45:52 | <merijn> | delYsid: If you have both "a text file" and "Haskell code that translates that file into whatever data structure you need at runtime", then doing that conversion in TH is fairly straightforward |
| 12:45:54 | <delYsid> | Well, I know embedFile, and use it. All I want is to run the conversion from text to binary a build-time so that I can load a binary a runtime... I could as well commit the binary file to the repo, but thats ugly man. |
| 12:46:38 | <merijn> | delYsid: Right, but how about this: Rather than than embedding the binary file, "read and convert" the text file at compile time and embed the resulting data structure |
| 12:47:00 | <delYsid> | And pointers on getting me started on that? Its essentially a newtype'd HashMap... |
| 12:47:27 | <merijn> | delYsid: Suppose your final (at runtime) data structure is "YourMap Foo Value" and you have "Text -> Either Error (YourMap Foo Value)" then things are "fairly" easy |
| 12:47:42 | <merijn> | delYsid: Well, you'll want: https://hackage.haskell.org/package/template-haskell-2.17.0.0/docs/Language-Haskell-TH-Syntax.html#v:liftTyped |
| 12:48:12 | <merijn> | delYsid: liftTyped turns a *value* (at TH runtime, i.e. compile time) into the TH *representation* of that value |
| 12:48:34 | <delYsid> | oh, neat |
| 12:48:41 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:3429:27e5:c9dc:b9d2) (Ping timeout: 268 seconds) |
| 12:48:45 | <merijn> | delYsid: I've got a fun library showcasing this |
| 12:48:48 | → | berberman_ joins (~berberman@user/berberman) |
| 12:49:04 | × | berberman quits (~berberman@user/berberman) (Ping timeout: 272 seconds) |
| 12:49:05 | <merijn> | delYsid: https://hackage.haskell.org/package/validated-literals |
| 12:49:17 | <merijn> | delYsid: Which does partial conversions at compile time (and errors if they fail) |
| 12:49:46 | <merijn> | delYsid: The Q (i.e. TH monad) is an instance of MonadIO, so you can just liftIO any filesystem code to run at compile time with no issue |
| 12:50:05 | × | _________ quits (~nobody@user//x-7881368) (Remote host closed the connection) |
| 12:50:23 | <delYsid> | So whats the type of my "compiler" function, then? |
| 12:50:47 | <merijn> | delYsid: And then you could just write "lookup = $( liftIO (readFile path) >>= foo)" where 'foo' is a combination of liftTyped + your decode stuff |
| 12:51:24 | → | lavaman joins (~lavaman@98.38.249.169) |
| 12:51:31 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 12:51:42 | <merijn> | Simplest case would be "foo = liftTyped . decodeData" (but that's wrong if decodeData can return an Either/throw an exception, which you'd need to handle before liftTyped) |
| 12:52:16 | <merijn> | but the validated-literals code has some examples of how to turn "Either Error a" into 'TExp a' that has a type error at compile time |
| 12:52:41 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 12:52:45 | <merijn> | delYsid: For example: https://github.com/merijn/validated-literals/blob/master/ValidLiterals.hs#L110-L116 |
| 12:53:00 | → | wonko joins (~wjc@62.115.229.50) |
| 12:54:13 | <merijn> | delYsid: And then valid (or validInteger, etc.) can be used as splices like: https://github.com/merijn/validated-literals/blob/master/examples/Examples.hs#L24-L25 |
| 12:55:29 | <delYsid> | [||val||] ugh, TH... |
| 12:55:29 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 12:55:31 | → | poljar1 joins (~poljar@93-139-68-198.adsl.net.t-com.hr) |
| 12:55:34 | × | tose quits (~tose@ip-85-160-36-186.eurotel.cz) (Quit: WeeChat 3.0) |
| 12:56:09 | <merijn> | delYsid: '[|| x ||]' just turns *value* 'x' into "an AST representing the value 'x'" |
| 12:56:18 | <merijn> | delYsid: Since the output of TH is *an AST* |
| 12:56:55 | → | zmt00 joins (~zmt00@user/zmt00) |
| 12:56:57 | <merijn> | So "2" is just the value 2 in the TH code, but "[|| 2 ||]" is "an AST representing the syntax '2'" |
| 12:57:14 | <delYsid> | my problem starts at liftTyped. I dont understand its type signature at all. Because I dont know what Code is... The Q monad confuses me. |
| 12:58:06 | <merijn> | delYsid: Q monad is "IO + GHC" |
| 12:58:30 | × | poljar quits (~poljar@93-143-149-172.adsl.net.t-com.hr) (Ping timeout: 250 seconds) |
| 12:58:53 | <merijn> | delYsid: The Q is the "quasiquoting" monad. i.e. the context in which code that runs at compile time executes |
| 12:59:13 | <merijn> | delYsid: Does the Exp type make sense to you? https://hackage.haskell.org/package/template-haskell-2.17.0.0/docs/Language-Haskell-TH.html#g:20 |
| 12:59:45 | <merijn> | delYsid: i.e., that's just the datatype for Haskell's AST |
| 12:59:52 | <xerox> | I used to be in the same camp til I found https://downloads.haskell.org/~ghc/8.10.3/docs/html/users_guide/glasgow_exts.html#template-haskell it is a very clear explanation I think |
| 12:59:54 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 252 seconds) |
| 12:59:57 | <merijn> | (well, the expression part of the AST, anyway) |
| 12:59:59 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 244 seconds) |
| 13:00:17 | <merijn> | brb |
| 13:00:23 | → | _________ joins (~nobody@user//x-7881368) |
| 13:01:15 | → | alx741 joins (~alx741@181.196.69.18) |
| 13:01:32 | × | brandonh quits (~brandonh@151.46.91.125) (Ping timeout: 250 seconds) |
| 13:01:41 | → | ddellacosta joins (~ddellacos@89.46.62.63) |
| 13:02:08 | → | favonia joins (~favonia@user/favonia) |
| 13:02:10 | × | ddellacosta quits (~ddellacos@89.46.62.63) (Remote host closed the connection) |
| 13:02:39 | → | ddellacosta joins (~ddellacos@89.46.62.63) |
| 13:03:50 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 13:04:01 | → | ddellaco_ joins (~ddellacos@86.106.121.65) |
| 13:04:40 | <ski> | guest61 : well, i also suggested using `case'-`of' to pick apart the `parse' result, distinguishing between then successful and the failure case, rather than going on to use `fmap' all the time to manipulate the successful result. but also to use `case'-`of', instead of `==' and `/=' (and e.g. using `catMaybes' instead of `filter' and `fmap fromJust'). then i had a few cosmetic changes like removing |
| 13:04:46 | <ski> | redundant brackets, removing all the `$'s, replacing `print' with `putStrLn' with `hPutStrLn stderr', factoring `pure' out of `maybe' |
| 13:07:32 | × | ddellacosta quits (~ddellacos@89.46.62.63) (Ping timeout: 264 seconds) |
| 13:10:39 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds) |
| 13:11:04 | → | favonia joins (~favonia@user/favonia) |
| 13:11:04 | × | jolly quits (~jolly@208.180.97.158) (Quit: Connection closed) |
| 13:11:07 | → | cfricke joins (~cfricke@user/cfricke) |
| 13:14:04 | → | jolly joins (~jolly@208.180.97.158) |
| 13:14:06 | × | fabfianda quits (~fabfianda@net-93-148-121-206.cust.vodafonedsl.it) (Ping timeout: 250 seconds) |
| 13:14:54 | → | fabfianda joins (~fabfianda@mob-5-90-243-109.net.vodafone.it) |
| 13:17:49 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 272 seconds) |
| 13:18:52 | <delYsid> | merijn: So, how do I make my type an instance of Lift? |
| 13:19:42 | → | cfricke joins (~cfricke@user/cfricke) |
| 13:21:04 | × | hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1) |
| 13:22:12 | → | lavaman joins (~lavaman@98.38.249.169) |
| 13:23:44 | × | mastarija__ quits (~mastarija@46.188.129.109) (Ping timeout: 264 seconds) |
| 13:25:50 | → | chomwitt joins (~Pitsikoko@athedsl-20549.home.otenet.gr) |
| 13:26:35 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds) |
| 13:26:41 | × | nsilv quits (~nsilv@212.103.198.210) (Ping timeout: 272 seconds) |
| 13:29:30 | × | kiweun quits (~sheepduck@2607:fea8:2a61:4800::6882) (Remote host closed the connection) |
| 13:29:53 | → | kiweun joins (~sheepduck@2607:fea8:2a61:4800::e92f) |
| 13:30:01 | <dminuoso> | delYsid: You write an instance declaration? |
| 13:30:12 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 13:30:51 | → | AgentM joins (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net) |
| 13:31:42 | <dminuoso> | delYsid: All you have to do is specify how to build an Exp from a value of your type. To generate fresh names that cannot be captured, you can use `newName` inside the definition of `lift` |
| 13:32:08 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds) |
| 13:33:12 | → | thyriaen joins (~thyriaen@45.178.73.238) |
| 13:33:32 | <merijn> | delYsid: You can DeriveLift |
| 13:33:33 | <jaror[m]> | With (since) 9.0.1 you have to give an implementation of `liftTyped`, that might be harder than implementing `lift`. |
| 13:35:21 | → | nsilv joins (~nsilv@212.103.198.210) |
| 13:38:03 | × | ddellaco_ quits (~ddellacos@86.106.121.65) (Remote host closed the connection) |
| 13:38:32 | → | ddellacosta joins (~ddellacos@86.106.121.65) |
| 13:39:40 | → | ddellaco_ joins (~ddellacos@89.46.62.34) |
| 13:39:45 | <delYsid> | merijn: I did. I even found th-instances-lift for Unboxed Vector, but now I am stuck at HashMap not having a Lift instance... |
| 13:40:01 | → | hendursaga joins (~weechat@user/hendursaga) |
| 13:43:32 | × | ddellacosta quits (~ddellacos@86.106.121.65) (Ping timeout: 264 seconds) |
| 13:45:04 | → | ell8 joins (~ellie@user/ellie) |
| 13:46:28 | × | ell quits (~ellie@user/ellie) (Read error: Connection reset by peer) |
| 13:46:29 | ell8 | is now known as ell |
| 13:46:41 | × | jlamothe quits (~jlamothe@198.251.57.81) (Quit: leaving) |
| 13:47:43 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 13:47:48 | → | slack1256 joins (~slack1256@191.125.180.163) |
| 13:49:56 | → | geekosaur joins (~geekosaur@069-135-003-034.biz.spectrum.com) |
| 13:50:21 | <merijn> | delYsid: You can workaround that like so: https://github.com/merijn/validated-literals/blob/master/examples/ByteString.hs#L28 |
| 13:51:54 | <merijn> | i.e. "AppE <$> [| HM.fromList |] <*> lift x" where "x :: [(k, v)]" |
| 13:52:19 | <jippiedoe> | re: laziness and fusing list operations: I like to think of it in evaluation order; laziness evaluates the f's and g's in `map f . map g` in the same order as the fused `map (f . g)`. Actual fusion/deforestation just removes some indirection with consing and unconsing |
| 13:56:00 | → | myShoggoth joins (~myShoggot@97-120-89-117.ptld.qwest.net) |
| 13:57:33 | × | jaevanko quits (~jaevanko@2600:1700:1330:2bef:8da6:e24d:9a34:2f32) (Quit: Leaving) |
| 13:59:20 | × | _________ quits (~nobody@user//x-7881368) (Remote host closed the connection) |
| 13:59:51 | × | xff0x_ quits (~xff0x@port-92-195-66-229.dynamic.as20676.net) (Ping timeout: 252 seconds) |
| 14:00:10 | → | xff0x_ joins (~xff0x@185.65.135.235) |
| 14:00:22 | → | biberu\ joins (~biberu@user/biberu) |
| 14:00:35 | <delYsid> | oh, it works. |
| 14:00:51 | <merijn> | \o/ |
| 14:01:27 | → | slac19625 joins (~slack1256@191.125.180.163) |
| 14:01:30 | → | tabemann_ joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) |
| 14:01:48 | → | nschoe joins (~quassel@178.251.84.79) |
| 14:01:49 | → | bollu7 joins (~bollu@139.59.46.74) |
| 14:01:59 | × | v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Remote host closed the connection) |
| 14:02:01 | <dminuoso> | jippiedoe: Wouldn't another major benefit of fusing `map f . map g` into `map (f . g)` be improved locality of cache? |
| 14:02:26 | <merijn> | Yes, no, maybe? |
| 14:02:45 | → | abbie6 joins (~abbie@user/abbie) |
| 14:03:04 | → | monochrm joins (trebla@216.138.220.146) |
| 14:03:06 | <dminuoso> | Well, if the produced data of `f` is still hot in your L1/L2, then surely that's a good thing |
| 14:03:18 | → | dobblego joins (~dibblego@122-199-1-30.ip4.superloop.com) |
| 14:03:18 | × | dobblego quits (~dibblego@122-199-1-30.ip4.superloop.com) (Changing host) |
| 14:03:18 | → | dobblego joins (~dibblego@haskell/developer/dibblego) |
| 14:03:23 | → | tomjagua1paw joins (~tom@li367-225.members.linode.com) |
| 14:03:31 | → | gentauro_ joins (~gentauro@185.107.12.141) |
| 14:03:35 | → | sciencen1 joins (~sciencent@hacksoc/ordinary-member) |
| 14:03:46 | <dminuoso> | If you map twice, then depending on the length of the data, you could be evicting chunks of it |
| 14:03:50 | → | shapr joins (~user@pool-108-28-144-11.washdc.fios.verizon.net) |
| 14:03:55 | → | samebchase6 joins (~samebchas@51.15.68.182) |
| 14:03:57 | → | lambdap7 joins (~lambdap@static.167.190.119.168.clients.your-server.de) |
| 14:04:03 | → | jlamothe joins (~jlamothe@198.251.57.81) |
| 14:04:11 | → | dustinm- joins (~dustinm@static.38.6.217.95.clients.your-server.de) |
| 14:04:22 | → | zopsi_ joins (zopsi@2600:3c00::f03c:91ff:fe14:551f) |
| 14:04:24 | → | _________ joins (~nobody@user//x-7881368) |
| 14:04:25 | → | urtie joins (~arthurvl@deban2.xs4all.space) |
| 14:04:46 | → | micro_ joins (~micro@user/micro) |
| 14:05:05 | → | Philonous_ joins (~Philonous@user/philonous) |
| 14:05:23 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:2121:a570:d35e:ba7a) |
| 14:05:28 | → | juri__ joins (~juri@178.63.35.222) |
| 14:06:03 | → | dtman34_ joins (~dtman34@c-73-62-246-247.hsd1.mn.comcast.net) |
| 14:06:06 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds) |
| 14:06:13 | → | wagle joins (~wagle@quassel.wagle.io) |
| 14:06:26 | → | bah_ joins (~bah@l1.tel) |
| 14:06:38 | <merijn> | dminuoso: That doesn't hold though |
| 14:06:38 | → | ozzymcdu1f joins (~mathieu@81-234-151-21-no94.tbcn.telia.com) |
| 14:06:52 | <merijn> | dminuoso: In a lazy setting the evaluation of the first and second map would be interleaved |
| 14:07:07 | → | aravk_ joins (~aravk@user/aravk) |
| 14:07:09 | <dminuoso> | Ah yes |
| 14:07:15 | × | shailangsa quits (~shailangs@host86-186-177-181.range86-186.btcentralplus.com) (Killed (NickServ (GHOST command used by Shailangsa_))) |
| 14:07:21 | → | shanemikel_ joins (~shanemike@desk.roadwar.net) |
| 14:07:30 | → | typedfern_ joins (~Typedfern@185.red-83-57-142.dynamicip.rima-tde.net) |
| 14:08:17 | <dminuoso> | What's the main benefit of fusion then? Ability of the simplifier to improve `f.g`? |
| 14:08:27 | <merijn> | dminuoso: You get to skip allocating a cons cell |
| 14:08:31 | <dminuoso> | Or is it really just saving extra case-of discriminating on cons? |
| 14:08:42 | <dminuoso> | Ah, it has to create a new one |
| 14:08:51 | × | boxscape quits (~boxscape@user/boxscape) (Quit: Connection closed) |
| 14:08:51 | → | harry joins (~harry@92.234.0.237) |
| 14:08:54 | → | ptrcmd_ joins (~ptrcmd@user/ptrcmd) |
| 14:09:19 | → | otulp_ joins (~otulp@ti0187q162-2423.bb.online.no) |
| 14:09:30 | → | dmwit_ joins (~dmwit@pool-96-255-233-247.washdc.fios.verizon.net) |
| 14:09:51 | → | troydm1 joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 14:10:07 | <merijn> | yeah |
| 14:10:11 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:2121:a570:d35e:ba7a) (Ping timeout: 272 seconds) |
| 14:10:15 | → | boxscape joins (~boxscape@user/boxscape) |
| 14:10:27 | × | ddellaco_ quits (~ddellacos@89.46.62.34) (Remote host closed the connection) |
| 14:10:34 | × | myShoggoth quits (~myShoggot@97-120-89-117.ptld.qwest.net) (*.net *.split) |
| 14:10:34 | × | slack1256 quits (~slack1256@191.125.180.163) (*.net *.split) |
| 14:10:34 | × | fabfianda quits (~fabfianda@mob-5-90-243-109.net.vodafone.it) (*.net *.split) |
| 14:10:34 | × | sciencentistguy quits (~sciencent@hacksoc/ordinary-member) (*.net *.split) |
| 14:10:34 | × | niko quits (~niko@libera/staff/niko) (*.net *.split) |
| 14:10:34 | × | michalz quits (~michalz@185.246.204.125) (*.net *.split) |
| 14:10:34 | × | shanemikel quits (~shanemike@desk.roadwar.net) (*.net *.split) |
| 14:10:34 | × | ozzymcduff quits (~mathieu@81-234-151-21-no94.tbcn.telia.com) (*.net *.split) |
| 14:10:34 | × | gentauro quits (~gentauro@user/gentauro) (*.net *.split) |
| 14:10:34 | × | micro quits (~micro@user/micro) (*.net *.split) |
| 14:10:34 | × | bah quits (~bah@l1.tel) (*.net *.split) |
| 14:10:34 | × | aravk quits (~aravk@user/aravk) (*.net *.split) |
| 14:10:34 | × | juri_ quits (~juri@178.63.35.222) (*.net *.split) |
| 14:10:34 | × | otulp quits (~otulp@ti0187q162-2423.bb.online.no) (*.net *.split) |
| 14:10:34 | × | wagle_ quits (~wagle@quassel.wagle.io) (*.net *.split) |
| 14:10:34 | × | Philonous quits (~Philonous@user/philonous) (*.net *.split) |
| 14:10:34 | × | FragByte quits (~christian@user/fragbyte) (*.net *.split) |
| 14:10:34 | × | abbie quits (~abbie@user/abbie) (*.net *.split) |
| 14:10:34 | × | tabemann quits (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net) (*.net *.split) |
| 14:10:34 | × | haask quits (~harry@92.234.0.237) (*.net *.split) |
| 14:10:34 | × | bollu quits (~bollu@139.59.46.74) (*.net *.split) |
| 14:10:34 | × | monochrom quits (~trebla@216.138.220.146) (*.net *.split) |
| 14:10:34 | × | Xnuk quits (~xnuk@45.76.202.58) (*.net *.split) |
| 14:10:34 | × | dy quits (~dy@user/dy) (*.net *.split) |
| 14:10:34 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (*.net *.split) |
| 14:10:34 | × | biberu quits (~biberu@user/biberu) (*.net *.split) |
| 14:10:34 | × | Typedfern quits (~Typedfern@185.red-83-57-142.dynamicip.rima-tde.net) (*.net *.split) |
| 14:10:34 | × | hrnz quits (~ulli@cherry.hrnz.li) (*.net *.split) |
| 14:10:34 | × | tomjaguarpaw quits (~tom@li367-225.members.linode.com) (*.net *.split) |
| 14:10:34 | × | samebchase quits (~samebchas@51.15.68.182) (*.net *.split) |
| 14:10:34 | × | lambdap quits (~lambdap@static.167.190.119.168.clients.your-server.de) (*.net *.split) |
| 14:10:34 | × | earthy quits (~arthurvl@deban2.xs4all.space) (*.net *.split) |
| 14:10:34 | × | dibblego quits (~dibblego@haskell/developer/dibblego) (*.net *.split) |
| 14:10:34 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (*.net *.split) |
| 14:10:34 | × | dtman34 quits (~dtman34@c-73-62-246-247.hsd1.mn.comcast.net) (*.net *.split) |
| 14:10:34 | × | ptrcmd quits (~ptrcmd@user/ptrcmd) (*.net *.split) |
| 14:10:34 | × | zopsi quits (~zopsi@irc.dir.ac) (*.net *.split) |
| 14:10:34 | × | dustinm quits (~dustinm@static.38.6.217.95.clients.your-server.de) (*.net *.split) |
| 14:10:34 | × | dmwit quits (~dmwit@pool-96-255-233-247.washdc.fios.verizon.net) (*.net *.split) |
| 14:10:35 | monochrm | is now known as monochrom |
| 14:10:35 | bollu7 | is now known as bollu |
| 14:10:35 | otulp_ | is now known as otulp |
| 14:10:35 | abbie6 | is now known as abbie |
| 14:10:35 | biberu\ | is now known as biberu |
| 14:10:35 | dobblego | is now known as dibblego |
| 14:10:35 | lambdap7 | is now known as lambdap |
| 14:10:42 | → | myShoggoth joins (~myShoggot@97-120-89-117.ptld.qwest.net) |
| 14:10:51 | → | ddellacosta joins (~ddellacos@89.46.62.34) |
| 14:10:57 | → | fabfianda joins (~fabfianda@mob-5-90-243-109.net.vodafone.it) |
| 14:11:07 | → | Xnuk joins (~xnuk@45.76.202.58) |
| 14:11:10 | → | dy joins (~dy@user/dy) |
| 14:11:10 | × | thyriaen quits (~thyriaen@45.178.73.238) (Quit: Leaving) |
| 14:14:55 | × | mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Quit: ZNC 1.8.2 - https://znc.in) |
| 14:14:56 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:16:03 | → | FragByte joins (~christian@user/fragbyte) |
| 14:16:16 | → | mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) |
| 14:16:54 | × | Codaraxis_ quits (~Codaraxis@89.45.7.142) (Remote host closed the connection) |
| 14:17:42 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 264 seconds) |
| 14:19:11 | <delYsid> | • GHC internal error: ‘fp’ is not in scope during type checking, but it passed the renamer |
| 14:19:15 | → | waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
| 14:19:20 | <delYsid> | there be dragons |
| 14:19:20 | → | fluffyballoon joins (~fluffybal@2620:72:0:6480::10f7) |
| 14:19:36 | → | acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
| 14:19:48 | <ski> | @ghc |
| 14:19:49 | <lambdabot> | Command stack underflow at command |
| 14:20:33 | → | niko joins (~niko@libera/staff/niko) |
| 14:20:45 | × | xff0x_ quits (~xff0x@185.65.135.235) (Ping timeout: 252 seconds) |
| 14:21:02 | → | derelict joins (~winter@2603-6011-f901-9e5b-78b5-8b2f-cdb2-4171.res6.spectrum.com) |
| 14:21:13 | → | skewerr joins (~spoonm@inaba.spoonm.org) |
| 14:21:25 | → | hrnz joins (~ulli@irc.plumbing) |
| 14:22:21 | → | xff0x_ joins (~xff0x@2001:1a81:52c9:6b00:c9ec:1ec0:3ea4:2bb4) |
| 14:23:53 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 14:27:12 | → | brandonh joins (~brandonh@151.38.222.167) |
| 14:28:39 | → | just_some_noob6 joins (~syd@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net) |
| 14:28:55 | ← | just_some_noob6 parts (~syd@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net) () |
| 14:31:59 | × | azeem quits (~azeem@176.201.21.77) (Read error: Connection reset by peer) |
| 14:32:12 | → | azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) |
| 14:32:31 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Quit: Leaving) |
| 14:33:55 | → | pagnol joins (~user@014198154145.ctinets.com) |
| 14:33:59 | × | troydm1 quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset) |
| 14:34:11 | → | shailangsa joins (~shailangs@host86-186-177-181.range86-186.btcentralplus.com) |
| 14:34:15 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 14:34:23 | → | michalz joins (~michalz@185.246.204.114) |
| 14:36:10 | → | mastarija__ joins (~mastarija@46.188.129.109) |
| 14:37:58 | × | wonko quits (~wjc@62.115.229.50) (Remote host closed the connection) |
| 14:38:29 | × | gentauro_ quits (~gentauro@185.107.12.141) (Changing host) |
| 14:38:29 | → | gentauro_ joins (~gentauro@user/gentauro) |
| 14:44:22 | <delYsid> | merijn: x fp = $(AppE <$> [| fromList |] <*> lift [| x |]) where x = $$(r fp) -- gives me a stage restriction. How do I pass an argument through? |
| 14:44:58 | <delYsid> | ugh, wait |
| 14:45:27 | <delYsid> | x fp = $(AppE <$> [| fromList |] <*> lift $$(r fp)) -- better, but same error |
| 14:45:58 | <delYsid> | r :: FilePath -> Q (TExp [D]) |
| 14:46:06 | <c_wraith> | is r defined in the same file? |
| 14:46:12 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 14:46:13 | <c_wraith> | that's what the stage restriction is about |
| 14:46:13 | × | fabfianda quits (~fabfianda@mob-5-90-243-109.net.vodafone.it) (Read error: Connection reset by peer) |
| 14:46:26 | → | fabfianda joins (~fabfianda@net-93-148-121-206.cust.dsl.teletu.it) |
| 14:46:42 | <delYsid> | is there a way to wrap this up without creating *two* internal modules? |
| 14:46:43 | <gentauro_> | «Early June 8, a customer pushed *a valid configuration* change that included the specific circumstances that triggered the bug, which caused 85% of our network to return errors.» so a type error xD https://www.fastly.com/blog/summary-of-june-8-outage |
| 14:47:08 | <c_wraith> | delYsid: you could define r locally instead of at the top level |
| 14:47:20 | <delYsid> | ah |
| 14:47:42 | × | bontaq quits (~user@ool-18e47f8d.dyn.optonline.net) (Ping timeout: 252 seconds) |
| 14:47:45 | <tdammers> | obvious fix: grep for the number 85 in the codebase, and change all occurrences to 0 |
| 14:48:41 | <merijn> | delYsid: You don't wanna $( the AppE, you just return that |
| 14:48:59 | <merijn> | At least, I think you don't |
| 14:49:11 | <merijn> | ah, wait, I see what's you're doing |
| 14:49:34 | <delYsid> | I think the problem is Exp vs TExp |
| 14:49:39 | <merijn> | delYsid: You wanna get rid of the outer $( and the use "$(x filepath)" somewhere |
| 14:49:55 | → | bontaq` joins (~user@ool-18e47f8d.dyn.optonline.net) |
| 14:50:28 | <merijn> | delYsid: Ah, you're mixing typed and untyped TH too |
| 14:50:43 | <merijn> | $$( is typed TH, but $( and [| are untyped TH |
| 14:50:49 | → | benin03 joins (~benin@183.82.205.134) |
| 14:50:57 | × | benin03 quits (~benin@183.82.205.134) (Client Quit) |
| 14:51:05 | <merijn> | delYsid: "lift $$(r fp)" is also suspificous |
| 14:51:20 | <merijn> | That looks like you just want "r fp", tbh |
| 14:51:21 | <delYsid> | yeah, I told you TH confuses me. |
| 14:51:23 | <delYsid> | But I am close |
| 14:51:37 | <delYsid> | AIUI, I have TExp cos I use liftTyped |
| 14:51:49 | <delYsid> | But I dunno how to get rid of it, $$(...) seemed to do the trick |
| 14:52:15 | <merijn> | delYsid: Let's rewind a bit. Part of the confusingness of TH is that you have *2* "runtimes" (the "runtime" of code that runs at compile time and "normal" runtime) |
| 14:52:29 | × | fluffyballoon quits (~fluffybal@2620:72:0:6480::10f7) (Quit: Client closed) |
| 14:52:35 | <delYsid> | No instance for (Lift (Q (TExp [Opening]))) |
| 14:52:50 | <merijn> | delYsid: The code that runs at compile time is just regular old boring Haskell. But it needs to (in the end) produce an AST that GHC "inserts" into the code that is being compiled |
| 14:53:06 | <merijn> | delYsid: The Q monad let's you 1) do IO and 2) query GHC about code/types |
| 14:53:08 | <delYsid> | I get that part |
| 14:53:38 | <merijn> | delYsid: $(x) takes "Q (TExp a)" and splices the AST produced by that Q action into that part of the code |
| 14:54:15 | <merijn> | delYsid: So "lift $$(r fp)" first runs 'r fp' (at compile time), then splices the AST into the code |
| 14:54:16 | <delYsid> | It only worked when I used $$, but I was only trying it out in ghci, so maybe the repl differs? |
| 14:54:49 | <merijn> | but then 'lift' tries to turn that AST into an AST again |
| 14:55:20 | × | gentauro_ quits (~gentauro@user/gentauro) (Quit: leaving) |
| 14:55:21 | <delYsid> | Couldn't match type ‘TExp [Opening]’ with ‘Exp’ |
| 14:55:25 | <merijn> | delYsid: So you end up trying to splice the AST of "Q (TExp a)" into your code |
| 14:55:31 | <merijn> | delYsid: Ok, that is easy to fix |
| 14:55:35 | → | gentauro joins (~gentauro@user/gentauro) |
| 14:55:51 | <merijn> | delYsid: Replace "[| x |]" with "[|| x ||]" |
| 14:56:11 | <merijn> | ([|| ||] is the typed quotes vs [| |] which produces untyped quotes) |
| 14:56:27 | <delYsid> | Couldn't match type ‘TExp (Q (TExp [Opening]))’ with ‘Exp’ |
| 14:56:28 | bontaq` | is now known as bontaq |
| 14:56:35 | <merijn> | can you pastebin the code? |
| 14:57:22 | <delYsid> | to be honest, no. I am stuck on a console |
| 14:58:33 | <delYsid> | The problem is still typed vs untyped, just that [|| x ||] doesnt help because I have no x, I have "r fp" which is Q (TExp [Opening]) |
| 14:58:46 | <merijn> | hold, lemme slap something together |
| 14:59:16 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 14:59:33 | → | Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com) |
| 14:59:46 | <merijn> | And then break it down |
| 15:00:04 | <merijn> | https://paste.tomsmeding.com/l6B1l0Pj |
| 15:00:22 | <merijn> | Ok, so the 'r' there is just regular boring old Haskell you know how to write, right? |
| 15:01:16 | <delYsid> | https://blind.guru/TH.hs |
| 15:01:27 | × | maerwald quits (~maerwald@user/maerwald) (Ping timeout: 252 seconds) |
| 15:01:30 | <merijn> | delYsid: Let's breakdown 'x', first we liftIO your boring old IO code into the Q monad. This means we execute *all* of 'r' at compile time (probably 'r' needs to be in a different module from 'x' due to stage restriction) |
| 15:02:04 | Lycurgus | just found googling "legible haskell" amusing |
| 15:02:05 | × | mastarija__ quits (~mastarija@46.188.129.109) (Quit: Leaving) |
| 15:02:23 | <merijn> | So, 'x' is a TH function that produces a (typed) AST that represents a value of type 'YourType' |
| 15:02:32 | <merijn> | delYsid: Let's look at the parts |
| 15:02:33 | → | maerwald joins (~maerwald@mail.hasufell.de) |
| 15:02:43 | × | maerwald quits (~maerwald@mail.hasufell.de) (Changing host) |
| 15:02:43 | → | maerwald joins (~maerwald@user/maerwald) |
| 15:02:51 | <merijn> | "AppE" is a constructor from Exp which represents function application |
| 15:03:18 | <delYsid> | get that |
| 15:03:35 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds) |
| 15:03:48 | <merijn> | [|| fromList ||] turns the 'fromList' function into 'Q (TExp (a -> b))', i.e. a quasiquote representing a function (probably 'Q (TExp ([k, v] -> HashMap k v)' here) |
| 15:04:13 | → | favonia joins (~favonia@user/favonia) |
| 15:04:16 | <merijn> | So we somehow need to get an AST for [(k, v)] to which we can apply fromList |
| 15:04:38 | <merijn> | delYsid: But what you *have* is not the AST for [(k, v)], but an *actual* list that 'r' just parsed |
| 15:05:08 | <merijn> | delYsid: So we need a function that goes '[(k, v)] -> Q (TExp [(k, v)])' |
| 15:05:22 | <merijn> | delYsid: Which is what liftTyped does |
| 15:05:48 | <c_wraith> | on sufficiently recent versions of GHC... |
| 15:05:54 | <merijn> | Now, since we have AppE and Q is a monad we can do our regular Applicative dance to combine them |
| 15:05:58 | <c_wraith> | I'm a bit sad how recent liftTyped is |
| 15:06:00 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:2121:a570:d35e:ba7a) |
| 15:06:02 | <merijn> | c_wraith: Same |
| 15:06:18 | <merijn> | c_wraith: But at least it's here now! |
| 15:07:12 | ski | . o O ( "Cross-stage persistence" <http://okmij.org/ftp/ML/MetaOCaml.html#CSP> ) |
| 15:07:14 | <merijn> | delYsid: So now that we have 'x' this way, all we need to do to embed your data is call (and splice the result) of 'x' into your actual code, which you'd do using something like 'compileTimeMap = $$(x "path/to/file")' in your code |
| 15:08:04 | <merijn> | delYsid: There's one catch, though. Which is: you cannot call code in the same module as 'x' from 'x' (so your 'r' function needs to be in a different module) and you cannot call 'x' in the module you define it (the stage restriction error before) |
| 15:08:31 | <merijn> | delYsid: Because GHC has to compile 'r' before it can compile 'x' and needs to compile 'x' before you can use it and doing that in the same module is hard |
| 15:09:22 | <delYsid> | Since I dont need r, is there a way to write x such that I dont need a second module? |
| 15:09:37 | × | Scotty_Trees quits (~Scotty_Tr@162-234-179-169.lightspeed.brhmal.sbcglobal.net) (Quit: Leaving) |
| 15:10:10 | <merijn> | delYsid: Sure, you can have the code of 'r' inside 'x' itself, if it only uses library code |
| 15:10:30 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:2121:a570:d35e:ba7a) (Ping timeout: 264 seconds) |
| 15:11:10 | → | Scotty_Trees joins (~Scotty_Tr@162-234-179-169.lightspeed.brhmal.sbcglobal.net) |
| 15:11:58 | <merijn> | delYsid: Something like https://paste.tomsmeding.com/NBPCg1ip |
| 15:12:13 | <merijn> | delYsid: assuming parseList is defined in another module |
| 15:12:25 | <delYsid> | I always hit the same issue. I have a TExp but my AppE wants an Exp |
| 15:12:58 | <delYsid> | the modern web is driving me crazy. try "lynx https://paste.tomsmeding.com/NBPCg1ip" and be welcome in my world. |
| 15:13:19 | → | wroathe_ joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 15:13:30 | → | chele_ joins (~chele@user/chele) |
| 15:13:31 | → | fendor_ joins (~fendor@178.165.130.85.wireless.dyn.drei.com) |
| 15:14:18 | × | pavonia quits (~user@user/siracusa) (Read error: Connection reset by peer) |
| 15:14:26 | → | hiptobecubic joins (~john@c-73-55-99-95.hsd1.fl.comcast.net) |
| 15:14:30 | → | ell4 joins (~ellie@user/ellie) |
| 15:15:02 | → | kw` joins (~user@152.1.137.158) |
| 15:15:17 | → | nilof joins (~olofs@90-227-86-119-no542.tbcn.telia.com) |
| 15:15:32 | × | chele quits (~chele@user/chele) (Killed (lithium.libera.chat (Nickname regained by services))) |
| 15:15:32 | chele_ | is now known as chele |
| 15:15:52 | → | laguneucl joins (~Pitsikoko@2a02:587:dc02:b00:98b0:cd42:bd6f:8295) |
| 15:16:05 | × | wroathe_ quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Client Quit) |
| 15:16:06 | → | spatchkaa__ joins (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) |
| 15:16:21 | → | poljar joins (~poljar@93-139-68-198.adsl.net.t-com.hr) |
| 15:16:34 | → | pavonia joins (~user@user/siracusa) |
| 15:16:59 | → | MidAutumnMoon3 joins (~MidAutumn@user/midautumnmoon) |
| 15:17:11 | → | nshepperd24 joins (~nshepperd@li364-218.members.linode.com) |
| 15:17:20 | <delYsid> | No instance for (Lift (Q (TExp (Q (TExp [Opening]))))) |
| 15:17:25 | → | comerijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 15:17:25 | <comerijn> | It's weird that AppE doesn't work, though. It worked in my tests |
| 15:17:38 | <delYsid> | OK, its official, I am just too dumb. But thanks for trying. |
| 15:17:40 | × | Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt) |
| 15:17:44 | → | averell- joins (~averell@user/averell) |
| 15:17:45 | <comerijn> | hmmm, how much of what I typed got lost? |
| 15:17:49 | → | wroathe_ joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 15:17:53 | → | pierrot joins (~pi@user/pierrot) |
| 15:18:20 | <comerijn> | delYsid: Naah, it's just unlucky that AppE works on TExp the last time I checked, but doesn't in the latest version |
| 15:18:54 | → | danidiaz1 joins (~ESDPC@static-35-0-85-188.ipcom.comunitel.net) |
| 15:18:56 | → | fjmorazan_ joins (~quassel@user/fjmorazan) |
| 15:19:07 | → | peutri_ joins (~peutri@ns317027.ip-94-23-46.eu) |
| 15:19:13 | <delYsid> | Thats what I was trying to explain. I need a function TExp a -> Exp, somehow. AppE only works with Exp |
| 15:19:47 | → | nsilv1 joins (~nsilv@212.103.198.210) |
| 15:19:55 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 15:19:55 | → | oxide_ joins (~lambda@user/oxide) |
| 15:19:55 | <comerijn> | delYsid: What I typed before getting dropped was: Well, the easiest hack is to rewrite it to "AppE <$> [| fromList |] <*> lift result" |
| 15:19:58 | → | hueso_ joins (~root@152.170.216.40) |
| 15:20:01 | <delYsid> | Or I just give up and do "fromList $(foo "file")" and call it a day. |
| 15:20:04 | <comerijn> | Which just avoids using typed TH at all |
| 15:20:06 | → | kmein joins (~weechat@user/kmein) |
| 15:20:10 | → | jackhill_ joins (~jackhill@kalessin.dragonsnail.net) |
| 15:20:10 | → | xerox_ joins (~edi@user/edi) |
| 15:20:18 | → | pbrisbin_ joins (~patrick@pool-72-92-38-164.phlapa.fios.verizon.net) |
| 15:20:19 | → | slowButP1esent joins (~slowButPr@user/slowbutpresent) |
| 15:20:23 | → | wei2912_ joins (~wei2912@112.199.250.21) |
| 15:20:26 | × | johnw quits (~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0) (Ping timeout: 272 seconds) |
| 15:20:39 | <comerijn> | FYI "unType :: TExp a -> Exp" exists too |
| 15:20:45 | → | blades_ joins (~blades@204.48.29.163) |
| 15:21:00 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:fef:c229:4466:542) (Ping timeout: 268 seconds) |
| 15:21:49 | → | codolio joins (~dolio@130.44.130.54) |
| 15:21:58 | → | pieguy128_ joins (~pieguy128@bas1-montreal02-65-92-163-194.dsl.bell.ca) |
| 15:22:21 | <delYsid> | aha! |
| 15:22:31 | <delYsid> | just do lift and not liftTyped, and everything is fine. |
| 15:22:33 | → | amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) |
| 15:22:41 | → | dhouthoo_ joins (~dhouthoo@178-117-36-167.access.telenet.be) |
| 15:22:56 | → | dy` joins (~dy@user/dy) |
| 15:24:12 | → | cwraith joins (~c_wraith@adjoint.us) |
| 15:24:58 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (*.net *.split) |
| 15:24:58 | × | fabfianda quits (~fabfianda@net-93-148-121-206.cust.dsl.teletu.it) (*.net *.split) |
| 15:24:58 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (*.net *.split) |
| 15:24:58 | × | pagnol quits (~user@014198154145.ctinets.com) (*.net *.split) |
| 15:24:58 | × | dy quits (~dy@user/dy) (*.net *.split) |
| 15:24:58 | × | Xnuk quits (~xnuk@45.76.202.58) (*.net *.split) |
| 15:24:58 | × | ell quits (~ellie@user/ellie) (*.net *.split) |
| 15:24:58 | × | nsilv quits (~nsilv@212.103.198.210) (*.net *.split) |
| 15:24:58 | × | chomwitt quits (~Pitsikoko@athedsl-20549.home.otenet.gr) (*.net *.split) |
| 15:24:58 | × | alx741 quits (~alx741@181.196.69.18) (*.net *.split) |
| 15:24:58 | × | poljar1 quits (~poljar@93-139-68-198.adsl.net.t-com.hr) (*.net *.split) |
| 15:24:58 | × | Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (*.net *.split) |
| 15:24:58 | × | pbrisbin quits (~patrick@pool-72-92-38-164.phlapa.fios.verizon.net) (*.net *.split) |
| 15:24:58 | × | Natch quits (~natch@c-e070e255.014-297-73746f25.bbcust.telenor.se) (*.net *.split) |
| 15:24:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (*.net *.split) |
| 15:24:58 | × | dhil quits (~dhil@195.213.192.47) (*.net *.split) |
| 15:24:58 | × | BosonCollider quits (~olofs@90-227-86-119-no542.tbcn.telia.com) (*.net *.split) |
| 15:24:58 | × | peterhil quits (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) (*.net *.split) |
| 15:24:58 | × | dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (*.net *.split) |
| 15:24:58 | × | ridcully quits (~ridcully@p508ac428.dip0.t-ipconnect.de) (*.net *.split) |
| 15:24:58 | × | danidiaz quits (~ESDPC@static-35-0-85-188.ipcom.comunitel.net) (*.net *.split) |
| 15:24:58 | × | blankhart quits (~blankhart@pool-72-88-174-206.nwrknj.fios.verizon.net) (*.net *.split) |
| 15:24:58 | × | xerox quits (~edi@user/edi) (*.net *.split) |
| 15:24:58 | × | kmein_ quits (~weechat@user/kmein) (*.net *.split) |
| 15:24:58 | × | pierrot_ quits (~pi@user/pierrot) (*.net *.split) |
| 15:24:58 | × | MidAutumnMoon quits (~MidAutumn@user/midautumnmoon) (*.net *.split) |
| 15:24:58 | × | spatchkaa_ quits (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) (*.net *.split) |
| 15:24:58 | × | fendor quits (~fendor@178.165.130.85.wireless.dyn.drei.com) (*.net *.split) |
| 15:24:58 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (*.net *.split) |
| 15:24:58 | × | c_wraith quits (~c_wraith@adjoint.us) (*.net *.split) |
| 15:24:58 | × | wei2912 quits (~wei2912@112.199.250.21) (*.net *.split) |
| 15:24:58 | × | fjmorazan quits (~quassel@user/fjmorazan) (*.net *.split) |
| 15:24:58 | × | motherfs1 quits (~motherfsc@user/motherfsck) (*.net *.split) |
| 15:24:58 | × | oxide quits (~lambda@user/oxide) (*.net *.split) |
| 15:24:58 | × | kw quits (~user@152.1.137.158) (*.net *.split) |
| 15:24:58 | × | bruceleewees quits (~bruceleew@83.24.248.233.ipv4.supernova.orange.pl) (*.net *.split) |
| 15:24:58 | × | pieguy128 quits (~pieguy128@bas1-montreal02-65-92-163-194.dsl.bell.ca) (*.net *.split) |
| 15:24:58 | × | blades quits (~blades@204.48.29.163) (*.net *.split) |
| 15:24:58 | × | averell quits (~averell@user/averell) (*.net *.split) |
| 15:24:58 | × | peutri quits (~peutri@ns317027.ip-94-23-46.eu) (*.net *.split) |
| 15:24:58 | × | jackhill quits (~jackhill@kalessin.dragonsnail.net) (*.net *.split) |
| 15:24:58 | × | sh9 quits (~sh9@softbank060116136158.bbtec.net) (*.net *.split) |
| 15:24:58 | × | hueso quits (~root@152.170.216.40) (*.net *.split) |
| 15:24:58 | × | nshepperd2 quits (~nshepperd@li364-218.members.linode.com) (*.net *.split) |
| 15:24:58 | × | dolio quits (~dolio@130.44.130.54) (*.net *.split) |
| 15:24:58 | × | Cale quits (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) (*.net *.split) |
| 15:25:00 | ell4 | is now known as ell |
| 15:25:00 | nshepperd24 | is now known as nshepperd2 |
| 15:25:00 | MidAutumnMoon3 | is now known as MidAutumnMoon |
| 15:25:01 | Lord_of_Life_ | is now known as Lord_of_Life |
| 15:26:23 | → | Xnuk joins (~xnuk@45.76.202.58) |
| 15:26:39 | wroathe_ | is now known as wroathe |
| 15:26:50 | <cwraith> | delYsid: like, instead of the whole (AppE <$> [|| fromList ||] <*> liftTyped result) thing, just use [|| fromList result ||] |
| 15:27:01 | cwraith | is now known as c_wraith |
| 15:27:44 | → | Natch joins (~natch@c-e070e255.014-297-73746f25.bbcust.telenor.se) |
| 15:27:47 | × | comerijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 15:27:48 | → | peterhil joins (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) |
| 15:27:53 | → | fluffyballoon joins (~fluffybal@2620:72:0:6480::10f7) |
| 15:28:09 | → | jneira joins (~jneira@166.red-81-39-172.dynamicip.rima-tde.net) |
| 15:29:00 | → | ridcully joins (~ridcully@p508ac428.dip0.t-ipconnect.de) |
| 15:29:00 | <c_wraith> | yes, I understand that looks weird. quote literals actually do different things depending on the scope of identifiers |
| 15:29:09 | → | Cale joins (~cale@cpef48e38ee8583-cm0c473de9d680.cpe.net.cable.rogers.com) |
| 15:30:31 | <c_wraith> | it looks up fromList and finds the name is in scope at the top level. So it generates a VarE for that name. It looks up result and finds it's local, so it calls liftTyped on it |
| 15:30:47 | <c_wraith> | it calls liftTyped *on the value*, that is |
| 15:31:24 | → | alx741 joins (~alx741@181.196.69.18) |
| 15:31:25 | <c_wraith> | That's actually one of the hardest parts of TH for me to wrap my head around - what the various name resolution rules inside a quote literal do |
| 15:31:29 | × | geekosaur quits (~geekosaur@069-135-003-034.biz.spectrum.com) (Ping timeout: 268 seconds) |
| 15:31:53 | → | motherfs1 joins (~motherfsc@user/motherfsck) |
| 15:32:22 | → | geekosaur joins (~geekosaur@069-135-003-034.biz.spectrum.com) |
| 15:32:31 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 15:32:34 | → | dhil joins (~dhil@195.213.192.47) |
| 15:32:40 | → | bruceleewees joins (~bruceleew@83.24.248.233.ipv4.supernova.orange.pl) |
| 15:33:00 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Quit: WeeChat 3.1) |
| 15:33:01 | → | sh9 joins (~sh9@softbank060116136158.bbtec.net) |
| 15:33:04 | × | jippiedoe quits (~david@77-171-152-62.fixed.kpn.net) (Quit: Leaving) |
| 15:33:05 | × | pbrisbin_ quits (~patrick@pool-72-92-38-164.phlapa.fios.verizon.net) (Quit: WeeChat 3.1) |
| 15:33:19 | → | pbrisbin joins (~patrick@pool-72-92-38-164.phlapa.fios.verizon.net) |
| 15:35:34 | → | mikoto-chan joins (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) |
| 15:38:25 | → | agumonke` joins (~user@88.160.31.174) |
| 15:38:27 | × | wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 15:40:53 | → | lbseale joins (~lbseale@user/ep1ctetus) |
| 15:41:03 | × | biberu quits (~biberu@user/biberu) (Read error: Connection reset by peer) |
| 15:41:35 | <delYsid> | Haha. So TH works now, but I need to wait a few minutes till ghci loads the module. |
| 15:41:42 | <delYsid> | And building also takes a minute. |
| 15:43:02 | <c_wraith> | TH is not fast. |
| 15:43:12 | <c_wraith> | this is why I tend to avoid it when I can :) |
| 15:43:19 | <c_wraith> | even if that means writing lenses by hand :) |
| 15:45:13 | → | aerona joins (~aerona@2600:6c54:4600:f300:8401:a988:a361:a685) |
| 15:46:45 | fendor_ | is now known as fendor |
| 15:46:52 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 15:47:12 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 15:47:59 | → | ddellaco_ joins (~ddellacos@89.46.62.69) |
| 15:48:20 | × | ddellacosta quits (~ddellacos@89.46.62.34) (Ping timeout: 264 seconds) |
| 15:49:33 | <delYsid> | If someone complains, I'll point them at merijn :-) |
| 15:49:48 | <delYsid> | But I learnt a bunch, thanks for that!" |
| 15:51:21 | × | wei2912_ quits (~wei2912@112.199.250.21) (Quit: Lost terminal) |
| 15:52:13 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 15:55:17 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:2121:a570:d35e:ba7a) |
| 15:55:30 | × | ddellaco_ quits (~ddellacos@89.46.62.69) (Ping timeout: 264 seconds) |
| 15:56:56 | → | ddellacosta joins (~ddellacos@86.106.121.108) |
| 15:59:21 | × | brandonh quits (~brandonh@151.38.222.167) (Quit: brandonh) |
| 16:00:02 | → | Bartosz joins (~textual@24.35.90.211) |
| 16:01:08 | → | johnw joins (~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0) |
| 16:01:17 | × | nsilv1 quits (~nsilv@212.103.198.210) (Quit: WeeChat 3.0.1) |
| 16:04:10 | × | azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Read error: Connection reset by peer) |
| 16:05:59 | × | mikoto-chan quits (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) (Ping timeout: 244 seconds) |
| 16:07:31 | → | ddellaco_ joins (~ddellacos@89.46.62.73) |
| 16:08:45 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 16:09:04 | → | ddellac__ joins (~ddellacos@86.106.121.26) |
| 16:09:18 | × | ddellacosta quits (~ddellacos@86.106.121.108) (Ping timeout: 264 seconds) |
| 16:10:46 | → | lucubratiuncula joins (~guiot@dynamic-adsl-84-220-161-37.clienti.tiscali.it) |
| 16:10:59 | × | mpt quits (~tom@2a02:908:1862:49e0::5) (Quit: WeeChat 3.1) |
| 16:11:36 | × | lucubratiuncula quits (~guiot@dynamic-adsl-84-220-161-37.clienti.tiscali.it) (Client Quit) |
| 16:11:48 | → | Ariakenom joins (~Ariakenom@2001:9b1:efb:fc00:190f:d7af:8eb9:1d14) |
| 16:12:11 | → | biberu joins (~biberu@user/biberu) |
| 16:12:42 | × | ddellaco_ quits (~ddellacos@89.46.62.73) (Ping timeout: 244 seconds) |
| 16:13:02 | slowButP1esent | is now known as slowButPresent |
| 16:13:34 | samebchase6 | is now known as samebchase |
| 16:15:08 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 16:15:17 | × | pe200012 quits (~pe200012@183.236.83.76) (Ping timeout: 244 seconds) |
| 16:16:00 | → | knu joins (~knu@mue-88-130-62-022.dsl.tropolys.de) |
| 16:16:11 | × | jess quits (~jess@libera/staff/jess) () |
| 16:16:41 | → | Baloo_ joins (~Baloo_@45.83.220.183) |
| 16:16:44 | → | azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) |
| 16:17:42 | peutri_ | is now known as peutri |
| 16:18:29 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 16:19:07 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 16:21:21 | × | Bartosz quits (~textual@24.35.90.211) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 16:21:26 | × | azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Ping timeout: 265 seconds) |
| 16:21:56 | → | ddellacosta joins (~ddellacos@86.106.121.46) |
| 16:24:31 | → | azeem joins (~azeem@176.201.21.77) |
| 16:24:44 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 16:24:54 | × | ddellac__ quits (~ddellacos@86.106.121.26) (Ping timeout: 264 seconds) |
| 16:25:29 | <knu> | Hey, I'm a bit confused with the behavior of haddock concerning data families |
| 16:25:38 | × | sqrt2 quits (~ben@80-108-18-7.cable.dynamic.surfer.at) (Read error: Connection reset by peer) |
| 16:26:01 | × | fluffyballoon quits (~fluffybal@2620:72:0:6480::10f7) (Quit: Client closed) |
| 16:26:17 | <knu> | A module just defining instances won't list any of them in haddock, instead they are all in the module defining the data family |
| 16:26:54 | <knu> | But if write module Barf (module Barf) where it lists every instance, but says that these are patterns |
| 16:27:27 | → | sqrt2 joins (~ben@tunnel330957-pt.tunnel.tserv6.fra1.ipv6.he.net) |
| 16:28:07 | → | hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com) |
| 16:28:43 | <knu> | are data family instances equivalent to patterns? |
| 16:31:36 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 16:32:06 | × | sqrt2 quits (~ben@tunnel330957-pt.tunnel.tserv6.fra1.ipv6.he.net) (Ping timeout: 264 seconds) |
| 16:33:15 | <delYsid> | aha! [|| fromList $$(x)) ||] |
| 16:33:18 | × | azeem quits (~azeem@176.201.21.77) (Ping timeout: 252 seconds) |
| 16:34:23 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 268 seconds) |
| 16:36:34 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 16:36:38 | → | __monty__ joins (~toonn@user/toonn) |
| 16:37:17 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:2121:a570:d35e:ba7a) (Remote host closed the connection) |
| 16:38:29 | → | azeem joins (~azeem@176.200.249.22) |
| 16:39:03 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 244 seconds) |
| 16:41:38 | xerox_ | is now known as xerox |
| 16:46:46 | motherfs1 | is now known as motherfsck |
| 16:47:42 | × | azeem quits (~azeem@176.200.249.22) (Ping timeout: 264 seconds) |
| 16:49:05 | → | fvr joins (uid503686@id-503686.highgate.irccloud.com) |
| 16:49:47 | ← | fvr parts (uid503686@id-503686.highgate.irccloud.com) () |
| 16:50:22 | → | azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) |
| 16:50:34 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 16:51:54 | → | ikex joins (~ash@user/ikex) |
| 16:54:44 | <ski> | knu : huh ? |
| 16:55:24 | <knu> | Jup, it's quite baffling to me |
| 16:55:42 | → | wonko joins (~wjc@62.115.229.50) |
| 16:55:46 | <monochrom> | No, I'm sure ski means no one understands your question, it's incoherent. |
| 16:56:18 | <knu> | Oh, how could I clarify? |
| 16:56:20 | <monochrom> | Well, OK, I'll just speak for myself, I find it incoherent. |
| 16:56:27 | <monochrom> | Show actual code? |
| 16:56:41 | → | wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com) |
| 16:57:17 | × | ozzymcdu1f quits (~mathieu@81-234-151-21-no94.tbcn.telia.com) (Remote host closed the connection) |
| 16:58:17 | <knu> | Hm, one moment, I'll upload a preview at hackage |
| 16:58:46 | → | ozzymcduff joins (~mathieu@81-234-151-21-no94.tbcn.telia.com) |
| 16:59:40 | × | renzhi quits (~xp@2607:fa49:6500:bc00::e7b) (Ping timeout: 268 seconds) |
| 16:59:56 | × | Hecate quits (~mariposa@user/hecate) (Quit: PissNet) |
| 17:02:02 | × | laguneucl quits (~Pitsikoko@2a02:587:dc02:b00:98b0:cd42:bd6f:8295) (Ping timeout: 265 seconds) |
| 17:02:39 | → | Hecate joins (~mariposa@user/hecate) |
| 17:03:23 | <knu> | https://codeshare.io/zydqkN |
| 17:04:19 | <knu> | If I generate haddock for these three modules, in module A I'll see both instances, in module B I'll see nothing and in module C it says pattern Zonk :: Foo Bool |
| 17:05:29 | <monochrom> | Interesting. |
| 17:05:34 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:2121:a570:d35e:ba7a) |
| 17:05:59 | <knu> | And with PatternSynonyms enabled, I can import C (pattern Zonk) |
| 17:07:08 | <knu> | So I'm thinking, that in these cases, patterns and data family instances are the same |
| 17:07:49 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 17:09:23 | → | danidiaz joins (~ESDPC@static-35-0-85-188.ipcom.comunitel.net) |
| 17:09:29 | → | fluffyballoon joins (~fluffybal@2620:72:0:6480::10f7) |
| 17:09:47 | <knu> | It get's worse: |
| 17:10:31 | → | econo joins (uid147250@user/econo) |
| 17:10:38 | → | chexum joins (~chexum@gateway/tor-sasl/chexum) |
| 17:10:40 | <monochrom> | They are certainly not the same. You can't use PatternSynonyms to define data family instances. |
| 17:10:56 | <knu> | If I'm with ghci in module A, I can import B (Foo(Barf)) but I can not import C (Foo(Zonk)) |
| 17:11:13 | × | danidiaz1 quits (~ESDPC@static-35-0-85-188.ipcom.comunitel.net) (Ping timeout: 265 seconds) |
| 17:11:34 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (*.net *.split) |
| 17:11:39 | <knu> | It'll say, that C doesn't export Foo, so I can import it only by importing all of C or make a pattern import |
| 17:12:47 | <monochrom> | I agree with the compiler about "C doesn't export Foo". This one is basic. |
| 17:13:26 | <knu> | yes, but why doesn't he complain about import B (Foo(Barf)) |
| 17:14:04 | <knu> | also, I can't import C (Zonk) |
| 17:14:47 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 17:16:47 | <knu> | I'm writing a lib with a lot of data family instances, which I'd like to split in different modules to have a clean namespace. Now I'm forced to choose between modules without haddock, modules in which haddock claims are only patterns and which aren't easily individually importable. |
| 17:17:28 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
| 17:17:51 | × | infinisi1 quits (~infinisil@mail.infinisil.com) (Quit: Configuring ZNC, sorry for the joins/quits!) |
| 17:18:27 | → | infinisil joins (~infinisil@mail.infinisil.com) |
| 17:18:42 | <knu> | hm |
| 17:19:03 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Read error: Connection reset by peer) |
| 17:19:29 | <ski> | knu : i guess it might be implicitly defining a pattern synonym `Zonk' for `Foo Bool' ? |
| 17:19:37 | <maerwald> | monochrom: did you follow the HasCallstack base/Data.List RFC? I'm wondering what you think about the `Partial` typeclass approach that was brought up (and is used by purescript it seems) |
| 17:19:55 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds) |
| 17:20:16 | <monochrom> | I didn't. |
| 17:20:17 | <ski> | knu : try `module C (module A,module C) where ...' and then try `import C (Foo(Zonk))' ? |
| 17:20:25 | spatchkaa__ | is now known as spatchkaa |
| 17:20:52 | <maerwald> | https://mail.haskell.org/pipermail/libraries/2021-June/031292.html |
| 17:21:00 | <monochrom> | What is the semantics of Partial? |
| 17:21:11 | <maerwald> | I find it very foggy |
| 17:21:24 | <maerwald> | something like "may call `error`... or not" |
| 17:21:27 | × | spatchkaa quits (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) (Quit: Leaving) |
| 17:21:32 | × | amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection) |
| 17:21:38 | <knu> | @ski: Yes, I've tried that one. In this case the import works. In haddock I'll get the data family with both instances and additionally the pattern Zonk |
| 17:21:38 | <lambdabot> | Unknown command, try @list |
| 17:22:08 | → | amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) |
| 17:22:32 | <ski> | knu : does that solve your problem ? |
| 17:22:37 | <knu> | So this would be my third option, which would nuke my haddocks, because my data families have about 100 instances |
| 17:22:50 | <ski> | knu : also, what if you try `module C (Foo,module C) where ...' ? |
| 17:22:59 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 17:23:00 | <knu> | Same result |
| 17:23:05 | <monochrom> | This is deja vu. I think I saw this in a dream some years ago... |
| 17:23:33 | <maerwald> | quite possible |
| 17:24:09 | <monochrom> | Unlike IsPartial, HasCallBack does not automatically propagate. |
| 17:24:43 | ski | . o O ( `promiseTotal :: (IsPartial => a) -> a' ) |
| 17:25:00 | × | nschoe quits (~quassel@178.251.84.79) (Ping timeout: 252 seconds) |
| 17:25:04 | <maerwald> | ski: yeah...which may completely lie |
| 17:25:09 | <ski> | obviously |
| 17:25:21 | <maerwald> | refactored out some stuff, forgot to remove it |
| 17:25:23 | <maerwald> | oops |
| 17:25:46 | <maerwald> | it's basically unsafePerformIO from a different angle |
| 17:25:55 | → | fabfianda joins (~fabfianda@mob-5-90-243-109.net.vodafone.it) |
| 17:26:11 | <maerwald> | you have to do proper local reasoning for it to be correct |
| 17:26:23 | <monochrom> | I think I'm on the fence for this. And regardless of any detail refinement such as "does it propagate?" "does it have actual semantic behaviour?" "how annoying is it going to be?" |
| 17:26:31 | ski | . o O ( "If you lie to the compiler, the compiler will get its revenge!" ) |
| 17:26:46 | → | Morrow joins (~Morrow@37.142.145.18) |
| 17:26:54 | <ski> | maerwald : except it's clearer on what the proof obligation is |
| 17:27:05 | <maerwald> | ski: is it? |
| 17:27:29 | <maerwald> | foo :: FilePath -> IO () -- what if this crashes on non-absolute paths? |
| 17:27:33 | <maerwald> | does it make it partial? |
| 17:28:10 | <maerwald> | wait... now, does it call `error` or `throwIO`, or... |
| 17:28:14 | <maerwald> | and, does the user care? |
| 17:28:17 | <monochrom> | "partial" is not a notion for effects. At least by my definitions. |
| 17:28:23 | <ski> | insofar as the partiality of the relevant operation is specified, at least |
| 17:28:31 | <maerwald> | monochrom: SPJ seemed to consider it an effect |
| 17:28:32 | <ski> | maerwald : imho, no |
| 17:28:45 | <ski> | partiality is a side-effect |
| 17:28:57 | <maerwald> | uuuhm |
| 17:28:59 | <ski> | ("no", to "does it make it partial?") |
| 17:29:00 | × | Morrow quits (~Morrow@37.142.145.18) (Read error: Connection reset by peer) |
| 17:29:30 | <monochrom> | Err wait, nevermind, foo can still be partial from the POV of math function X->Y under Y=IO() |
| 17:29:36 | <ski> | (just like nontermination is a side-effect) |
| 17:29:43 | <knu> | @ski: module C (module A, module C) where actually solves my issue in the prettiest way |
| 17:29:43 | <lambdabot> | Unknown command, try @list |
| 17:29:50 | <knu> | thanks |
| 17:30:04 | <ski> | `foo undefined' would be partial, though |
| 17:30:13 | <ski> | knu : i was just about to ask if your issue was resolved |
| 17:30:26 | <zzz> | imagine i have some type T = TA Bool | TB Bool and i want to have a list [T] where all T values alternate between True and False. Is there a way I can express this constraint at the type level? |
| 17:30:26 | → | Morrow joins (~Morrow@31.154.96.164) |
| 17:30:35 | <maerwald> | monochrom: yeah, there are multiple ways to interpret this |
| 17:30:40 | <knu> | ski: not perfectly, but it's the best solution until now |
| 17:30:43 | <ski> | okay |
| 17:30:53 | <knu> | it still claims to export a lot of patterns |
| 17:30:57 | <ski> | zzz : not alternate between `TA' and `TB', then ? |
| 17:31:11 | <knu> | but I can import them at least without using a pragma |
| 17:31:22 | <zzz> | ski: no, so [TA True, TA False, TA True...] would be valid |
| 17:31:50 | <knu> | and it doesn't spam the documentation with every instance |
| 17:31:55 | <ski> | zzz : how about only storing the initial `Bool', and then a list of `TA's/`TB's, with no `Bool's in them ? |
| 17:32:22 | <monochrom> | I realize that I don't know what to make of: haha :: IO (); haha = do { x <- getLine; print (head x) } |
| 17:32:47 | <ski> | possibly partial |
| 17:32:56 | <monochrom> | Firstly it is not a function. Secondly it is not bottom of IO(). But it still bottoms out. |
| 17:32:58 | <maerwald> | Maybe Partial => IO () |
| 17:33:41 | <ski> | partial on some executions. just like `head' is partial, for some calls to it |
| 17:33:52 | <monochrom> | At which point my usual reaction is "these are useless dichotomies: bottom vs non-bottom, function vs non-function value, partial vs total" |
| 17:34:05 | <maerwald> | everything is a...? |
| 17:34:35 | <ski> | do we need another word for a "dichotomy" which is not decidable, but only observable / semi-decidable ? |
| 17:34:58 | <monochrom> | No. |
| 17:35:22 | <monochrom> | Some undecidable dichotomies are still useful. |
| 17:35:26 | <ski> | knu : btw, i wonder whether `module C (module A,Foo (Zonk)) where ...' would work, too |
| 17:35:50 | <monochrom> | At least, useful for stating useful undecidable problems? haha |
| 17:36:40 | <maerwald> | Anyway, HasCallStack seems much less controversial, but some consider this will have negative effect on... teaching |
| 17:38:12 | <monochrom> | This is because HasCallStack is not nagware but IsPartial is. |
| 17:40:04 | <monochrom> | But I may like to hear how HasCallStack can be negative for teaching. |
| 17:41:10 | <monochrom> | "module C(Foo(Zonk))" should be just fine, but I haven't tested. |
| 17:41:12 | → | chomwitt joins (~Pitsikoko@athedsl-20549.home.otenet.gr) |
| 17:41:32 | <maerwald> | monochrom: https://mail.haskell.org/pipermail/libraries/2021-June/031281.html |
| 17:41:35 | <maerwald> | there are the arguments |
| 17:41:57 | <monochrom> | I am just reading https://downloads.haskell.org/~ghc/8.10.5/docs/html/users_guide/glasgow_exts.html#import-and-export |
| 17:42:23 | <monochrom> | Thanks maerwald |
| 17:42:33 | <knu> | ski: just checked, importing works fine, but haddock now lists Foo with every instance, not only Zonk. At least, there is nothing about patterns. |
| 17:43:42 | × | Morrow quits (~Morrow@31.154.96.164) (Ping timeout: 252 seconds) |
| 17:44:04 | <ski> | knu : "now lists Foo with every instance, not only Zonk" -- is that preferrable ? |
| 17:44:34 | <knu> | for my case no |
| 17:44:40 | <tomsmeding> | delYsid: Sorry to see you having trouble with the paste site! I see I apparently forgot to send a content-type of text/html (that's now fixed). Are there other specific things that don't work for you? |
| 17:45:04 | → | Bartosz joins (~textual@24.35.90.211) |
| 17:45:08 | <knu> | there a lot of instances, so it should only list importable instances |
| 17:45:33 | <tomsmeding> | incidentally, for the cases where I use a text-mode browser, I use elinks rather than lynx because it has better support for various web constructs, but I don't know what works for you |
| 17:47:15 | → | danidiaz1 joins (~ESDPC@static-35-0-85-188.ipcom.comunitel.net) |
| 17:47:24 | <monochrom> | I ditched lynx for elinks too. |
| 17:47:41 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 17:47:44 | <monochrom> | lynx makes you remember hotkeys. elinks offers a browsable menu. |
| 17:48:08 | <tomsmeding> | also, the line numbers table on my paste site works in elinks whereas it doesn't in lynx :p |
| 17:48:55 | <monochrom> | The problem with hotkeys is the long tail. There are a lot of hotkeys you use infrequently enough that you will never remember, but still frequent enough that you still actually need. |
| 17:49:26 | → | sqrt2 joins (~ben@tunnel330957-pt.tunnel.tserv6.fra1.ipv6.he.net) |
| 17:49:35 | <monochrom> | The only merit of lynx is first-to-market, as usual. |
| 17:49:38 | → | Izem joins (~Izem@bras-base-london1483w-grc-38-65-95-41-91.dsl.bell.ca) |
| 17:49:50 | × | danidiaz quits (~ESDPC@static-35-0-85-188.ipcom.comunitel.net) (Ping timeout: 244 seconds) |
| 17:49:53 | <monochrom> | and stronger propaganda. |
| 17:49:55 | <Izem> | what are type annotations in Haskell, expressions? |
| 17:50:05 | <Rembane_> | Izem: No, they are type annotations. |
| 17:50:14 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 17:50:17 | <monochrom> | type expressions >:) |
| 17:50:36 | <monochrom> | "everything is an expression" |
| 17:50:48 | <Izem> | ok, I suppose they are just newline delimited also? |
| 17:50:55 | <tomsmeding> | except the things that aren't :p |
| 17:51:11 | <monochrom> | yes until you find out about semicolon |
| 17:51:18 | <boxscape> | I'd say depending on whether they're inline type annotations or type annotations belonging to a declaration, they can be part of an expression or part of a declaration. But they are not these things by themselves |
| 17:51:19 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 17:51:24 | × | pera quits (~pera@user/pera) (Ping timeout: 252 seconds) |
| 17:52:05 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 17:52:13 | <Izem> | haskell doesn't seem use semi colon insertion |
| 17:52:13 | <monochrom> | I agree with boxscape. |
| 17:52:25 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 244 seconds) |
| 17:52:26 | <Izem> | so I guess they are just used in specific places |
| 17:53:19 | <boxscape> | Izem semicolons and braces can be used optionally instead of newlines and indentation |
| 17:53:20 | <boxscape> | % let {semicolon = ";"; colon = ":"} in do {print semicolon; print colon} |
| 17:53:20 | <yahb> | boxscape: ";"; ":" |
| 17:54:13 | <Izem> | impressive |
| 17:54:27 | <ski> | Izem : type signatures are one thing, type ascriptions another |
| 17:54:56 | <Izem> | the former is for functions, the later for simple variables? |
| 17:55:05 | <ski> | no |
| 17:55:23 | <ski> | undefinedBool :: Bool |
| 17:55:29 | <ski> | undefinedBool = undefined :: Bool |
| 17:55:52 | <Izem> | ok |
| 17:56:00 | <Izem> | that looks like a type declaration |
| 17:56:02 | <ski> | the first line is a type signature. the expression (body of the definition, after the `=') on the second line is a type ascription |
| 17:56:23 | <Izem> | have not seen anyone use the word ascription :P |
| 17:56:40 | <boxscape> | (I haven't, either) |
| 17:57:05 | <ski> | data Bool = False | True -- this is a data type declaration (and definition) |
| 17:57:09 | <boxscape> | the haskell report uses type signature for it |
| 17:57:23 | <boxscape> | ("expression type signature", to be precise) |
| 17:57:48 | <Izem> | why did they need a data keyword to distinguish? |
| 17:58:02 | <ski> | it's also possible (with extension), to put an ascription on a pattern |
| 17:58:15 | <ski> | idBool (b :: Bool) = b |
| 17:58:26 | <ski> | or, inside `do' : |
| 17:58:36 | <ski> | b :: Bool <- readLn |
| 17:58:49 | <ski> | or in a lambda expression |
| 17:59:00 | <ski> | \ (b :: Bool) -> ..b.. |
| 17:59:03 | <boxscape> | % True = False |
| 17:59:03 | <yahb> | boxscape: |
| 17:59:04 | <boxscape> | hm |
| 17:59:06 | × | Bartosz quits (~textual@24.35.90.211) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 17:59:11 | <boxscape> | gonna put this at the top level of my next file |
| 17:59:44 | <ski> | Izem : `data' is for declaring data types. there's also `newtype' and `type', which also declares types |
| 18:00:09 | → | Bartosz joins (~textual@24.35.90.211) |
| 18:00:31 | <ski> | % let !True = False |
| 18:00:31 | <yahb> | ski: *** Exception: <interactive>:7:5-17: Non-exhaustive patterns in True |
| 18:00:48 | <Izem> | ok, so I suspect there are different classes of types |
| 18:01:02 | <Izem> | data is for algebraic data types iirc |
| 18:01:26 | <ski> | `type' declares a new name (possibly parameterized) for an existing type. a type synonym |
| 18:02:07 | <ski> | `data' and `newtype' declares new types, together with ways to construct values of the new type |
| 18:02:15 | <Izem> | does haskell have symbols? |
| 18:02:22 | <Izem> | no need right? |
| 18:02:23 | <ski> | Izem : yes (algebraic data types) |
| 18:02:26 | <ski> | no symbols |
| 18:02:28 | <Izem> | ah kk |
| 18:02:42 | <ski> | you can use constant data constructors, mostly |
| 18:02:53 | <Izem> | interesting |
| 18:03:15 | <ski> | data Weekday = Sunday | Monday | Tuesday | Wednesday | Thursday | Friday | Saturday |
| 18:03:45 | <Izem> | are True and False special? |
| 18:04:18 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:04:20 | <edmundnoble_> | Nope |
| 18:04:26 | <edmundnoble_> | `data Bool = True | False` |
| 18:04:26 | <boxscape> | only in the sense that they are used by a few builtin constructs, but Bool is declared as a regular type |
| 18:04:39 | <edmundnoble_> | ^ |
| 18:05:39 | <DigitalKiwi> | data Bool = True | False | FileNotFound |
| 18:05:56 | <edmundnoble_> | If you want to define a new datatype, it will be with either `data` or `newtype`, and `newtype` only has subtle operational differences from `data`, it's not fundamentally different at all |
| 18:07:11 | <edmundnoble_> | Type aliases, defined with `type`, have no semantic content and with the exception of a few small things (like error messages changing) could be implemented entirely with preprocessor directives replacing the alias with its contents |
| 18:07:14 | <ski> | Izem : well, there's `OverloadedLabels' <https://downloads.haskell.org/~ghc/8.10.5/docs/html/users_guide/glasgow_exts.html#extension-OverloadedLabels> |
| 18:07:18 | <edmundnoble_> | (er, definition, more than contents) |
| 18:07:52 | <ski> | @src Bool |
| 18:07:52 | <lambdabot> | data Bool = False | True deriving (Eq, Ord) |
| 18:08:16 | <Izem> | cool |
| 18:08:25 | <ski> | (`False' comes before `True', in the `Ord' instance (and also in `Enum',`Bounded' and `Ix') |
| 18:09:39 | <ski> | `Bool' has special support in the `if'-`then'-`else' syntactic sugar (one could just as well use `case'-`of'), and in guards (occuring in pattern-matching, and in list comprehensions) |
| 18:09:39 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 18:09:45 | <vaibhavsagar[m]> | can I have a `hie.yaml` configuration that specifies both cabal and stack? |
| 18:10:19 | <delYsid> | tomsmeding: Oh, very cool you just picked that up from chatlog! If you send me a link, I can recheck |
| 18:10:24 | <vaibhavsagar[m]> | this project (https://github.com/Avi-D-coder/implicit-hie) seems to have two different files that need to be moved into the correct place |
| 18:10:34 | <Izem> | what's the difference between case-of and guards? |
| 18:10:48 | <ephemient> | if-then-else desugars to case-of in core, IIRC |
| 18:11:14 | <ski> | what's the difference between an apple and a saxophone ? |
| 18:11:25 | <ski> | they are not directly comparable |
| 18:11:38 | <boxscape> | Izem case-of is used to check whether a value has a certain structure, i.e. which constructors its made up of. Guards are used to check arbitrary boolean conditions |
| 18:11:52 | <Izem> | I see |
| 18:11:59 | <ski> | guards can occur both in `case'-`of', and in "ordinary" function parameter pattern-matching |
| 18:12:01 | <tomsmeding> | delYsid: I guess the same links works :) https://paste.tomsmeding.com/NBPCg1ip |
| 18:12:16 | <vaibhavsagar[m]> | guards desugar to case-of too IIRC |
| 18:12:29 | <Izem> | interesting |
| 18:12:51 | <Izem> | guard clauses are really novel |
| 18:13:15 | → | cactinoob joins (~cactinoob@adsl-64-237-237-9.prtc.net) |
| 18:13:27 | <ski> | @src filter |
| 18:13:27 | <lambdabot> | filter _ [] = [] |
| 18:13:27 | <lambdabot> | filter p (x:xs) |
| 18:13:27 | <lambdabot> | | p x = x : filter p xs |
| 18:13:27 | <lambdabot> | | otherwise = filter p xs |
| 18:13:41 | <ski> | this is equivalent to |
| 18:14:03 | <ski> | filter p xs0 = case xs0 of |
| 18:14:43 | <ski> | [ ] -> [ ] |
| 18:14:49 | <ski> | x:xs |
| 18:15:04 | <ski> | | p x -> x : filter p xs |
| 18:15:23 | <ski> | | otherwise -> filter p xs |
| 18:16:08 | <Izem> | thanks |
| 18:16:08 | × | ikex quits (~ash@user/ikex) (Ping timeout: 268 seconds) |
| 18:18:31 | <ski> | Miranda had guards. i'd guess ISWIM had them, too |
| 18:19:08 | → | kaizen joins (uid501599@id-501599.brockwell.irccloud.com) |
| 18:19:34 | <Izem> | yep, though they are different than haskell |
| 18:19:48 | <Izem> | it's like `foo, if bar` |
| 18:20:17 | <delYsid> | tomsmeding: Woohoo! Thanks for fixing the web! :-) |
| 18:20:23 | <delYsid> | (IOW, works for me now) |
| 18:20:38 | <tomsmeding> | delYsid: the line numbers are still kind of borked in lynx, but at least you can read the code :) |
| 18:21:06 | <delYsid> | yeah, about 90% of all paste thingies have the same line number problem, so I guess thats fine |
| 18:21:16 | <tomsmeding> | (they work in elinks) |
| 18:21:31 | <tomsmeding> | (suggests to me that perhaps lynx has some weird handling of html tables) |
| 18:22:11 | <delYsid> | Interesting. I am too old to change browsers, but I really need to remember that one |
| 18:22:54 | <ski> | hm, on a quick scan through Peter J. Landin's "The Next 700 Programming Languages" in 1966-03 at <http://thecorememory.com/Next_700.pdf>, i don't see guards, just conditionals |
| 18:23:06 | <ski> | Izem : yep |
| 18:23:26 | <delYsid> | Now, if someone could fix hackage source links please ... it drives me crazy not being able to casually look at sources, always have to fetch with git and find the reference by hand... |
| 18:23:39 | <delYsid> | But I guess that train has left the station. |
| 18:26:00 | <sm[m]> | delYsid: I use haddock's "source" links on hackage all the time |
| 18:26:56 | <tomsmeding> | sm[m]: in a text-mode browser they suck heavily because the tooltips are inlined |
| 18:27:07 | <sm[m]> | ah |
| 18:27:30 | tomsmeding | wonders how hard it would be to make a basic proxy that filters out those tooltips |
| 18:27:37 | <sm[m]> | Haskell Foundation is keen on accessibility, it could be worth raising on discourse |
| 18:27:44 | <tomsmeding> | delYsid: ^ |
| 18:30:28 | × | fabfianda quits (~fabfianda@mob-5-90-243-109.net.vodafone.it) (Read error: Connection reset by peer) |
| 18:30:36 | <boxscape> | I wish haddock source links worked across packages |
| 18:30:41 | → | alphacath joins (~alpha@host-79-36-63-89.retail.telecomitalia.it) |
| 18:30:58 | <boxscape> | I guess that's not really feasible? |
| 18:31:31 | <Rembane_> | I don't think I know the problem good enough, so I think it's 100% feasible. |
| 18:31:47 | <boxscape> | nice |
| 18:33:08 | ← | alphacath parts (~alpha@host-79-36-63-89.retail.telecomitalia.it) () |
| 18:33:13 | <Rembane_> | Because every package knows which other packages it depends on, and if those packages are available somewhere that's linkable, it should be possible to create a link to that place. Either locally or on hackage. |
| 18:34:12 | → | mikoto-chan joins (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) |
| 18:34:25 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 18:34:28 | <boxscape> | hmm I suppose the hackage URLs are pretty stable |
| 18:35:31 | <tomsmeding> | sometimes I see hackage links in doc text that are supposed to go to a different package, but that seem to "strip off one path component too little" |
| 18:35:51 | <tomsmeding> | so you get pkgA-1.0/pkgB-1.0/module.html |
| 18:36:18 | × | Bartosz quits (~textual@24.35.90.211) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 18:36:20 | <boxscape> | interestingly the source link for Bool points to a different package (ghc-prim) https://hackage.haskell.org/package/base-4.15.0.0/docs/Data-Bool.html#t:Bool |
| 18:36:22 | <boxscape> | but it 404s |
| 18:36:40 | <boxscape> | tomsmeding oh it does exactly what you're saying |
| 18:37:21 | <tomsmeding> | oh the whole link is also wrong |
| 18:37:41 | <tomsmeding> | it goes to base-4.15.0.0/ghc-prim-0.7.0/src/GHC-Types.html#Bool but the correct path is ghc-prim-0.7.0/docs/src/GHC-Types.html#Bool |
| 18:37:44 | <tomsmeding> | note the /docs/ |
| 18:37:46 | <boxscape> | yeah |
| 18:37:56 | → | Bartosz joins (~textual@24.35.90.211) |
| 18:38:01 | <tomsmeding> | wonder how that happens |
| 18:38:37 | → | Deide joins (~Deide@wire.desu.ga) |
| 18:38:37 | × | Deide quits (~Deide@wire.desu.ga) (Changing host) |
| 18:38:37 | → | Deide joins (~Deide@user/deide) |
| 18:41:44 | × | Bartosz quits (~textual@24.35.90.211) (Client Quit) |
| 18:42:23 | → | Bartosz joins (~textual@24.35.90.211) |
| 18:43:39 | → | pgib joins (~textual@173.38.117.92) |
| 18:43:58 | → | jco joins (~jco@c83-248-173-38.bredband.tele2.se) |
| 18:44:00 | × | knu quits (~knu@mue-88-130-62-022.dsl.tropolys.de) (Quit: Connection closed) |
| 18:44:45 | × | MQ-17J quits (~MQ-17J@8.21.10.116) (Ping timeout: 252 seconds) |
| 18:45:03 | → | MQ-17J joins (~MQ-17J@8.21.10.116) |
| 18:45:20 | <zzz> | can i have an IntMap where the keys are newtype T = T Int ?] |
| 18:45:32 | → | beka joins (~beka@104.193.170-254.PUBLIC.monkeybrains.net) |
| 18:46:08 | <xerox> | zzz: I use this for that purpose https://github.com/minoki/unboxing-vector |
| 18:47:09 | <xerox> | (it's not exactly what you asked for if the container being a Map matters more than it being indexed with a newtype transparently) |
| 18:47:17 | <jco> | Hello, I'm fooling around a bit with trying to convert .edn to .json. Is there a better way to handle the possibility of error when loading a file, than what I do here: http://ix.io/3pnN? I created a `ExceptT` type alias there, to be able to just `throwError` if anything goes wrong. |
| 18:50:06 | <zzz> | xerox: thanks im taking a look. however i really just wanted a newtype indexed IntMap |
| 18:51:19 | × | MQ-17J quits (~MQ-17J@8.21.10.116) (Ping timeout: 244 seconds) |
| 18:51:36 | → | MQ-17J joins (~MQ-17J@8.21.10.116) |
| 18:52:02 | <lyxia> | jco: you could throw the exception in IO |
| 18:57:01 | × | zeenk quits (~zeenk@2a02:2f04:a310:b600:b098:bf18:df4d:4c41) (Quit: Konversation terminated!) |
| 18:57:50 | <jco> | lyxia: OK, makes it bit simpler yes. |
| 19:00:33 | → | v01d4lph4 joins (~v01d4lph4@122.160.65.250) |
| 19:00:33 | × | v01d4lph4 quits (~v01d4lph4@122.160.65.250) (Changing host) |
| 19:00:33 | → | v01d4lph4 joins (~v01d4lph4@user/v01d4lph4) |
| 19:01:37 | <dminuoso> | tomsmeding: I cant help but wonder whether ^ is meaningful to delYsid. |
| 19:01:53 | ← | Izem parts (~Izem@bras-base-london1483w-grc-38-65-95-41-91.dsl.bell.ca) () |
| 19:02:16 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 19:03:02 | <tomsmeding> | dminuoso: I wondered that too after sending the message |
| 19:04:12 | → | lavaman joins (~lavaman@98.38.249.169) |
| 19:05:06 | × | v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Ping timeout: 252 seconds) |
| 19:05:28 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 268 seconds) |
| 19:05:50 | <jco> | OK, another question, more related to how to avoid pyramids of doom when doing error handling: http://ix.io/3pnX. There's a better way to write that, right? |
| 19:08:28 | <lyxia> | Re the haddock tooltips issue, it's a known issue https://github.com/haskell/haddock/issues/1250 |
| 19:15:14 | × | Bartosz quits (~textual@24.35.90.211) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 19:15:51 | → | danso joins (~danso@modemcable156.91-20-96.mc.videotron.ca) |
| 19:18:58 | × | danso quits (~danso@modemcable156.91-20-96.mc.videotron.ca) (Read error: Connection reset by peer) |
| 19:18:59 | → | dan-so joins (~danso@modemcable156.91-20-96.mc.videotron.ca) |
| 19:19:52 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 19:23:00 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 19:23:33 | → | gehmehgeh_ joins (~user@user/gehmehgeh) |
| 19:24:05 | × | gehmehgeh quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 19:29:08 | × | ramon quits (~ramon@user/ramon) (Ping timeout: 264 seconds) |
| 19:29:44 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 19:30:04 | → | infandum joins (~user@207.44.105.67.res-cmts.all2.ptd.net) |
| 19:31:02 | <infandum> | I have converted my program to use optparse-applicative. Upon testing, I noticed I accidentally had "option auto" instead of "option str" (or strOption). Yet this bypassed the compilier. Is there a way to type-check this bug? |
| 19:31:58 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 19:32:10 | <infandum> | (there are many, many options and will take a while to test them all) |
| 19:32:44 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:33:07 | <dminuoso> | infandum: By the way, did you get my message regarding optparse-generic? |
| 19:34:00 | <dminuoso> | infandum: And no, there's no easy way. |
| 19:34:48 | <dminuoso> | I'd just avoid `option auto` to begin with, Read is not what you'd likely want |
| 19:36:32 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 19:39:23 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 19:41:12 | <dminuoso> | Recall, that deriving generated Show is supposed to generate syntactically correct Haskell expressions that correspond to the value, and Read that would parse those back into values. |
| 19:43:16 | × | hiruji quits (~hiruji@user/hiruji) (Ping timeout: 272 seconds) |
| 19:45:40 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 19:46:38 | <xerox> | anybody else getting ghcid stuck after the first try, no reload, after upgrading to 8.10.5? |
| 19:47:18 | <xerox> | not even printing the "All good." |
| 19:47:34 | <jco> | OK, found the answer to my own question. Pyramid of doom avoided with the help of `hoistEither` from the `errors` library. I like it: http://ix.io/3pob. |
| 19:49:51 | → | notzmv joins (~zmv@user/notzmv) |
| 19:49:53 | × | chexum quits (~chexum@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 19:51:05 | <infandum> | dminuoso: I did (after I just resigned on), but it expired because I took too long. However, I just converted over to optparse-applicative as I could not figure it out and there seemed to be more features with optparse-applicative (but more boilerplate as well). |
| 19:51:38 | <dminuoso> | infandum: https://gist.github.com/dminuoso/d68598ffb112cbe61c3759a530e2d837 |
| 19:52:01 | <dminuoso> | You can use use both together |
| 19:52:44 | → | kritzefitz_ joins (~kritzefit@picard.host.weltraumschlangen.de) |
| 19:52:57 | × | maerwald quits (~maerwald@user/maerwald) (Ping timeout: 268 seconds) |
| 19:53:03 | × | aerona quits (~aerona@2600:6c54:4600:f300:8401:a988:a361:a685) (Quit: Leaving) |
| 19:54:06 | × | kritzefitz quits (~kritzefit@picard.host.weltraumschlangen.de) (Ping timeout: 265 seconds) |
| 19:54:06 | kritzefitz_ | is now known as kritzefitz |
| 19:54:23 | <ski> | @type maybe empty pure |
| 19:54:24 | <lambdabot> | Alternative f => Maybe a -> f a |
| 19:54:25 | <ski> | @type maybe mzero return |
| 19:54:26 | <lambdabot> | MonadPlus m => Maybe a -> m a |
| 19:54:28 | <ski> | @type either throwError return |
| 19:54:28 | <lambdabot> | MonadError e m => Either e a -> m a |
| 19:54:51 | <infandum> | dminuoso: I see, the instances were what I was missing |
| 19:55:01 | <infandum> | You should submit that to optparse-generic documentation |
| 19:55:34 | <dminuoso> | infandum: The trick is also the newtype wrapper. At that point you might as well submit the code itself. |
| 19:55:46 | → | chexum joins (~chexum@gateway/tor-sasl/chexum) |
| 19:57:43 | × | jneira quits (~jneira@166.red-81-39-172.dynamicip.rima-tde.net) (Quit: Connection closed) |
| 19:59:27 | → | maerwald joins (~maerwald@mail.hasufell.de) |
| 19:59:42 | × | dhouthoo_ quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.1) |
| 20:00:07 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:00:08 | <infandum> | dminuoso: You seem very knowledgeable on this -- is it possible to have the same option name have different help text (and even type) in different entrypoints in optparse-generic? It's possible in optparse-applicative it seems but not in optparse-generic. |
| 20:00:36 | × | maerwald quits (~maerwald@mail.hasufell.de) (Changing host) |
| 20:00:36 | → | maerwald joins (~maerwald@user/maerwald) |
| 20:00:46 | <dminuoso> | Why shouldn't it be possible? |
| 20:00:55 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 20:00:58 | <infandum> | like: command subcommand1 --arg string and command subcommand2 --arg int? |
| 20:01:04 | × | AgentM quits (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net) (Quit: Leaving.) |
| 20:01:08 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 20:01:12 | <dminuoso> | I don't see a reason why it wouldn't work. |
| 20:01:21 | <infandum> | Because the compiler states that within the same record there are two different definitions |
| 20:01:26 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:2121:a570:d35e:ba7a) (Remote host closed the connection) |
| 20:01:34 | <infandum> | or, between the two |
| 20:01:37 | <dminuoso> | Ah I see. Use my Nested newtype wrapper to help out. |
| 20:02:23 | <dminuoso> | You'd create a separate data type for each command, call it `data RC1 = RC1 { arg :: Int <?> "fancy number" }` and `data RC2 = RC2 { arg :: String <?> "fancy string" }` |
| 20:02:40 | <dminuoso> | With OverloadedRecordFields enabled, these could even reside in the same module |
| 20:03:08 | <dminuoso> | And then your command data type would just be `data C = C1 (Nested RC1) | C2 (Nested RC2)` |
| 20:03:32 | <dminuoso> | Of course with each passing step you start accomulate a lot of cruft just to please the weird ergonomics of optparse-generic with non-obvious type level tricks |
| 20:03:40 | <dminuoso> | Better to just write `optparse-applicative` parsers. |
| 20:04:16 | <infandum> | which is ironic as optparse-generic is supposed to make the writing faster haha |
| 20:04:22 | <infandum> | still, very interesting stuff! |
| 20:04:35 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
| 20:04:49 | <dminuoso> | I can see how optparse-generic is nice to some people when want to quickly get some option parsing with minimal effort. |
| 20:05:03 | × | juhp quits (~juhp@128.106.188.66) (Ping timeout: 252 seconds) |
| 20:05:05 | <dminuoso> | I might even use it for *some* parsers |
| 20:05:15 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:2121:a570:d35e:ba7a) |
| 20:05:27 | <dminuoso> | As long as I'm ready to switch to optparse-applicative directly. Recall, you can combine/mix these freely, best of both worlds. |
| 20:05:28 | <infandum> | yeah, I converted a while back to optparse-generic, but for this huge program with a lot of features and entrypoints it is a little unwieldy |
| 20:06:25 | <dminuoso> | I do a similar thing with Aeson in one of my programs. About 90% of the instances are generated with generics (with deriving-aeson, for extra convenience), but I dont shy away from writing out 10% by hand because the generics dont do what I want. |
| 20:06:42 | <dminuoso> | Or because I wanted to decouple the public representation from the internal one |
| 20:07:06 | × | fendor quits (~fendor@178.165.130.85.wireless.dyn.drei.com) (Remote host closed the connection) |
| 20:07:18 | → | juhp joins (~juhp@128.106.188.66) |
| 20:08:24 | <dminuoso> | infandum: Check out `parseRecord` from otpparse-generic. You can use these instances with the data types where it works, and then use `parseRecord` to glue this into your hand-written rest. |
| 20:11:00 | → | jneira joins (~jneira@166.red-81-39-172.dynamicip.rima-tde.net) |
| 20:12:12 | → | Bartosz joins (~textual@24.35.90.211) |
| 20:12:37 | <delYsid> | sm[m]: I am not on Discourse, mostly does to accessibility :-) |
| 20:12:48 | <delYsid> | s/does/due/ |
| 20:12:52 | × | haltux quits (~haltux@a89-154-181-47.cpe.netcabo.pt) (Remote host closed the connection) |
| 20:13:18 | × | stefan-_ quits (~cri@42dots.de) (Ping timeout: 252 seconds) |
| 20:13:32 | <sm[m]> | ack |
| 20:17:15 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 20:17:42 | → | stefan-_ joins (~cri@42dots.de) |
| 20:18:31 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
| 20:19:23 | × | fresheye1 quits (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9) |
| 20:23:12 | <c_l_ste> | exit |
| 20:23:17 | × | jco quits (~jco@c83-248-173-38.bredband.tele2.se) (Ping timeout: 244 seconds) |
| 20:23:20 | × | c_l_ste quits (~celeste@ip68-12-146-37.ok.ok.cox.net) (Quit: leaving) |
| 20:25:06 | × | geekosaur quits (~geekosaur@069-135-003-034.biz.spectrum.com) (Remote host closed the connection) |
| 20:25:07 | × | Bartosz quits (~textual@24.35.90.211) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 20:28:38 | → | geekosaur joins (~geekosaur@069-135-003-034.biz.spectrum.com) |
| 20:29:26 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 20:30:22 | → | spatchkaa joins (~spatchkaa@S010600fc8da47b63.gv.shawcable.net) |
| 20:31:11 | × | mikoto-chan quits (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) (Ping timeout: 268 seconds) |
| 20:31:45 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
| 20:34:44 | niko | is now known as o |
| 20:35:17 | → | hiruji joins (~hiruji@2606:6080:1001:18:8d41:9604:d435:36b6) |
| 20:38:08 | × | ukari quits (~ukari@user/ukari) (Remote host closed the connection) |
| 20:38:50 | → | ukari joins (~ukari@user/ukari) |
| 20:40:19 | × | sciencen1 quits (~sciencent@hacksoc/ordinary-member) (Ping timeout: 272 seconds) |
| 20:41:21 | × | MQ-17J quits (~MQ-17J@8.21.10.116) (Ping timeout: 252 seconds) |
| 20:44:36 | → | MQ-17J joins (~MQ-17J@8.21.10.116) |
| 20:49:03 | × | amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 252 seconds) |
| 20:50:04 | × | michalz quits (~michalz@185.246.204.114) (Remote host closed the connection) |
| 20:50:40 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 244 seconds) |
| 20:52:41 | <jneira> | i think lambdabot got bored in #haskell-es |
| 20:53:05 | <jneira> | how can i convince it to return? :-) |
| 20:55:14 | × | dhil quits (~dhil@195.213.192.47) (Ping timeout: 268 seconds) |
| 20:55:17 | <maerwald> | hmm, there's no #haskell.de anymore? |
| 20:56:00 | <monochrom> | Perchance it's renamed to #haskell-de? Or the people in the original #haskell.de don't bother? |
| 20:56:19 | <ski> | (or are slow to react, perchance) |
| 20:56:28 | <maerwald> | #haskell-de also empty |
| 20:56:39 | <jneira> | iirc channel names were normalized in the igration |
| 20:56:42 | <monochrom> | I know that #haskell.tw took this relocation chance to rename to #haskell-tw |
| 20:57:34 | <monochrom> | Unix philosophy that "move" and "rename" are the same thing >:) |
| 20:57:36 | <ski> | it was suggested that `#haskell-*' would be the proper way, to fall under the same jurisdiction |
| 20:58:37 | × | bruceleewees quits (~bruceleew@83.24.248.233.ipv4.supernova.orange.pl) (Remote host closed the connection) |
| 20:59:03 | <ski> | (this also happened to `#haskell.se' -> `#haskell-se', and `#haskell.scandinavian' -> `#haskell-scandinavian') |
| 20:59:05 | → | teaSlurper joins (~chris@81.96.113.213) |
| 20:59:06 | <monochrom> | Yeah, libera and even previous freenode namespace policy prefers hypthen. But bear in mind that these are just manually followed social constructs, exceptions can happen and don't really fail any algorithm. |
| 20:59:52 | <maerwald> | well, I tried all permutations |
| 21:01:52 | <maerwald> | I'm losing my mother tongue to covid, so I thought maybe... |
| 21:03:02 | <monochrom> | I thought covid didn't attack tongues... >:) |
| 21:03:13 | <monochrom> | your mother lungs, sure >:) |
| 21:04:12 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 21:04:53 | <maerwald> | ok, so who can give me OP in #haskell-de |
| 21:04:58 | <maerwald> | I'll talk to myself |
| 21:05:08 | <maerwald> | (in german) |
| 21:05:22 | <geekosaur> | see #haskell-ops |
| 21:05:32 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection) |
| 21:07:35 | <pavonia> | Weird. There's even a Czech & Slovak sub-channel, but they forgot about the Germans? :o |
| 21:07:51 | <maerwald> | ZE germanz |
| 21:08:04 | → | dhil joins (~dhil@80.208.56.181) |
| 21:08:39 | <maerwald> | maybe they're all on freenode? |
| 21:10:22 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:10:35 | × | xsperry quits (~as@user/xsperry) (Remote host closed the connection) |
| 21:10:41 | <ski> | there's two people in the old #haskell.de |
| 21:10:53 | <ski> | (one might be ChanServ, i guess) |
| 21:11:01 | → | xsperry joins (~as@user/xsperry) |
| 21:11:23 | <pavonia> | How many used to be there before the split? |
| 21:12:18 | <ski> | no idea |
| 21:12:25 | <ski> | (never been in there) |
| 21:12:38 | ski | looks at maerwald |
| 21:13:50 | → | Iryon joins (~Iryon@2a02:a31a:a045:3500:5c9:2f58:8faf:5e52) |
| 21:14:37 | <maerwald> | never been there either |
| 21:15:46 | <pavonia> | :D |
| 21:15:54 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 264 seconds) |
| 21:16:13 | → | favonia joins (~favonia@user/favonia) |
| 21:19:46 | <ski> | > sum (zipWith ((fromEnum .) . (/=)) "pavonia" "favonia") |
| 21:19:47 | <lambdabot> | 1 |
| 21:22:05 | × | jneira quits (~jneira@166.red-81-39-172.dynamicip.rima-tde.net) (Quit: Connection closed) |
| 21:22:19 | → | jneira joins (~jneira@166.red-81-39-172.dynamicip.rima-tde.net) |
| 21:23:08 | pavonia | should rename to phavonia for even more confusion |
| 21:23:50 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 21:24:06 | <monochrom> | I heard that sometimes "v" means "b" and/or vice versa. |
| 21:24:35 | <monochrom> | or maybe "v" means "beta" |
| 21:24:50 | <favonia> | favonia |
| 21:24:50 | <favonia> | oops sorry for misconfiguration |
| 21:24:50 | × | favonia quits (~favonia@user/favonia) (Quit: Leaving) |
| 21:25:39 | <monochrom> | φαβoνια |
| 21:26:33 | × | slac19625 quits (~slack1256@191.125.180.163) (Ping timeout: 272 seconds) |
| 21:26:41 | × | wonko quits (~wjc@62.115.229.50) (Ping timeout: 268 seconds) |
| 21:28:09 | <tomsmeding> | shapr: unwitting entry to the IOHCC https://gist.github.com/vivshaw/2d25a541c0ff7c689474865e8a75c520 |
| 21:32:53 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 21:33:58 | juri__ | is now known as juri_ |
| 21:34:00 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:2121:a570:d35e:ba7a) (Remote host closed the connection) |
| 21:34:21 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:35:47 | <shapr> | tomsmeding: whoa, that's nice |
| 21:35:56 | × | chomwitt quits (~Pitsikoko@athedsl-20549.home.otenet.gr) (Ping timeout: 268 seconds) |
| 21:38:07 | × | danidiaz1 quits (~ESDPC@static-35-0-85-188.ipcom.comunitel.net) (Read error: Connection reset by peer) |
| 21:38:09 | <dminuoso> | tomsmeding: Mmm, your ircbrowse feels like it has become clunky with all that styling. What happened to the good old raw text? |
| 21:38:20 | <dminuoso> | https://ircbrowse.tomsmeding.com/day/haskell/2021/01/04 is hard to read |
| 21:39:51 | <boxscape> | is that partially just a bug? https://ircbrowse.tomsmeding.com/day/haskell/2021/01/05 is one line per message instead of 3 |
| 21:39:58 | × | Ariakenom quits (~Ariakenom@2001:9b1:efb:fc00:190f:d7af:8eb9:1d14) (Read error: Connection reset by peer) |
| 21:41:14 | → | fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) |
| 21:41:24 | <dminuoso> | boxscape: https://www.youtube.com/watch?v=-pzckbNyqfc |
| 21:41:43 | <boxscape> | :) |
| 21:44:53 | <tomsmeding> | dminuoso: that's your browser and it's the fault of boxscape https://ircbrowse.tomsmeding.com/day/haskell/2021/01/04?id=235938#trid235938 |
| 21:45:07 | <boxscape> | oh no |
| 21:45:09 | × | ddellacosta quits (~ddellacos@86.106.121.46) (Ping timeout: 252 seconds) |
| 21:45:12 | <tomsmeding> | ;) |
| 21:45:17 | <boxscape> | I blame yahb |
| 21:45:33 | <tomsmeding> | By the way I changed no styling, so if anything changed in that regard that's accidental |
| 21:45:34 | <mniip> | who dares |
| 21:45:48 | <tomsmeding> | mniip: follow the link |
| 21:45:56 | × | fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 264 seconds) |
| 21:46:01 | <mniip> | sounds like a personal problem to be tbh |
| 21:46:03 | <mniip> | :P |
| 21:46:15 | <boxscape> | I'll handle it in DMs with yahb |
| 21:46:31 | <tomsmeding> | :p |
| 21:47:01 | <tomsmeding> | I guess some fixed column widths can fix this; I can experiment later |
| 21:47:33 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 21:53:40 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 21:55:35 | ski | idly wonders where mauke are |
| 21:56:50 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 21:58:28 | → | xkuru joins (~xkuru@user/xkuru) |
| 21:59:24 | × | oxide_ quits (~lambda@user/oxide) (Read error: Connection reset by peer) |
| 22:01:18 | → | oxide_ joins (~lambda@user/oxide) |
| 22:04:07 | × | wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 22:04:14 | → | P1RATEZ joins (piratez@cpe98524ab27125-cm98524ab27123.cpe.net.cable.rogers.com) |
| 22:04:30 | → | abraham joins (~abraham@173.239.198.148) |
| 22:04:34 | → | wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com) |
| 22:04:38 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 22:06:20 | × | dhil quits (~dhil@80.208.56.181) (Ping timeout: 264 seconds) |
| 22:06:49 | → | adinfinitum joins (~user@2600:6c40:653f:5f00:a650:d8d7:fe0b:8c1f) |
| 22:07:14 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 22:07:24 | × | wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Client Quit) |
| 22:09:14 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 245 seconds) |
| 22:09:18 | × | beka quits (~beka@104.193.170-254.PUBLIC.monkeybrains.net) (Ping timeout: 264 seconds) |
| 22:09:34 | × | teaSlurper quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 22:12:11 | → | hexfive joins (~eric@50.35.83.177) |
| 22:12:31 | × | hexfive quits (~eric@50.35.83.177) (Client Quit) |
| 22:15:17 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 22:16:12 | × | Baloo_ quits (~Baloo_@45.83.220.183) (Quit: Leaving) |
| 22:17:03 | × | gehmehgeh_ quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 22:17:08 | × | pierrot quits (~pi@user/pierrot) (Quit: ZNC 1.6.4 - http://znc.in) |
| 22:17:45 | → | pierrot joins (~pi@user/pierrot) |
| 22:18:20 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:2121:a570:d35e:ba7a) |
| 22:18:30 | × | adinfinitum quits (~user@2600:6c40:653f:5f00:a650:d8d7:fe0b:8c1f) (Ping timeout: 244 seconds) |
| 22:19:51 | → | tromp joins (~textual@dhcp-077-249-230-040.chello.nl) |
| 22:21:39 | × | shapr quits (~user@pool-108-28-144-11.washdc.fios.verizon.net) (Ping timeout: 272 seconds) |
| 22:22:20 | × | yoctocell quits (~yoctocell@h87-96-130-155.cust.a3fiber.se) (Quit: C-x C-c, Shutting down OS...) |
| 22:24:44 | × | pierrot quits (~pi@user/pierrot) (Quit: ZNC 1.6.4 - http://znc.in) |
| 22:25:19 | → | pierrot joins (~pi@user/pierrot) |
| 22:28:47 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:33:16 | <xerox> | anybody tried using ghcid on mac aarch64? something is broken and I can't figure out what |
| 22:33:35 | <maerwald> | you might be the first person |
| 22:35:05 | <xerox> | if I use ghcup to give me ghc and cabal for x64, install ghcid, and then switch to ghc and cabal for arm64, then if I have alias cabal="arch -arm64 cabal" it works, if I go ahead and cabal install ghcid from there, it always gets stuck when using it, in a couple different curious ways |
| 22:36:03 | <xerox> | --poll works but fsnotify, the default, doens't seem to... except if you run it with --verbose, then it does work with notifications! (except now it's unreadable because the output is very dense and meant for debugging) I'm stumped |
| 22:36:04 | <maerwald> | yeah, I'm working on native mac aarch64 support, but we don't even have enough CI runners |
| 22:37:41 | ← | bmsk parts (~user@2001:19f0:5001:2f3b:5400:3ff:fe53:2d96) () |
| 22:37:48 | <xerox> | I wish I was able to debug this more but I'm out of ideas |
| 22:42:07 | × | cactinoob quits (~cactinoob@adsl-64-237-237-9.prtc.net) (Quit: Client closed) |
| 22:45:41 | × | Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.) |
| 22:46:19 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 22:49:04 | × | pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.2-rc1) |
| 22:51:20 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 22:56:26 | × | mnrmnaugh quits (~mnrmnaugh@pool-96-252-87-182.bstnma.fios.verizon.net) (Ping timeout: 272 seconds) |
| 22:59:14 | × | tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 23:00:57 | × | Deide quits (~Deide@user/deide) (Quit: Seeee yaaaa) |
| 23:01:32 | × | pierrot quits (~pi@user/pierrot) (Quit: ZNC 1.6.4 - http://znc.in) |
| 23:02:07 | → | pierrot joins (~pi@user/pierrot) |
| 23:03:05 | → | jmcarthur joins (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
| 23:05:00 | × | jespada quits (~jespada@90.254.242.55) (Ping timeout: 244 seconds) |
| 23:06:39 | ← | delYsid parts (~user@84-115-55-45.cable.dynamic.surfer.at) (ERC (IRC client for Emacs 27.1.50)) |
| 23:08:01 | → | jespada joins (~jespada@90.254.242.55) |
| 23:09:19 | × | fluffyballoon quits (~fluffybal@2620:72:0:6480::10f7) (Quit: Client closed) |
| 23:09:28 | → | xal joins (~xal@2604:3d08:9a80:4c18:2584:dda0:e5c4:dbaf) |
| 23:09:54 | → | mnrmnaugh joins (~mnrmnaugh@pool-96-252-87-182.bstnma.fios.verizon.net) |
| 23:11:46 | × | orion quits (~orion@user/orion) (Remote host closed the connection) |
| 23:12:00 | → | orion joins (~orion@user/orion) |
| 23:17:28 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 23:19:38 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 23:24:27 | × | infandum quits (~user@207.44.105.67.res-cmts.all2.ptd.net) (Remote host closed the connection) |
| 23:28:49 | × | xal quits (~xal@2604:3d08:9a80:4c18:2584:dda0:e5c4:dbaf) (Ping timeout: 245 seconds) |
| 23:29:44 | × | MQ-17J quits (~MQ-17J@8.21.10.116) (Ping timeout: 252 seconds) |
| 23:34:27 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 244 seconds) |
| 23:34:54 | → | trent joins (~trent@2001:8003:340d:d00:b2de:b98:7a93:b0ea) |
| 23:34:55 | <juri_> | anyone want to tell me i'm wrong? https://github.com/Haskell-Things/HSlice/pull/35#issuecomment-858158929 |
| 23:36:02 | <juri_> | tl;dr: there's a class of warning that, when it covers code you maintain, you can do something about, and can make your code faster. when it's not your code it's warning about, there's nothing you can do about it. |
| 23:36:13 | <juri_> | the UX on this sucks. |
| 23:37:56 | → | xal joins (~xal@2604:3d08:9a80:4c18:2584:dda0:e5c4:dbaf) |
| 23:39:02 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 23:46:26 | → | aerona joins (~aerona@2600:6c54:4600:f300:d2da:d7c1:1e2d:1a51) |
| 23:47:50 | <glguy> | juri_: isn't that just a case of "don't compile your dependencies with a bunch of warnings turned on"? |
| 23:48:15 | <glguy> | Oh, I guess it's your code, but referring to something outside your package? |
| 23:50:28 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 244 seconds) |
| 23:56:40 | × | jmcarthur quits (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
| 23:56:53 | → | blankhart joins (~blankhart@pool-72-88-174-206.nwrknj.fios.verizon.net) |
All times are in UTC on 2021-06-09.