Logs: freenode/#haskell
| 2020-11-01 17:57:40 | → | wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) |
| 2020-11-01 17:58:13 | × | tito_04 quits (~taurux@net-188-152-104-202.cust.dsl.teletu.it) (Ping timeout: 260 seconds) |
| 2020-11-01 17:59:15 | <fendor> | what is the safe language extension even? |
| 2020-11-01 17:59:26 | × | thir quits (~thir@p200300f27f0b7e00f4e9381c2bf90854.dip0.t-ipconnect.de) (Ping timeout: 264 seconds) |
| 2020-11-01 18:00:01 | × | Dragavnir quits (~Dragavnir@178.239.168.171) () |
| 2020-11-01 18:00:04 | → | taurux joins (~taurux@net-188-152-78-21.cust.vodafonedsl.it) |
| 2020-11-01 18:00:11 | <c_wraith> | no one really knows |
| 2020-11-01 18:00:28 | <c_wraith> | by which I mean "I've tried to understand it and failed, therefore it's impossible" |
| 2020-11-01 18:01:56 | × | conal quits (~conal@ip-66-115-176-132.creativelink.net) (Quit: Computer has gone to sleep.) |
| 2020-11-01 18:02:23 | → | elliott_ joins (~elliott_@pool-108-51-141-12.washdc.fios.verizon.net) |
| 2020-11-01 18:02:50 | <c_wraith> | It's a system for marking code as safe. A safe module can only import other safe modules, or ones that have been marked as trustworthy and you've decided to trust |
| 2020-11-01 18:03:34 | <fendor> | and what is the final purpose? To import dynamically unsafe code? |
| 2020-11-01 18:03:43 | <c_wraith> | But what "safe" actually means is a bit of a mystery to me. Does it mean type safety, memory safety, freedom from malicious code? |
| 2020-11-01 18:03:59 | → | knupfer joins (~Thunderbi@200116b82ca86a0031b5db2845852757.dip.versatel-1u1.de) |
| 2020-11-01 18:04:08 | → | hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-almrgtblciiegvzz) |
| 2020-11-01 18:04:22 | <geekosaur> | to mark code which doesn't need to be considered for safety, by some definition of safety which is not itself well defined |
| 2020-11-01 18:04:33 | <geekosaur> | so you in theory can focus on the less safe parts |
| 2020-11-01 18:04:56 | <monochrom> | For example System.IO.Unsafe is not marked as safe, and it is where unsafePerformIO comes from. So you don't allow yourself to use unsafePerformIO, or transitively import from other modules that use unsafePerformIO. |
| 2020-11-01 18:05:25 | <c_wraith> | unless they're trustworthy, of course, which muddles the whole thing |
| 2020-11-01 18:05:48 | <monochrom> | This is why the whole scheme didn't get traction. |
| 2020-11-01 18:06:34 | → | justanotheruser joins (~justanoth@unaffiliated/justanotheruser) |
| 2020-11-01 18:06:54 | <c_wraith> | Debug.Trace is explicitly marked as Unsafe. |
| 2020-11-01 18:07:10 | <c_wraith> | What's unsafe about it? |
| 2020-11-01 18:07:21 | → | geowiesnot joins (~user@87-89-181-157.abo.bbox.fr) |
| 2020-11-01 18:07:43 | <maerwald> | unsafePerformIO? |
| 2020-11-01 18:07:57 | <monochrom> | It turns out that cultural peer pressure to write pure-functional code and crowd knowledge of which libraries are being naughty are more trustworthy (pun!) than this marker system. |
| 2020-11-01 18:08:37 | <c_wraith> | maerwald: it uses it, but it doesn't export it. Or anything that can do its job, as far as I can tell. |
| 2020-11-01 18:08:52 | <monochrom> | Also cultural consensus of which usages of unsafePerformIO are acceptable (such as Debug.Trace's) |
| 2020-11-01 18:09:25 | × | bennofs1 quits (~benno@dslb-094-222-054-143.094.222.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
| 2020-11-01 18:09:37 | <c_wraith> | I would have marked Debug.Trace as Trustworthy |
| 2020-11-01 18:09:59 | <c_wraith> | But yeah, this is just evidence no one can agree on what Safe actually means |
| 2020-11-01 18:10:14 | <monochrom> | It is useful during development. But it shouldn't stay when shipping production code. |
| 2020-11-01 18:10:40 | <c_wraith> | Sure, but I don't want to have to turn off Safe in half the modules in my program just to debug something |
| 2020-11-01 18:10:45 | <monochrom> | You have f :: Int -> Bool you simply don't expect it to cause some messages on stderr |
| 2020-11-01 18:11:00 | <monochrom> | No disagreement there. |
| 2020-11-01 18:12:36 | → | mokulus joins (~mat@176.111.230.96) |
| 2020-11-01 18:12:42 | <c_wraith> | and sure, I could mark the module I'm debugging as Trustworthy, but then you're back to the status quo, relying on code review (automated via linter or manual) to notice you're doing something sketchy |
| 2020-11-01 18:13:05 | <monochrom> | A simple use of CPP and -DDEBUG the way C programmers have figured out is far simpler and more reliable. |
| 2020-11-01 18:13:35 | <dsal> | I was reading https://www.snoyman.com/blog/2020/10/haskell-bad-parts-1 and found it a little less satisfying. Don't use `sum` because it's implemented with foldMap and something something. Just use RIO fo reverything. |
| 2020-11-01 18:14:05 | <maerwald> | RIO :D |
| 2020-11-01 18:14:05 | <monochrom> | #ifdef DEBUG \n import Debug.Trace \n #else \n import AllDebugTraceFunctionsAreNoop #endif |
| 2020-11-01 18:14:05 | <c_wraith> | "don't use sum because it's bad to rely on the optimizer getting the case right that it gets right every time" |
| 2020-11-01 18:14:06 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Remote host closed the connection) |
| 2020-11-01 18:14:12 | × | wallacer3 quits (~quassel@ns3134113.ip-37-187-4.eu) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 2020-11-01 18:14:26 | <maerwald> | I don't even think RIO is bad... it's just not very exciting overall |
| 2020-11-01 18:14:37 | × | ColdRush_ quits (~coldrush@4e69b241.skybroadband.com) (Ping timeout: 264 seconds) |
| 2020-11-01 18:14:53 | → | gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 2020-11-01 18:14:59 | <c_wraith> | RIO is fine. I'd probably use it, if I were starting an application from scratch. At least assuming it doesn't drag any of the monotraversable stuff in with it |
| 2020-11-01 18:15:01 | × | dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection) |
| 2020-11-01 18:15:09 | <dsal> | I use unliftio some. I've not abandoned life as I know it for that religion, though. Too many little religions out here. |
| 2020-11-01 18:16:25 | <dsal> | I don't like advice where "the simple obvious thing is wrong (in rare cases you probably don't care about)" turns into "always invent your own `sum` when you're adding stuff together" |
| 2020-11-01 18:16:31 | hackage | quickcheck-instances 0.3.25 - Common quickcheck instances https://hackage.haskell.org/package/quickcheck-instances-0.3.25 (phadej) |
| 2020-11-01 18:16:40 | <monochrom> | This is why I keep saying that programmers are basically clergy-would-be-but-want-more-money. Just look at Larry Wall. |
| 2020-11-01 18:17:01 | <koz_> | monochrom: Were you the coiner of 'category theology' that time? |
| 2020-11-01 18:17:05 | <c_wraith> | I'm not sure we want more money. Look at catholic cathedrals. |
| 2020-11-01 18:17:07 | <monochrom> | No. |
| 2020-11-01 18:17:41 | <dsal> | I don't want money, I just want people to do things the right way, but people all have their own wrong ideas of what the right way is. |
| 2020-11-01 18:18:30 | <suzu_> | i'd like money |
| 2020-11-01 18:18:32 | <suzu_> | how do i get the money |
| 2020-11-01 18:18:48 | <c_wraith> | sell your soul to google. |
| 2020-11-01 18:18:50 | <monochrom> | Simply s/do things/find the meaning of life/ and see my point. :) |
| 2020-11-01 18:18:53 | <maerwald> | "The code passes all integration tests. And then someone in Russia with a weird Windows code page set and a Cyrillic character in their name files a bug report 2 years later about how they can’t build anything" |
| 2020-11-01 18:18:57 | <maerwald> | Those russians, hahaha |
| 2020-11-01 18:19:05 | → | DavidEichmann joins (~david@43.240.198.146.dyn.plus.net) |
| 2020-11-01 18:19:09 | <koz_> | maerwald: Vodka, bear, balalaika. |
| 2020-11-01 18:19:28 | <Rembane> | Gopnik programmer memes |
| 2020-11-01 18:19:39 | <koz_> | Rembane: Squat while coding. |
| 2020-11-01 18:19:48 | → | ColdRush joins (~coldrush@4e69b241.skybroadband.com) |
| 2020-11-01 18:19:50 | <koz_> | Who needs standing desk when you have squatting desk? |
| 2020-11-01 18:20:18 | <Rembane> | koz_: Totally. Much better for code and life. |
| 2020-11-01 18:20:45 | <maerwald> | "instead of readFile, I recommend using readFileUtf8, which is available from rio." |
| 2020-11-01 18:20:46 | <koz_> | Just checked - the desk height for that would be about the height of a chair. |
| 2020-11-01 18:20:52 | <maerwald> | That isn't logical |
| 2020-11-01 18:21:04 | → | nerdboy1 joins (~nerdboy@154.13.1.56) |
| 2020-11-01 18:21:05 | <maerwald> | so we just assume utf8 now? |
| 2020-11-01 18:21:47 | <monochrom> | Why are you wasting your time on Snoyman drivels? :) |
| 2020-11-01 18:21:51 | <dsal> | I got lost in that thing. I started paying a little less attention to Snoyman when he reviews a Scott Adams book. It's not a good logical stance, but I can't take anyone seriously who'd take Scott Adams seriously. |
| 2020-11-01 18:22:07 | <koz_> | Yeah, I agree with monochrom here. |
| 2020-11-01 18:22:18 | <koz_> | Just let him live in his weird fantasy world. |
| 2020-11-01 18:22:22 | → | kekeqaq joins (34f6a1c2@52.246.161.194) |
| 2020-11-01 18:22:26 | × | kekeqaq quits (34f6a1c2@52.246.161.194) (Remote host closed the connection) |
| 2020-11-01 18:22:46 | <Rembane> | Someone has to live in that world, I'm grateful that I don't. |
| 2020-11-01 18:22:53 | <koz_> | Rembane: Likewise. |
| 2020-11-01 18:22:57 | <monochrom> | To be sure, sometimes he makes some good points. So heed the good advice, and don't worry about the rest. |
| 2020-11-01 18:24:01 | <MarcelineVQ> | this is why anonymity is powerful, you can examine positions instead of people |
| 2020-11-01 18:24:22 | → | sh9 joins (~sh9@softbank060116136158.bbtec.net) |
| 2020-11-01 18:25:54 | <MarcelineVQ> | s/can/must |
| 2020-11-01 18:26:48 | <maerwald> | I always treat files as bytes and try to delay interpreting content as long as possible. |
| 2020-11-01 18:27:19 | <maerwald> | and often times, you don't need to know much about the contents |
| 2020-11-01 18:28:19 | → | conal joins (~conal@ip-66-115-176-132.creativelink.net) |
| 2020-11-01 18:29:09 | <maerwald> | anything that does stuff with files more than treating them as bytes has no place in the stdlib |
| 2020-11-01 18:29:33 | × | obihann quits (~jhann@156.34.160.69) (Quit: Lost terminal) |
| 2020-11-01 18:30:01 | hackage | commonmark 0.1.1 - Pure Haskell commonmark parser. https://hackage.haskell.org/package/commonmark-0.1.1 (JohnMacFarlane) |
| 2020-11-01 18:30:03 | → | notnatebtw joins (~nate@125.161.131.30) |
| 2020-11-01 18:30:07 | × | britva quits (~britva@31-10-157-156.cgn.dynamic.upc.ch) (Quit: This computer has gone to sleep) |
| 2020-11-01 18:30:40 | × | nbloomf quits (~nbloomf@2600:1700:ad14:3020:6:b479:1814:49b2) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-11-01 18:31:00 | hackage | commonmark-extensions 0.2.0.2 - Pure Haskell commonmark parser. https://hackage.haskell.org/package/commonmark-extensions-0.2.0.2 (JohnMacFarlane) |
| 2020-11-01 18:34:51 | → | Sgeo joins (~Sgeo@ool-18b982ad.dyn.optonline.net) |
| 2020-11-01 18:36:43 | × | idhugo quits (~idhugo@80-62-116-101-mobile.dk.customer.tdc.net) (Ping timeout: 260 seconds) |
| 2020-11-01 18:39:43 | × | livvy quits (~livvy@gateway/tor-sasl/livvy) (Ping timeout: 240 seconds) |
All times are in UTC.