Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-06 05:45:58 <heck-to-the-gnom> main :: IO ()
2021-03-06 05:45:58 <heck-to-the-gnom> main = do c <- getChar
2021-03-06 05:45:58 <heck-to-the-gnom> putChar c
2021-03-06 05:46:25 <arahael> I'm not sure how that helps... Can you put that main within a unit test?
2021-03-06 05:46:43 <heck-to-the-gnom> where `putChar c` would be your testing function and `getChar` would be your function that you're testing
2021-03-06 05:46:43 × Lycurgus quits (~niemand@cpe-45-46-139-165.buffalo.res.rr.com) (Client Quit)
2021-03-06 05:47:14 <arahael> heck-to-the-gnom: I'd prefer not to write my own test harness.
2021-03-06 05:47:23 <arahael> brb, back in 15. (Have to take the rubbish out...)
2021-03-06 05:47:31 <heck-to-the-gnom> Heck, I'm a noob at Haskell too, but I've had a few run-ins with IO, I thought I'd try, there's no other way to find out I guess (to the question you asked)
2021-03-06 05:47:48 <arahael> Yeah - I think I have to do it in hunit.
2021-03-06 05:47:58 × stree quits (~stree@68.36.8.116) (Ping timeout: 245 seconds)
2021-03-06 05:50:35 × poscat quits (~poscat@2408:8207:482e:5730::1) (Ping timeout: 240 seconds)
2021-03-06 05:51:56 poscat joins (~poscat@123.116.89.28)
2021-03-06 05:53:31 × urodna quits (~urodna@unaffiliated/urodna) (Read error: Connection reset by peer)
2021-03-06 05:54:53 bigbosskor joins (~Android@mx-ll-223.204.246-6.dynamic.3bb.co.th)
2021-03-06 05:55:04 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 245 seconds)
2021-03-06 05:56:06 Saukk joins (~Saukk@83-148-239-3.dynamic.lounea.fi)
2021-03-06 05:57:32 × bigbosskor quits (~Android@mx-ll-223.204.246-6.dynamic.3bb.co.th) (Read error: Connection reset by peer)
2021-03-06 05:59:41 <arahael> Well, that was pretty easy.
2021-03-06 06:00:22 stree joins (~stree@68.36.8.116)
2021-03-06 06:00:38 <arahael> heck-to-the-gnom: What I had missed was that in tasty, the `testCase` function has type `TestName -> Assertion -> TestTree`, and Assertion is just a `type Assertion = IO ()`.
2021-03-06 06:00:43 <arahael> So there's the IO that I can use.
2021-03-06 06:00:54 × jespada quits (~jespada@90.254.243.187) (Ping timeout: 245 seconds)
2021-03-06 06:02:37 johnw joins (~johnw@haskell/developer/johnw)
2021-03-06 06:02:45 takuan joins (~takuan@178-116-218-225.access.telenet.be)
2021-03-06 06:03:30 × glguy quits (x@freenode/staff/haskell.developer.glguy) (Quit: Quit)
2021-03-06 06:03:31 × Narinas quits (~Narinas@187-178-93-112.dynamic.axtel.net) (Read error: Connection reset by peer)
2021-03-06 06:03:39 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-03-06 06:04:09 jespada joins (~jespada@90.254.243.187)
2021-03-06 06:04:39 Narinas joins (~Narinas@187-178-93-112.dynamic.axtel.net)
2021-03-06 06:04:49 × vicfred quits (vicfred@gateway/vpn/mullvad/vicfred) (Quit: Leaving)
2021-03-06 06:07:20 <arahael> Ok, so this leads to the next question I'm wondering: Is it possible (as in; easy) to get an idea of the test coverage you have with `cabal test`?
2021-03-06 06:07:35 glguy joins (x@freenode/staff/haskell.developer.glguy)
2021-03-06 06:08:41 <sclv> arahael: —enable-coverage
2021-03-06 06:09:18 <arahael> Woah. Will check that out. :)
2021-03-06 06:12:35 bitmagie joins (~Thunderbi@200116b8064bb100b41ba95448b036ed.dip.versatel-1u1.de)
2021-03-06 06:12:38 ezrakilty joins (~ezrakilty@97-113-55-149.tukw.qwest.net)
2021-03-06 06:13:08 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:963:1212:101a:2e38) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2021-03-06 06:13:30 ArConan joins (80c7ba50@128.199.186.80)
2021-03-06 06:13:51 <heck-to-the-gnom> Isn't it funny, how the bulk (at least of us inexperienced) of haskell problems are because we can't find functions that do what we're looking for already? There really should be a better way to search for that type of stuff. Perhaps a functionality tagging system would be of help.
2021-03-06 06:15:32 <arahael> heck-to-the-gnom: Well, the fault was mine. But hoogle and hackage both do extremely well
2021-03-06 06:16:09 <arahael> heck-to-the-gnom: Note - in hackage, there is a very easily over-looked "source" link next to every function, this leads you to a *hyperlinked* source file.
2021-03-06 06:17:05 × johnw quits (~johnw@haskell/developer/johnw) (Quit: ZNC - http://znc.in)
2021-03-06 06:18:30 bigbosskor joins (~Android@223.204.246.6)
2021-03-06 06:20:23 <heck-to-the-gnom> I've gone there, quite a few times, not quite what I mean, but often useful, nonetheless
2021-03-06 06:21:13 <arahael> sclv: Thanks for that, that's *perfect*.
2021-03-06 06:21:28 <arahael> heck-to-the-gnom: Could you explain what you mean, then?
2021-03-06 06:22:04 × nineonine quits (~nineonine@50.216.62.2) (Ping timeout: 260 seconds)
2021-03-06 06:23:01 <heck-to-the-gnom> tagging functions, with ideas as to what they do, like assertion, it'd be nice to have an easy method to search "IO outof(IO)", then just find the one for your datatype or package
2021-03-06 06:23:43 <heck-to-the-gnom> perhaps I'm just that bad at reading types, and that's already how it works, IDK, I'll get better, I'm certain
2021-03-06 06:23:46 <arahael> What do you mean "IO outof(IO)"?
2021-03-06 06:23:58 <heck-to-the-gnom> run IO, outside of an IO function
2021-03-06 06:24:07 <arahael> Ah, well, generally, you shouldn't. You almost can't.
2021-03-06 06:24:08 <heck-to-the-gnom> or context
2021-03-06 06:24:33 <arahael> But in my particular case, I was trying to find something "idiomatic", and Tasty didn't show any examples using IO.
2021-03-06 06:25:20 <heck-to-the-gnom> Yeah, well, I want random numbers, and IO is the sanest way for that, I don't always want to run everything in IO (there's other examples, but this was a difficult learning experience that I had a while back)
2021-03-06 06:25:55 <heck-to-the-gnom> anyway, I'm off to bed, good chatting w/ you
2021-03-06 06:26:20 <arahael> heck-to-the-gnom: Sleep well.
2021-03-06 06:32:34 × bigbosskor quits (~Android@223.204.246.6) (Read error: Connection reset by peer)
2021-03-06 06:33:15 × ezrakilty quits (~ezrakilty@97-113-55-149.tukw.qwest.net) (Remote host closed the connection)
2021-03-06 06:34:53 gzj joins (~gzj@unaffiliated/gzj)
2021-03-06 06:37:27 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
2021-03-06 06:38:24 × redmp quits (~redmp@172.58.35.93) (Ping timeout: 245 seconds)
2021-03-06 06:39:49 × bitmagie quits (~Thunderbi@200116b8064bb100b41ba95448b036ed.dip.versatel-1u1.de) (Quit: bitmagie)
2021-03-06 06:42:17 nineonine joins (~nineonine@50.216.62.2)
2021-03-06 06:42:27 bahamas joins (~lucian@unaffiliated/bahamas)
2021-03-06 06:44:21 × cheater quits (~user@unaffiliated/cheater) (Ping timeout: 264 seconds)
2021-03-06 06:45:02 × bitmapper quits (uid464869@gateway/web/irccloud.com/x-nvhxtqplyxeozrfs) (Quit: Connection closed for inactivity)
2021-03-06 06:45:53 × shatriff quits (~vitaliish@protective.remission.volia.net) (Remote host closed the connection)
2021-03-06 06:46:10 shatriff joins (~vitaliish@protective.remission.volia.net)
2021-03-06 06:46:14 × shatriff quits (~vitaliish@protective.remission.volia.net) (Remote host closed the connection)
2021-03-06 06:46:32 shatriff joins (~vitaliish@protective.remission.volia.net)
2021-03-06 06:47:01 × shatriff quits (~vitaliish@protective.remission.volia.net) (Remote host closed the connection)
2021-03-06 06:47:17 shatriff joins (~vitaliish@protective.remission.volia.net)
2021-03-06 06:47:48 × shatriff quits (~vitaliish@protective.remission.volia.net) (Remote host closed the connection)
2021-03-06 06:48:06 shatriff joins (~vitaliish@protective.remission.volia.net)
2021-03-06 06:48:36 × shatriff quits (~vitaliish@protective.remission.volia.net) (Remote host closed the connection)
2021-03-06 06:48:46 bigbosskor joins (~Android@223.204.246.6)
2021-03-06 06:49:44 × ArConan quits (80c7ba50@128.199.186.80) (Quit: Connection closed)
2021-03-06 06:56:23 nineonin_ joins (~nineonine@2604:3d08:7785:9600:ad8c:89aa:bf10:9556)
2021-03-06 06:57:34 Lycurgus joins (~niemand@cpe-45-46-139-165.buffalo.res.rr.com)
2021-03-06 06:58:57 × waleee-cl quits (uid373333@gateway/web/irccloud.com/x-opxrpnhctmnngxjm) (Quit: Connection closed for inactivity)
2021-03-06 06:59:38 × nineonine quits (~nineonine@50.216.62.2) (Ping timeout: 245 seconds)
2021-03-06 07:01:05 × bigbosskor quits (~Android@223.204.246.6) (Read error: Connection reset by peer)
2021-03-06 07:01:12 hololeap joins (~hololeap@unaffiliated/hololeap)
2021-03-06 07:01:40 nineonine joins (~nineonine@50.216.62.2)
2021-03-06 07:01:50 × nineonin_ quits (~nineonine@2604:3d08:7785:9600:ad8c:89aa:bf10:9556) (Ping timeout: 264 seconds)
2021-03-06 07:02:48 nineonin_ joins (~nineonine@2604:3d08:7785:9600:ad8c:89aa:bf10:9556)
2021-03-06 07:03:59 Varis joins (~Tadas@unaffiliated/varis)
2021-03-06 07:04:22 malumore joins (~malumore@151.62.119.81)
2021-03-06 07:06:24 × nineonine quits (~nineonine@50.216.62.2) (Ping timeout: 260 seconds)
2021-03-06 07:06:28 bigbosskor joins (~Android@223.204.246.6)
2021-03-06 07:07:12 × bigbosskor quits (~Android@223.204.246.6) (Read error: Connection reset by peer)
2021-03-06 07:07:43 × sablib quits (~sablib@59.173.153.33) (Quit: WeeChat 3.0)
2021-03-06 07:10:01 × Saukk quits (~Saukk@83-148-239-3.dynamic.lounea.fi) (Remote host closed the connection)
2021-03-06 07:11:19 cheater joins (~user@unaffiliated/cheater)
2021-03-06 07:18:29 bigbosskor joins (~Android@mx-ll-223.204.246-6.dynamic.3bb.co.th)
2021-03-06 07:19:28 former_ocamler joins (8eb3cea7@s142-179-206-167.ab.hsia.telus.net)
2021-03-06 07:19:45 <former_ocamler> hey friends! whats the current best way to use haskell on emacs? I feel like its changed a lot recently
2021-03-06 07:20:33 <Lycurgus> other than as a text editor?

All times are in UTC.