2022-05-09 00:00:08 +0200 | pavonia | (~user@user/siracusa) |
2022-05-09 00:02:04 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-05-09 00:02:39 +0200 | jgeerds | (~jgeerds@d53604b0.access.ecotel.net) (Ping timeout: 240 seconds) |
2022-05-09 00:07:25 +0200 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
2022-05-09 00:09:02 +0200 | xff0x | (~xff0x@om126033119107.35.openmobile.ne.jp) |
2022-05-09 00:09:02 +0200 | king_gs | (~Thunderbi@187.201.105.54) (Read error: Connection reset by peer) |
2022-05-09 00:10:19 +0200 | king_gs | (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) |
2022-05-09 00:11:36 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Remote host closed the connection) |
2022-05-09 00:20:03 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) |
2022-05-09 00:20:03 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
2022-05-09 00:20:03 +0200 | wroathe | (~wroathe@user/wroathe) |
2022-05-09 00:22:25 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 00:23:27 +0200 | acidjnk | (~acidjnk@p200300d0c7068b132c0a169992321cdc.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
2022-05-09 00:27:50 +0200 | king_gs | (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) (Ping timeout: 250 seconds) |
2022-05-09 00:30:35 +0200 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |
2022-05-09 00:35:01 +0200 | MoC | (~moc@user/moc) (Quit: Konversation terminated!) |
2022-05-09 00:36:52 +0200 | littlebo1eep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 00:38:04 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 00:41:48 +0200 | Tuplanolla | (~Tuplanoll@91-159-68-39.elisa-laajakaista.fi) (Quit: Leaving.) |
2022-05-09 00:42:25 +0200 | melas | (~melas@172.77.31.247) (Ping timeout: 256 seconds) |
2022-05-09 00:42:41 +0200 | romesrf | (~romes@185.5.8.134) (Quit: WeeChat 3.4.1) |
2022-05-09 00:45:42 +0200 | whatsupdoc | (uid509081@id-509081.hampstead.irccloud.com) |
2022-05-09 00:47:05 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2022-05-09 00:49:30 +0200 | king_gs | (~Thunderbi@187.201.105.54) |
2022-05-09 00:49:59 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2022-05-09 00:56:01 +0200 | zeenk | (~zeenk@2a02:2f04:a004:9b00:1efc:c1cf:378d:8b3d) (Quit: Konversation terminated!) |
2022-05-09 00:56:45 +0200 | <ski> | > sortBy (compare <> comparing length) (words "The quick brown fox jumps over the lazy dog") |
2022-05-09 00:56:47 +0200 | <lambdabot> | ["The","brown","dog","fox","jumps","lazy","over","quick","the"] |
2022-05-09 00:56:53 +0200 | <ski> | @where monoids |
2022-05-09 00:56:54 +0200 | <lambdabot> | comment on "Monoids? In my programming language?" by Cale in 2008 (or 2009 ?) at <http://www.reddit.com/r/programming/comments/7cf4r/monoids_in_my_programming_language/c06adnx> about a use of ` |
2022-05-09 00:56:54 +0200 | <lambdabot> | instance Monoid a => Monoid (rho -> a)' |
2022-05-09 00:57:01 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 246 seconds) |
2022-05-09 00:57:04 +0200 | littlebo1eep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 00:57:49 +0200 | <ski> | well, sorry, actually |
2022-05-09 00:57:56 +0200 | <ski> | > sortBy (comparing length <> compare) (words "The quick brown fox jumps over the lazy dog") |
2022-05-09 00:57:58 +0200 | <lambdabot> | ["The","dog","fox","the","lazy","over","brown","jumps","quick"] |
2022-05-09 00:58:32 +0200 | <ski> | energizer : ^ that's what dsal was alluding to. sorting primarily by length, and secondarily by the ordinary lexicographic ordering (among words that have the same length) |
2022-05-09 01:03:20 +0200 | machinedgod | (~machinedg@24.105.81.50) |
2022-05-09 01:06:44 +0200 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 248 seconds) |
2022-05-09 01:07:29 +0200 | <energizer> | ✓ |
2022-05-09 01:07:45 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-05-09 01:09:38 +0200 | king_gs | (~Thunderbi@187.201.105.54) (Read error: Connection reset by peer) |
2022-05-09 01:09:50 +0200 | Kaipei | (~Kaiepi@156.34.47.253) |
2022-05-09 01:10:03 +0200 | king_gs | (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) |
2022-05-09 01:10:45 +0200 | Kaiepi | (~Kaiepi@156.34.47.253) (Ping timeout: 256 seconds) |
2022-05-09 01:11:43 +0200 | <dminuoso> | Mmm, is there any ligtweight json library around that doesnt pull what feels like half of hackage along with it? |
2022-05-09 01:11:55 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 01:14:37 +0200 | CiaoSen | (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
2022-05-09 01:15:02 +0200 | melas | (~melas@172.77.31.247) |
2022-05-09 01:16:25 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
2022-05-09 01:16:55 +0200 | <energizer> | in some language there is a memory buffer where i can store `xs = [1,2,3]` and then reuse that buffer for the value of `ys = map double xs` if i'm not going to reuse `xs`. is there a way to specify that i want to reuse the storage area of xs in haskell? |
2022-05-09 01:17:44 +0200 | <dminuoso> | energizer: You have to do memory access yourself. |
2022-05-09 01:17:50 +0200 | <dminuoso> | Sadly we dont have this built into Haskell. |
2022-05-09 01:18:00 +0200 | <energizer> | are there idioms for it? |
2022-05-09 01:18:09 +0200 | <dminuoso> | Clean has this, they do automatic mutation in such cases. |
2022-05-09 01:18:29 +0200 | <dminuoso> | (And from what I hear, that alone makes them competive over the well attended GHC in a select few benchmarcks) |
2022-05-09 01:18:56 +0200 | <dminuoso> | energizer: it depends a lot on what your access pattern is |
2022-05-09 01:19:11 +0200 | <dminuoso> | But you can start looking at Data.Vector.Mutable |
2022-05-09 01:26:37 +0200 | alp_ | (~alp@user/alp) |
2022-05-09 01:27:36 +0200 | <melas> | Forgive me, as I'm brand new to all this, but would you consider it relatively easy to create a standalone windows program that can do basic network tests like ping / traceroute, etc. and save the to a log file? I guess my question is are the classes for this type of this typically up to date in Haskell ecosystem? |
2022-05-09 01:27:50 +0200 | <dminuoso> | Regarding json, I think I have something https://hackage.haskell.org/package/JSONb |
2022-05-09 01:27:57 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 276 seconds) |
2022-05-09 01:28:16 +0200 | <melas> | Just trying to come up with a first program to code once I learn all the basics |
2022-05-09 01:28:17 +0200 | <dminuoso> | It's not been maintained for a while, but its very minimalistic and doesnt pull in 80 packages behind it. |
2022-05-09 01:37:27 +0200 | <geekosaur> | melas, that might be difficult in any language. ICMP typically requires privileged access because you're working with raw IP packets |
2022-05-09 01:37:48 +0200 | <geekosaur> | traceroute, at least for IPv4, is simpler though |
2022-05-09 01:40:37 +0200 | <geekosaur> | (you can do bad things to a network by sending control packets on it, which is the primary purpose of ICMP) |
2022-05-09 01:41:05 +0200 | <sclv> | dminuoso: if you don't mind the performance, https://hackage.haskell.org/package/json |
2022-05-09 01:42:46 +0200 | <melas> | @diminuoso why would privileged access make it difficult? |
2022-05-09 01:42:46 +0200 | <lambdabot> | Unknown command, try @list |
2022-05-09 01:42:56 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2022-05-09 01:44:43 +0200 | <dminuoso> | sclv: Ah, how did I not find this. Yes, this would work nicely. A bit sad this uses String instead of Text for JSString, but oh well. |
2022-05-09 01:44:51 +0200 | <dminuoso> | Thanks, I think I will use this. |
2022-05-09 01:44:59 +0200 | <hpc> | huh? icmp doesn't require privileges |
2022-05-09 01:45:19 +0200 | <hpc> | traceroute only requires root for tcp/udp because there's not otherwise a way to set the ttl |
2022-05-09 01:45:33 +0200 | harveypwca | (~harveypwc@2601:246:c180:a570:3828:d8:e523:3f67) (Quit: Leaving) |
2022-05-09 01:45:38 +0200 | <sclv> | dminuoso: its the old galois library. i believe it actually _predates text_ by one year! |
2022-05-09 01:46:26 +0200 | <hpc> | oh, on windows |
2022-05-09 01:47:06 +0200 | <geekosaur> | maybe they changed things. in the bad old days you needed a raw IP socket |
2022-05-09 01:47:16 +0200 | <dminuoso> | hpc, geekosaur: /run/wrappers/bin/ping cap_setpcap,cap_net_raw=p |
2022-05-09 01:47:29 +0200 | <geekosaur> | right, that's privileged |
2022-05-09 01:47:44 +0200 | <hpc> | melas: if you want networkish stuff to try, something like a web server or client would be better |
2022-05-09 01:48:00 +0200 | <hpc> | s/web/whatever protocol fits your fancy/ |
2022-05-09 01:49:36 +0200 | <geekosaur> | oh, and even if you have some way to limit to ICMP ECHO {REQUEST,REPLY} you can typically take out a network by sending >100/s |
2022-05-09 01:49:56 +0200 | <dminuoso> | melas: I dont see a reason why you couldn't. Things like permission problems affect all other languages, and in case of ICMP echo requests its easily addressed by setting CAP_NET_RAW and cap_setpcap |
2022-05-09 01:50:10 +0200 | <geekosaur> | this is windows so the perms probably differ |
2022-05-09 01:50:27 +0200 | <geekosaur> | windows has a more expressive permissions system though |
2022-05-09 01:50:48 +0200 | dminuoso | is not sure how you would take out a network this way |
2022-05-09 01:50:56 +0200 | <geekosaur> | (also hopefully they don't use raw IP sockets, they're a pain) |
2022-05-09 01:51:18 +0200 | <geekosaur> | send them through a router. it prioritizes ICMP usually so it won't pass anything else |
2022-05-09 01:51:45 +0200 | <melas> | Hmm. Ok cool, thanks. I'm a long way from that anyway. Really just feeling things out. My end goal actually is to mess with stuff like Euterpea and/or tidalcycles |
2022-05-09 01:51:47 +0200 | <dminuoso> | Sure, cheap plastic home routers might be taken down like this. |
2022-05-09 01:51:50 +0200 | <geekosaur> | you could still use the network locally but you will have isolated it |
2022-05-09 01:53:41 +0200 | <dminuoso> | But a hundred ICMP per second will not take down a local network. Typical home routers can usually route upwards of a million pps, full line rate routing with 1.5mpps is not unheard of for plastic routers |
2022-05-09 01:54:28 +0200 | <dminuoso> | I think a more meaningful impact is that of local control plane |
2022-05-09 01:54:40 +0200 | <dminuoso> | Specifically on the target |
2022-05-09 01:55:02 +0200 | <dminuoso> | Depending on how the networking stack works, ICMP flood can quickly cause a lot of kernel time to occur |
2022-05-09 01:56:20 +0200 | <dminuoso> | Im really not sure about linux or windows, but all our routers at work have pretty aggressive policers |
2022-05-09 01:56:46 +0200 | <dminuoso> | Which is mostly a thing to dampen potential DDoS situations |
2022-05-09 01:56:52 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 248 seconds) |
2022-05-09 02:01:28 +0200 | xff0x | (~xff0x@om126033119107.35.openmobile.ne.jp) (Read error: Connection reset by peer) |
2022-05-09 02:02:45 +0200 | chomwitt | (~chomwitt@2a02:587:dc19:d600:24ae:3716:1088:6d4d) (Ping timeout: 252 seconds) |
2022-05-09 02:03:37 +0200 | wgl | (~wgl@75-161-32-115.albq.qwest.net) (Quit: wgl) |
2022-05-09 02:04:02 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-05-09 02:12:09 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 276 seconds) |
2022-05-09 02:12:23 +0200 | xff0x | (~xff0x@om126033119107.35.openmobile.ne.jp) |
2022-05-09 02:14:15 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-05-09 02:18:36 +0200 | xff0x | (~xff0x@om126033119107.35.openmobile.ne.jp) (Read error: Connection reset by peer) |
2022-05-09 02:21:19 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 02:40:13 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-05-09 02:44:55 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
2022-05-09 02:46:31 +0200 | Guest97 | (~Guest97@2804:4d98:3001:15:fd23:41a0:a491:af36) |
2022-05-09 02:49:56 +0200 | <Axman6> | energizer: that feels like something linear types might help with, though not currently supported by the compiler |
2022-05-09 02:51:25 +0200 | <Axman6> | if you knew that xs and its contents weren't referenced by anything else, you could potentially mutate the objects when performing map f to avoid reallocation (but that would also depend on things like the object size being smaller afterwards) |
2022-05-09 02:56:22 +0200 | <ski> | that would be uniqueness types, no ? |
2022-05-09 02:57:01 +0200 | <ski> | (well, you could still update-in-place the cons cells) |
2022-05-09 02:57:34 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 02:57:45 +0200 | <dminuoso> | ski: What is the difference? |
2022-05-09 02:58:41 +0200 | <ski> | with uniqueness, you know that the reference hasn't been duplicated in the past, but you're allowed to duplicate it in the future (unless you're required to hand back a unique reference, and you can't conjure up another one) |
2022-05-09 02:58:57 +0200 | <dminuoso> | Ahh I see. |
2022-05-09 02:59:13 +0200 | <dminuoso> | So what Clean has is properly called uniqueness types then |
2022-05-09 02:59:21 +0200 | <ski> | with linearity, you are not allowed to duplicate it in the future, but it might still have been duplicated in the past (before being demoted from sharable to linear) |
2022-05-09 02:59:25 +0200 | <ski> | yes |
2022-05-09 02:59:50 +0200 | <ski> | (Mercury also has uniqueness, although it's tracked by its inst (instantiation state) system, rather than its type system) |
2022-05-09 03:01:25 +0200 | <ski> | (although, istr the linear types paper for Haskell mentioned some way of (indirectly) expressing the behaviour of uniqueness, using linearity .. by using CPS, iirc. so it might be that one could say they're dual in some sense, and perhaps (with some awkwardness perhaps) interexpressible (perhaps with some restrictions) .. not totally sure) |
2022-05-09 03:02:23 +0200 | machinedgod | (~machinedg@24.105.81.50) (Ping timeout: 256 seconds) |
2022-05-09 03:02:50 +0200 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2022-05-09 03:03:20 +0200 | ec | (~ec@gateway/tor-sasl/ec) |
2022-05-09 03:05:22 +0200 | jollygood2 | (~bc8147f2@199.204.85.195) (Quit: CGI:IRC (Session timeout)) |
2022-05-09 03:05:23 +0200 | <dolio> | Being demoted is only a problem if there's a way to have non-linear arrays. So as long as you can only create linear ones, you can use linear types for managing them. |
2022-05-09 03:06:24 +0200 | <ski> | point |
2022-05-09 03:06:35 +0200 | <dolio> | That does mean you can't just have one array type if you do want shareable arrays, though. |
2022-05-09 03:10:40 +0200 | Guest97 | (~Guest97@2804:4d98:3001:15:fd23:41a0:a491:af36) (Quit: Client closed) |
2022-05-09 03:10:46 +0200 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2022-05-09 03:11:18 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 03:12:49 +0200 | xff0x | (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) |
2022-05-09 03:13:15 +0200 | zebrag | (~chris@user/zebrag) |
2022-05-09 03:13:25 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 03:16:53 +0200 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2022-05-09 03:17:45 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 248 seconds) |
2022-05-09 03:20:10 +0200 | frost | (~frost@user/frost) |
2022-05-09 03:34:00 +0200 | jmcarthur | (~textual@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-05-09 03:34:56 +0200 | jmcarthur | (~textual@c-73-29-224-10.hsd1.nj.comcast.net) (Client Quit) |
2022-05-09 03:35:20 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-05-09 03:38:07 +0200 | <jmcarthur> | Man, it's been a while since I've hung around here |
2022-05-09 03:38:56 +0200 | <pavonia> | Welcome back |
2022-05-09 03:38:58 +0200 | <jmcarthur> | Does anybody know if there anything similar to GArrows or Conal's CCC plugin that's in a reasonably polished state? |
2022-05-09 03:39:52 +0200 | <jmcarthur> | I'm sad every time I come up with a Category-style interface because it always feels like it *could* be nice to use, but just isn't. |
2022-05-09 03:40:12 +0200 | <ski> | wb :) |
2022-05-09 03:40:51 +0200 | <jmcarthur> | :) |
2022-05-09 03:44:09 +0200 | <jmcarthur> | Basically what I want is just proc notation for "Arrow without arr", which I know everybody wants, so it's likely that if something nice existed I would already know about it, but I'm just checking because I haven't been paying as much attention to everything lately. |
2022-05-09 03:52:38 +0200 | king_gs | (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) (Quit: king_gs) |
2022-05-09 03:56:29 +0200 | srz | (~srz@179.36.123.54) |
2022-05-09 03:58:34 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 03:59:00 +0200 | andrey_ | (~andrey@p200300dbcf097700316169ecbe32078f.dip0.t-ipconnect.de) |
2022-05-09 04:00:24 +0200 | ski | hasn't, either |
2022-05-09 04:01:28 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2022-05-09 04:01:32 +0200 | gpncarl | (~gpncarl@210.12.195.5) |
2022-05-09 04:01:40 +0200 | andrey | (~andrey@p200300dbcf48ce00934437bb39b09cba.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
2022-05-09 04:01:46 +0200 | pottsy | (~pottsy@129.227.183.244) |
2022-05-09 04:03:14 +0200 | tommd | (~tommd@97-120-26-41.ptld.qwest.net) |
2022-05-09 04:03:54 +0200 | lemonsnicks | (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in) |
2022-05-09 04:04:52 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-05-09 04:06:20 +0200 | Unicorn_Princess | (~Unicorn_P@93-103-228-248.dynamic.t-2.net) (Quit: Leaving) |
2022-05-09 04:10:23 +0200 | gurkenglas | (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
2022-05-09 04:11:52 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
2022-05-09 04:11:52 +0200 | finn_elija | (~finn_elij@user/finn-elija/x-0085643) |
2022-05-09 04:11:52 +0200 | finn_elija | FinnElija |
2022-05-09 04:19:20 +0200 | lemonsnicks | (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) |
2022-05-09 04:20:08 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) |
2022-05-09 04:20:08 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
2022-05-09 04:20:08 +0200 | wroathe | (~wroathe@user/wroathe) |
2022-05-09 04:20:09 +0200 | alp_ | (~alp@user/alp) (Ping timeout: 248 seconds) |
2022-05-09 04:21:11 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2022-05-09 04:24:36 +0200 | kimjetwav | (~user@2607:fea8:2362:b400:c51a:4d23:ff59:2b8) |
2022-05-09 04:37:59 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2022-05-09 04:38:31 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-05-09 04:40:34 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 04:43:04 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Ping timeout: 250 seconds) |
2022-05-09 04:47:45 +0200 | gpncarl | (~gpncarl@210.12.195.5) (Quit: WeeChat 3.4.1) |
2022-05-09 04:51:48 +0200 | td_ | (~td@94.134.91.69) (Ping timeout: 248 seconds) |
2022-05-09 04:53:54 +0200 | td_ | (~td@94.134.91.132) |
2022-05-09 04:54:47 +0200 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 240 seconds) |
2022-05-09 04:57:02 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 04:59:16 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 248 seconds) |
2022-05-09 05:00:07 +0200 | Taneb | (~Taneb@2001:41c8:51:10d:aaaa:0:aaaa:0) (Quit: I seem to have stopped.) |
2022-05-09 05:01:13 +0200 | Taneb | (~Taneb@runciman.hacksoc.org) |
2022-05-09 05:01:50 +0200 | mixfix41 | (~sdenyninn@user/mixfix41) |
2022-05-09 05:02:12 +0200 | yauhsien_ | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 05:03:43 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
2022-05-09 05:10:37 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) |
2022-05-09 05:10:37 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
2022-05-09 05:10:37 +0200 | wroathe | (~wroathe@user/wroathe) |
2022-05-09 05:11:33 +0200 | galio | (~textual@c-174-63-73-241.hsd1.vt.comcast.net) |
2022-05-09 05:14:31 +0200 | nate1 | (~nate@98.45.169.16) |
2022-05-09 05:15:34 +0200 | galio | (~textual@c-174-63-73-241.hsd1.vt.comcast.net) (Client Quit) |
2022-05-09 05:15:56 +0200 | galio | (~textual@c-174-63-73-241.hsd1.vt.comcast.net) |
2022-05-09 05:17:54 +0200 | srz | (~srz@179.36.123.54) (Quit: Leaving) |
2022-05-09 05:20:04 +0200 | nate1 | (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
2022-05-09 05:22:36 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 276 seconds) |
2022-05-09 05:23:28 +0200 | uam | (uid360535@id-360535.hampstead.irccloud.com) |
2022-05-09 05:36:26 +0200 | slack1256 | (~slack1256@181.42.52.221) |
2022-05-09 05:37:27 +0200 | mvk | (~mvk@2607:fea8:5ce3:8500::aa1d) |
2022-05-09 05:42:06 +0200 | slac73837 | (~slack1256@191.125.99.83) |
2022-05-09 05:44:27 +0200 | slack1256 | (~slack1256@181.42.52.221) (Ping timeout: 256 seconds) |
2022-05-09 05:46:20 +0200 | slac73837 | slack1256 |
2022-05-09 05:47:41 +0200 | zebrag | (~chris@user/zebrag) (Quit: Konversation terminated!) |
2022-05-09 05:53:23 +0200 | tommd | (~tommd@97-120-26-41.ptld.qwest.net) (Ping timeout: 260 seconds) |
2022-05-09 05:54:01 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) |
2022-05-09 06:05:25 +0200 | yauhsien_ | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
2022-05-09 06:07:51 +0200 | galio | (~textual@c-174-63-73-241.hsd1.vt.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2022-05-09 06:20:03 +0200 | king_gs | (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) |
2022-05-09 06:26:34 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 240 seconds) |
2022-05-09 06:27:03 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) |
2022-05-09 06:27:08 +0200 | coot | (~coot@213.134.190.95) |
2022-05-09 06:30:37 +0200 | littlebo1eep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 06:31:04 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 06:35:05 +0200 | jonathanx | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
2022-05-09 06:35:57 +0200 | <jackdk> | jmcarthur: Someone from Kittyhawk gave a presentation on where they've taken CCC at this year's bobkonf |
2022-05-09 06:36:10 +0200 | <jackdk> | https://bobkonf.de/2022/pfeil.html |
2022-05-09 06:38:20 +0200 | Dorkside69 | (~dorkside@208.190.197.222) |
2022-05-09 06:39:00 +0200 | Dorkside6 | (~dorkside@208.190.197.222) (Read error: Connection reset by peer) |
2022-05-09 06:39:00 +0200 | Dorkside69 | Dorkside6 |
2022-05-09 06:45:11 +0200 | slack1256 | (~slack1256@191.125.99.83) (Remote host closed the connection) |
2022-05-09 06:55:40 +0200 | mvk | (~mvk@2607:fea8:5ce3:8500::aa1d) (Ping timeout: 250 seconds) |
2022-05-09 06:56:58 +0200 | jargon | (~jargon@174-22-206-112.phnx.qwest.net) |
2022-05-09 07:04:05 +0200 | mcfrdy | (~mcfrdy@user/mcfrdy) (*.net *.split) |
2022-05-09 07:04:05 +0200 | dpratt | (sid193493@id-193493.helmsley.irccloud.com) (*.net *.split) |
2022-05-09 07:04:05 +0200 | TimWolla | (~timwolla@2a01:4f8:150:6153:beef::6667) (*.net *.split) |
2022-05-09 07:04:05 +0200 | SanchayanMaity | (sid478177@id-478177.hampstead.irccloud.com) (*.net *.split) |
2022-05-09 07:04:05 +0200 | energizer | (~energizer@user/energizer) (*.net *.split) |
2022-05-09 07:04:05 +0200 | davean | (~davean@davean.sciesnet.net) (*.net *.split) |
2022-05-09 07:04:05 +0200 | dkeohane2 | (~dkeohane@ec2-18-189-29-140.us-east-2.compute.amazonaws.com) (*.net *.split) |
2022-05-09 07:04:05 +0200 | bwe | (~bwe@2a01:4f8:1c1c:4878::2) (*.net *.split) |
2022-05-09 07:04:13 +0200 | bwe | (~bwe@2a01:4f8:1c1c:4878::2) |
2022-05-09 07:04:15 +0200 | TimWolla | (~timwolla@2a01:4f8:150:6153:beef::6667) |
2022-05-09 07:04:19 +0200 | SanchayanMaity | (sid478177@id-478177.hampstead.irccloud.com) |
2022-05-09 07:04:47 +0200 | mcfrdy | (~mcfrdy@user/mcfrdy) |
2022-05-09 07:04:54 +0200 | dpratt | (sid193493@id-193493.helmsley.irccloud.com) |
2022-05-09 07:04:57 +0200 | davean | (~davean@davean.sciesnet.net) |
2022-05-09 07:05:22 +0200 | dkeohane2 | (~dkeohane@ec2-18-189-29-140.us-east-2.compute.amazonaws.com) |
2022-05-09 07:08:17 +0200 | mbuf | (~Shakthi@122.174.206.211) |
2022-05-09 07:09:27 +0200 | energizer | (~energizer@user/energizer) |
2022-05-09 07:11:29 +0200 | inversed_ | (~inversed@176.248.27.211) (*.net *.split) |
2022-05-09 07:11:30 +0200 | fryguybob | (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) (*.net *.split) |
2022-05-09 07:11:30 +0200 | agrosant | (~agrosant@79.103.56.172.dsl.dyn.forthnet.gr) (*.net *.split) |
2022-05-09 07:11:30 +0200 | adium | (adium@user/adium) (*.net *.split) |
2022-05-09 07:11:30 +0200 | matijja | (~matijja@193.77.181.201) (*.net *.split) |
2022-05-09 07:11:30 +0200 | koala_man | (~vidar@157.146.251.23.bc.googleusercontent.com) (*.net *.split) |
2022-05-09 07:11:30 +0200 | maerwald | (~maerwald@user/maerwald) (*.net *.split) |
2022-05-09 07:11:30 +0200 | byorgey | (~byorgey@155.138.238.211) (*.net *.split) |
2022-05-09 07:11:30 +0200 | simeon | (~pi@dslb-088-078-150-105.088.078.pools.vodafone-ip.de) (*.net *.split) |
2022-05-09 07:11:30 +0200 | FragByte | (~christian@user/fragbyte) (*.net *.split) |
2022-05-09 07:11:30 +0200 | m1dnight | (~christoph@78-22-9-5.access.telenet.be) (*.net *.split) |
2022-05-09 07:11:30 +0200 | gabiruh | (~gabiruh@vps19177.publiccloud.com.br) (*.net *.split) |
2022-05-09 07:11:30 +0200 | haritz | (~hrtz@user/haritz) (*.net *.split) |
2022-05-09 07:11:37 +0200 | simeon | (~pi@dslb-088-078-150-105.088.078.pools.vodafone-ip.de) |
2022-05-09 07:11:38 +0200 | byorgey | (~byorgey@155.138.238.211) |
2022-05-09 07:11:38 +0200 | koala_man | (~vidar@157.146.251.23.bc.googleusercontent.com) |
2022-05-09 07:11:39 +0200 | FragByte | (~christian@user/fragbyte) |
2022-05-09 07:11:40 +0200 | haritz | (~hrtz@82-69-11-11.dsl.in-addr.zen.co.uk) |
2022-05-09 07:11:45 +0200 | haritz | (~hrtz@82-69-11-11.dsl.in-addr.zen.co.uk) (Changing host) |
2022-05-09 07:11:45 +0200 | haritz | (~hrtz@user/haritz) |
2022-05-09 07:11:45 +0200 | matijja | (~matijja@193.77.181.201) |
2022-05-09 07:11:46 +0200 | gabiruh | (~gabiruh@vps19177.publiccloud.com.br) |
2022-05-09 07:11:49 +0200 | fryguybob | (~fryguybob@cpe-74-67-169-145.rochester.res.rr.com) |
2022-05-09 07:11:59 +0200 | maerwald | (~maerwald@mail.hasufell.de) |
2022-05-09 07:12:11 +0200 | m1dnight | (~christoph@78-22-9-5.access.telenet.be) |
2022-05-09 07:12:12 +0200 | adium | (adium@user/adium) |
2022-05-09 07:12:34 +0200 | bahamas | (~lucian@84.232.141.55) |
2022-05-09 07:13:26 +0200 | king_gs | (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) (Ping timeout: 250 seconds) |
2022-05-09 07:14:17 +0200 | king_gs | (~Thunderbi@187.201.105.54) |
2022-05-09 07:15:30 +0200 | agrosant | (~agrosant@79.103.56.172.dsl.dyn.forthnet.gr) |
2022-05-09 07:15:34 +0200 | inversed | (~inversed@176.248.27.211) |
2022-05-09 07:15:45 +0200 | agrosant | (~agrosant@79.103.56.172.dsl.dyn.forthnet.gr) (Max SendQ exceeded) |
2022-05-09 07:16:04 +0200 | littlebo1eep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 07:17:43 +0200 | chomwitt | (~chomwitt@2a02:587:dc19:d600:d488:150b:e66b:f592) |
2022-05-09 07:18:28 +0200 | bahamas | (~lucian@84.232.141.55) (Ping timeout: 248 seconds) |
2022-05-09 07:19:00 +0200 | Dorkside6 | (~dorkside@208.190.197.222) (Ping timeout: 248 seconds) |
2022-05-09 07:19:50 +0200 | inversed | (~inversed@176.248.27.211) (Ping timeout: 240 seconds) |
2022-05-09 07:20:02 +0200 | agrosant | (~agrosant@79.103.56.172.dsl.dyn.forthnet.gr) |
2022-05-09 07:21:06 +0200 | nut | (~haskellfi@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-05-09 07:22:43 +0200 | xkuru | (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
2022-05-09 07:22:52 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 07:27:13 +0200 | Dorkside6 | (~dorkside@208.190.197.222) |
2022-05-09 07:27:13 +0200 | littlebo1eep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 07:27:24 +0200 | inversed | (~inversed@176.248.27.211) |
2022-05-09 07:30:04 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 07:31:34 +0200 | littlebo1eep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 07:32:15 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 07:35:14 +0200 | michalz | (~michalz@185.246.204.125) |
2022-05-09 07:36:34 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 07:37:16 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2022-05-09 07:37:39 +0200 | hgolden | (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) (Quit: Konversation terminated!) |
2022-05-09 07:42:54 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 07:44:46 +0200 | Dorkside6 | (~dorkside@208.190.197.222) (Ping timeout: 246 seconds) |
2022-05-09 07:53:13 +0200 | uam | (uid360535@id-360535.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2022-05-09 07:57:03 +0200 | king_gs | (~Thunderbi@187.201.105.54) (Read error: Connection reset by peer) |
2022-05-09 07:57:07 +0200 | king_gs1 | (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) |
2022-05-09 07:59:25 +0200 | king_gs1 | king_gs |
2022-05-09 08:02:00 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 08:03:40 +0200 | Dorkside6 | (~dorkside@208.190.197.222) |
2022-05-09 08:23:56 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-05-09 08:24:50 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 08:25:56 +0200 | fef | (~thedawn@user/thedawn) |
2022-05-09 08:26:46 +0200 | nut | (~haskellfi@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 246 seconds) |
2022-05-09 08:34:05 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2022-05-09 08:35:02 +0200 | nut | (~haskellfi@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-05-09 08:36:24 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:10ff:daf4:e8f5:4537) |
2022-05-09 08:36:40 +0200 | shailangsa | (~shailangs@host86-186-127-233.range86-186.btcentralplus.com) (Ping timeout: 260 seconds) |
2022-05-09 08:42:34 +0200 | bahamas | (~lucian@84.232.141.55) |
2022-05-09 08:43:31 +0200 | chele | (~chele@user/chele) |
2022-05-09 08:43:58 +0200 | jargon | (~jargon@174-22-206-112.phnx.qwest.net) (Remote host closed the connection) |
2022-05-09 08:47:02 +0200 | bahamas | (~lucian@84.232.141.55) (Ping timeout: 250 seconds) |
2022-05-09 08:47:13 +0200 | <tomsmeding> | ski: that cps trick is this thing: https://hackage.haskell.org/package/linear-base-0.2.0/docs/Data-Array-Mutable-Linear.html#v:alloc |
2022-05-09 08:47:22 +0200 | <tomsmeding> | Not sure about the other way round |
2022-05-09 08:49:24 +0200 | jinsun | (~jinsun@user/jinsun) (Ping timeout: 240 seconds) |
2022-05-09 08:50:14 +0200 | acidjnk | (~acidjnk@p200300d0c7068b566ddd60c7ad103c7d.dip0.t-ipconnect.de) |
2022-05-09 08:50:59 +0200 | dsrt^ | (~dsrt@173-160-94-253-atlanta.hfc.comcastbusiness.net) |
2022-05-09 08:52:31 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
2022-05-09 08:55:49 +0200 | cfricke | (~cfricke@user/cfricke) |
2022-05-09 08:57:58 +0200 | mmhat | (~mmh@2001:4090:a243:8065:ee08:6bff:fe09:5315) |
2022-05-09 08:58:56 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
2022-05-09 08:59:41 +0200 | jinsun | (~jinsun@user/jinsun) |
2022-05-09 09:04:14 +0200 | bahamas | (~lucian@84.232.141.55) |
2022-05-09 09:04:26 +0200 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2022-05-09 09:06:55 +0200 | <dminuoso> | dolio: Can you elaborate on what you mean by demoted? |
2022-05-09 09:12:01 +0200 | <dolio> | Well, I wasn't the one who first used it. But, you can always pass a non-linear thing to something expecting a linear thing. |
2022-05-09 09:12:24 +0200 | <dolio> | Because it's safe to use something linearly. |
2022-05-09 09:18:22 +0200 | mikoto-chan | (~mikoto-ch@84.199.144.234) |
2022-05-09 09:19:20 +0200 | <dolio> | This is the opposite of uniqueness. It's safe to pass a unique thing to something that doesn't require uniqueness. |
2022-05-09 09:19:52 +0200 | shailangsa | (~shailangs@host86-186-127-233.range86-186.btcentralplus.com) |
2022-05-09 09:21:11 +0200 | <sm> | is *> different from >> ? |
2022-05-09 09:21:20 +0200 | <dminuoso> | sm: No. |
2022-05-09 09:21:28 +0200 | <sm> | thanks |
2022-05-09 09:24:02 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2022-05-09 09:28:03 +0200 | king_gs | (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) (Ping timeout: 260 seconds) |
2022-05-09 09:30:27 +0200 | kuribas | (~user@ptr-22ndgz86kjxhmhak.0000808120a2.ip6.access.telenet.be) |
2022-05-09 09:31:25 +0200 | alp_ | (~alp@user/alp) |
2022-05-09 09:37:51 +0200 | zeenk | (~zeenk@2a02:2f04:a004:9b00:1efc:c1cf:378d:8b3d) |
2022-05-09 09:45:38 +0200 | king_gs | (~Thunderbi@187.201.105.54) |
2022-05-09 09:46:39 +0200 | mastarija | (~mastarija@2a05:4f46:e04:6000:15e:37d3:79e0:36e0) |
2022-05-09 09:47:29 +0200 | machinedgod | (~machinedg@24.105.81.50) |
2022-05-09 09:48:38 +0200 | <mastarija> | I'm reading the "Category theory for programmers" and on the page 114 (132 in pdf) it feels like the graph showing bifunctors as a "product" is wrong and is actually a "sum". |
2022-05-09 09:48:44 +0200 | <mastarija> | https://github.com/hmemcpy/milewski-ctfp-pdf/releases/download/v1.3.0/category-theory-for-programm… |
2022-05-09 09:48:51 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-05-09 09:48:51 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2022-05-09 09:49:04 +0200 | <mastarija> | Is my intuition correct, or am I misunderstanding something? |
2022-05-09 09:49:17 +0200 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-05-09 09:51:04 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 09:51:50 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-05-09 09:52:38 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 09:57:27 +0200 | <[exa]> | mastarija: I understood it such that both morphisms need to be present, so I'd say the "product" is okay there. If you'd have a sum, it would be "eitherfunctor" or something |
2022-05-09 09:57:48 +0200 | <sm> | there was a semi recent package announced for rendering module import graphs, does anyone remember it ? Or any tool that works well ? |
2022-05-09 09:58:24 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-05-09 09:58:59 +0200 | <[exa]> | mastarija: the 'first' and 'second' look kinda like left/right, but actually these are left and right product with `id` |
2022-05-09 09:59:00 +0200 | <mastarija> | [exa], yes from the text I kind of get that, but the graph is very confusing though. |
2022-05-09 10:00:04 +0200 | <[exa]> | yeah, would be better if there was a "bag" for both c an d (but that would kinda break the display in the following diagrams) |
2022-05-09 10:00:09 +0200 | <mastarija> | I'd first define a product of DxC and then map that to E |
2022-05-09 10:01:10 +0200 | <mastarija> | Ok. I guess that settles it. I was just unsure if this was a shorthand of sorts or if I'm not understanding things correctly. |
2022-05-09 10:01:11 +0200 | <mastarija> | Thx |
2022-05-09 10:02:40 +0200 | <[exa]> | yeah doing the product first should be kinda the same, but I'd be afraid that it would become unwieldy later because of the need of deconstructing the products (e.g., how do you extract the `id`s for `first` and `second` later?) |
2022-05-09 10:03:58 +0200 | <[exa]> | (is the actual product category isomorphic to the bifunctor there? [shrug.gif] ) |
2022-05-09 10:04:31 +0200 | <mastarija> | I guess I'm about to find out :) |
2022-05-09 10:05:56 +0200 | <[exa]> | ah, literally on the same page |
2022-05-09 10:05:58 +0200 | <[exa]> | > Categories in which joint functoriality fails are called |
2022-05-09 10:05:59 +0200 | <[exa]> | premonoidal |
2022-05-09 10:06:00 +0200 | <lambdabot> | <hint>:1:12: error: parse error on input ‘in’ |
2022-05-09 10:06:27 +0200 | [exa] | apologies for waking lambdabot on monday morning |
2022-05-09 10:08:30 +0200 | gehmehgeh | (~user@user/gehmehgeh) |
2022-05-09 10:09:40 +0200 | ccntrq | (~Thunderbi@exit-1.rz.nue.de.mhd.medondo.com) |
2022-05-09 10:12:50 +0200 | bahamas | (~lucian@84.232.141.55) (Ping timeout: 252 seconds) |
2022-05-09 10:13:04 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 10:15:13 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 10:19:05 +0200 | <Franciman> | is there a list of supported platforms by the native code generator of ghc? |
2022-05-09 10:20:33 +0200 | <merijn> | Franciman: https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms |
2022-05-09 10:20:43 +0200 | <Franciman> | thanks |
2022-05-09 10:21:27 +0200 | <merijn> | Seems a bit out of date, though |
2022-05-09 10:21:34 +0200 | <merijn> | since the new M1 apple isn't mentioned |
2022-05-09 10:21:45 +0200 | <Franciman> | i couldn't find anything else so far |
2022-05-09 10:22:06 +0200 | <merijn> | OTOH, last updated 2 months ago |
2022-05-09 10:22:13 +0200 | <merijn> | And also #ghc, of course :) |
2022-05-09 10:22:19 +0200 | <Franciman> | well otoh there is the llvm backend |
2022-05-09 10:22:23 +0200 | <Franciman> | it works on a lot of platforms |
2022-05-09 10:23:25 +0200 | <Franciman> | thanks |
2022-05-09 10:23:25 +0200 | king_gs | (~Thunderbi@187.201.105.54) (Read error: Connection reset by peer) |
2022-05-09 10:24:51 +0200 | <merijn> | Anyway, #ghc is probably the best way to get quick/accurate response about low level details like "what exactly does the NCG run on?" |
2022-05-09 10:25:29 +0200 | kuribas | (~user@ptr-22ndgz86kjxhmhak.0000808120a2.ip6.access.telenet.be) (Ping timeout: 252 seconds) |
2022-05-09 10:26:41 +0200 | king_gs | (~Thunderbi@187.201.105.54) |
2022-05-09 10:29:35 +0200 | CiaoSen | (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2022-05-09 10:30:16 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.5) |
2022-05-09 10:32:16 +0200 | shriekingnoise | (~shrieking@201.231.16.156) (Quit: Quit) |
2022-05-09 10:32:31 +0200 | bahamas | (~lucian@86.120.21.179) |
2022-05-09 10:39:13 +0200 | mastarija | (~mastarija@2a05:4f46:e04:6000:15e:37d3:79e0:36e0) (Quit: Leaving) |
2022-05-09 10:41:53 +0200 | gurkenglas | (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) |
2022-05-09 10:44:20 +0200 | littlebo1eep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 10:46:04 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 10:58:26 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2022-05-09 10:59:04 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 240 seconds) |
2022-05-09 10:59:57 +0200 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 276 seconds) |
2022-05-09 11:00:09 +0200 | o1lo0lol1o[m] | (~o1lo0lol1@2001:470:69fc:105::1:d1c0) (Quit: You have been kicked for being idle) |
2022-05-09 11:02:02 +0200 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2022-05-09 11:09:43 +0200 | king_gs | (~Thunderbi@187.201.105.54) (Ping timeout: 256 seconds) |
2022-05-09 11:14:58 +0200 | kuribas | (~user@ptr-22ncmprk7023eeg8.0000808120a2.ip6.access.telenet.be) |
2022-05-09 11:23:47 +0200 | acidjnk | (~acidjnk@p200300d0c7068b566ddd60c7ad103c7d.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2022-05-09 11:25:16 +0200 | <sm> | don't https://hackage.haskell.org/package/base-4.16.1.0/docs/Data-List.html#v:group & groupBy work only if the list is sorted first ? no mention of this in the haddock |
2022-05-09 11:26:21 +0200 | <merijn> | sm: hmm? |
2022-05-09 11:26:31 +0200 | <merijn> | sm: I think you're thinking it does something different from what it does |
2022-05-09 11:26:44 +0200 | <merijn> | "takes a list and returns a list of lists such that the concatenation of the result is equal to the argument." |
2022-05-09 11:26:52 +0200 | <merijn> | "Moreover, each sublist in the result contains only equal elements. " |
2022-05-09 11:27:05 +0200 | <merijn> | i.e., it groups adjacent elements that are equal |
2022-05-09 11:27:15 +0200 | <merijn> | I don't see how being sorted is required? |
2022-05-09 11:28:25 +0200 | <sm> | > group [1,2,1,2] |
2022-05-09 11:28:27 +0200 | <lambdabot> | [[1],[2],[1],[2]] |
2022-05-09 11:29:11 +0200 | <sm> | apparently it is |
2022-05-09 11:29:17 +0200 | <merijn> | sm: No? |
2022-05-09 11:29:19 +0200 | <sm> | as with nub |
2022-05-09 11:29:28 +0200 | <merijn> | sm: All adjacent equal elements are grouped |
2022-05-09 11:29:32 +0200 | <sm> | > group $ sort [1,2,1,2] |
2022-05-09 11:29:33 +0200 | <lambdabot> | [[1,1],[2,2]] |
2022-05-09 11:29:40 +0200 | <merijn> | sm: Like, the example literally shows |
2022-05-09 11:29:50 +0200 | <merijn> | > group "Mississippi" |
2022-05-09 11:29:52 +0200 | <lambdabot> | ["M","i","ss","i","ss","i","pp","i"] |
2022-05-09 11:30:09 +0200 | odnes | (~odnes@5-203-249-228.pat.nym.cosmote.net) |
2022-05-09 11:30:16 +0200 | <sm> | merijn: maybe so, but the description doesn't say that |
2022-05-09 11:30:23 +0200 | <merijn> | sm: It literally does? |
2022-05-09 11:30:30 +0200 | <merijn> | I even just copied and pasted that? |
2022-05-09 11:30:59 +0200 | <sm> | I'm reading "The group function takes a list and returns a list of lists such that the concatenation of the result is equal to the argument.". Ok I guess it does say that, though not literally. |
2022-05-09 11:31:02 +0200 | <sm> | thanks |
2022-05-09 11:31:05 +0200 | <merijn> | order isn't changed, because the concatenation of the result is the same thing |
2022-05-09 11:31:36 +0200 | <merijn> | I guess you could reword it, but the mississippi example right below it seems pretty clear? |
2022-05-09 11:33:19 +0200 | <sm> | yes it is, you're right. As with nub I tend to forget and assume this does a different, higher-level operation (group like things, wherever they may be in the list) |
2022-05-09 11:33:49 +0200 | <sm> | the name sort of implies that |
2022-05-09 11:33:51 +0200 | <Hecate> | the wording is bad indeed |
2022-05-09 11:34:57 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-05-09 11:35:01 +0200 | econo | (uid147250@user/econo) (Quit: Connection closed for inactivity) |
2022-05-09 11:35:13 +0200 | oxide | (~lambda@user/oxide) |
2022-05-09 11:35:26 +0200 | <sm> | (well in my mind it implied that anyway) |
2022-05-09 11:35:45 +0200 | <merijn> | I mean, you could insert "Groups adjacent elements. That is, <insert old specification>" |
2022-05-09 11:36:11 +0200 | <merijn> | And by "you" I mean "anyone but me" :D |
2022-05-09 11:37:10 +0200 | <dminuoso> | I think this is miscommunication. sm expects it to do A), documentation says it does B), though you can do A via B if you sort the input list first. |
2022-05-09 11:37:46 +0200 | <dminuoso> | The names "group" and "groupBy" are certainly poorly chosen, since their name itself implies what sm wants. |
2022-05-09 11:37:52 +0200 | <merijn> | well |
2022-05-09 11:38:01 +0200 | <merijn> | It also implies what it actually does |
2022-05-09 11:38:14 +0200 | <merijn> | it's just there's 2 different things than can reasonably be described the same way |
2022-05-09 11:38:35 +0200 | <dminuoso> | If "groupBy" behaves slightly different from what similarly named functions in other programming languages do, it doesnt help. :) |
2022-05-09 11:38:37 +0200 | gurkenglas | (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
2022-05-09 11:38:39 +0200 | <dminuoso> | Right |
2022-05-09 11:39:14 +0200 | <merijn> | I think the name is fine, it think the specification is fine (in the sense of complete and accurate), I just think it's lacking a 4 word summary for the impatient |
2022-05-09 11:39:22 +0200 | <dminuoso> | sm: For what its worth, this actually caused a bug in our compiler that was quite tricky to find. :) |
2022-05-09 11:39:34 +0200 | <sm> | I can see "group" meaning either behaviour. But I think the one I wanted is the one people most often want, and the name or at least doc of the function could probably be make a little more proof against folks like me |
2022-05-09 11:39:51 +0200 | <dminuoso> | If you feel the documentation can be improved, feel free to make a pull request. |
2022-05-09 11:39:57 +0200 | <sm> | dminuoso: thanks, now I feel better! :) |
2022-05-09 11:40:21 +0200 | <merijn> | sm: Personally whenever I end up wanting to group things your way I tend towards a fold building a Map |
2022-05-09 11:40:35 +0200 | <merijn> | Which is why we should change the Semigroup instance of Map >.< |
2022-05-09 11:40:42 +0200 | <merijn> | Join my crusade! |
2022-05-09 11:40:49 +0200 | <merijn> | Excise the evil stupid instance |
2022-05-09 11:40:49 +0200 | <dminuoso> | What semigroup instance do you want? |
2022-05-09 11:40:59 +0200 | <sm> | personally I add a sort. |
2022-05-09 11:41:09 +0200 | <merijn> | dminuoso: "(Ord k, Semigroup v) => Semigroup (Map k v)" |
2022-05-09 11:41:27 +0200 | <dminuoso> | This unions them together, right? |
2022-05-09 11:41:32 +0200 | <merijn> | dminuoso: Yes |
2022-05-09 11:41:41 +0200 | <dminuoso> | Ah, I see what you want |
2022-05-09 11:41:42 +0200 | <merijn> | The current version is a left-biased union |
2022-05-09 11:41:44 +0200 | <merijn> | Which sucks |
2022-05-09 11:42:06 +0200 | <merijn> | I wanna just do "foldMap (\k -> M.singleton k (Sum 1))" to count stuff |
2022-05-09 11:42:15 +0200 | <dminuoso> | I fear your crusade is a hopeless one, you will be riding on Dapple. |
2022-05-09 11:42:16 +0200 | <merijn> | So many useful tricks! |
2022-05-09 11:42:30 +0200 | <dminuoso> | The kind of breackage that would insue could be hard to measure |
2022-05-09 11:42:38 +0200 | <merijn> | left-biased union is such a shitty instance :( |
2022-05-09 11:42:45 +0200 | <merijn> | and I have to reimplement mine every time |
2022-05-09 11:42:53 +0200 | <dminuoso> | Yeah, but getting rid of that one seems impossible now. |
2022-05-09 11:43:08 +0200 | <dminuoso> | Well, getting rid of is easy. Replacing it with the one you suggested.. |
2022-05-09 11:43:35 +0200 | <dminuoso> | Can you tie depretation warnings into typeclass instances? |
2022-05-09 11:43:57 +0200 | <merijn> | not yet |
2022-05-09 11:44:51 +0200 | <dminuoso> | I think this this is mandatory for your crusade |
2022-05-09 11:45:14 +0200 | mmhat | (~mmh@2001:4090:a243:8065:ee08:6bff:fe09:5315) (Quit: WeeChat 3.5) |
2022-05-09 11:45:59 +0200 | <dminuoso> | For me, what I really sorely miss, is a builtin interface for insert that fails on conflict. |
2022-05-09 11:46:08 +0200 | <merijn> | Ah, yes |
2022-05-09 11:46:12 +0200 | <dminuoso> | Everywhere I use maps, I re-roll the same thing with alterF |
2022-05-09 11:46:18 +0200 | <merijn> | dminuoso: Same |
2022-05-09 11:46:33 +0200 | <merijn> | but never quite exactly the same :\ |
2022-05-09 11:46:42 +0200 | <dminuoso> | Yup! |
2022-05-09 11:46:57 +0200 | <dminuoso> | So I guess the answer to that is: alterF is exactly right. |
2022-05-09 11:47:03 +0200 | <dminuoso> | Just uncomfortable to use. |
2022-05-09 11:50:34 +0200 | fef | (~thedawn@user/thedawn) (Ping timeout: 240 seconds) |
2022-05-09 11:52:41 +0200 | <Franciman> | lol |
2022-05-09 11:55:30 +0200 | nut | (~haskellfi@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds) |
2022-05-09 11:57:26 +0200 | <dminuoso> | How do you reset lambdabot? |
2022-05-09 11:58:17 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:10ff:daf4:e8f5:4537) (Read error: Connection reset by peer) |
2022-05-09 11:58:36 +0200 | CiaoSen | (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds) |
2022-05-09 11:58:47 +0200 | <dminuoso> | merijn: maybe this helper might be the gap? |
2022-05-09 11:58:50 +0200 | <dminuoso> | :t insertF |
2022-05-09 11:58:52 +0200 | <lambdabot> | (Applicative f, Ord k) => (k -> t -> t -> f (Maybe t)) -> k -> t -> M.Map k t -> f (M.Map k t) |
2022-05-09 11:59:04 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-05-09 11:59:08 +0200 | <dminuoso> | Defined as: insertF f k a = M.alterF go k where go Nothing = pure (Just a); go (Just a') = f k a a' |
2022-05-09 11:59:18 +0200 | <tdammers> | jeez, for a second there I thought I was reading a political debate: "left-biased union is such a shitty instance"... |
2022-05-09 11:59:55 +0200 | <merijn> | tdammers: Naah, my political discourse is more: I'm not saying cannibalism is great, but maybe we should bring back eating prime ministers that disappoint... |
2022-05-09 12:00:18 +0200 | <merijn> | dminuoso: What's the second 't' in that first function? |
2022-05-09 12:00:38 +0200 | <merijn> | hmm |
2022-05-09 12:00:50 +0200 | <merijn> | this definition is to confusing for me on one line :p |
2022-05-09 12:01:16 +0200 | searemind | (~searemind@122.161.49.12) |
2022-05-09 12:01:26 +0200 | <dminuoso> | merijn: Ah that's just the two values, the one existing in the map and the new one |
2022-05-09 12:01:37 +0200 | <dminuoso> | We can drop the key or the value-to-be-inserted |
2022-05-09 12:02:00 +0200 | <dminuoso> | The point really is to just let you cover the conflict case |
2022-05-09 12:02:54 +0200 | <dminuoso> | The choices I usually have is either replace but collect a warning, or dont replace but collect a warning or throw some exception |
2022-05-09 12:03:25 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds) |
2022-05-09 12:05:31 +0200 | bahamas | (~lucian@86.120.21.179) (Ping timeout: 246 seconds) |
2022-05-09 12:06:28 +0200 | jmdaemon | (~jmdaemon@user/jmdaemon) (Ping timeout: 248 seconds) |
2022-05-09 12:07:25 +0200 | searemind | (~searemind@122.161.49.12) (Remote host closed the connection) |
2022-05-09 12:14:56 +0200 | mikoto-chan | (~mikoto-ch@84.199.144.234) (Ping timeout: 252 seconds) |
2022-05-09 12:15:24 +0200 | nut | (~haskellfi@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-05-09 12:17:10 +0200 | xff0x | (~xff0x@125x102x200x106.ap125.ftth.ucom.ne.jp) (Ping timeout: 260 seconds) |
2022-05-09 12:17:58 +0200 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.5) |
2022-05-09 12:18:31 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:10ff:daf4:e8f5:4537) |
2022-05-09 12:18:33 +0200 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2022-05-09 12:18:40 +0200 | kuribas` | (~user@2a02:1808:1:72e3:9db4:7b66:5f90:2ba8) |
2022-05-09 12:20:09 +0200 | kuribas | (~user@ptr-22ncmprk7023eeg8.0000808120a2.ip6.access.telenet.be) (Ping timeout: 248 seconds) |
2022-05-09 12:20:24 +0200 | xaotuk | (~sasha@2a06:5b00:15fe:9b00::2) |
2022-05-09 12:21:57 +0200 | <jmcarthur> | jackdk: This looks great! Thank you! |
2022-05-09 12:23:58 +0200 | Pickchea | (~private@user/pickchea) |
2022-05-09 12:27:10 +0200 | dhil | (~dhil@cpc103052-sgyl39-2-0-cust260.18-2.cable.virginm.net) |
2022-05-09 12:28:44 +0200 | CiaoSen | (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2022-05-09 12:32:06 +0200 | <kuribas`> | I was attempting to put type variables in a record, but sadly haskell doesn't accept this syntax... |
2022-05-09 12:32:54 +0200 | <kuribas`> | data Foo :: (FooVars * -> *) where Foo :: { aFoo :: foo foovars , aBar :: bar foovars} -> Foo ('FooVars{ foo = aFoo, bar = aBar}) |
2022-05-09 12:38:59 +0200 | <tdammers> | merijn: any political stance that starts with "I'm not saying cannibalism is great, but..." is at least interesting in my book |
2022-05-09 12:39:27 +0200 | <maerwald> | xD |
2022-05-09 12:39:52 +0200 | <maerwald> | "...but it does taste like chicken" |
2022-05-09 12:40:00 +0200 | <kuribas`> | This works: data Foo :: (FooVars * -> *) where Foo :: { aFoo :: foo foovars , aBar :: bar foovars} -> Foo ('FooVars aFoo aBar) |
2022-05-09 12:40:07 +0200 | <int-e> | . o O ( Soylent Green ) |
2022-05-09 12:40:31 +0200 | <kuribas`> | But it's not better than data Foo foo bar = ... |
2022-05-09 12:40:51 +0200 | <kuribas`> | I am doing to much idris probably... |
2022-05-09 12:44:36 +0200 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 276 seconds) |
2022-05-09 12:46:45 +0200 | jgeerds | (~jgeerds@d53604b0.access.ecotel.net) |
2022-05-09 12:49:12 +0200 | <kuribas`> | I am experimenting with a REST framework using higher kinded records. |
2022-05-09 12:49:12 +0200 | <kuribas`> | It doesn't like anyone attempted this before? |
2022-05-09 12:49:13 +0200 | jespada | (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) (Quit: Textual IRC Client: www.textualapp.com) |
2022-05-09 12:49:14 +0200 | <kuribas`> | Basically the specification would be in an instance of a HKD record. |
2022-05-09 12:49:15 +0200 | <kuribas`> | For each endpoint you make a record of captures, a record of parameters, etc... |
2022-05-09 12:51:38 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
2022-05-09 12:52:22 +0200 | kuribas`` | (~user@ptr-17d51eocv4dr96js6nc.18120a2.ip6.access.telenet.be) |
2022-05-09 12:52:49 +0200 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2022-05-09 12:53:59 +0200 | kuribas` | (~user@2a02:1808:1:72e3:9db4:7b66:5f90:2ba8) (Ping timeout: 252 seconds) |
2022-05-09 12:54:11 +0200 | jespada | (~jespada@89.238.130.77) |
2022-05-09 13:04:48 +0200 | jmcarthur | (~jmcarthur@c-73-29-224-10.hsd1.nj.comcast.net) (Read error: Connection reset by peer) |
2022-05-09 13:05:02 +0200 | jmcarthur | (~jmcarthur@45.15.176.236) |
2022-05-09 13:07:27 +0200 | dostoevsky5 | (~5c42c5384@user/dostoevsky) |
2022-05-09 13:08:37 +0200 | dostoevsky | (~5c42c5384@user/dostoevsky) (Read error: Connection reset by peer) |
2022-05-09 13:08:38 +0200 | dostoevsky5 | dostoevsky |
2022-05-09 13:10:57 +0200 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2022-05-09 13:11:16 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-05-09 13:14:51 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 13:19:22 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
2022-05-09 13:23:23 +0200 | mmhat | (~mmh@2001:4090:a243:8065:ee08:6bff:fe09:5315) |
2022-05-09 13:25:56 +0200 | jgeerds | (~jgeerds@d53604b0.access.ecotel.net) (Ping timeout: 248 seconds) |
2022-05-09 13:28:37 +0200 | gurkenglas | (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) |
2022-05-09 13:29:21 +0200 | mrd | (~mrd@user/mrd) |
2022-05-09 13:33:25 +0200 | <merijn> | int-e: I was more referring to: https://en.wikipedia.org/wiki/Johan_de_Witt#Disaster_year_and_De_Witt's_Death :p |
2022-05-09 13:34:27 +0200 | xff0x | (~xff0x@om126033119107.35.openmobile.ne.jp) |
2022-05-09 13:36:27 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.5) |
2022-05-09 13:41:06 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-05-09 13:41:07 +0200 | <geekosaur> | dminuoso, did you want @undefine ? |
2022-05-09 13:41:19 +0200 | <dminuoso> | Ahh yes, thats the one. |
2022-05-09 13:41:33 +0200 | <dminuoso> | lambdabot is mysterious to me, I cant even figure out how have it tell me how to use it. |
2022-05-09 13:41:50 +0200 | odnes | (~odnes@5-203-249-228.pat.nym.cosmote.net) (Ping timeout: 240 seconds) |
2022-05-09 13:42:00 +0200 | <maerwald> | dminuoso: you have to start a relationship |
2022-05-09 13:42:46 +0200 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2022-05-09 13:44:50 +0200 | bontaq | (~user@ool-45779fe5.dyn.optonline.net) |
2022-05-09 13:45:36 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Quit: Leaving) |
2022-05-09 13:46:41 +0200 | foul_owl | (~kerry@23.82.193.89) (Ping timeout: 256 seconds) |
2022-05-09 13:47:04 +0200 | littlebo1eep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 13:47:26 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2022-05-09 13:47:30 +0200 | <int-e> | @list eval |
2022-05-09 13:47:30 +0200 | <lambdabot> | eval provides: run let define undefine |
2022-05-09 13:48:33 +0200 | <int-e> | @help eval |
2022-05-09 13:48:33 +0200 | <lambdabot> | eval. Do nothing (perversely) |
2022-05-09 13:49:52 +0200 | <int-e> | (I don't know the story behind that one... maybe some other bot that had an @eval command?) |
2022-05-09 13:51:10 +0200 | jespada | (~jespada@89.238.130.77) (Ping timeout: 240 seconds) |
2022-05-09 13:52:06 +0200 | gensyst | (gensyst@user/gensyst) |
2022-05-09 13:52:10 +0200 | <merijn> | @eval foo |
2022-05-09 13:52:23 +0200 | <merijn> | hmm |
2022-05-09 13:52:49 +0200 | <jmcarthur> | > "maybe it's just a name for this?" |
2022-05-09 13:52:50 +0200 | <lambdabot> | "maybe it's just a name for this?" |
2022-05-09 13:52:57 +0200 | <geekosaur> | that's @run |
2022-05-09 13:53:02 +0200 | <jmcarthur> | Ah |
2022-05-09 13:53:27 +0200 | <jmcarthur> | Oh, then eval must just be the name of the plugin, not a command |
2022-05-09 13:53:27 +0200 | <merijn> | There was one command that just got auto-corrected to echo, was just trying to remember if it was eval or something else :p |
2022-05-09 13:53:34 +0200 | <gensyst> | I want to create the concept of a "quality", where each instance obviously knows what it's own quality type is. This doesn't work: https://dpaste.com/62UEWPCLP Can you help lead me in the right direction? |
2022-05-09 13:53:46 +0200 | <jmcarthur> | @help blah |
2022-05-09 13:53:46 +0200 | <lambdabot> | help <command>. Ask for help for <command>. Try 'list' for all commands |
2022-05-09 13:53:49 +0200 | <jmcarthur> | Hmm |
2022-05-09 13:53:56 +0200 | <geekosaur> | I really do need to finish my lb help documentation |
2022-05-09 13:54:07 +0200 | <merijn> | gensyst: Well that first example looks 100% wrong |
2022-05-09 13:54:13 +0200 | jespada | (~jespada@cpc121022-nmal24-2-0-cust171.19-2.cable.virginm.net) |
2022-05-09 13:54:16 +0200 | <merijn> | gensyst: You've define a class "Foo -> a" |
2022-05-09 13:54:23 +0200 | <merijn> | Pretty sure that has no sensible instances |
2022-05-09 13:54:34 +0200 | <merijn> | qual could only return undefined |
2022-05-09 13:54:46 +0200 | <dminuoso> | Gahh. I've done a huge mistake. I decided that I wanted my server to interact with dbus. |
2022-05-09 13:54:47 +0200 | <merijn> | eh, quality could only return undefined |
2022-05-09 13:54:50 +0200 | <dminuoso> | Horrible horrible mistake. |
2022-05-09 13:54:52 +0200 | <gensyst> | Elsewhere, I have some generic code that has (HasQuality q) => and then I should be able to query the quality - whatever type that may be. (For Dog that happens to be Double) |
2022-05-09 13:54:55 +0200 | <merijn> | dminuoso: That sounds dumb, yes |
2022-05-09 13:55:07 +0200 | <merijn> | gensyst: That's not what you wrote, though :) |
2022-05-09 13:55:17 +0200 | <merijn> | gensyst: And using typeclasses for that sounds like a mistake |
2022-05-09 13:55:36 +0200 | kosmikus | (~kosmikus@nullzig.kosmikus.org) |
2022-05-09 13:55:58 +0200 | <geekosaur> | had a feeling that "object" meant trying to use typeclasses for OOP |
2022-05-09 13:56:06 +0200 | <merijn> | gensyst: "quality :: a -> qual" is exactly the same as "quality :: a -> b", can you see how that's...rather useless? |
2022-05-09 13:56:18 +0200 | <gensyst> | yeah i do now lol |
2022-05-09 13:56:48 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 13:56:50 +0200 | <dminuoso> | gensyst: The best you can do is this: |
2022-05-09 13:57:10 +0200 | <dminuoso> | class HasQuality t a | t -> a where quality :: proxy t -> a |
2022-05-09 13:57:12 +0200 | <Hecate> | hmm. |
2022-05-09 13:57:20 +0200 | <Hecate> | I'm still very unclear about non-determinism |
2022-05-09 13:57:21 +0200 | <merijn> | dminuoso: Disagree :p |
2022-05-09 13:57:35 +0200 | <Hecate> | how does the list monad manages it? I thought it was the prerogative of IO? |
2022-05-09 13:57:42 +0200 | <merijn> | dminuoso: That certainly does what he intended to write, but I'd argue the best way to do it is to "not" do it :) |
2022-05-09 13:57:50 +0200 | <dminuoso> | merijn: *shrugs* |
2022-05-09 13:57:57 +0200 | <dminuoso> | Im just offering insights. |
2022-05-09 13:57:58 +0200 | <gensyst> | Here was my second attempt, https://dpaste.com/CMZFWUCFS but now suddenly Dog can't become an instance since it's already knows its own quality is Double |
2022-05-09 13:58:00 +0200 | <merijn> | Hecate: It's a matter of viewpoint, it doesn't do actual non-determinism |
2022-05-09 13:58:10 +0200 | <merijn> | Hecate: It explores *all* possible paths |
2022-05-09 13:58:25 +0200 | <merijn> | Which you can see as modelling a stochastic process (i.e. non-determinism) |
2022-05-09 13:58:33 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 13:58:36 +0200 | <dminuoso> | Hecate: Consider bind on [] as inspecting a "random/non-deterministic" choice and producing a non-deterministic path from that. |
2022-05-09 13:59:05 +0200 | <gensyst> | merijn, so what would you do instead? |
2022-05-09 13:59:17 +0200 | <Hecate> | so, like a breadth-first search where all possibilities are explored? |
2022-05-09 13:59:23 +0200 | <dminuoso> | gensyst: zoom out and look at what the problem is you're trying to solve. |
2022-05-09 13:59:27 +0200 | <merijn> | Hecate: Yes |
2022-05-09 13:59:36 +0200 | <Hecate> | hmm. |
2022-05-09 13:59:45 +0200 | <dminuoso> | Hecate: well its even more, because you can generate more possibilities. |
2022-05-09 14:00:00 +0200 | <Hecate> | is my intution correct by trying to link this to list comprehensions? |
2022-05-09 14:00:03 +0200 | <Hecate> | ah. |
2022-05-09 14:00:06 +0200 | <Hecate> | damnit dminuoso :D |
2022-05-09 14:00:16 +0200 | <Hecate> | my beautiful baby intuition, all shatered! |
2022-05-09 14:00:17 +0200 | <merijn> | dminuoso: I mean, whether those possibilities are generated or you are exploring "pre-existing" possibilities is a matter of perspective |
2022-05-09 14:00:26 +0200 | <merijn> | Hecate: Naah, your intuition works |
2022-05-09 14:00:26 +0200 | <gensyst> | dminuoso, do you mean I should simply use... functions? someTypeToWhateverQuality as the need arises? |
2022-05-09 14:00:44 +0200 | <dminuoso> | That sounds reasonable. |
2022-05-09 14:01:11 +0200 | <merijn> | Hecate: "you can generate more possibilities" (via >>= of "a -> [b]"), but you could consider those (latent) possibilities as "always existing and getting explored/discovered via BFS" |
2022-05-09 14:01:19 +0200 | nut | (~haskellfi@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Remote host closed the connection) |
2022-05-09 14:01:22 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-05-09 14:01:23 +0200 | <merijn> | Hecate: I.e. big step vs small step view ;) |
2022-05-09 14:01:24 +0200 | <Hecate> | ah okay so it's still coming from the domain |
2022-05-09 14:01:31 +0200 | <dminuoso> | Over the years, I've slowly come to the point where typeclasses are almost never a good answer. I only resort to them for highly lawful things, or when fiddling a dictionary through manually is a PITA. |
2022-05-09 14:01:46 +0200 | <merijn> | gensyst: Pretty much |
2022-05-09 14:01:55 +0200 | <Hecate> | what dminuoso said |
2022-05-09 14:02:13 +0200 | <Hecate> | (maybe with 2 exceptions for my very specific case but we all have our sins.) |
2022-05-09 14:02:14 +0200 | <merijn> | I like them for tagless-final style stuff |
2022-05-09 14:03:07 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
2022-05-09 14:03:30 +0200 | <merijn> | Hecate: I assumed that dminuoso was referring to the right-hand of bind introducing "new" possibilities, but of course it's equally valid to just consider those "new" possibilities as "always having been there, but unexplored", since it's all pure anyway |
2022-05-09 14:03:38 +0200 | <dminuoso> | Hecate: I found ReadS to be a great sourth of intuition about how list represents non-determinism. |
2022-05-09 14:03:47 +0200 | <dminuoso> | *source even |
2022-05-09 14:04:32 +0200 | <Hecate> | I see |
2022-05-09 14:04:57 +0200 | <Hecate> | I think I'm going not to focus too much on the "non-det" terminology here because I'm trying to think in a matter of outside effects, etc |
2022-05-09 14:05:24 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
2022-05-09 14:06:28 +0200 | <lortabac> | non-deterministic in Prolog means "it can have multiple solutions" |
2022-05-09 14:06:53 +0200 | <lortabac> | if you translate it to Haskell, it's a way to emulate that kind of behavior |
2022-05-09 14:07:14 +0200 | <lortabac> | ie. a function that can have multiple results |
2022-05-09 14:07:19 +0200 | <dminuoso> | I guess that perspective maps very nicely to ReadS |
2022-05-09 14:07:59 +0200 | <Hecate> | that is true |
2022-05-09 14:08:04 +0200 | <Hecate> | https://koka-lang.github.io/koka/doc/book.html#why-effects <- I found this a nice read |
2022-05-09 14:08:14 +0200 | <lortabac> | the monad instance allows you to compose functions that can have multiple results, by giving you all the possible combinations |
2022-05-09 14:08:40 +0200 | <merijn> | Which is equivalent to having a BFS of possibilities you're exploring :p |
2022-05-09 14:08:57 +0200 | <lortabac> | yes |
2022-05-09 14:09:03 +0200 | geekosaur | (~geekosaur@xmonad/geekosaur) (Read error: Connection reset by peer) |
2022-05-09 14:09:08 +0200 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2022-05-09 14:09:11 +0200 | allbery_b | geekosaur |
2022-05-09 14:09:11 +0200 | <lortabac> | somehow it only made sense to me after I learned Prolog |
2022-05-09 14:09:15 +0200 | <Franciman> | or calling the continution multiple times ^^ |
2022-05-09 14:09:30 +0200 | jmcarthur | (~jmcarthur@45.15.176.236) (Ping timeout: 240 seconds) |
2022-05-09 14:09:45 +0200 | <lortabac> | before learning Prolog the Monad instance for lists seemed completely arbitrary |
2022-05-09 14:11:43 +0200 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2022-05-09 14:11:50 +0200 | <Hecate> | personally I use it for list comprehensions :P |
2022-05-09 14:11:58 +0200 | <Hecate> | that's the usecase that makes the most sense for me |
2022-05-09 14:12:09 +0200 | <Hecate> | it's just the "non-det" terminology that messed w/ my intuition |
2022-05-09 14:12:16 +0200 | <Hecate> | thank you, you three :) |
2022-05-09 14:15:01 +0200 | raym | (~raym@user/raym) (Ping timeout: 256 seconds) |
2022-05-09 14:15:51 +0200 | raym | (~raym@user/raym) |
2022-05-09 14:17:49 +0200 | <Franciman> | i can't seem to find ghciu system requirements |
2022-05-09 14:17:52 +0200 | <Franciman> | ghci* |
2022-05-09 14:17:56 +0200 | <Franciman> | in the last user manual |
2022-05-09 14:18:04 +0200 | <Franciman> | can i run it on a mcu? |
2022-05-09 14:18:29 +0200 | <Franciman> | if not, is there another haskell interpreter working on minimal devices, possibly without host? |
2022-05-09 14:18:40 +0200 | <geekosaur> | hugs? |
2022-05-09 14:18:49 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 14:18:52 +0200 | <geekosaur> | ghci is far from minimal; it's literally ghc --interactive |
2022-05-09 14:18:54 +0200 | <Franciman> | oh it's still active? |
2022-05-09 14:18:57 +0200 | <Franciman> | nice |
2022-05-09 14:19:18 +0200 | <geekosaur> | it's not being actively maintained aside from someone keeping it building on modern systems |
2022-05-09 14:19:39 +0200 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2022-05-09 14:20:55 +0200 | <gensyst> | merijn, dminuoso thanks guys. turned out such a simple solution worked. haskell... lots of hammers to choose from. |
2022-05-09 14:21:10 +0200 | <gensyst> | or double-edged daggers i should say |
2022-05-09 14:21:22 +0200 | <merijn> | gensyst: Overenthusiastic overapplication of typeclasses is a classic beginner trap :) |
2022-05-09 14:21:52 +0200 | <Franciman> | ty very much geekosaur |
2022-05-09 14:22:03 +0200 | <Franciman> | last release is 2006, i'd love to dig into the code now ^^ |
2022-05-09 14:22:09 +0200 | <merijn> | "I don't understand typeclasses" -> "typeclasses are amazing I should use them everywhere" -> "I should probably almost never implement my own typeclasses except for some niche cases" is the usual development :p |
2022-05-09 14:22:34 +0200 | <geekosaur> | I skipped the middle step thouhg :) |
2022-05-09 14:22:58 +0200 | <gensyst> | :o |
2022-05-09 14:23:01 +0200 | <merijn> | I didn't, it makes diagnosing it in others easier :p |
2022-05-09 14:23:02 +0200 | <maerwald> | merijn: or just pass your own dictionary |
2022-05-09 14:23:13 +0200 | <merijn> | maerwald: Right, that's usually the right solution |
2022-05-09 14:23:14 +0200 | <geekosaur> | Franciman, many people believe ghc should have skipped all the weird record stuff it's come up with over the years and adopted hugs' Trex |
2022-05-09 14:23:32 +0200 | <Franciman> | Trex? |
2022-05-09 14:23:49 +0200 | <merijn> | geekosaur: Should skipped all the overloadedlabels/record fields stuff and just enabled NamedFieldPuns and NoFieldSelectors by default |
2022-05-09 14:24:25 +0200 | <merijn> | overloaded labels and record dot syntax are huge mistakes, which will hurt Haskell for decades to come, don't @ me :p |
2022-05-09 14:25:03 +0200 | <exarkun> | Speaking of typeclasses, why do both Exception and SomeException exist? |
2022-05-09 14:25:32 +0200 | <geekosaur> | SomeException isn't a typeclass, it's an existential wrapper for an exception |
2022-05-09 14:25:33 +0200 | <dminuoso> | exarkun: Great question https://simonmar.github.io/bib/papers/ext-exceptions.pdf |
2022-05-09 14:25:44 +0200 | <dminuoso> | exarkun: This is one of the best and yet underused features in Haskell. |
2022-05-09 14:26:00 +0200 | <dminuoso> | We get proper exception hierarchies like you have in Java, with the same "catch a higher base class type of exceptions" semantics. |
2022-05-09 14:26:08 +0200 | <Franciman> | wow, hugs supports .NET |
2022-05-09 14:26:16 +0200 | <merijn> | Nobody uses it, because the documentation is only in that paper :p |
2022-05-09 14:26:23 +0200 | <dminuoso> | Heh. |
2022-05-09 14:26:26 +0200 | <geekosaur> | Franciman, https://www.haskell.org/hugs/pages/hugsman/exts.html#sect7.2 |
2022-05-09 14:26:35 +0200 | <merijn> | 90% of the uses of extensible exceptions that I know are people cribbing from my phd codebase after linking that here :p |
2022-05-09 14:26:46 +0200 | <dminuoso> | I belong to the other 10% |
2022-05-09 14:26:49 +0200 | <Franciman> | oh thanks geekosaur |
2022-05-09 14:26:54 +0200 | <Franciman> | reminds me of sml's records |
2022-05-09 14:27:16 +0200 | acidjnk | (~acidjnk@p200300d0c7068b566ddd60c7ad103c7d.dip0.t-ipconnect.de) |
2022-05-09 14:27:25 +0200 | <maerwald> | merijn: "documentation is only in that paper" is a common thing in haskell |
2022-05-09 14:27:30 +0200 | <exarkun> | Thanks for the link. On my reading list now. :) |
2022-05-09 14:28:28 +0200 | <Franciman> | Hugs is written in C :O |
2022-05-09 14:28:54 +0200 | <Franciman> | maybe it's just the bootstarp |
2022-05-09 14:28:59 +0200 | <geekosaur> | nope |
2022-05-09 14:29:13 +0200 | <geekosaur> | iiirc it's actually written in c++ |
2022-05-09 14:29:33 +0200 | <geekosaur> | downside is it's only an interpreter, not a compiler |
2022-05-09 14:30:38 +0200 | <geekosaur> | …and practically nothing written in the past 15 years works in it because nobody ever ported e.g. text to hugs' extensions system |
2022-05-09 14:30:54 +0200 | <dminuoso> | I honestly thing a lot of hackage would be way better off, if there was less "who can write the purest code" competitions with competing stacks of language extensions enabled. Just give me IO, and just give me dynamic exception hierarchies. |
2022-05-09 14:31:12 +0200 | <merijn> | dminuoso: Just give me checked exceptions :( |
2022-05-09 14:31:23 +0200 | <dminuoso> | merijn: Not trying my luck here. |
2022-05-09 14:31:36 +0200 | <merijn> | Anyone who mentions Either is getting thwapped with the thwapping stick |
2022-05-09 14:31:47 +0200 | <dminuoso> | That checked exceptions kickstarts another battle of "best effect system" with dependent typing and at least 20 extensions enabled. |
2022-05-09 14:31:50 +0200 | <merijn> | dminuoso: I'm irrational :p |
2022-05-09 14:32:08 +0200 | <int-e> | merijn: Let me bring up Control.Monad.Error then |
2022-05-09 14:32:12 +0200 | <merijn> | Naah, I am fundamentally convinced most effect systems are a mistake |
2022-05-09 14:32:26 +0200 | <dminuoso> | I think they are fine as explorations of ideas |
2022-05-09 14:33:02 +0200 | <Franciman> | thanks geekosaur this is a true pearl |
2022-05-09 14:33:03 +0200 | <merijn> | I want "functional" types checking the computation done by code. And I want "non-functional" types (wrt things like GC, performance/laziness, exceptions) |
2022-05-09 14:33:09 +0200 | <merijn> | And *most importantly* |
2022-05-09 14:33:21 +0200 | <merijn> | I don't want those separate things making each other less readable |
2022-05-09 14:33:37 +0200 | <merijn> | Which is what Control.Monad.Error and all the effect systems end up doing |
2022-05-09 14:33:50 +0200 | <merijn> | And basically all other attempts to encode non-functional constraint in Haskell's type system |
2022-05-09 14:34:02 +0200 | <maerwald> | stop making sense |
2022-05-09 14:34:05 +0200 | <merijn> | I just want multiple, independent, but collaborating type systems for these different things |
2022-05-09 14:34:16 +0200 | <int-e> | ... |
2022-05-09 14:34:38 +0200 | <merijn> | I want statically checked exceptions of which I can guarantee the absence *without* changing division from "Fractional a => a -> a -> a" to encode that in the result |
2022-05-09 14:34:48 +0200 | <int-e> | I'm not sure this makes any sense. I mean, it's a nice dream to have, but how is that supposed to look like in practice... while maintaining readability? |
2022-05-09 14:34:51 +0200 | <dminuoso> | maerwald: Since we see eye-to-eye on TLS in Haskell, any preferred library for quickly interacting with HTTPS secured JSON APIs? |
2022-05-09 14:35:08 +0200 | <dminuoso> | Im seriously debating whether to just put a local nginx reverse proxy to handle TLS... |
2022-05-09 14:35:11 +0200 | <merijn> | int-e: I've started on prototypes a few times to figure that out/convince people |
2022-05-09 14:35:22 +0200 | <dminuoso> | So I dont have to rely on cryptonite or others |
2022-05-09 14:35:24 +0200 | <merijn> | int-e: But then I inevitably run out of motivation to do that in my spare time :p |
2022-05-09 14:35:40 +0200 | <merijn> | And no one wanted to let me do a PHD on that (at least not in a location I was willing to live) |
2022-05-09 14:35:48 +0200 | <merijn> | So, we'll probably never know :p |
2022-05-09 14:36:36 +0200 | <int-e> | GHC does have way too many extensions though... and because they're there, people use them :P |
2022-05-09 14:37:11 +0200 | <int-e> | (Not all people use all of them, of course. It's like C++ where everyone has their favorite subset. Not a redeeming quality of C++, btw.) |
2022-05-09 14:37:38 +0200 | <dminuoso> | Maybe we should do an IPO for GHC. By then, stockholders will install a new board that will monetarize GHC. Each use of a Language pragma costs an EUR per download on hackage. |
2022-05-09 14:37:48 +0200 | <dminuoso> | Problem solved? |
2022-05-09 14:39:15 +0200 | <int-e> | . o O ( cabal: Warning: This package enables the following extensions: [...]. Do you know what they do? ) |
2022-05-09 14:39:55 +0200 | <dminuoso> | Unrelatedly, Im thinking about a program that just installs a few callbacks via FFI but has nothing else to do. How can I reliably block the main thread? |
2022-05-09 14:40:06 +0200 | <dminuoso> | Without wasting CPU cycles that is. :-) |
2022-05-09 14:40:28 +0200 | <merijn> | dminuoso: sleep on MVar |
2022-05-09 14:40:43 +0200 | <int-e> | make an FFI call that blocks |
2022-05-09 14:40:44 +0200 | <dminuoso> | merijn: will that not potentially cause deadlock errors? |
2022-05-09 14:40:55 +0200 | <merijn> | dminuoso: why would it? |
2022-05-09 14:41:03 +0200 | <dminuoso> | Thought the RTS has some heuristics on MVar to detect them |
2022-05-09 14:41:26 +0200 | <Bulby[m]> | I love MVar it makes my status bar work good, even with DBus requests that run in a different thread |
2022-05-09 14:41:33 +0200 | <dminuoso> | Ah but know what, I can just install another signal handler that puts to the MVar. |
2022-05-09 14:41:38 +0200 | <dminuoso> | Might not be such a terrible idea. |
2022-05-09 14:41:39 +0200 | <merijn> | dminuoso: It has no heuristics |
2022-05-09 14:41:49 +0200 | <merijn> | It has deterministic detection |
2022-05-09 14:41:57 +0200 | <int-e> | I suppose there are worse things to try than forever $ threadDelay 1000000000 |
2022-05-09 14:42:12 +0200 | <merijn> | If all referenced to an MVar are blocked on *that* mvar it detects a deadlock |
2022-05-09 14:42:15 +0200 | <geekosaur> | thst only lasts 49 days, I think |
2022-05-09 14:42:25 +0200 | <int-e> | geekosaur: hence "forever" |
2022-05-09 14:42:27 +0200 | <geekosaur> | oh, not that one |
2022-05-09 14:42:31 +0200 | <geekosaur> | yeh |
2022-05-09 14:42:33 +0200 | <merijn> | So, as long as something *can* wake up the MVar it's fine |
2022-05-09 14:42:43 +0200 | <dminuoso> | "For some reason this program crashes every 1 1/2 months or so. But its fine, we have a cronjob that restarts it every 30 days" |
2022-05-09 14:42:57 +0200 | <int-e> | > 10^6 / 86400 |
2022-05-09 14:42:59 +0200 | <lambdabot> | 11.574074074074074 |
2022-05-09 14:43:07 +0200 | <int-e> | > 2^32 / 86400 |
2022-05-09 14:43:08 +0200 | <lambdabot> | 49710.26962962963 |
2022-05-09 14:43:10 +0200 | oxide | (~lambda@user/oxide) (Ping timeout: 240 seconds) |
2022-05-09 14:43:20 +0200 | <dminuoso> | merijn: What's the mechanism to identify "something can" here? |
2022-05-09 14:43:21 +0200 | <int-e> | ah, that's the 49 days |
2022-05-09 14:43:28 +0200 | <int-e> | (2^32ms) |
2022-05-09 14:43:31 +0200 | <merijn> | dminuoso: References to said MVar |
2022-05-09 14:43:35 +0200 | <geekosaur> | yeh |
2022-05-09 14:43:38 +0200 | <merijn> | dminuoso: GC roots |
2022-05-09 14:44:03 +0200 | <geekosaur> | somewhat infamously there was a linux kernel bug where it crashed every 49 days because of a wraparound |
2022-05-09 14:44:05 +0200 | <dminuoso> | I see, so if the MVar is blocked via one root, there must be an an alternate GC root that points to the same MVar? |
2022-05-09 14:44:23 +0200 | <merijn> | Each thread is a GC root, so if each thread that has an MVar reference is blocked *on that MVar* it can trivially conclude none of them will ever wakeup |
2022-05-09 14:44:33 +0200 | <merijn> | dminuoso: Yes, like potential callbacks or whatever |
2022-05-09 14:44:37 +0200 | <dminuoso> | Perfect. |
2022-05-09 14:44:38 +0200 | <dminuoso> | Then a signal handler for SIGTERM that puts to the mvar seems great. |
2022-05-09 14:45:00 +0200 | <merijn> | I'd hesitate to rely on anything involving signal handlers, tbh :p |
2022-05-09 14:45:03 +0200 | <dminuoso> | (And no, I dont want any stories about how horrible signals are on haskell) |
2022-05-09 14:45:10 +0200 | <dminuoso> | Damnit, you beat me. |
2022-05-09 14:45:21 +0200 | <dminuoso> | :) |
2022-05-09 14:45:22 +0200 | <merijn> | Ok, so stories about how horrible signals are in *any* language, then? :D |
2022-05-09 14:46:09 +0200 | <merijn> | There's two kinds of people |
2022-05-09 14:46:13 +0200 | <Bulby[m]> | the i3bar protocol wants you to use status signals to keep going/stop |
2022-05-09 14:46:25 +0200 | <merijn> | Those who know they can't safely use signals and people *who are wrong* |
2022-05-09 14:46:30 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2022-05-09 14:47:07 +0200 | <dminuoso> | Is your opinion written down somewhere? |
2022-05-09 14:47:09 +0200 | <dminuoso> | Maybe a gist at github? |
2022-05-09 14:47:29 +0200 | <dminuoso> | If I have some time, Id be interested in your argumentation where the fundamnetal problems are (in particular with respect to GHC haskell) |
2022-05-09 14:47:34 +0200 | gehmehgeh | (~user@user/gehmehgeh) (Ping timeout: 240 seconds) |
2022-05-09 14:47:51 +0200 | <dminuoso> | Given that you bring it up every now and then, it might be worth simply having an URL to point to |
2022-05-09 14:47:53 +0200 | <merijn> | dminuoso: Is it written down somewhere (and how to do it properly?)? Yes! |
2022-05-09 14:47:55 +0200 | oxide | (~lambda@user/oxide) |
2022-05-09 14:47:58 +0200 | <dminuoso> | Ah! |
2022-05-09 14:48:00 +0200 | <dminuoso> | Where? |
2022-05-09 14:48:10 +0200 | <merijn> | dminuoso: Except it's in a GHC issues and I can't find it, because you can't search for issues you commented on on gitlab... |
2022-05-09 14:48:24 +0200 | <merijn> | Only ones you created |
2022-05-09 14:48:25 +0200 | <merijn> | RIP |
2022-05-09 14:48:25 +0200 | <dminuoso> | Haha, sounds like gitlab alright. |
2022-05-09 14:48:37 +0200 | gehmehgeh | (~user@user/gehmehgeh) |
2022-05-09 14:48:38 +0200 | <merijn> | So "somewhere" :) |
2022-05-09 14:49:42 +0200 | <merijn> | dminuoso: Ah! God is with you |
2022-05-09 14:49:47 +0200 | <merijn> | dminuoso: There's a discussion here: https://gitlab.haskell.org/ghc/ghc/-/issues/20031 |
2022-05-09 14:51:30 +0200 | <merijn> | dminuoso: The problem boils down to "signal handling in a multi-threaded process is lunacy, because they weren't designed for that" and since the RTS essentially always uses threads you are *always* a multi-threaded program |
2022-05-09 14:52:22 +0200 | <maerwald> | dminuoso: https://hackage.haskell.org/package/http-client-openssl |
2022-05-09 14:53:02 +0200 | gensyst | (gensyst@user/gensyst) (Quit: Leaving) |
2022-05-09 14:53:28 +0200 | <maerwald> | or https://hackage.haskell.org/package/http-io-streams |
2022-05-09 14:53:46 +0200 | <dminuoso> | That dependencies list hurts my eyes already. :( |
2022-05-09 14:53:59 +0200 | <maerwald> | and hvr is listed as maintainer, which gives you bad odds |
2022-05-09 14:56:25 +0200 | shriekingnoise | (~shrieking@201.231.16.156) |
2022-05-09 14:56:49 +0200 | <dminuoso> | I really dont understand why we have a wealth of complicated http libraries with these large dependency footprints. :( |
2022-05-09 14:57:14 +0200 | <maerwald> | http-client-openssl isn't that bloated |
2022-05-09 14:57:45 +0200 | <dminuoso> | Mmm I guess http-client is okayish |
2022-05-09 14:58:11 +0200 | <dminuoso> | And re hvr, that's a snoyman package. Not sure whether thats better given the current situation! :po |
2022-05-09 14:58:27 +0200 | <dminuoso> | But that aside, I guess http-client is the way to go. |
2022-05-09 14:58:42 +0200 | <dminuoso> | Guess together with `json` this might work nicely |
2022-05-09 15:00:03 +0200 | <dminuoso> | Sometimes I really do envy other languages that give you a simple `import http; http.json("/foo/bar", {a: 1})` type of interface |
2022-05-09 15:01:16 +0200 | <maerwald> | Well, if one of snoymans packages doesn't work, there's still a chance you can pay fpco to fix it. |
2022-05-09 15:02:43 +0200 | bahamas | (~lucian@84.232.141.55) |
2022-05-09 15:06:21 +0200 | odnes | (~odnes@5-203-206-163.pat.nym.cosmote.net) |
2022-05-09 15:09:56 +0200 | acidjnk | (~acidjnk@p200300d0c7068b566ddd60c7ad103c7d.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
2022-05-09 15:14:20 +0200 | zebrag | (~chris@user/zebrag) |
2022-05-09 15:18:09 +0200 | jmcarthur | (~jmcarthur@185.240.244.197) |
2022-05-09 15:18:47 +0200 | <jmcarthur> | jackdk: The plugin readme on GitHub also led me to the overloaded package, which has a desugaring of (a subset of) proc notation that doesn't require arr |
2022-05-09 15:19:13 +0200 | <jmcarthur> | Sorry if that was a dup, my client was disconnected and I don't know if it tried to send the original after I reconnected |
2022-05-09 15:19:39 +0200 | <Axman6> | when using cabal test, how to I pass arguments to the test executable itself? |
2022-05-09 15:19:53 +0200 | <maerwald> | Axman6: use `cabal run` instead... works better anyway |
2022-05-09 15:20:03 +0200 | <Axman6> | hmm, how do I do that? |
2022-05-09 15:20:12 +0200 | <Axman6> | cabal run test:testname-from-cabal-file? |
2022-05-09 15:20:31 +0200 | <maerwald> | something like that |
2022-05-09 15:20:46 +0200 | <maerwald> | those : identifiers are hella confusing, so not sure if that particular one works |
2022-05-09 15:20:49 +0200 | <geekosaur> | cabal run test:testname -- parameters |
2022-05-09 15:21:40 +0200 | <Axman6> | got it, thank y'all |
2022-05-09 15:23:05 +0200 | <maerwald> | I think it's <project>:<test|exe>:<name> or so? |
2022-05-09 15:23:08 +0200 | Lycurgus | (~juan@user/Lycurgus) |
2022-05-09 15:23:59 +0200 | <maerwald> | or rather [<project>:][<test|exe>:]<name> |
2022-05-09 15:27:24 +0200 | shapr | (~user@pool-173-73-44-186.washdc.fios.verizon.net) (Remote host closed the connection) |
2022-05-09 15:28:26 +0200 | <dminuoso> | maerwald: There's a horrid logic behind this. |
2022-05-09 15:29:23 +0200 | <dminuoso> | In principle its [package:][ctype:]component |
2022-05-09 15:29:50 +0200 | <dminuoso> | But if memory serves right, you can name files or module names in there as well |
2022-05-09 15:31:19 +0200 | <dminuoso> | And the exact behavior differs between commands |
2022-05-09 15:31:35 +0200 | <dminuoso> | Each command calls resolveTargets with different package and component selectors |
2022-05-09 15:31:36 +0200 | <Axman6> | anyone know if there's a way to get cabal tab completion in zsh? |
2022-05-09 15:32:16 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.5) |
2022-05-09 15:33:14 +0200 | <maerwald> | https://github.com/haskell/cabal/blob/master/cabal-install/bash-completion/cabal |
2022-05-09 15:33:25 +0200 | <maerwald> | zsh supports bash completions afair |
2022-05-09 15:33:42 +0200 | <Lycurgus> | Axman6, you mean besides making a plugin for it? |
2022-05-09 15:34:08 +0200 | <Lycurgus> | i think he mans command parm completion |
2022-05-09 15:34:18 +0200 | <maerwald> | but I'm not sure they will be particularly useful, e.g. if you check --help, it's a dumpster of cli switches that may or may not be relevant |
2022-05-09 15:34:20 +0200 | <Lycurgus> | *means |
2022-05-09 15:36:57 +0200 | <Axman6> | hmm, not sure how to use that complletion script |
2022-05-09 15:37:09 +0200 | <Axman6> | I feel like I've tried this before but failed |
2022-05-09 15:37:31 +0200 | geranim0 | (~geranim0@modemcable242.171-178-173.mc.videotron.ca) |
2022-05-09 15:37:43 +0200 | <maerwald> | https://stackoverflow.com/a/8492043 |
2022-05-09 15:37:45 +0200 | <Axman6> | I did find https://github.com/coot/zsh-haskell which is easy enough to install for oh-my-zsh, but it doesn't seem to be able to complete the names of build targets |
2022-05-09 15:38:04 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 15:39:58 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 15:41:10 +0200 | gurkenglas | (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
2022-05-09 15:44:30 +0200 | Unicorn_Princess | (~Unicorn_P@93-103-228-248.dynamic.t-2.net) |
2022-05-09 15:46:37 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) |
2022-05-09 15:46:37 +0200 | wroathe | (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host) |
2022-05-09 15:46:37 +0200 | wroathe | (~wroathe@user/wroathe) |
2022-05-09 15:47:34 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 15:48:51 +0200 | Sgeo | (~Sgeo@user/sgeo) |
2022-05-09 15:50:28 +0200 | <dminuoso> | Ah yes, you can also specify `[package:][ctype:]filepath`, like `cabal build exe:src/Main.hs` |
2022-05-09 15:50:56 +0200 | <dminuoso> | My memory still says you can also specifiy Haskell module names, but I dont see how |
2022-05-09 15:54:20 +0200 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2022-05-09 15:56:37 +0200 | ph88 | (~ph88@84-30-78-253.cable.dynamic.v4.ziggo.nl) |
2022-05-09 15:57:12 +0200 | Simon62 | (~Simon@ipbcc036f5.dynamic.kabel-deutschland.de) |
2022-05-09 15:57:40 +0200 | <Simon62> | Hola |
2022-05-09 15:58:09 +0200 | <Simon62> | Given that code: |
2022-05-09 15:58:10 +0200 | <Simon62> | f a k : : I n t e g e r −> I n t e g e r |
2022-05-09 15:58:10 +0200 | <Simon62> | f a k x | t r a c e (” c a l l : f a k ” ++ show x ) F a l s e = x |
2022-05-09 15:58:11 +0200 | <Simon62> | f a k 0 = 1 |
2022-05-09 15:58:11 +0200 | <Simon62> | f a k n = n ∗ f a k ( n−1) |
2022-05-09 15:58:23 +0200 | <Simon62> | What does the FALSE mean in that syntax? |
2022-05-09 15:58:39 +0200 | <Simon62> | In general I'm not 100% sure about the second line |
2022-05-09 15:59:06 +0200 | <dminuoso> | Simon62: That's an older and no longer needed trick to silence pattern match exhaustiveness warnings. |
2022-05-09 15:59:09 +0200 | <Simon62> | I think that it just prints each step |
2022-05-09 15:59:15 +0200 | <dminuoso> | Oh wait |
2022-05-09 15:59:28 +0200 | <geekosaur> | that's a trick to trace a call. with the guard, it means that leg will never be called, but the trace will still be evaluated |
2022-05-09 15:59:28 +0200 | <dminuoso> | Yeah, so this is an interesting trick |
2022-05-09 15:59:35 +0200 | <geekosaur> | so you know when the function was called |
2022-05-09 15:59:51 +0200 | <dminuoso> | Keep in mind, you have no guarantee this will ever print, or that this will print only once. :) |
2022-05-09 16:00:02 +0200 | <Simon62> | why? |
2022-05-09 16:00:20 +0200 | <Simon62> | But what is the "False" there fore? |
2022-05-09 16:00:22 +0200 | <Simon62> | for* |
2022-05-09 16:00:28 +0200 | <Simon62> | False = x |
2022-05-09 16:00:28 +0200 | <dminuoso> | `trace` is a primitive that prints out one string when its second argument is evaluated, if ever. |
2022-05-09 16:00:34 +0200 | <geekosaur> | to make the guard evaluate to false ("don't execute"") |
2022-05-09 16:00:51 +0200 | <geekosaur> | the guard is the "|" |
2022-05-09 16:01:16 +0200 | <Simon62> | Is it perhaps possible that you could paraphrase line 2 for me? |
2022-05-09 16:01:32 +0200 | <dminuoso> | Drop the trace for a moment. |
2022-05-09 16:01:55 +0200 | <Simon62> | In my slides it also says there are "two arguments" between | and = |
2022-05-09 16:02:18 +0200 | <geekosaur> | you copy-pasted that from a pdf, didn't you? it's a mess |
2022-05-09 16:02:26 +0200 | <dminuoso> | Simon62: between | = is just a single bool expression |
2022-05-09 16:02:27 +0200 | <Simon62> | yes, sorry |
2022-05-09 16:02:36 +0200 | <dminuoso> | @let import Debug.Trace |
2022-05-09 16:02:37 +0200 | <lambdabot> | /sandbox/tmp/.L.hs:132:1: error: |
2022-05-09 16:02:37 +0200 | <lambdabot> | Debug.Trace: Can't be safely imported! |
2022-05-09 16:02:37 +0200 | <lambdabot> | The module itself isn't safe. |
2022-05-09 16:02:40 +0200 | <dminuoso> | Gah. |
2022-05-09 16:02:46 +0200 | <dminuoso> | trace :: String -> a -> a |
2022-05-09 16:02:51 +0200 | <Simon62> | Wait a second |
2022-05-09 16:02:52 +0200 | <dminuoso> | You can see it takes two arguments. |
2022-05-09 16:02:54 +0200 | <Simon62> | I have the code |
2022-05-09 16:03:05 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-05-09 16:03:10 +0200 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 246 seconds) |
2022-05-09 16:03:24 +0200 | <Simon62> | import Debug.Trace |
2022-05-09 16:03:25 +0200 | <Simon62> | fak :: Integer -> Integer |
2022-05-09 16:03:25 +0200 | <Simon62> | fak x | trace ("call: fak " ++ show x) False = x |
2022-05-09 16:03:26 +0200 | <Simon62> | fak 0 = 1 |
2022-05-09 16:03:26 +0200 | <Simon62> | fak n = n * fak (n-1) |
2022-05-09 16:03:54 +0200 | <dminuoso> | Imagine that second line read: `fak x | False = x` for a second |
2022-05-09 16:03:58 +0200 | Lycurgus | (~juan@user/Lycurgus) (Quit: Exeunt) |
2022-05-09 16:04:03 +0200 | <dminuoso> | Do you see how this is essentially a dead, useless, definition? |
2022-05-09 16:04:22 +0200 | <dminuoso> | If you ever call `fak`, it would always try out the first definition, evaluate the guard, determine its `False`, and then skip to the next definition. |
2022-05-09 16:05:29 +0200 | <Simon62> | Why is it "=" and not "=="? |
2022-05-09 16:05:34 +0200 | <dminuoso> | It's a definition. |
2022-05-09 16:05:52 +0200 | <dminuoso> | Think along these lines `f x | x > 10 = x * 2` |
2022-05-09 16:05:59 +0200 | <dminuoso> | See how between | and = there is a Bool expression? |
2022-05-09 16:06:07 +0200 | <dminuoso> | x > 10 :: Bool |
2022-05-09 16:06:22 +0200 | <Simon62> | yes |
2022-05-09 16:06:27 +0200 | <dminuoso> | :t False |
2022-05-09 16:06:28 +0200 | <lambdabot> | Bool |
2022-05-09 16:06:31 +0200 | <dminuoso> | This too is a Bool expression |
2022-05-09 16:06:38 +0200 | <geekosaur> | it might help if you read "|" as "where" |
2022-05-09 16:06:55 +0200 | <geekosaur> | or as "when" to avoid collision with the "where" keyword |
2022-05-09 16:07:12 +0200 | <geekosaur> | "fak x, when False, is x" |
2022-05-09 16:07:25 +0200 | <dminuoso> | Simon62: So `f x | True = x * 7` is a definition, whose guard will always evaluate to True (because True evaluates to.. True..) |
2022-05-09 16:07:36 +0200 | <dminuoso> | Interesting bit, somewhere in base someone defined `otherwise = True` |
2022-05-09 16:07:47 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
2022-05-09 16:08:31 +0200 | <dminuoso> | Which is why you might have written `| otherwise = ...` - it's just a guard that is always true. When that guard is tried, it will always succeed and use that definition that follows |
2022-05-09 16:09:01 +0200 | <dminuoso> | `| False = ...` is the opposite, its a guard that always evaluates to false, so the definition is never used. You can think of this as some `if false { ... }` perhaps |
2022-05-09 16:09:05 +0200 | <Simon62> | "fak x, when False, is x" |
2022-05-09 16:09:06 +0200 | <Simon62> | Thanks! |
2022-05-09 16:09:06 +0200 | <Simon62> | The "is" here just lets me think of "==", but I'm about to get it. |
2022-05-09 16:09:07 +0200 | <Simon62> | So bascially we are definiting "True" as x (and x is whatever the user says x to be, but it is a number) and that does not make sense as you say and therefore it's always True |
2022-05-09 16:09:39 +0200 | <geekosaur> | no |
2022-05-09 16:09:42 +0200 | <Simon62> | So the guard (everything after "|") just has to be true so that something happens |
2022-05-09 16:09:56 +0200 | <geekosaur> | the "= x" never happens because the guard is False |
2022-05-09 16:09:58 +0200 | <Simon62> | Ah wait, and what is the "trace" needed for then? |
2022-05-09 16:10:07 +0200 | <geekosaur> | so this is a useless definition |
2022-05-09 16:10:08 +0200 | <dminuoso> | Simon62: *when the guard is true, the following definition will be used. |
2022-05-09 16:10:15 +0200 | <geekosaur> | until you drop the "trace" in |
2022-05-09 16:10:20 +0200 | <dminuoso> | *when the guard is false, its definition will not be used, and the next definition will be tried. |
2022-05-09 16:10:44 +0200 | <dminuoso> | So a definition with a guard that is statically false will *always* be skipped. |
2022-05-09 16:10:58 +0200 | <dminuoso> | But to know to skip this definition, GHC has to first evaluate what goes between `|` and `=` |
2022-05-09 16:11:41 +0200 | <geekosaur> | with the trace, when it evaluates the guard, it prints that it's calling "fak" and its parameter. then, because the second parameter to "trace" is False, the guard evaluates False and it falls through to the next definition |
2022-05-09 16:11:53 +0200 | <geekosaur> | so this is a cheaty way to get a call trace |
2022-05-09 16:13:08 +0200 | <Simon62> | interesting |
2022-05-09 16:13:58 +0200 | <dminuoso> | Simon62: and the reason I said you dont get any guarantees about printing, is because in general the compiler is free to evaluate things once, multiple times, or not at all. |
2022-05-09 16:13:59 +0200 | <Simon62> | What in Java would you compare these Guards with? |
2022-05-09 16:14:18 +0200 | <dminuoso> | There's no good equivalent in Java |
2022-05-09 16:14:28 +0200 | <Simon62> | dminuoso But the compiler has no free will, how can he decide? |
2022-05-09 16:14:33 +0200 | <dminuoso> | They very broadly encode the idea of "early return" |
2022-05-09 16:14:38 +0200 | <dminuoso> | But its not a 1:1 mapping |
2022-05-09 16:14:53 +0200 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2022-05-09 16:15:08 +0200 | <dminuoso> | Simon62: It has a huge pile of heuristics to transform code that not a single person understands well. :p |
2022-05-09 16:15:15 +0200 | <dminuoso> | In simple terms: |
2022-05-09 16:15:30 +0200 | <dminuoso> | The compiler can simply inline a definition, consider the difference between: |
2022-05-09 16:15:50 +0200 | <dminuoso> | let x = trace "hello world" 10 in (x, x) |
2022-05-09 16:15:55 +0200 | <dminuoso> | or if we inline the definition of x |
2022-05-09 16:16:11 +0200 | <dminuoso> | (trace "hello world" 10, trace "hello world" 10) |
2022-05-09 16:16:13 +0200 | <geekosaur> | the compiler is free to pick an evaluation strategy as long as it produces the same result as doing things naïvely. purity ensures that there are transformations and evaluation strategies that are safe to use because they will produce the same result |
2022-05-09 16:16:51 +0200 | <dminuoso> | Simon62: GHC is free to do the above transformation, because it has no idea that `trace` causes a visible side effect - the order of *evaluation* is unspecified. |
2022-05-09 16:16:55 +0200 | <Simon62> | how do you do the dots at "naïvely"? |
2022-05-09 16:17:18 +0200 | <dminuoso> | in this sense, `trace` is a dark and evil primitive, whose existence is soley for debugging |
2022-05-09 16:17:45 +0200 | <Hecate> | It's a diacritic |
2022-05-09 16:17:49 +0200 | <Simon62> | absolute x |
2022-05-09 16:17:50 +0200 | <Simon62> | | x<0 = -x |
2022-05-09 16:17:50 +0200 | <Simon62> | | otherwise = x |
2022-05-09 16:17:51 +0200 | <Simon62> | So this is, how the guards are supposed to be used? |
2022-05-09 16:17:51 +0200 | <Simon62> | And in my example there isn't even a second option, or, the fak 0 = 1 is the second option, hmm |
2022-05-09 16:17:56 +0200 | <geekosaur> | I have XCompose set up on right Alt, so it's <right alt> i " |
2022-05-09 16:18:10 +0200 | <dminuoso> | Simon62: sure! |
2022-05-09 16:18:18 +0200 | <dminuoso> | Simon62: note that `otherwise` is defined as `True` somewhere |
2022-05-09 16:18:24 +0200 | <Simon62> | "in this sense, `trace` is a dark and evil primitive, whose existence is soley for debugging" interesting |
2022-05-09 16:18:24 +0200 | <dminuoso> | That is, in base there is a line that reads `otherwise = True` |
2022-05-09 16:18:39 +0200 | <geekosaur> | on windows there's a different way to do it, unless you install wincompose and then you can do it the same way |
2022-05-09 16:18:53 +0200 | <geekosaur> | but wincompose is mostly for when we unix folk have to use windows :) |
2022-05-09 16:19:23 +0200 | <dminuoso> | Simon62: So in haskell we separate *execution* (which causes visible side-effects) from *evaluation* (which is just substituting variables for their definitions, over and over again) |
2022-05-09 16:19:36 +0200 | <dminuoso> | and `trace` is evil because it lets you do visible-side effects during evaluation. |
2022-05-09 16:20:08 +0200 | <dminuoso> | It lets you "observe" during evaluation, but with the quirks that you dont necessarily know the order, and what actually is evaluated |
2022-05-09 16:20:22 +0200 | <dminuoso> | which is why you cant rely on this at all for production use |
2022-05-09 16:20:45 +0200 | <geekosaur> | as to your second option, you have three. the first is the trace, the second is the base case, the third the recursive case |
2022-05-09 16:20:54 +0200 | <Simon62> | :t trace("test") |
2022-05-09 16:20:55 +0200 | <lambdabot> | error: |
2022-05-09 16:20:55 +0200 | <lambdabot> | Variable not in scope: trace :: [Char] -> t |
2022-05-09 16:21:06 +0200 | <Simon62> | :t trace("test") False |
2022-05-09 16:21:07 +0200 | <dminuoso> | Simon62: lambdabot doesnt expose trace, sadly |
2022-05-09 16:21:08 +0200 | <lambdabot> | error: |
2022-05-09 16:21:08 +0200 | <lambdabot> | Variable not in scope: trace :: [Char] -> Bool -> t |
2022-05-09 16:21:14 +0200 | <geekosaur> | :t Debug.Trace.trace "test" |
2022-05-09 16:21:15 +0200 | <lambdabot> | a -> a |
2022-05-09 16:21:22 +0200 | <dminuoso> | Oh, it does? |
2022-05-09 16:21:24 +0200 | xaotuk | (~sasha@2a06:5b00:15fe:9b00::2) (Ping timeout: 240 seconds) |
2022-05-09 16:21:33 +0200 | <geekosaur> | only for :t because it can't evaluate it |
2022-05-09 16:21:37 +0200 | <dminuoso> | Ah |
2022-05-09 16:21:47 +0200 | <dminuoso> | Simon62: Feel free to `import Debug.Trace` in ghci and play around with it. |
2022-05-09 16:21:51 +0200 | <Simon62> | :t Trace.trace "test" False |
2022-05-09 16:21:53 +0200 | <lambdabot> | error: |
2022-05-09 16:21:53 +0200 | <lambdabot> | Not in scope: ‘Trace.trace’ |
2022-05-09 16:21:53 +0200 | <lambdabot> | No module named ‘Trace’ is imported. |
2022-05-09 16:22:03 +0200 | <Simon62> | :t Debug,Trace.trace "test" False |
2022-05-09 16:22:04 +0200 | <lambdabot> | error: parse error on input ‘,’ |
2022-05-09 16:22:06 +0200 | <Simon62> | :t Debug.Trace.trace "test" False |
2022-05-09 16:22:08 +0200 | <lambdabot> | Bool |
2022-05-09 16:22:12 +0200 | <Simon62> | hehe |
2022-05-09 16:22:16 +0200 | <Simon62> | Nice |
2022-05-09 16:22:18 +0200 | <Simon62> | I get it |
2022-05-09 16:22:20 +0200 | <Simon62> | Thanks guys |
2022-05-09 16:23:07 +0200 | <Simon62> | :t Debug.Trace.trace |
2022-05-09 16:23:09 +0200 | <lambdabot> | String -> a -> a |
2022-05-09 16:24:02 +0200 | <int-e> | :t Debug.Trace.traceShow |
2022-05-09 16:24:03 +0200 | <lambdabot> | Show a => a -> b -> b |
2022-05-09 16:24:22 +0200 | <dminuoso> | :t Debug.Trace.traceShowId |
2022-05-09 16:24:22 +0200 | <lambdabot> | Show a => a -> a |
2022-05-09 16:24:24 +0200 | <dminuoso> | My favourite of the bunch |
2022-05-09 16:24:39 +0200 | int-e | likes this pattern for quick-and-dirty tracing of function calls: foo a b | traceShow ("foo", a, b) False = undefined |
2022-05-09 16:24:46 +0200 | <dminuoso> | You can drop this into any place with little to no modification :) |
2022-05-09 16:24:51 +0200 | <geekosaur> | that's what we've been explaining |
2022-05-09 16:25:04 +0200 | <dminuoso> | Yeah its a cool trick |
2022-05-09 16:25:14 +0200 | <Simon62> | so basically trace is like print but that it also executes it's second argument afterwards? |
2022-05-09 16:25:28 +0200 | <Simon62> | Like "print . _some function_" |
2022-05-09 16:25:34 +0200 | <dminuoso> | Simon62: not quite |
2022-05-09 16:25:34 +0200 | <Simon62> | notice the "." |
2022-05-09 16:25:40 +0200 | <int-e> | Ah, missing context as usual :/ |
2022-05-09 16:25:43 +0200 | <dminuoso> | the phrase "execution" is a bit misplaced here. |
2022-05-09 16:25:52 +0200 | <dminuoso> | Simon62: think of it rather as a "hook" in the evaluator. |
2022-05-09 16:26:03 +0200 | <dminuoso> | that is, you can hook into the moment when an arbitrary expression gets evaluated. |
2022-05-09 16:26:46 +0200 | <dminuoso> | (so you see why this might print none, once or multiple times, the actual printing depends on how often that expression really gets evaluated) |
2022-05-09 16:26:58 +0200 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
2022-05-09 16:27:12 +0200 | <Simon62> | I see |
2022-05-09 16:27:26 +0200 | <Simon62> | I wish our prof would have said that trace requiered two arguments earlier haha |
2022-05-09 16:27:39 +0200 | <dminuoso> | In fact we have an even more dangerous dark primitive to execute *arbitrary* IO things, which is what trace is build around with. |
2022-05-09 16:28:27 +0200 | <dminuoso> | so `trace` can be thought to install a printing hook |
2022-05-09 16:29:02 +0200 | <Simon62> | very interesting, thanks |
2022-05-09 16:29:06 +0200 | <dminuoso> | but we can do other hooks as well, but this is notoriously difficult to use right. but, turns out if all you care is just printing some debug information, it doesnt really matter if you cant reason about the order or frequency |
2022-05-09 16:29:42 +0200 | <Simon62> | couldn't you also hook a simple print to it somehow? |
2022-05-09 16:29:56 +0200 | <dminuoso> | Yes, that's trace. |
2022-05-09 16:30:07 +0200 | <dminuoso> | That's exactly what it is |
2022-05-09 16:30:13 +0200 | <Simon62> | Alright |
2022-05-09 16:33:26 +0200 | <Simon62> | dminuoso please excuse that question, but why couldn't I just write "fak x | print ("call: fak " ++ show x) False = x"? |
2022-05-09 16:33:34 +0200 | <Simon62> | gives me an error |
2022-05-09 16:33:43 +0200 | <Simon62> | Ah I know |
2022-05-09 16:33:48 +0200 | <Simon62> | Because print only takes one argument |
2022-05-09 16:33:59 +0200 | <Simon62> | But doesn't it still work because it's part of the guard |
2022-05-09 16:34:09 +0200 | <Simon62> | Oh, or the guard can only have one argument at a time right? |
2022-05-09 16:35:04 +0200 | <dminuoso> | The fundamental first problem is, a guard takes an expression of type Bool |
2022-05-09 16:35:09 +0200 | <dminuoso> | Secondly |
2022-05-09 16:35:11 +0200 | <dminuoso> | :t print |
2022-05-09 16:35:12 +0200 | <lambdabot> | Show a => a -> IO () |
2022-05-09 16:35:19 +0200 | <dminuoso> | You're trying to apply `print` to two arguments. |
2022-05-09 16:35:19 +0200 | <Simon62> | Is it bad coding style if I just always use "True" instead of "otherwise"? |
2022-05-09 16:35:46 +0200 | <dminuoso> | Simon62: For learning? Does not really matter. |
2022-05-09 16:35:52 +0200 | <k`> | Simon62: No but it's nonstandard. |
2022-05-09 16:36:05 +0200 | <k`> | Rather, unconventional. |
2022-05-09 16:36:06 +0200 | <Simon62> | k` What do you mean by nonstandard? |
2022-05-09 16:36:14 +0200 | <dminuoso> | Everyone else would use `otherwise` |
2022-05-09 16:36:21 +0200 | <Simon62> | unconventional: True or otherwise? |
2022-05-09 16:36:27 +0200 | <Simon62> | I see |
2022-05-09 16:36:28 +0200 | <dminuoso> | But if you want to use True, especially to learn that guards take bool expressions, go for it? |
2022-05-09 16:36:55 +0200 | <Simon62> | so otherwise is "de facto" standard? (is that what nonstandard means?) |
2022-05-09 16:37:07 +0200 | <Simon62> | :t Trace.trace |
2022-05-09 16:37:08 +0200 | <lambdabot> | error: |
2022-05-09 16:37:08 +0200 | <lambdabot> | Not in scope: ‘Trace.trace’ |
2022-05-09 16:37:08 +0200 | <lambdabot> | No module named ‘Trace’ is imported. |
2022-05-09 16:37:14 +0200 | <Simon62> | :t Debug.Trace.trace |
2022-05-09 16:37:14 +0200 | <int-e> | I'd call `otherwise` idiomatic |
2022-05-09 16:37:16 +0200 | <lambdabot> | String -> a -> a |
2022-05-09 16:37:36 +0200 | <dminuoso> | There's also a competion version that uses a separate definition rather than `| otherwise = ...` |
2022-05-09 16:37:39 +0200 | <dminuoso> | that is, rather than writing: |
2022-05-09 16:37:48 +0200 | <dminuoso> | f x | x > 10 = .... |
2022-05-09 16:37:53 +0200 | <Simon62> | Can you give me an example where trace returns an Integer? |
2022-05-09 16:37:55 +0200 | <dminuoso> | | otherwise = .... |
2022-05-09 16:37:57 +0200 | <dminuoso> | You might write: |
2022-05-09 16:38:02 +0200 | <dminuoso> | f x | x > 10 = ... |
2022-05-09 16:38:06 +0200 | <dminuoso> | f x = ... |
2022-05-09 16:38:14 +0200 | <int-e> | Simon62: trace "" 0 |
2022-05-09 16:38:16 +0200 | <dminuoso> | Lately I tend to favour the second style |
2022-05-09 16:38:28 +0200 | <Simon62> | print trace "" 0 |
2022-05-09 16:38:32 +0200 | <int-e> | Simon62: it returns the second argument; if that's an integer... |
2022-05-09 16:38:36 +0200 | <int-e> | print (trace "" 0) |
2022-05-09 16:39:12 +0200 | <int-e> | (((print trace) "") 0) makes little sense; it'll complain about a missing Show instance, most likely |
2022-05-09 16:39:43 +0200 | <k`> | Simon62: Re otherwise -- It's convention, not standard. hlint will complain, and some folks may internally rage, but the meaning is totally obvious. |
2022-05-09 16:40:01 +0200 | Simon62 | laughes |
2022-05-09 16:40:47 +0200 | <int-e> | f x | x > 10 = ... | () <- () = ... -- if you *want* to make people rage, try this trick! |
2022-05-09 16:42:04 +0200 | <k`> | Yeah, please don't do that. |
2022-05-09 16:42:21 +0200 | <Simon62> | I get a parse error |
2022-05-09 16:42:24 +0200 | <int-e> | can you be a good programmer without knowing what bad code looks like? |
2022-05-09 16:43:04 +0200 | <int-e> | > let f x | x > 10 = x-1 | () <- () = x+1 in (f 10, f 11) |
2022-05-09 16:43:05 +0200 | <lambdabot> | (11,10) |
2022-05-09 16:43:53 +0200 | <k`> | One advantage is `| True = ...` and `| _ <- () = ...` work without Prelude. |
2022-05-09 16:44:09 +0200 | xaotuk | (~sasha@net64-36-245-109.mbb.telenor.rs) |
2022-05-09 16:44:52 +0200 | <dminuoso> | Gah, what was that new primitive for impossible guards that dont trigger the ghc exhaustiveness checker diagnostics since Lower Your Guards? |
2022-05-09 16:44:54 +0200 | <int-e> | k`: `True` will not be in scope then |
2022-05-09 16:45:01 +0200 | <k`> | If you ever find yourself writing `import Prelude (otherwise)`. I don't think `otherwise` is exported by `Data.Bool`. |
2022-05-09 16:45:12 +0200 | Pickchea | (~private@user/pickchea) |
2022-05-09 16:45:55 +0200 | <k`> | Oops, well, I'm wrong. Must have been importing `Data.Bool (Bool (..))`. |
2022-05-09 16:46:20 +0200 | <dminuoso> | does hoogle allow me to search for all values of type Bool in the base package? |
2022-05-09 16:46:22 +0200 | <k`> | In the future I'll just import all of Data.Bool and use `otherwise`. |
2022-05-09 16:46:48 +0200 | moonsheep | (~user@iespladelestany.xtec.cat) |
2022-05-09 16:46:51 +0200 | <opqdonut> | contrariwise = unsafePerformIO (modifyIORef global not >> readIORef global) |
2022-05-09 16:47:30 +0200 | <k`> | dminuoso: No, I don't think so. |
2022-05-09 16:47:42 +0200 | Kaipei | (~Kaiepi@156.34.47.253) (Ping timeout: 276 seconds) |
2022-05-09 16:48:02 +0200 | <dminuoso> | Ahh wait, I have it |
2022-05-09 16:48:05 +0200 | <dminuoso> | https://hackage.haskell.org/package/base-4.16.1.0/docs/GHC-Exts.html#v:considerAccessible |
2022-05-09 16:48:26 +0200 | <dminuoso> | This is a truly magical version of otherwise. |
2022-05-09 16:48:36 +0200 | xaotuk | (~sasha@net64-36-245-109.mbb.telenor.rs) (Ping timeout: 248 seconds) |
2022-05-09 16:49:11 +0200 | <dminuoso> | It's a bit scary that this is not some built-in, Id be curious as to how GHC will differentiate this from `let considerAccessible = True in ...` |
2022-05-09 16:49:54 +0200 | gnyeki | (~gnyeki@user/gnyeki) (Quit: leaving) |
2022-05-09 16:50:09 +0200 | Simon62 | (~Simon@ipbcc036f5.dynamic.kabel-deutschland.de) (Quit: Client closed) |
2022-05-09 16:50:34 +0200 | xaotuk | (~sasha@178-222-23-155.dynamic.isp.telekom.rs) |
2022-05-09 16:50:47 +0200 | <k`> | That is some sorcery. |
2022-05-09 16:53:22 +0200 | gnyeki | (~gnyeki@user/gnyeki) |
2022-05-09 16:57:53 +0200 | yoggurt[m] | (~yoggurtma@2001:470:69fc:105::2:ba5) |
2022-05-09 16:58:08 +0200 | hgolden | (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) |
2022-05-09 16:58:47 +0200 | motherfsck | (~motherfsc@user/motherfsck) |
2022-05-09 16:59:35 +0200 | <int-e> | dminuoso: it's fully qualified: considerAccessibleName = varQual gHC_EXTS (fsLit "considerAccessible") considerAccessibleIdKey |
2022-05-09 17:00:03 +0200 | jakalx | (~jakalx@base.jakalx.net) |
2022-05-09 17:01:09 +0200 | Kaipei | (~Kaiepi@156.34.47.253) |
2022-05-09 17:02:10 +0200 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 240 seconds) |
2022-05-09 17:03:08 +0200 | odnes_ | (~odnes@5-203-206-163.pat.nym.cosmote.net) |
2022-05-09 17:05:35 +0200 | odnes | (~odnes@5-203-206-163.pat.nym.cosmote.net) (Ping timeout: 256 seconds) |
2022-05-09 17:08:19 +0200 | moonsheep | (~user@iespladelestany.xtec.cat) (ERC 5.4 (IRC client for GNU Emacs 28.1)) |
2022-05-09 17:13:08 +0200 | frost | (~frost@user/frost) (Ping timeout: 252 seconds) |
2022-05-09 17:13:21 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 17:18:06 +0200 | xkuru | (~xkuru@user/xkuru) |
2022-05-09 17:18:13 +0200 | odnes_ | (~odnes@5-203-206-163.pat.nym.cosmote.net) (Quit: Leaving) |
2022-05-09 17:20:11 +0200 | CiaoSen | (~Jura@p200300c95732ec002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2022-05-09 17:24:45 +0200 | xaotuk | (~sasha@178-222-23-155.dynamic.isp.telekom.rs) (Ping timeout: 276 seconds) |
2022-05-09 17:27:00 +0200 | xff0x | (~xff0x@om126033119107.35.openmobile.ne.jp) (Read error: Connection reset by peer) |
2022-05-09 17:27:21 +0200 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds) |
2022-05-09 17:29:21 +0200 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2022-05-09 17:30:20 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-05-09 17:31:47 +0200 | lortabac | (~lortabac@2a01:e0a:541:b8f0:10ff:daf4:e8f5:4537) (Quit: WeeChat 2.8) |
2022-05-09 17:33:30 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 17:36:06 +0200 | troydm | (~troydm@host-176-37-124-197.b025.la.net.ua) (Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset) |
2022-05-09 17:38:01 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 246 seconds) |
2022-05-09 17:39:05 +0200 | troydm | (~troydm@host-176-37-124-197.b025.la.net.ua) |
2022-05-09 17:39:43 +0200 | inversed | (~inversed@176.248.27.211) (Quit: Connection error?!) |
2022-05-09 17:45:04 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 17:45:55 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-05-09 17:46:40 +0200 | inversed | (~inversed@176.248.27.211) |
2022-05-09 17:49:01 +0200 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-05-09 17:49:14 +0200 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
2022-05-09 17:50:28 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 17:51:49 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2022-05-09 18:01:50 +0200 | cfricke | (~cfricke@user/cfricke) (Ping timeout: 240 seconds) |
2022-05-09 18:09:45 +0200 | slack1256 | (~slack1256@191.126.99.83) |
2022-05-09 18:11:06 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-05-09 18:11:21 +0200 | <slack1256> | http://conal.net/talks/compiling-to-categories.pdf reading this, I fail to see how this won't be a optimization blocker if it is used as a serious backend. |
2022-05-09 18:11:29 +0200 | <slack1256> | Has anyone played with this seriously? |
2022-05-09 18:12:12 +0200 | tomboy64 | (~tomboy64@user/tomboy64) (Ping timeout: 240 seconds) |
2022-05-09 18:12:40 +0200 | ccntrq | (~Thunderbi@exit-1.rz.nue.de.mhd.medondo.com) (Quit: ccntrq) |
2022-05-09 18:13:24 +0200 | pottsy | (~pottsy@129.227.183.244) (Ping timeout: 265 seconds) |
2022-05-09 18:14:32 +0200 | tomboy64 | (~tomboy64@user/tomboy64) |
2022-05-09 18:16:00 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2022-05-09 18:17:54 +0200 | vicfred | (~vicfred@user/vicfred) |
2022-05-09 18:17:57 +0200 | <jmcarthur> | slack1256: I don't necessarily disagree, but does something jump out at you as especially blocking optimizations? |
2022-05-09 18:18:16 +0200 | <jmcarthur> | I am recently interested in giving it a shot |
2022-05-09 18:18:44 +0200 | Pickchea | (~private@user/pickchea) (Ping timeout: 248 seconds) |
2022-05-09 18:19:50 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-05-09 18:23:58 +0200 | shapr | (~user@pool-173-73-44-186.washdc.fios.verizon.net) |
2022-05-09 18:24:40 +0200 | mmhat | (~mmh@2001:4090:a243:8065:ee08:6bff:fe09:5315) (Ping timeout: 250 seconds) |
2022-05-09 18:24:55 +0200 | jmcarthur | (~jmcarthur@185.240.244.197) (Ping timeout: 256 seconds) |
2022-05-09 18:34:30 +0200 | bahamas | (~lucian@84.232.141.55) (Ping timeout: 240 seconds) |
2022-05-09 18:35:16 +0200 | kuribas`` | (~user@ptr-17d51eocv4dr96js6nc.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
2022-05-09 18:37:22 +0200 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
2022-05-09 18:39:03 +0200 | mmhat | (~mmh@2001:4090:a243:802a:ee08:6bff:fe09:5315) |
2022-05-09 18:50:32 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 18:51:04 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2022-05-09 18:51:45 +0200 | gabriel_sevecek | (~gabriel@188-167-229-200.dynamic.chello.sk) |
2022-05-09 18:54:59 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
2022-05-09 18:58:12 +0200 | alp_ | (~alp@user/alp) (Ping timeout: 248 seconds) |
2022-05-09 18:58:55 +0200 | Kaipei | (~Kaiepi@156.34.47.253) (Remote host closed the connection) |
2022-05-09 18:59:12 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-05-09 18:59:20 +0200 | Kaipei | (~Kaiepi@156.34.47.253) |
2022-05-09 18:59:22 +0200 | kenran | (~kenran@200116b82b697100b4961f00ddd777f0.dip.versatel-1u1.de) |
2022-05-09 19:00:58 +0200 | hgolden | (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) (Quit: Konversation terminated!) |
2022-05-09 19:07:03 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2022-05-09 19:07:13 +0200 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2022-05-09 19:07:20 +0200 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
2022-05-09 19:07:23 +0200 | hgolden | (~hgolden2@cpe-172-251-233-141.socal.res.rr.com) |
2022-05-09 19:10:10 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-05-09 19:10:42 +0200 | bahamas | (~lucian@84.232.141.55) |
2022-05-09 19:15:37 +0200 | stackdroid18 | (14094@user/stackdroid) |
2022-05-09 19:15:52 +0200 | econo | (uid147250@user/econo) |
2022-05-09 19:15:54 +0200 | bahamas | (~lucian@84.232.141.55) (Ping timeout: 276 seconds) |
2022-05-09 19:16:27 +0200 | slac77610 | (~slack1256@186.11.83.150) |
2022-05-09 19:18:15 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2022-05-09 19:18:45 +0200 | slack1256 | (~slack1256@191.126.99.83) (Ping timeout: 256 seconds) |
2022-05-09 19:19:03 +0200 | qwedfg_ | (~qwedfg@user/qwedfg) (Quit: ZNC - https://znc.in) |
2022-05-09 19:20:30 +0200 | qwedfg | (~qwedfg@user/qwedfg) |
2022-05-09 19:21:55 +0200 | dsrt^ | (~dsrt@173-160-94-253-atlanta.hfc.comcastbusiness.net) (Remote host closed the connection) |
2022-05-09 19:26:06 +0200 | x_kuru | (~xkuru@user/xkuru) |
2022-05-09 19:27:23 +0200 | bahamas | (~lucian@84.232.141.55) |
2022-05-09 19:28:50 +0200 | xkuru | (~xkuru@user/xkuru) (Ping timeout: 240 seconds) |
2022-05-09 19:30:50 +0200 | galio | (~textual@c-174-63-73-241.hsd1.vt.comcast.net) |
2022-05-09 19:31:46 +0200 | bahamas | (~lucian@84.232.141.55) (Ping timeout: 246 seconds) |
2022-05-09 19:32:04 +0200 | x_kuru_ | (~xkuru@user/xkuru) |
2022-05-09 19:33:05 +0200 | bahamas | (~lucian@84.232.141.55) |
2022-05-09 19:34:50 +0200 | x_kuru | (~xkuru@user/xkuru) (Ping timeout: 240 seconds) |
2022-05-09 19:37:29 +0200 | bahamas | (~lucian@84.232.141.55) (Ping timeout: 248 seconds) |
2022-05-09 19:38:35 +0200 | stackdroid18 | (14094@user/stackdroid) (Quit: hasta la vista... tchau!) |
2022-05-09 19:39:10 +0200 | bahamas | (~lucian@84.232.141.55) |
2022-05-09 19:39:38 +0200 | stackdroid18 | (14094@user/stackdroid) |
2022-05-09 19:43:03 +0200 | x_kuru | (~xkuru@user/xkuru) |
2022-05-09 19:43:41 +0200 | bahamas | (~lucian@84.232.141.55) (Ping timeout: 256 seconds) |
2022-05-09 19:45:37 +0200 | bahamas | (~lucian@84.232.141.55) |
2022-05-09 19:45:50 +0200 | x_kuru_ | (~xkuru@user/xkuru) (Ping timeout: 240 seconds) |
2022-05-09 19:49:50 +0200 | bahamas | (~lucian@84.232.141.55) (Ping timeout: 240 seconds) |
2022-05-09 19:50:39 +0200 | bahamas | (~lucian@84.232.141.55) |
2022-05-09 19:52:04 +0200 | coot | (~coot@213.134.190.95) (Ping timeout: 248 seconds) |
2022-05-09 19:53:00 +0200 | eraziel | (~eraziel@modemcable169.17-58-74.mc.videotron.ca) |
2022-05-09 19:55:23 +0200 | alp_ | (~alp@user/alp) |
2022-05-09 19:57:53 +0200 | qwedfg | (~qwedfg@user/qwedfg) (Quit: ZNC - https://znc.in) |
2022-05-09 20:00:00 +0200 | bliminse | (~bliminse@host86-164-128-238.range86-164.btcentralplus.com) (Quit: leaving) |
2022-05-09 20:00:07 +0200 | gabriel_sevecek | (~gabriel@188-167-229-200.dynamic.chello.sk) (Ping timeout: 240 seconds) |
2022-05-09 20:01:17 +0200 | qwedfg | (~qwedfg@user/qwedfg) |
2022-05-09 20:02:03 +0200 | cross | (~cross@spitfire.i.gajendra.net) (Quit: leaving) |
2022-05-09 20:03:32 +0200 | cross | (~cross@spitfire.i.gajendra.net) |
2022-05-09 20:04:07 +0200 | cross | (~cross@spitfire.i.gajendra.net) (Client Quit) |
2022-05-09 20:04:38 +0200 | bahamas | (~lucian@84.232.141.55) (Ping timeout: 252 seconds) |
2022-05-09 20:04:41 +0200 | cross | (~cross@spitfire.i.gajendra.net) |
2022-05-09 20:04:42 +0200 | cross | (~cross@spitfire.i.gajendra.net) (Client Quit) |
2022-05-09 20:04:59 +0200 | eraziel | (~eraziel@modemcable169.17-58-74.mc.videotron.ca) (Quit: Client closed) |
2022-05-09 20:05:07 +0200 | texasmynsted | (~texasmyns@99.96.221.112) |
2022-05-09 20:05:40 +0200 | cross | (~cross@spitfire.i.gajendra.net) |
2022-05-09 20:08:54 +0200 | bliminse | (~bliminse@host86-164-128-238.range86-164.btcentralplus.com) |
2022-05-09 20:14:53 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2022-05-09 20:15:14 +0200 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
2022-05-09 20:16:13 +0200 | bahamas | (~lucian@84.232.141.55) |
2022-05-09 20:20:54 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 276 seconds) |
2022-05-09 20:21:17 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-05-09 20:23:41 +0200 | acidjnk | (~acidjnk@p200300d0c7068b566ddd60c7ad103c7d.dip0.t-ipconnect.de) |
2022-05-09 20:25:49 +0200 | jakalx | (~jakalx@base.jakalx.net) () |
2022-05-09 20:27:08 +0200 | slack1256 | (~slack1256@191.125.99.72) |
2022-05-09 20:29:10 +0200 | slac77610 | (~slack1256@186.11.83.150) (Ping timeout: 240 seconds) |
2022-05-09 20:29:26 +0200 | f-a | (f2a@f2a.jujube.ircnow.org) |
2022-05-09 20:29:47 +0200 | mbuf | (~Shakthi@122.174.206.211) (Quit: Leaving) |
2022-05-09 20:31:26 +0200 | jakalx | (~jakalx@base.jakalx.net) |
2022-05-09 20:32:04 +0200 | gurkenglas | (~gurkengla@dslb-084-057-085-111.084.057.pools.vodafone-ip.de) |
2022-05-09 20:33:31 +0200 | Kaipei | Kaiepi |
2022-05-09 20:35:42 +0200 | jmcarthur | (~jmcarthur@185.240.244.197) |
2022-05-09 20:35:43 +0200 | stackdroid18 | (14094@user/stackdroid) (Quit: hasta la vista... tchau!) |
2022-05-09 20:38:35 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-05-09 20:44:49 +0200 | galio | (~textual@c-174-63-73-241.hsd1.vt.comcast.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…) |
2022-05-09 20:48:02 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2022-05-09 20:52:53 +0200 | mvk | (~mvk@2607:fea8:5ce3:8500::aa1d) |
2022-05-09 20:53:21 +0200 | ec | (~ec@gateway/tor-sasl/ec) (Quit: ec) |
2022-05-09 20:59:49 +0200 | slac94526 | (~slack1256@186.11.83.150) |
2022-05-09 21:01:23 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2022-05-09 21:01:50 +0200 | slack1256 | (~slack1256@191.125.99.72) (Ping timeout: 252 seconds) |
2022-05-09 21:03:56 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-05-09 21:09:32 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds) |
2022-05-09 21:13:28 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-05-09 21:14:31 +0200 | x_kuru_ | (~xkuru@user/xkuru) |
2022-05-09 21:17:30 +0200 | bahamas | (~lucian@84.232.141.55) (Ping timeout: 240 seconds) |
2022-05-09 21:17:30 +0200 | x_kuru | (~xkuru@user/xkuru) (Ping timeout: 240 seconds) |
2022-05-09 21:17:37 +0200 | vshender | (~user@37.214.80.73) |
2022-05-09 21:17:41 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2022-05-09 21:18:10 +0200 | vshender | (~user@37.214.80.73) () |
2022-05-09 21:22:09 +0200 | oxide | (~lambda@user/oxide) (Quit: oxide) |
2022-05-09 21:22:21 +0200 | Pickchea | (~private@user/pickchea) |
2022-05-09 21:25:05 +0200 | jgeerds | (~jgeerds@d53604b0.access.ecotel.net) |
2022-05-09 21:25:14 +0200 | stackdroid18 | (~stackdroi@user/stackdroid) |
2022-05-09 21:31:48 +0200 | <texasmynsted> | Wow super quiet in here today. Everybody must be "in the zone" writing haskell |
2022-05-09 21:32:54 +0200 | <Hecate> | p. much |
2022-05-09 21:32:57 +0200 | <juri_> | can confirm. |
2022-05-09 21:33:32 +0200 | <f-a> | 2,2writing flames |
2022-05-09 21:34:10 +0200 | <monochrom> | Readying teaching material for Haskell. |
2022-05-09 21:34:52 +0200 | <Hecate> | deprecating GHC stuff |
2022-05-09 21:34:54 +0200 | <Hecate> | https://twitter.com/TechnoEmpress/status/1523739993390436353 |
2022-05-09 21:36:48 +0200 | <maerwald> | prolly everyone lazy af until something forces them |
2022-05-09 21:37:21 +0200 | <geekosaur> | mostly been making calls and such, sadly not at all haskell related |
2022-05-09 21:38:04 +0200 | <k`> | probably reading through Xlib docs on Tronche and vetting copyrights. |
2022-05-09 21:38:09 +0200 | <Hecate> | hahahaha |
2022-05-09 21:38:11 +0200 | <Hecate> | this name is hilarious |
2022-05-09 21:38:40 +0200 | <Hecate> | in French, "tronche" is a word for "face", less then vulgar but definitely not proper |
2022-05-09 21:39:06 +0200 | <geekosaur> | no but at some point I need to read through Xlib source code and figure out why something is making an undocumented protocol call |
2022-05-09 21:39:31 +0200 | <geekosaur> | weirdly, tronche.com has become the go-to for online X11 documentation |
2022-05-09 21:40:13 +0200 | <geekosaur> | then again that might be appropriate since Xlib is less than vulgar but waqs never really proper and these days has been superseded by xcb |
2022-05-09 21:40:17 +0200 | <sm> | doing support. Did start the day with writing haskell though. |
2022-05-09 21:40:46 +0200 | <maerwald> | sm: like "close the window and restart"? |
2022-05-09 21:41:18 +0200 | <f-a> | «just unsafePerformIO it» |
2022-05-09 21:41:37 +0200 | <dminuoso> | How do I elegantly express `when (x < 3)` when `x` is in fact `Maybe Int` either way (treating Null as either True or False)? |
2022-05-09 21:41:38 +0200 | <Bulby[m]> | hahah |
2022-05-09 21:41:38 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2022-05-09 21:41:43 +0200 | <maerwald> | my support usually boils down to "read the message on your screen" |
2022-05-09 21:41:50 +0200 | <maerwald> | "no, the other one too" |
2022-05-09 21:42:16 +0200 | <f-a> | I had a similar need maerwald |
2022-05-09 21:42:29 +0200 | <f-a> | I recall there is a whenM in a contrib-extra-whatever package |
2022-05-09 21:43:03 +0200 | <sclv> | dminuoso: `x ---> fromMaybe 0 x` ? Alternately `fromMaybe True . fmap (< 3) $ x` ? |
2022-05-09 21:43:28 +0200 | <sm> | at my best, I'll try to see how directly and easily we can get to user satisfaction. It's a useful practice and can be a fun game |
2022-05-09 21:43:48 +0200 | f-a | nods |
2022-05-09 21:43:57 +0200 | <sm> | later in the day, it's a lot more terse :) |
2022-05-09 21:44:04 +0200 | <f-a> | xD |
2022-05-09 21:44:11 +0200 | <tomsmeding> | sclv: `fromMaybe True . fmap (< 3) $ x` -> `maybe True (< 3) x` |
2022-05-09 21:44:13 +0200 | <sclv> | in Theory you can express one of the two directions by saying `x < Just 3` but trusting users to understand the ordering properties on Maybe is a mess |
2022-05-09 21:44:53 +0200 | <sclv> | tomsmeding: nice point |
2022-05-09 21:44:58 +0200 | <dminuoso> | Mmm, what about `traverse/for` here? |
2022-05-09 21:45:10 +0200 | <sm> | incidentally tekmo made a nice post referencing stackage: https://www.haskellforall.com/2022/05/the-golden-rule-of-software.html |
2022-05-09 21:45:16 +0200 | <dminuoso> | for_ x $ \x' -> when (x' > 10) ... |
2022-05-09 21:45:44 +0200 | <monochrom> | That will effectively treat "Nothing > 10" to be false. |
2022-05-09 21:45:47 +0200 | <maerwald> | don't use when, use `unless` for maximum confusion |
2022-05-09 21:46:26 +0200 | <dminuoso> | maerwald: heh, I think this must vary from person to person. I cant parse `unless` |
2022-05-09 21:46:36 +0200 | <geekosaur> | sounds very Perl |
2022-05-09 21:46:38 +0200 | <dminuoso> | But apparently some people seem to be happy with it |
2022-05-09 21:47:09 +0200 | <tomsmeding> | maerwald: to be used together with https://hackage.haskell.org/package/acme-dont-1.2/docs/Acme-Dont.html |
2022-05-09 21:47:12 +0200 | <texasmynsted> | :-) |
2022-05-09 21:47:29 +0200 | slack1256 | (~slack1256@191.125.99.72) |
2022-05-09 21:47:41 +0200 | <dminuoso> | tomsmeding: Good things I depend on acme-everything, acme-dont wont be a wasted dependency. |
2022-05-09 21:47:44 +0200 | <monochrom> | Dijkstra's complaint against "unless" predates Perl. So "unless" predates Perl too. Probably all the way back to Lisp. |
2022-05-09 21:47:44 +0200 | <maerwald> | dminuoso: https://www.youtube.com/watch?v=hCvHTrUh4os <- this one also talks about `unless` :p |
2022-05-09 21:48:07 +0200 | <maerwald> | basically: a language that only allows `unless` and some other nonsense for control-flow |
2022-05-09 21:48:11 +0200 | <sclv> | acme-notwithstanding |
2022-05-09 21:48:29 +0200 | <Bulby[m]> | ah is perl where acme was derived from? |
2022-05-09 21:48:35 +0200 | <geekosaur> | iirc perl stole it from basic-plus |
2022-05-09 21:48:39 +0200 | <geekosaur> | yes |
2022-05-09 21:48:45 +0200 | <monochrom> | Oh w00t. A language that has only "unless" and "call/cc". >:) |
2022-05-09 21:48:51 +0200 | <tomsmeding> | dminuoso: ._. acme-everything |
2022-05-09 21:48:52 +0200 | <geekosaur> | acme is the joke category on cpan |
2022-05-09 21:49:00 +0200 | <sclv> | well acme is a reference to the old roadrunner cartoons strictly speaking |
2022-05-09 21:49:18 +0200 | <maerwald> | I'm a fan |
2022-05-09 21:49:20 +0200 | monochrom | writes paper "call/cc: the ultimate lambda" |
2022-05-09 21:49:24 +0200 | <geekosaur> | yes |
2022-05-09 21:49:27 +0200 | <dminuoso> | geekosaur: perl has much better acme things though |
2022-05-09 21:49:32 +0200 | <dminuoso> | Acme::EyeDrops is my absolute favouriote. |
2022-05-09 21:49:40 +0200 | <dminuoso> | That one is just superb. |
2022-05-09 21:49:40 +0200 | slac94526 | (~slack1256@186.11.83.150) (Ping timeout: 246 seconds) |
2022-05-09 21:49:42 +0200 | <monochrom> | Guy Steeles would have a heart attack :) |
2022-05-09 21:51:56 +0200 | <monochrom> | The language will be called "advanced", because it's the opposite of "basic". In basic, you go "if ... goto ...". In advanced, you go "call/cc ... unless ...". |
2022-05-09 21:52:06 +0200 | <monochrom> | Absolutely perfect. |
2022-05-09 21:55:18 +0200 | <tdammers> | obligatory mentioning of INTERCAL and the COME FROM statement |
2022-05-09 21:55:38 +0200 | <geekosaur> | I considered raising that |
2022-05-09 21:55:52 +0200 | <k`> | there `any (fmap (> 3)` and `all (fmap (>3))` depending on whether you want success or failure on Nothing. |
2022-05-09 21:56:06 +0200 | <geekosaur> | now we just need an INTERCAL-style call/cc |
2022-05-09 21:56:16 +0200 | <dminuoso> | k`: Mmm, Im not sure I like that either. |
2022-05-09 21:56:31 +0200 | <dminuoso> | I think the best really is `maybe True (< 3) x` what tomsmeding proposed |
2022-05-09 21:56:43 +0200 | <dminuoso> | It's clear, its obvious |
2022-05-09 21:57:49 +0200 | <k`> | Fair enough. |
2022-05-09 21:57:52 +0200 | <monochrom> | come from with current history? |
2022-05-09 21:58:25 +0200 | <k`> | Time to reset this continuation before it gets called again. |
2022-05-09 21:59:03 +0200 | <maerwald> | unless $ always . continue |
2022-05-09 21:59:24 +0200 | <monochrom> | But yeah "maybe True/False (< 3) x" is short and obvious and agnostic to True/False. |
2022-05-09 22:00:51 +0200 | jmdaemon | (~jmdaemon@user/jmdaemon) |
2022-05-09 22:02:37 +0200 | geranim0 | (~geranim0@modemcable242.171-178-173.mc.videotron.ca) (Ping timeout: 246 seconds) |
2022-05-09 22:06:57 +0200 | geranim0 | (~geranim0@modemcable242.171-178-173.mc.videotron.ca) |
2022-05-09 22:10:18 +0200 | indomitable | (~Beeswachs@gateway/tor-sasl/indomitable) |
2022-05-09 22:10:36 +0200 | <indomitable> | can monads be composed applicatively? if so why is that the case |
2022-05-09 22:10:55 +0200 | <dminuoso> | What do you mean by "composed applicatively"? |
2022-05-09 22:11:13 +0200 | <indomitable> | i mean are monads things that can be composed applicatively |
2022-05-09 22:11:47 +0200 | <dminuoso> | Monads are exactly all things that happen to be able to implement to methods and satisfy a bunch fo laws. |
2022-05-09 22:11:59 +0200 | <dminuoso> | s/to methods/two particular methods/ |
2022-05-09 22:12:02 +0200 | <indomitable> | that's fair, but are applicative laws also fulfilled? |
2022-05-09 22:12:06 +0200 | <dminuoso> | Yes. |
2022-05-09 22:12:15 +0200 | <indomitable> | are there weird exceptions? |
2022-05-09 22:12:15 +0200 | <dminuoso> | That's why Applicative is nowadays a superclass of Applicative. |
2022-05-09 22:12:18 +0200 | coot | (~coot@213.134.190.95) |
2022-05-09 22:12:19 +0200 | <indomitable> | or gotchas? |
2022-05-09 22:12:20 +0200 | <dminuoso> | That's why Applicative is nowadays a superclass of *Monad |
2022-05-09 22:12:22 +0200 | <dminuoso> | ^- |
2022-05-09 22:12:29 +0200 | <dminuoso> | If its a Monad, its automatically Applicative too. |
2022-05-09 22:12:32 +0200 | <geekosaur> | every monad is an applicative but not every applicative is a monad |
2022-05-09 22:12:46 +0200 | <indomitable> | but *why* is it also applicative |
2022-05-09 22:12:53 +0200 | <indomitable> | i understand now that monads are magic, but i am seeking higher turths |
2022-05-09 22:12:55 +0200 | <indomitable> | truths* |
2022-05-09 22:13:03 +0200 | <dminuoso> | Monads are not magic. |
2022-05-09 22:13:06 +0200 | <tomsmeding> | pure = return, (<*>) = ap |
2022-05-09 22:13:06 +0200 | <geekosaur> | that said, you do lose something if you treat a monad as an applicative: you can't operate conditionally on it |
2022-05-09 22:13:11 +0200 | <indomitable> | dminuoso, they are if maths is magic |
2022-05-09 22:13:15 +0200 | <tomsmeding> | that's why a monad is also an applicative functor |
2022-05-09 22:13:17 +0200 | <geekosaur> | wat |
2022-05-09 22:13:18 +0200 | <dminuoso> | indomitable: So? |
2022-05-09 22:13:30 +0200 | <dminuoso> | indomitable: Group theory is complicated stuff. Is adding numbers difficult? |
2022-05-09 22:13:38 +0200 | <indomitable> | dminuoso, to me, yes |
2022-05-09 22:13:42 +0200 | <indomitable> | i try not to any time i can avoid it |
2022-05-09 22:14:03 +0200 | <dminuoso> | I am unsure whether this is going to be a productive discussion. |
2022-05-09 22:14:11 +0200 | <indomitable> | that's fair |
2022-05-09 22:14:56 +0200 | <maerwald> | indomitable: https://neilmitchell.blogspot.com/2019/10/monads-as-graphs.html |
2022-05-09 22:14:58 +0200 | <indomitable> | geekosaur, so once you start treating a monad as applicative, there's no going back? you can't say, collect validation errors, and then decide to do some monadic chaining mid-way and then go back? |
2022-05-09 22:15:56 +0200 | <maerwald> | I think this also makes clear why you can easily express applicative via monad |
2022-05-09 22:16:06 +0200 | <indomitable> | maerwald, thanks, i'll give it a read |
2022-05-09 22:16:07 +0200 | <dminuoso> | "treat a monad as applicative" - I think the basic notion in your head is already twisted. |
2022-05-09 22:16:15 +0200 | <f-a> | you can use applicative code in monadic code, not viceversa |
2022-05-09 22:16:52 +0200 | <k`> | I believe geekosaur just meant that Applicative is a superclass of Monad. |
2022-05-09 22:17:03 +0200 | <geekosaur> | if you use <*> it behaves like any other applicative. you must use >>= to make decisions based on the value |
2022-05-09 22:17:10 +0200 | <k`> | So if you have a Monad constraint, you can use Applicative methods, but not vice versa. |
2022-05-09 22:18:03 +0200 | <geekosaur> | nothing stops you from intermixing them, but <*> doesn't gain any additional power from being used on a Monad instead of an Applicative |
2022-05-09 22:18:54 +0200 | aliosablack | (~chomwitt@2a02:587:dc19:d600:d488:150b:e66b:f592) |
2022-05-09 22:19:04 +0200 | <dminuoso> | indomitable: I think the best thing you can do as a beginner, is to not think about the "bigger picture" - focus on individual instances. |
2022-05-09 22:19:21 +0200 | <indomitable> | my brain doesn't really work that way, but it's probably good advice dminuoso :-) |
2022-05-09 22:19:43 +0200 | <geekosaur> | until you try to focus on something too big and then you just get lost |
2022-05-09 22:19:48 +0200 | chomwitt | (~chomwitt@2a02:587:dc19:d600:d488:150b:e66b:f592) (Ping timeout: 260 seconds) |
2022-05-09 22:19:55 +0200 | <indomitable> | getting lost is just exploring by accident |
2022-05-09 22:20:07 +0200 | <dminuoso> | indomitable: Do you have much experience learning monad from scratch? :-) |
2022-05-09 22:20:10 +0200 | <geekosaur> | only if you recognize it :) |
2022-05-09 22:20:45 +0200 | <dminuoso> | There's good reason why I suggest focusing on individual instances. |
2022-05-09 22:20:51 +0200 | <indomitable> | dminuoso, no, but i can abstract experiences from other weirdly difficult things :P |
2022-05-09 22:21:03 +0200 | <indomitable> | and I don't disagree this is generally a good course of action |
2022-05-09 22:21:19 +0200 | <indomitable> | but my brain does not always approve of standard learning approaches despite their efficacy in the median |
2022-05-09 22:22:13 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-05-09 22:24:39 +0200 | <indomitable> | we can't all have good brains (e.g. me) but we can all have benefits from the functional programming paradigm \o/ |
2022-05-09 22:25:09 +0200 | <k`> | Then by all means, start with `fmap :: (a -> b) -> m a -> m b` with laws that preserve identity and composition, then `liftA2 :: (a -> b -> c) -> m a -> m b -> m c` with laws that preserve identity and composition, then `(=<<) :: (a -> m b) -> m a -> m b` with laws that preserve identity and composition, and `pure :: a -> m a` as an identity. |
2022-05-09 22:25:22 +0200 | <k`> | And don't worry about the specific instances. |
2022-05-09 22:25:26 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2022-05-09 22:25:42 +0200 | geranim0 | (~geranim0@modemcable242.171-178-173.mc.videotron.ca) (Remote host closed the connection) |
2022-05-09 22:26:49 +0200 | <indomitable> | k`, that made a surprising amount of sense |
2022-05-09 22:27:21 +0200 | <k`> | And how the laws for `(=<<)` restrict you to only one definition of `liftA2`, and how `MonadZip` can give you the other one. |
2022-05-09 22:27:54 +0200 | <indomitable> | not sure my brain is quite ready for those two last ones, will process |
2022-05-09 22:29:02 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 22:34:31 +0200 | <indomitable> | hey a tor-sasl bro, neat. |
2022-05-09 22:36:18 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 22:41:23 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 252 seconds) |
2022-05-09 22:42:19 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2022-05-09 22:42:42 +0200 | king_gs | (~Thunderbi@187.201.105.54) |
2022-05-09 22:46:36 +0200 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds) |
2022-05-09 22:47:50 +0200 | jmcarthur | (~jmcarthur@185.240.244.197) (Ping timeout: 240 seconds) |
2022-05-09 22:49:36 +0200 | mikoto-chan | (~mikoto-ch@213.177.151.239) |
2022-05-09 22:51:03 +0200 | moonsheep | (~user@user/moonsheep) |
2022-05-09 22:51:05 +0200 | moonsheep | (~user@user/moonsheep) (ERC 5.4 (IRC client for GNU Emacs 28.1)) |
2022-05-09 22:53:10 +0200 | indomitable | (~Beeswachs@gateway/tor-sasl/indomitable) (Quit: Leaving) |
2022-05-09 22:57:54 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-05-09 22:59:05 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 22:59:16 +0200 | kenran | (~kenran@200116b82b697100b4961f00ddd777f0.dip.versatel-1u1.de) (Quit: WeeChat info:version) |
2022-05-09 23:00:28 +0200 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-05-09 23:01:13 +0200 | son0p | (~ff@181.136.122.143) (Ping timeout: 260 seconds) |
2022-05-09 23:02:03 +0200 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2022-05-09 23:04:10 +0200 | mvk | (~mvk@2607:fea8:5ce3:8500::aa1d) (Ping timeout: 250 seconds) |
2022-05-09 23:06:40 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-05-09 23:07:14 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 23:10:56 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2022-05-09 23:11:24 +0200 | ph88 | (~ph88@84-30-78-253.cable.dynamic.v4.ziggo.nl) (Quit: Leaving) |
2022-05-09 23:11:50 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
2022-05-09 23:12:36 +0200 | king_gs | (~Thunderbi@187.201.105.54) (Read error: Connection reset by peer) |
2022-05-09 23:15:09 +0200 | king_gs | (~Thunderbi@2806:103e:29:da71:ba86:4e28:3521:b634) |
2022-05-09 23:19:01 +0200 | mikoto-chan | (~mikoto-ch@213.177.151.239) (Ping timeout: 256 seconds) |
2022-05-09 23:26:06 +0200 | dsrt^ | (~dsrt@173-160-94-253-atlanta.hfc.comcastbusiness.net) |
2022-05-09 23:27:11 +0200 | chomwitt | (~chomwitt@2a02:587:dc19:d600:d488:150b:e66b:f592) |
2022-05-09 23:28:23 +0200 | aliosablack | (~chomwitt@2a02:587:dc19:d600:d488:150b:e66b:f592) (Read error: Connection reset by peer) |
2022-05-09 23:31:07 +0200 | <dashkal> | Is there a low boilerplate way to build an adt with constant data associated with each constructor? Use case is giving symbolic names to integers in an HTTP API I'm modeling. They don't always start from zero, and aren't always contiguous, so Enum isn't a fit. Right now I'm just writing the data Foo = FooA | FooB | FooC | ... and manual toInt/fromInt conversion functions. |
2022-05-09 23:31:23 +0200 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
2022-05-09 23:31:26 +0200 | f-a | (f2a@f2a.jujube.ircnow.org) () |
2022-05-09 23:32:41 +0200 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-05-09 23:35:06 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 23:35:24 +0200 | averell | (~averell@user/averell) (Quit: .) |
2022-05-09 23:36:04 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |
2022-05-09 23:38:19 +0200 | son0p | (~ff@181.136.122.143) |
2022-05-09 23:38:22 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 23:40:01 +0200 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2022-05-09 23:40:41 +0200 | sammelweis | (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Remote host closed the connection) |
2022-05-09 23:41:23 +0200 | dut | (~dut@user/dut) (Ping timeout: 260 seconds) |
2022-05-09 23:42:53 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Remote host closed the connection) |
2022-05-09 23:43:04 +0200 | stiell_ | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 240 seconds) |
2022-05-09 23:43:45 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) |
2022-05-09 23:46:44 +0200 | kilolympus | (~kilolympu@31.205.200.235) (Ping timeout: 248 seconds) |
2022-05-09 23:46:50 +0200 | machinedgod | (~machinedg@24.105.81.50) (Ping timeout: 240 seconds) |
2022-05-09 23:48:22 +0200 | yauhsien | (~yauhsien@61-231-26-70.dynamic-ip.hinet.net) (Ping timeout: 250 seconds) |
2022-05-09 23:54:57 +0200 | kaskal | (~kaskal@2001:4bb8:2e0:b5bd:e3c0:d71b:f32:84d8) (Quit: ZNC - https://znc.in) |
2022-05-09 23:55:13 +0200 | slack5451 | (~slack1256@186.11.84.150) |
2022-05-09 23:57:40 +0200 | littlebo1eep | (~alMalsamo@gateway/tor-sasl/almalsamo) |
2022-05-09 23:57:40 +0200 | kaskal | (~kaskal@089144207160.atnat0016.highway.bob.at) |
2022-05-09 23:58:00 +0200 | slack1256 | (~slack1256@191.125.99.72) (Ping timeout: 276 seconds) |
2022-05-09 23:59:04 +0200 | littlebobeep | (~alMalsamo@gateway/tor-sasl/almalsamo) (Ping timeout: 240 seconds) |