Logs: freenode/#haskell
| 2020-09-30 07:59:03 | <kindaro> | No, only those in a specified variety. If a type is not supported, I should respectfully decline. |
| 2020-09-30 07:59:51 | × | hekkaidekapus quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Quit: hekkaidekapus) |
| 2020-09-30 08:00:20 | → | coot joins (~coot@37.30.59.210.nat.umts.dynamic.t-mobile.pl) |
| 2020-09-30 08:00:36 | <tomsmeding> | then I guess if you're already making a list of the supported ones, well, you already have to write the list :) |
| 2020-09-30 08:01:06 | <tomsmeding> | doing it with Enum/Read/Show can help reducing the number of times you have to write that list, I guess |
| 2020-09-30 08:01:20 | → | dhil joins (~dhil@11.29.39.217.dyn.plus.net) |
| 2020-09-30 08:03:19 | <lortabac> | kindaro: maybe you can try to generate a big GADT with TemplateHaskell and a mechanical rule for parsing, but at some point you necessarily need to list all the types at least once |
| 2020-09-30 08:03:39 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 08:04:21 | <lortabac> | something like data CliType :: * -> * where Int :: CliType Int; Char :: CliType Char... |
| 2020-09-30 08:05:17 | <kindaro> | Suppose I want to support all types that are instances of `Show` that are in scope at the time of compilation. |
| 2020-09-30 08:05:37 | <kindaro> | I then need to get a list of such types and build a case expression. |
| 2020-09-30 08:06:50 | <tomsmeding> | "all types that are instances of `Show`" sounds nice but is not something that Haskell lets you query easily |
| 2020-09-30 08:07:30 | → | notzmv` joins (~user@177.45.26.174) |
| 2020-09-30 08:07:33 | <tomsmeding> | not even sure if TemplateHaskell will get you that |
| 2020-09-30 08:08:09 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-09-30 08:08:39 | <tomsmeding> | oh it does |
| 2020-09-30 08:08:54 | <tomsmeding> | ooooooh that is decidedly ugly |
| 2020-09-30 08:09:15 | memxor | is now known as kkd |
| 2020-09-30 08:09:22 | <kindaro> | Can you give me some links? |
| 2020-09-30 08:09:47 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-zozvjyzrnsmbzmrc) (Quit: Connection closed for inactivity) |
| 2020-09-30 08:11:02 | × | notzmv quits (~user@unaffiliated/zmv) (Ping timeout: 258 seconds) |
| 2020-09-30 08:12:20 | × | tzh quits (~tzh@2601:448:c500:5300::82b3) (Quit: zzz) |
| 2020-09-30 08:12:58 | <tomsmeding> | just checking myself if it will work at all, but https://hackage.haskell.org/package/template-haskell-2.16.0.0/docs/Language-Haskell-TH.html#v:reifyInstances |
| 2020-09-30 08:13:37 | <lortabac> | kindaro: there are a couple of ugly solutions for that, though I would never use them for real |
| 2020-09-30 08:13:49 | <lortabac> | @hackage constraints-emerge |
| 2020-09-30 08:13:49 | <lambdabot> | https://hackage.haskell.org/package/constraints-emerge |
| 2020-09-30 08:14:05 | × | xcmw quits (~textual@dyn-72-33-0-89.uwnet.wisc.edu) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-09-30 08:14:29 | <kindaro> | Oh, this is cute! |
| 2020-09-30 08:14:31 | <lortabac> | https://github.com/rampion/constraint-unions |
| 2020-09-30 08:15:27 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 240 seconds) |
| 2020-09-30 08:16:27 | × | lucid_0x80 quits (~lucid_0x8@188.253.231.113) (Ping timeout: 240 seconds) |
| 2020-09-30 08:16:27 | <kindaro> | I recall passing explicit dictionaries is being considered for GHC: https://github.com/ghc-proposals/ghc-proposals/pull/324 |
| 2020-09-30 08:18:01 | → | knupfer joins (~Thunderbi@mue-88-130-61-186.dsl.tropolys.de) |
| 2020-09-30 08:18:29 | <tomsmeding> | kindaro: import Language.Haskell.TH ; import Language.Haskell.TH.Ppr ; putStrLn $( LitE . StringL . pprint <$> reifyInstances ''Show [ VarT (mkName "a") ] ) |
| 2020-09-30 08:18:34 | <tomsmeding> | that prints stuff :p |
| 2020-09-30 08:18:54 | <tomsmeding> | presumably if you know a bit more about templatehaskell you can make that work somehow? |
| 2020-09-30 08:22:05 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 2020-09-30 08:22:21 | → | ces joins (~ces@52d3ce3c.dynamic-ip.k-net.dk) |
| 2020-09-30 08:23:27 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 08:24:23 | → | raichoo joins (~raichoo@213.240.178.58) |
| 2020-09-30 08:26:14 | → | cpressey joins (~cpressey@79-72-201-29.dynamic.dsl.as9105.com) |
| 2020-09-30 08:26:15 | → | kuribas joins (~user@ptr-25vy0i8if8811202m3x.18120a2.ip6.access.telenet.be) |
| 2020-09-30 08:28:44 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds) |
| 2020-09-30 08:32:04 | → | __monty__ joins (~toonn@unaffiliated/toonn) |
| 2020-09-30 08:33:32 | <kuribas> | what is wrong with clojure guys absolutely having to bash haskell to show their language? https://lispcast.com/user-wizard-scenario/ |
| 2020-09-30 08:33:49 | × | carldd1 quits (~carldd@90-224-49-113-no56.tbcn.telia.com) (Read error: Connection reset by peer) |
| 2020-09-30 08:33:52 | <merijn> | kuribas: Insecurity |
| 2020-09-30 08:33:53 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 08:34:25 | <merijn> | Nothing illustrates your point as well as a strawman the size of the wicker man... |
| 2020-09-30 08:34:43 | <kuribas> | merijn: if they are happy with their language, why not just use it? |
| 2020-09-30 08:34:55 | → | carldd1 joins (~carldd@90-224-49-113-no56.tbcn.telia.com) |
| 2020-09-30 08:35:12 | <merijn> | kuribas: Because they feel insecure about using it and need to justify the superiority :p |
| 2020-09-30 08:35:27 | <merijn> | That's like 90% of all "language X sucks, look at language Y" advocacy |
| 2020-09-30 08:35:33 | <kuribas> | it's not like haskell is perfect |
| 2020-09-30 08:35:38 | <merijn> | Unless is C or C++, then it's just truth |
| 2020-09-30 08:35:44 | <kuribas> | lol |
| 2020-09-30 08:35:49 | <merijn> | s/Unless/Unless X/ |
| 2020-09-30 08:35:50 | tomsmeding | X doubt |
| 2020-09-30 08:36:30 | <kuribas> | I am perfectly fine with bashing haskell, but their criticism makes no sense. |
| 2020-09-30 08:36:44 | × | hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-arhqczabjmakjtmj) (Quit: Connection closed for inactivity) |
| 2020-09-30 08:36:50 | <merijn> | kuribas: Of course, because they don't know haskell enough to make a coherent criticism |
| 2020-09-30 08:37:07 | <merijn> | Just look at their silly 8 alternatives for partial validation |
| 2020-09-30 08:37:17 | <kuribas> | I don't see other lisp guys do this, like common lisp or scheme. |
| 2020-09-30 08:37:25 | <kuribas> | merijn: you mean spec? |
| 2020-09-30 08:37:30 | <merijn> | There's much more elegant approaches using higher kinded types |
| 2020-09-30 08:37:42 | <merijn> | kuribas: Now, the literaly example in your link |
| 2020-09-30 08:37:43 | × | knupfer quits (~Thunderbi@mue-88-130-61-186.dsl.tropolys.de) (Ping timeout: 246 seconds) |
| 2020-09-30 08:38:30 | <merijn> | kuribas: https://paste.tomsmeding.com/yy3PqZUb |
| 2020-09-30 08:38:35 | <tomsmeding> | kuribas: that article is hilarious |
| 2020-09-30 08:38:38 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds) |
| 2020-09-30 08:38:40 | <merijn> | As if any self-respecting Haskell programmer would write that |
| 2020-09-30 08:38:49 | <kuribas> | yeah :) |
| 2020-09-30 08:38:54 | <merijn> | That shit is begging for a digestive-functor/applicative validation so badly |
| 2020-09-30 08:39:03 | → | chaosmasttter joins (~chaosmast@p200300c4a70aba018412238bea948280.dip0.t-ipconnect.de) |
| 2020-09-30 08:39:10 | <tomsmeding> | it's basically saying: clojure is cool because it doesn't have the tools to give you type safety |
| 2020-09-30 08:39:15 | <tomsmeding> | I mean, you can get the exact same in haskell |
| 2020-09-30 08:39:18 | <tomsmeding> | they even did that in the article! |
| 2020-09-30 08:39:20 | <merijn> | Like, Validation obsoletes their entire argument |
| 2020-09-30 08:39:31 | <tomsmeding> | it's literally not an argument against haskell or for clojure |
| 2020-09-30 08:39:47 | <tomsmeding> | only argument being made is that haskell is more flexible, apparently? (I don't know clojure so can't confirm/deny) |
| 2020-09-30 08:39:59 | <merijn> | kuribas: Lisp/scheme programmers don't feel compelled to "prove" themselves because they've got history/legacy |
| 2020-09-30 08:40:21 | <tomsmeding> | merijn: yes that example cracked me up too |
| 2020-09-30 08:40:44 | <merijn> | kuribas: Clojure is "the new kid" of lisps and so they feel compelled to justify it being better than Scheme/Lisp by picking silly fights like thise |
| 2020-09-30 08:41:20 | <kuribas> | merijn: or just a record with Maybes? |
| 2020-09-30 08:41:40 | → | thc202 joins (~thc202@unaffiliated/thc202) |
| 2020-09-30 08:41:49 | <tomsmeding> | well they discarded that because it wasn't flexible enough for the frontenders, right? |
| 2020-09-30 08:42:03 | <merijn> | kuribas: Really just anything but what they actually did |
| 2020-09-30 08:42:12 | <kuribas> | tomsmeding: yeah, most stuff with hashmaps can be done in haskell with records. Except for merging, but that's dodge anyway. |
| 2020-09-30 08:42:39 | <tomsmeding> | except adding new fields at runtime |
| 2020-09-30 08:42:43 | <tomsmeding> | which they wanted apparently |
| 2020-09-30 08:43:11 | <merijn> | which is a dumb thing to want anyway :p |
| 2020-09-30 08:43:26 | <kuribas> | https://gist.github.com/kuribas/8afd49cf87fe5b1c32b1009ab59c4b1d |
| 2020-09-30 08:43:35 | <tomsmeding> | article makes the case that it isn't, but that isn't even the problem |
| 2020-09-30 08:44:01 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-30 08:44:54 | <kuribas> | tomsmeding: this does exactly what they want, you can add fields easily, and change the order of processing. |
| 2020-09-30 08:45:02 | <kuribas> | just swap the guards |
| 2020-09-30 08:45:05 | → | vicfred_ joins (~vicfred@unaffiliated/vicfred) |
| 2020-09-30 08:45:10 | <tomsmeding> | not as easily as they want, right? |
| 2020-09-30 08:45:24 | <kuribas> | what do they want then? |
| 2020-09-30 08:45:29 | <tomsmeding> | they didn't want to change the backend code to add fields, or didn't I read the article closely enough (likely) |
All times are in UTC.