Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 673 674 675 676 677 678 679 680 681 682 683 .. 5022
502,152 events total
2020-10-16 14:12:49 × karanlikmadde quits (~karanlikm@2a01:c23:6037:1800:e990:a27c:f553:f1d1) (Quit: karanlikmadde)
2020-10-16 14:14:33 <hyperisco> > flip map [1,2,3] \x -> x + 1
2020-10-16 14:14:35 <lambdabot> error:
2020-10-16 14:14:35 <lambdabot> Unexpected lambda expression in function application:
2020-10-16 14:14:35 <lambdabot> \ x -> x + 1
2020-10-16 14:14:44 <hyperisco> is that extension in GHC yet and what is it called?
2020-10-16 14:16:10 × bitmapper quits (uid464869@gateway/web/irccloud.com/x-dkvrjjnwvljgfxqg) (Quit: Connection closed for inactivity)
2020-10-16 14:16:26 kuribas joins (~user@ptr-25vy0i94ezsnlaecbal.18120a2.ip6.access.telenet.be)
2020-10-16 14:16:57 <ski> % (`map` [1,2,3]) \x -> x + 1
2020-10-16 14:16:58 <yahb> ski: ; <interactive>:58:17: error:; Unexpected lambda expression in function application:; \ x -> x + 1; You could write it with parentheses; Or perhaps you meant to enable BlockArguments?
2020-10-16 14:17:09 <kuribas> I wonder what the added value of recursion schemes is. They are fun to learn, but I feel they ultimately don't solve a real problem.
2020-10-16 14:17:15 <ski> % :set -XBlockArguments
2020-10-16 14:17:15 <yahb> ski:
2020-10-16 14:17:17 <ski> % (`map` [1,2,3]) \x -> x + 1
2020-10-16 14:17:18 <yahb> ski: [2,3,4]
2020-10-16 14:17:26 <dolio> kuribas: Yep.
2020-10-16 14:17:27 <kuribas> you get slightly less verbose code...
2020-10-16 14:18:01 <hyperisco> am I looking in the wrong place? not documented https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html
2020-10-16 14:18:01 <dolio> The value is that endless papers can be written about them.
2020-10-16 14:18:28 <ski> <https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#extension-BlockArguments> ?
2020-10-16 14:18:33 plast1k_ joins (~plast1k_@196.207.181.246)
2020-10-16 14:18:55 <kuribas> dolio: indeed
2020-10-16 14:18:57 <hyperisco> apparently I kept typing "black" instead of "block"
2020-10-16 14:20:19 <kuribas> maybe they could better prove termination in a total language?
2020-10-16 14:20:38 <dolio> I've never seen anyone use them in a total language.
2020-10-16 14:20:58 <dolio> Also, some of them are not total.
2020-10-16 14:21:33 <kuribas> anamorphism...
2020-10-16 14:21:52 <merijn> I tried learning recursion schemes once
2020-10-16 14:21:52 × unlink2 quits (~unlink2@p200300ebcf17c500f1cd4c5efbdddd1e.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
2020-10-16 14:21:53 <phadej> anamorphims is corecursion, not recursion
2020-10-16 14:21:57 <merijn> Decided it wasn't worth it
2020-10-16 14:22:06 <hyperisco> we've all used foldr … the problem is that we have not learned enough as a community
2020-10-16 14:22:07 <merijn> So hard to see what's going
2020-10-16 14:22:14 <dolio> hylo is non-total.
2020-10-16 14:22:30 <merijn> "oh, but by not reimplementing the recursion each time you avoid screwing it up"
2020-10-16 14:22:42 <merijn> Which, in the grand scheme of things seems like a non-issue
2020-10-16 14:22:58 <hyperisco> I'd say it is the wrong perspective
2020-10-16 14:23:00 <merijn> I can't recall the last time I messed up implementing some recursive function
2020-10-16 14:23:11 <kuribas> merijn: I find I can still screw up with cata :)
2020-10-16 14:23:19 <hyperisco> the point should be removing the need to think about recursion, that is what it removes
2020-10-16 14:23:23 <merijn> I spend more time trying to figure out recursion schemes then I ever spend debugging recursion
2020-10-16 14:23:42 <merijn> hyperisco: But thinking about recursion is an order of magnitude easier than thinking about recursion schemes
2020-10-16 14:23:51 GyroW_ joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-16 14:23:51 × GyroW_ quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-16 14:23:51 GyroW_ joins (~GyroW@unaffiliated/gyrow)
2020-10-16 14:23:56 <hyperisco> maybe, or maybe it is just an education problem
2020-10-16 14:24:12 ephemera_ joins (~E@122.34.1.187)
2020-10-16 14:24:25 <hyperisco> and probably, before that, a lack of many people having experience
2020-10-16 14:24:32 × GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 256 seconds)
2020-10-16 14:24:37 <phadej> merijn: learning a bit about recursion schemes might make you think about ordinary recursive functions in more principled way
2020-10-16 14:24:43 <merijn> Seems like a big coincidence that the 10+ blogposts by different authors, 3 papers and the docs of recursion schemes are all inscrutable, even for the ones I know
2020-10-16 14:24:53 <phadej> merijn: not much different than learning a bit of Haskell might make you better Python programmer
2020-10-16 14:24:56 <merijn> phadej: Sure, but so far the ROI seems slim to non-existent
2020-10-16 14:25:09 <phadej> merijn: maybe
2020-10-16 14:25:48 <hyperisco> several arguments can be brought out that are hard to distinguish from, say, an OO programmer bemoaning the needless obscurity of FP
2020-10-16 14:26:35 <typetetris> Someone here using ghc8102 for his production software already?
2020-10-16 14:26:40 <merijn> I'll reconsider/reevaluate my opinion if/when someone shows me a tangible example that's improve
2020-10-16 14:26:47 <merijn> typetetris: Define production
2020-10-16 14:26:58 <hyperisco> I'd say all the same things about lens :P
2020-10-16 14:27:04 <merijn> hyperisco: I don't use lens either
2020-10-16 14:27:08 <typetetris> merijn: run software compiled with ghc8.10.2 to earn money.
2020-10-16 14:27:26 <dolio> Lens is way more useful than fancy recursion schemes.
2020-10-16 14:27:39 <merijn> dolio: Oh, I'm sold on the usefulness of lens
2020-10-16 14:27:48 <merijn> dolio: I just haven't done anything where it was worth bothering
2020-10-16 14:28:21 <merijn> I'm all about Luddite haskell :p
2020-10-16 14:28:33 <merijn> (he says, after enabling TypeFamilies and GADTs everywhere...)
2020-10-16 14:28:50 <kuribas> lens is great, but most stuff in lens is unnecessary IMHO
2020-10-16 14:29:02 DavidEichmann joins (~david@43.240.198.146.dyn.plus.net)
2020-10-16 14:29:14 <phadej> merijn: UTerm in unification-fd is a very neat example of using recursion schemes ideas
2020-10-16 14:29:18 <hyperisco> I am finding that some things just serve an implementation, and that isn't really where the challenge is
2020-10-16 14:29:27 hackage lucid-cdn 0.2.2.0 - Curated list of CDN imports for lucid. https://hackage.haskell.org/package/lucid-cdn-0.2.2.0 (locallycompact)
2020-10-16 14:29:37 <hyperisco> I feel like lens is that sort of thing… but I am pretty stupid about lens.
2020-10-16 14:29:37 <phadej> UTerm though being the same as Free
2020-10-16 14:29:56 <merijn> I'm still undecided about free too :p
2020-10-16 14:30:12 <phadej> it's used very differently though
2020-10-16 14:30:15 <phadej> UTerm is very data-like
2020-10-16 14:30:17 <merijn> I was trying to do a fancy AST with Free, ended with tons of boilerplate
2020-10-16 14:30:22 <phadej> Free is hardly ever presented as it
2020-10-16 14:30:46 <merijn> Talked to Ed about it and he told me he was just using a regular AST type instead of free for that reason
2020-10-16 14:30:48 <phadej> boilerplate is worth if you can have something "for free" (like unification)
2020-10-16 14:30:55 × djellemah quits (~djellemah@2601:5c2:100:96c:e008:b638:39fe:6a54) (Ping timeout: 240 seconds)
2020-10-16 14:31:02 <phadej> for abitrary `f`
2020-10-16 14:31:19 <phadej> but if you don't need (or cannot have) that kind of separation
2020-10-16 14:31:23 <merijn> phadej: Sure, but I feel some of these solutions get over-hyped and then drag beginners into abstraction tarpits :)
2020-10-16 14:31:45 <phadej> merijn: yes. I do think that all extensible-effects things are overhyped
2020-10-16 14:31:59 <hyperisco> I think incorporating a generalisation and only using it in special cases is often increasing burden without benefit
2020-10-16 14:32:01 <phadej> most people don't have the problems they solve
2020-10-16 14:32:23 × oxide quits (~lambda@unaffiliated/mclaren) (Ping timeout: 260 seconds)
2020-10-16 14:33:07 <lortabac> what problems do they solve?
2020-10-16 14:33:12 × ph88 quits (~ph88@2a02:8109:9e40:2704:21a2:9414:d2e6:266d) (Quit: Leaving)
2020-10-16 14:33:27 <merijn> lortabac: Staying employed as PL researcher ;)
2020-10-16 14:33:30 merijn ducks
2020-10-16 14:33:31 <phadej> "separation of concerns"
2020-10-16 14:33:41 <hyperisco> getting Monad machinery from just a Functor is helpful when your total effort needs not be much more than obtaining Monad machinery
2020-10-16 14:34:17 <phadej> which in that case is decoupling syntax from semantics
2020-10-16 14:34:19 <hyperisco> if you then have to go on defining several more things, the benefit of Free becomes comparatively small and the burden multiplies over your remaining effort
2020-10-16 14:34:39 <phadej> (specifically having different semantics for the same syntax)
2020-10-16 14:34:49 <phadej> if these words don't mean anything to you, you don't have that problem ;)
2020-10-16 14:35:04 <lortabac> I think I don't have that problem :)
2020-10-16 14:35:06 <hyperisco> in other words, Free life seems to start with your Functor, then you start adding on more definitions, then you realise what Free is giving you isn't worth it

All times are in UTC.