Logs: liberachat/#haskell
| 2021-06-02 23:57:24 | <boxscape> | https://hackage.haskell.org/package/transformers/docs/Control-Monad-Trans-Accum.html#t:AccumT |
| 2021-06-03 00:01:28 | <boxscape> | hm I guess considering mtl doesn't have a class for it it's probably not widely used |
| 2021-06-03 00:02:20 | × | geekosaur quits (~geekosaur@069-135-003-034.biz.spectrum.com) (Remote host closed the connection) |
| 2021-06-03 00:03:32 | × | lbseale quits (~lbseale@ip72-194-54-201.sb.sd.cox.net) (Read error: Connection reset by peer) |
| 2021-06-03 00:04:15 | → | geekosaur joins (~geekosaur@069-135-003-034.biz.spectrum.com) |
| 2021-06-03 00:05:15 | <davean> | boxscape: it has a pull request I think for it, see the history |
| 2021-06-03 00:08:50 | <boxscape> | davean ah, nice |
| 2021-06-03 00:10:35 | → | peterhil joins (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) |
| 2021-06-03 00:11:06 | → | ddellacosta joins (~ddellacos@86.106.121.24) |
| 2021-06-03 00:14:29 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 2021-06-03 00:15:37 | × | ddellacosta quits (~ddellacos@86.106.121.24) (Ping timeout: 268 seconds) |
| 2021-06-03 00:16:12 | <hololeap> | I like it. it saves the trouble of having to do `flip runState mempty` and `modify (<> nextThing)` when your state happens to be a monoid |
| 2021-06-03 00:16:33 | <boxscape> | that does make sense |
| 2021-06-03 00:17:10 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Read error: Connection reset by peer) |
| 2021-06-03 00:19:24 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 2021-06-03 00:20:49 | × | boioioing quits (~boioioing@cpe-76-84-141-127.neb.res.rr.com) (Remote host closed the connection) |
| 2021-06-03 00:21:18 | × | myShoggoth quits (~myShoggot@97-120-89-117.ptld.qwest.net) (Ping timeout: 264 seconds) |
| 2021-06-03 00:21:52 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 252 seconds) |
| 2021-06-03 00:23:42 | × | waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 272 seconds) |
| 2021-06-03 00:25:16 | × | zeenk quits (~zeenk@2a02:2f04:a310:b600:b098:bf18:df4d:4c41) (Quit: Konversation terminated!) |
| 2021-06-03 00:25:40 | → | Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com) |
| 2021-06-03 00:26:52 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 272 seconds) |
| 2021-06-03 00:29:20 | → | jaevanko joins (~jaevanko@2600:1700:1330:2bef:cce3:20c1:e54b:a98e) |
| 2021-06-03 00:30:21 | → | ddellacosta joins (~ddellacos@89.46.62.79) |
| 2021-06-03 00:30:24 | × | jaevanko quits (~jaevanko@2600:1700:1330:2bef:cce3:20c1:e54b:a98e) (Client Quit) |
| 2021-06-03 00:34:07 | × | azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Read error: Connection reset by peer) |
| 2021-06-03 00:35:06 | × | ddellacosta quits (~ddellacos@89.46.62.79) (Ping timeout: 272 seconds) |
| 2021-06-03 00:37:20 | × | Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt) |
| 2021-06-03 00:37:59 | → | ikex joins (~ash@user/ikex) |
| 2021-06-03 00:39:34 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 2021-06-03 00:40:24 | → | myShoggoth joins (~myShoggot@97-120-89-117.ptld.qwest.net) |
| 2021-06-03 00:42:11 | → | ukari joins (~ukari@user/ukari) |
| 2021-06-03 00:47:20 | → | azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) |
| 2021-06-03 00:49:04 | → | ddellacosta joins (~ddellacos@89.46.62.128) |
| 2021-06-03 00:50:47 | → | shriekingnoise joins (~shrieking@186.137.144.80) |
| 2021-06-03 00:52:46 | → | li joins (~li@libera/staff/li) |
| 2021-06-03 00:53:15 | × | ddellacosta quits (~ddellacos@89.46.62.128) (Ping timeout: 245 seconds) |
| 2021-06-03 00:55:00 | × | learner-monad quits (~eric@cpe-174-105-47-100.columbus.res.rr.com) (Quit: WeeChat 3.1) |
| 2021-06-03 00:55:16 | → | hmmmas joins (~chenqisu1@183.217.202.217) |
| 2021-06-03 00:56:15 | → | learner-monad joins (~eric@cpe-174-105-47-100.columbus.res.rr.com) |
| 2021-06-03 00:56:42 | × | learner-monad quits (~eric@cpe-174-105-47-100.columbus.res.rr.com) (Client Quit) |
| 2021-06-03 00:57:16 | × | ikex quits (~ash@user/ikex) (Ping timeout: 244 seconds) |
| 2021-06-03 00:57:21 | → | learner-monad joins (~eric@cpe-174-105-47-100.columbus.res.rr.com) |
| 2021-06-03 01:02:58 | <guest61> | what is Kira? |
| 2021-06-03 01:03:18 | <Axman6> | In what context? |
| 2021-06-03 01:03:26 | <guest61> | https://twitter.com/arachnocapital2/status/1399890272348033026?s=19 |
| 2021-06-03 01:03:46 | <guest61> | jira |
| 2021-06-03 01:03:56 | <guest61> | sorry typo |
| 2021-06-03 01:04:20 | <boxscape> | an issue tracker |
| 2021-06-03 01:04:25 | → | o1lo01ol1o joins (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net) |
| 2021-06-03 01:04:26 | <Axman6> | Atlassian's issue tracker |
| 2021-06-03 01:04:37 | <Axman6> | very popular, but not with devs :) |
| 2021-06-03 01:05:30 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds) |
| 2021-06-03 01:06:10 | <tput> | I'm working on a practice problem that involves a fibs like sequence, but the combining function is parameterized, so we have a separate sequence for each natural. I'm trying to use the usual bottom up lazy sharing thing, but I can't get the sharing to work. I would appreciate another set of eyes. https://pastebin.com/vndFjWba |
| 2021-06-03 01:07:15 | <guest61> | do hsskell has some libraries like Python's requests? |
| 2021-06-03 01:07:21 | <guest61> | have |
| 2021-06-03 01:07:45 | <boxscape> | @unpl (((+ (10*k)) .) . (-) . (*2)) |
| 2021-06-03 01:07:45 | <lambdabot> | (\ x x0 -> ((x * 2) - x0) + (10 * k)) |
| 2021-06-03 01:07:46 | <Axman6> | what is Python's requests? |
| 2021-06-03 01:07:49 | <boxscape> | would this really perform worse? |
| 2021-06-03 01:08:36 | <guest61> | easy to do restful request |
| 2021-06-03 01:09:20 | <Axman6> | Sure, we have several libraries for http requests - wreq, req and my favourite is servant-client, but it's somewhat advanced |
| 2021-06-03 01:10:27 | <tput> | boxscape yes, that's equally fast. You can't however say replace it with g a b = (2*a)-b+10*k |
| 2021-06-03 01:10:33 | <boxscape> | I see |
| 2021-06-03 01:11:00 | <c_wraith> | tput: first question: do you need sharing across separate calls to f with the same argument, or just within a single call? |
| 2021-06-03 01:11:11 | <tput> | hard coded values for k get the sharing right and are O(n) |
| 2021-06-03 01:11:36 | <tput> | sharing just in a single (recursive) call, and with just a single value for k |
| 2021-06-03 01:12:14 | <c_wraith> | tput: ok, the problem is that you're calling f again. I think you've mixed up the usual idiom |
| 2021-06-03 01:12:45 | <tput> | how do I avoid recalling f k in the parameterized version? |
| 2021-06-03 01:12:50 | <c_wraith> | tput: usually you'd write something like f k = let xs = 42 : 11 * k + 77 : zipWith stuff in xs |
| 2021-06-03 01:13:17 | <c_wraith> | notably, the zipWith should refer to xs |
| 2021-06-03 01:13:29 | <tput> | ahh, yes. that makes sense. I'll go try that out |
| 2021-06-03 01:13:45 | <guest61> | wreq seems nice |
| 2021-06-03 01:16:23 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-06-03 01:16:30 | <tput> | c_wraith: that's linear time now! interestingly I'm hitting a stack overflow in GHCI, but when compiled with -O2 it's linear time and no stack overflows. |
| 2021-06-03 01:17:04 | <c_wraith> | sounds like strictness then - are you measuring without evaluating each value in the list? |
| 2021-06-03 01:17:39 | <tput> | my naive measurement is just to index (!!) far out into the list. |
| 2021-06-03 01:17:43 | <tput> | and then print |
| 2021-06-03 01:17:59 | <c_wraith> | yeah, that will build up thunks unless the strictness analyzer catches it |
| 2021-06-03 01:18:03 | × | satai quits (~satai@static-84-42-172-253.net.upcbroadband.cz) (Quit: satai) |
| 2021-06-03 01:18:12 | <c_wraith> | which it does with -O2 , apparently |
| 2021-06-03 01:18:16 | <c_wraith> | but not in ghci |
| 2021-06-03 01:18:41 | <tput> | yeah, not sure how to annotate this to get ghci to pick up on it, but compiled code is what matters, so I won |
| 2021-06-03 01:18:45 | <tput> | 't complain |
| 2021-06-03 01:19:36 | <tput> | thanks c_wraith and boxscape for your help here |
| 2021-06-03 01:19:48 | × | learner-monad quits (~eric@cpe-174-105-47-100.columbus.res.rr.com) (Quit: WeeChat 3.1) |
| 2021-06-03 01:19:49 | <boxscape> | I guess using (\!x! y -> ((x * 2) - y) + (10 * k)) would do it? |
| 2021-06-03 01:20:11 | <c_wraith> | no, actually |
| 2021-06-03 01:20:20 | <c_wraith> | you can't fix it with zipWith |
| 2021-06-03 01:20:27 | <boxscape> | ah |
| 2021-06-03 01:20:39 | <boxscape> | you need a strict zipWith, eh |
| 2021-06-03 01:20:52 | <c_wraith> | You need to link evaluation of the (:) constructors with evaluation of their first arguments. |
| 2021-06-03 01:21:05 | <boxscape> | oh that's what you meant, okay |
| 2021-06-03 01:21:18 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 2021-06-03 01:21:39 | <tput> | is there a clever spot to insert a seq that could do that? |
| 2021-06-03 01:21:54 | <c_wraith> | nope. Best you can do is a post-processing step |
| 2021-06-03 01:22:12 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 2021-06-03 01:22:58 | <c_wraith> | like... headStrict :: [a] -> [a] ; headStrict [] = [] ; headStrict (x:xs) = x `seq` (x : headStrict xs) |
| 2021-06-03 01:23:21 | <c_wraith> | then change the definition to ...... in headStrict xs |
| 2021-06-03 01:25:07 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 252 seconds) |
All times are in UTC.