Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-23 15:34:00 <dminuoso> merijn: We had this discussion before. <- has more potential for bugs
2020-11-23 15:34:18 <merijn> boxscape: You haven't heard about IOCCC?
2020-11-23 15:34:19 tabemann joins (~tabemann@172-13-49-137.lightspeed.milwwi.sbcglobal.net)
2020-11-23 15:34:20 <merijn> boxscape: https://www.ioccc.org/
2020-11-23 15:34:27 <dminuoso> i.e. `foo x | F x <- ...` vs `foo x | let Foo x = ...`
2020-11-23 15:34:29 <dminuoso> err
2020-11-23 15:34:35 <dminuoso> `foo x | F x <- ...` vs `foo x | let F x = ...`
2020-11-23 15:34:48 <boxscape> merijn I've heard of it but tbh I haven't really looked at any of their programs in detail
2020-11-23 15:34:53 <dminuoso> The former will behave differently if we suddenly introduce another contructor to F's type
2020-11-23 15:34:59 vollenweider_ joins (~vollenwei@4e69b241.skybroadband.com)
2020-11-23 15:35:01 × christo quits (~chris@81.96.113.213) (Ping timeout: 264 seconds)
2020-11-23 15:35:39 ski . o O ( `blah | let f x = ..x..,... = ...' )
2020-11-23 15:35:56 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 240 seconds)
2020-11-23 15:36:01 <dminuoso> mm, is that allowed?
2020-11-23 15:36:03 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
2020-11-23 15:36:11 <dminuoso> % blah | let f x = x^2 = f 10
2020-11-23 15:36:11 <yahb> dminuoso:
2020-11-23 15:36:16 <dminuoso> Oh cool. TIL
2020-11-23 15:36:24 mirrorbird joins (psutcliffe@gateway/vpn/mullvad/psutcliffe)
2020-11-23 15:37:11 <ski> @wiki Obfuscation
2020-11-23 15:37:11 <lambdabot> https://wiki.haskell.org/Obfuscation
2020-11-23 15:37:58 × SanchayanMaity quits (~Sanchayan@171.76.82.54) (Quit: SanchayanMaity)
2020-11-23 15:38:50 <ski> % let blah y | let f x = x^2,(f . f -> z) <- y = z in blah 2
2020-11-23 15:38:51 <yahb> ski: 16
2020-11-23 15:39:40 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
2020-11-23 15:40:27 <ski> % let blah (f . f -> z) | let f x = x^2 = z in blah 2
2020-11-23 15:40:27 <yahb> ski: ; <interactive>:19:11: error: Variable not in scope: f :: b0 -> c1; <interactive>:19:15: error: Variable not in scope: f :: a -> b0
2020-11-23 15:40:30 <ski> too bad
2020-11-23 15:41:57 <boxscape> % let {f | let Nothing = Just 4 = True | otherwise = False} in f
2020-11-23 15:41:57 <yahb> boxscape: True
2020-11-23 15:41:58 <boxscape> % let {f | Nothing <- Just 4 = True | otherwise = False} in f
2020-11-23 15:41:58 <yahb> boxscape: False
2020-11-23 15:42:00 <boxscape> nice
2020-11-23 15:42:41 × cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9)
2020-11-23 15:42:53 <boxscape> I suppose instead of let guards you could use pattern guards with a lazy pattern
2020-11-23 15:43:04 <boxscape> % let {f | ~Nothing <- Just 4 = True | otherwise = False} in f
2020-11-23 15:43:04 <yahb> boxscape: True
2020-11-23 15:43:07 <ski> yes
2020-11-23 15:43:59 czwartyeon joins (~czwartyeo@77-45-55-99.sta.asta-net.com.pl)
2020-11-23 15:44:05 × haritz quits (~hrtz@unaffiliated/haritz) (Ping timeout: 240 seconds)
2020-11-23 15:44:18 cross joins (~cross@spitfire.i.gajendra.net)
2020-11-23 15:45:00 <ski> dminuoso : hm, you mean it will suddenly skip to the next alternative, in such case ?
2020-11-23 15:45:58 Lycurgus joins (~niemand@98.4.114.74)
2020-11-23 15:46:17 <ski> `let' in list comprehensions is occasionally useful, too. but sometimes i find myself using `... <- [...]' (singleton list), instead
2020-11-23 15:47:36 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 240 seconds)
2020-11-23 15:48:16 × czwartyeon quits (~czwartyeo@77-45-55-99.sta.asta-net.com.pl) (Ping timeout: 240 seconds)
2020-11-23 15:48:37 phaul joins (~phaul@ruby/staff/phaul)
2020-11-23 15:48:45 <dminuoso> ski: Yes.
2020-11-23 15:49:15 <dminuoso> It can be what you want, but if not it can cause subtle bugs. With let you get an incomplete pattern match warning, so if the "skip" behavior is what you want you can opt-in still
2020-11-23 15:49:36 alp joins (~alp@2a01:e0a:58b:4920:d40a:f511:3b1a:9c8d)
2020-11-23 15:49:41 <ski> yes
2020-11-23 15:50:40 <dminuoso> <- just saves me a few characters with nothing to gain :)
2020-11-23 15:50:46 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-23 15:52:53 <ski> i see
2020-11-23 15:55:13 elliott__ joins (~elliott@pool-108-51-141-12.washdc.fios.verizon.net)
2020-11-23 15:55:42 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds)
2020-11-23 15:56:43 <hseg> tomsmeding: http://ix.io/2Fde is my latest version
2020-11-23 15:56:49 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 246 seconds)
2020-11-23 15:57:06 <hseg> still feels like orbit could be improved, and am not too happy about the required plumbing
2020-11-23 15:57:13 <hseg> but it's a marked improvement
2020-11-23 15:57:19 × jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection)
2020-11-23 15:57:41 ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta)
2020-11-23 15:57:55 <tomsmeding> hseg: IS.notMember
2020-11-23 15:57:58 × phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 256 seconds)
2020-11-23 15:58:12 <hseg> d'oh! missed it
2020-11-23 15:58:25 haritz joins (~hrtz@62.3.70.206)
2020-11-23 15:58:25 × haritz quits (~hrtz@62.3.70.206) (Changing host)
2020-11-23 15:58:25 haritz joins (~hrtz@unaffiliated/haritz)
2020-11-23 15:59:12 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-ivgwdqliaykucuud)
2020-11-23 15:59:50 <tomsmeding> hseg: why not this? orbit x rs = if x `IS.member` rs then (x :) <$> orbit (nextMap ! x) (IS.delete x rs) else (rs, [])
2020-11-23 15:59:54 <hseg> seems like the underlying logic for orbit is some takeWhileM :: (a -> m Bool) -> f a -> m [a]. not too certain on f
2020-11-23 15:59:56 <Iceland_jack> :t (??)
2020-11-23 15:59:56 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 240 seconds)
2020-11-23 15:59:57 <lambdabot> Functor f => f (a -> b) -> a -> f b
2020-11-23 15:59:58 <tomsmeding> why look ahead once
2020-11-23 16:00:00 <Iceland_jack> :t (??) (??)
2020-11-23 16:00:03 <lambdabot> Functor f => a -> f (a -> b) -> f b
2020-11-23 16:00:05 × micahsovereign[m quits (micahsover@gateway/shell/matrix.org/x-frusjvfqlxbbwchl) (Quit: Idle for 30+ days)
2020-11-23 16:00:05 × sureyeaah quits (shauryab98@gateway/shell/matrix.org/x-xujaibeehyrzrqgr) (Quit: Idle for 30+ days)
2020-11-23 16:00:09 × PotatoHatsue|T quits (berbermanm@gateway/shell/matrix.org/x-ofrgdpmkybpiprzw) (Quit: Idle for 30+ days)
2020-11-23 16:00:09 × hnOsmium0001[m] quits (hnosmium00@gateway/shell/matrix.org/x-cujgdqencyyvcwtx) (Quit: Idle for 30+ days)
2020-11-23 16:00:13 <Iceland_jack> where flip = (??) @((->) _)
2020-11-23 16:00:16 × kaychaks_riot quits (kaychaksma@gateway/shell/matrix.org/x-wzfqmwqobnsimpzc) (Quit: Idle for 30+ days)
2020-11-23 16:00:26 Rudd0 joins (~Rudd0@185.189.115.103)
2020-11-23 16:00:29 × berberman_ quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.7.5 - https://znc.in)
2020-11-23 16:00:51 berberman joins (~berberman@unaffiliated/berberman)
2020-11-23 16:01:46 <hseg> bc it kills the search immediately
2020-11-23 16:02:08 <hseg> since the first element has already been deleted by the unfolding
2020-11-23 16:02:13 czwartyeon joins (~czwartyeo@77-45-55-99.sta.asta-net.com.pl)
2020-11-23 16:02:23 <tomsmeding> oh right
2020-11-23 16:02:51 <tomsmeding> but then I'd say fix the unfolding :p
2020-11-23 16:03:27 × PacoV quits (~pcoves@16.194.31.93.rev.sfr.net) (Remote host closed the connection)
2020-11-23 16:03:48 <hseg> ofc
2020-11-23 16:04:16 × sondr3 quits (~sondr3@cm-84.211.56.132.getinternet.no) (Ping timeout: 256 seconds)
2020-11-23 16:04:31 <ski> Iceland_jack : `flip' used to have that type, in lambdabot. (and `(.)' in lambdabot used to be `fmap')
2020-11-23 16:04:33 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
2020-11-23 16:04:39 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds)
2020-11-23 16:05:01 phaul joins (~phaul@ruby/staff/phaul)
2020-11-23 16:05:48 × da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:6c06:c056:20b8:f8ee:6530) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-11-23 16:06:28 × mirrorbird quits (psutcliffe@gateway/vpn/mullvad/psutcliffe) (Ping timeout: 256 seconds)

All times are in UTC.