Logs: freenode/#haskell
| 2020-11-05 01:56:33 | × | Entertainment quits (~entertain@104.246.132.210) (Quit: Leaving.) |
| 2020-11-05 01:56:46 | → | jcowan joins (sid325434@gateway/web/irccloud.com/x-evadozowlzlhtjmy) |
| 2020-11-05 01:57:45 | <bollu> | What are the precise semantics of bang-patterns? Consider |let foo' = let !x = error "ERR" in \y -> y|. Can GHC reduce this to |let foo' = \y -> y| |
| 2020-11-05 01:58:00 | <jcowan> | Why are there so few instances of class Map? Or am I just not seeing them in Hoogle? |
| 2020-11-05 01:58:52 | <koz_> | jcowan: Wait, _class_ Map? |
| 2020-11-05 02:00:01 | <jcowan> | koz_: https://hackage.haskell.org/package/collections-api-1.0.0.0/docs/Data-Collections.html#g:4 |
| 2020-11-05 02:00:10 | <koz_> | Ah, OK. TIL. |
| 2020-11-05 02:01:07 | → | ddellaco1 joins (~dd@86.106.121.168) |
| 2020-11-05 02:01:20 | <jcowan> | but apparently type Map is the only instance. You'd think a list of pairs would be an instance too. |
| 2020-11-05 02:01:46 | × | ddellacosta quits (~dd@86.106.121.168) (Read error: Connection reset by peer) |
| 2020-11-05 02:02:06 | <jcowan> | I guess it's because it doesn't meet the (informal) big-O constraints |
| 2020-11-05 02:02:27 | <koz_> | jcowan: You can do something like 'newtype AssocList (k :: Type) (v :: Type) = AssocList [(k,v)]', then write an instance against that? |
| 2020-11-05 02:03:30 | <jcowan> | hmm, no, there are no O(...) constraints |
| 2020-11-05 02:04:14 | <jcowan> | But yes, that makes sense, I'm just surprised it's not already the case. |
| 2020-11-05 02:04:50 | × | borne quits (~fritjof@200116b864d4e2005d0cb1433c5d4cbb.dip.versatel-1u1.de) (Ping timeout: 264 seconds) |
| 2020-11-05 02:05:18 | → | Lycurgus joins (~niemand@98.4.97.110) |
| 2020-11-05 02:08:01 | <Axman6> | I've never heard of that package, why do you believe it's something you should care about? |
| 2020-11-05 02:08:05 | × | m0rphism quits (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) (Ping timeout: 260 seconds) |
| 2020-11-05 02:08:12 | <Axman6> | is it used by anything? |
| 2020-11-05 02:08:37 | <jcowan> | No idea. What I'm investigating is whether the whole idea of a map class actually makes sense or not. |
| 2020-11-05 02:09:02 | × | machinedgod quits (~machinedg@142.169.78.247) (Ping timeout: 256 seconds) |
| 2020-11-05 02:10:18 | → | thir joins (~thir@p200300f27f0b7e00f4e9381c2bf90854.dip0.t-ipconnect.de) |
| 2020-11-05 02:11:02 | → | machinedgod joins (~machinedg@207.253.244.210) |
| 2020-11-05 02:13:58 | <davean> | lens kinda has a Map class, in pieces |
| 2020-11-05 02:15:02 | × | thir quits (~thir@p200300f27f0b7e00f4e9381c2bf90854.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 2020-11-05 02:22:41 | → | m0rphism joins (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) |
| 2020-11-05 02:22:48 | <dolio> | Pieces is probably better anyway. I'm not sure you want a huge class with all the things you can do with a map. |
| 2020-11-05 02:26:08 | → | ransom joins (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) |
| 2020-11-05 02:30:19 | → | drbean joins (~drbean@TC210-63-209-23.static.apol.com.tw) |
| 2020-11-05 02:33:09 | × | Lycurgus quits (~niemand@98.4.97.110) (Quit: Exeunt) |
| 2020-11-05 02:35:52 | × | enva2712 quits (~enva2712@cpe-75-86-42-2.wi.res.rr.com) (Quit: leaving) |
| 2020-11-05 02:36:04 | × | machinedgod quits (~machinedg@207.253.244.210) (Ping timeout: 246 seconds) |
| 2020-11-05 02:38:12 | → | machinedgod joins (~machinedg@142.169.78.199) |
| 2020-11-05 02:39:24 | <davean> | dolio: I agree, I expect jcowan will find its not by chance that package isn't well known or maintained |
| 2020-11-05 02:40:21 | <davean> | Decomposed heirarchies with sensible laws for piece piece and addition work very well and are more general. |
| 2020-11-05 02:41:20 | → | nbloomf joins (~nbloomf@2600:1700:ad14:3020:10ae:4d3f:5d98:36e2) |
| 2020-11-05 02:43:19 | × | ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Read error: Connection reset by peer) |
| 2020-11-05 02:43:38 | → | toorevitimirp joins (~tooreviti@117.182.183.132) |
| 2020-11-05 02:44:49 | × | dbmikus_ quits (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) (Ping timeout: 246 seconds) |
| 2020-11-05 02:46:13 | × | machinedgod quits (~machinedg@142.169.78.199) (Ping timeout: 246 seconds) |
| 2020-11-05 02:46:26 | <c_wraith> | What is the breakdown for Map, roughly? At + Foldable? |
| 2020-11-05 02:48:05 | → | machinedgod joins (~machinedg@142.169.78.111) |
| 2020-11-05 02:48:56 | <c_wraith> | well, I guess you have all of Traversable if you want it |
| 2020-11-05 02:49:16 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 2020-11-05 02:49:22 | → | conal joins (~conal@64.71.133.70) |
| 2020-11-05 02:49:36 | <c_wraith> | That misses out on things like the union/intersection operators, but does lens have stuff for those? |
| 2020-11-05 02:51:02 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 2020-11-05 02:52:21 | <c_wraith> | I guess I could just read https://hackage.haskell.org/package/lens/docs/Data-Map-Lens.html |
| 2020-11-05 02:52:51 | <c_wraith> | Nothing appears to directly address union/intersection stuff |
| 2020-11-05 02:53:20 | → | xerox_ joins (~xerox@unaffiliated/xerox) |
| 2020-11-05 02:53:22 | <ddellaco1> | it's very strange how I'm just now trying to figure out how to use lens with Maps, and I come here and everyone is talking about it |
| 2020-11-05 02:53:53 | × | Gurkenglas__ quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 260 seconds) |
| 2020-11-05 02:54:06 | × | m0rphism quits (~m0rphism@HSI-KBW-095-208-098-207.hsi5.kabel-badenwuerttemberg.de) (Ping timeout: 258 seconds) |
| 2020-11-05 02:54:20 | <ddellaco1> | in particular how to manipulate the keys. Didn't occur to me to look at Data.Map.Lens, thank you |
| 2020-11-05 02:54:34 | × | xff0x quits (~fox@2001:1a81:53f2:500:7ba4:92a8:6e01:ae71) (Ping timeout: 244 seconds) |
| 2020-11-05 02:56:40 | → | xff0x joins (~fox@2001:1a81:522f:7b00:29b2:8682:67ea:c01f) |
| 2020-11-05 03:00:02 | × | Smaczny quits (~Smaczny@185.204.1.185) () |
| 2020-11-05 03:00:13 | <jcowan> | Map should be a Set (of assoociations) |
| 2020-11-05 03:00:43 | × | son0p quits (~son0p@181.136.122.143) (Quit: Lost terminal) |
| 2020-11-05 03:03:57 | × | dmwit quits (~dmwit@pool-108-28-166-212.washdc.fios.verizon.net) (Read error: Connection reset by peer) |
| 2020-11-05 03:04:23 | <dolio> | That sounds like something that would show up in Oleg's examples of violations of the Liskov principle. |
| 2020-11-05 03:05:05 | → | argent0 joins (~argent0@168.227.96.2) |
| 2020-11-05 03:05:23 | × | argent0 quits (~argent0@168.227.96.2) (Remote host closed the connection) |
| 2020-11-05 03:06:33 | × | machinedgod quits (~machinedg@142.169.78.111) (Quit: leaving) |
| 2020-11-05 03:07:19 | <monochrom> | Instead, Set is a special case of Map: Set X is Map X () |
| 2020-11-05 03:07:22 | lagothrix | is now known as Guest68265 |
| 2020-11-05 03:07:30 | → | lagothrix joins (~lagothrix@unaffiliated/lagothrix) |
| 2020-11-05 03:08:08 | <monochrom> | That is, comparing Set operations with Map operations. |
| 2020-11-05 03:09:09 | → | dmwit joins (~dmwit@pool-108-28-166-212.washdc.fios.verizon.net) |
| 2020-11-05 03:10:37 | × | Guest68265 quits (~lagothrix@unaffiliated/lagothrix) (Ping timeout: 260 seconds) |
| 2020-11-05 03:13:48 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 2020-11-05 03:17:01 | → | irc_user joins (uid423822@gateway/web/irccloud.com/x-nqqmqoyedjtdxopn) |
| 2020-11-05 03:19:13 | × | urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna) |
| 2020-11-05 03:19:25 | × | theDon quits (~td@i5E86B1F0.versanet.de) (Ping timeout: 264 seconds) |
| 2020-11-05 03:21:04 | → | theDon joins (~td@muedsl-82-207-239-021.citykom.de) |
| 2020-11-05 03:25:31 | hackage | tonatona 0.1.2.1 - meta application framework https://hackage.haskell.org/package/tonatona-0.1.2.1 (qnoyxu) |
| 2020-11-05 03:27:00 | hackage | tonalude 0.1.1.1 - A standard library for Tonatona framework. https://hackage.haskell.org/package/tonalude-0.1.1.1 (qnoyxu) |
| 2020-11-05 03:27:04 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 2020-11-05 03:28:00 | hackage | tonatona-servant 0.1.0.4, tonatona-persistent-sqlite 0.1.0.2, tonatona-persistent-postgresql 0.1.0.2, tonatona-logger 0.2.0.2, tonaparser 0.1.0.1 (qnoyxu) |
| 2020-11-05 03:28:33 | → | conal joins (~conal@64.71.133.70) |
| 2020-11-05 03:32:10 | → | mi23523523 joins (~Mi1029384@82.131.36.5.cable.starman.ee) |
| 2020-11-05 03:33:28 | <Axman6> | ddellaco1: http://hackage.haskell.org/package/lens-4.19.2/docs/Control-Lens-At.html is probably what you want to use |
| 2020-11-05 03:33:30 | × | mi23523523 quits (~Mi1029384@82.131.36.5.cable.starman.ee) (Read error: Connection reset by peer) |
| 2020-11-05 03:34:13 | <justsomeguy> | Out of (idle) curiosity, is there a language extension to add syntax support for first-class sets and maps, like python has? The closest thing I'm aware of is OverloadedLists, but being able to write something like {1:"this",2:"that"} is really nice. |
| 2020-11-05 03:34:21 | → | mi23523523 joins (~Mi1029384@82.131.36.5.cable.starman.ee) |
| 2020-11-05 03:34:39 | <Axman6> | I thnk overloaded lists with tuples is as close as it gets |
| 2020-11-05 03:35:06 | <sshine> | justsomeguy, you can make a quasi quoter? ;) |
| 2020-11-05 03:35:11 | <Axman6> | % [(True,"Hello"),(False,"bye")] :: Map Bool String |
| 2020-11-05 03:35:12 | <yahb> | Axman6: ; <interactive>:75:35: error:; Not in scope: type constructor or class `Map'; Perhaps you meant one of these: `M.Map' (imported from Data.Map), `Max' (imported from Data.Semigroup) |
| 2020-11-05 03:35:19 | <Axman6> | % [(True,"Hello"),(False,"bye")] :: M.Map Bool String |
| 2020-11-05 03:35:19 | <yahb> | Axman6: ; <interactive>:76:1: error:; * Couldn't match expected type `M.Map Bool String' with actual type `[(Bool, [Char])]'; * In the expression: [(True, "Hello"), (False, "bye")] :: M.Map Bool String; In an equation for `it': it = [(True, "Hello"), (False, "bye")] :: M.Map Bool String |
| 2020-11-05 03:35:29 | <justsomeguy> | Well, it's still pretty good. I guess Haskell compensates by not needing so much syntax in other places. -- wait, quasiquoters can do that? |
| 2020-11-05 03:35:38 | <Axman6> | % :set -XOverloadedLists |
| 2020-11-05 03:35:39 | <yahb> | Axman6: |
| 2020-11-05 03:35:41 | <Axman6> | % [(True,"Hello"),(False,"bye")] :: M.Map Bool String |
| 2020-11-05 03:35:41 | <yahb> | Axman6: fromList [(False,"bye"),(True,"Hello")] |
| 2020-11-05 03:36:20 | <Axman6> | justsomeguy: quasi quoters are basically just functions from String to Haskell |
| 2020-11-05 03:36:45 | <sshine> | justsomeguy, I don't think you'd like that. you could make it so that you have [map|{a: 1, b: 2}], but I'd question the trade-off. |
| 2020-11-05 03:36:58 | <Axman6> | so you could have [map|{foo: True, bar: 7}|] but it's pretty ugly IMO |
| 2020-11-05 03:37:27 | <Axman6> | you could I guess just do [map|foo: True, bar: 7|] |
All times are in UTC.