Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 993 994 995 996 997 998 999 1000 1001 1002 1003 .. 18030
1,802,942 events total
2021-07-18 03:45:41 <c_wraith> in C, you look at return values and check ERRNO and hope nothing concurrent changed it
2021-07-18 03:45:49 <geekosaur> Either can;t handle this kind of exception
2021-07-18 03:48:27 <lars8> guest61, article makes a good argument why exceptions are prefered in IO over Either. https://www.fpcomplete.com/blog/2016/11/exceptions-best-practices-haskell/
2021-07-18 03:48:29 <guest61> if there're multiple IO at the same time, one of them just did this, check ERRNO will work?
2021-07-18 03:48:32 <lars8> +this
2021-07-18 03:48:45 <nitrix> c_wraith, errno is thread-local for POSIX systems.
2021-07-18 03:49:28 <guest61> I thought that try-catch is typical OOP stuff
2021-07-18 03:49:46 <geekosaur> try-catch is not particularly OOP
2021-07-18 03:49:49 <guest61> FP has try-catch is weird
2021-07-18 03:50:21 <nitrix> For Haskell, Either/Maybe is a good way to do error-handling, then you also have nicer monad (transformers) like EitherT to do your exceptions.
2021-07-18 03:50:33 × favonia quits (~favonia@user/favonia) (Ping timeout: 255 seconds)
2021-07-18 03:50:54 <lars8> but then you force callers to handle errors in two ways, via either, and exceptions
2021-07-18 03:50:57 <guest61> yes, but there're exception and run-time exception
2021-07-18 03:51:13 <guest61> Either cant handle run-time exception
2021-07-18 03:51:23 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-07-18 03:51:25 favonia joins (~favonia@user/favonia)
2021-07-18 03:51:38 ubert joins (~Thunderbi@p2e5a50e5.dip0.t-ipconnect.de)
2021-07-18 03:51:50 × ubert quits (~Thunderbi@p2e5a50e5.dip0.t-ipconnect.de) (Client Quit)
2021-07-18 03:52:06 ubert joins (~Thunderbi@p2e5a50e5.dip0.t-ipconnect.de)
2021-07-18 03:52:45 × ubert quits (~Thunderbi@p2e5a50e5.dip0.t-ipconnect.de) (Client Quit)
2021-07-18 03:53:01 ubert joins (~Thunderbi@p2e5a50e5.dip0.t-ipconnect.de)
2021-07-18 03:54:46 × ubert quits (~Thunderbi@p2e5a50e5.dip0.t-ipconnect.de) (Client Quit)
2021-07-18 03:55:35 <guest61> how other languages without try-catch to handle run-time exceptions?
2021-07-18 03:57:10 <xsperry> probably more of a #programming question
2021-07-18 03:59:54 × _xor quits (~xor@74.215.232.67) (Quit: brb)
2021-07-18 04:01:01 _xor joins (~xor@74.215.232.67)
2021-07-18 04:02:01 johnw joins (~johnw@2600:1700:cf00:db0:4c55:69bc:4e4d:1c90)
2021-07-18 04:06:31 wei2912 joins (~wei2912@112.199.250.21)
2021-07-18 04:06:45 soft-warm joins (~soft-warm@2600:8801:db01:8f0:67c1:e7b7:4e84:318d)
2021-07-18 04:10:03 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-18 04:14:24 × favonia quits (~favonia@user/favonia) (Ping timeout: 255 seconds)
2021-07-18 04:16:46 favonia joins (~favonia@user/favonia)
2021-07-18 04:20:33 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
2021-07-18 04:21:43 <lars8> guest61, Either can handle runtime errors, just return Left instead of throwing an exception. but, any IO code can throw exceptions other than the one you considered throwing, but are not returning (async exceptions, out of memory exceptions, etc), and encoding every possible exception in the type would be pretty tedious. java tried something similar with checked exceptions, and they are nearly universally hated
2021-07-18 04:21:54 <lars8> s/not/now
2021-07-18 04:22:14 × Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 268 seconds)
2021-07-18 04:23:52 Maxdamantus joins (~Maxdamant@user/maxdamantus)
2021-07-18 04:24:18 × favonia quits (~favonia@user/favonia) (Ping timeout: 255 seconds)
2021-07-18 04:26:45 favonia joins (~favonia@user/favonia)
2021-07-18 04:27:11 × mcfrdy quits (~mcfrdy@user/mcfrdy) (Ping timeout: 255 seconds)
2021-07-18 04:27:53 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
2021-07-18 04:28:14 <c_wraith> in some sense, Either is the same as checked exceptions. Except that the tools for working with them are a lot more pleasant
2021-07-18 04:28:40 × bgamari_ quits (~bgamari@72.65.101.148) (Ping timeout: 246 seconds)
2021-07-18 04:28:51 bgamari joins (~bgamari@72.65.102.182)
2021-07-18 04:34:43 × chris_ quits (~chris@81.96.113.213) (Remote host closed the connection)
2021-07-18 04:40:57 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:f938:d06a:9ad7:b39c) (Ping timeout: 255 seconds)
2021-07-18 04:44:26 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
2021-07-18 04:46:32 × norias quits (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net) (Ping timeout: 255 seconds)
2021-07-18 04:46:50 Ananta-shesha joins (~pjetcetal@128-71-13-182.broadband.corbina.ru)
2021-07-18 04:50:17 <monochrom> try-catch traces all the way back to a David Parnas 1970s paper. Way before OO.
2021-07-18 04:50:41 <monochrom> OO only added "the Exception type can have user-defined subtypes"
2021-07-18 04:51:17 lavaman joins (~lavaman@98.38.249.169)
2021-07-18 04:51:21 <monochrom> SML also has had exceptions for a long time.
2021-07-18 04:51:31 <monochrom> and SML's predecessors
2021-07-18 04:54:59 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 258 seconds)
2021-07-18 04:55:12 <monochrom> Theorem provers written in *ML used this heavily for backtracking proof search. So it was not just I/O even.
2021-07-18 04:55:48 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 255 seconds)
2021-07-18 04:56:52 <monochrom> To be sure, in that use case, we now know that it should be Either/Maybe and MonadPlus. But writing theorem provers in *ML was a long long time ago.
2021-07-18 05:00:18 × favonia quits (~favonia@user/favonia) (Ping timeout: 255 seconds)
2021-07-18 05:00:22 <c_wraith> and if you worry about performance of constructing/matching all those data types, you might CPS-transform the Either, at which point... you're basically back at exceptions anyway. Except without an extra language construct.
2021-07-18 05:01:40 lavaman joins (~lavaman@98.38.249.169)
2021-07-18 05:02:46 favonia joins (~favonia@user/favonia)
2021-07-18 05:11:00 × favonia quits (~favonia@user/favonia) (Remote host closed the connection)
2021-07-18 05:11:49 favonia joins (~favonia@user/favonia)
2021-07-18 05:11:58 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-07-18 05:16:40 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 252 seconds)
2021-07-18 05:17:37 Erutuon joins (~Erutuon@user/erutuon)
2021-07-18 05:31:59 × mrus quits (~mrus@2001:19f0:5:3fd4:5400:3ff:fe48:1820) (Ping timeout: 255 seconds)
2021-07-18 05:32:06 × jmorris quits (uid433911@id-433911.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
2021-07-18 05:33:46 × retroid_ quits (~retro@97e2ba5d.skybroadband.com) (Ping timeout: 268 seconds)
2021-07-18 05:37:12 ph88 joins (~ph88@2a02:8109:9e00:7e5c:f938:d06a:9ad7:b39c)
2021-07-18 05:37:58 × soft-warm quits (~soft-warm@2600:8801:db01:8f0:67c1:e7b7:4e84:318d) (Ping timeout: 246 seconds)
2021-07-18 05:52:23 mnrmnaugh joins (~mnrmnaugh@pool-96-252-87-182.bstnma.fios.verizon.net)
2021-07-18 05:56:05 Maxdaman1us joins (~Maxdamant@user/maxdamantus)
2021-07-18 05:56:10 × alphabeta quits (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net) (Quit: Quitting IRC :()
2021-07-18 05:56:16 × Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 252 seconds)
2021-07-18 05:56:31 kilolympus joins (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net)
2021-07-18 05:59:00 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2021-07-18 06:00:02 takuan joins (~takuan@178-116-218-225.access.telenet.be)
2021-07-18 06:18:09 × Null_A quits (~null_a@2601:645:8700:2290:b55a:33c2:1e1d:f229) (Ping timeout: 255 seconds)
2021-07-18 06:24:27 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 255 seconds)
2021-07-18 06:26:10 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 256 seconds)
2021-07-18 06:27:22 hyiltiz joins (~quassel@31.220.5.250)
2021-07-18 06:31:32 Maxdaman1us is now known as Maxdamantus
2021-07-18 06:41:01 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-07-18 06:41:02 jmorris joins (uid433911@id-433911.stonehaven.irccloud.com)
2021-07-18 06:42:47 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
2021-07-18 06:45:55 × myShoggoth quits (~myShoggot@97-120-70-214.ptld.qwest.net) (Ping timeout: 268 seconds)
2021-07-18 06:48:23 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 268 seconds)
2021-07-18 06:48:33 PinealGlandOptic joins (~PinealGla@37.115.210.35)
2021-07-18 06:52:07 Guest9 joins (~Guest9@103.250.137.213)
2021-07-18 06:58:01 × desophos quits (~desophos@2601:249:1680:a570:f1ba:fb0d:59f:a0b5) (Quit: Leaving)
2021-07-18 06:59:30 mcfrdy_ joins (uid507892@user/mcfrdy)
2021-07-18 07:03:11 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
2021-07-18 07:05:52 <guest61> update message is Nothing
2021-07-18 07:05:53 <guest61> update message is Nothing
2021-07-18 07:10:24 × kilolympus quits (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net) (Read error: Connection reset by peer)
2021-07-18 07:15:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds)
2021-07-18 07:15:40 × Guest18 quits (~Guest18@2603-8080-6d0d-35bb-0000-0000-0000-0004.res6.spectrum.com) (Quit: Client closed)
2021-07-18 07:22:48 × _xor quits (~xor@74.215.232.67) (Quit: WeeChat 3.2)

All times are in UTC.