Logs: freenode/#haskell
| 2021-02-28 16:08:31 | <davean> | You'd get a list of texts, because texts contain charactures, and you'd sort the list |
| 2021-02-28 16:08:47 | → | Alleria joins (~textual@zrcout.mskcc.org) |
| 2021-02-28 16:08:55 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 2021-02-28 16:09:07 | <davean> | You just need to keep straight what you're talking about |
| 2021-02-28 16:09:11 | Alleria | is now known as Guest50271 |
| 2021-02-28 16:09:32 | <swarmcollective> | Is T.unpack the simplest solution? |
| 2021-02-28 16:09:41 | <EvanR> | yeah sorting a packed text seems tricky at best |
| 2021-02-28 16:10:01 | <dolio> | Is this just getting the most frequent character? |
| 2021-02-28 16:10:03 | <davean> | group :: Text -> [Text] |
| 2021-02-28 16:10:07 | <davean> | No, that should be fine |
| 2021-02-28 16:10:19 | <dolio> | There's probably a better way than that code. |
| 2021-02-28 16:10:23 | <swarmcollective> | Right, the character that occurs most often. |
| 2021-02-28 16:10:50 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
| 2021-02-28 16:11:17 | <EvanR> | walk through the text updating a map representing a histogram |
| 2021-02-28 16:11:39 | <davean> | Right |
| 2021-02-28 16:11:53 | <dolio> | For instance, it's rebuilding the string just to take the last character, but you could drop all but the last group instead. But also yeah, keeping track of a map or something is probably better than that. |
| 2021-02-28 16:12:35 | <swarmcollective> | I'll give it a try with the Map Char Int (or similar) |
| 2021-02-28 16:12:51 | <dolio> | Oh, sorting and then taking the last character is worse than sorting by the opposite order, most likely, as well. |
| 2021-02-28 16:13:15 | <dolio> | But that won't matter for a map. |
| 2021-02-28 16:13:39 | <Philonous> | davean, inline-c seems convenient, however, I'm mostly look for a way to automatically convert C-enums to Haskell data including the Enum instance |
| 2021-02-28 16:14:32 | <minoru_shiraeesh> | serialize and then deserialize? |
| 2021-02-28 16:14:35 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 240 seconds) |
| 2021-02-28 16:14:39 | <davean> | Right, Philonous, different tasks. |
| 2021-02-28 16:15:11 | <Philonous> | Treating unicode strings as a list of code points can lead you astray, since you're most likely interested in grapheme clusters rather than code points. |
| 2021-02-28 16:15:48 | <davean> | Yah, theres never a right way to do anything with unicode :/ |
| 2021-02-28 16:16:06 | <EvanR> | there's the old fallback, "my data is mainly ascii anyway" xD |
| 2021-02-28 16:16:21 | Uniaika | hisses in French alphabet |
| 2021-02-28 16:16:37 | <davean> | I like that Uniaika only uses ASCII to hiss in french. |
| 2021-02-28 16:16:41 | Uniaika | can also hiss in German -> ßßßßßßßßß |
| 2021-02-28 16:16:55 | <minoru_shiraeesh> | Philonous: why would you want to automatically convert C-enums to Haskell data? you invoke C code from Haskell, or the opposite way? |
| 2021-02-28 16:17:11 | <Uniaika> | what's up davean? :) |
| 2021-02-28 16:17:23 | <Philonous> | I want to call into C |
| 2021-02-28 16:17:33 | jlamothe_ | is now known as jlamothe |
| 2021-02-28 16:17:41 | <EvanR> | for french, you could execute a graven rite to ensure your data is precomposed |
| 2021-02-28 16:19:00 | <davean> | Uniaika: I don't know, I've been avoiding checking in for the day to find out whats up because then I'd have to start dealing with it. |
| 2021-02-28 16:19:39 | <Uniaika> | davean: eh, I feel you |
| 2021-02-28 16:19:42 | <Uniaika> | <3 <3 |
| 2021-02-28 16:21:33 | × | boxscape quits (4ff0baf3@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.243) (Ping timeout: 264 seconds) |
| 2021-02-28 16:22:42 | → | kevin__ joins (~kevin@pool-100-37-189-79.nycmny.fios.verizon.net) |
| 2021-02-28 16:25:39 | × | bitmagie quits (~Thunderbi@200116b806dcda002112473b8db035bd.dip.versatel-1u1.de) (Quit: bitmagie) |
| 2021-02-28 16:29:10 | → | jumper149 joins (~jumper149@130.75.103.194) |
| 2021-02-28 16:31:40 | → | dropFM joins (~dropFM@cpc1-brnt3-2-0-cust108.4-2.cable.virginm.net) |
| 2021-02-28 16:31:41 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 2021-02-28 16:32:37 | → | lazyshrk joins (~lazyshrk@128.199.58.13) |
| 2021-02-28 16:32:48 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:692f:34e4:c65a:92f2) |
| 2021-02-28 16:33:19 | × | Franciman quits (~francesco@host-82-49-79-189.retail.telecomitalia.it) (Quit: Leaving) |
| 2021-02-28 16:33:31 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-02-28 16:33:44 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Client Quit) |
| 2021-02-28 16:36:25 | → | ezrakilty joins (~ezrakilty@97-113-55-149.tukw.qwest.net) |
| 2021-02-28 16:39:46 | × | conal quits (~conal@192.145.118.103) (Quit: Computer has gone to sleep.) |
| 2021-02-28 16:40:16 | → | dyeplexer joins (~lol@unaffiliated/terpin) |
| 2021-02-28 16:40:35 | × | ezrakilty quits (~ezrakilty@97-113-55-149.tukw.qwest.net) (Ping timeout: 240 seconds) |
| 2021-02-28 16:40:47 | × | dropFM quits (~dropFM@cpc1-brnt3-2-0-cust108.4-2.cable.virginm.net) (Quit: Leaving) |
| 2021-02-28 16:41:55 | × | poscat quits (~poscat@114.243.61.85) (Quit: ZNC 1.8.2 - https://znc.in) |
| 2021-02-28 16:43:57 | → | poscat joins (~poscat@114.243.61.85) |
| 2021-02-28 16:44:05 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 2021-02-28 16:44:56 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 2021-02-28 16:45:12 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 2021-02-28 16:45:13 | → | jamm__ joins (~jamm@unaffiliated/jamm) |
| 2021-02-28 16:47:00 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 2021-02-28 16:47:35 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 2021-02-28 16:48:15 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 240 seconds) |
| 2021-02-28 16:49:24 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
| 2021-02-28 16:49:29 | → | bergey joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net) |
| 2021-02-28 16:51:03 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:98b:c360:694b:b651) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-02-28 16:51:55 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Ping timeout: 240 seconds) |
| 2021-02-28 16:51:55 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:98b:c360:694b:b651) |
| 2021-02-28 16:54:14 | × | bergey quits (~user@pool-74-108-99-127.nycmny.fios.verizon.net) (Ping timeout: 245 seconds) |
| 2021-02-28 16:55:24 | → | falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) |
| 2021-02-28 16:55:56 | × | berberman_ quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.8.2 - https://znc.in) |
| 2021-02-28 16:56:54 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 2021-02-28 17:02:24 | <swarmcollective> | The map as histogram works well: fst (M.foldlWithKey most (' ', 0 :: Int) (T.foldl hist M.empty (T.pack "abacad"))) Thanks for the help! |
| 2021-02-28 17:03:37 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-02-28 17:12:23 | → | dora joins (~irfan@117.222.64.138) |
| 2021-02-28 17:16:18 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 2021-02-28 17:16:34 | <hololeap> | extensible effects seems like a cool concept, but it seems mostly unused. why is that? |
| 2021-02-28 17:17:33 | <geekosaur> | very slow, iirc |
| 2021-02-28 17:18:14 | <geekosaur> | the existing effect systems are all fairly heavyweight |
| 2021-02-28 17:19:23 | <dmj`> | hololeap: some use free monads, free monads allocate a lot, lots of allocations increases GC time, GC time slows you down. Not easy to optimize away either. |
| 2021-02-28 17:19:28 | <c_wraith> | Not convinced the utility is actually there |
| 2021-02-28 17:21:03 | → | hiroaki_ joins (~hiroaki@2a02:908:4b18:8c40:a3ba:befb:e670:2e90) |
| 2021-02-28 17:21:24 | <[exa]> | hololeap: sometimes it's easier to just write your monad in the right way from scratch, and there's no software I know of that would really gain much from using the extensible effects. Also haskell people _love_ simple exercises, such as writing the right monad. |
| 2021-02-28 17:21:36 | × | dora quits (~irfan@117.222.64.138) (Quit: leaving) |
| 2021-02-28 17:21:56 | <[exa]> | hololeap: anyway there's Eff and it has users and some performance benefits, it might be interesting to look around there |
| 2021-02-28 17:22:05 | → | fendor joins (~fendor@178.115.128.216.wireless.dyn.drei.com) |
| 2021-02-28 17:23:13 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 2021-02-28 17:23:17 | <hololeap> | fair enough |
| 2021-02-28 17:23:22 | <swarmcollective> | hololeap, have you looked at fused-effects? (It is on my todo list) |
| 2021-02-28 17:23:49 | <hololeap> | i started learning purescript and it sounds like they use it quite a bit |
| 2021-02-28 17:24:57 | × | coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 2021-02-28 17:25:00 | × | nineonine quits (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) (Remote host closed the connection) |
| 2021-02-28 17:25:01 | <maerwald> | hololeap: https://github.com/hasura/eff |
| 2021-02-28 17:25:05 | → | pera joins (~pera@unaffiliated/pera) |
| 2021-02-28 17:25:08 | <dolio> | Extensible effects are actually used all the time, in the form of mtl. |
| 2021-02-28 17:25:11 | <maerwald> | that's a WIP zero-cost (or so) one |
| 2021-02-28 17:25:30 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:98b:c360:694b:b651) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2021-02-28 17:25:32 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 2021-02-28 17:25:40 | → | nineonine joins (~nineonine@2604:3d08:7785:9600:8c3e:8d1a:de68:76d3) |
| 2021-02-28 17:25:43 | <[exa]> | hololeap: btw check out the tagless final encoding (first 3 googles should do), IMHO it's a pretty good alternative, feels a bit more lightweight |
| 2021-02-28 17:26:00 | <maerwald> | hololeap: you might also wanna watch https://www.youtube.com/watch?v=0jI-AlWEwYI |
All times are in UTC.