Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-16 19:46:40 <bollu> wz1000 sure I've read it
2020-11-16 19:46:51 <bollu> wz1000 we need bottoms to get the semi decidability structure
2020-11-16 19:46:59 <bollu> wz1000 so I'm not sure what you mean that we lose topology?
2020-11-16 19:47:06 <merijn> monochrom: 3.4 is rather hard, considering that's not released yet :p
2020-11-16 19:47:23 <wz1000> bollu: I mean if you make bottom observable
2020-11-16 19:47:32 <bollu> wz1000 ah OK, sure.
2020-11-16 19:47:35 <bollu> :)
2020-11-16 19:47:39 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
2020-11-16 19:47:45 × conal quits (~conal@64.71.133.70) (Ping timeout: 240 seconds)
2020-11-16 19:47:47 <sondr3> thanks monochrom, I couldn't find much by searching
2020-11-16 19:48:41 <merijn> sondr3: You should upgrade to 3.0 or 3.2 anyway if you use v2-build, there's been a bunch of improvements and bugfixes in those two versions
2020-11-16 19:48:57 × Franciman quits (~francesco@host-82-56-223-169.retail.telecomitalia.it) (Quit: Leaving)
2020-11-16 19:49:48 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-11-16 19:49:52 <sondr3> I'm on 3.2 already, just haven't been following the Haskell world closely for a while :) Thanks
2020-11-16 19:49:53 mputz joins (~Thunderbi@dslb-084-058-211-084.084.058.pools.vodafone-ip.de)
2020-11-16 19:49:55 × vicfred quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving)
2020-11-16 19:51:45 <sondr3> Is it then possible to run my executable with cabal run automatically and not have it include the test suite?
2020-11-16 19:52:59 conal joins (~conal@66.115.176.210)
2020-11-16 19:53:21 <merijn> "maybe?" I'm not quite sure what you mean?
2020-11-16 19:53:23 ski . o O ( non-monotonic logics )
2020-11-16 19:53:46 <dminuoso> monochrom: Okay, so some reasoning level I understand what monotonicity means. I just fail to see the impact of breaking that.
2020-11-16 19:54:59 <monochrom> Suppose mylazylist is a lazy list, but when evaluated it takes a while to emit the next cons cell and number.
2020-11-16 19:55:02 <sondr3> I get a "cabal: The run command is for running a single executable at once. [...]" message, saying it includes the executable and the test suite, I want cabal run to only run the executable
2020-11-16 19:55:05 <dminuoso> Naively, I'd just say "So say I have some `f :: String -> Int` that perhaps failed, it'd be *very* annoying to have to fix their code for a lack of Maybe, or feed IO through potentially half my program just to deal with it sensibly. This idea of monotonicity seems more like philosophical beauty than something I would care about
2020-11-16 19:55:32 <monochrom> print (f mylazylist) makes sense. print (g mylazylist) doesn't.
2020-11-16 19:55:48 <merijn> sondr3: What's the exact command you write?
2020-11-16 19:56:11 <sondr3> merijn: cabal run
2020-11-16 19:56:34 <merijn> sondr3: A package can have many executables in it, the intended use is "cabal run yourExeName"
2020-11-16 19:57:02 <dminuoso> 20:23:55 monochrom | But if you have g such that g bottom = 4 : bottom, g (1:bottom) = []. Now that's bad.
2020-11-16 19:57:04 <dminuoso> Mmm
2020-11-16 19:57:07 <ski> (in logic programming, you have an analogue of non-monotonic functions : non-steadfast predicates/relations. if you provide more information (in parameters) upfront to it, it can suddenly gain solutions which are not substitution instances of the ones it had with only less information available. it's generally agreed that this hurts reasonability / predictive power)
2020-11-16 19:57:43 <dminuoso> monochrom: Are you referring to the same f and g you introduced at the beginning?
2020-11-16 19:58:18 <monochrom> "print (f mylazlist)" can do this: print 4 right away, then wait for mylazylist to spit out its first item 1, then print 5 when that happens.
2020-11-16 19:58:37 × ericsagn1 quits (~ericsagne@2405:6580:0:5100:af5d:a404:2c6:5e7e) (Ping timeout: 260 seconds)
2020-11-16 19:58:41 <monochrom> "print (g mylazylist)" cannot do this unless it can roll back time or output transactions.
2020-11-16 19:58:44 <dminuoso> I mean the only reason you're saying "it doesn't make sense" is because your equating "bottom induced by infinite computation" and "bottom as pure exceptions"
2020-11-16 19:58:51 <monochrom> Yes, same f and g.
2020-11-16 19:58:52 <dminuoso> catchPure only deals with the latter
2020-11-16 19:59:04 <dminuoso> On a technical level, catchPure doesn't break g.
2020-11-16 19:59:12 × Wood quits (~wood@2001:d08:1003:2574:5caf:6abd:a992:e5a2) (Ping timeout: 260 seconds)
2020-11-16 19:59:14 pavonia joins (~user@unaffiliated/siracusa)
2020-11-16 19:59:18 <dminuoso> It just ruins your paradise of perfect symmetry and beauty
2020-11-16 19:59:30 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Quit: Lost terminal)
2020-11-16 19:59:57 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
2020-11-16 19:59:58 <dminuoso> Because `f (g mylazylist)` would just print [] and be done with it
2020-11-16 20:00:05 <dminuoso> After a while.
2020-11-16 20:00:08 <sondr3> merijn: fair, it's just annoying since I don't care about the test-suite when I do cabal run :)
2020-11-16 20:00:38 <merijn> sondr3: If you write out the name you shouldn't get that, but if you wanna frequently test an executable while developing I've got a lifehack for you
2020-11-16 20:01:06 gstv joins (59e9c219@89-233-194-25.cust.bredband2.com)
2020-11-16 20:01:13 juuandyy joins (~juuandyy@90.166.144.65)
2020-11-16 20:01:34 <merijn> sondr3: https://paste.tomsmeding.com/9sTHIIML adjust the path to cabal.project file and executable name as needed, and done!
2020-11-16 20:01:45 × bidabong quits (uid272474@gateway/web/irccloud.com/x-baxncysxwetsxiet) (Quit: Connection closed for inactivity)
2020-11-16 20:02:02 × conal quits (~conal@66.115.176.210) (Quit: Computer has gone to sleep.)
2020-11-16 20:02:17 <sondr3> merijn: awesome, thanks
2020-11-16 20:02:33 <merijn> sondr3: For my own programs I have a shell script like that in my path so I can conveniently test/use them while developing, automatically compiling the latest version and then running
2020-11-16 20:03:18 × revprez_anzio quits (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net) (Ping timeout: 260 seconds)
2020-11-16 20:03:39 revprez_anzio joins (~revprez_a@pool-108-49-213-40.bstnma.fios.verizon.net)
2020-11-16 20:04:02 × vacm quits (~vacwm@70.23.92.191) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-11-16 20:04:14 batuhan35 joins (9f920e61@159.146.14.97)
2020-11-16 20:05:05 vacm joins (~vacwm@70.23.92.191)
2020-11-16 20:05:11 × ph88 quits (~ph88@2a02:8109:9e00:7e5c:64a6:6e00:3dc3:e56a) (Ping timeout: 272 seconds)
2020-11-16 20:05:18 × avdb quits (~avdb@ip-213-49-61-183.dsl.scarlet.be) (Quit: avdb)
2020-11-16 20:06:00 conal joins (~conal@66.115.176.210)
2020-11-16 20:06:32 <dolio> dminuoso: The justification for 'pure exceptions' is that they are equated with non-terminatiaon bottom.
2020-11-16 20:06:48 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
2020-11-16 20:07:04 <dolio> At least as far as the pure calculus is concerned.
2020-11-16 20:07:30 batuhan35 parts (9f920e61@159.146.14.97) ()
2020-11-16 20:07:35 × sondr3 quits (54d33884@cm-84.211.56.132.getinternet.no) (Remote host closed the connection)
2020-11-16 20:07:49 × gstv quits (59e9c219@89-233-194-25.cust.bredband2.com) (Remote host closed the connection)
2020-11-16 20:08:39 knupfer joins (~Thunderbi@200116b82cb80f0020dbfffffeb9f29f.dip.versatel-1u1.de)
2020-11-16 20:08:39 × knupfer quits (~Thunderbi@200116b82cb80f0020dbfffffeb9f29f.dip.versatel-1u1.de) (Client Quit)
2020-11-16 20:08:53 knupfer joins (~Thunderbi@i5E86B4E0.versanet.de)
2020-11-16 20:09:52 × idhugo__ quits (~idhugo@80-62-116-101-mobile.dk.customer.tdc.net) (Ping timeout: 246 seconds)
2020-11-16 20:10:38 × thaumavorio quits (~thaumavor@thaumavor.io) (Quit: ZNC 1.7.1 - https://znc.in)
2020-11-16 20:10:50 ericsagn1 joins (~ericsagne@2405:6580:0:5100:465:234f:7cb8:28a5)
2020-11-16 20:11:04 falafel joins (~falafel@2600:1007:b0ad:6e87:7811:313f:d0f3:f9f4)
2020-11-16 20:11:32 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Read error: Connection reset by peer)
2020-11-16 20:11:49 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
2020-11-16 20:14:44 × jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
2020-11-16 20:15:17 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Client Quit)
2020-11-16 20:18:51 <monochrom> dminuoso: Yes OK, it is a more complicated model, but it can work.
2020-11-16 20:19:26 <dminuoso> monochrom: I want to stress that Im not arguing why `catchPure` is fine, just trying to understand why there's this strong opposition.
2020-11-16 20:21:04 × falafel quits (~falafel@2600:1007:b0ad:6e87:7811:313f:d0f3:f9f4) (Read error: Connection reset by peer)
2020-11-16 20:21:28 <monochrom> I still like the simpler model most of the time. When in the rare cases I can benefit from the complication, I would rather use explicit Maybe's so it is a non-pervasive opt-in system.
2020-11-16 20:21:49 alp joins (~alp@2a01:e0a:58b:4920:d8db:f457:3fb6:53df)
2020-11-16 20:22:06 takuan joins (~takuan@178-116-218-225.access.telenet.be)
2020-11-16 20:23:19 <dminuoso> monochrom: the thing is just, it seems as if the argument is: introducing `catchPure` would allow for "non-sensical" g
2020-11-16 20:23:35 <dminuoso> Which is a non-issue, because catchPure couldn't (possibly) solve the halting problem
2020-11-16 20:24:40 <dminuoso> I get how it would break monotonicity (meaning more defined inputs do not create more defined outputs), but perhaps Im just not seeing the value of that possible reasoning
2020-11-16 20:24:42 × juuandyy quits (~juuandyy@90.166.144.65) (Quit: Konversation terminated!)
2020-11-16 20:25:00 <dminuoso> That is, is there a motivating example where its useful to think `oh, if I make this input more defined, the output becomes more defined`
2020-11-16 20:25:34 <dminuoso> So far Im getting the impression this is just some "academic purity" in the way of "a practical function"
2020-11-16 20:26:02 <dolio> Once you have side effects, you start having to worry about exact evaluation orders.
2020-11-16 20:26:03 × dhouthoo quits (~dhouthoo@ptr-eiv6509pb4ifhdr9lsd.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9)
2020-11-16 20:26:07 <dolio> That's not academic.
2020-11-16 20:26:39 <dminuoso> Sure, but there's no side effects in pure code.
2020-11-16 20:26:55 <dolio> There are once you can catch exceptions and look at them.
2020-11-16 20:27:26 <monochrom> You have a pervasive exception system, that's what it is. As usual, the price for a pervasive exception system is documentation: For each value, you have to tell the user: if some input throws an exception, what do you do? and under what circumstance you will throw exceptions.
2020-11-16 20:28:31 <monochrom> This community is already pretty unhappy that most IO actions are pretty undocumented on the pretty anticipated IO exceptions.
2020-11-16 20:28:42 <monochrom> Now imagine bringing that to all of Prelude.

All times are in UTC.