Logs: freenode/#haskell
| 2021-04-18 14:21:59 | <gentauro> | wz1000: `<interactive>:3:7: error: Variable not in scope: unsafeCoerce` |
| 2021-04-18 14:22:04 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 265 seconds) |
| 2021-04-18 14:22:11 | <gentauro> | with `stack ghci --ghc-options -XSafe --ghc-options -fpackage-trust --ghc-options -trust=base` |
| 2021-04-18 14:22:38 | <gentauro> | wz1000: so Safe Haskell works as expected ;) |
| 2021-04-18 14:23:10 | gentauro | please Mr. Haskells peeps, don't remove Safe Haskell, converting the language to JavaScript 0.11 + npm :( |
| 2021-04-18 14:23:30 | <maerwald> | I don't think safe haskell has significant impact on ecosystem quality |
| 2021-04-18 14:23:46 | <wz1000> | gentauro: are you running the same code? I can run it with ghci -XSafe -fpackage-trust -trust=base LaunchMissiles.hs |
| 2021-04-18 14:24:06 | gentauro | haven't our (devs) people suffered enough? |
| 2021-04-18 14:24:07 | <wz1000> | gentauro: there is a definition of unsafeCoerce in the file... |
| 2021-04-18 14:25:04 | <gentauro> | wz1000: oh, I thought you were pointing to `unsafeCoerce`. My bad :9 |
| 2021-04-18 14:25:04 | × | ddellacosta quits (ddellacost@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 252 seconds) |
| 2021-04-18 14:25:16 | → | dpl joins (~dpl@77-121-78-163.chn.volia.net) |
| 2021-04-18 14:26:26 | <gentauro> | wz1000: your code works |
| 2021-04-18 14:26:27 | <gentauro> | :( |
| 2021-04-18 14:26:30 | <maerwald> | https://hackage.haskell.org/package/directory-1.3.6.1/docs/System-Directory.html this is Safe haskell, but on windows it will likely fail to delete a file and moreso directories, because the IO logic isn't sufficient |
| 2021-04-18 14:26:39 | <maerwald> | so what does it matter? |
| 2021-04-18 14:27:05 | <wz1000> | gentauro: it will be fixed in 9.2 I think: https://gitlab.haskell.org/ghc/ghc/-/issues/19287 |
| 2021-04-18 14:27:34 | <int-e> | SafeHaskell has always assumed that the type system itself is sound... so yes, ghc bugs are a big problem |
| 2021-04-18 14:28:10 | <gentauro> | wz1000: but this only happens cos of `DuplicateRecordFields` right? |
| 2021-04-18 14:28:21 | <gentauro> | I normally specify in my cabal files which PRAGMAS I allow |
| 2021-04-18 14:28:28 | gentauro | very very few |
| 2021-04-18 14:28:35 | <int-e> | it also doesn't really cover the compilation of libraries... you can do all kinds of evil things in Setup.l?hs and the like. |
| 2021-04-18 14:28:41 | <wz1000> | yes, but only because you don't know of any other ways of adding unsoundness |
| 2021-04-18 14:28:44 | <gentauro> | which is annoying, but helps keep out all these "strange" things |
| 2021-04-18 14:29:18 | <maerwald> | so deleting directories recursively on windows via that module is NOT safe |
| 2021-04-18 14:29:38 | <maerwald> | *shrug* |
| 2021-04-18 14:29:45 | <nshepperd2> | maerwald: IO is intended to be able to do anything, so that's working as intended |
| 2021-04-18 14:29:49 | <maerwald> | yes |
| 2021-04-18 14:29:55 | <maerwald> | hence Safe haskell isn't interesting |
| 2021-04-18 14:30:03 | → | Wuzzy joins (~Wuzzy@p5790e74f.dip0.t-ipconnect.de) |
| 2021-04-18 14:30:12 | <maerwald> | there are bigger fish to fry if you care about *safety* |
| 2021-04-18 14:30:14 | <nshepperd2> | if you want IO that can't do anything, you better use Safe Haskell and only use a free monad |
| 2021-04-18 14:30:29 | <maerwald> | that won't fix that bug |
| 2021-04-18 14:30:29 | <nshepperd2> | with a limited set of operations |
| 2021-04-18 14:30:42 | <maerwald> | the type system isn't the problem here |
| 2021-04-18 14:30:47 | <gentauro> | to be honest, my assumption has always been that anything running on Windows was unsafe :) |
| 2021-04-18 14:31:09 | gentauro | I once prepared to run something on windows, but gave up cos of CI/CD … |
| 2021-04-18 14:31:13 | → | lambdaman joins (~lambdaman@s66-183-152-156.bc.hsia.telus.net) |
| 2021-04-18 14:31:32 | <gentauro> | if it builds on a Linux distro, I find that enough |
| 2021-04-18 14:31:37 | <maerwald> | well, this was an example... it won't be hard finding unix IO code that is unsafe |
| 2021-04-18 14:31:40 | <nshepperd2> | maerwald: not sure how your example is relevant then |
| 2021-04-18 14:31:54 | <maerwald> | nshepperd2: I just explained it :) |
| 2021-04-18 14:32:04 | <nshepperd2> | your complaint seems to be that ghc isn't a superintelligent mind reading robot? |
| 2021-04-18 14:32:14 | <maerwald> | no |
| 2021-04-18 14:32:37 | <nshepperd2> | of course you have to write the right code instead of the wrong code if you want to write a program that does something |
| 2021-04-18 14:32:39 | <maerwald> | <maerwald> there are bigger fish to fry if you care about *safety* |
| 2021-04-18 14:33:19 | <maerwald> | <maerwald> I don't think safe haskell has significant impact on ecosystem quality |
| 2021-04-18 14:33:23 | <maerwald> | those were my points |
| 2021-04-18 14:33:51 | <nshepperd2> | who says 'ecosystem quality' is what it's for |
| 2021-04-18 14:34:18 | <maerwald> | nshepperd2: ppl just said it's what separates us from npm |
| 2021-04-18 14:34:22 | <maerwald> | did you read the backlog? |
| 2021-04-18 14:35:05 | → | heatsink joins (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
| 2021-04-18 14:35:11 | <gentauro> | nshepperd2: I do |
| 2021-04-18 14:35:12 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 2021-04-18 14:35:23 | <gentauro> | in the sense: "let me decide which packages to trust" |
| 2021-04-18 14:35:37 | <gentauro> | and "compiler, please help tell me if I'm wrong in my assumptions" |
| 2021-04-18 14:35:43 | <int-e> | Size of the community seems to be a bigger factor, honestly. |
| 2021-04-18 14:35:46 | <gentauro> | I like that |
| 2021-04-18 14:36:25 | <gentauro> | int-e: the bigger the community, the more "shortcuts" there will be taken in code |
| 2021-04-18 14:37:22 | <nshepperd2> | some people writing IO routines that don't do what you want just seems like a totally different issue to preventing pure code from launching missiles |
| 2021-04-18 14:37:24 | <maerwald> | I think fixing broken core packages and base is more worthwhile |
| 2021-04-18 14:37:48 | <maerwald> | for ecosystem quality |
| 2021-04-18 14:38:03 | → | Zunaka joins (~IceChat9@176.24.159.82) |
| 2021-04-18 14:38:23 | <maerwald> | preventing pure code from launching missiles is nothing I lose sleep over... it's just a haskell marketing trick |
| 2021-04-18 14:38:30 | × | lambdaman quits (~lambdaman@s66-183-152-156.bc.hsia.telus.net) (Ping timeout: 265 seconds) |
| 2021-04-18 14:38:40 | <maerwald> | show me a program that doesn't have massive amounts of IO anyway |
| 2021-04-18 14:38:45 | <nshepperd2> | it has some applications |
| 2021-04-18 14:38:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 2021-04-18 14:38:56 | <maerwald> | hell, the RTS can launch missiles all the time |
| 2021-04-18 14:39:06 | <gentauro> | I like Marlows quote on Safe Haskell: http://blog.stermon.com/articles/2019/02/21/the-main-reason-i-use-safe-haskell-is-restriction.html |
| 2021-04-18 14:39:16 | <gentauro> | “For typical Haskell programmers, using {-# LANGUAGE Safe #-} will be like -Wall: something that is considered good practice from a hygiene point of view. If you don’t need access to unsafe features, then it’s better to write in the safe subset, where you have stronger guarantees. Just like -Wall, you get to choose whether to use {-# LANGUAGE Safe #-} or not.” |
| 2021-04-18 14:39:27 | <int-e> | we all know that the impact of missiles is corrupting all your files and leaving behind core dumps |
| 2021-04-18 14:39:52 | × | malumore quits (~malumore@151.62.123.9) (Ping timeout: 240 seconds) |
| 2021-04-18 14:39:57 | × | heatsink quits (~heatsink@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 265 seconds) |
| 2021-04-18 14:40:41 | × | nut quits (~user@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 240 seconds) |
| 2021-04-18 14:41:26 | <maerwald> | That's why I'm confused no one in haskell seems to be particularly worried about checking binaries against specifications. Even in correctness critical domains, the maximum I've seen was type level programming and property tests. |
| 2021-04-18 14:41:30 | <nshepperd2> | and i don't think it makes any sense at all to take aim at a ghc feature on the basis that some other unrelated problem exists |
| 2021-04-18 14:42:06 | <maerwald> | it's all about time, maintenance and gain |
| 2021-04-18 14:42:41 | → | jao joins (~jao@pdpc/supporter/professional/jao) |
| 2021-04-18 14:43:44 | <nshepperd2> | sure, it's easier to destroy than to create |
| 2021-04-18 14:43:46 | × | Guest72361 quits (~textual@zrcout.mskcc.org) (Ping timeout: 252 seconds) |
| 2021-04-18 14:43:58 | <maerwald> | no it isn't... deleting code is the hardest |
| 2021-04-18 14:44:11 | <maerwald> | writing new code is the easiest :) |
| 2021-04-18 14:44:22 | → | xkapastel joins (uid17782@gateway/web/irccloud.com/x-isdhgqaucsczyafg) |
| 2021-04-18 14:44:52 | × | frozenErebus quits (~frozenEre@37.231.244.249) (Ping timeout: 252 seconds) |
| 2021-04-18 14:45:46 | <maerwald> | but this is more of a bikeshed topic... do what you will! :) |
| 2021-04-18 14:47:19 | → | frozenErebus joins (~frozenEre@37.231.244.249) |
| 2021-04-18 14:47:20 | × | tv quits (~tv@unaffiliated/tv) (Ping timeout: 246 seconds) |
| 2021-04-18 14:48:47 | → | Alleria joins (~textual@mskresolve-a.mskcc.org) |
| 2021-04-18 14:49:12 | Alleria | is now known as Guest27054 |
| 2021-04-18 14:50:38 | <int-e> | gentauro: if you benefit from SafeHaskell you should probably chime in on goldfire's question (subject: Safe Hashell?) on haskell-cafe |
| 2021-04-18 14:51:16 | → | Tario joins (~Tario@201.192.165.173) |
| 2021-04-18 14:52:44 | <gentauro> | int-e: I have been doing that ;) |
| 2021-04-18 14:53:00 | gentauro | shadow-copying our discussions to the reddit post xD |
| 2021-04-18 14:53:22 | <int-e> | well, reddit is invisible to me |
| 2021-04-18 14:54:34 | <gentauro> | int-e: why is that? You don't reddit? |
| 2021-04-18 14:54:58 | → | ddellacosta joins (~ddellacos@86.106.143.144) |
| 2021-04-18 14:55:39 | <int-e> | gentauro: IRC is already all the https://xkcd.com/386/ I can take |
| 2021-04-18 14:56:13 | <int-e> | There's also the javascript issue, but teddit solves that I suppose. |
| 2021-04-18 14:56:34 | <gentauro> | int-e: xD |
All times are in UTC.