Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-15 18:27:03 vicfred joins (~vicfred@unaffiliated/vicfred)
2020-11-15 18:27:27 <p0a> nexii: https://wiki.haskell.org/Fizzbuzz shows an example
2020-11-15 18:28:42 <nexii> p0a, thanks!
2020-11-15 18:29:00 × boxscape quits (54a35f37@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.95.55) (Quit: Connection closed)
2020-11-15 18:30:04 × nek0 quits (~nek0@mail.nek0.eu) (Quit: The Lounge - https://thelounge.chat)
2020-11-15 18:31:17 nek0 joins (~nek0@mail.nek0.eu)
2020-11-15 18:32:56 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-15 18:33:42 <pjb> p0a: nexii: https://www.youtube.com/watch?v=mZWsyUKwTbg&t=364s
2020-11-15 18:33:53 <pjb> p0a: nexii: I mean: https://www.youtube.com/watch?v=mZWsyUKwTbg
2020-11-15 18:33:58 <nexii> I'm trying a non-pattern matching version and was wondering how I can fix this: fizzbuzzs xs = [if x `mod` 15 == 0 then "FIZZBUZZ" else x | x <- xs] (not considering fizz or buzz)
2020-11-15 18:34:37 <pjb> (O(1) fizzbuzz; but check my comment with a lisp O(1) fizzbuzz).
2020-11-15 18:35:08 <dminuoso> pjb: Without pattern matching somewhere, this is going to require some real trickery.
2020-11-15 18:35:12 <nexii> this is issuing an error here "No instance for (Integral [Char]) arising from a use of `mod'"
2020-11-15 18:35:22 <dminuoso> pjb: Generally, all evaluation in Haskell is driven by pattern matching...
2020-11-15 18:35:56 <MarcelineVQ> you need to be explicit about converting x to a String since "FIZZBUZZ" is a String and both choices of an if need to result in the same type, show x is one way
2020-11-15 18:35:57 <nexii> dminuoso, definitely. I'm just trying to align my expectations with reality
2020-11-15 18:36:00 hackage base64-bytestring 1.2.0.1 - Fast base64 encoding and decoding for ByteStrings https://hackage.haskell.org/package/base64-bytestring-1.2.0.1 (topos)
2020-11-15 18:36:05 <dminuoso> nexii: Ah, so imagine `x = if b then f else g`
2020-11-15 18:36:10 <dminuoso> nexii: f and g have to be of the same type
2020-11-15 18:36:21 <dminuoso> (Because what else would the type of `x` be?)
2020-11-15 18:37:09 <dsal> p0a: have you looked at conduit? You're taking a long path to doing relay conduit's core competency is.
2020-11-15 18:37:13 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 246 seconds)
2020-11-15 18:37:26 <nexii> ooooh right!
2020-11-15 18:37:27 <p0a> nexii: "FIZZBUZZ" and 2 are not the same type
2020-11-15 18:37:32 <dminuoso> nexii: The error message is perhaps strange, because GHC simply infers `x` to be of type string (because "FIZZBUZZ" is a string), and then a constraint from the use of `mod` pops up
2020-11-15 18:37:42 <nexii> can I cast as a string version of a number?
2020-11-15 18:37:52 <nexii> cast *x
2020-11-15 18:38:01 <p0a> You can create a 'supertype' that includes both strings and integers
2020-11-15 18:38:14 <nexii> gotcha. thanks!
2020-11-15 18:38:15 <p0a> or you can turn an Int into a String with `show', like `show n'
2020-11-15 18:38:20 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 272 seconds)
2020-11-15 18:38:37 <nexii> ah. I think I wanted that
2020-11-15 18:38:39 <p0a> dsal: not yet :) I will tomorrow probably. Woring slowly
2020-11-15 18:39:23 <dminuoso> p0a: Regarding lazy IO, just dont do it. :p
2020-11-15 18:40:19 <bqv> lol, for a second there i thought that was a reply to a message i'd sent a week ago about lazy IO
2020-11-15 18:40:50 <dsal> bqv: turns out, it was just an async exception
2020-11-15 18:40:52 chaosmasttter joins (~chaosmast@p200300c4a73c5201c1de5602741d98a2.dip0.t-ipconnect.de)
2020-11-15 18:41:22 <bqv> hahah
2020-11-15 18:42:30 × nek0 quits (~nek0@mail.nek0.eu) (Remote host closed the connection)
2020-11-15 18:42:34 × arianvp quits (~weechat@arianvp.me) (Quit: WeeChat 2.7.1)
2020-11-15 18:42:41 <dminuoso> dsal: If p0a just disconnected now, that'd be funny.
2020-11-15 18:42:56 arianvp joins (~weechat@arianvp.me)
2020-11-15 18:42:59 <p0a> :P
2020-11-15 18:44:13 <p0a> somehow I am using a function that knows that the ByteString is lazy and I'm getting an error
2020-11-15 18:44:53 <p0a> I'm trying to use fromBytes from hexstring, "Couldn't match expected type 'Data.ByteString.Internal.ByteString' with actual type 'Data.ByteString.Lazy.ByteString'
2020-11-15 18:45:14 wroathe_ joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-11-15 18:45:22 Franciman joins (~francesco@host-82-56-223-169.retail.telecomitalia.it)
2020-11-15 18:45:28 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds)
2020-11-15 18:45:34 <p0a> dminuoso: I had abandoned the idea of using lazy IO but it's a last attempt before bed
2020-11-15 18:46:07 wroathe_ is now known as wroathe
2020-11-15 18:46:14 vacm joins (~vacwm@70.23.92.191)
2020-11-15 18:47:57 × vacm quits (~vacwm@70.23.92.191) (Client Quit)
2020-11-15 18:48:37 × knupfer quits (~Thunderbi@200116b82c37cc00b9ffe288e94dd584.dip.versatel-1u1.de) (Remote host closed the connection)
2020-11-15 18:48:46 <bqv> p0a: would it be too awful to strictify the bytestring?
2020-11-15 18:48:46 knupfer joins (~Thunderbi@200116b82c37cc00b0f3d3733bf89b01.dip.versatel-1u1.de)
2020-11-15 18:48:48 jaspervdj joins (~jaspervdj@213.55.241.138)
2020-11-15 18:49:00 <bqv> there's a convenient iso...
2020-11-15 18:49:13 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2020-11-15 18:49:40 <p0a> okay I was confused because they have the same name as types
2020-11-15 18:50:00 <p0a> I thought they were literally the same and that somehow the compiler knew when to be lazy. I now realize it's two different types
2020-11-15 18:50:03 <dsal> Huh. I have a program that's been crashing occasionally. There's nothing in the logs but an exit code. That sucks.
2020-11-15 18:50:07 <bqv> lol
2020-11-15 18:50:31 <MarcelineVQ> slightly better than segfault
2020-11-15 18:50:56 <MarcelineVQ> or is it
2020-11-15 18:51:39 <bqv> to be fair, segfault's quite a lot of information. silent exit is basically an informational middle finger
2020-11-15 18:52:07 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
2020-11-15 18:52:20 <dsal> It's sometimes -1 and sometimes 1, so it even uses different hands.
2020-11-15 18:52:45 <dsal> Many of them were last night when I was playing around with it and related bits, so that's not surprising, but the others are.
2020-11-15 18:53:34 avdb joins (~avdb@ip-83-134-109-106.dsl.scarlet.be)
2020-11-15 18:54:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
2020-11-15 18:54:05 Tattletale joins (~Tattletal@unaffiliated/sundancertp)
2020-11-15 18:55:30 <p0a> thank you
2020-11-15 18:55:32 × p0a quits (~user@unaffiliated/p0a) (Quit: bye)
2020-11-15 18:57:39 × jaspervdj quits (~jaspervdj@213.55.241.138) (Quit: leaving)
2020-11-15 18:58:56 o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt)
2020-11-15 18:59:01 × mputz quits (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de) (Ping timeout: 264 seconds)
2020-11-15 19:01:10 × LKoen quits (~LKoen@9.253.88.92.rev.sfr.net) (Read error: Connection reset by peer)
2020-11-15 19:01:24 LKoen joins (~LKoen@9.253.88.92.rev.sfr.net)
2020-11-15 19:03:32 berberman_ joins (~berberman@unaffiliated/berberman)
2020-11-15 19:04:42 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds)
2020-11-15 19:05:10 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
2020-11-15 19:07:03 × o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 260 seconds)
2020-11-15 19:11:08 × Rudd0 quits (~Rudd0@185.189.115.98) (Ping timeout: 260 seconds)
2020-11-15 19:12:03 LKoen_ joins (~LKoen@9.253.88.92.rev.sfr.net)
2020-11-15 19:12:27 × wroathe quits (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) (Quit: Lost terminal)
2020-11-15 19:12:47 × LKoen quits (~LKoen@9.253.88.92.rev.sfr.net) (Read error: Connection reset by peer)
2020-11-15 19:14:03 × DavidEichmann quits (~david@62.110.198.146.dyn.plus.net) (Ping timeout: 260 seconds)
2020-11-15 19:14:11 wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net)
2020-11-15 19:14:34 nbloomf joins (~nbloomf@2600:1700:ad14:3020:c56c:6f1e:9a5c:a8b9)
2020-11-15 19:17:10 × britva quits (~britva@2a02:aa13:7240:2980:bc4b:509a:98e6:5bb0) (Quit: This computer has gone to sleep)
2020-11-15 19:19:37 × whataday quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Ping timeout: 260 seconds)
2020-11-15 19:20:12 × sm[m] quits (simonmicma@gateway/shell/matrix.org/x-lbfifyukhotihtyp) (Ping timeout: 260 seconds)
2020-11-15 19:20:13 × domenkozar[m] quits (domenkozar@NixOS/user/domenkozar) (Ping timeout: 260 seconds)
2020-11-15 19:20:13 × berberman[T] quits (berberma4@gateway/shell/matrix.org/x-ktwvjhbxwxmijypf) (Ping timeout: 260 seconds)
2020-11-15 19:20:13 × mikr[m] quits (mikrdavral@gateway/shell/matrix.org/x-lqhlpqvzacftnkbu) (Ping timeout: 260 seconds)
2020-11-15 19:20:13 × debugloop quits (~danieln@unaffiliated/debugloop) (Ping timeout: 260 seconds)
2020-11-15 19:20:47 × ttc quits (tomtauma1@gateway/shell/matrix.org/x-erbvcraxnugundnq) (Ping timeout: 260 seconds)
2020-11-15 19:20:47 recon_-_ joins (~quassel@2602:febc:0:b6::6ca2)
2020-11-15 19:20:47 × recon_- quits (~quassel@2602:febc:0:b6::6ca2) (Ping timeout: 260 seconds)
2020-11-15 19:20:47 × grol quits (~quassel@2620:11e:1000:2:250:56ff:fea4:7) (Ping timeout: 260 seconds)

All times are in UTC.