Logs on 2021-11-20 (liberachat/#haskell)
| 00:02:32 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 00:04:45 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds) |
| 00:09:30 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 00:10:01 | × | mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Quit: mikoto-chan) |
| 00:10:15 | → | mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi) |
| 00:17:16 | × | evocatus quits (~evocatus@213.193.2.105) (Quit: Leaving) |
| 00:25:23 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 00:31:35 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 264 seconds) |
| 00:32:18 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 00:37:57 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8) |
| 00:39:31 | × | bobfang1992_ quits (~textual@152.37.66.232) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 00:40:22 | × | sydddddd quits (~syd@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 00:52:58 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 260 seconds) |
| 00:52:59 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 00:54:51 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 00:55:34 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 00:55:34 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 00:55:35 | → | wroathe joins (~wroathe@user/wroathe) |
| 00:57:27 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 00:58:37 | × | emf_ quits (~emf@2620:10d:c090:400::5:5ceb) (Quit: emf_) |
| 00:58:59 | → | emf joins (~emf@2620:10d:c090:400::5:5ceb) |
| 00:59:43 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 00:59:47 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 01:00:27 | × | Guest98 quits (~Guest98@2601:547:902:5e80:3c6c:c3e3:11e0:2f8) (Quit: Client closed) |
| 01:06:58 | × | myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 260 seconds) |
| 01:07:35 | × | emf quits (~emf@2620:10d:c090:400::5:5ceb) (Ping timeout: 264 seconds) |
| 01:10:48 | × | Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.) |
| 01:13:44 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 268 seconds) |
| 01:16:32 | → | Guest|35 joins (~Guest|35@S010684948ccddec3.vf.shawcable.net) |
| 01:18:02 | <Guest|35> | Can I install ghc on a macintosh with an m1 chip running monterey? |
| 01:19:05 | <geekosaur> | 8.10.7 recommended and you'll need to point it at /opt/llvm |
| 01:19:26 | <geekosaur> | 9.2.1 has a native codegen but some severe bugs were found post-release |
| 01:20:02 | <geekosaur> | ghcup should work fine to install either |
| 01:20:10 | <glguy> | Last time I tried I had some trouble where C libraries (openssl in my case) I wanted to use were using one architecture and GHC was compiling for the other |
| 01:20:15 | → | favonia joins (~favonia@user/favonia) |
| 01:21:41 | <geekosaur> | I *think* most of that has been resolved, there were some aberrant uses of `arch` that inappropriately forced x86_64 builds |
| 01:22:07 | <geekosaur> | also I think you need to find a native stack binary if you use that, or stack will try to build everything x86_64 |
| 01:23:23 | <glguy> | OK,I'll have to give it a shot |
| 01:23:26 | <glguy> | another* |
| 01:23:49 | <Guest|35> | I don't mind whether it runs natively or not.. I have problems missing LLVM. I had further problems when i tried to install LLVM with home-brew. |
| 01:23:53 | <geekosaur> | possibly get stack from https://gitlab.haskell.org/maerwald/stack/-/jobs/849239/artifacts/browse/.local/bin/ ? |
| 01:24:36 | <geekosaur> | last I heard, a full working llvm is in /opt |
| 01:24:50 | <geekosaur> | you just have to convince ghc to look there |
| 01:27:01 | <glguy> | To get GHC to use my LLVM from homebrew I had to edit the lcc and opt keys in the ghc settings file |
| 01:29:09 | × | favonia quits (~favonia@user/favonia) (Ping timeout: 268 seconds) |
| 01:29:13 | <sm> | interesting |
| 01:29:58 | <dsal> | Guest|35: I'm running it fine out of nix |
| 01:30:24 | × | pfurla quits (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d) (Quit: gone to sleep. ZZZzzz…) |
| 01:34:35 | × | chomwitt quits (~chomwitt@2a02:587:dc12:3f00:12c3:7bff:fe6d:d374) (Ping timeout: 264 seconds) |
| 01:36:29 | → | xyzaMan joins (~TheMan@85.203.34.97) |
| 01:38:30 | × | Guest|35 quits (~Guest|35@S010684948ccddec3.vf.shawcable.net) (Quit: Ping timeout (120 seconds)) |
| 01:51:23 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 264 seconds) |
| 01:53:18 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 01:53:54 | → | deadmarshal joins (~deadmarsh@95.38.119.181) |
| 01:55:21 | → | renzhi joins (~xp@2607:fa49:6500:b100::6e7f) |
| 01:58:39 | × | deadmarshal quits (~deadmarsh@95.38.119.181) (Ping timeout: 256 seconds) |
| 01:59:30 | × | xyzaMan quits (~TheMan@85.203.34.97) (Quit: WeeChat 3.3) |
| 02:02:07 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 02:02:29 | → | Vajb joins (~Vajb@nalkaylds2h97nzof-2.v6.elisa-mobile.fi) |
| 02:06:29 | × | alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection) |
| 02:22:12 | × | Vajb quits (~Vajb@nalkaylds2h97nzof-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer) |
| 02:22:26 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 02:24:39 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 02:28:38 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 02:29:18 | → | econo joins (uid147250@user/econo) |
| 02:29:34 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 260 seconds) |
| 02:29:40 | → | Vajb joins (~Vajb@85-76-10-195-nat.elisa-mobile.fi) |
| 02:30:59 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds) |
| 02:39:41 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 02:39:41 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
| 02:39:41 | → | wroathe joins (~wroathe@user/wroathe) |
| 02:40:01 | → | harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
| 02:42:29 | × | alx741 quits (~alx741@186.178.109.242) (Quit: alx741) |
| 02:43:48 | → | myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net) |
| 02:45:37 | × | xff0x quits (~xff0x@2001:1a81:53ef:fb00:8923:f787:bbfb:445e) (Ping timeout: 268 seconds) |
| 02:47:06 | → | xff0x joins (~xff0x@2001:1a81:5231:4c00:b29b:34ce:44e1:612b) |
| 02:54:42 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 02:56:13 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 02:59:26 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 03:12:08 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 03:20:11 | → | slice joins (~slice@user/slice) |
| 03:22:38 | × | wroathe quits (~wroathe@user/wroathe) (Quit: Lost terminal) |
| 03:29:48 | × | waleee quits (~waleee@h-82-196-111-63.NA.cust.bahnhof.se) (Quit: WeeChat 3.3) |
| 03:30:42 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 03:34:40 | × | Axman6 quits (~Axman6@user/axman6) (Ping timeout: 260 seconds) |
| 03:35:36 | → | favonia joins (~favonia@user/favonia) |
| 03:36:48 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 268 seconds) |
| 03:39:24 | × | xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 03:41:08 | → | zebrag joins (~chris@user/zebrag) |
| 03:50:42 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 03:52:50 | × | td_ quits (~td@muedsl-82-207-238-169.citykom.de) (Ping timeout: 268 seconds) |
| 03:54:31 | → | td_ joins (~td@muedsl-82-207-238-028.citykom.de) |
| 04:00:48 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 04:02:47 | × | myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 264 seconds) |
| 04:05:35 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 04:08:05 | → | takenobu joins (uid459077@hampstead.irccloud.com) |
| 04:09:49 | × | unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Remote host closed the connection) |
| 04:11:07 | → | lavaman joins (~lavaman@98.38.249.169) |
| 04:11:11 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 264 seconds) |
| 04:23:11 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 264 seconds) |
| 04:25:06 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 04:26:27 | × | favonia quits (~favonia@user/favonia) (Quit: Leaving) |
| 04:29:57 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 04:30:49 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 04:35:37 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 04:38:01 | × | aegon quits (~mike@174.127.249.180) (Remote host closed the connection) |
| 04:47:33 | → | pfurla joins (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d) |
| 04:49:18 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 04:49:28 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 04:59:32 | × | renzhi quits (~xp@2607:fa49:6500:b100::6e7f) (Ping timeout: 240 seconds) |
| 05:08:51 | × | zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!) |
| 05:18:36 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 05:20:01 | × | monochrom quits (~trebla@216.138.220.146) (Quit: NO CARRIER) |
| 05:21:43 | × | whatsupdoc quits (uid509081@hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 05:22:31 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
| 05:23:29 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
| 05:23:47 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 05:26:53 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:29:07 | × | bgamari quits (~bgamari@64.223.235.131) (Remote host closed the connection) |
| 05:29:26 | → | bgamari joins (~bgamari@64.223.235.131) |
| 05:32:11 | × | shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 264 seconds) |
| 05:32:20 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 05:36:28 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 05:36:45 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 05:41:21 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 05:42:40 | × | flukiluke quits (~m-7humut@plum.alephc.xyz) (Remote host closed the connection) |
| 05:44:46 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3) |
| 05:45:20 | × | pfurla quits (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d) (Quit: gone to sleep. ZZZzzz…) |
| 05:52:56 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 05:55:24 | → | mbuf joins (~Shakthi@171.61.241.64) |
| 05:58:01 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 268 seconds) |
| 06:01:35 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 06:02:31 | → | BobFang1992 joins (~textual@2a01:4b00:87fe:be00:5534:65fd:7:6614) |
| 06:03:58 | → | CannabisIndica joins (~herb@user/mesaboogie) |
| 06:05:01 | → | dyeplexer joins (~dyeplexer@user/dyeplexer) |
| 06:05:33 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 06:08:44 | → | MidAutumnMoon joins (~MidAutumn@user/midautumnmoon) |
| 06:10:49 | × | MidAutumnMoon6 quits (~MidAutumn@user/midautumnmoon) (Ping timeout: 256 seconds) |
| 06:10:55 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 06:15:26 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 260 seconds) |
| 06:16:50 | × | takenobu quits (uid459077@hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 06:27:23 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 06:27:59 | → | flukiluke joins (~m-7humut@2603:c023:c000:6c7e:8945:ad24:9113:a962) |
| 06:28:01 | → | monochrom joins (trebla@216.138.220.146) |
| 06:31:47 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 06:32:42 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds) |
| 06:33:56 | × | slice quits (~slice@user/slice) (Quit: zzz) |
| 06:33:59 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 264 seconds) |
| 06:34:03 | × | mvk quits (~mvk@2607:fea8:5cc1:fa00::4702) (Quit: Going elsewhere) |
| 06:34:44 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 06:40:54 | → | mimmy joins (~mimmy@146.70.75.149) |
| 06:44:53 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 06:49:21 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 06:52:59 | × | slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving) |
| 06:53:53 | × | ishutin quits (~ishutin@84-236-40-131.pool.digikabel.hu) (Ping timeout: 256 seconds) |
| 06:55:17 | → | ishutin joins (~ishutin@89-186-118-211.pool.digikabel.hu) |
| 06:57:50 | × | monochrom quits (trebla@216.138.220.146) (Ping timeout: 268 seconds) |
| 07:00:00 | → | monochrom joins (trebla@216.138.220.146) |
| 07:06:11 | → | deadmarshal joins (~deadmarsh@95.38.119.181) |
| 07:09:51 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 07:09:51 | × | Vajb quits (~Vajb@85-76-10-195-nat.elisa-mobile.fi) (Read error: Connection reset by peer) |
| 07:10:46 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 07:11:32 | → | mei joins (~mei@user/mei) |
| 07:17:15 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 07:18:23 | × | deadmarshal quits (~deadmarsh@95.38.119.181) (Ping timeout: 264 seconds) |
| 07:21:53 | × | mimmy quits (~mimmy@146.70.75.149) (Ping timeout: 268 seconds) |
| 07:22:10 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 260 seconds) |
| 07:25:46 | → | gehmehgeh joins (~user@user/gehmehgeh) |
| 07:26:55 | → | acidjnk joins (~acidjnk@2001:16b8:67ca:f700:e19c:d1d8:58a0:5a93) |
| 07:28:03 | × | zer0bitz quits (~zer0bitz@dsl-hkibng31-54fabc-15.dhcp.inet.fi) (Ping timeout: 268 seconds) |
| 07:31:26 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 07:33:52 | → | Lycurgus joins (~juan@98.4.112.204) |
| 07:46:59 | → | Codaraxis__ joins (~Codaraxis@user/codaraxis) |
| 07:47:18 | → | mimmy joins (~mimmy@146.70.75.149) |
| 07:48:18 | → | vysn joins (~vysn@user/vysn) |
| 07:49:39 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 07:51:07 | × | Codaraxis_ quits (~Codaraxis@user/codaraxis) (Ping timeout: 256 seconds) |
| 07:54:59 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 264 seconds) |
| 07:56:55 | → | deadmarshal joins (~deadmarsh@95.38.119.180) |
| 07:57:24 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:58:16 | × | mimmy quits (~mimmy@146.70.75.149) (Ping timeout: 268 seconds) |
| 08:03:31 | <jle`> | is there a ghc-pkg list that i can use within a cabal project? |
| 08:04:36 | <jle`> | ah i guess i can cabal freeze |
| 08:07:32 | × | BobFang1992 quits (~textual@2a01:4b00:87fe:be00:5534:65fd:7:6614) (Quit: Textual IRC Client: www.textualapp.com) |
| 08:08:24 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 08:08:58 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 08:10:23 | → | mimmy joins (~mimmy@146.70.75.149) |
| 08:15:22 | × | mimmy quits (~mimmy@146.70.75.149) (Ping timeout: 260 seconds) |
| 08:15:51 | × | jrm quits (~jrm@156.34.187.65) (Quit: ciao) |
| 08:16:09 | → | jrm joins (~jrm@156.34.187.65) |
| 08:20:35 | → | max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
| 08:23:50 | → | jmorris joins (uid433911@hampstead.irccloud.com) |
| 08:31:23 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 08:31:47 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 08:32:32 | × | acidjnk quits (~acidjnk@2001:16b8:67ca:f700:e19c:d1d8:58a0:5a93) (Ping timeout: 240 seconds) |
| 08:33:38 | <Tisoxin> | Is there a project to implement anonymous sum types in Haskell (roc calls them „tags“: https://youtu.be/6qzWm_eoUXM?t=1008)? |
| 08:34:23 | <Tisoxin> | I have already found compound-types, but that's not quite what i want |
| 08:35:56 | <Tisoxin> | because I want to name constructors for better readibility |
| 08:36:11 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 265 seconds) |
| 08:36:29 | → | chomwitt joins (~chomwitt@2a02:587:dc12:3f00:12c3:7bff:fe6d:d374) |
| 08:41:58 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 260 seconds) |
| 08:48:20 | → | mimmy joins (~mimmy@146.70.75.149) |
| 08:51:35 | → | AndrejKarpathy joins (~AndrejKar@182.64.9.106) |
| 08:51:43 | <AndrejKarpathy> | Hi. |
| 08:52:11 | <jle`> | AndrejKarpathy: hi :) |
| 08:52:48 | <arahael> | I'm about to install haskell and cabal for a musl system (Alpine), any caveats I should be aware of? Shoudl I use the distro packages or ? |
| 08:53:18 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 08:53:21 | <jle`> | AndrejKarpathy: your cars are very impressive, you must be very proud |
| 08:53:46 | × | mimmy quits (~mimmy@146.70.75.149) (Ping timeout: 268 seconds) |
| 08:54:38 | <Lycurgus> | arahael, this musl https://en.wikipedia.org/wiki/Musl ? |
| 08:54:59 | <arahael> | Lycurgus: Yes. |
| 08:55:11 | <Lycurgus> | in general using distro pkgs with hs is a bad idea |
| 08:55:15 | <AndrejKarpathy> | I had a question regarding the effects of Haskell code on the computational complexity of algorithms. Is there any significant change in it? I'm working on a small Haskell project that undertakes the handling of certain test cases on Codeforces. Thanks in advance. |
| 08:55:22 | <arahael> | Lycurgus: Which is why I'm asking here. :) |
| 08:55:28 | <Lycurgus> | probably manifestly so for alpine |
| 08:55:34 | <AndrejKarpathy> | @Jle Thank you. I like the civic too |
| 08:55:34 | <lambdabot> | Maybe you meant: pl let |
| 08:55:58 | <arahael> | Lycurgus: Yeah? |
| 08:56:38 | <Lycurgus> | yes by virtue of the principle of less use/exposure |
| 08:56:55 | <Lycurgus> | -/eyes |
| 08:56:56 | <jle`> | AndrejKarpathy: the "same" algorithms have the same complexities. but certain algorithsm can be easier or harder to write in haskell than in other languages, and superficial syntax similiaries can be misleading |
| 08:57:38 | <arahael> | Lycurgus: I'll try ghcup. |
| 08:58:05 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 268 seconds) |
| 08:58:34 | <Lycurgus> | AndrejKarpathy, yeah at the source level easier but as far as the actual thing more work than with a simple algol like lang |
| 08:59:08 | <Lycurgus> | there are tools but with c you don't need em |
| 08:59:21 | <AndrejKarpathy> | Alright. Perfect answers, thank you jle`and Lycurgus |
| 08:59:48 | <arahael> | Lycurgus: Yeah, ghcup doesn't work. |
| 09:00:16 | <arahael> | Lycurgus: sh: /root/.ghcup/bin/ghcup: not found |
| 09:00:29 | <arahael> | Lycurgus: "_eghcup upgrade" failed! |
| 09:01:50 | <Lycurgus> | arahael, ack |
| 09:01:51 | <arahael> | Lycurgus: Looks like it's there but missing a whole bunch of libraries. |
| 09:02:09 | <arahael> | Eg, libtinfo.so.6 is missing. |
| 09:02:24 | → | chenjf joins (~chenjf@104.208.72.114) |
| 09:03:15 | × | chenjf quits (~chenjf@104.208.72.114) (Client Quit) |
| 09:03:17 | <AndrejKarpathy> | What is the Haskell community's collective outlook on Haskell being used as an official programming language in the competitive programming world? If possible, please mention the advantages and disadvantages of standardizing Haskell in accordance with competitive programming? |
| 09:04:18 | → | dschrempf joins (~dominik@62.240.134.78) |
| 09:04:27 | arahael | hates competitive programming - it's basically ego-stroking. |
| 09:05:37 | → | chenjf joins (~chenjf@104.208.72.114) |
| 09:07:15 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection) |
| 09:07:38 | × | Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt) |
| 09:08:13 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8) (Remote host closed the connection) |
| 09:08:33 | → | acidjnk joins (~acidjnk@2001:16b8:67ca:f700:e19c:d1d8:58a0:5a93) |
| 09:10:20 | <arahael> | Though, I plan to do advent of code, I suppose that's competitive programming - but I tend to do that non-competitively. |
| 09:14:17 | <Hecate> | AndrejKarpathy: there is no collective outlook because there is no single Haskell community |
| 09:14:41 | <Hecate> | for example I'm certain the Russians will wholeheartedly agree that you should do Haskell for Competitive Programming |
| 09:15:16 | <arahael> | Haskell's popular in Russia? |
| 09:15:52 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 09:16:40 | × | chenjf quits (~chenjf@104.208.72.114) (Remote host closed the connection) |
| 09:16:57 | × | geekosaur quits (~geekosaur@xmonad/geekosaur) (Read error: Connection reset by peer) |
| 09:17:09 | <AndrejKarpathy> | All right. :] |
| 09:17:32 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 09:18:23 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 09:19:03 | × | AndrejKarpathy quits (~AndrejKar@182.64.9.106) (Quit: Client closed) |
| 09:19:20 | <Hecate> | arahael: is Haskell even popular? ;) |
| 09:19:20 | → | Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) |
| 09:19:38 | <Hecate> | but there is a Russian Haskellers community that exists and it's tightly-knit |
| 09:19:46 | <arahael> | Hecate: If that's a matter of opinion, then I'd say it is. ;) |
| 09:20:33 | <Hecate> | nah it's a matter of observing the real world |
| 09:21:23 | <arahael> | Hecate: God gives us but one Real World Token. |
| 09:21:47 | × | dschrempf quits (~dominik@62.240.134.78) (Ping timeout: 256 seconds) |
| 09:22:09 | → | zer0bitz joins (~zer0bitz@dsl-hkibng31-54fabc-15.dhcp.inet.fi) |
| 09:30:12 | × | mbuf quits (~Shakthi@171.61.241.64) (Quit: Leaving) |
| 09:31:02 | → | mimmy joins (~mimmy@146.70.75.149) |
| 09:32:08 | × | zer0bitz quits (~zer0bitz@dsl-hkibng31-54fabc-15.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 09:33:56 | → | zer0bitz joins (~zer0bitz@dsl-hkibng31-54fabc-15.dhcp.inet.fi) |
| 09:34:44 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 09:37:05 | × | mimmy quits (~mimmy@146.70.75.149) (Ping timeout: 256 seconds) |
| 09:37:25 | × | sagax quits (~sagax_nb@user/sagax) (Ping timeout: 250 seconds) |
| 09:38:07 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b4a8:9431:5c1:c0e0) |
| 09:39:07 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Remote host closed the connection) |
| 09:43:44 | × | deadmarshal quits (~deadmarsh@95.38.119.180) (Ping timeout: 268 seconds) |
| 09:45:22 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 260 seconds) |
| 09:47:07 | → | dschrempf joins (~dominik@62.240.134.78) |
| 09:49:18 | → | deadmarshal joins (~deadmarsh@95.38.119.180) |
| 09:49:38 | → | slice joins (~slice@user/slice) |
| 09:51:54 | × | dschrempf quits (~dominik@62.240.134.78) (Ping timeout: 260 seconds) |
| 09:58:53 | → | mc47 joins (~mc47@xmonad/TheMC47) |
| 10:00:59 | × | deadmarshal quits (~deadmarsh@95.38.119.180) (Ping timeout: 264 seconds) |
| 10:05:27 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 10:10:07 | → | Midjak joins (~Midjak@82-65-111-221.subs.proxad.net) |
| 10:10:14 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
| 10:13:56 | → | deadmarshal joins (~deadmarsh@95.38.119.180) |
| 10:15:17 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 10:15:35 | → | euouae- joins (~euouae@user/euouae) |
| 10:15:45 | <euouae-> | Hello what are some good benchmarking packages for speed and memory? |
| 10:16:25 | <Hecate> | euouae-: https://hackage.haskell.org/package/tasty-bench |
| 10:16:27 | <euouae-> | I'm reading https://chrisdone.com/posts/fast-haskell-c-parsing-xml/ which mentions the 'weigh' package for memory tracking |
| 10:17:32 | <euouae-> | Hecate, thank you |
| 10:20:06 | → | ubert joins (~Thunderbi@p200300ecdf0ba279e6b318fffe838f33.dip0.t-ipconnect.de) |
| 10:20:51 | <euouae-> | Hecate, how can I use tasty-bench with stack instead of cabal? |
| 10:21:44 | <euouae-> | Hecate nevermind me, I misread the instructions. It's like every other package. |
| 10:22:18 | × | Midjak quits (~Midjak@82-65-111-221.subs.proxad.net) (Ping timeout: 260 seconds) |
| 10:23:27 | × | ubert quits (~Thunderbi@p200300ecdf0ba279e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 10:24:45 | → | desantra joins (~skykanin@user/skykanin) |
| 10:25:55 | → | sydddddd joins (~syd@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net) |
| 10:27:59 | × | chomwitt quits (~chomwitt@2a02:587:dc12:3f00:12c3:7bff:fe6d:d374) (Ping timeout: 264 seconds) |
| 10:28:52 | <euouae-> | Actually, I don't understand how to write benchmarks with stack, `stack bench --help` doesn't have information on the package.yaml syntax and I can't find it in the docs either. |
| 10:30:32 | → | Midjak joins (~Midjak@82-65-111-221.subs.proxad.net) |
| 10:30:49 | <euouae-> | I guess I'll look up a popular package and see how they do it |
| 10:32:41 | <Hecate> | euouae-: stack bench is just a shortcut to run the benchmarks stanza of your Cabal file, not write them |
| 10:33:04 | <euouae-> | Hmmm so maybe I should `stack --help` and go from there |
| 10:34:29 | × | hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection) |
| 10:34:46 | <euouae-> | for example `hspec` seems to use stack but it doesn't have any benchmarks |
| 10:34:56 | → | chomwitt joins (~chomwitt@2a02:587:dc12:3f00:12c3:7bff:fe6d:d374) |
| 10:35:02 | <Hecate> | euouae-: `stack` is just a CLI tool to run builds, tests and benchmarks |
| 10:35:21 | <Hecate> | learn how to make benchmarks, `stack` is just how you call them, and is interchangeable with `cabal` |
| 10:35:56 | <euouae-> | But stack is using the files `package.yaml` and `stack.yaml` which cabal doesn't know about, and package.yaml is where you specify the unit tests |
| 10:35:58 | → | hololeap joins (~hololeap@user/hololeap) |
| 10:36:07 | <Hecate> | no |
| 10:36:11 | <Hecate> | stack uses the cabal file |
| 10:36:29 | <Hecate> | package.yaml is turned into *.cabal through the use of a tool called hpack, which stack uses |
| 10:36:33 | <euouae-> | It generates a cabal file |
| 10:36:49 | <Hecate> | stack.yaml is only here for dependency resolution, not calling tests and benchmarks |
| 10:37:09 | <Hecate> | you should maybe read the Stack manual if you want to use it |
| 10:37:16 | <euouae-> | OK so if I learn about cabal and how hpack works, I'll figure it out |
| 10:37:27 | <euouae-> | right |
| 10:37:31 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b4a8:9431:5c1:c0e0) (Remote host closed the connection) |
| 10:40:05 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 10:45:05 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 10:47:14 | × | xff0x quits (~xff0x@2001:1a81:5231:4c00:b29b:34ce:44e1:612b) (Ping timeout: 268 seconds) |
| 10:47:32 | → | xff0x joins (~xff0x@2001:1a81:5231:4c00:af6c:e4ce:ed0b:b587) |
| 10:48:29 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 10:50:49 | × | lambdap quits (~lambdap@static.167.190.119.168.clients.your-server.de) (Quit: lambdap) |
| 10:51:10 | → | lambdap joins (~lambdap@static.167.190.119.168.clients.your-server.de) |
| 10:51:56 | <maerwald> | arahael: ghcup should work on alpine |
| 10:52:27 | <maerwald> | because ghcup binaries are built on alpine... |
| 10:53:02 | <arahael> | maerwald: Ah, good to know, that probably means there's just a dependency or two it's missed. |
| 10:53:39 | <maerwald> | well, I don't know the error |
| 10:54:32 | <arahael> | maerwald: It's a minimal system, ghcup is literally the first thing that's added. |
| 10:54:49 | <maerwald> | you need curl at least |
| 10:56:12 | <arahael> | Yeah, I tried, found curl wasn't installed, instaleld that, and then now stuck, but I ahven't been trying hard as I'm a bit lazy today. |
| 10:56:18 | <arahael> | It's missing the following libraries: |
| 10:56:20 | <maerwald> | works here https://imgur.com/He0FQpE.png |
| 10:56:32 | <arahael> | libtinfo.so.6, libnuma.so.1 |
| 10:56:48 | × | slice quits (~slice@user/slice) (Quit: zzz) |
| 10:57:23 | <arahael> | I'm on alpine 3.14, though actually I should update just in case. |
| 10:57:36 | <maerwald> | I still don't understand what exactly failed, you're only giving half the information |
| 10:59:16 | <arahael> | There's two libraries that are missing on my system that's required by ghcup, and a bunch of symbols which, I assume, are provided by those libraries. |
| 10:59:31 | <maerwald> | ghcup binary is static, it needs nothing |
| 10:59:40 | <arahael> | Uh? That's weird, then. |
| 11:00:03 | <arahael> | It's definintely dynamic here. |
| 11:00:20 | <maerwald> | / # ldd ~/.ghcup/bin/ghcup |
| 11:00:22 | <maerwald> | /lib/ld-musl-i386.so.1: /root/.ghcup/bin/ghcup: Not a valid dynamic program |
| 11:00:34 | <arahael> | Yeah, that's what I'm running, and it's definitely dynamic. |
| 11:00:47 | → | alx741 joins (~alx741@186.178.109.242) |
| 11:01:05 | <maerwald> | what's the checksum of the binary |
| 11:01:09 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 11:01:29 | <arahael> | The sha256sum is... |
| 11:02:13 | <arahael> | 5a3075337...2974c4a2. First and last 8 characters or so of the hash. |
| 11:02:27 | <arahael> | More than that and the chance I make a typo becomes pretty high. :) |
| 11:02:31 | <maerwald> | what's the architecture? |
| 11:02:36 | <arahael> | aarm64 |
| 11:02:47 | <arahael> | aarch64*. ARM 64, anyway. |
| 11:02:48 | <maerwald> | well, yeah... there are no static binaries for that arch |
| 11:03:03 | <arahael> | That explains the mystery! |
| 11:03:19 | <maerwald> | because there's no GHC aarch64 musl bindist |
| 11:04:04 | <maerwald> | and alpine repos don't have one either |
| 11:04:10 | <maerwald> | no one ever bootstrapped one |
| 11:04:37 | × | hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection) |
| 11:04:38 | <euouae-> | Why is - -with-rtsopts="-A32m -T" giving me an error about -T" being an unknown option? |
| 11:04:39 | <arahael> | Hmm. And I'm guessing that means I can't build static haskell applicatiosn on this either (unless I were to bootstrap one, and that's probably a bit over my head at the moment) |
| 11:05:03 | <euouae-> | in package.yaml |
| 11:05:57 | → | hololeap joins (~hololeap@user/hololeap) |
| 11:06:03 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 11:06:37 | <arahael> | Looks like this is https://github.com/haskell/cabal/issues/6715 |
| 11:06:55 | <arahael> | (Closed, but only because they want it solved by #6616) |
| 11:07:01 | → | CiaoSen joins (~Jura@p200300c95716ce002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 11:07:57 | <maerwald> | arahael: that's about normal linux arm |
| 11:08:01 | <maerwald> | and that's already solved |
| 11:08:35 | <arahael> | Ah, so it's the musl one that's peculiar, then. |
| 11:08:44 | <maerwald> | musl is always peculiar |
| 11:09:10 | <arahael> | Heh. |
| 11:09:22 | <arahael> | Well, it sounds like I can make do with a dynamically linked one, at least. |
| 11:09:27 | → | neurocyte0132889 joins (~neurocyte@94.46.77.154) |
| 11:09:27 | × | neurocyte0132889 quits (~neurocyte@94.46.77.154) (Changing host) |
| 11:09:27 | → | neurocyte0132889 joins (~neurocyte@user/neurocyte) |
| 11:09:32 | <arahael> | Just gotta find these libs - which isn't going to be today. (It's getting late) |
| 11:09:49 | <arahael> | Would've been nice if it was static, but it's not a big deal. |
| 11:11:03 | → | mimmy joins (~mimmy@146.70.75.148) |
| 11:13:13 | <arahael> | maerwald: I see your name pops up in a few of those tickets :) I'm happy to raise a bug report if you want, but not today - perhaps tomorrow? However, I'm really quite OK with finding these libs and bootstrapping it that way. I can probably just get all the required libs by installing the alpine ghc anyway. |
| 11:14:51 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 11:14:51 | × | tv quits (~tv@user/tv) (Read error: Connection reset by peer) |
| 11:15:58 | × | mimmy quits (~mimmy@146.70.75.148) (Ping timeout: 260 seconds) |
| 11:16:24 | <maerwald> | there is no alpine ghc on aarch64 |
| 11:18:08 | <arahael> | Ah, ha! |
| 11:18:31 | <arahael> | Looks like that might be a bit tricky, then! Well, will check it out tomorrow. |
| 11:18:32 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 11:18:36 | <arahael> | G'night. :) |
| 11:19:38 | <arahael> | (And thanks) |
| 11:22:32 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 11:27:06 | × | perrierjouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 3.3) |
| 11:29:13 | → | DNH joins (~DNH@2a02:8108:1100:16d8:d0f4:92d3:1aef:5b27) |
| 11:31:19 | → | zincy_ joins (~zincy@2a00:23c8:970c:4801:78f3:43f3:fd48:5ac3) |
| 11:32:01 | × | euouae- quits (~euouae@user/euouae) (Quit: ) |
| 11:32:47 | → | tv joins (~tv@user/tv) |
| 11:35:12 | → | Successus joins (~Successus@gateway/tor-sasl/successus) |
| 11:36:16 | → | cosimone joins (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) |
| 11:38:00 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 11:38:47 | × | sydddddd quits (~syd@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net) (Ping timeout: 264 seconds) |
| 11:42:19 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 11:42:20 | × | zincy_ quits (~zincy@2a00:23c8:970c:4801:78f3:43f3:fd48:5ac3) (Remote host closed the connection) |
| 11:49:35 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 11:50:05 | → | sydddddd joins (~syd@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net) |
| 11:50:54 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 260 seconds) |
| 11:53:55 | → | perrierjouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) |
| 11:57:51 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 12:02:34 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 265 seconds) |
| 12:06:18 | × | sydddddd quits (~syd@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net) (Quit: Lost terminal) |
| 12:07:12 | → | Nrmncr joins (~Neuromanc@user/neuromancer) |
| 12:11:06 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 265 seconds) |
| 12:12:58 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 12:13:35 | × | jmorris quits (uid433911@hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 12:18:12 | → | mimmy joins (~mimmy@146.70.75.148) |
| 12:21:20 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 12:22:33 | × | Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 12:24:03 | × | mimmy quits (~mimmy@146.70.75.148) (Ping timeout: 268 seconds) |
| 12:24:56 | × | Techcable quits (~Techcable@168.235.93.147) (Quit: ZNC - https://znc.in) |
| 12:26:13 | → | Techcable joins (~Techcable@168.235.93.147) |
| 12:27:55 | → | Guest17 joins (~Guest17@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 12:27:59 | × | xff0x quits (~xff0x@2001:1a81:5231:4c00:af6c:e4ce:ed0b:b587) (Ping timeout: 264 seconds) |
| 12:31:27 | × | monochrom quits (trebla@216.138.220.146) (Ping timeout: 268 seconds) |
| 12:34:41 | → | monochrom joins (~trebla@216.138.220.146) |
| 12:38:44 | → | Everything joins (~Everythin@37.115.210.35) |
| 12:38:58 | × | CiaoSen quits (~Jura@p200300c95716ce002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 12:40:08 | → | xff0x joins (~xff0x@2001:1a81:5231:4c00:af6c:e4ce:ed0b:b587) |
| 12:44:48 | × | FragByte quits (~christian@user/fragbyte) (Quit: Quit) |
| 12:46:28 | × | amk quits (~amk@109.255.169.126) (Remote host closed the connection) |
| 12:46:38 | → | FragByte joins (~christian@user/fragbyte) |
| 12:46:39 | → | amk joins (~amk@109.255.169.126) |
| 12:48:10 | → | fabfianda joins (~fabfianda@net-93-148-114-144.cust.dsl.teletu.it) |
| 12:48:15 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
| 12:51:11 | × | deadmarshal quits (~deadmarsh@95.38.119.180) (Ping timeout: 268 seconds) |
| 12:52:30 | × | fabfianda quits (~fabfianda@net-93-148-114-144.cust.dsl.teletu.it) (Ping timeout: 260 seconds) |
| 12:53:34 | → | fabfianda joins (~fabfianda@mob-5-90-247-119.net.vodafone.it) |
| 12:56:11 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 264 seconds) |
| 12:57:35 | → | deadmarshal joins (~deadmarsh@95.38.119.180) |
| 12:57:40 | × | max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 265 seconds) |
| 13:07:44 | → | pfurla joins (~pfurla@2804:14d:5c81:4104:d41b:9326:c4d8:9f2a) |
| 13:08:19 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 13:12:19 | → | sagax joins (~sagax_nb@user/sagax) |
| 13:18:55 | → | __monty__ joins (~toonn@user/toonn) |
| 13:19:00 | → | bitdex_ joins (~bitdex@gateway/tor-sasl/bitdex) |
| 13:19:36 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds) |
| 13:23:22 | × | deadmarshal quits (~deadmarsh@95.38.119.180) (Ping timeout: 260 seconds) |
| 13:25:02 | × | xff0x quits (~xff0x@2001:1a81:5231:4c00:af6c:e4ce:ed0b:b587) (Remote host closed the connection) |
| 13:25:20 | → | xff0x joins (~xff0x@2001:1a81:5231:4c00:cc14:8453:5a9c:d44b) |
| 13:25:33 | → | deadmarshal joins (~deadmarsh@95.38.119.180) |
| 13:27:02 | × | acidjnk quits (~acidjnk@2001:16b8:67ca:f700:e19c:d1d8:58a0:5a93) (Ping timeout: 240 seconds) |
| 13:31:11 | × | pfurla quits (~pfurla@2804:14d:5c81:4104:d41b:9326:c4d8:9f2a) (Quit: gone to sleep. ZZZzzz…) |
| 13:34:48 | × | fabfianda quits (~fabfianda@mob-5-90-247-119.net.vodafone.it) (Read error: Connection reset by peer) |
| 13:34:57 | → | fabfianda joins (~fabfianda@net-93-148-114-144.cust.vodafonedsl.it) |
| 13:42:48 | → | jkaye joins (~jkaye@216.53.205.34) |
| 13:43:01 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 13:45:15 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 13:46:37 | → | harveypwca joins (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) |
| 13:48:22 | × | mei quits (~mei@user/mei) (Quit: mei) |
| 13:49:46 | × | deadmarshal quits (~deadmarsh@95.38.119.180) (Ping timeout: 268 seconds) |
| 13:49:52 | → | mei joins (~mei@user/mei) |
| 13:54:20 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 13:56:04 | → | mimmy joins (~mimmy@146.70.75.149) |
| 13:57:23 | → | acidjnk joins (~acidjnk@2001:16b8:67ca:f700:e19c:d1d8:58a0:5a93) |
| 13:59:01 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 268 seconds) |
| 13:59:59 | → | euouae joins (~euouae@user/euouae) |
| 14:00:32 | <euouae> | Hello how can I memoize the function (a -> a) -> a -> [a] given by [x, f x, f $ f x, f $ f $ f x, ...] |
| 14:00:37 | → | Xnuk joins (~xnuk@vultr.xnu.kr) |
| 14:00:43 | → | deadmarshal joins (~deadmarsh@95.38.119.180) |
| 14:00:59 | × | mimmy quits (~mimmy@146.70.75.149) (Ping timeout: 264 seconds) |
| 14:01:37 | → | dschrempf joins (~dominik@62.240.134.78) |
| 14:01:38 | <hololeap> | euouae: you could use the monad-memo package |
| 14:02:07 | <euouae> | hm, that looks nicer than the memoize package, which has very little docs |
| 14:02:25 | × | dschrempf quits (~dominik@62.240.134.78) (Client Quit) |
| 14:02:29 | <hololeap> | I've used it before. you can also roll your own pretty easily |
| 14:04:00 | <hololeap> | but you will necessarily end up with something that looks like: (a -> m a) -> a -> m [a] |
| 14:05:12 | × | gg quits (~gg@2a01:e0a:819:1510:8568:3ca4:33bc:8c5b) (Ping timeout: 268 seconds) |
| 14:08:32 | × | viole quits (~viole@user/viole) (Ping timeout: 240 seconds) |
| 14:09:29 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 14:09:58 | <euouae> | thanks |
| 14:10:22 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 14:12:51 | <euouae> | If I have a vector of N elements and I'd like to iterate over all k-tuples with elements fron that vector, how can I do it without building a vector of N^k elements? |
| 14:13:08 | <euouae> | One way is by using indices, maybe that's it? |
| 14:14:03 | × | Xnuk quits (~xnuk@vultr.xnu.kr) (Remote host closed the connection) |
| 14:14:51 | <hpc> | you just make the list of tuples and loop over it |
| 14:15:11 | <euouae> | I'm assuming N,k large |
| 14:15:14 | <hpc> | the whole list won't be in memory at once unless you need all of it at the same time, or hold onto a reference to it |
| 14:15:25 | <hpc> | a list is just a loop waiting to happen :D |
| 14:15:44 | <euouae> | I don't understand, can it really be true? |
| 14:15:59 | <hpc> | > [1..] -- unless you think lambdabot has infinite memory, it must be true :D |
| 14:16:01 | <lambdabot> | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,... |
| 14:16:13 | <hpc> | laziness in action |
| 14:16:25 | <euouae> | You're saying I can have e.g. let xs = map f [1..n], and then you can loop over k-tuples and what is the space/time analysis |
| 14:17:33 | → | kuribas joins (~user@ptr-25vy0i85dt12hx5mopu.18120a2.ip6.access.telenet.be) |
| 14:17:54 | <euouae> | I'm not convinced :P |
| 14:17:58 | <hpc> | as long as you write it so there's no lingering references to parts of the list you have already looped over, it will be f*n |
| 14:18:19 | <euouae> | but the list is looped over k elements |
| 14:18:35 | <euouae> | e.g. [g a b c d ... z | a <- xs, b <- xs, ... z <- xs] |
| 14:19:03 | <euouae> | so up until the very last few iterations, all elements are needed, right? |
| 14:19:03 | <hpc> | oh, i was misreading what xs was there |
| 14:19:22 | <hpc> | all elements of xs, sure |
| 14:19:22 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 14:19:33 | → | notzmv joins (~zmv@user/notzmv) |
| 14:19:42 | <hpc> | but that fits in memory anyway, since that's a precondition to your question |
| 14:20:16 | <euouae> | right. oh yeah. but [ g ...] is an N^k list. |
| 14:20:20 | <hpc> | [g a b ...] will not all be in memory at once unless you hold onto a reference to it |
| 14:20:31 | <euouae> | Oh, I see! |
| 14:20:48 | <euouae> | Very nice, thanks |
| 14:21:05 | → | Lycurgus joins (~juan@98.4.112.204) |
| 14:22:40 | <kuribas> | I wish more libraries would use abstractions such as monad, aplicative, (pro)functor, etc... |
| 14:23:26 | → | renzhi joins (~xp@2607:fa49:6500:b100::6e7f) |
| 14:23:42 | <kuribas> | Looking at graphql libraries, the choice is either: a dynamically typed library following the javascript model, a fancy type level library (alla servant), and even more crazy, a library that uses your database schema as the API. |
| 14:24:23 | × | cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds) |
| 14:24:38 | <Lycurgus> | speaking of which, does impredication in 9 break much stuff or it can easily be turned off to be 8 like? |
| 14:24:52 | <geekosaur> | it defaults off |
| 14:24:59 | <Lycurgus> | ah |
| 14:25:06 | <kuribas> | What does impredication allow? |
| 14:25:13 | <geekosaur> | it's just a fixed ImpredicativeTypes, which was always a hack before that |
| 14:26:04 | <kuribas> | Does it mean you can return polymorphic functions from a function? |
| 14:27:16 | geekosaur | is actually not sure, this goes beyond his small understanding of type theory |
| 14:27:40 | <geekosaur> | I think it allows inference of forall-ed types |
| 14:27:41 | <Franciman> | kuribas: it allows |
| 14:27:44 | <Franciman> | \x. x x |
| 14:27:46 | <Franciman> | to be well typed |
| 14:27:59 | <Franciman> | but you can never use it :P except for applying it to id |
| 14:28:25 | <geekosaur> | to an extent at least, since ghc's type inference doesn't really support rank-2 polymorphism and rank >2 is undecidable |
| 14:28:37 | <Franciman> | yes you can return \forall x. x -> y |
| 14:29:04 | <kuribas> | I don't care about infering rank-2 or type extensions. |
| 14:29:34 | × | acidjnk quits (~acidjnk@2001:16b8:67ca:f700:e19c:d1d8:58a0:5a93) (Ping timeout: 260 seconds) |
| 14:29:43 | → | shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
| 14:35:39 | <hololeap> | I care about your bear |
| 14:35:59 | → | mimmy joins (~mimmy@146.70.75.150) |
| 14:36:02 | <kuribas> | hololeap: I don't have a bear... |
| 14:36:05 | <kuribas> | I have cat though |
| 14:36:17 | <hololeap> | close enough |
| 14:36:38 | × | jkaye quits (~jkaye@216.53.205.34) (Ping timeout: 260 seconds) |
| 14:39:23 | × | Guest17 quits (~Guest17@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed) |
| 14:39:34 | → | kupi joins (uid212005@hampstead.irccloud.com) |
| 14:39:57 | <euouae> | Suppose I want the functionality `lookup x xs` to be fast, as well as `add x xs` and `remove x xs`. What data structure should I be using? Hash table? |
| 14:40:19 | <euouae> | the adds won't be many, but there will be a lot of lookups |
| 14:40:46 | <euouae> | and there will be a lot of "modify" so to speak, I basically store (x,y) values where x is used for lookup and y is updated |
| 14:41:46 | <euouae> | IntMap would do, x is an int |
| 14:41:47 | × | fabfianda quits (~fabfianda@net-93-148-114-144.cust.vodafonedsl.it) (Ping timeout: 264 seconds) |
| 14:41:53 | → | eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 14:42:03 | → | slice joins (~slice@user/slice) |
| 14:42:12 | <geekosaur> | if x is an Int you probably want IntMap, yeh |
| 14:42:14 | → | fabfianda joins (~fabfianda@mob-5-90-247-119.net.vodafone.it) |
| 14:43:10 | × | dsrt^ quits (~dsrt@68.101.63.101) (Ping timeout: 260 seconds) |
| 14:43:31 | × | slice quits (~slice@user/slice) (Client Quit) |
| 14:43:39 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 14:43:51 | → | gustik joins (~gustik@2a01:c844:240a:de20:3606:7339:bc88:b5f5) |
| 14:45:53 | <hololeap> | vector might make sense too |
| 14:46:29 | × | eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 14:46:31 | → | cheater joins (~Username@user/cheater) |
| 14:46:56 | <euouae> | I'm going to write something cool and share soon |
| 14:48:11 | × | mimmy quits (~mimmy@146.70.75.150) (Ping timeout: 256 seconds) |
| 14:50:32 | × | pwug quits (~pwug@user/pwug) (Remote host closed the connection) |
| 14:51:27 | → | pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
| 14:52:24 | → | mimmy joins (~mimmy@146.70.75.148) |
| 14:52:38 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 14:54:10 | <zincy> | Does anyone want to look over my code and help me connect two Mealy machines? https://gist.github.com/therewillbecode/22ad270985e3970f4d08444afdad704f |
| 14:54:24 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat) |
| 14:55:51 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1) |
| 14:56:05 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 14:56:58 | → | max22- joins (~maxime@2a01cb08833598001ac225a432e05a7f.ipv6.abo.wanadoo.fr) |
| 14:57:10 | × | mimmy quits (~mimmy@146.70.75.148) (Ping timeout: 260 seconds) |
| 14:57:23 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 264 seconds) |
| 14:58:07 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 14:59:32 | → | xkuru joins (~xkuru@user/xkuru) |
| 14:59:54 | × | Feuermagier_ quits (~Feuermagi@2a02:2488:4211:3400:b6fd:ec18:acf6:f1a8) (Ping timeout: 260 seconds) |
| 15:00:40 | × | xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
| 15:05:16 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 15:05:47 | <euouae> | Here it is, https://paste.tomsmeding.com/rQEcSSn0 |
| 15:07:02 | <euouae> | maybe I should call it minimalRepresentatives |
| 15:08:50 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 15:12:06 | → | xkuru joins (~xkuru@user/xkuru) |
| 15:16:23 | → | mimmy joins (~mimmy@146.70.75.150) |
| 15:17:36 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 15:17:49 | ← | jakalx parts (~jakalx@base.jakalx.net) () |
| 15:19:09 | <int-e> | > M.assocs . M.fromListWith min . map ((`mod` 2) &&& id) $ [100,200,301,401] |
| 15:19:11 | <lambdabot> | [(0,100),(1,301)] |
| 15:20:48 | <int-e> | euouae: `fromListWith` + `map` can express your `aux` |
| 15:21:48 | <euouae> | int-e nice! let me think about it |
| 15:22:48 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 15:23:40 | → | gg joins (~gg@88.160.100.84) |
| 15:23:53 | × | Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt) |
| 15:23:59 | → | serg joins (~a@p200300ef97155109502293e1a26d2ca1.dip0.t-ipconnect.de) |
| 15:26:34 | <hololeap> | euouae: one simple change would be to replace your case block with: let y = f x in aux f xs $ IntMap.insertWith min y x m |
| 15:27:26 | × | chomwitt quits (~chomwitt@2a02:587:dc12:3f00:12c3:7bff:fe6d:d374) (Ping timeout: 260 seconds) |
| 15:28:17 | <serg> | Hi. I have data Expr a = ... I want a Show instance for a = Int. I write instance Show (Expr Int) where but I get a error: Int is not a type variable. True. Can I have a Show instance for Expr Int? |
| 15:29:27 | <hololeap> | serg: wouldn't you want Show a => Show (Expr a) ? |
| 15:29:41 | <hololeap> | why limit it to Int? |
| 15:30:04 | <janus> | % data Expr a |
| 15:30:04 | <yahb> | janus: type role Expr phantom; type Expr :: forall {k}. k -> *; data Expr a |
| 15:30:20 | <janus> | % :set -XFlexibleInstances |
| 15:30:20 | <yahb> | janus: |
| 15:30:30 | <euouae> | How can I refer to the constructor of some field in case of ambiguous name? |
| 15:30:36 | <janus> | % instance Show (Expr a) where |
| 15:30:37 | <yahb> | janus: ; <interactive>:61:10: warning: [-Wmissing-methods]; * No explicit implementation for; either `showsPrec' or `show'; * In the instance declaration for `Show (Expr a)' |
| 15:30:41 | <euouae> | e.g. I have both `area` as a constructor and as a function |
| 15:31:00 | <euouae> | ah -- nevermind me |
| 15:31:03 | <hololeap> | euouae: simply put, you can't |
| 15:31:15 | <serg> | This means I have to write show for every a not only Int? |
| 15:31:25 | <janus> | % instance Show (Expr Int) where |
| 15:31:25 | <yahb> | janus: ; <interactive>:62:10: error:; * Overlapping instances for Show (Expr Int) arising from a use of `GHC.Show.$dmshowsPrec'; Matching instances:; instance Show (Expr Int) -- Defined at <interactive>:62:10; instance [safe] forall k (a :: k). Show (Expr a) -- Defined at <interactive>:61:10; * In the expression: GHC.Show.$dmshowsPrec @(Expr Int); In an equation for `showsPre |
| 15:31:26 | <hololeap> | serg: no, just derive it |
| 15:31:57 | <hololeap> | data Expr a = ... deriving (Show, ...) |
| 15:32:00 | <int-e> | % :q |
| 15:32:00 | <yahb> | int-e: |
| 15:32:36 | <serg> | I know. I wanted to exercise. So meaning of Show a => is every a in Expr a has Show instance too? |
| 15:32:49 | <hololeap> | right |
| 15:32:58 | × | chexum_ quits (~quassel@gateway/tor-sasl/chexum) (Quit: -) |
| 15:33:08 | <serg> | And FlexibleInstances of janus? |
| 15:33:12 | <geekosaur> | "if there is a Show instance for a, then the Show instance for (Expr a) is …" |
| 15:33:17 | → | burnsidesLlama joins (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
| 15:33:24 | <int-e> | % data FooBar a = Foo a | Bar |
| 15:33:25 | <yahb> | int-e: |
| 15:34:50 | <hololeap> | at some point when writing show or showsPrec for `Expr a`, you will inevitably be calling show or showsPrec for `a` |
| 15:35:14 | <int-e> | % instance Show a => Show (FooBar a) where show (Foo a) = "a Foo holding a " ++ show a; show Bar = "a Bar holding nothing" |
| 15:35:14 | <yahb> | int-e: |
| 15:35:16 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 15:35:18 | <hololeap> | thus `a` needs to have a Show instance |
| 15:35:21 | <int-e> | % Foo Nothing |
| 15:35:22 | <yahb> | int-e: a Foo holding a Nothing |
| 15:36:00 | <int-e> | % Foo (Foo Bar) |
| 15:36:00 | <yahb> | int-e: a Foo holding a a Foo holding a a Bar holding nothing |
| 15:36:15 | <int-e> | Hah. |
| 15:36:32 | → | dsrt^ joins (~dsrt@68.101.63.101) |
| 15:36:35 | <janus> | what is the motivation for having data constructors here? |
| 15:36:57 | → | acidjnk_new joins (~acidjnk@2001:16b8:67ca:f700:55fd:e2e5:a98b:cf1a) |
| 15:37:10 | <int-e> | me? just having some fun |
| 15:37:57 | <janus> | right right, just wanted to make sure i wasn't missing anything. seemed to me like the question was not concerned with data |
| 15:38:01 | <serg> | I think I understand. show inside show for Expr is a different show. |
| 15:38:15 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 15:38:45 | <serg> | but original solution works with flexibleinstances |
| 15:39:24 | <janus> | but i think the question is if that is really want you want. but since this is an exercise i guess the requirements cannot be pinned down |
| 15:39:46 | <serg> | is flexibleinstances bad? |
| 15:39:55 | → | chomwitt joins (~chomwitt@ppp-94-67-202-36.home.otenet.gr) |
| 15:40:40 | <geekosaur> | not in and of itself. but using it for this is something of a smell |
| 15:40:44 | <int-e> | Nah, FlexibleInstances is benign. UndecidableInstances is benign if your code compiles. Anything overlapping is a road to hell, where incoherent instances live. |
| 15:41:25 | <janus> | benign also according to diehl http://dev.stephendiehl.com/hask/#classes |
| 15:41:39 | <int-e> | Yeah I wonder why FlexibleInstances would be required for something simple like this. |
| 15:41:46 | → | rusty joins (~rustyboy@82.77.237.221) |
| 15:41:54 | <geekosaur> | just because haskell98/2010 doesn't spec it |
| 15:42:14 | <serg> | Is meaning of flexibleinstances only Show instance for Expr a for some a? |
| 15:42:21 | <geekosaur> | "must be of the form T a b c where a, b, c are type variables" |
| 15:43:01 | <int-e> | if you have instance (Show a) => Show (Expr a) where ... then that doesn't require FlexibleInstances |
| 15:43:09 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 15:43:12 | <int-e> | though enabling FlexibleInstances won't hurt of course |
| 15:43:38 | <serg> | this works: instance Show a => Show (Expr a) where show (Lit a) = show a ... |
| 15:44:12 | <serg> | I think I understand. Thank you. |
| 15:44:41 | → | whatsupdoc joins (uid509081@hampstead.irccloud.com) |
| 15:46:21 | × | serg quits (~a@p200300ef97155109502293e1a26d2ca1.dip0.t-ipconnect.de) (Quit: WeeChat 3.0.1) |
| 15:48:01 | <janus> | where can a read more about how templateHaskell causes more module invalidation than w/o TH? |
| 15:48:11 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 268 seconds) |
| 15:50:47 | × | deadmarshal quits (~deadmarsh@95.38.119.180) (Ping timeout: 264 seconds) |
| 15:51:08 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 15:52:50 | <euouae> | A file contains this data, "Just [(0,Triangle {a = Point {x = 0, y = 0}, b = Point {x = 0, y = 0}, c = Point {x = 0, y = 0}})]\n" how can I read it back into a variable? |
| 15:53:06 | <euouae> | I've tried `read <$> f :: IO (Maybe (Int, [Triangle]))` but it's not working out |
| 15:53:17 | <euouae> | Also tried with `return`, but that didn't work out either |
| 15:55:32 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 240 seconds) |
| 15:56:16 | <janus> | % newtype A = A Int deriving (Show, Read) |
| 15:56:16 | <yahb> | janus: |
| 15:56:19 | <janus> | % read (show (A 1)) |
| 15:56:19 | <yahb> | janus: *** Exception: Prelude.read: no parse |
| 15:57:41 | <int-e> | % read (show (A 1)) :: A |
| 15:57:41 | <yahb> | int-e: A 1 |
| 15:58:07 | <janus> | ooh it is type defaulting :O omg |
| 15:58:10 | <int-e> | (it's ghci with extended defaulting rules... defaults to ()) |
| 15:58:34 | <int-e> | % read "A 1" :: () |
| 15:58:34 | <yahb> | int-e: *** Exception: Prelude.read: no parse |
| 15:58:35 | <euouae> | I recall doing something like `((,) <*> f <$> g) x y` to get (f x, g y)... |
| 15:58:39 | <euouae> | But I can't get it to work, is that wrong? |
| 15:59:10 | <int-e> | ((,) <*> f <$> g) x is (f x, g x) |
| 15:59:18 | <janus> | euouae: are you using the same deriving strategy for Read and Show? |
| 15:59:24 | <euouae> | janus yeah |
| 15:59:28 | <zincy> | With the Machines library how do you express a bidirectional relationship between machines. For example machine A writes output which updates machine B but depending on the state of machine B, machine A might need to be updated. |
| 15:59:40 | <int-e> | :t curry (?f *** ?g) |
| 15:59:41 | <lambdabot> | (?f::a -> c, ?g::b -> c') => a -> b -> (c, c') |
| 15:59:42 | <euouae> | int-e oh nice |
| 16:00:05 | <euouae> | That's /actually/ what I need |
| 16:00:23 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 16:00:26 | <int-e> | :t f &&& g |
| 16:00:27 | <lambdabot> | (Arrow a, FromExpr (a b c), FromExpr (a b c')) => a b (c, c') |
| 16:00:39 | <int-e> | :t id . (f &&& g) |
| 16:00:40 | <lambdabot> | (Show a, FromExpr c, FromExpr c') => a -> (c, c') |
| 16:00:56 | <int-e> | oh, duh |
| 16:01:00 | <int-e> | :t id . (?f &&& ?g) |
| 16:01:01 | <lambdabot> | (?f::a -> c, ?g::a -> c') => a -> (c, c') |
| 16:02:15 | <euouae> | `fromListwith min $ map ((,) <*> f <$> id) xs` is what you propose int-e I believe |
| 16:02:32 | × | mimmy quits (~mimmy@146.70.75.150) (Ping timeout: 240 seconds) |
| 16:02:40 | <int-e> | euouae: yeah I used &&& earlier |
| 16:04:43 | → | mimmy joins (~mimmy@2607:fea8:6e0:7f90:3961:f854:3883:a1b9) |
| 16:05:47 | × | neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 264 seconds) |
| 16:05:51 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 16:08:02 | <euouae> | I'm getting it wrong because things like `((,) <*> (1+) <$> Just) 1` fail |
| 16:08:07 | <euouae> | I'm not sure why, ugh :D |
| 16:08:17 | × | DNH quits (~DNH@2a02:8108:1100:16d8:d0f4:92d3:1aef:5b27) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 16:08:47 | <int-e> | euouae: oh you've mixed up <$> and <*> |
| 16:09:06 | <euouae> | I'm going with &&&, seems nice |
| 16:09:06 | <int-e> | (and I copied it without noticing) |
| 16:09:47 | <int-e> | > ((,) <$> (1+) <*> Just) 1 |
| 16:09:49 | <lambdabot> | (2,Just 1) |
| 16:10:03 | <int-e> | > ((1+) &&& Just) 1 |
| 16:10:05 | <lambdabot> | (2,Just 1) |
| 16:10:35 | <int-e> | and before you ask, &&& comes from Control.Arrow |
| 16:10:45 | <euouae> | Indeed -- no worries, I hoogled that |
| 16:11:01 | <janus> | applicative style is better just because it avoids control.arrow ;) |
| 16:11:36 | × | acidjnk_new quits (~acidjnk@2001:16b8:67ca:f700:55fd:e2e5:a98b:cf1a) (Ping timeout: 268 seconds) |
| 16:11:46 | <janus> | and you have less churn when you need a third member. |
| 16:12:33 | <janus> | even less churn if you decide to have a dedicated data type instead of tuples |
| 16:12:38 | <int-e> | in that spirit you should minimize dependencies and write a lambda \x -> (f x, x) |
| 16:12:49 | <Rembane_> | Applicative style isn't as cool though :D |
| 16:13:35 | <janus> | int-e: unavoidable dependencies don't need to be avoided ;) |
| 16:13:54 | <janus> | applicative is in prelude, no? |
| 16:16:01 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 16:17:32 | → | jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 16:17:47 | × | mimmy quits (~mimmy@2607:fea8:6e0:7f90:3961:f854:3883:a1b9) (Ping timeout: 268 seconds) |
| 16:17:51 | <int-e> | Not in Haskell2010 :P |
| 16:18:01 | <euouae> | I think that might be a good idea too, to write it that way |
| 16:18:52 | → | DNH joins (~DNH@2a02:8108:1100:16d8:d0f4:92d3:1aef:5b27) |
| 16:19:13 | → | mimmy joins (~mimmy@2607:fea8:6e0:7f90:80ec:4373:ceb7:3da9) |
| 16:19:24 | <janus> | Rembane_: here's a cool applicative pattern in purescript: instance DecodeJson Person where decodeJson json = o <- decodeJson; Person <$> { name: _, age: _ } <$> (o .: "name") <*> (o .: "age") |
| 16:19:45 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 16:20:30 | <janus> | (advantage is multiple errors if an element has a problem) (possible because the _ are arguments to an implicit anonymous function) |
| 16:21:14 | <Rembane_> | janus: That's pretty. Should there be two <$> in that line? |
| 16:22:02 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 16:22:47 | <janus> | Rembane_: yeah, depends whether you want to wrap your records with a newtype constructor or not. we do that here. but if you don't , just remove "Person <$>". purescript's records are not necessarily wrapped in a data constructor with a similar name to the type, as is common in haskell |
| 16:22:49 | × | jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 256 seconds) |
| 16:23:02 | × | DNH quits (~DNH@2a02:8108:1100:16d8:d0f4:92d3:1aef:5b27) (Ping timeout: 240 seconds) |
| 16:23:26 | <Rembane_> | janus: Got it. Cool! |
| 16:25:47 | × | vysn quits (~vysn@user/vysn) (Ping timeout: 268 seconds) |
| 16:25:49 | <hololeap> | zincy: those mealy machines seem confusing |
| 16:25:59 | <zincy> | hololeap: How come? |
| 16:26:23 | <hololeap> | I guess I just don't have an intuition for them |
| 16:27:35 | <zincy> | Its just a turn based game that has a mealy for whether each player has acted and a mealy for game stages |
| 16:28:01 | <zincy> | Players cannot act if they are in an inactive state etc ... |
| 16:29:10 | → | deadmarshal joins (~deadmarsh@95.38.119.180) |
| 16:29:37 | <hololeap> | unfoldMealy :: (s -> a -> (b, s)) -> s -> Mealy a b |
| 16:30:10 | <hololeap> | this is a much more understandable representation to me, which makes me wonder if the whole Mealy abstraction is worth it or if it's just extra mental overhead |
| 16:30:57 | <hololeap> | but I guess that could be said about any abstraction I don't have an intuition for :p |
| 16:31:09 | <hololeap> | then again, you seem to be having problems with it as well, zincy |
| 16:31:49 | <zincy> | yes I am hehe |
| 16:37:55 | → | oxide joins (~lambda@user/oxide) |
| 16:39:03 | → | ubert joins (~Thunderbi@p200300ecdf0ba279387348ed975200f7.dip0.t-ipconnect.de) |
| 16:40:22 | <hololeap> | A Profunctor p is a Cosieve on f if it is a subprofunctor of Costar f. |
| 16:40:49 | <hololeap> | where does ekmett get these terms from? |
| 16:42:44 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b4a8:9431:5c1:c0e0) |
| 16:43:04 | <hololeap> | Sketches of an Elephant – A Topos Theory Compendium |
| 16:43:09 | <hololeap> | is that the original source? |
| 16:45:10 | <hololeap> | I'm tired of going into a drooling stupor when I read the docs for profunctors |
| 16:48:59 | <zincy> | I am finding this library quite tricky to understand |
| 16:50:19 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
| 16:51:08 | → | waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
| 16:59:05 | × | kupi quits (uid212005@hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
| 17:00:59 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 264 seconds) |
| 17:01:31 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 17:06:23 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 264 seconds) |
| 17:07:38 | → | slowButPresent joins (~slowButPr@user/slowbutpresent) |
| 17:08:41 | → | serg joins (~a@p200300ef97155109502293e1a26d2ca1.dip0.t-ipconnect.de) |
| 17:09:48 | × | tired quits (~tired@user/tired) (Quit: /) |
| 17:11:21 | → | tired joins (~tired@user/tired) |
| 17:11:24 | → | ProfSimm joins (~ProfSimm@87.227.196.109) |
| 17:11:51 | × | machinedgod quits (~machinedg@24.105.81.50) (Quit: Lost terminal) |
| 17:11:56 | <ProfSimm> | I have something odd to ask, but I wanna her your opinion. In Haskell, two identical types by different names are different, right. Nominal |
| 17:11:57 | × | lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection) |
| 17:12:14 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 17:12:18 | → | Jeanne-Kamikaze joins (~Jeanne-Ka@static-198-54-131-158.cust.tzulo.com) |
| 17:14:24 | → | timCF_ joins (~timCF@m91-129-99-212.cust.tele2.ee) |
| 17:14:32 | × | renzhi quits (~xp@2607:fa49:6500:b100::6e7f) (Ping timeout: 240 seconds) |
| 17:14:55 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 17:15:38 | → | ees joins (~user@pool-108-18-30-46.washdc.fios.verizon.net) |
| 17:16:34 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 17:16:41 | × | ubert quits (~Thunderbi@p200300ecdf0ba279387348ed975200f7.dip0.t-ipconnect.de) (Quit: ubert) |
| 17:17:19 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 17:18:26 | <timCF_> | Hello! Let's say I do have a `newtype PosRat = PosRat (Ratio Natural)` with smart constructors and stuff to create new values of this type with potential failure for example in case where value is == 0. Is there the way to have literals of my new type which I can write in a code just as values (without applying smart constructors)? Basically I want to apply smart constructor in compile-time. But without |
| 17:18:32 | <timCF_> | TH. Just similar the way Natural type literals are handled. |
| 17:18:55 | × | mimmy quits (~mimmy@2607:fea8:6e0:7f90:80ec:4373:ceb7:3da9) (Ping timeout: 250 seconds) |
| 17:19:15 | <ProfSimm> | Haskell is nominal, right. Two identical types with different name would be different types |
| 17:19:54 | <monochrom> | Yes. |
| 17:21:39 | <ProfSimm> | Let's imagine a system where two differently named types are compared structurally, at depth, and Haskell speculatively branches by executing the code twice by substituting one of the other. And at some threshold, if they cause the same outcomes, they become one type. |
| 17:22:09 | <ProfSimm> | Is there a name for this idea |
| 17:22:30 | → | ThatLinuxGuy joins (~sand49@2001:8003:8431:d200:220b:84b2:a334:cbad) |
| 17:23:27 | × | ThatLinuxGuy quits (~sand49@2001:8003:8431:d200:220b:84b2:a334:cbad) (Client Quit) |
| 17:24:50 | × | harveypwca quits (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
| 17:24:50 | <geekosaur> | timCF_, not without patching the compiler to recognize the new literals |
| 17:24:59 | × | xff0x quits (~xff0x@2001:1a81:5231:4c00:cc14:8453:5a9c:d44b) (Ping timeout: 268 seconds) |
| 17:25:16 | <timCF_> | geekosaur: so TH is the simplest way to go I guess? |
| 17:25:17 | <geekosaur> | heck, it doesn't even recognize Ratio Integer literals, % is a smart constructor |
| 17:25:31 | → | xff0x joins (~xff0x@2001:1a81:5231:4c00:adf9:5009:dcd2:4bf0) |
| 17:25:44 | <geekosaur> | or quasiquoters, which amount to the same thing |
| 17:26:00 | → | benin joins (~benin@183.82.178.244) |
| 17:26:03 | <timCF_> | geekosaur: but it does recognize Natural, and will not compile negative literals |
| 17:26:15 | <geekosaur> | right |
| 17:28:56 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3) |
| 17:29:11 | → | mimmy joins (~mimmy@cpef81d0f857c83-cmf81d0f857c80.cpe.net.cable.rogers.com) |
| 17:29:18 | → | zero joins (~z@user/zero) |
| 17:29:20 | <dsal> | ProfSimm: We do have a concept of a type role which allows us to treat (or prevents us from treating) a structure of one type as a structure of another type with the same representation, but the deep comparison thing is orthogonal, I think. |
| 17:29:33 | <dsal> | (super likely I don't understand what you're getting at, but this at least sounds similar) |
| 17:30:14 | <ProfSimm> | dsal, the structural comparison would be some initial sanity check. But I think two types stand the test of being compatible if they actually produce the same outcomes |
| 17:30:53 | <zero> | if we can have a total linear function that only uses total linear functionss, we could pattern match against them, couldn't we? |
| 17:30:54 | <ProfSimm> | dsal well I'm using a type a bit differently here. Not as in "same contract, different result, different implementation" |
| 17:31:08 | <ProfSimm> | But as in "same contract and result, different implementation" |
| 17:31:32 | <ProfSimm> | zero, do you know how epicycles work (related concept fourier transform) |
| 17:31:49 | <zero> | ProfSimm: i know nothing about it |
| 17:31:49 | × | juhp quits (~juhp@128.106.188.82) (Read error: Connection reset by peer) |
| 17:32:09 | <zero> | not by name at least |
| 17:32:22 | <ProfSimm> | zero, basically you can take a signal and decompose it to frequencies, each a sine wave with different amplitude |
| 17:32:31 | <zero> | ah yes |
| 17:32:35 | → | unit73e joins (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
| 17:32:46 | <dsal> | ProfSimm: Yeah, I don't think that concept exists directly. I'm thinking about coerce, which looks like this: https://hackage.haskell.org/package/base-4.16.0.0/docs/Data-Coerce.html -- type role allows us to say that given a `Map k v` the `v` can be coerced without changing meaning, but the `k` cannot. |
| 17:32:52 | <ProfSimm> | zero, do the same in 2D you get circles. You can use this analysis to draw homer simply by connecting rotating circle of various size and speed |
| 17:33:17 | <shapr> | o hi ProfSimm, how's code? |
| 17:33:20 | <ProfSimm> | zero: https://www.youtube.com/watch?v=QVuU2YCwHjw |
| 17:33:34 | <zero> | ProfSimm: yes, i get that. how does it relate to my questin? |
| 17:33:41 | <ProfSimm> | shapr, I'm in a very odd place dude. I'm gonna need a quantum computer to implement some features :-) |
| 17:34:10 | <ProfSimm> | zero, well the thing I wanna achieve is not match linear functions, but match result |
| 17:34:32 | <ProfSimm> | And actually "close enough" is an allowance, for some specific amount of close enough |
| 17:35:10 | <ProfSimm> | Wait, let me redefine this |
| 17:35:35 | <ProfSimm> | Imagine if Haskell trained a neural network on a type, and when they get close enough, it replaces the type with the neural network |
| 17:36:02 | <zero> | ProfSimm: ah, i was confused. i entered the channel just now to ask my question, have no idea of what you were talking about ;) |
| 17:37:39 | <ProfSimm> | Oh OK |
| 17:38:58 | <dsal> | ProfSimm: It's not clear to me what it means to change a type along the way. It sounds like you're describing a sum type at some point with some kind of ability to coerce that I don't think you're going to get for free. |
| 17:40:25 | <geekosaur> | zero, I think you would need more than linearity to pattern match a function |
| 17:41:03 | <geekosaur> | try figuring out what this would look like |
| 17:43:44 | → | pfurla joins (~pfurla@2804:14d:5c81:4104:d41b:9326:c4d8:9f2a) |
| 17:45:59 | × | ouroboros_ quits (~ouroboros@2804:14c:65e4:93f6::1001) (Quit: Konversation terminated!) |
| 17:51:02 | × | deadmarshal quits (~deadmarsh@95.38.119.180) (Ping timeout: 240 seconds) |
| 17:53:43 | → | econo joins (uid147250@user/econo) |
| 17:54:11 | <hololeap> | @hackage validated-literals -- timCF_ |
| 17:54:11 | <lambdabot> | https://hackage.haskell.org/package/validated-literals -- timCF_ |
| 17:54:22 | <hololeap> | this uses TH, but it might be useful for you |
| 17:57:19 | <awpr> | oh I missed that question -- check out https://hackage.haskell.org/package/dependent-literals-plugin |
| 17:59:26 | <awpr> | it's a bit heavyweight just to rule out zero without calling a smart constructor, but I guess it could be worth it if you have code with tons of PosRat literals that would be overwhelmed with noise otherwise |
| 18:00:01 | <timCF_> | thanks! |
| 18:01:25 | × | fabfianda quits (~fabfianda@mob-5-90-247-119.net.vodafone.it) (Ping timeout: 256 seconds) |
| 18:01:25 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b4a8:9431:5c1:c0e0) (Remote host closed the connection) |
| 18:01:58 | → | fabfianda joins (~fabfianda@net-2-32-17-50.cust.vodafonedsl.it) |
| 18:06:53 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b4a8:9431:5c1:c0e0) |
| 18:12:36 | → | lavaman joins (~lavaman@98.38.249.169) |
| 18:12:51 | × | tired quits (~tired@user/tired) (Quit: /) |
| 18:13:22 | → | renzhi joins (~xp@2607:fa49:6500:b100::6e7f) |
| 18:13:22 | × | fabfianda quits (~fabfianda@net-2-32-17-50.cust.vodafonedsl.it) (Quit: Quit) |
| 18:14:23 | → | tired joins (~tired@user/tired) |
| 18:15:35 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 18:17:24 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds) |
| 18:22:44 | × | pfurla quits (~pfurla@2804:14d:5c81:4104:d41b:9326:c4d8:9f2a) (Quit: gone to sleep. ZZZzzz…) |
| 18:24:08 | → | deadmarshal joins (~deadmarsh@95.38.119.180) |
| 18:25:51 | × | euouae quits (~euouae@user/euouae) (Quit: ) |
| 18:26:36 | → | pfurla joins (~pfurla@2804:14d:5c81:4104:d41b:9326:c4d8:9f2a) |
| 18:27:51 | × | dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
| 18:29:45 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 18:35:51 | × | chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
| 18:36:05 | → | chexum joins (~quassel@gateway/tor-sasl/chexum) |
| 18:36:26 | × | rusty quits (~rustyboy@82.77.237.221) (Ping timeout: 260 seconds) |
| 18:43:13 | × | Everything quits (~Everythin@37.115.210.35) (Quit: leaving) |
| 18:44:31 | → | lavaman joins (~lavaman@98.38.249.169) |
| 18:45:47 | × | mimmy quits (~mimmy@cpef81d0f857c83-cmf81d0f857c80.cpe.net.cable.rogers.com) (Ping timeout: 268 seconds) |
| 18:45:54 | → | aliosablack joins (~chomwitt@2a02:587:dc2d:ec00:12c3:7bff:fe6d:d374) |
| 18:46:23 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 18:47:22 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 18:48:51 | × | chomwitt quits (~chomwitt@ppp-94-67-202-36.home.otenet.gr) (Ping timeout: 268 seconds) |
| 18:49:02 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 260 seconds) |
| 18:51:51 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
| 18:53:42 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 276 seconds) |
| 18:55:02 | × | aliosablack quits (~chomwitt@2a02:587:dc2d:ec00:12c3:7bff:fe6d:d374) (Ping timeout: 268 seconds) |
| 18:55:42 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 18:56:32 | × | myme quits (~myme@40.51-175-185.customer.lyse.net) (Ping timeout: 240 seconds) |
| 18:57:19 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 18:57:21 | × | deadmarshal quits (~deadmarsh@95.38.119.180) (Quit: ZNC 1.8.2 - https://znc.in) |
| 18:57:48 | → | deadmarshal joins (~deadmarsh@95.38.119.180) |
| 18:58:51 | → | myme joins (~myme@40.51-175-185.customer.lyse.net) |
| 19:01:12 | × | max22- quits (~maxime@2a01cb08833598001ac225a432e05a7f.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds) |
| 19:06:39 | × | pfurla quits (~pfurla@2804:14d:5c81:4104:d41b:9326:c4d8:9f2a) (Quit: gone to sleep. ZZZzzz…) |
| 19:06:50 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 19:09:45 | → | mimmy joins (~mimmy@2607:fea8:6e0:7f90:2048:33e6:3182:81c2) |
| 19:10:35 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 264 seconds) |
| 19:12:07 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 19:12:19 | → | Guest17 joins (~Guest17@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 19:12:40 | × | machinedgod quits (~machinedg@24.105.81.50) (Remote host closed the connection) |
| 19:14:32 | × | mimmy quits (~mimmy@2607:fea8:6e0:7f90:2048:33e6:3182:81c2) (Ping timeout: 240 seconds) |
| 19:17:11 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 264 seconds) |
| 19:20:32 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 19:23:03 | <sm> | g'day all |
| 19:24:11 | → | coolnickname joins (~omg@user/coolnickname) |
| 19:24:18 | <sm> | so.. for haskell code, 2-space indent, or 4 ? |
| 19:24:58 | <geekosaur> | I use 2 fwiw |
| 19:25:06 | <sm> | I use 2, but I'm getting the feeling 4 might be smoother with haskell syntax |
| 19:25:15 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 19:25:42 | → | pwug joins (~pwug@user/pwug) |
| 19:25:47 | <sm> | let a=1 |
| 19:25:48 | <sm> | b=2 |
| 19:25:48 | <sm> | ... eg |
| 19:25:53 | × | deadmarshal quits (~deadmarsh@95.38.119.180) (Ping timeout: 250 seconds) |
| 19:26:07 | <EvanR> | hah |
| 19:26:48 | <awpr> | I've seen some people just put the first let-binding on a new line. but I tend to just make an exception and align let-bindings at 4 spaces, and use 2 for normal indentation |
| 19:26:53 | <geekosaur> | I wouldn't use 2 there but that's because of block indentation; I'd use 2 if I hit enter after the let |
| 19:28:27 | <EvanR> | if I need recursive definitions I try hard to use where not let |
| 19:29:10 | <EvanR> | if I need a sequence of lets I do https://paste.tomsmeding.com/xHhQbPoZ |
| 19:29:14 | <EvanR> | which is rare |
| 19:30:17 | <EvanR> | basically, over 1 level of indentation and I feel like I did something wrong |
| 19:30:37 | <EvanR> | (which sm's let has) |
| 19:32:05 | sm | was trying out floskell, which uses 4 by default |
| 19:32:41 | <monochrom> | I use a 2-4 combo. "f x = y" "<2 spaces>where" "<4 spaces>y = x+x" |
| 19:33:21 | <Hecate> | hohai |
| 19:33:27 | <Hecate> | I've done a thing: https://twitter.com/TechnoEmpress/status/1462135732680769539 |
| 19:33:27 | <maerwald> | I use whatever I feel like at the moment |
| 19:33:36 | <monochrom> | I learned it from tibbe's style guide. I think it's an ingenious design accomodating "where" which you don't find in other languages. |
| 19:33:52 | × | acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Quit: Leaving.) |
| 19:34:12 | <monochrom> | https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md |
| 19:34:21 | <sm> | thanks |
| 19:34:30 | <maerwald> | burn all style guides |
| 19:34:33 | → | max22- joins (~maxime@2a01cb0883359800a2387d5f4d01fe15.ipv6.abo.wanadoo.fr) |
| 19:34:48 | <sm> | ah yes, half-indent for `where` |
| 19:35:07 | <monochrom> | In other languages (e.g., C, shell script), I use 2 spaces. |
| 19:35:16 | → | machinedgod joins (~machinedg@24.105.81.50) |
| 19:35:18 | <sm> | that's another reason I think 4 might be smoother. Half of a 2-indent is not much |
| 19:35:39 | <maerwald> | I've worked on a 4spaces indent codebase, I remember some corner cases there too |
| 19:35:53 | <sm> | though, I tend to give `where` a full indent, and just indent the definitions more |
| 19:36:06 | × | abrantesasf quits (~abrantesa@187.36.170.211) (Remote host closed the connection) |
| 19:36:11 | <maerwald> | ah yeah... there's a corner case with `do` and indenting |
| 19:36:33 | <geekosaur> | yeh, my usual style means it's indented by 3 because of block indenting |
| 19:36:43 | <geekosaur> | unless I start it with a newline, then it's 2 |
| 19:36:47 | <sm> | (why should where bindings be indented less than let bindings, after all) |
| 19:37:35 | <monochrom> | I'm very happy that in "let x=1", the "let " length is 4, so when on the next line I have "<4 spaces>y=2" it lines up. |
| 19:38:30 | <maerwald> | here strict 4 indenting makes compilation fail: https://paste.tomsmeding.com/rLQWB31q |
| 19:38:49 | <sm> | I guess I'll start by just adopting the 4-space indent for let.. that's pretty low impact |
| 19:39:14 | <sm> | low benefit too I guess, code formatters will be confused |
| 19:39:30 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 260 seconds) |
| 19:40:15 | <EvanR> | I put the main where at the end of the line before the indented chunk, and people seem to hate it |
| 19:40:23 | <EvanR> | dunno why |
| 19:41:21 | × | Jeanne-Kamikaze quits (~Jeanne-Ka@static-198-54-131-158.cust.tzulo.com) (Quit: Leaving) |
| 19:41:23 | <maerwald> | in all the time I had to engage in styling discussions in industry... I could have written a Haskell compiler |
| 19:42:53 | → | mimmy joins (~mimmy@2607:fea8:6e0:7f90:2048:33e6:3182:81c2) |
| 19:42:57 | <monochrom> | I don't hate it, but I don't do it because " where" is like 9% of your "70-column line" quota. |
| 19:43:36 | <monochrom> | Although, I have long relaxed to 80 columns. |
| 19:44:15 | <geekosaur> | I'm up to 96 |
| 19:44:26 | <monochrom> | It's the 21st century. We use 16:9 screens, not 9:16 screens. Even 100 columns is reasonable. |
| 19:44:38 | <maerwald> | savage... what if someone reads your code on a small ssh terminal in a bunker after doomsday? |
| 19:44:41 | <geekosaur> | 70/72 died with card readers, 80 died with physical terminals :) |
| 19:45:04 | <monochrom> | dragging column limits screaming kicking into the century of the 16:9 screen. |
| 19:45:06 | <Rembane_> | OTOH, human eyes seem to have a max width that's reasonable to read |
| 19:45:45 | <maerwald> | Rembane_: there's neuroscience research that moving your eyes laterally increases happiness (I'm not kidding) :p |
| 19:45:58 | <sm> | for code, I think logical grouping by line is more important than line width |
| 19:46:13 | <sm> | we are usually skimming code, not reading every word |
| 19:46:36 | <sm> | it's fine if the last bit is cut off at times |
| 19:46:51 | <Rembane_> | maerwald: Nice! Now we need some creative surgery so we can rotate the eyes inside the skull :D |
| 19:46:53 | → | acidjnk_new joins (~acidjnk@2001:16b8:67ca:f700:252c:a817:9d7d:a6ca) |
| 19:46:59 | <Rembane_> | maerwald: Eyes go: "WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE!!!" |
| 19:47:11 | <monochrom> | Oh well, I guess 30 years later people read code on TikTok, they will be back at 40 columns again (remember those? >:) ) |
| 19:47:22 | <EvanR> | if you aren't coding in style, what's the point |
| 19:47:28 | <EvanR> | :sunglasses: |
| 19:47:29 | <maerwald> | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6596227/ |
| 19:47:51 | <sm> | but for text, speaking of short lines readability.. I really like the newspaper-style layout of https://scroll.pub |
| 19:47:59 | × | mimmy quits (~mimmy@2607:fea8:6e0:7f90:2048:33e6:3182:81c2) (Ping timeout: 250 seconds) |
| 19:48:02 | <geekosaur> | after the great emp pulse we won't be reading code at all :þ |
| 19:48:25 | <sm> | geekosaur: :-/ |
| 19:48:28 | <monochrom> | Actually I hate those double-column layouts. |
| 19:48:56 | <monochrom> | Well OK, I'm fine with in on physical paper. But on a 16:9 screen?! |
| 19:49:42 | <geekosaur> | I use a 2-column layout. two separate editor windows, usually on different files |
| 19:49:43 | <maerwald> | Rembane_: people usually get really confused if you bring scientific research into the style discussion... I mean if you're nitpicking on irrelevant stuff, do it all the way! |
| 19:50:12 | <Rembane_> | maerwald: Sure thing! Eventually we need to go to the sources. |
| 19:50:27 | <monochrom> | OK, I'm fine with it on a 16:9 screen if each column fits within the verticle screen length. |
| 19:50:36 | <monochrom> | Clearly, academic paper |
| 19:51:00 | <monochrom> | Clearly, neither academic paper PDFs nor scroll.pub satisfies that. |
| 19:51:29 | <sm> | monochrom: scroll.pub doesn't do that (it fits the width, and extends downward). But that (fitting the height, and extending sideways) would also be nice to try. |
| 19:52:05 | <maerwald> | Rembane_: also, really good argument for spaces: https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/ |
| 19:52:06 | <sm> | even as it is now, I found it pretty refreshing and efficient for reading a faq |
| 19:52:20 | <Rembane_> | maerwald: I dig that! |
| 19:52:51 | <maerwald> | and apparently, haskell is wrong with using camelCase: https://ieeexplore.ieee.org/document/5521745 |
| 19:53:00 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 19:53:18 | <monochrom> | Therefore, when a sentence is split between 2 columns, it is also separated by like a metre. |
| 19:53:39 | <monochrom> | a metre of scrolling |
| 19:53:51 | <sm> | it gets worse the more content you put on one page, yes |
| 19:53:53 | <monochrom> | How would any human consider it ergonomic, I don't know. |
| 19:54:30 | <sm> | but newspapers work like that too, and we manage |
| 19:54:58 | <monochrom> | scroll.pub itself shows an ample example of doing it wrong. |
| 19:55:14 | <monochrom> | newspapers are on physical paper, as said. you just fly your eyes. |
| 19:55:45 | <geekosaur> | newspapers also have "above/below the fold" |
| 19:55:53 | <monochrom> | Where as on scroll.pub, consider the section "How do I check browser performance?" |
| 19:56:05 | <monochrom> | You have an opening sentence. |
| 19:56:21 | <monochrom> | And then, what, the sample code requires scrolling all the way back to the top. |
| 19:56:36 | <monochrom> | Remember cathoy ray tubes? |
| 19:57:14 | <monochrom> | Remember its electron beam goes horizontally normally, but it has to quickly fly back to the left for the next line. |
| 19:57:34 | <monochrom> | I feel like 2-column layout fanatics want me to do the same manually vertically. |
| 19:57:52 | <monochrom> | I feel like they are maschosists. |
| 19:58:03 | <monochrom> | "Hahaha let's torture the readers thus!" |
| 19:58:09 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
| 19:58:36 | <hololeap> | I indent using random fibonacci numbers |
| 19:58:38 | <monochrom> | If you have 5 lines of code to post. |
| 19:58:46 | <awpr> | once per page, though. if I see lines the full width of my monitor, I have no chance of moving my eyes correctly back to the start of the next line |
| 19:59:03 | <awpr> | with a newspaper column width line, it's almost 100% reliably accurate |
| 19:59:20 | <monochrom> | They're like "let's put 3 of those lines at the far bottom, let's put the other 2 lines at the far top, so that people cannot use copy-paste". |
| 19:59:25 | <hololeap> | just for that e e cummings vibe |
| 19:59:59 | <maerwald> | but the realy question is: do you align vertically?! |
| 20:01:55 | <monochrom> | It breaks all kinds of proximity, locality principles. |
| 20:02:20 | → | myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net) |
| 20:02:24 | <EvanR> | quantum style |
| 20:02:50 | <EvanR> | my C code is entangled |
| 20:03:14 | <maerwald> | I have seen suggestions like this: https://paste.tomsmeding.com/TV7JCPRb |
| 20:03:30 | <maerwald> | so you can see relations of identifiers |
| 20:03:33 | <EvanR> | :horror: |
| 20:04:20 | <maerwald> | I mean... in maths you sometimes do that |
| 20:06:03 | <monochrom> | You know, it works when your function can be linearly typed. Clearly, in retrospect. |
| 20:06:32 | <monochrom> | If your x needs to be mentioned at 100 places, good luck with that. |
| 20:06:48 | → | juhp joins (~juhp@128.106.188.82) |
| 20:08:42 | × | abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 20:09:38 | × | ees quits (~user@pool-108-18-30-46.washdc.fios.verizon.net) (Ping timeout: 268 seconds) |
| 20:09:50 | → | ees joins (~user@pool-108-18-30-46.washdc.fios.verizon.net) |
| 20:10:16 | → | hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) |
| 20:11:02 | × | finsternis quits (~X@23.226.237.192) (Ping timeout: 240 seconds) |
| 20:11:47 | → | finsternis joins (~X@23.226.237.192) |
| 20:19:57 | → | mimmy joins (~mimmy@2607:fea8:6e0:7f90:2048:33e6:3182:81c2) |
| 20:20:53 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 265 seconds) |
| 20:24:45 | × | mimmy quits (~mimmy@2607:fea8:6e0:7f90:2048:33e6:3182:81c2) (Ping timeout: 265 seconds) |
| 20:25:09 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
| 20:29:40 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 20:30:54 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 20:31:07 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
| 20:36:32 | × | forell quits (~forell@user/forell) (Quit: ZNC - https://znc.in) |
| 20:37:49 | → | forell joins (~forell@user/forell) |
| 20:39:18 | × | mikoto-chan quits (~mikoto-ch@esm-84-240-99-143.netplaza.fi) (Quit: mikoto-chan) |
| 20:42:59 | → | mimmy joins (~mimmy@2607:fea8:6e0:7f90:11f0:11ab:7004:939b) |
| 20:46:14 | → | yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) |
| 20:50:32 | × | yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
| 20:56:40 | → | deadmarshal joins (~deadmarsh@95.38.119.180) |
| 20:56:54 | → | jinsun__ joins (~quassel@user/jinsun) |
| 20:58:20 | × | oxide quits (~lambda@user/oxide) (Quit: oxide) |
| 20:58:32 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 20:59:02 | × | ProfSimm quits (~ProfSimm@87.227.196.109) (Ping timeout: 240 seconds) |
| 21:00:23 | × | jinsun quits (~quassel@user/jinsun) (Ping timeout: 264 seconds) |
| 21:01:03 | × | deadmarshal quits (~deadmarsh@95.38.119.180) (Ping timeout: 256 seconds) |
| 21:01:29 | × | serg quits (~a@p200300ef97155109502293e1a26d2ca1.dip0.t-ipconnect.de) (Ping timeout: 265 seconds) |
| 21:06:44 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 21:08:32 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b4a8:9431:5c1:c0e0) (Remote host closed the connection) |
| 21:08:48 | → | dhil joins (~dhil@cpc103052-sgyl39-2-0-cust260.18-2.cable.virginm.net) |
| 21:08:50 | × | mimmy quits (~mimmy@2607:fea8:6e0:7f90:11f0:11ab:7004:939b) (Ping timeout: 268 seconds) |
| 21:09:04 | → | jbox joins (~jbox@user/jbox) |
| 21:10:20 | × | timCF_ quits (~timCF@m91-129-99-212.cust.tele2.ee) (Quit: leaving) |
| 21:12:59 | → | abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) |
| 21:13:46 | → | alzgh joins (~alzgh@user/alzgh) |
| 21:14:21 | × | hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Remote host closed the connection) |
| 21:17:04 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 21:20:08 | → | pavonia joins (~user@user/siracusa) |
| 21:30:38 | → | lavaman joins (~lavaman@98.38.249.169) |
| 21:32:54 | × | mei quits (~mei@user/mei) (Ping timeout: 260 seconds) |
| 21:35:57 | × | burnsidesLlama quits (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Remote host closed the connection) |
| 21:38:39 | × | hiruji quits (~hiruji@user/hiruji) (Read error: Connection reset by peer) |
| 21:43:12 | × | kuribas quits (~user@ptr-25vy0i85dt12hx5mopu.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 21:43:31 | → | ubert joins (~Thunderbi@p548c9fcb.dip0.t-ipconnect.de) |
| 21:49:19 | × | sagax quits (~sagax_nb@user/sagax) (Ping timeout: 250 seconds) |
| 21:51:03 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
| 21:52:01 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 21:53:17 | ← | ees parts (~user@pool-108-18-30-46.washdc.fios.verizon.net) (ERC 5.4 (IRC client for GNU Emacs 28.0.60)) |
| 21:53:42 | → | ees joins (~user@pool-108-18-30-46.washdc.fios.verizon.net) |
| 21:54:45 | × | myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Read error: Connection reset by peer) |
| 21:55:03 | → | myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net) |
| 21:55:43 | → | rusty joins (~rustyboy@82.77.237.221) |
| 21:58:00 | × | Guest17 quits (~Guest17@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: Client closed) |
| 22:02:51 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 276 seconds) |
| 22:08:55 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b4a8:9431:5c1:c0e0) |
| 22:09:55 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 22:11:47 | × | rusty quits (~rustyboy@82.77.237.221) (Quit: Leaving) |
| 22:13:20 | → | burnsidesLlama joins (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
| 22:13:35 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b4a8:9431:5c1:c0e0) (Ping timeout: 264 seconds) |
| 22:14:51 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
| 22:15:15 | → | hiruji joins (~hiruji@user/hiruji) |
| 22:15:15 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 22:15:28 | × | hiruji quits (~hiruji@user/hiruji) (Remote host closed the connection) |
| 22:15:46 | → | hiruji joins (~hiruji@user/hiruji) |
| 22:16:14 | × | waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 260 seconds) |
| 22:17:58 | → | waleee joins (~waleee@h-82-196-111-63.NA.cust.bahnhof.se) |
| 22:18:49 | × | burnsidesLlama quits (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Ping timeout: 265 seconds) |
| 22:20:23 | × | hiruji quits (~hiruji@user/hiruji) (Ping timeout: 256 seconds) |
| 22:20:38 | → | hiruji joins (~hiruji@user/hiruji) |
| 22:22:35 | × | myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 264 seconds) |
| 22:22:43 | jinsun__ | is now known as jinsun |
| 22:24:03 | × | zer0bitz quits (~zer0bitz@dsl-hkibng31-54fabc-15.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 22:26:54 | → | mikoto-chan joins (~mikoto-ch@esm-84-240-99-143.netplaza.fi) |
| 22:29:42 | → | burnsidesLlama joins (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
| 22:34:33 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds) |
| 22:35:05 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 22:35:44 | → | mimmy joins (~mimmy@2607:fea8:6e0:7f90:d960:c213:7b57:d73e) |
| 22:35:48 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:b4a8:9431:5c1:c0e0) |
| 22:37:46 | → | notzmv joins (~zmv@user/notzmv) |
| 22:40:58 | × | mimmy quits (~mimmy@2607:fea8:6e0:7f90:d960:c213:7b57:d73e) (Ping timeout: 260 seconds) |
| 22:44:18 | × | __monty__ quits (~toonn@user/toonn) (Quit: leaving) |
| 22:45:52 | × | gg quits (~gg@88.160.100.84) (Read error: Connection reset by peer) |
| 22:49:07 | × | acidjnk_new quits (~acidjnk@2001:16b8:67ca:f700:252c:a817:9d7d:a6ca) (Ping timeout: 250 seconds) |
| 22:49:56 | × | mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
| 22:50:22 | → | yauhsien joins (~yauhsien@118-167-40-224.dynamic-ip.hinet.net) |
| 22:51:24 | × | dhil quits (~dhil@cpc103052-sgyl39-2-0-cust260.18-2.cable.virginm.net) (Remote host closed the connection) |
| 22:55:26 | × | yauhsien quits (~yauhsien@118-167-40-224.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
| 22:58:35 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 23:05:40 | → | Alleria joins (~textual@user/alleria) |
| 23:07:14 | × | CannabisIndica quits (~herb@user/mesaboogie) (Ping timeout: 268 seconds) |
| 23:07:33 | → | Codaraxis_ joins (~Codaraxis@user/codaraxis) |
| 23:08:08 | → | myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net) |
| 23:09:57 | → | CannabisIndica joins (~herb@user/mesaboogie) |
| 23:11:33 | × | Codaraxis__ quits (~Codaraxis@user/codaraxis) (Ping timeout: 268 seconds) |
| 23:16:23 | × | Successus quits (~Successus@gateway/tor-sasl/successus) () |
| 23:17:34 | → | zincy_ joins (~zincy@2a00:23c8:970c:4801:78f3:43f3:fd48:5ac3) |
| 23:20:09 | → | timCF_ joins (~timCF@m91-129-99-212.cust.tele2.ee) |
| 23:21:15 | → | fernand joins (~fernand@179.156.35.4) |
| 23:24:02 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:b4a8:9431:5c1:c0e0) (Remote host closed the connection) |
| 23:27:31 | → | jmorris joins (uid433911@hampstead.irccloud.com) |
| 23:27:40 | → | Codaraxis joins (~Codaraxis@user/codaraxis) |
| 23:27:52 | → | vysn joins (~vysn@user/vysn) |
| 23:27:56 | × | unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Quit: Leaving) |
| 23:28:34 | → | AlexNoo_ joins (~AlexNoo@94.233.241.104) |
| 23:28:59 | × | machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 250 seconds) |
| 23:30:03 | × | Codaraxis_ quits (~Codaraxis@user/codaraxis) (Ping timeout: 268 seconds) |
| 23:30:41 | → | mimmy joins (~mimmy@cpef81d0f857c83-cmf81d0f857c80.cpe.net.cable.rogers.com) |
| 23:31:09 | × | AlexZenon quits (~alzenon@178.34.161.211) (Ping timeout: 265 seconds) |
| 23:31:17 | × | Alex_test quits (~al_test@178.34.161.211) (Ping timeout: 268 seconds) |
| 23:32:07 | × | AlexNoo quits (~AlexNoo@178.34.161.211) (Ping timeout: 265 seconds) |
| 23:34:02 | × | cosimone quits (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Ping timeout: 240 seconds) |
| 23:34:37 | → | kayvank joins (~soostone@52-119-115-185.PUBLIC.monkeybrains.net) |
| 23:35:45 | × | mimmy quits (~mimmy@cpef81d0f857c83-cmf81d0f857c80.cpe.net.cable.rogers.com) (Ping timeout: 256 seconds) |
| 23:36:22 | → | Alex_test joins (~al_test@94.233.241.104) |
| 23:36:28 | → | AlexZenon joins (~alzenon@94.233.241.104) |
| 23:37:01 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 23:37:15 | × | max22- quits (~maxime@2a01cb0883359800a2387d5f4d01fe15.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
| 23:39:14 | × | hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection) |
| 23:40:00 | <timCF_> | Is there the way to unlift somehow name of the type (just normal kind *) from type level (in case of usage from generic function) to value level (for example a String)? |
| 23:41:01 | <geekosaur> | not entirely sure what you're talking about |
| 23:41:14 | <geekosaur> | types don't exist at runtime so their names normally aren't known |
| 23:42:07 | <geekosaur> | there is Data.Typeable which carries type information in a dictionary at runtime, but (a) it won't work for polymorphic types (b) you need to carry it around in your types |
| 23:42:07 | <timCF_> | Something like `showType :: forall a. a -> String` |
| 23:42:34 | <EvanR> | that type doesn't have enough information to work |
| 23:42:36 | <geekosaur> | :t typeOf |
| 23:42:38 | <lambdabot> | Typeable a => a -> TypeRep |
| 23:42:42 | <awpr> | > show (typeRep (Proxy @Int)) |
| 23:42:43 | <lambdabot> | <hint>:1:22: error: parse error on input ‘@’ |
| 23:42:46 | <EvanR> | :t show . typeOf |
| 23:42:47 | <lambdabot> | Typeable a => a -> String |
| 23:43:06 | <timCF_> | Exactly what I wanted |
| 23:43:11 | <timCF_> | Thanks! |
| 23:43:44 | <EvanR> | interested to see how you end up with an unknown type at runtime xD |
| 23:44:35 | <timCF_> | hmmm |
| 23:44:50 | <geekosaur> | betting it's polymorphic, in which case as I said this won't work |
| 23:45:02 | <timCF_> | actually why I do even need a value of "a"? |
| 23:45:06 | <geekosaur> | you can't find out the actual type it was called at |
| 23:45:33 | <timCF_> | why just not `showType :: forall a. String` |
| 23:45:35 | <awpr> | you don't need a value; there's a Proxy version, or `undefined` will work |
| 23:45:59 | <awpr> | `base` tends to avoid using ambiguous types that need TypeApplications to work |
| 23:46:03 | <timCF_> | and then `showType @a` from some generic function |
| 23:46:11 | <timCF_> | aa |
| 23:46:14 | <geekosaur> | also Typeable predates Proxy and TypeApplications |
| 23:46:24 | <EvanR> | forall a . String is a constant |
| 23:46:41 | <timCF_> | it's kinda a function on types |
| 23:46:42 | × | myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 268 seconds) |
| 23:46:50 | <awpr> | you can write that API, though: `showType :: forall a. Typeable a => String` `showType = show (typeRep @a Proxy)` |
| 23:46:52 | <timCF_> | but on value level it's a constant |
| 23:46:54 | <EvanR> | your're mixing levels now |
| 23:47:01 | × | Jing quits (~hedgehog@2604:a840:3::1094) (Remote host closed the connection) |
| 23:47:34 | → | Jing joins (~hedgehog@2604:a840:3::1094) |
| 23:47:43 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 23:47:56 | <awpr> | type parameters don't exist at runtime (at least until `foreach` from distant-future dependent haskell becomes a thing), so there needs to be something passed in to identify the type at runtime if it's going to be something other than a constant (in this case, a `Typeable` instance) |
| 23:49:17 | × | kayvank quits (~soostone@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection) |
| 23:56:13 | <timCF_> | Yeah, typeRep works perfectly with Proxy type. Cool stuff! |
All times are in UTC on 2021-11-20.