Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,803,914 events total
2021-07-31 20:38:24 <ixlun> there's no error on that code, and I've not froze the vector, but that compiles fine.
2021-07-31 20:38:49 <dsal> You're lifting in the code that errors.
2021-07-31 20:38:51 <ixlun> (using the `mapM_` was an attempt to clean that piece of code up)
2021-07-31 20:39:08 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit)
2021-07-31 20:39:14 Vajb joins (~Vajb@hag-jnsbng11-58c3a1-224.dhcp.inet.fi)
2021-07-31 20:39:18 nuncanada joins (~dude@179.235.162.215)
2021-07-31 20:39:32 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
2021-07-31 20:40:34 × fossdd quits (~fossdd@sourcehut/user/fossdd) (Ping timeout: 240 seconds)
2021-07-31 20:41:40 fossdd joins (~fossdd@sourcehut/user/fossdd)
2021-07-31 20:41:40 × nuncanada quits (~dude@179.235.162.215) (Client Quit)
2021-07-31 20:42:23 <ixlun> Ah okay, so, the issue is that in: `mapM_ f v = forI_ v $ \i -> f =<< unsafeRead v i` the `unsafeRead` isn't lifted?
2021-07-31 20:42:35 gehmehgeh joins (~user@user/gehmehgeh)
2021-07-31 20:42:42 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 240 seconds)
2021-07-31 20:42:49 tommd joins (~tommd@cpe-76-179-204-251.maine.res.rr.com)
2021-07-31 20:43:23 wroathe joins (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net)
2021-07-31 20:43:40 Orimendix joins (~kevin@162-221-219-5.lxtnkya3.metronetinc.net)
2021-07-31 20:44:52 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-31 20:46:42 × Kaiepi quits (~Kaiepi@156.34.44.192) (Ping timeout: 265 seconds)
2021-07-31 20:51:10 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.2)
2021-07-31 20:51:47 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
2021-07-31 20:55:02 severen joins (~severen@202.36.179.72)
2021-07-31 20:56:34 × tommd quits (~tommd@cpe-76-179-204-251.maine.res.rr.com) (Ping timeout: 240 seconds)
2021-07-31 20:56:38 × Guest9 quits (~Guest9@103.240.169.29) (Quit: Connection closed)
2021-07-31 21:00:58 × fossdd quits (~fossdd@sourcehut/user/fossdd) (Ping timeout: 240 seconds)
2021-07-31 21:01:01 acidjnk_new joins (~acidjnk@p200300d0c72b9501c19bd88441742b9a.dip0.t-ipconnect.de)
2021-07-31 21:01:13 fossdd joins (~fossdd@sourcehut/user/fossdd)
2021-07-31 21:01:22 severen is now known as severenr
2021-07-31 21:02:05 Kaiepi joins (~Kaiepi@156.34.44.192)
2021-07-31 21:02:18 severenr is now known as koyaa
2021-07-31 21:02:30 koyaa is now known as severen
2021-07-31 21:10:50 × elias_ quits (~elias@154.27.37.188.rev.vodafone.pt) (Ping timeout: 272 seconds)
2021-07-31 21:13:09 × Kaiepi quits (~Kaiepi@156.34.44.192) (Read error: Connection reset by peer)
2021-07-31 21:13:15 curiousgay joins (~curiousga@77-120-186-48.kha.volia.net)
2021-07-31 21:13:16 × Guest1599 quits (~Guest15@2a02:a31a:a23c:f480:2fd7:e087:5546:a438) (Ping timeout: 246 seconds)
2021-07-31 21:13:24 Kaiepi joins (~Kaiepi@156.34.44.192)
2021-07-31 21:14:03 <raehik> Any way to have Show print actual UTF-8 characters instead of their decimal codepoint?
2021-07-31 21:14:17 <geekosaur> nope
2021-07-31 21:14:17 <monochrom> putStr
2021-07-31 21:14:34 <c_wraith> that's exactly what show is intended to prevent
2021-07-31 21:14:37 <raehik> monochrom: dealing with a Show, not a String
2021-07-31 21:14:59 <c_wraith> If it's displaying codepoints, the input was a String
2021-07-31 21:15:13 <c_wraith> (or some component of it was a String)
2021-07-31 21:15:22 <monochrom> "the Show must go on"
2021-07-31 21:15:23 <raehik> yes, a component
2021-07-31 21:15:53 <monochrom> Well that's too bad. Don't use Show. Write your own function.
2021-07-31 21:16:27 × HotblackDesiato quits (~HotblackD@gateway/tor-sasl/hotblackdesiato) (Ping timeout: 244 seconds)
2021-07-31 21:16:41 <raehik> yes sir :(
2021-07-31 21:16:50 <c_wraith> in general, if you care about formatting at all, Show is the wrong interface
2021-07-31 21:17:09 <raehik> Right right I know, it was just for debugging
2021-07-31 21:17:20 <monochrom> Show is one of those things that result from the compromise of multiple conflicting stakes so it tries to please everyone therefore it is of no use to anyone.
2021-07-31 21:17:47 <severen> It would be nice if there was a Display/Debug split as in Rust
2021-07-31 21:17:56 <monochrom> Yes absolutely.
2021-07-31 21:18:21 <monochrom> For debugging, a programmer shouldn't mind escape codes all that much.
2021-07-31 21:18:34 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2021-07-31 21:18:55 <monochrom> http://www.vex.net/~trebla/haskell/string-print-show-read.xhtml
2021-07-31 21:19:01 <raehik> I need to check that the strings are correct/what I'm expecting
2021-07-31 21:19:23 <monochrom> Use == ?
2021-07-31 21:19:59 <raehik> no sorry I just mean I want to take a quick look (heh) to check that the data is all good
2021-07-31 21:19:59 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer)
2021-07-31 21:20:23 <raehik> it's Japanese in UTF-8, escape codes aren't really handy
2021-07-31 21:20:28 <monochrom> copy-paste to putStr
2021-07-31 21:20:47 MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com)
2021-07-31 21:21:06 <raehik> ahhhh ofc! obvious to me now
2021-07-31 21:21:27 <raehik> need to write a prettyprinter anyway I guess. waaaah
2021-07-31 21:22:16 × bruceleewees quits (~bruceleew@83.24.236.64.ipv4.supernova.orange.pl) (Read error: Connection reset by peer)
2021-07-31 21:22:24 HotblackDesiato joins (~HotblackD@gateway/tor-sasl/hotblackdesiato)
2021-07-31 21:22:54 bruceleewees joins (~bruceleew@83.24.236.64.ipv4.supernova.orange.pl)
2021-07-31 21:22:54 elias_ joins (~elias@154.27.37.188.rev.vodafone.pt)
2021-07-31 21:22:55 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
2021-07-31 21:24:10 × nate3 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2021-07-31 21:24:36 <dsal> I'm trying out hedgehog in this project. It feel slightly more awkward/procedural than QC with `prop :: Something -> SomethingElse -> Property` -- how does one typically model this? I'm doing stuff like `(d1,d2) <- forAll $ liftA2 (,) Gen.enumBounded Gen.enumBounded` which seems a bit awkward. Is there a more sensible way to do this?
2021-07-31 21:25:59 <boxscape> I want to import Vulkan (from the vulkan package) hiding (view). If I leave out the `hiding` part (and use Lens's view), GHC tells me that there's three `view`s in scope, one from Lens and two different record fields imported by Vulkan. Adding `hiding (view)` only gets rid of one of those fields in the error message. Any idea how I can get rid of the second one?
2021-07-31 21:27:06 <raehik> the unicode-show package attempts to fix my problem albeit being wobbly and incredibly slow!
2021-07-31 21:28:08 <monochrom> Heh wobble and slow are bad.
2021-07-31 21:28:31 × Kaiepi quits (~Kaiepi@156.34.44.192) (Remote host closed the connection)
2021-07-31 21:30:12 Kaiepi joins (~Kaiepi@156.34.44.192)
2021-07-31 21:30:27 takuan joins (~takuan@178-116-218-225.access.telenet.be)
2021-07-31 21:30:31 <janus> dsal: you can make a Gen for each of your datatypes and then make Gens for the composed datatypes also (using their applicative, i think). why use raw tuples in testing code?
2021-07-31 21:30:59 <dsal> janus: I don't want a tuple per se, I just want two of my things.
2021-07-31 21:31:45 <boxscape> ah, it works if I write hiding (Datatype1(view), Datatype2(view))
2021-07-31 21:31:59 <boxscape> strange that it hides one field but not the other otherwise
2021-07-31 21:32:08 <janus> dsal: you could make a "genTwo" which would be everything after the forAll in your example? that would be pretty compact in use...
2021-07-31 21:32:43 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
2021-07-31 21:33:32 <dsal> Sure, but I only need that for this one test case. I have a more complex type I've used for some other tests where it makes a bit more sense to make a gen thing, but I still often end up having more than one test input from different sources.
2021-07-31 21:33:52 phma_ is now known as phma
2021-07-31 21:36:58 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 265 seconds)
2021-07-31 21:37:51 <janus> but there is nothing preventing you from having gen combinators, so i don't understand why this is a problem
2021-07-31 21:38:15 choucavalier_ is now known as choucavalier
2021-07-31 21:38:39 Orimendix parts (~kevin@162-221-219-5.lxtnkya3.metronetinc.net) (Konversation terminated!)
2021-07-31 21:38:43 nate3 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
2021-07-31 21:38:48 × choucavalier quits (~choucaval@peanutbuttervibes.com) (Changing host)
2021-07-31 21:38:48 choucavalier joins (~choucaval@user/choucavalier)
2021-07-31 21:39:36 × hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1)
2021-07-31 21:40:08 hendursaga joins (~weechat@user/hendursaga)
2021-07-31 21:40:50 <dsal> It just feels like more work that's more explicit so far. I've only just started, though.
2021-07-31 21:42:50 <boxscape> (Okay, looks like a ghc bug, I was able to replicate it on a small scale)
2021-07-31 21:42:55 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
2021-07-31 21:42:57 <janus> it's definitely more explicit than using Arbitrary, because you'd typically name the Gen's and make them top-level. i don't see it as something bad, necessarily
2021-07-31 21:44:41 doyougnu joins (~user@c-73-25-202-122.hsd1.or.comcast.net)
2021-07-31 21:46:58 × fossdd quits (~fossdd@sourcehut/user/fossdd) (Ping timeout: 240 seconds)

All times are in UTC.