Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 650 651 652 653 654 655 656 657 658 659 660 .. 5022
502,152 events total
2020-10-15 13:03:48 <phadej> merijn: RealFloat a => Num (Complex a)
2020-10-15 13:04:09 <merijn> ah
2020-10-15 13:04:12 <phadej> see discussion ~100 messages prior
2020-10-15 13:04:31 xff0x joins (~fox@217.110.198.158)
2020-10-15 13:04:46 <merijn> tinga: Simple answer: because arbitrarily fine-grained splitting requires tons of manual work with very little to no pay off
2020-10-15 13:04:56 <tinga> My question is towards: would type reasoning become impossible or computationally more complex if type classes would be "splittable" according to use,
2020-10-15 13:04:56 <merijn> tinga: In short, nobody cares enough
2020-10-15 13:05:02 jneira_ joins (~jneira@211.red-176-87-17.dynamicip.rima-tde.net)
2020-10-15 13:05:23 <tinga> I mean, automatic splitting.
2020-10-15 13:05:40 <tinga> Maybe I'm being stupid, not sure.
2020-10-15 13:05:44 <merijn> tinga: Well, you'd first have to invent a semantics for what "splittable" even means, then you'd have to implement it, then you'd have to update all existing code
2020-10-15 13:05:52 invaser joins (~Thunderbi@46-133-205-72.mobile.vf-ua.net)
2020-10-15 13:05:53 <merijn> tinga: Many people hate the Num hierarchy for many reasons
2020-10-15 13:05:59 <merijn> A lot of them even valid reasons
2020-10-15 13:06:19 <tinga> Since it would only allow more code to be valid, not restrict existing code, no code would have to be changed.
2020-10-15 13:06:30 <phadej> bold clam
2020-10-15 13:06:32 <phadej> claim
2020-10-15 13:06:34 <merijn> tinga: But every proposed alternative has either required: 1) tons of extensions, 2) made code dramatically harder to understand, 3) not much practical use
2020-10-15 13:06:55 <tinga> :) Ok, that sounds like a reasonable answer.
2020-10-15 13:07:43 <merijn> tinga: Like, sure, Num is broken in all sorts of mathematical ways, but most of the proposed fixes are "more correct", but also 10 times more annoying to use to write, you know, actual code :)
2020-10-15 13:08:14 <tinga> Is there a somewhat widely accepted alternative for Num ?
2020-10-15 13:08:22 <merijn> No
2020-10-15 13:08:34 <merijn> There's about 20 *not* widely accepted alternatives, though!
2020-10-15 13:08:50 lucid_0x80 joins (~lucid_0x8@85.132.73.6)
2020-10-15 13:09:00 <merijn> All they cost you is "all interoperability with the rest of Hackage" ;)
2020-10-15 13:12:37 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
2020-10-15 13:13:15 <kuribas> merijn: there is the purescript type class hierarchy
2020-10-15 13:13:21 <phadej> I don't think anyone tried hard enough to satisfy "algebraists" and "float-pointers" at the same time
2020-10-15 13:13:30 Thompson joins (~Thompson@cpe-72-129-144-92.new.res.rr.com)
2020-10-15 13:13:33 geekosaur joins (82659a0e@host154-014.vpn.uakron.edu)
2020-10-15 13:13:37 <phadej> kuribas: purescript hierarchy lies about floats :)
2020-10-15 13:14:12 × xff0x quits (~fox@217.110.198.158) (Ping timeout: 256 seconds)
2020-10-15 13:14:15 emmanuel_erc joins (~user@cpe-67-243-153-99.nyc.res.rr.com)
2020-10-15 13:14:21 <kuribas> https://pursuit.purescript.org/packages/purescript-numerics/0.1.2/docs/Data.Num
2020-10-15 13:15:40 <phadej> as concrete example, IMO having CommutativeRing like no-members but extra laws class is antipattern in Haskell (and fwiw in PS as well)
2020-10-15 13:15:43 xff0x joins (~fox@217.110.198.158)
2020-10-15 13:15:45 DavidEichmann joins (~david@43.240.198.146.dyn.plus.net)
2020-10-15 13:15:48 × GyroW quits (~GyroW@unaffiliated/gyrow) (Quit: Someone ate my pie)
2020-10-15 13:15:51 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 258 seconds)
2020-10-15 13:15:58 GyroW joins (~GyroW@d54C03E98.access.telenet.be)
2020-10-15 13:15:59 × GyroW quits (~GyroW@d54C03E98.access.telenet.be) (Changing host)
2020-10-15 13:15:59 GyroW joins (~GyroW@unaffiliated/gyrow)
2020-10-15 13:16:06 <phadej> if you want to have such, you would need to have a member which has extra laws attached to it
2020-10-15 13:16:08 × bitmapper quits (uid464869@gateway/web/irccloud.com/x-eumwksferfqxnztz) (Quit: Connection closed for inactivity)
2020-10-15 13:16:12 <phadej> e.g. + is commutative and .+ isn't
2020-10-15 13:16:36 <phadej> ... and we can debate whether that or single + is better to the end of the universe :)
2020-10-15 13:18:17 raichoo joins (~raichoo@dslb-088-077-024-025.088.077.pools.vodafone-ip.de)
2020-10-15 13:20:26 <dminuoso> kuribas: You asked why no newtype around Int, because not all integers are permissable.
2020-10-15 13:20:47 <dminuoso> But to be perfectly blunt, the vendor who was responsible for this is an idiot, as integer would have been the right thing here.
2020-10-15 13:21:00 proofofme joins (~proofofme@184-96-74-65.hlrn.qwest.net)
2020-10-15 13:22:21 <kuribas> dminuoso: newtype with smart constructor?
2020-10-15 13:25:17 × geekosaur quits (82659a0e@host154-014.vpn.uakron.edu) (Remote host closed the connection)
2020-10-15 13:25:38 × proofofme quits (~proofofme@184-96-74-65.hlrn.qwest.net) (Ping timeout: 260 seconds)
2020-10-15 13:26:50 geekosaur joins (82659a0e@host154-014.vpn.uakron.edu)
2020-10-15 13:27:12 Stanley00 joins (~stanley00@unaffiliated/stanley00)
2020-10-15 13:28:42 <Ariakenom> > [0.5, 1.5 .. 2] -- we hating on numbers?
2020-10-15 13:28:46 <lambdabot> [0.5,1.5,2.5]
2020-10-15 13:28:59 <merijn> the Enum instance for Float and Double can go die in a fire
2020-10-15 13:29:01 <merijn> Stupid ass idea
2020-10-15 13:29:04 × kritzefitz quits (~kritzefit@fw-front.credativ.com) (Remote host closed the connection)
2020-10-15 13:31:27 doomas joins (~doomas@94.229.74.91)
2020-10-15 13:32:03 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Ping timeout: 260 seconds)
2020-10-15 13:32:25 invaser1 joins (~Thunderbi@31.148.23.125)
2020-10-15 13:33:10 × snakemas1 quits (~snakemast@213.100.206.23) (Ping timeout: 265 seconds)
2020-10-15 13:34:18 × Thompson quits (~Thompson@cpe-72-129-144-92.new.res.rr.com) (Quit: Thompson)
2020-10-15 13:35:01 × geekosaur quits (82659a0e@host154-014.vpn.uakron.edu) (Remote host closed the connection)
2020-10-15 13:35:40 × invaser quits (~Thunderbi@46-133-205-72.mobile.vf-ua.net) (Ping timeout: 256 seconds)
2020-10-15 13:35:41 invaser1 is now known as invaser
2020-10-15 13:43:56 snakemas1 joins (~snakemast@213.100.206.23)
2020-10-15 13:48:47 × jneira_ quits (~jneira@211.red-176-87-17.dynamicip.rima-tde.net) (Read error: Connection reset by peer)
2020-10-15 13:49:19 jneira_ joins (~jneira@80.30.100.250)
2020-10-15 13:52:07 Sgeo joins (~Sgeo@ool-18b982ad.dyn.optonline.net)
2020-10-15 13:56:50 bitmapper joins (uid464869@gateway/web/irccloud.com/x-dkvrjjnwvljgfxqg)
2020-10-15 13:58:11 zwarag joins (~zwarag@2a02:8388:a80:d380:a0f0:b686:a197:d627)
2020-10-15 13:59:27 × p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Ping timeout: 260 seconds)
2020-10-15 14:00:44 × qiu3344 quits (~qiu3344@91.246.215.182) (Quit: WeeChat 2.9)
2020-10-15 14:01:15 <zwarag> I'm looking for a `[Int] -> String` which would: `[1,2,3] -> '[1,2,3]'`. According to the following Link `intsToDigits` should do that but I might confuse something :https://hackage.haskell.org/package/percent-format-0.0.1/docs/Text-PercentFormat-Utils.html#v:intsToDigits
2020-10-15 14:01:43 × ixlun quits (~matthew@213.205.241.94) (Read error: Connection reset by peer)
2020-10-15 14:02:00 <Taneb> > show [1, 2, 3]
2020-10-15 14:02:01 × jneira_ quits (~jneira@80.30.100.250) (Ping timeout: 264 seconds)
2020-10-15 14:02:03 <[exa]> zwarag: why not just combine show and reverse?
2020-10-15 14:02:03 <lambdabot> "[1,2,3]"
2020-10-15 14:02:21 × jrm quits (~jrm@freebsd/developer/jrm) (Quit: ciao)
2020-10-15 14:03:14 jneira_ joins (~jneira@211.red-176-87-17.dynamicip.rima-tde.net)
2020-10-15 14:03:21 <[exa]> zwarag: or perhaps `intercalate`, if you want to do it extra manually
2020-10-15 14:03:51 Guest23693 joins (~urdh@h77-53-54-187.cust.a3fiber.se)
2020-10-15 14:04:07 Achylles joins (~Achylles@191.17.181.222)
2020-10-15 14:04:38 <zwarag> My function actually is: `testFactorize x l = it (printf "factors of %d should be %s", x l ) $ l == factorize x` where x is 10 and l is [1,2,5,10] printf is from `import Text.Printf (printf)`
2020-10-15 14:05:25 <merijn> zwarag: Presumably that should be "show l"?
2020-10-15 14:06:01 <dminuoso> kuribas: 2000 smart constructors? What's the benefit here? And how are you gonna pattern match against smart constructors?
2020-10-15 14:06:18 <kuribas> dminuoso: a single one of course :)
2020-10-15 14:06:27 <dminuoso> well at any case
2020-10-15 14:06:42 <dminuoso> The ADT is gonna stay! :P
2020-10-15 14:07:19 vismaya joins (d03b9e15@208.59.158.21)
2020-10-15 14:07:23 × gxt quits (~gxt@gateway/tor-sasl/gxt) (Ping timeout: 240 seconds)
2020-10-15 14:08:29 <zwarag> mhmm, I cannot figure out how to do `show l` right. I get this syntax error: https://imgur.com/a/fqpkkeS
2020-10-15 14:08:48 × bliminse quits (~bliminse@host217-42-95-37.range217-42.btcentralplus.com) (Ping timeout: 260 seconds)
2020-10-15 14:09:11 <[exa]> can you please use pastebin for text?
2020-10-15 14:09:34 bliminse joins (~bliminse@host217-42-95-37.range217-42.btcentralplus.com)
2020-10-15 14:10:28 <zwarag> sure. https://pastebin.com/gBzTdsH1

All times are in UTC.