Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,083 events total
2021-08-15 19:12:25 <tomsmeding> perhaps that?
2021-08-15 19:13:11 × arthur_melo quits (IRC@gateway/vpn/airvpn/arthurmelo/x-07739757) (Client Quit)
2021-08-15 19:13:24 <kuribas> yes
2021-08-15 19:13:40 <kuribas> But also, generics are very hard to write, but usually end up with little code.
2021-08-15 19:14:11 <kuribas> It's all induction anyway, but getting the type variables and recursion right is tricky.
2021-08-15 19:14:22 <tomsmeding> perhaps C++ templates move into this direction?
2021-08-15 19:14:25 <[exa]> re fiddling, layered generic abstractions have pretty much lower chance to break without a compile error than in other languages. That's rewarding.
2021-08-15 19:14:32 <tomsmeding> also hard to write, but not necessarily producing much code in the end
2021-08-15 19:14:39 <monochrom> Haskell is not the only language in which I mess around two hours and get only 20 lines.
2021-08-15 19:15:05 <monochrom> I'm making exam questions. It takes 2 hours of messing around before I get 20 lines, too.
2021-08-15 19:15:15 <kuribas> monochrom: which language?
2021-08-15 19:15:22 <monochrom> English?
2021-08-15 19:15:49 <monochrom> It holds for Haskell exams, C & Unix exams, and data structure theoretical exams.
2021-08-15 19:15:58 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-08-15 19:16:04 <[exa]> if english counts, I should start making stats from the papers we write
2021-08-15 19:16:21 arthur_melo joins (IRC@gateway/vpn/airvpn/arthurmelo/x-07739757)
2021-08-15 19:16:34 × hseg quits (~gesh@IGLD-84-228-238-79.inter.net.il) (Quit: WeeChat 3.2)
2021-08-15 19:18:25 × gehmehgeh quits (~user@user/gehmehgeh) (Ping timeout: 244 seconds)
2021-08-15 19:21:18 × vysn quits (~vysn@user/vysn) (Quit: WeeChat 3.2)
2021-08-15 19:21:36 gehmehgeh joins (~user@user/gehmehgeh)
2021-08-15 19:23:30 HeisenLearnsHask joins (~HeisenLea@2a02:aa1:1010:e9f8:bc74:fed2:1f26:4c60)
2021-08-15 19:23:34 × arthur_melo quits (IRC@gateway/vpn/airvpn/arthurmelo/x-07739757) (Quit: arthur_melo)
2021-08-15 19:23:51 <HeisenLearnsHask> intercalate' :: [a] -> [[a]] -> [[a]]
2021-08-15 19:23:52 <HeisenLearnsHask> intercalate' _ [] = []
2021-08-15 19:23:52 <HeisenLearnsHask> intercalate' x (y:ys) = y:x:intercalate' x ys
2021-08-15 19:23:53 <HeisenLearnsHask> intercalate'' = concat . intercalate'
2021-08-15 19:24:12 <kuribas> HeisenLearnsHask: use pastebin?
2021-08-15 19:24:15 <HeisenLearnsHask> Can someone help me why I can't concat this?
2021-08-15 19:24:20 <HeisenLearnsHask> Oh sorry will do.
2021-08-15 19:24:26 <tomsmeding> (concat .) . intercalate'
2021-08-15 19:24:54 <tomsmeding> if you have (f :: a -> b) and (g :: b -> c), then you can do (g . f :: a -> c)
2021-08-15 19:25:02 pfurla_ joins (~pfurla@ool-3f8fcb0f.dyn.optonline.net)
2021-08-15 19:25:14 vysn joins (~vysn@user/vysn)
2021-08-15 19:25:16 <tomsmeding> here, however, your f (which is intercalate') has type (a -> b -> c) and your g (concat) has type (c -> d)
2021-08-15 19:26:02 <tomsmeding> written out, the first is \x -> g (f x), and the second is \x y -> g (f x y)
2021-08-15 19:26:05 <tomsmeding> see the difference?
2021-08-15 19:26:28 thelounge9230681 joins (~thelounge@cpe-75-85-161-60.san.res.rr.com)
2021-08-15 19:26:41 × vysn quits (~vysn@user/vysn) (Client Quit)
2021-08-15 19:27:28 <monochrom> And "a -> b -> c" means "a -> foo, oh foo expands to b -> c", not "(a,b) -> c".
2021-08-15 19:28:26 × pfurla quits (~pfurla@ool-3f8fcb0f.dyn.optonline.net) (Ping timeout: 258 seconds)
2021-08-15 19:28:34 <tomsmeding> yeah: '\x y -> g (f x y)' is really shorthand for '\x -> (\y -> g (f x y))'
2021-08-15 19:29:50 <tomsmeding> is there a webpage or something that clearly explains this issue of why using (.) with a two-argument function doesn't work like one might want?
2021-08-15 19:30:07 <tomsmeding> it's a common question, it seems
2021-08-15 19:30:08 × xff0x quits (~xff0x@2001:1a81:52ed:2b00:c854:bd3b:6fb8:2f1e) (Ping timeout: 252 seconds)
2021-08-15 19:30:27 <dsal> I've run into it a few times and just moved on without thinking about it too much. I'd read that web page someday.
2021-08-15 19:30:32 <tomsmeding> (which makes sense -- if you aren't yet familiar with how function types work in haskell, it's kind of opaque)
2021-08-15 19:30:40 xff0x joins (~xff0x@2001:1a81:52ed:2b00:dae0:b3ed:9593:292a)
2021-08-15 19:35:12 × thelounge9230681 quits (~thelounge@cpe-75-85-161-60.san.res.rr.com) (Quit: The Lounge - https://thelounge.chat)
2021-08-15 19:36:10 <monochrom> It can't be helped. Human nature always first consult "intuitive conceptual moral sounds-right first instinct", trying to procrastinate actually looking up and following actual rules.
2021-08-15 19:36:24 <tomsmeding> makes sense!
2021-08-15 19:36:34 <tomsmeding> I'm just looking for a link to dump whenever someone asks this here :p
2021-08-15 19:36:57 <monochrom> Conceptually . is a piping. Conceptually $ saves parentheses. Very attractive stories to tell and hear.
2021-08-15 19:37:27 ubert joins (~Thunderbi@178.115.55.14.wireless.dyn.drei.com)
2021-08-15 19:39:40 <dsal> Yeah. Stop making me think about what I'm doing.
2021-08-15 19:40:32 <monochrom> But there is not much more to explain than "you have (g::X->Y) . (f::A->(B->X)), B->X doesn't match with X".
2021-08-15 19:40:54 <tomsmeding> except then in a more accessible form with more examples :p
2021-08-15 19:42:52 thelounge9230681 joins (~thelounge@cpe-75-85-161-60.san.res.rr.com)
2021-08-15 19:42:58 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
2021-08-15 19:44:55 × MQ-17J quits (~MQ-17J@8.6.144.209) (Ping timeout: 258 seconds)
2021-08-15 19:45:33 lavaman joins (~lavaman@98.38.249.169)
2021-08-15 19:48:08 × thyriaen quits (~thyriaen@dynamic-089-012-237-250.89.12.pool.telefonica.de) (Remote host closed the connection)
2021-08-15 19:49:12 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
2021-08-15 19:49:34 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-08-15 19:50:31 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-08-15 19:56:24 Neuromancer joins (~Neuromanc@user/neuromancer)
2021-08-15 20:00:28 <dsal> Yeah. It's pretty easy to work out the understanding.
2021-08-15 20:00:29 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2021-08-15 20:01:40 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
2021-08-15 20:01:44 o1lo01ol1o joins (~o1lo01ol1@31.22.129.100)
2021-08-15 20:01:50 haowenl joins (~Thunderbi@066-215-230-039.res.spectrum.com)
2021-08-15 20:04:20 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
2021-08-15 20:05:18 × juhp quits (~juhp@128.106.188.220) (Ping timeout: 268 seconds)
2021-08-15 20:06:32 × o1lo01ol1o quits (~o1lo01ol1@31.22.129.100) (Ping timeout: 268 seconds)
2021-08-15 20:07:29 juhp joins (~juhp@128.106.188.220)
2021-08-15 20:08:07 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
2021-08-15 20:09:00 × wonko quits (~wjc@62.115.229.50) (Ping timeout: 268 seconds)
2021-08-15 20:15:23 zephyz joins (~zephyz@156.146.63.16)
2021-08-15 20:16:40 <zephyz> Hi there, I'm having issue with the singletons-th and singletons-base libraries, here is the error I get and the code I've written under it https://paste.tomsmeding.com/vj2xh7XX
2021-08-15 20:17:01 × ubert quits (~Thunderbi@178.115.55.14.wireless.dyn.drei.com) (Ping timeout: 268 seconds)
2021-08-15 20:17:31 <zephyz> It look slike singletons-th is generating the wrong names, or at least names that are not compatible with singletons-base, how can I fix that?
2021-08-15 20:22:02 × haowenl quits (~Thunderbi@066-215-230-039.res.spectrum.com) (Ping timeout: 256 seconds)
2021-08-15 20:22:23 × drd quits (~drd@2001:b07:a70:9f1f:1562:34de:f50f:77d4) (Ping timeout: 252 seconds)
2021-08-15 20:24:14 <HeisenLearnsHask> Hello could someone help me? I want to solve it with where binding not lambda. https://pastebin.com/TyVAsm9i
2021-08-15 20:25:30 <tomsmeding> HeisenLearnsHask: did you see our discussion of your question above?
2021-08-15 20:25:33 <monochrom> dropWhile (\x -> f x < 1000)
2021-08-15 20:26:21 notzmv joins (~zmv@user/notzmv)
2021-08-15 20:30:13 × HeisenLearnsHask quits (~HeisenLea@2a02:aa1:1010:e9f8:bc74:fed2:1f26:4c60) (Quit: Client closed)
2021-08-15 20:30:48 jgeerds joins (~jgeerds@55d45555.access.ecotel.net)
2021-08-15 20:31:21 arthur_melo joins (IRC@gateway/vpn/airvpn/arthurmelo/x-07739757)
2021-08-15 20:32:00 epolanski joins (uid312403@id-312403.brockwell.irccloud.com)
2021-08-15 20:37:42 o1lo01ol1o joins (~o1lo01ol1@31.22.129.100)
2021-08-15 20:37:54 <monochrom> Or define your own .< operator as g .< n = \x -> g x < n, then you can use f .< 1000
2021-08-15 20:38:23 <monochrom> At which point it's abstraction overdose to rationalize a misguided intuition.
2021-08-15 20:42:14 acidjnk_new joins (~acidjnk@p200300d0c72b9503f052fac21b551e32.dip0.t-ipconnect.de)
2021-08-15 20:46:25 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 248 seconds)
2021-08-15 20:46:25 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-08-15 20:46:37 vysn joins (~vysn@user/vysn)
2021-08-15 20:46:59 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-08-15 20:49:42 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds)
2021-08-15 20:54:31 oxide joins (~lambda@user/oxide)

All times are in UTC.