Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 231 232 233 234 235 236 237 238 239 240 241 .. 17972
1,797,163 events total
2021-06-01 18:59:49 <maerwald> missing type sig
2021-06-01 19:00:01 <xsperry> I don't know. I never actually encountered something similar, I'd use editor's auto completion to type most of that function name for me
2021-06-01 19:00:08 <monochrom> The problem exists because you attempt to type I in the first place but then fail.
2021-06-01 19:00:25 <monochrom> With snake case you won't even attempt.
2021-06-01 19:00:38 <ski> iirc, John Hughes generally doesn't put type signatures on his definitions
2021-06-01 19:01:32 guest0123 parts (~aaron@2601:602:a080:fa0:21da:7ddc:2cc6:a10c) ()
2021-06-01 19:01:33 × azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Read error: Connection reset by peer)
2021-06-01 19:02:22 × dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 244 seconds)
2021-06-01 19:03:55 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 244 seconds)
2021-06-01 19:06:35 × wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-06-01 19:08:32 <Torro> .discon
2021-06-01 19:08:45 <monochrom> It's /discon or /quit
2021-06-01 19:08:45 × Torro quits (Torro@gateway/vpn/protonvpn/torro) (Quit: bye)
2021-06-01 19:11:05 azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it)
2021-06-01 19:13:14 × mc47 quits (~yecinem@89.246.239.190) (Remote host closed the connection)
2021-06-01 19:13:32 × ku quits (~ku@2601:280:c780:7ea0:d1c6:52a:4bf2:1ff2) (Ping timeout: 268 seconds)
2021-06-01 19:15:01 dunkeln joins (~dunkeln@94.129.65.28)
2021-06-01 19:15:46 Erutuon joins (~Erutuon@user/erutuon)
2021-06-01 19:17:36 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 265 seconds)
2021-06-01 19:18:17 × sbmsr quits (~pi@2600:1700:63d0:4830:7dbf:92d8:fd42:235d) (Quit: WeeChat 2.3)
2021-06-01 19:18:52 tremon joins (~tremon@217-63-61-89.cable.dynamic.v4.ziggo.nl)
2021-06-01 19:23:35 × dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 252 seconds)
2021-06-01 19:23:35 <dminuoso> nf: sample size of 15 too
2021-06-01 19:23:43 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9) (Remote host closed the connection)
2021-06-01 19:25:37 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-06-01 19:26:41 ppieters joins (~ppieters@105-213-89-241.access.mtnbusiness.co.za)
2021-06-01 19:27:13 ku joins (~ku@2601:280:c780:7ea0:a829:e2b3:d453:ddc1)
2021-06-01 19:27:30 <dminuoso> And they were volunteers without any selection methodology
2021-06-01 19:29:15 <monochrom> Gosh I suck at C because of Haskell.
2021-06-01 19:29:24 beka joins (~beka@104.193.170-254.PUBLIC.monkeybrains.net)
2021-06-01 19:29:34 <monochrom> I wrote "int fac(int n) { n == 0 ? 1 : n * fac(n-1); }"
2021-06-01 19:30:03 <dminuoso> Ontop, they used just 8 phrases for this study, with no explanation how these phrases were selected either.
2021-06-01 19:30:08 <monochrom> Since I didn't say "return" I got machine-dependent answers, in my case it always returns 0.
2021-06-01 19:31:11 <dminuoso> monochrom: What surprises me is, your compiler doesn't flat out error out?
2021-06-01 19:31:22 <monochrom> No :)
2021-06-01 19:31:54 <ski> successful compilation is a wonderful thing
2021-06-01 19:32:03 × ppieters quits (~ppieters@105-213-89-241.access.mtnbusiness.co.za) (Remote host closed the connection)
2021-06-01 19:34:45 × ddellacosta quits (~ddellacos@89.45.224.170) (Ping timeout: 272 seconds)
2021-06-01 19:36:56 <mccoyb> Lycurgus -- I'm not sure if what backend GHC uses is relevant here. This problem is just basically "take a generic .dylib + some C header files and get stack to use them in some foreign calls".
2021-06-01 19:37:41 mc47 joins (~yecinem@89.246.239.190)
2021-06-01 19:38:05 hiptobecubic joins (~john@c-73-55-99-95.hsd1.fl.comcast.net)
2021-06-01 19:43:02 brian_da_mage joins (~Neuromanc@adsl-187.46.190.47.tellas.gr)
2021-06-01 19:43:02 × brian_da_mage quits (~Neuromanc@adsl-187.46.190.47.tellas.gr) (Changing host)
2021-06-01 19:43:02 brian_da_mage joins (~Neuromanc@user/briandamag)
2021-06-01 19:44:04 × Shaeto quits (~Shaeto@94.25.234.213) (Quit: WeeChat 3.1)
2021-06-01 19:44:29 × sqrt2 quits (~ben@tunnel330957-pt.tunnel.tserv6.fra1.ipv6.he.net) (Ping timeout: 252 seconds)
2021-06-01 19:44:41 bor0 joins (~boro@46.217.54.116)
2021-06-01 19:44:41 × bor0 quits (~boro@46.217.54.116) (Changing host)
2021-06-01 19:44:41 bor0 joins (~boro@user/bor0)
2021-06-01 19:44:53 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 272 seconds)
2021-06-01 19:44:53 justsomeguy joins (~justsomeg@user/justsomeguy)
2021-06-01 19:45:05 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 272 seconds)
2021-06-01 19:45:32 × igghibu quits (~igghibu@91.193.5.46) (Quit: Textual IRC Client: www.textualapp.com)
2021-06-01 19:46:31 Erutuon joins (~Erutuon@user/erutuon)
2021-06-01 19:46:36 × Hecate quits (~mariposa@163.172.211.189) (Changing host)
2021-06-01 19:46:36 Hecate joins (~mariposa@user/hecate)
2021-06-01 19:46:44 <mccoyb> Asking again in case any active chatters have exp -- has anyone linked (dylib + headers) with stack/cabal before and wouldn't mind chatting about it?
2021-06-01 19:47:16 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
2021-06-01 19:49:42 <bor0> Thanks ski. I didn't get the `@tell` message, though found your reply on ircbrowse
2021-06-01 19:50:04 <bor0> Ah! Right after I post a message here lambdabot messages me.
2021-06-01 19:52:24 <dminuoso> bor0: Right. Im specifically talking about the usage of `go`.
2021-06-01 19:52:29 × chomwitt quits (~Pitsikoko@athedsl-20549.home.otenet.gr) (Ping timeout: 272 seconds)
2021-06-01 19:53:33 <dminuoso> bor0: It's not a major deficit necessarily, but since you're writing non-trivial code I thought I'd point it out. The lack of guaranteed fusion is easily addressed by wrapping it with a particular newtype before doing all the fmapping.
2021-06-01 19:55:04 <novasenco> people of #haskell. I am still unable to install alsa-mixer with cabal. https://asciinema.org/a/byZnjGK2NOeaIz7xYne3f8A1I
2021-06-01 19:55:21 <dminuoso> Wrap with this https://hackage.haskell.org/package/kan-extensions-5.2.2/docs/Data-Functor-Yoneda.html#v:liftYoneda - do your recursive fmapping, and then lowerYoneda out. Done!
2021-06-01 19:55:30 <bor0> Thank you. This is a toy implementation, mainly for learning purposes. But I am now curious, could you show a minimal example of achieving this? In my case, `Proof` is already a newtype - or is the trick to do another wrap?
2021-06-01 19:55:33 <dminuoso> And completely ignore the scary sounding names.
2021-06-01 19:55:53 <bor0> Ah, Yoneda. Seen that many times, but never learned more about it
2021-06-01 19:56:19 <dminuoso> bor0: The gist of Yoneda is: if you have repeated fmap applications, with Yoneda GHC has a chance to fuse the function together.
2021-06-01 19:56:21 <dminuoso> That's all
2021-06-01 19:56:31 <dminuoso> Without it, you will most likely not get any fusion
2021-06-01 19:57:10 <bor0> By fusion you mean the composition law, right?
2021-06-01 19:57:42 arson joins (~arson@pool-100-36-47-118.washdc.fios.verizon.net)
2021-06-01 19:58:03 <dminuoso> The fmap composition law `fmap f . fmap g`, yes.
2021-06-01 19:58:28 <davean> novasenco: too new a GCC
2021-06-01 19:58:33 <dminuoso> Turning it into `fmap (f . g)` gives better performance, since the cost of fmap is taken only once
2021-06-01 19:58:39 <bor0> OK, I think it makes sense. Thanks. Yeah, one `fmap` (application) on the LHS, and two of them on the RHS so I can see how optimization can be affected
2021-06-01 19:59:09 <bor0> (Using fmap (f . g) == fmap f . fmap g)
2021-06-01 19:59:11 <novasenco> wat
2021-06-01 19:59:47 <dminuoso> bor0: Right. Except while the law holds in our minds, GHC cant know whether all instances actually abide, so we need some trickery to force the issue.
2021-06-01 20:00:04 <davean> novasenco: your GCC version is too new
2021-06-01 20:00:10 × ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 252 seconds)
2021-06-01 20:00:23 <dminuoso> bor0: Internally, Yoneda is really simple. It's just partially applied fmap, with the Functor instance defined as: fmap f m = Yoneda (\k -> runYoneda m (k . f))
2021-06-01 20:01:09 <dminuoso> bor0: And since Yoneda is a newtype, it disappears at runtime entirely. So you can see how repeated fmap application `lowerYoneda . fmap f . fmag g . liftYoneda` gets turned into `fmap (f . g)`
2021-06-01 20:01:43 <bor0> I see. I knew newtypes were faster, but not because they disappeared at runtime. That's helpful to know!
2021-06-01 20:02:15 <davean> bor0: thats what makes newtype not data
2021-06-01 20:03:13 ddellacosta joins (~ddellacos@89.45.224.170)
2021-06-01 20:03:57 <dminuoso> bor0: And as a teaser, we have a similar trick for repeated applications of >>=, using Codensity/liftCodensity/lowerDensity! :)
2021-06-01 20:04:06 × oxide quits (~lambda@user/oxide) (Ping timeout: 268 seconds)
2021-06-01 20:04:21 <dminuoso> If you can look over these scary looking names, they're useful primitives to allow GHC to optimize better
2021-06-01 20:04:51 <dminuoso> s/lowerDensity/lowerCodensity/
2021-06-01 20:04:52 <bor0> Does `do` notation automatically use *density?
2021-06-01 20:04:56 <dminuoso> No.
2021-06-01 20:04:59 <novasenco> davean, hmm. okay. anything I can do about that?
2021-06-01 20:05:29 <davean> novasenco: well you could set an older gcc, oyu're already setting CC manually
2021-06-01 20:05:37 oxide joins (~lambda@user/oxide)
2021-06-01 20:05:59 <novasenco> (I don't even know if setting CC does anything; I was grasping at straws)
2021-06-01 20:06:31 <davean> anything not gcc11 should work
2021-06-01 20:06:52 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
2021-06-01 20:07:06 <davean> https://github.com/haskell/c2hs/issues/268

All times are in UTC.