Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 675 676 677 678 679 680 681 682 683 684 685 .. 5022
502,152 events total
2020-10-16 14:52:34 <lambdabot> Exception e => e -> a
2020-10-16 14:52:44 <phadej> you shouldn't, but you can
2020-10-16 14:52:45 <phadej> and / throws
2020-10-16 14:52:49 <phadej> > 1 / 0 :: Int
2020-10-16 14:52:51 <lambdabot> error:
2020-10-16 14:52:51 <lambdabot> • No instance for (Fractional Int) arising from a use of ‘/’
2020-10-16 14:52:51 <lambdabot> • In the expression: 1 / 0 :: Int
2020-10-16 14:52:53 Tops2 joins (~Tobias@dyndsl-091-249-082-055.ewe-ip-backbone.de)
2020-10-16 14:52:55 <phadej> > 1 `div` 0 :: Int
2020-10-16 14:52:57 <lambdabot> *Exception: divide by zero
2020-10-16 14:53:01 <davean> phadej: no, All the exception monads that aren't transforms of IO/ST
2020-10-16 14:53:20 <merijn> davean: I don't consider those exceptions, tbh
2020-10-16 14:53:25 <merijn> (stuff like ExceptT)
2020-10-16 14:53:26 <dolio> You can throw IOErrors in pure code if you want in GHC.
2020-10-16 14:53:56 × ephemera_ quits (~E@122.34.1.187) (Remote host closed the connection)
2020-10-16 14:54:02 <davean> dolio: I don't want, can I still do it?
2020-10-16 14:54:14 <dolio> You can.
2020-10-16 14:54:24 <davean> Damn
2020-10-16 14:54:24 <dolio> But if you don't want, you probably won't.
2020-10-16 14:54:39 <phadej> davean: these have overheads, mostyl acceptable, sometimes not
2020-10-16 14:54:43 × p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection)
2020-10-16 14:54:46 <phadej> and that sometimes is nasty :(
2020-10-16 14:55:06 <davean> phadej: They have overhead, sure, but they do catch pure exceptions effectively.
2020-10-16 14:55:15 ephemera_ joins (~E@122.34.1.187)
2020-10-16 14:55:34 <davean> Theres no reason we couldn't build a better version of them
2020-10-16 14:55:36 <phadej> davean: but they aren't vocabulary. If you want to catch division by zero, you need to rewrite about everything
2020-10-16 14:55:48 <davean> phadej: thats just a failing of Haskell currently.
2020-10-16 14:55:59 <davean> Because our sollutions are bad doesn't mean we can't have less shitty ones
2020-10-16 14:56:13 <davean> It is clearly a solvable problem
2020-10-16 14:56:16 <merijn> Like I said, I think it can be done
2020-10-16 14:56:26 <davean> We absolutely *know* it can be done
2020-10-16 14:56:30 <phadej> I don't think people would agree on Either someting a to be the result type of division
2020-10-16 14:56:32 <merijn> Probably not in a backwards compatible way with Haskell, which is a shame :\
2020-10-16 14:56:38 <merijn> phadej: Without that
2020-10-16 14:56:41 <phadej> it have to be convinienet enough to be used
2020-10-16 14:56:45 <phadej> (or first accepted)
2020-10-16 14:57:31 <hyperisco> mm how about use constraints
2020-10-16 14:57:33 <merijn> Actually, maybe it could be backward compatible enough...
2020-10-16 14:57:47 <davean> The question isn't if it can be done, its how much we like the best version we know how to make
2020-10-16 14:57:50 <hyperisco> (/) :: Exceptional => Int -> Int -> Int
2020-10-16 14:57:51 <merijn> You know what I also want that ties into this
2020-10-16 14:57:59 <hyperisco> or Partial
2020-10-16 14:58:08 <merijn> strictness polymorphic code
2020-10-16 14:58:25 karanlikmadde joins (~karanlikm@2a01:c23:6037:1800:e990:a27c:f553:f1d1)
2020-10-16 14:58:27 <davean> merijn: Thats sorta levity polymorphism ...
2020-10-16 14:58:33 <davean> (Which Haskell sucks at)
2020-10-16 14:58:36 <phadej> merijn: that sounds that you don't want Haskell anymore, but something else ;)
2020-10-16 14:58:37 djellemah joins (~djellemah@2601:5c2:100:96c:e008:b638:39fe:6a54)
2020-10-16 14:58:42 <merijn> phadej: I do
2020-10-16 14:58:48 <hyperisco> catch :: (Partial => x) -> (Exception -> x) -> x
2020-10-16 14:58:49 <merijn> (want something else)
2020-10-16 14:58:57 <phadej> that's fair
2020-10-16 14:59:09 <merijn> But implementing a sufficiently well-performing alternative to Haskell is more than a 1 person job :p
2020-10-16 14:59:22 <merijn> phadej: I want something that is a lot *like* Haskell, but not Haskell
2020-10-16 14:59:32 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 272 seconds)
2020-10-16 14:59:41 <phadej> merijn: having a prototype toy language is something 1 person can still make
2020-10-16 14:59:44 <merijn> Maybe csaba's whole program compilation stuff will help me get started
2020-10-16 15:00:01 <hyperisco> I bet that is doable with backwards compatibility
2020-10-16 15:00:01 × shortdudey1231 quits (~shortdude@185.204.1.185) ()
2020-10-16 15:00:03 <phadej> then bigger community can think whether it can be bolted back to GHC Haskell, if its found valuable
2020-10-16 15:00:22 lnlsn joins (~lnlsn@189.100.212.150)
2020-10-16 15:00:33 × machined1od quits (~machinedg@24.105.81.50) (Quit: leaving)
2020-10-16 15:00:47 <merijn> phadej: A lot of the things I truly want are probably to invasive to ever get into GHC (it'd be a mess trying to intergrate it with the existing dependent haskell stuff, etc.)
2020-10-16 15:01:11 machinedgod joins (~machinedg@24.105.81.50)
2020-10-16 15:01:16 <phadej> well, LinearTypes got in...
2020-10-16 15:01:20 <hyperisco> then we can watch the Partial constraint get inferred on most of Haskell code :P
2020-10-16 15:01:21 <merijn> But csaba's has (wildly ambitious plans) to develop/split of the Core pipeline from GHC, which I think would be an *amazing* development
2020-10-16 15:01:28 <merijn> phadej: People got paid to make linear types ;)
2020-10-16 15:01:31 <phadej> I do think everything is possible if you want (and yell) hard enough
2020-10-16 15:02:07 <merijn> If GHC's code generation could be split off and reused I think that'd encourage/help experimenting with other languages a lot
2020-10-16 15:02:21 <phadej> yes
2020-10-16 15:02:23 <merijn> Like, having something that can ingest something like Core
2020-10-16 15:02:34 <merijn> I can work with Core and reasonably target it
2020-10-16 15:02:52 <phadej> Well, no. Core evolves
2020-10-16 15:02:57 <phadej> it changed with linear types e.g.
2020-10-16 15:03:03 <phadej> and will further change with more dependent haskell
2020-10-16 15:03:06 × toorevitimirp quits (~tooreviti@117.182.180.0) (Ping timeout: 260 seconds)
2020-10-16 15:03:18 × kritzefitz quits (~kritzefit@fw-front.credativ.com) (Ping timeout: 260 seconds)
2020-10-16 15:03:27 <phadej> so it's not that stable interface (though quite small, so you may be able to adopt)
2020-10-16 15:04:02 <phadej> but it's very likely it will iss some feature that an experimental frontend would like to have
2020-10-16 15:04:14 <phadej> (that's the case with LLVM IR e.g.)
2020-10-16 15:04:52 <merijn> phadej: Yeah, but an evolving high level interface is much better than having to compile to LLVM IR myself
2020-10-16 15:04:53 <phadej> one IR to rule them all is quite ambitious goal :)
2020-10-16 15:05:01 <merijn> that's way too low level to deal with
2020-10-16 15:05:02 Deide joins (~Deide@217.155.19.23)
2020-10-16 15:05:19 <phadej> (the type-theoreitical IR = Core-like language, it is)
2020-10-16 15:05:53 <phadej> but I do agree, that making GHC Core usable without GHC frontend is a good first step
2020-10-16 15:05:55 <dolio> LLVM seems to lack features for compiling functional languages, too.
2020-10-16 15:05:58 <phadej> and quite big one
2020-10-16 15:06:00 <merijn> phadej: but having to develop a full native code backend is just way too much work for someone to attempt with a useful goal
2020-10-16 15:06:28 <phadej> (i..e. if GHC Core is good enough for your experiment, it's a shame it cannot be used today)
2020-10-16 15:07:16 <merijn> Or GRIN, I suppose
2020-10-16 15:09:49 damianfral joins (uid469644@gateway/web/irccloud.com/x-glchetbxfivfvobd)
2020-10-16 15:10:52 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-16 15:11:27 × pjb quits (~t@2a01cb04063ec500259c126a59c35166.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds)
2020-10-16 15:13:22 vicfred joins (~vicfred@unaffiliated/vicfred)
2020-10-16 15:14:20 × chaosmasttter quits (~chaosmast@p200300c4a710fa01b4d1efe2d5e04ce9.dip0.t-ipconnect.de) (Ping timeout: 246 seconds)
2020-10-16 15:14:24 × vicfred quits (~vicfred@unaffiliated/vicfred) (Max SendQ exceeded)
2020-10-16 15:14:55 vicfred joins (~vicfred@unaffiliated/vicfred)
2020-10-16 15:15:33 × hiroaki quits (~hiroaki@ip4d176049.dynamic.kabel-deutschland.de) (Ping timeout: 260 seconds)

All times are in UTC.