2021-11-02 00:00:29 +0100 | Lycurgus | (~juan@98.4.112.204) |
2021-11-02 00:01:38 +0100 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Read error: Connection reset by peer) |
2021-11-02 00:01:59 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) |
2021-11-02 00:03:40 +0100 | MQ-17J | (~MQ-17J@8.6.144.203) |
2021-11-02 00:06:58 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Ping timeout: 268 seconds) |
2021-11-02 00:20:03 +0100 | zero | (~z@user/zero) |
2021-11-02 00:21:36 +0100 | <nickkkkk_all> | what does this code do? https://paste.tomsmeding.com/1Ek8WGYt |
2021-11-02 00:22:02 +0100 | <Axman6> | what do you think it does? |
2021-11-02 00:22:02 +0100 | <nickkkkk_all> | well i guess it doesn't do anything. what does it mean? |
2021-11-02 00:22:04 +0100 | <geekosaur> | loop forever |
2021-11-02 00:22:28 +0100 | <geekosaur> | hm, actually as written it should throw <<loop>> |
2021-11-02 00:22:50 +0100 | <Axman6> | > let y = y + 1 in y :: Integer |
2021-11-02 00:22:50 +0100 | yrlnry | (~mjd@pool-74-109-22-90.phlapa.fios.verizon.net) (Ping timeout: 260 seconds) |
2021-11-02 00:22:52 +0100 | <lambdabot> | *Exception: <<loop>> |
2021-11-02 00:22:55 +0100 | <geekosaur> | the `y`s on both sides of the `=` are the same `y`, so it will forever chase its own tail |
2021-11-02 00:23:01 +0100 | yin | (~z@user/zero) (Ping timeout: 245 seconds) |
2021-11-02 00:23:10 +0100 | <nickkkkk_all> | so a recursive definition |
2021-11-02 00:23:14 +0100 | <geekosaur> | yes |
2021-11-02 00:23:15 +0100 | <hpc> | "to calculate y, calculate y and add 1 to it" |
2021-11-02 00:23:15 +0100 | <nickkkkk_all> | but it isn't a function |
2021-11-02 00:23:40 +0100 | <hpc> | yep, you can write recursive non-function things |
2021-11-02 00:23:59 +0100 | <Axman6> | https://i.kym-cdn.com/photos/images/newsfeed/001/393/652/116.jpg |
2021-11-02 00:24:01 +0100 | <nickkkkk_all> | as long as there is a way for it to be evaluated completely? |
2021-11-02 00:24:04 +0100 | jushur | (~human@user/jushur) |
2021-11-02 00:24:07 +0100 | <hpc> | you can even do it in other languages, it's just usually not as useful |
2021-11-02 00:24:17 +0100 | <hpc> | void* x = &x; // for instance |
2021-11-02 00:24:58 +0100 | <nickkkkk_all> | but that's not really the same thing. i get what you're going fo rthough |
2021-11-02 00:25:13 +0100 | <nickkkkk_all> | haskell is strange. |
2021-11-02 00:25:16 +0100 | __xor | (~xor@72.49.199.147) |
2021-11-02 00:25:19 +0100 | <hpc> | > let ones = 1 : ones |
2021-11-02 00:25:20 +0100 | <lambdabot> | <no location info>: error: not an expression: ‘let ones = 1 : ones’ |
2021-11-02 00:25:24 +0100 | <hpc> | > let ones = 1 : ones in ones -- doh |
2021-11-02 00:25:25 +0100 | <lambdabot> | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1... |
2021-11-02 00:25:32 +0100 | <geekosaur> | doesn't need that. |
2021-11-02 00:25:32 +0100 | <geekosaur> | > let ones = 1 : ones in ones |
2021-11-02 00:25:32 +0100 | <geekosaur> | what's needed is that it can be lazily productive before it recurses |
2021-11-02 00:25:32 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-11-02 00:25:33 +0100 | <lambdabot> | [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1... |
2021-11-02 00:25:44 +0100 | <hpc> | > let x = error x in x -- here's a fun one |
2021-11-02 00:25:45 +0100 | <lambdabot> | "*Exception: *Exception: *Exception: *Exception: *Exception: *Exception: *Ex... |
2021-11-02 00:25:51 +0100 | <Axman6> | > let fibs = 1:1: zipWith (+) fibs (tail fibs) |
2021-11-02 00:25:52 +0100 | <lambdabot> | <no location info>: error: |
2021-11-02 00:25:52 +0100 | <lambdabot> | not an expression: ‘let fibs = 1:1: zipWith (+) fibs (tail fibs)’ |
2021-11-02 00:26:04 +0100 | <Axman6> | > let fibs = 1:1: zipWith (+) fibs (tail fibs) in fibs |
2021-11-02 00:26:06 +0100 | <lambdabot> | [1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,10946,17... |
2021-11-02 00:26:46 +0100 | _xor | (~xor@72.49.199.147) (Ping timeout: 245 seconds) |
2021-11-02 00:26:55 +0100 | <nickkkkk_all> | lmfao |
2021-11-02 00:26:55 +0100 | <hpc> | lambdabot has some definitions of the infinite list of primes memorized, but i forget how to print them out |
2021-11-02 00:27:11 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-11-02 00:27:16 +0100 | <hpc> | it's like @where prime_55, or something like that |
2021-11-02 00:27:21 +0100 | <hpc> | for a 55-character definition |
2021-11-02 00:27:41 +0100 | <nickkkkk_all> | just write some haskell to calculate the zeros of the complex zeta function and append them to a list |
2021-11-02 00:27:53 +0100 | <hpc> | recursive definitions are all over the place, you'll want to get very comfortable with them |
2021-11-02 00:28:15 +0100 | <hpc> | at the value level, at the type level, in the abstract, etc |
2021-11-02 00:28:18 +0100 | <hpc> | @src fix |
2021-11-02 00:28:18 +0100 | <lambdabot> | fix f = let x = f x in x |
2021-11-02 00:28:38 +0100 | <Axman6> | I keep forgetting to save a gist of the simple mutually recursive primes generator |
2021-11-02 00:28:45 +0100 | <nickkkkk_all> | i mean it makes sense mathematically. i'm just trying to adjust from imperative style to functional. i like it more i just have to relearn how to think |
2021-11-02 00:30:45 +0100 | <nickkkkk_all> | but i'm gonna have to log off or i'll never do my chem lab report and it's due tomorrow at 8 am :D |
2021-11-02 00:32:00 +0100 | nickkkkk_all | (~nick_all@2603-6011-f940-1d00-0000-0000-0000-0002.res6.spectrum.com) (Quit: Leaving) |
2021-11-02 00:33:02 +0100 | gehmehgeh | (~user@user/gehmehgeh) (Quit: Leaving) |
2021-11-02 00:35:18 +0100 | <Axman6> | ok, finally decided to save this as a gist so I can find it again https://gist.github.com/axman6/79be372a4b8507432bcabea42c488c62 |
2021-11-02 00:35:51 +0100 | <Axman6> | I thow there's a lot of optimisations to be made |
2021-11-02 00:38:15 +0100 | Codaraxis | (~Codaraxis@user/codaraxis) |
2021-11-02 00:40:07 +0100 | <Axman6> | I wonder how well this would work in GHC: https://krebsonsecurity.com/2021/11/trojan-source-bug-threatens-the-security-of-all-code/ |
2021-11-02 00:41:19 +0100 | <monochrom> | Hecate answered this in haskell-cafe: https://gitlab.haskell.org/ghc/ghc/-/issues/20263 |
2021-11-02 00:42:01 +0100 | jespada | (~jespada@190.7.36.46) |
2021-11-02 00:44:17 +0100 | zzz | (~z@user/zero) |
2021-11-02 00:44:49 +0100 | <Axman6> | Interesting, I wonder if the researchers contacted the GHC team? the timing seems about right |
2021-11-02 00:46:49 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 00:47:40 +0100 | zero | (~z@user/zero) (Ping timeout: 268 seconds) |
2021-11-02 00:47:41 +0100 | zzz | zero |
2021-11-02 00:47:57 +0100 | <thblt> | Axman6: The Rust report on the same bug says they've been notified of it privately by the researchers before they went public. I guess same goes for GHC? (no source on the latter though) |
2021-11-02 00:48:30 +0100 | <geekosaur> | one can infer the same from the sequence of events in the ticket and its open date |
2021-11-02 00:48:47 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-02 00:48:47 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-02 00:48:47 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-02 00:48:50 +0100 | <geekosaur> | in particular there was a "set visibility public" event |
2021-11-02 00:48:52 +0100 | <Axman6> | Just a bit surprised they'd even thing about GHC! |
2021-11-02 00:48:55 +0100 | <Axman6> | think* |
2021-11-02 00:49:34 +0100 | <thblt> | Btw the Rust solution is roughly the same, they added an on-by-default linter that fails build that contains those control codes in comments or strings. |
2021-11-02 00:51:11 +0100 | jespada | (~jespada@190.7.36.46) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-11-02 00:54:49 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
2021-11-02 00:55:42 +0100 | betelgeuse | (~betelgeus@94-225-47-8.access.telenet.be) (Ping timeout: 268 seconds) |
2021-11-02 00:58:46 +0100 | xff0x | (~xff0x@2001:1a81:537f:9c00:f94d:493e:e9e:5a9) (Ping timeout: 268 seconds) |
2021-11-02 00:59:27 +0100 | xff0x | (~xff0x@2001:1a81:537f:9c00:96ab:881b:fbec:f66f) |
2021-11-02 01:04:57 +0100 | Tuplanolla | (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.) |
2021-11-02 01:06:26 +0100 | G_w | (~Gw@197.3.191.56) (Remote host closed the connection) |
2021-11-02 01:09:57 +0100 | sander | (~sander@user/sander) (Quit: So long! :)) |
2021-11-02 01:11:05 +0100 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Remote host closed the connection) |
2021-11-02 01:16:36 +0100 | zzz | (~z@user/zero) |
2021-11-02 01:19:04 +0100 | zzz | yin |
2021-11-02 01:19:45 +0100 | zero | (~z@user/zero) (Ping timeout: 268 seconds) |
2021-11-02 01:19:45 +0100 | yin | zero |
2021-11-02 01:21:06 +0100 | acidjnk | (~acidjnk@p200300d0c7441145a0f2d1eed66e92ec.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2021-11-02 01:21:10 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
2021-11-02 01:21:12 +0100 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2021-11-02 01:21:36 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-02 01:22:29 +0100 | Lord_of_Life_ | Lord_of_Life |
2021-11-02 01:24:21 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.3) |
2021-11-02 01:28:10 +0100 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
2021-11-02 01:29:05 +0100 | cross | (~cross@spitfire.i.gajendra.net) |
2021-11-02 01:29:45 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Quit: ec) |
2021-11-02 01:31:58 +0100 | <remexre> | how far is DataKinds+GADTs from dependent types? |
2021-11-02 01:32:37 +0100 | <monochrom> | Very, very far. |
2021-11-02 01:34:57 +0100 | vicfred | (~vicfred@user/vicfred) (Quit: Leaving) |
2021-11-02 01:36:58 +0100 | <c_wraith> | IIRC, with TypeInType you get to full dependent.... kinds. |
2021-11-02 01:37:08 +0100 | <maerwald> | and yet, not far enough that people come up with creative ways to emulate all sorts of it |
2021-11-02 01:38:37 +0100 | <monochrom> | The imitation game has always defined computing. :) |
2021-11-02 01:40:37 +0100 | <monochrom> | OK, but there is still a difference between a watertight emulation and a leaky emulation. |
2021-11-02 01:41:25 +0100 | <monochrom> | The need for something like the singleton library proves that we have a very leaky emulation for now. |
2021-11-02 01:44:00 +0100 | jespada | (~jespada@190.7.36.46) |
2021-11-02 01:44:36 +0100 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Quit: WeeChat 3.3) |
2021-11-02 01:46:34 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-02 01:49:43 +0100 | catman | (~catman@user/catman) (Read error: Connection reset by peer) |
2021-11-02 01:50:43 +0100 | lbseale | (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer) |
2021-11-02 01:51:03 +0100 | mmhat | (~mmh@55d4a9b2.access.ecotel.net) (Quit: WeeChat 3.3) |
2021-11-02 01:51:33 +0100 | catman | (~catman@user/catman) |
2021-11-02 01:54:10 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.3) |
2021-11-02 01:57:55 +0100 | Codaraxis_ | (~Codaraxis@user/codaraxis) |
2021-11-02 01:58:19 +0100 | Codaraxis_ | (~Codaraxis@user/codaraxis) (Remote host closed the connection) |
2021-11-02 01:58:32 +0100 | catman | (~catman@user/catman) (Quit: WeeChat 3.4-dev) |
2021-11-02 01:58:54 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2021-11-02 01:59:03 +0100 | catman | (~catman@user/catman) |
2021-11-02 01:59:52 +0100 | sander | (~sander@user/sander) |
2021-11-02 02:00:53 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2021-11-02 02:01:34 +0100 | catern | (~sbaugh@2604:2000:8fc0:b:a9c7:866a:bf36:3407) |
2021-11-02 02:01:42 +0100 | Codaraxis | (~Codaraxis@user/codaraxis) (Ping timeout: 260 seconds) |
2021-11-02 02:02:01 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2021-11-02 02:02:58 +0100 | Midjak | (~Midjak@82-65-111-221.subs.proxad.net) (Quit: This computer has gone to sleep) |
2021-11-02 02:03:19 +0100 | jespada | (~jespada@190.7.36.46) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-11-02 02:03:43 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-11-02 02:05:42 +0100 | <catern> | dear lazyirc, how would I write a function which yields an infinite stream of binary numbers in a nice elegant recursive style? i.e. 0, 1, 10, 11, etc (I promise this is not homework) |
2021-11-02 02:06:01 +0100 | <catern> | (other than the obvious "map to_binary_string integers") |
2021-11-02 02:06:27 +0100 | <Axman6> | what type do you want them to be? |
2021-11-02 02:06:39 +0100 | <catern> | strings |
2021-11-02 02:06:47 +0100 | <catern> | or lists, anything other than int, I guess |
2021-11-02 02:07:16 +0100 | <Axman6> | there's a really cute way to do it and I can't remember... |
2021-11-02 02:07:26 +0100 | <Axman6> | iterate isn't a bad place to start though |
2021-11-02 02:07:44 +0100 | <catern> | that's how I'm feeling too, lol |
2021-11-02 02:08:38 +0100 | <Axman6> | > concat $ iterate (\xs -> xs ++ map ('1':) xs) [0,1] -- I wonder if this does anything... |
2021-11-02 02:08:40 +0100 | <lambdabot> | error: |
2021-11-02 02:08:40 +0100 | <lambdabot> | • No instance for (Num [Char]) arising from the literal ‘0’ |
2021-11-02 02:08:40 +0100 | <lambdabot> | • In the expression: 0 |
2021-11-02 02:09:00 +0100 | <Axman6> | > concat $ iterate (\xs -> xs ++ map ('1':) xs) ["0","1"] -- I wonder if this does anything... |
2021-11-02 02:09:02 +0100 | <lambdabot> | ["0","1","0","1","10","11","0","1","10","11","10","11","110","111","0","1","... |
2021-11-02 02:09:11 +0100 | lavaman | (~lavaman@98.38.249.169) |
2021-11-02 02:09:13 +0100 | <Axman6> | > concat $ iterate (\xs -> map ('1':) xs) ["0","1"] -- I wonder if this does anything... |
2021-11-02 02:09:14 +0100 | <lambdabot> | ["0","1","10","11","110","111","1110","1111","11110","11111","111110","11111... |
2021-11-02 02:09:27 +0100 | <Axman6> | no... |
2021-11-02 02:09:27 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-02 02:10:00 +0100 | <Axman6> | > mapM (flip replicateM "01") [1..] |
2021-11-02 02:10:07 +0100 | <lambdabot> | mueval-core: Time limit exceeded |
2021-11-02 02:10:16 +0100 | <Axman6> | > map (flip replicateM "01") [1..] |
2021-11-02 02:10:16 +0100 | <shapr> | take? |
2021-11-02 02:10:17 +0100 | <lambdabot> | [["0","1"],["00","01","10","11"],["000","001","010","011","100","101","110",... |
2021-11-02 02:10:19 +0100 | <shapr> | oh |
2021-11-02 02:11:38 +0100 | <awpr> | > reverse <$> let xs = [('1':), ('0':), id] <*> "1":xs in "0":xs |
2021-11-02 02:11:39 +0100 | <lambdabot> | ["0","11","111","1111","11111","111111","1111111","11111111","111111111","11... |
2021-11-02 02:11:50 +0100 | <awpr> | bad ordering |
2021-11-02 02:12:03 +0100 | <Axman6> | getting the order right is tough |
2021-11-02 02:13:55 +0100 | Axman6 | feels nerdsniped |
2021-11-02 02:14:14 +0100 | shapr | checks to see if Data.Bits has an Enum instance |
2021-11-02 02:15:37 +0100 | <shapr> | nope |
2021-11-02 02:16:33 +0100 | quazimodo | (~quazimodo@n1-40-235-47.bla1.nsw.optusnet.com.au) () |
2021-11-02 02:20:28 +0100 | <awpr> | > let go xs = xs ++ go (xs <**> [('0':), ('1':)] ) in fmap reverse $ "0":go ["1"] |
2021-11-02 02:20:30 +0100 | <lambdabot> | ["0","1","10","11","100","101","110","111","1000","1001","1010","1011","1100... |
2021-11-02 02:23:19 +0100 | <monochrom> | I would map convert_to_binary [0..], and implement convert_to_binary. |
2021-11-02 02:24:16 +0100 | <monochrom> | Actually, s/would/would also consider/ All approaches are worth learning. |
2021-11-02 02:25:48 +0100 | <awpr> | > fmap ('1':) . flip replicateM "01" =<< [0..] -- this might fix the replicateM solution? |
2021-11-02 02:25:49 +0100 | <lambdabot> | ["1","10","11","100","101","110","111","1000","1001","1010","1011","1100","1... |
2021-11-02 02:26:03 +0100 | <awpr> | eh. zero isn't a number anyway |
2021-11-02 02:27:08 +0100 | srk | (~sorki@user/srk) (Ping timeout: 260 seconds) |
2021-11-02 02:27:19 +0100 | srk_ | (~sorki@user/srk) |
2021-11-02 02:28:04 +0100 | tremon | (~tremon@217-63-61-89.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in) |
2021-11-02 02:29:59 +0100 | srk_ | srk |
2021-11-02 02:31:11 +0100 | <Clint> | too bad showBin didn't show up until base 4.16 |
2021-11-02 02:36:42 +0100 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Ping timeout: 260 seconds) |
2021-11-02 02:51:34 +0100 | <koz> | I want to make a pattern synonym which makes a single-item constructo behave like a two-item constructor where both items are the same item. |
2021-11-02 02:51:37 +0100 | <koz> | How do I spell that? |
2021-11-02 02:51:57 +0100 | <koz> | 'pattern Foo x x <- Bar x' doesn't work. |
2021-11-02 02:52:16 +0100 | <dibblego> | @type join (,) |
2021-11-02 02:52:17 +0100 | <lambdabot> | b -> (b, b) |
2021-11-02 02:52:59 +0100 | <koz> | dibblego: I don't follow. |
2021-11-02 02:53:47 +0100 | fvr | (uid503686@id-503686.uxbridge.irccloud.com) |
2021-11-02 02:54:47 +0100 | <dibblego> | I guess, why? |
2021-11-02 02:55:15 +0100 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-11-02 02:57:39 +0100 | ahlk | (~user@2600:1700:31c0:3a10::43) |
2021-11-02 03:00:48 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 03:04:04 +0100 | xkuru | (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
2021-11-02 03:04:38 +0100 | lavaman | (~lavaman@98.38.249.169) |
2021-11-02 03:10:43 +0100 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) |
2021-11-02 03:16:50 +0100 | Sgeo_ | (~Sgeo@user/sgeo) |
2021-11-02 03:17:26 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 03:18:08 +0100 | Sgeo | (~Sgeo@user/sgeo) (Ping timeout: 268 seconds) |
2021-11-02 03:20:07 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) |
2021-11-02 03:20:35 +0100 | zero | is the *best* number |
2021-11-02 03:23:23 +0100 | zero | (~z@user/zero) () |
2021-11-02 03:24:36 +0100 | zero | (~z@user/zero) |
2021-11-02 03:24:39 +0100 | zero | (~z@user/zero) () |
2021-11-02 03:35:30 +0100 | ahlk | (~user@2600:1700:31c0:3a10::43) (Read error: Connection reset by peer) |
2021-11-02 03:35:44 +0100 | ahlk | (~user@2600:1700:31c0:3a10::43) |
2021-11-02 03:42:11 +0100 | zmt01 | (~zmt00@user/zmt00) (Ping timeout: 268 seconds) |
2021-11-02 03:43:21 +0100 | trillp | (~trillp@69.233.98.238) (Quit: nyaa~) |
2021-11-02 03:43:35 +0100 | emf | (~emf@2620:10d:c090:400::5:f24f) (Ping timeout: 264 seconds) |
2021-11-02 03:45:39 +0100 | emf | (~emf@2620:10d:c091:480::1:9d5d) |
2021-11-02 03:45:54 +0100 | zmt00 | (~zmt00@user/zmt00) |
2021-11-02 03:46:42 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 260 seconds) |
2021-11-02 03:47:07 +0100 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
2021-11-02 03:51:27 +0100 | xff0x | (~xff0x@2001:1a81:537f:9c00:96ab:881b:fbec:f66f) (Ping timeout: 268 seconds) |
2021-11-02 03:52:04 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-02 03:52:47 +0100 | xff0x | (~xff0x@2001:1a81:53bc:d300:c35b:4f80:361f:6318) |
2021-11-02 03:56:43 +0100 | emf_ | (~emf@2620:10d:c090:400::5:5f62) |
2021-11-02 03:57:00 +0100 | shapr | (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 268 seconds) |
2021-11-02 03:58:35 +0100 | emf | (~emf@2620:10d:c091:480::1:9d5d) (Ping timeout: 264 seconds) |
2021-11-02 03:58:39 +0100 | boxscape_ | (~boxscape_@mue-88-130-59-184.dsl.tropolys.de) (Quit: Connection closed) |
2021-11-02 04:01:18 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) (Ping timeout: 268 seconds) |
2021-11-02 04:04:26 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
2021-11-02 04:11:43 +0100 | <monochrom> | zero : best number :: nobody : perfect >:) |
2021-11-02 04:11:56 +0100 | boxscape_ | (~boxscape_@mue-88-130-59-184.dsl.tropolys.de) |
2021-11-02 04:14:16 +0100 | xff0x | (~xff0x@2001:1a81:53bc:d300:c35b:4f80:361f:6318) (Ping timeout: 268 seconds) |
2021-11-02 04:15:05 +0100 | xff0x | (~xff0x@2001:1a81:53bc:d300:4699:7f78:c236:affc) |
2021-11-02 04:18:43 +0100 | tcard_ | (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Quit: Leaving) |
2021-11-02 04:20:12 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2) |
2021-11-02 04:29:41 +0100 | xff0x | (~xff0x@2001:1a81:53bc:d300:4699:7f78:c236:affc) (Ping timeout: 268 seconds) |
2021-11-02 04:30:18 +0100 | xff0x | (~xff0x@port-92-195-109-25.dynamic.as20676.net) |
2021-11-02 04:36:26 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer) |
2021-11-02 04:40:23 +0100 | mbuf | (~Shakthi@171.61.170.115) |
2021-11-02 04:41:52 +0100 | zmt01 | (~zmt00@user/zmt00) |
2021-11-02 04:43:10 +0100 | zmt00 | (~zmt00@user/zmt00) (Ping timeout: 260 seconds) |
2021-11-02 04:45:34 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 260 seconds) |
2021-11-02 04:47:25 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2021-11-02 04:47:50 +0100 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 260 seconds) |
2021-11-02 04:49:42 +0100 | stevenxl_ | (~stevenlei@174.128.182.120) |
2021-11-02 05:00:39 +0100 | stevenxl_ | (~stevenlei@174.128.182.120) (Quit: leaving) |
2021-11-02 05:00:55 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 05:05:34 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
2021-11-02 05:05:54 +0100 | alx741 | (~alx741@181.196.69.253) (Quit: alx741) |
2021-11-02 05:15:50 +0100 | zmt01 | (~zmt00@user/zmt00) (Ping timeout: 260 seconds) |
2021-11-02 05:21:28 +0100 | boxscape_ | (~boxscape_@mue-88-130-59-184.dsl.tropolys.de) (Ping timeout: 268 seconds) |
2021-11-02 05:25:22 +0100 | Krusl | (~Krusl@2001:da8:9000:a436:b9ff:5056:861f:3e05) |
2021-11-02 05:25:29 +0100 | Gurkenglas | (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
2021-11-02 05:28:32 +0100 | zmt00 | (~zmt00@user/zmt00) |
2021-11-02 05:35:26 +0100 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 260 seconds) |
2021-11-02 05:35:54 +0100 | zmt00 | (~zmt00@user/zmt00) (Ping timeout: 260 seconds) |
2021-11-02 05:45:04 +0100 | Krusl | (~Krusl@2001:da8:9000:a436:b9ff:5056:861f:3e05) (Read error: Connection reset by peer) |
2021-11-02 05:48:03 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 05:58:18 +0100 | Athas | (athas@2a01:7c8:aaac:1cf:ca09:aa6a:e1e8:dce5) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-11-02 05:58:28 +0100 | Athas | (athas@sigkill.dk) |
2021-11-02 06:05:17 +0100 | tcard | (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) |
2021-11-02 06:11:33 +0100 | eggplant_ | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 06:11:50 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:54f0:825c:9f33:c349) (Ping timeout: 260 seconds) |
2021-11-02 06:11:53 +0100 | iqubic | (~user@2601:602:9502:c70:458b:ca39:de67:50b0) |
2021-11-02 06:13:20 +0100 | <iqubic> | What's the best way to test if a given double is a whole number? Should I just use "(\x -> floor x == x)"? |
2021-11-02 06:13:42 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
2021-11-02 06:15:05 +0100 | <iqubic> | No, that doesn't work, because there's no instance for (Integral Double) |
2021-11-02 06:15:35 +0100 | <iqubic> | s/whole/integer/ |
2021-11-02 06:17:05 +0100 | zmt00 | (~zmt00@user/zmt00) |
2021-11-02 06:17:19 +0100 | <c_wraith> | it's a bit of a weird question, because it's generally not a good idea to think of a Double as representing a number |
2021-11-02 06:17:30 +0100 | <c_wraith> | It's more like a range of possible numbers |
2021-11-02 06:18:06 +0100 | <iqubic> | How so? |
2021-11-02 06:18:15 +0100 | <c_wraith> | > 1 / 3 |
2021-11-02 06:18:16 +0100 | <lambdabot> | 0.3333333333333333 |
2021-11-02 06:18:24 +0100 | __xor | _xor |
2021-11-02 06:18:29 +0100 | <c_wraith> | > 3 * (1 / 3) |
2021-11-02 06:18:30 +0100 | <lambdabot> | 1.0 |
2021-11-02 06:18:47 +0100 | <c_wraith> | there's a bit of a contradiction, there |
2021-11-02 06:19:43 +0100 | <iqubic> | Why? |
2021-11-02 06:20:47 +0100 | <c_wraith> | if you multiply 0.3333333333333333 by 3, you end up with a string of 9s after the decimal point. (no, this is not .9 repeating equals one, because that's not repeating) |
2021-11-02 06:22:10 +0100 | <c_wraith> | that tells you that the result of (1/3) isn't exactly what it prints, because that would multiply out differently. But it also isn't exactly the rational 1/3, because that's not encodable in the IEEE-754 format |
2021-11-02 06:22:21 +0100 | <c_wraith> | it's... squishier |
2021-11-02 06:22:32 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-02 06:22:59 +0100 | <iqubic> | Yeah. Doubles are weird. |
2021-11-02 06:26:08 +0100 | <c_wraith> | quick quiz: is (0.5 + 2^54 - 2^54 - 0.5 ) a whole number? |
2021-11-02 06:26:14 +0100 | zmt00 | (~zmt00@user/zmt00) (Ping timeout: 268 seconds) |
2021-11-02 06:26:23 +0100 | <c_wraith> | > 0.5 + 2^54 - 2^54 - 0.5 |
2021-11-02 06:26:25 +0100 | <lambdabot> | -0.5 |
2021-11-02 06:26:40 +0100 | <c_wraith> | It's a weird question to ask about floating-point. :) |
2021-11-02 06:27:08 +0100 | <dsal> | Usually the best question when dealing with floating point has "epsilon" somewhere in it. |
2021-11-02 06:28:10 +0100 | zmt00 | (~zmt00@user/zmt00) |
2021-11-02 06:28:21 +0100 | <c_wraith> | all that said, you can probably get what you want in the obvious cases with `ceiling x == floor x' |
2021-11-02 06:28:58 +0100 | slowButPresent | (~slowButPr@user/slowbutpresent) (Quit: leaving) |
2021-11-02 06:30:27 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-02 06:33:21 +0100 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) |
2021-11-02 06:34:39 +0100 | zmt01 | (~zmt00@user/zmt00) |
2021-11-02 06:35:29 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
2021-11-02 06:39:10 +0100 | zmt00 | (~zmt00@user/zmt00) (Ping timeout: 268 seconds) |
2021-11-02 06:46:34 +0100 | myShoggoth | (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 268 seconds) |
2021-11-02 06:48:25 +0100 | Gurkenglas | (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 268 seconds) |
2021-11-02 06:49:49 +0100 | Skyfire | (~pyon@user/pyon) (Read error: Connection reset by peer) |
2021-11-02 06:54:48 +0100 | zmt00 | (~zmt00@user/zmt00) |
2021-11-02 06:55:34 +0100 | zmt00 | (~zmt00@user/zmt00) (Remote host closed the connection) |
2021-11-02 06:58:17 +0100 | zmt01 | (~zmt00@user/zmt00) (Ping timeout: 268 seconds) |
2021-11-02 07:03:24 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Ping timeout: 276 seconds) |
2021-11-02 07:04:07 +0100 | <Axman6> | :t properFraction |
2021-11-02 07:04:08 +0100 | <lambdabot> | (RealFrac a, Integral b) => a -> (b, a) |
2021-11-02 07:04:20 +0100 | <Axman6> | > properFraction pi |
2021-11-02 07:04:22 +0100 | <lambdabot> | (3,0.14159265358979312) |
2021-11-02 07:05:07 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2021-11-02 07:05:38 +0100 | <Axman6> | > let isWhole (properFraction -> (_,x)) = x == 0 in (isWhole 1, isWhole 1000000000001, isWhole pi, isWhole (3 * (1/3))) |
2021-11-02 07:05:38 +0100 | MQ-17J | (~MQ-17J@8.6.144.203) (Read error: Connection reset by peer) |
2021-11-02 07:05:39 +0100 | <lambdabot> | (True,True,False,True) |
2021-11-02 07:06:40 +0100 | MQ-17J | (~MQ-17J@8.6.144.203) |
2021-11-02 07:09:11 +0100 | hendursaga | (~weechat@user/hendursaga) (Remote host closed the connection) |
2021-11-02 07:09:53 +0100 | hendursaga | (~weechat@user/hendursaga) |
2021-11-02 07:13:25 +0100 | v01d4lph4 | (~v01d4lph4@user/v01d4lph4) |
2021-11-02 07:28:58 +0100 | rkrishnan | (~user@223.226.59.167) |
2021-11-02 07:39:12 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2021-11-02 07:47:38 +0100 | timCF_ | (~timCF@m91-129-101-112.cust.tele2.ee) (Ping timeout: 268 seconds) |
2021-11-02 07:49:46 +0100 | max22- | (~maxime@2a01cb0883359800d15ccd5476102118.ipv6.abo.wanadoo.fr) |
2021-11-02 07:59:10 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
2021-11-02 08:00:14 +0100 | Lycurgus | (~juan@98.4.112.204) (Quit: Exeunt) |
2021-11-02 08:07:17 +0100 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-11-02 08:12:55 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 08:18:40 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 08:19:43 +0100 | juhp | (~juhp@128.106.188.220) (Quit: juhp) |
2021-11-02 08:23:39 +0100 | Sgeo_ | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2021-11-02 08:25:45 +0100 | img | (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-11-02 08:27:11 +0100 | img | (~img@user/img) |
2021-11-02 08:29:36 +0100 | michalz | (~michalz@185.246.204.104) |
2021-11-02 08:32:51 +0100 | gehmehgeh | (~user@user/gehmehgeh) |
2021-11-02 08:33:14 +0100 | son0p | (~ff@181.136.122.143) (Ping timeout: 260 seconds) |
2021-11-02 08:33:56 +0100 | son0p- | (~ff@181.136.122.143) (Ping timeout: 260 seconds) |
2021-11-02 08:35:27 +0100 | fendor | (~fendor@77.119.197.65.wireless.dyn.drei.com) |
2021-11-02 08:40:56 +0100 | fizzsegfaultbuzz | (~segfaultf@135-180-0-138.static.sonic.net) (Ping timeout: 260 seconds) |
2021-11-02 08:44:10 +0100 | jonathanx | (~jonathan@dyn-8-sc.cdg.chalmers.se) |
2021-11-02 08:45:48 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) |
2021-11-02 08:46:22 +0100 | img | (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-11-02 08:47:48 +0100 | img | (~img@user/img) |
2021-11-02 08:48:55 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) (Client Quit) |
2021-11-02 08:49:08 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) |
2021-11-02 08:52:36 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:c40:37f:b11e:565f) |
2021-11-02 08:52:59 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-02 08:54:00 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) (Client Quit) |
2021-11-02 08:54:36 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) |
2021-11-02 08:55:25 +0100 | shriekingnoise | (~shrieking@186.137.144.80) (Quit: Quit) |
2021-11-02 09:00:23 +0100 | eggplant_ | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2021-11-02 09:02:44 +0100 | neurocyte0132889 | (~neurocyte@IP-213157011136.dynamic.medianet-world.de) |
2021-11-02 09:02:44 +0100 | neurocyte0132889 | (~neurocyte@IP-213157011136.dynamic.medianet-world.de) (Changing host) |
2021-11-02 09:02:44 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) |
2021-11-02 09:03:23 +0100 | fvr | (uid503686@id-503686.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-02 09:05:19 +0100 | hendursa1 | (~weechat@user/hendursaga) |
2021-11-02 09:08:51 +0100 | hendursaga | (~weechat@user/hendursaga) (Ping timeout: 276 seconds) |
2021-11-02 09:10:20 +0100 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) |
2021-11-02 09:12:26 +0100 | jumper149 | (~jumper149@80.240.31.34) |
2021-11-02 09:13:39 +0100 | cfricke | (~cfricke@user/cfricke) |
2021-11-02 09:19:33 +0100 | acidjnk | (~acidjnk@p200300d0c7441145a0f2d1eed66e92ec.dip0.t-ipconnect.de) |
2021-11-02 09:21:07 +0100 | shidima | (~shidima@188-206-67-204.mobile.kpn.net) |
2021-11-02 09:23:24 +0100 | chele | (~chele@user/chele) |
2021-11-02 09:28:08 +0100 | <shidima> | @Hecate, thanks for the help! Sorry I didn't react, things got a bit hectic :) I Think I solved it: https://paste.tomsmeding.com/60CO6IQm |
2021-11-02 09:28:08 +0100 | <lambdabot> | Unknown command, try @list |
2021-11-02 09:30:32 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 09:36:41 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2021-11-02 09:37:49 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) (Read error: Connection reset by peer) |
2021-11-02 09:39:43 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-02 09:40:17 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 09:45:25 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
2021-11-02 09:50:47 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) (Read error: Connection reset by peer) |
2021-11-02 09:51:44 +0100 | neurocyte0132889 | (~neurocyte@IP-213157011136.dynamic.medianet-world.de) |
2021-11-02 09:51:44 +0100 | neurocyte0132889 | (~neurocyte@IP-213157011136.dynamic.medianet-world.de) (Changing host) |
2021-11-02 09:51:44 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) |
2021-11-02 09:52:41 +0100 | img | (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-11-02 09:53:49 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2021-11-02 09:59:31 +0100 | img | (~img@user/img) |
2021-11-02 10:00:12 +0100 | mc47 | (~mc47@xmonad/TheMC47) |
2021-11-02 10:01:01 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 10:01:02 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-11-02 10:01:51 +0100 | <shidima> | I'm (trying) to follow 'Practical Haskell, a real world guide'. But I keep running into problems with the code from the book. Does any one have any experiance with the book? |
2021-11-02 10:04:37 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-11-02 10:05:42 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
2021-11-02 10:06:07 +0100 | unit73e | (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Remote host closed the connection) |
2021-11-02 10:07:35 +0100 | <merijn> | Never heard of it, tbh. But then there seem to be dozens of books I haven't heard of in the past 5 years :p |
2021-11-02 10:07:54 +0100 | <merijn> | What kinda problems? |
2021-11-02 10:11:33 +0100 | azeem | (~azeem@emp-89-199.eduroam.uu.se) |
2021-11-02 10:13:06 +0100 | timCF | (~timCF@200-149-20-81.sta.estpak.ee) (Ping timeout: 260 seconds) |
2021-11-02 10:15:31 +0100 | fvr | (uid503686@id-503686.uxbridge.irccloud.com) |
2021-11-02 10:15:55 +0100 | <shidima> | Well, the code examples are not working, and I'm not sure it is all my fault. That makes it a bit frustrating. |
2021-11-02 10:17:12 +0100 | ubert | (~Thunderbi@p200300ecdf4fca90e6b318fffe838f33.dip0.t-ipconnect.de) |
2021-11-02 10:18:09 +0100 | <merijn> | shidima: Can you pastebin an example and the error it gives? |
2021-11-02 10:19:49 +0100 | econo | (uid147250@user/econo) (Quit: Connection closed for inactivity) |
2021-11-02 10:21:40 +0100 | jonathanclarke | (~jonathanc@36.252.181.57) |
2021-11-02 10:22:02 +0100 | ubert | (~Thunderbi@p200300ecdf4fca90e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection) |
2021-11-02 10:22:16 +0100 | mei | (~mei@user/mei) |
2021-11-02 10:22:20 +0100 | ubert | (~Thunderbi@p200300ecdf4fca90e6b318fffe838f33.dip0.t-ipconnect.de) |
2021-11-02 10:22:42 +0100 | <shidima> | The code compiles, but when I run the example in ghci I get an error: https://paste.tomsmeding.com/tK9370YY |
2021-11-02 10:22:48 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-11-02 10:24:04 +0100 | <merijn> | shidima: oh! |
2021-11-02 10:24:26 +0100 | <merijn> | shidima: If that's literally copy paste from the book, it's an error in the book |
2021-11-02 10:24:38 +0100 | <merijn> | shidima: Consider this: How many arguments does clientName take? |
2021-11-02 10:25:03 +0100 | <shidima> | just one |
2021-11-02 10:25:06 +0100 | <shidima> | A string |
2021-11-02 10:25:47 +0100 | <shidima> | I tried moving the last bracket around the boolean at the end, but thats not working either :) |
2021-11-02 10:26:11 +0100 | <merijn> | oh, there's a bunch of problems there |
2021-11-02 10:26:28 +0100 | <merijn> | Starting with: Individual [Person "Jack" "Smith" Male] |
2021-11-02 10:26:48 +0100 | hge | (~helmut@2a02:8106:223:e000:2c6e:6ca4:e28e:520) |
2021-11-02 10:26:57 +0100 | <merijn> | shidima: If you look at line 5 you see that Individual is defined to take a Person and Bool as arguments |
2021-11-02 10:27:05 +0100 | <merijn> | But it's getting a list of Person there |
2021-11-02 10:27:36 +0100 | <[exa]> | weird, the code contains normal (parens) ? |
2021-11-02 10:27:37 +0100 | hge | (~helmut@2a02:8106:223:e000:2c6e:6ca4:e28e:520) (Client Quit) |
2021-11-02 10:27:57 +0100 | <merijn> | [exa]: Copy paste error? Or weird fancy book formatting? |
2021-11-02 10:28:39 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 10:29:00 +0100 | <merijn> | shidima: Anyway, even if you replace the [] with () it will go wrong because "Individual (Person "Jack" "Smith" Male) :: Bool -> Client" and you are applying clientName (which wants a Client) to that function and trying to apply the result of that to True |
2021-11-02 10:29:04 +0100 | <[exa]> | no idea I just clicked that and wondered where the H does the error come from |
2021-11-02 10:29:36 +0100 | <merijn> | [exa]: The error is triggered by line 4 of the error paste |
2021-11-02 10:30:22 +0100 | <[exa]> | aah the code isn't in datatypes.hs, ok good :] |
2021-11-02 10:30:57 +0100 | <[exa]> | then just bracketing problems :] |
2021-11-02 10:31:25 +0100 | <shidima> | Relevant section in the book: https://snipboard.io/6VWrgx.jpg |
2021-11-02 10:32:27 +0100 | <merijn> | shidima: Yeah, that is just straight up type error in the example |
2021-11-02 10:32:40 +0100 | <merijn> | That's...not a good look |
2021-11-02 10:33:10 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
2021-11-02 10:33:16 +0100 | <shidima> | It makes it a bit hard if you are still learning :) |
2021-11-02 10:33:53 +0100 | <merijn> | shidima: The correct code woulda been: clientName (Individual (Person "Jack" "Smith" Male) False) |
2021-11-02 10:34:17 +0100 | <merijn> | i.e. Individual applied to two arguments (Person and Bool) and clientName applied to the result of that |
2021-11-02 10:34:45 +0100 | v01d4lph4 | (~v01d4lph4@user/v01d4lph4) (Ping timeout: 268 seconds) |
2021-11-02 10:35:10 +0100 | <merijn> | Not inspiring a lot of confidence if the text has this level of error, though |
2021-11-02 10:35:16 +0100 | <shidima> | Yes, that works. I already had my doubt about the dangeling boolean, but wasent sure about the square brackets |
2021-11-02 10:36:15 +0100 | <shidima> | Well, time to find a different book then. To bad, I do like the premis of building something in a book, and not just loose examples |
2021-11-02 10:36:31 +0100 | <merijn> | @where books |
2021-11-02 10:36:31 +0100 | <lambdabot> | https://www.extrema.is/articles/haskell-books, see also @where LYAH, RWH, YAHT, SOE, HR, PIH, TFwH, wikibook, PCPH, HPFFP, HTAC, TwT, FoP, PFAD, WYAH, non-haskell-books |
2021-11-02 10:36:48 +0100 | v01d4lph4 | (~v01d4lph4@user/v01d4lph4) |
2021-11-02 10:37:30 +0100 | <merijn> | "Thinking Functionally with Haskell" and "Programming in Haskell" are well regarded. Haskell Programming from First Principles is solid but rather verbose and huge |
2021-11-02 10:37:55 +0100 | <shidima> | Heh, this book is on the list tho :) |
2021-11-02 10:38:30 +0100 | <shidima> | I will look into you sugestions, thanks! |
2021-11-02 10:38:51 +0100 | alzgh | (~alzgh@user/alzgh) (Ping timeout: 256 seconds) |
2021-11-02 10:43:35 +0100 | wolfshappen | (~waff@irc.furworks.de) (Ping timeout: 260 seconds) |
2021-11-02 10:43:43 +0100 | wolfshappen_ | (~waff@irc.furworks.de) |
2021-11-02 10:44:12 +0100 | drownbes | (~drownbes@200-149-20-81.sta.estpak.ee) |
2021-11-02 10:45:48 +0100 | thyriaen | (~thyriaen@x4dbf0bd8.dyn.telefonica.de) |
2021-11-02 10:46:11 +0100 | juhp | (~juhp@128.106.188.220) |
2021-11-02 10:47:04 +0100 | ubert | (~Thunderbi@p200300ecdf4fca90e6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
2021-11-02 10:47:05 +0100 | <merijn> | shidima: I mean, anyone can edit that list, so it's not necessarily all held in the same regard :p |
2021-11-02 10:47:18 +0100 | <shidima> | hehe :) |
2021-11-02 10:47:34 +0100 | hellcatto | (~hellcatto@user/runecroon) |
2021-11-02 10:49:21 +0100 | <hellcatto> | Hello, I'm using VSCode and haskell-lsp right now. How do I rename identifier using lsp? Usually, with other langs that runs on LSP, I could just press f2 and rename. Is it different keybinding or is not yet an available feature? |
2021-11-02 10:50:11 +0100 | <jneira[m]> | it is not available by default yet, nor included in the prebuilt binaries |
2021-11-02 10:50:38 +0100 | <jneira[m]> | https://github.com/haskell/haskell-language-server/issues/2193 |
2021-11-02 10:50:59 +0100 | <hellcatto> | jneira[m]: I see. Thank you for pointing that out. |
2021-11-02 10:51:02 +0100 | <drownbes> | Hi. I am using ghc as library to transform ast and write back to file. The problem is that parseModule function gives ast without comments and pragmas. How I extract them from module and insert back into generated file? |
2021-11-02 10:52:18 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) (Ping timeout: 260 seconds) |
2021-11-02 10:54:23 +0100 | <dminuoso> | drownbes: This is a very complicated problem domain. |
2021-11-02 10:54:35 +0100 | <dminuoso> | I recall a variety of papers on that subject |
2021-11-02 10:55:11 +0100 | hellcatto | (~hellcatto@user/runecroon) (Quit: Leaving) |
2021-11-02 10:56:13 +0100 | <dminuoso> | drownbes: This is called exact printing |
2021-11-02 10:56:33 +0100 | <geekosaur> | ghc-exactprint is supposed to be merged as of 9.2.1, but I don't know if you need extra flags to use it |
2021-11-02 10:56:52 +0100 | <geekosaur> | this is probably a question for #ghc |
2021-11-02 10:59:51 +0100 | <alanz> | geekosaur: the main functionality is in ghc, but you currently still use ghc-exactprint from hackage. Version 1.1. And it may need an update for the actual release. Will do it today |
2021-11-02 11:00:06 +0100 | <drownbes> | thx. It's not my case. Our project is stuck for while on 8.6.5. I guess for practical usecase we can just extract pragmas as a strings and ignore comments... |
2021-11-02 11:03:01 +0100 | <drownbes> | i came to haskell from js world and there codeshifts using ast are quite common in migrating large codebases to new versions of language. https://astexplorer.net/ |
2021-11-02 11:03:38 +0100 | <drownbes> | is there any such gui ast explorer for haskell? |
2021-11-02 11:04:04 +0100 | <maerwald> | ahahaha |
2021-11-02 11:06:10 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2021-11-02 11:07:12 +0100 | cosimone | (~user@93-47-228-48.ip115.fastwebnet.it) |
2021-11-02 11:10:31 +0100 | mc47 | (~mc47@xmonad/TheMC47) (Ping timeout: 268 seconds) |
2021-11-02 11:15:37 +0100 | epolanski | (uid312403@id-312403.helmsley.irccloud.com) |
2021-11-02 11:18:10 +0100 | gensyst | (gensyst@user/gensyst) |
2021-11-02 11:18:47 +0100 | <gensyst> | Is there any isMainThread function out there, to check if current thread is the main thread? |
2021-11-02 11:19:42 +0100 | <gensyst> | (other than grab the main thread id in main func and pass it around everywhere) |
2021-11-02 11:20:09 +0100 | v01d4lph4 | (~v01d4lph4@user/v01d4lph4) (Read error: Connection reset by peer) |
2021-11-02 11:20:41 +0100 | v01d4lph4 | (~v01d4lph4@user/v01d4lph4) |
2021-11-02 11:22:31 +0100 | wonko | (~wjc@user/wonko) |
2021-11-02 11:23:18 +0100 | <merijn> | gensyst: not afaik |
2021-11-02 11:23:56 +0100 | ubert | (~Thunderbi@ip5b405828.dynamic.kabel-deutschland.de) |
2021-11-02 11:27:04 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 11:28:00 +0100 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2021-11-02 11:28:30 +0100 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Client Quit) |
2021-11-02 11:31:34 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
2021-11-02 11:35:21 +0100 | thyriaen | (~thyriaen@x4dbf0bd8.dyn.telefonica.de) (Quit: Leaving) |
2021-11-02 11:39:35 +0100 | <maerwald> | can use a global IORef |
2021-11-02 11:42:37 +0100 | <gensyst> | maerwald, i guess that will be fine, thanks |
2021-11-02 11:43:12 +0100 | <maerwald> | make sure to use NOINLINE |
2021-11-02 11:44:21 +0100 | <maerwald> | foo = unsafePerformIO $ newIORef 0 |
2021-11-02 11:46:39 +0100 | Cajun | (~Cajun@user/cajun) (Quit: Client closed) |
2021-11-02 11:47:24 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 11:49:39 +0100 | thblt | (~thblt@user/thblt) (ERC (IRC client for Emacs 28.0.50)) |
2021-11-02 11:52:36 +0100 | <gensyst> | thanks! |
2021-11-02 11:56:00 +0100 | <gensyst> | maerwald, the NOINLINE ensures the cached version is used in 2nd and later calls? |
2021-11-02 11:56:07 +0100 | <gensyst> | (i.e. always the same ioref) |
2021-11-02 11:57:55 +0100 | Cajun | (~Cajun@user/cajun) |
2021-11-02 11:59:06 +0100 | shidima | (~shidima@188-206-67-204.mobile.kpn.net) (Ping timeout: 260 seconds) |
2021-11-02 11:59:30 +0100 | <maerwald> | yeah sorta |
2021-11-02 11:59:39 +0100 | <gensyst> | maerwald, and another question is, how to actually make sure this gets called when i call it in main? (other than forcing its evaluation by outputting the main thread id to stdout) |
2021-11-02 12:00:51 +0100 | alx741 | (~alx741@181.196.69.253) |
2021-11-02 12:01:51 +0100 | <maerwald> | you use writeIORef in `main` to fill it |
2021-11-02 12:01:54 +0100 | <maerwald> | that should be enough |
2021-11-02 12:02:49 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 12:03:46 +0100 | yauhsien_ | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 12:03:54 +0100 | <dminuoso> | gensyst: unsafePerformIO can be subtly dangerous. :) |
2021-11-02 12:04:40 +0100 | <maerwald> | dminuoso: what's unsafe about this particular pattern other than that it's a hack? |
2021-11-02 12:05:16 +0100 | <dminuoso> | Nothing, just saying that the NOINLINE is needed precisely because unsafePerformIO is subtly dangerous. |
2021-11-02 12:05:23 +0100 | <maerwald> | sure |
2021-11-02 12:07:51 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
2021-11-02 12:07:52 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
2021-11-02 12:07:54 +0100 | <dminuoso> | gensyst: You can assume the thread id of main to be 24. Your program will be right 75% (?) of the time. |
2021-11-02 12:08:00 +0100 | <dminuoso> | /s |
2021-11-02 12:14:05 +0100 | arjun | (~user@user/arjun) |
2021-11-02 12:14:22 +0100 | <arjun> | how do i point to cabal that install this package from this url and not hackage ? |
2021-11-02 12:14:25 +0100 | agoraphobic | (~agoraphob@ip11-173.bon.riksnet.se) (Quit: ZNC 1.8.2+deb2+b1 - https://znc.in) |
2021-11-02 12:14:31 +0100 | <arjun> | its a github master branch |
2021-11-02 12:14:38 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-02 12:15:13 +0100 | <jneira[m]> | `source-repository-package` in `cabal.project`? |
2021-11-02 12:15:21 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 12:15:46 +0100 | <jneira[m]> | https://cabal.readthedocs.io/en/latest/cabal-package.html#pkg-section-source-repository-source-rep… |
2021-11-02 12:17:23 +0100 | <gensyst> | maerwald, ah, so the initial value is just a dummy value? (undefined for instance) |
2021-11-02 12:17:38 +0100 | <gensyst> | (undefined :: ThreadId) |
2021-11-02 12:18:14 +0100 | <gensyst> | s/initial value/the value put into newIORef |
2021-11-02 12:18:45 +0100 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2021-11-02 12:18:59 +0100 | <gensyst> | no, forget that. it seems more like i'll be duplicating the main thread ID. once for newIORef, and then into writeIORef just to make sure it's in there |
2021-11-02 12:19:07 +0100 | <gensyst> | kind of unfortunate duplication though |
2021-11-02 12:19:56 +0100 | <arjun> | jneira[m]: no good |
2021-11-02 12:20:19 +0100 | <arjun> | maybe im missing something here |
2021-11-02 12:20:34 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-11-02 12:20:56 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 12:23:37 +0100 | yauhsien_ | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-02 12:24:12 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 12:24:40 +0100 | bitmapper | (uid464869@id-464869.lymington.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-02 12:30:16 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
2021-11-02 12:31:17 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-02 12:31:35 +0100 | <arjun> | jneira[m]: got it working, nvm, thanks! |
2021-11-02 12:37:14 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 12:42:18 +0100 | machinedgod | (~machinedg@135-23-192-217.cpe.pppoe.ca) |
2021-11-02 12:42:26 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-11-02 12:42:39 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 12:46:15 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) |
2021-11-02 12:50:31 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2021-11-02 12:52:46 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-11-02 12:53:30 +0100 | jonathanclarke | (~jonathanc@36.252.181.57) (Ping timeout: 268 seconds) |
2021-11-02 12:53:36 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 12:59:03 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-02 12:59:26 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 13:00:46 +0100 | jstolarek | (~jstolarek@137.220.120.162) |
2021-11-02 13:03:05 +0100 | shidima | (~shidima@84-104-108-90.cable.dynamic.v4.ziggo.nl) |
2021-11-02 13:03:13 +0100 | mikoto-chan | (~mikoto-ch@185.25.79.186) |
2021-11-02 13:03:13 +0100 | guniberas | (~guniberas@42.191.188.121) |
2021-11-02 13:04:50 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-11-02 13:05:12 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 13:05:28 +0100 | mikoto-chan | (~mikoto-ch@185.25.79.186) (Client Quit) |
2021-11-02 13:07:22 +0100 | mc47 | (~mc47@xmonad/TheMC47) |
2021-11-02 13:10:54 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-02 13:12:44 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 13:13:50 +0100 | mc47 | (~mc47@xmonad/TheMC47) (Ping timeout: 268 seconds) |
2021-11-02 13:17:32 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
2021-11-02 13:23:08 +0100 | kadir | (~kadir@95.7.9.203) |
2021-11-02 13:23:42 +0100 | MQ-17J | (~MQ-17J@8.6.144.203) (Ping timeout: 268 seconds) |
2021-11-02 13:23:43 +0100 | azeem | (~azeem@emp-89-199.eduroam.uu.se) (Ping timeout: 268 seconds) |
2021-11-02 13:24:19 +0100 | azeem | (~azeem@2a00:801:23e:a5f6:638b:961c:396f:f659) |
2021-11-02 13:25:01 +0100 | servytor | (uid525486@id-525486.hampstead.irccloud.com) |
2021-11-02 13:25:35 +0100 | slowtyper | (~slowtyper@user/slowtyper) (Ping timeout: 260 seconds) |
2021-11-02 13:25:43 +0100 | Ainoretho | (~ypw@huji-132-64-245-223.xt.huji.ac.il) |
2021-11-02 13:25:50 +0100 | Ainoretho | (~ypw@huji-132-64-245-223.xt.huji.ac.il) (Client Quit) |
2021-11-02 13:26:36 +0100 | <servytor> | I am trying to decide between common lisp and haskell for a project |
2021-11-02 13:27:01 +0100 | <servytor> | I am worried because I have had issues with haskell-language-server borking up when editing in emacs |
2021-11-02 13:27:18 +0100 | jonathanclarke | (~jonathanc@110.44.127.167) |
2021-11-02 13:28:26 +0100 | slowtyper | (~slowtyper@user/slowtyper) |
2021-11-02 13:28:46 +0100 | Ainoretho | (~ypw@huji-132-64-245-223.xt.huji.ac.il) |
2021-11-02 13:30:02 +0100 | Ainoretho | (~ypw@huji-132-64-245-223.xt.huji.ac.il) (Client Quit) |
2021-11-02 13:30:16 +0100 | Ainoretho | (~ypw@huji-132-64-245-223.xt.huji.ac.il) |
2021-11-02 13:31:47 +0100 | Ainoretho | (~ypw@huji-132-64-245-223.xt.huji.ac.il) (Client Quit) |
2021-11-02 13:32:02 +0100 | Ainoretho | (~ypw@huji-132-64-245-223.xt.huji.ac.il) |
2021-11-02 13:32:14 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-11-02 13:32:20 +0100 | mei | (~mei@user/mei) (Ping timeout: 268 seconds) |
2021-11-02 13:32:58 +0100 | jonathanclarke | (~jonathanc@110.44.127.167) (Ping timeout: 268 seconds) |
2021-11-02 13:36:55 +0100 | mei | (~mei@user/mei) |
2021-11-02 13:37:02 +0100 | Ainoretho | (~ypw@huji-132-64-245-223.xt.huji.ac.il) (Quit: WeeChat 3.3) |
2021-11-02 13:40:17 +0100 | kadir | (~kadir@95.7.9.203) () |
2021-11-02 13:42:55 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2021-11-02 13:42:59 +0100 | thyriaen | (~thyriaen@x4dbf0bd8.dyn.telefonica.de) |
2021-11-02 13:44:29 +0100 | jonathanclarke | (~jonathanc@36.252.181.57) |
2021-11-02 13:44:45 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2021-11-02 13:45:32 +0100 | shapr | (~user@pool-100-36-247-68.washdc.fios.verizon.net) |
2021-11-02 13:46:21 +0100 | gensyst | (gensyst@user/gensyst) (Quit: Leaving) |
2021-11-02 13:48:59 +0100 | mei | (~mei@user/mei) (Ping timeout: 268 seconds) |
2021-11-02 13:50:10 +0100 | yrlnry | (~mjd@pool-100-11-2-80.phlapa.fios.verizon.net) |
2021-11-02 13:50:58 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 13:51:46 +0100 | <maerwald> | I'm worried too |
2021-11-02 13:53:56 +0100 | max22- | (~maxime@2a01cb0883359800d15ccd5476102118.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds) |
2021-11-02 13:57:47 +0100 | azeem | (~azeem@2a00:801:23e:a5f6:638b:961c:396f:f659) (Read error: Connection reset by peer) |
2021-11-02 13:58:04 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-02 13:58:39 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 13:58:53 +0100 | azeem | (~azeem@emp-89-199.eduroam.uu.se) |
2021-11-02 13:59:32 +0100 | kadir | (~kadir@95.7.9.203) |
2021-11-02 14:00:05 +0100 | jonathanx | (~jonathan@dyn-8-sc.cdg.chalmers.se) (Ping timeout: 268 seconds) |
2021-11-02 14:01:54 +0100 | jonathanx | (~jonathan@dyn-8-sc.cdg.chalmers.se) |
2021-11-02 14:02:19 +0100 | <servytor> | maerwald: what's your experience with hls? |
2021-11-02 14:03:20 +0100 | <maerwald> | it works occasionally |
2021-11-02 14:03:47 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
2021-11-02 14:03:49 +0100 | <maerwald> | some issues with TH |
2021-11-02 14:04:27 +0100 | mmhat | (~mmh@55d4b212.access.ecotel.net) |
2021-11-02 14:04:37 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 14:06:01 +0100 | <dminuoso> | The main thing I dislike about HLS is that it adds quite a bit of complexity and moving parts. |
2021-11-02 14:06:15 +0100 | <dminuoso> | When things go wrong, it's usually some combination of "restart the entire editor and/or hls" |
2021-11-02 14:06:16 +0100 | azeem | (~azeem@emp-89-199.eduroam.uu.se) (Ping timeout: 268 seconds) |
2021-11-02 14:06:26 +0100 | <dminuoso> | It adds great value, but it's definitely not lightweight |
2021-11-02 14:06:33 +0100 | <maerwald> | I think that's more due to the nature of LSP |
2021-11-02 14:07:18 +0100 | <dminuoso> | Perhaps, but stories of stale compilation state are not unhead of, and that's an HLS issue |
2021-11-02 14:08:14 +0100 | <maerwald> | if I knew how to fix I would rant more about it |
2021-11-02 14:08:16 +0100 | <dminuoso> | But it's absolutely lovely to remove some binding, and then have HLS clean up 17 unused imports with jus one click. |
2021-11-02 14:08:33 +0100 | azeem | (~azeem@2a00:801:23e:a5f6:638b:961c:396f:f659) |
2021-11-02 14:08:47 +0100 | <dminuoso> | It improved my haskell life considerably, but the brittleness is definitely noticeable at times |
2021-11-02 14:09:18 +0100 | <dminuoso> | ghcide should still not be forgotten, as that one is really solid, stable and lightweight.. :) |
2021-11-02 14:09:20 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
2021-11-02 14:10:02 +0100 | betelgeuse | (~betelgeus@94-225-47-8.access.telenet.be) |
2021-11-02 14:11:46 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 14:13:03 +0100 | arjun | (~user@user/arjun) (Remote host closed the connection) |
2021-11-02 14:13:38 +0100 | <merijn> | dminuoso: Define solid |
2021-11-02 14:13:49 +0100 | <merijn> | dminuoso: For me it breaks on everything but the most trivial code |
2021-11-02 14:16:15 +0100 | azimut_ | (~azimut@gateway/tor-sasl/azimut) |
2021-11-02 14:16:30 +0100 | ncopa | (~ncopa@gbr2-dev1.alpinelinux.org) (Changing host) |
2021-11-02 14:16:30 +0100 | ncopa | (~ncopa@alpine/developer/ncopa) |
2021-11-02 14:18:34 +0100 | slowButPresent | (~slowButPr@user/slowbutpresent) |
2021-11-02 14:20:12 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds) |
2021-11-02 14:22:55 +0100 | azeem | (~azeem@2a00:801:23e:a5f6:638b:961c:396f:f659) (Ping timeout: 268 seconds) |
2021-11-02 14:23:51 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-02 14:24:18 +0100 | cigsender | (~cigsender@74.124.58.162) |
2021-11-02 14:24:27 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 14:24:38 +0100 | lemonsnicks | (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-11-02 14:24:57 +0100 | lemonsnicks | (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) |
2021-11-02 14:27:23 +0100 | jonathanclarke | (~jonathanc@36.252.181.57) (Ping timeout: 264 seconds) |
2021-11-02 14:28:48 +0100 | azeem | (~azeem@emp-89-199.eduroam.uu.se) |
2021-11-02 14:29:41 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
2021-11-02 14:30:15 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 14:36:44 +0100 | Gurkenglas | (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
2021-11-02 14:39:04 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) (Read error: Connection reset by peer) |
2021-11-02 14:39:31 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2021-11-02 14:40:49 +0100 | jonathanclarke | (~jonathanc@36.252.181.57) |
2021-11-02 14:41:05 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-02 14:41:40 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 14:44:36 +0100 | kadir | (~kadir@95.7.9.203) () |
2021-11-02 14:46:50 +0100 | mei | (~mei@user/mei) |
2021-11-02 14:46:58 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
2021-11-02 14:47:36 +0100 | w1gz | (~do@159.89.11.133) (Quit: WeeChat 3.0.1) |
2021-11-02 14:48:14 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 14:50:31 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-11-02 14:52:51 +0100 | mei | (~mei@user/mei) (Read error: Connection reset by peer) |
2021-11-02 14:53:00 +0100 | mei | (~mei@user/mei) |
2021-11-02 14:53:41 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-02 14:53:41 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-02 14:53:41 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-02 14:55:04 +0100 | Guest|69 | (~Guest|69@89.211.234.25) |
2021-11-02 14:55:15 +0100 | <Guest|69> | Hello guys |
2021-11-02 14:55:48 +0100 | <geekosaur> | ohai |
2021-11-02 14:56:03 +0100 | <Guest|69> | these are my first days using Haskell on Mac , and I'm having a problem: |
2021-11-02 14:56:06 +0100 | <maerwald> | Guest|69: run `source ~/.ghcup/env` |
2021-11-02 14:57:01 +0100 | <Guest|69> | whenever I restart the terminal and run ghci the terminal gives command not found |
2021-11-02 14:57:37 +0100 | <Guest|69> | although I did install it |
2021-11-02 15:00:31 +0100 | <yushyin> | maerwald: i see your crystal ball is working wonderfully today |
2021-11-02 15:00:52 +0100 | <[exa]> | Guest|69: you probably need to ensure that the PATH setting is loaded everytime you start the terminal |
2021-11-02 15:01:09 +0100 | <[exa]> | Guest|69: did you check bashrc and everything? (not sure that exists on mac though) |
2021-11-02 15:01:20 +0100 | <merijn> | [exa]: zsh by default nowadays |
2021-11-02 15:01:25 +0100 | <Guest|69> | I thought of that but I didn't know how to do it |
2021-11-02 15:01:49 +0100 | <[exa]> | check out if you have any .zshrc or similar files in your home dir |
2021-11-02 15:01:56 +0100 | <Guest|69> | sorry but I'm jus |
2021-11-02 15:02:00 +0100 | <dminuoso> | merijn: Not sure why ghcide would break for you. |
2021-11-02 15:02:06 +0100 | [exa] | <- totally untouched by Mac |
2021-11-02 15:02:06 +0100 | <Guest|69> | new to programming |
2021-11-02 15:02:24 +0100 | Guest|69 | (~Guest|69@89.211.234.25) (Quit: Connection closed) |
2021-11-02 15:03:37 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
2021-11-02 15:04:11 +0100 | Guest|58 | (~Guest|58@89.211.234.25) |
2021-11-02 15:04:33 +0100 | <[exa]> | Guest|58: try something like: ls -a ~ |
2021-11-02 15:04:34 +0100 | do | (~do@159.89.11.133) |
2021-11-02 15:05:23 +0100 | <Guest|58> | hello I'm guest 69 |
2021-11-02 15:06:04 +0100 | mei | (~mei@user/mei) (Ping timeout: 268 seconds) |
2021-11-02 15:06:09 +0100 | <merijn> | dminuoso: FFI and TH are both brittle |
2021-11-02 15:06:29 +0100 | <Guest|58> | so I install Haskell then when I restart my terminal it doesn't work |
2021-11-02 15:06:31 +0100 | <dminuoso> | Guess they are brittle irrespective of whether its HLS or ghcide |
2021-11-02 15:06:38 +0100 | <merijn> | dminuoso: Also lack of component support |
2021-11-02 15:06:41 +0100 | <dminuoso> | Though ffi hasnt been a problem yet, QQ/TH is. |
2021-11-02 15:08:17 +0100 | <maerwald> | dminuoso: I have problems with ffi... -fobject-code seems to break stuff |
2021-11-02 15:14:01 +0100 | <Guest|58> | how can I save Haskell so I don't have to reinstall it each time I restart my terminal |
2021-11-02 15:15:02 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 260 seconds) |
2021-11-02 15:15:36 +0100 | <yushyin> | Guest|58: run `source ~/.ghcup/env` this in your terminal, if this works, add it to the end of your ~/.zshrc |
2021-11-02 15:16:49 +0100 | Nachtgespenst | (~user@user/siracusa) (Quit: Bye!) |
2021-11-02 15:19:40 +0100 | boxscape_ | (~boxscape_@134.171.69.87) |
2021-11-02 15:19:56 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-02 15:19:56 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-02 15:19:56 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-02 15:20:24 +0100 | hendursa1 | (~weechat@user/hendursaga) (Quit: hendursa1) |
2021-11-02 15:20:49 +0100 | hendursaga | (~weechat@user/hendursaga) |
2021-11-02 15:20:55 +0100 | <Guest|58> | yushyin I got nothing like I simply pressed enter |
2021-11-02 15:22:35 +0100 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
2021-11-02 15:22:35 +0100 | slack1256 | (~slack1256@191.126.99.76) |
2021-11-02 15:22:41 +0100 | <Guest|58> | Uploaded file: https://uploads.kiwiirc.com/files/efabc507c63ccc0b8193f4aaebf0af19/Screenshot%202021-11-02%20at%20… |
2021-11-02 15:23:19 +0100 | <slack1256> | What is the second most popular numerical hierarchy? The `foundation` library seems to be it, right? |
2021-11-02 15:24:05 +0100 | <merijn> | The 2nd most popular is "none" :p |
2021-11-02 15:24:10 +0100 | <geekosaur> | Guest|58, it won't do anything visible, but "ghci" should work afterward |
2021-11-02 15:24:11 +0100 | do | w1gz |
2021-11-02 15:24:35 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
2021-11-02 15:24:45 +0100 | <geekosaur> | hm, that screenshot says you're already in ghci |
2021-11-02 15:24:56 +0100 | <slack1256> | merijn: :sad: |
2021-11-02 15:25:11 +0100 | <geekosaur> | the "Prelude>" prompt, indicating that the module "Prelude" is active because you didn't load a different module) |
2021-11-02 15:25:37 +0100 | <Guest|58> | my problem is when I restart my terminal i can't run ghci |
2021-11-02 15:25:57 +0100 | <geekosaur> | right, at that point you run that "source" command and then you should be able to run ghci |
2021-11-02 15:25:59 +0100 | <Guest|58> | it's like I didn't install Haskell in the first place |
2021-11-02 15:26:21 +0100 | <geekosaur> | if that works, you add the "source" command to your .zshrc so it'll be run automatically when you open a terminal |
2021-11-02 15:27:43 +0100 | <Guest|58> | source ~/.ghcup/env this source command ? |
2021-11-02 15:27:50 +0100 | <geekosaur> | yes |
2021-11-02 15:28:20 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) |
2021-11-02 15:28:29 +0100 | <geekosaur> | to summarize what's going on, the terminal only looks in certain places for commands. the "source" command adds a new place to that list of places, so ghc and ghci should be found afterward |
2021-11-02 15:28:58 +0100 | <Guest|58> | thank you |
2021-11-02 15:29:20 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) |
2021-11-02 15:29:32 +0100 | <Guest|58> | and how can I add source command to .zshrc? |
2021-11-02 15:29:47 +0100 | <yushyin> | but the screenshot indicates that the bootstrap script has already changed the zshrc, so I don't know exactly what's going wrong there |
2021-11-02 15:30:38 +0100 | <maerwald> | maybe they're using bash and not zsh |
2021-11-02 15:31:01 +0100 | <maerwald> | login shell isn't necessarily the same as user shell |
2021-11-02 15:31:22 +0100 | jonathanclarke | (~jonathanc@36.252.181.57) (Ping timeout: 260 seconds) |
2021-11-02 15:31:57 +0100 | <Guest|58> | Uploaded file: https://uploads.kiwiirc.com/files/8fbbcbb7702eab5562cc07ab592f52b8/Screenshot%202021-11-02%20at%20… |
2021-11-02 15:32:42 +0100 | shriekingnoise | (~shrieking@186.137.144.80) |
2021-11-02 15:32:50 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Ping timeout: 260 seconds) |
2021-11-02 15:33:03 +0100 | <geekosaur> | if it's modern os x, it'll be zsh unless they've made specific (and complicated on os x) changes |
2021-11-02 15:33:08 +0100 | <maerwald> | "To update your account to use zsh, please run..." |
2021-11-02 15:33:14 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) (Ping timeout: 260 seconds) |
2021-11-02 15:34:38 +0100 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Quit: WeeChat 3.3) |
2021-11-02 15:34:43 +0100 | mc47 | (~mc47@xmonad/TheMC47) |
2021-11-02 15:35:05 +0100 | <Guest|58> | I ran it and got no changes made |
2021-11-02 15:36:29 +0100 | <yushyin> | I believe you will need to re-login after such a change. |
2021-11-02 15:36:45 +0100 | <merijn> | You need to exit and restart the Terminal |
2021-11-02 15:37:16 +0100 | Sgeo | (~Sgeo@user/sgeo) |
2021-11-02 15:37:36 +0100 | <Guest|58> | and then just run ghci? |
2021-11-02 15:37:43 +0100 | <Guest|58> | or the source command? |
2021-11-02 15:38:44 +0100 | <Guest|58> | Uploaded file: https://uploads.kiwiirc.com/files/efabc507c63ccc0b8193f4aaebf0af19/Screenshot%202021-11-02%20at%20… |
2021-11-02 15:40:47 +0100 | <maerwald> | well, seems everything is working |
2021-11-02 15:40:54 +0100 | <yushyin> | if you start a new shell and type in 'ghci', it should just work now |
2021-11-02 15:41:08 +0100 | <yushyin> | s/shell/terminal/ |
2021-11-02 15:42:59 +0100 | slack1256 | (~slack1256@191.126.99.76) (Remote host closed the connection) |
2021-11-02 15:45:37 +0100 | Midjak | (~Midjak@82-65-111-221.subs.proxad.net) |
2021-11-02 15:45:58 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2021-11-02 15:45:59 +0100 | y04nn | (~y04nn@92.223.89.196) |
2021-11-02 15:46:50 +0100 | <Guest|58> | so every time I open terminal I run the source command then ghci |
2021-11-02 15:46:52 +0100 | <Guest|58> | ? |
2021-11-02 15:48:44 +0100 | <yushyin> | just ghci should be fine |
2021-11-02 15:49:39 +0100 | <Guest|58> | just ghci gives command not found |
2021-11-02 15:49:49 +0100 | mei | (~mei@user/mei) |
2021-11-02 15:50:30 +0100 | Skyfire | (~pyon@user/pyon) |
2021-11-02 15:51:00 +0100 | azimut_ | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2021-11-02 15:51:29 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2021-11-02 15:52:58 +0100 | <Guest|58> | Uploaded file: https://uploads.kiwiirc.com/files/e03144e0edfc469d108e75dc0d2c96c2/Screenshot%202021-11-02%20at%20… |
2021-11-02 15:54:09 +0100 | jtomas | (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) |
2021-11-02 15:55:31 +0100 | <yushyin> | Guest|58: Did you run the command the shell asks you to run? To change your default shell? `chsh -s /bin/zsh' |
2021-11-02 15:55:42 +0100 | <Guest|58> | yes |
2021-11-02 15:56:43 +0100 | jonathanx | (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
2021-11-02 15:56:59 +0100 | jonathanx | (~jonathan@dyn-8-sc.cdg.chalmers.se) |
2021-11-02 15:57:07 +0100 | <geekosaur> | huh, when did they make that work? I used to have to run some ugly gui thing to edit apple's binary user database |
2021-11-02 15:57:19 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2021-11-02 15:57:31 +0100 | <geekosaur> | (ugly = you could tell they didn't put much work into it and it wasn't really intended for end users) |
2021-11-02 15:57:41 +0100 | <yushyin> | Guest|58: maybe do try a re-login |
2021-11-02 15:58:34 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection) |
2021-11-02 15:58:40 +0100 | Guest|58 | (~Guest|58@89.211.234.25) (Quit: Connection closed) |
2021-11-02 15:58:53 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2021-11-02 16:00:13 +0100 | <merijn> | geekosaur: It has worked as long as I know? |
2021-11-02 16:00:35 +0100 | Guest|58 | (~Guest|58@89.211.234.25) |
2021-11-02 16:00:38 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 16:01:15 +0100 | <Guest|58> | it's all good] |
2021-11-02 16:01:27 +0100 | <yushyin> | Guest|58: hello again ;) |
2021-11-02 16:01:28 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-02 16:01:35 +0100 | <Guest|58> | thank you guys for your time and effort |
2021-11-02 16:01:44 +0100 | Guest|58 | (~Guest|58@89.211.234.25) (Client Quit) |
2021-11-02 16:02:03 +0100 | max22- | (~maxime@2a01cb08833598003c892bb6cec267c2.ipv6.abo.wanadoo.fr) |
2021-11-02 16:02:04 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 16:02:06 +0100 | hippoid | (~idris@184.105.6.88) |
2021-11-02 16:04:08 +0100 | kadir | (~kadir@95.7.9.203) |
2021-11-02 16:05:49 +0100 | thyriaen | (~thyriaen@x4dbf0bd8.dyn.telefonica.de) (Quit: Leaving) |
2021-11-02 16:05:59 +0100 | <hippoid> | > fmap (+1) (1, 2) |
2021-11-02 16:06:01 +0100 | <lambdabot> | (1,3) |
2021-11-02 16:06:39 +0100 | <hippoid> | what's the reason that (+1) is only applied to the last element of the tuple? |
2021-11-02 16:06:49 +0100 | <merijn> | :t (1, 2) |
2021-11-02 16:06:50 +0100 | <lambdabot> | (Num a, Num b) => (a, b) |
2021-11-02 16:06:54 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
2021-11-02 16:07:10 +0100 | <merijn> | hippoid: Now, mentally rewrite that to use the tuple as prefix syntax "(,) a b" |
2021-11-02 16:07:14 +0100 | <merijn> | :t fmap |
2021-11-02 16:07:15 +0100 | <lambdabot> | Functor f => (a -> b) -> f a -> f b |
2021-11-02 16:07:17 +0100 | <boxscape_> | hippoid what would you expect to happen to `fmap (+1) ("hello", 3)` if it were applied to both? |
2021-11-02 16:07:29 +0100 | <merijn> | hippoid: And ponder: "what is 'f' in case of a tuple?" |
2021-11-02 16:07:44 +0100 | <dminuoso> | Its funny eh, we get that question once a week. |
2021-11-02 16:07:46 +0100 | <maerwald> | :t bimap |
2021-11-02 16:07:47 +0100 | <lambdabot> | Bifunctor p => (a -> b) -> (c -> d) -> p a c -> p b d |
2021-11-02 16:08:05 +0100 | <hippoid> | ok follow up question, is there an easy way to see the implementaiton of fmap for a tuple using hoogle or some vim plugin, etc? |
2021-11-02 16:08:17 +0100 | <dminuoso> | sadly no |
2021-11-02 16:08:19 +0100 | <merijn> | Using hoogle, yes |
2021-11-02 16:08:34 +0100 | <dminuoso> | Or rather, I dont think hoogle can search for instances itself. |
2021-11-02 16:08:57 +0100 | <merijn> | hippoid: If you go to the Haddocks for Functor (https://hackage.haskell.org/package/base-4.16.0.0/docs/Prelude.html#v:fmap) then you see a list of instances below it |
2021-11-02 16:09:14 +0100 | <merijn> | Those instances have a source link behind them |
2021-11-02 16:09:48 +0100 | Sgeo_ | (~Sgeo@user/sgeo) |
2021-11-02 16:10:07 +0100 | <hippoid> | ok, thanks all! |
2021-11-02 16:11:02 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) |
2021-11-02 16:11:09 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
2021-11-02 16:12:40 +0100 | Sgeo | (~Sgeo@user/sgeo) (Ping timeout: 268 seconds) |
2021-11-02 16:13:48 +0100 | azeem | (~azeem@emp-89-199.eduroam.uu.se) (Read error: Connection reset by peer) |
2021-11-02 16:14:32 +0100 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) |
2021-11-02 16:15:03 +0100 | azeem | (~azeem@2a00:801:3c9:cf16:6d84:9e6f:3c27:1ca6) |
2021-11-02 16:17:22 +0100 | myShoggoth | (~myShoggot@97-120-85-195.ptld.qwest.net) |
2021-11-02 16:20:04 +0100 | mei | (~mei@user/mei) (Ping timeout: 268 seconds) |
2021-11-02 16:20:30 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) |
2021-11-02 16:21:18 +0100 | guniberas | (~guniberas@42.191.188.121) (Ping timeout: 268 seconds) |
2021-11-02 16:25:00 +0100 | waleee | (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 268 seconds) |
2021-11-02 16:27:51 +0100 | pretty_dumm_guy | (~trottel@eduroam-134-96-204-83.uni-saarland.de) |
2021-11-02 16:28:54 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 16:31:29 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 16:38:01 +0100 | fizzsegfaultbuzz | (~segfaultf@135-180-0-138.static.sonic.net) |
2021-11-02 16:38:34 +0100 | acidjnk | (~acidjnk@p200300d0c7441145a0f2d1eed66e92ec.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
2021-11-02 16:50:03 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 16:50:17 +0100 | jonathanclarke | (~jonathanc@202.51.76.91) |
2021-11-02 16:53:39 +0100 | fendor_ | (~fendor@178.165.199.1.wireless.dyn.drei.com) |
2021-11-02 16:54:00 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.2) |
2021-11-02 16:54:54 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
2021-11-02 16:55:23 +0100 | Null_A | (~null_a@2601:645:8700:2290:7887:7a6d:751e:a369) |
2021-11-02 16:55:44 +0100 | Jing | (~textual@2604:a840:3::1021) |
2021-11-02 16:56:27 +0100 | fendor | (~fendor@77.119.197.65.wireless.dyn.drei.com) (Ping timeout: 268 seconds) |
2021-11-02 16:56:51 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 16:58:30 +0100 | zmt00 | (~zmt00@user/zmt00) |
2021-11-02 16:59:19 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 17:01:39 +0100 | lbseale | (~lbseale@user/ep1ctetus) |
2021-11-02 17:01:48 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:c40:37f:b11e:565f) (Quit: WeeChat 2.8) |
2021-11-02 17:02:47 +0100 | boxscape_ | (~boxscape_@134.171.69.87) (Ping timeout: 264 seconds) |
2021-11-02 17:04:28 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 17:05:04 +0100 | jumper149 | (~jumper149@80.240.31.34) (Quit: WeeChat 3.2) |
2021-11-02 17:05:05 +0100 | jstolarek | (~jstolarek@137.220.120.162) (Ping timeout: 268 seconds) |
2021-11-02 17:10:18 +0100 | wonko | (~wjc@user/wonko) (Ping timeout: 260 seconds) |
2021-11-02 17:13:14 +0100 | sagax | (~sagax_nb@user/sagax) (Remote host closed the connection) |
2021-11-02 17:13:56 +0100 | v01d4lph4 | (~v01d4lph4@user/v01d4lph4) (Remote host closed the connection) |
2021-11-02 17:16:11 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-02 17:17:18 +0100 | shidima | (~shidima@84-104-108-90.cable.dynamic.v4.ziggo.nl) (Ping timeout: 260 seconds) |
2021-11-02 17:19:01 +0100 | nckx | (~nckx@tobias.gr) (Quit: Updating my Guix System <https://guix.gnu.org>) |
2021-11-02 17:19:22 +0100 | <zincy> | Again I hear from an experienced Haskeller that IO is impure in all languages. |
2021-11-02 17:19:35 +0100 | <zincy> | Am I going mad? |
2021-11-02 17:20:16 +0100 | <dminuoso> | Seeing as Im not a psychologist, I'm not equipped to answer that question. |
2021-11-02 17:20:19 +0100 | <nitrix> | The purity refers to how the effects are modeled by the language, as to not break the semantics/guarantees it provides. |
2021-11-02 17:20:40 +0100 | <geekosaur> | IO is kinda by definition impure, since it involves interacting with the "world" outside the program itself |
2021-11-02 17:21:14 +0100 | <dminuoso> | zincy: I'd first step back and ask what that sentence means exactly. What do they mean by "IO is impure" and what is meant by "impure" exactly, and what does "in *all* languages" refer to? |
2021-11-02 17:21:26 +0100 | <dminuoso> | Without more context, I dont think this is a good basis for a discussion |
2021-11-02 17:21:30 +0100 | <geekosaur> | Haskell carefully limits how you do this. Most languages just mix it in willy-nilly, which makes it much harder to reason about what they're doingt |
2021-11-02 17:21:38 +0100 | <maerwald> | IO is pure |
2021-11-02 17:21:47 +0100 | <dminuoso> | Whether something is "pure" or not should start with what we mean by pure. |
2021-11-02 17:22:09 +0100 | <dminuoso> | This is too handwavy |
2021-11-02 17:22:48 +0100 | <maerwald> | > seq (putStrLn "lol") 1 |
2021-11-02 17:22:49 +0100 | <lambdabot> | 1 |
2021-11-02 17:23:03 +0100 | <dminuoso> | Point of interest, if you use this for demonstration, you should use pseq. |
2021-11-02 17:24:51 +0100 | boxscape_ | (~boxscape_@i59F67A65.versanet.de) |
2021-11-02 17:25:39 +0100 | <zincy> | dminuoso: So there are lots of competing definitions of "pure"? |
2021-11-02 17:25:47 +0100 | <dminuoso> | GHC is free to evalutae this in parallel, so it could be conceivable that lambdabot printed 1 before the other "lol" was printed. |
2021-11-02 17:25:59 +0100 | <maerwald> | zincy: not really |
2021-11-02 17:26:02 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2021-11-02 17:26:07 +0100 | <dminuoso> | zincy: No, its rather that in some handwavy statement "IO is impure in all languageS", Im not even sure what is meant by that. |
2021-11-02 17:26:19 +0100 | nckx | (~nckx@tobias.gr) |
2021-11-02 17:26:48 +0100 | <tomsmeding> | there are multiple competing definitions of "pure", though; GCC has a function attribute "pure" that allows IO in its body https://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/Function-Attributes.html |
2021-11-02 17:27:04 +0100 | <dminuoso> | Purity is usually part of the semantics of the language, not of a type (like say IO) |
2021-11-02 17:27:14 +0100 | <maerwald> | tomsmeding: *academic* definitions? |
2021-11-02 17:27:15 +0100 | <tomsmeding> | oh hm, it may actually not allow IO |
2021-11-02 17:27:22 +0100 | <dminuoso> | So Im not even sure what "IO being pure/impure" even means |
2021-11-02 17:27:31 +0100 | <tomsmeding> | maerwald: there are multiple academic definitions of almost everything |
2021-11-02 17:27:44 +0100 | <maerwald> | I only know of one formal definition of purity |
2021-11-02 17:27:47 +0100 | <dminuoso> | It's the language that can be pure/impure. Or possibly expressions |
2021-11-02 17:27:49 +0100 | <maerwald> | can you provide a link to some? |
2021-11-02 17:28:39 +0100 | neightchan | (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 17:28:55 +0100 | <tomsmeding> | maerwald: cannot provide a link, but I'm fairly sure there are definitions that allow nontermination and definitions that do, in a pure function |
2021-11-02 17:29:01 +0100 | natechan | (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Read error: No route to host) |
2021-11-02 17:29:03 +0100 | <dminuoso> | zincy: At best I can interpret that remark as taking note, that while evaluating expressions can be pure in the sense that the outside world is not touched, executing IO actions can trivially interact with the world. |
2021-11-02 17:29:16 +0100 | <nitrix> | I/O translates to effects (if the language is pure) and side-effects (if the language isn't pure). |
2021-11-02 17:29:18 +0100 | sagax | (~sagax_nb@user/sagax) |
2021-11-02 17:29:23 +0100 | <zincy> | dminuoso: Right so it's an ill formed statement |
2021-11-02 17:29:35 +0100 | jkaye | (~jkaye@BELVEDERE-T.ear2.Denver1.Level3.net) |
2021-11-02 17:29:35 +0100 | <dminuoso> | Id say so, yes |
2021-11-02 17:30:54 +0100 | <dminuoso> | Heck, even the term IO is sort of gibberish in an all encompassing generalization |
2021-11-02 17:31:24 +0100 | <dminuoso> | Haskell IO is more than just about outside world interaction, think about forkIO |
2021-11-02 17:31:27 +0100 | <zincy> | Yeah I think that is why I felt icky |
2021-11-02 17:31:52 +0100 | <maerwald> | I simply look at "IO" in the sense that it can do syscalls |
2021-11-02 17:32:07 +0100 | <maerwald> | I have no understanding of worlds |
2021-11-02 17:32:36 +0100 | <dminuoso> | maerwald: So any runtime execution that allocates memory via syscalls automatically triggers IO? |
2021-11-02 17:32:57 +0100 | <maerwald> | I don't understand your question |
2021-11-02 17:33:17 +0100 | <dminuoso> | Nevermind |
2021-11-02 17:33:40 +0100 | <geekosaur> | I grant that I did not define that term. but a program has what it does inside itself (internal state — a "world") and how it interacts outside itself via syscalls and the like (external state — a "world") |
2021-11-02 17:34:26 +0100 | <maerwald> | how do you separate the filesystem into internal and external state |
2021-11-02 17:34:45 +0100 | <geekosaur> | also in a language like Haskell there is very little direct allocation of memory by a program (only done as part of FFI); mostly it's done behind the scenes by the runtime. as is any actual I/O |
2021-11-02 17:35:18 +0100 | <nitrix> | I would say forkIO has implications with the semantics (control flow, concurrency), that's a little immediate than "a world". |
2021-11-02 17:35:27 +0100 | <geekosaur> | the filesystem is external state. manipulation of filesystem objects is *driven by* internal state, but the actual manipulation itself is external |
2021-11-02 17:35:50 +0100 | <maerwald> | I can't fathom that distinction |
2021-11-02 17:36:04 +0100 | <geekosaur> | and yes, forkIO confuses things a bit, because now you have separate internal "worlds" which have to interact with each other as if each was external to the other |
2021-11-02 17:36:22 +0100 | <maerwald> | I think of programs in terms of control flow, not worlds |
2021-11-02 17:36:47 +0100 | <maerwald> | everything that clouds the control flow is bad: forkIO, objects, filesystem state |
2021-11-02 17:36:48 +0100 | <geekosaur> | hm, but "control flow" is somewhat ill-defined in a language like Haskell |
2021-11-02 17:36:56 +0100 | <maerwald> | not really |
2021-11-02 17:37:06 +0100 | <nitrix> | I view evaluation and control flow independently. |
2021-11-02 17:37:21 +0100 | <nitrix> | control flow = execution in my verbiage. |
2021-11-02 17:37:22 +0100 | <dminuoso> | nitrix: I dont think works reasonable, given how we tend to encode control flow. |
2021-11-02 17:37:26 +0100 | <maerwald> | even laziness clouds control flow |
2021-11-02 17:37:41 +0100 | <maerwald> | so I'm not a big fan of that either |
2021-11-02 17:38:04 +0100 | <nitrix> | As in the execution is controllable and drives evaluation. |
2021-11-02 17:38:04 +0100 | <geekosaur> | that was part of what I meant by "somewhat ill-defined". the rest was how you tend to specify what you want as opposed to how to do it |
2021-11-02 17:38:07 +0100 | <dminuoso> | 17:31:52 maerwald | I simply look at "IO" in the sense that it can do syscalls |
2021-11-02 17:38:15 +0100 | <dminuoso> | Perhaps this definition is simple and good. |
2021-11-02 17:38:19 +0100 | <maerwald> | IO helps me reason about control flow... in some way. But effects? No idea. |
2021-11-02 17:38:43 +0100 | <dminuoso> | Because at the end, this capturs nicely what we usually mean by "cant delete a file, call an API or write to a database" |
2021-11-02 17:38:45 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 17:38:47 +0100 | <maerwald> | When I look at my mtl code, I usually can't reason about effects. They're all over the places. |
2021-11-02 17:39:20 +0100 | <maerwald> | What I can reason about is: this code doesn't do filesystem syscalls. |
2021-11-02 17:39:28 +0100 | <maerwald> | But I can't reasonably express this in haskell. |
2021-11-02 17:39:43 +0100 | <maerwald> | I have to run a seccomp based syscall filter to verify any of that. |
2021-11-02 17:39:45 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 17:40:26 +0100 | <maerwald> | have you ever checked how many files `tar` opens when it extracts an archive? |
2021-11-02 17:40:37 +0100 | <maerwald> | I mean all sorts of stuff in /etc and whatnot |
2021-11-02 17:40:59 +0100 | <maerwald> | curl is even worse |
2021-11-02 17:41:13 +0100 | <dminuoso> | I recall work on programming languages with effect systems that talk about filtering syscalls exactly like that |
2021-11-02 17:41:45 +0100 | <dminuoso> | Such that you would have useful extractable semantics, where if you had EffXYZ you could make some useful statement about what your program can or cant do. |
2021-11-02 17:41:57 +0100 | <dminuoso> | Mmm, I have to dig this up again |
2021-11-02 17:42:12 +0100 | <maerwald> | that would be useful |
2021-11-02 17:42:32 +0100 | <dminuoso> | Ill reach out to my buddy tomorrow, pretty sure he showed me a paper on this subject |
2021-11-02 17:42:36 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 17:43:34 +0100 | <maerwald> | I've been playing with sydbox, which is a program that allows to filter syscalls and used in some linux package managers. But it has bugs last I tried, because it isn't widely used |
2021-11-02 17:44:28 +0100 | v01d4lph4 | (~v01d4lph4@user/v01d4lph4) |
2021-11-02 17:44:43 +0100 | <nitrix> | I'm personally not fond of trying to encode everything with types. The static safety is great, but it's blows up so quickly in terms of complexity. |
2021-11-02 17:44:57 +0100 | <maerwald> | sure, you can have multiptle orthogonal type systems |
2021-11-02 17:45:16 +0100 | <dminuoso> | If memory serves right, in that particular example it was a secondary type system |
2021-11-02 17:45:19 +0100 | <maerwald> | you don't need to encode everything into one, that's usually a consequence of compiler maintenance |
2021-11-02 17:45:51 +0100 | <maerwald> | imagine GHC would come up with a secondary type system... I can't imagine how much work that would be to get an initial working version |
2021-11-02 17:45:58 +0100 | <maerwald> | 3 PhDs and 5 years of work |
2021-11-02 17:47:01 +0100 | yrlnry | (~mjd@pool-100-11-2-80.phlapa.fios.verizon.net) (Ping timeout: 268 seconds) |
2021-11-02 17:47:40 +0100 | <maerwald> | but... I think having a configurable syscall filter in the RTS... might not be that hard maybe |
2021-11-02 17:49:40 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 17:50:02 +0100 | pretty_dumm_guy | (~trottel@eduroam-134-96-204-83.uni-saarland.de) (Quit: WeeChat 3.3) |
2021-11-02 17:50:06 +0100 | v01d4lph4 | (~v01d4lph4@user/v01d4lph4) (Ping timeout: 268 seconds) |
2021-11-02 17:52:33 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2021-11-02 17:54:25 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-02 17:55:42 +0100 | Guest26 | (~Guest26@cpc78119-cwma10-2-0-cust127.7-3.cable.virginm.net) |
2021-11-02 17:56:14 +0100 | fef | (~thedawn@user/thedawn) |
2021-11-02 17:58:17 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
2021-11-02 17:59:10 +0100 | <dminuoso> | Mmm, I want to stop using ToJSON instances with servant, it's just darn frustrating to have to create newtype wrappers just to feed some JSON representation in. |
2021-11-02 17:59:39 +0100 | <dminuoso> | Im thinking of making some shallow existential `data Jsonable = forall a. ToJSON a => Jsonable a`, and then write my servant APIs to simply return Jsonable |
2021-11-02 17:59:47 +0100 | <dminuoso> | Is this reasonable? Is there another way? |
2021-11-02 18:03:03 +0100 | rkrishnan | (~user@223.226.59.167) (Ping timeout: 268 seconds) |
2021-11-02 18:03:59 +0100 | ubert | (~Thunderbi@ip5b405828.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
2021-11-02 18:04:38 +0100 | econo | (uid147250@user/econo) |
2021-11-02 18:08:30 +0100 | Guest26 | (~Guest26@cpc78119-cwma10-2-0-cust127.7-3.cable.virginm.net) (Quit: Client closed) |
2021-11-02 18:09:23 +0100 | boxscape_92 | (~boxscape_@i59F67A65.versanet.de) |
2021-11-02 18:09:23 +0100 | boxscape_92 | boxscape__ |
2021-11-02 18:09:32 +0100 | kadir | (~kadir@95.7.9.203) () |
2021-11-02 18:11:42 +0100 | boxscape_ | (~boxscape_@i59F67A65.versanet.de) (Ping timeout: 268 seconds) |
2021-11-02 18:13:14 +0100 | Guest92 | (~Guest92@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) |
2021-11-02 18:13:59 +0100 | Guest92 | (~Guest92@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) (Client Quit) |
2021-11-02 18:16:24 +0100 | Jing | (~textual@2604:a840:3::1021) (Remote host closed the connection) |
2021-11-02 18:17:26 +0100 | v01d4lph4 | (~v01d4lph4@106.215.93.204) |
2021-11-02 18:17:26 +0100 | v01d4lph4 | (~v01d4lph4@106.215.93.204) (Changing host) |
2021-11-02 18:17:26 +0100 | v01d4lph4 | (~v01d4lph4@user/v01d4lph4) |
2021-11-02 18:17:49 +0100 | cfricke | (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
2021-11-02 18:20:08 +0100 | Jing | (~textual@2604:a840:3::1021) |
2021-11-02 18:21:23 +0100 | zincy | (~tom@2a00:23c8:970c:4801:d180:6949:f6bd:3923) (Ping timeout: 264 seconds) |
2021-11-02 18:22:39 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 18:24:39 +0100 | chomwitt | (~chomwitt@2a02:587:dc02:9f00:12c3:7bff:fe6d:d374) |
2021-11-02 18:24:47 +0100 | kadir | (~kadir@95.7.9.203) |
2021-11-02 18:25:20 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
2021-11-02 18:27:06 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 18:27:58 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2021-11-02 18:30:38 +0100 | dsamperi | (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) |
2021-11-02 18:34:37 +0100 | <dsamperi> | #cplusplus |
2021-11-02 18:38:03 +0100 | <geekosaur> | not interested, sorry |
2021-11-02 18:38:06 +0100 | Inst | (~Inst@2601:6c4:4080:3f80:d8ab:2e91:63f7:db6e) |
2021-11-02 18:40:26 +0100 | tcard_ | (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) |
2021-11-02 18:40:41 +0100 | tcard | (~tcard@p2878075-ipngn18701hodogaya.kanagawa.ocn.ne.jp) (Remote host closed the connection) |
2021-11-02 18:43:02 +0100 | <dsamperi> | First time user. I see no activity. Normal? |
2021-11-02 18:43:06 +0100 | <Inst> | does anyone |
2021-11-02 18:43:09 +0100 | Midjak | (~Midjak@82-65-111-221.subs.proxad.net) (Ping timeout: 268 seconds) |
2021-11-02 18:43:15 +0100 | <Inst> | know anything about how the Reflex-FRP project is coming along? |
2021-11-02 18:43:37 +0100 | <geekosaur> | dsamperi, it's active at various times |
2021-11-02 18:43:45 +0100 | <geekosaur> | usually not continuous though |
2021-11-02 18:43:46 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Ping timeout: 268 seconds) |
2021-11-02 18:44:20 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) (Read error: Connection reset by peer) |
2021-11-02 18:44:26 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-11-02 18:44:44 +0100 | <geekosaur> | Inst, this may be a better question for the haskell-cafe mailing list or the haskell Discourse |
2021-11-02 18:44:51 +0100 | v01d4lph4 | (~v01d4lph4@user/v01d4lph4) (Remote host closed the connection) |
2021-11-02 18:45:06 +0100 | <Inst> | Discourse? |
2021-11-02 18:45:28 +0100 | <geekosaur> | discourse.haskell.org |
2021-11-02 18:45:31 +0100 | <Inst> | reflex-frp is a thing, but much smaller |
2021-11-02 18:45:49 +0100 | peterhil | (~peterhil@dsl-hkibng32-54fb56-2.dhcp.inet.fi) |
2021-11-02 18:46:16 +0100 | peterhil | (~peterhil@dsl-hkibng32-54fb56-2.dhcp.inet.fi) (Remote host closed the connection) |
2021-11-02 18:47:05 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat) |
2021-11-02 18:52:23 +0100 | Null_A_ | (~null_a@c-98-210-133-39.hsd1.ca.comcast.net) |
2021-11-02 18:54:50 +0100 | Null_A | (~null_a@2601:645:8700:2290:7887:7a6d:751e:a369) (Ping timeout: 260 seconds) |
2021-11-02 18:55:56 +0100 | kadir | (~kadir@95.7.9.203) () |
2021-11-02 18:56:59 +0100 | <dminuoso> | dsamperi: Usually activity is very spiky. There's phases without much activity, other times you find multiple concurrent lengthy involving discussions |
2021-11-02 18:57:46 +0100 | <dsamperi> | Thanks for the information |
2021-11-02 18:58:00 +0100 | neurocyte0132889 | (~neurocyte@IP-213157011136.dynamic.medianet-world.de) |
2021-11-02 18:58:00 +0100 | neurocyte0132889 | (~neurocyte@IP-213157011136.dynamic.medianet-world.de) (Changing host) |
2021-11-02 18:58:00 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) |
2021-11-02 18:58:11 +0100 | Partmedia | (~kevinz@172-221-159-029.res.spectrum.com) () |
2021-11-02 19:01:23 +0100 | Null_A | (~null_a@2601:645:8700:2290:91de:cb47:8eef:9a3e) |
2021-11-02 19:01:54 +0100 | Null_A_ | (~null_a@c-98-210-133-39.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2021-11-02 19:02:53 +0100 | vicfred | (~vicfred@user/vicfred) |
2021-11-02 19:03:17 +0100 | mbuf | (~Shakthi@171.61.170.115) (Quit: Leaving) |
2021-11-02 19:03:58 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) |
2021-11-02 19:04:02 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 19:04:25 +0100 | <geekosaur> | dsamperi, for what it's worth: https://ircbrowse.tomsmeding.com/lchaskell |
2021-11-02 19:04:58 +0100 | <geekosaur> | (oy, I'm one of the blabbiest in channel according to that) |
2021-11-02 19:06:51 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 19:07:04 +0100 | chele | (~chele@user/chele) (Remote host closed the connection) |
2021-11-02 19:07:37 +0100 | dminuoso | pokes tomsmeding |
2021-11-02 19:07:46 +0100 | <dminuoso> | Is that GDPR compliant? |
2021-11-02 19:08:21 +0100 | <dminuoso> | Im willing to bet that IRC handles publically linkable to my name can be considered personal identifiable information. |
2021-11-02 19:08:28 +0100 | <[exa]> | dminuoso: can you backtrace merijn's birth date by the profiles here? https://ircbrowse.tomsmeding.com/nick/merijn |
2021-11-02 19:09:03 +0100 | <[exa]> | wait you wrote your real name into IRC? |
2021-11-02 19:09:14 +0100 | <dminuoso> | No, but it takes no effort to figure out my real name. |
2021-11-02 19:09:38 +0100 | <geekosaur> | you can get mine relatively easily as well although you'll have to poke a little bit |
2021-11-02 19:10:46 +0100 | <[exa]> | GDPR core rule is "enables finding additional information about a somehow-identifiable individual" |
2021-11-02 19:11:10 +0100 | <[exa]> | but anyone can idle on IRC and log and analyze everything so I guess the "additional" doesn't really apply here |
2021-11-02 19:11:32 +0100 | <dminuoso> | Just because you can log, does not mean you have the right to do so. |
2021-11-02 19:11:36 +0100 | <boxscape__> | geekosaur you more or less have it set in the IRC "real name" field (not sure if that's proper terminology) |
2021-11-02 19:11:37 +0100 | <dminuoso> | That's the core of GDPR. |
2021-11-02 19:11:39 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 19:11:53 +0100 | boxscape__ | boxscape_ |
2021-11-02 19:11:59 +0100 | <geekosaur> | probably do, at that |
2021-11-02 19:12:14 +0100 | <dminuoso> | In fact, article one says |
2021-11-02 19:12:22 +0100 | <dminuoso> | "This Regulation lays down rules relating to the protection of natural persons with regard to the processing of personal data and rules relating to the free movement of personal data." |
2021-11-02 19:12:32 +0100 | <dminuoso> | I'd say processing what I say is about processing personal data as it can get. |
2021-11-02 19:12:41 +0100 | <geekosaur> | but even without that you can get it from other places, pretty sure it's one click to link "geekosaur" with (for example) my public FCC database entry that includes full name and address |
2021-11-02 19:13:06 +0100 | <dminuoso> | So yeah. Im beginning to suspect operating a website like https://ircbrowse.tomsmeding.com/lchaskell is not GDPR conform. |
2021-11-02 19:13:24 +0100 | yangby | (~secret@125.120.162.167) |
2021-11-02 19:13:31 +0100 | <[exa]> | dminuoso: I'll actually ask our GDPR law folks |
2021-11-02 19:13:50 +0100 | <shapr> | ooh |
2021-11-02 19:14:06 +0100 | <dminuoso> | [exa]: GDPR is so easily written, really if you read the definition of personal data: |
2021-11-02 19:14:08 +0100 | <dminuoso> | ‘personal data’ means any information relating to an identified or identifiable natural person (‘data subject’); an identifiable natural person is one who can be identified, directly or indirectly, in particular by reference to an identifier such as a name, an identification number, location data, an online identifier or to one or more factors specific to the physical, physiological, |
2021-11-02 19:14:10 +0100 | <dminuoso> | genetic, mental, economic, cultural or social identity of that natural person; |
2021-11-02 19:14:15 +0100 | <dminuoso> | This applies. |
2021-11-02 19:14:16 +0100 | darkstardevx | (~darkstard@2601:1c2:300:c8a0::6c32) (Ping timeout: 245 seconds) |
2021-11-02 19:14:54 +0100 | <dminuoso> | In fact, it even explicitly mentions information relating an idenifiable person, for which an online identifier is sufficient. |
2021-11-02 19:15:22 +0100 | v01d4lph4 | (~v01d4lph4@user/v01d4lph4) |
2021-11-02 19:15:25 +0100 | <[exa]> | dminuoso: well technically I remember yourself identifying here several times already, same did I |
2021-11-02 19:15:33 +0100 | <[exa]> | (let's jump to -offtopic? ) |
2021-11-02 19:15:38 +0100 | <dminuoso> | Sure |
2021-11-02 19:15:47 +0100 | <geekosaur> | sad. like anyone can get this trivially just from e.g. client backscroll |
2021-11-02 19:15:49 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 268 seconds) |
2021-11-02 19:16:16 +0100 | kadir | (~kadir@95.7.9.203) |
2021-11-02 19:17:03 +0100 | yangby | (~secret@125.120.162.167) (Client Quit) |
2021-11-02 19:22:31 +0100 | kadir | (~kadir@95.7.9.203) () |
2021-11-02 19:23:11 +0100 | v01d4lph4 | (~v01d4lph4@user/v01d4lph4) (Ping timeout: 264 seconds) |
2021-11-02 19:25:00 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2021-11-02 19:26:40 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 19:27:33 +0100 | chomwitt | (~chomwitt@2a02:587:dc02:9f00:12c3:7bff:fe6d:d374) (Ping timeout: 268 seconds) |
2021-11-02 19:27:35 +0100 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
2021-11-02 19:30:37 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) (Quit: The Lounge - https://thelounge.chat) |
2021-11-02 19:32:25 +0100 | __monty__ | (~toonn@user/toonn) |
2021-11-02 19:33:01 +0100 | chomwitt | (~chomwitt@2a02:587:dc02:9f00:12c3:7bff:fe6d:d374) |
2021-11-02 19:33:20 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) |
2021-11-02 19:35:12 +0100 | darkstardevx | (~darkstard@50.39.114.152) |
2021-11-02 19:35:27 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 19:36:06 +0100 | neurocyte0132889 | (~neurocyte@IP-213157011136.dynamic.medianet-world.de) |
2021-11-02 19:36:06 +0100 | neurocyte0132889 | (~neurocyte@IP-213157011136.dynamic.medianet-world.de) (Changing host) |
2021-11-02 19:36:06 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) |
2021-11-02 19:36:48 +0100 | mmhat | (~mmh@55d4b212.access.ecotel.net) (Ping timeout: 268 seconds) |
2021-11-02 19:37:32 +0100 | tremon | (~tremon@217-63-61-89.cable.dynamic.v4.ziggo.nl) |
2021-11-02 19:38:16 +0100 | mei | (~mei@user/mei) |
2021-11-02 19:38:25 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 19:38:45 +0100 | Null_A | (~null_a@2601:645:8700:2290:91de:cb47:8eef:9a3e) (Remote host closed the connection) |
2021-11-02 19:39:15 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 268 seconds) |
2021-11-02 19:39:39 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) |
2021-11-02 19:39:39 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection) |
2021-11-02 19:40:06 +0100 | jpds | (~jpds@gateway/tor-sasl/jpds) |
2021-11-02 19:43:19 +0100 | jstolarek | (~jstolarek@137.220.120.162) |
2021-11-02 19:43:23 +0100 | fvr | (uid503686@id-503686.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-02 19:46:00 +0100 | Null_A | (~null_a@2601:645:8700:2290:91de:cb47:8eef:9a3e) |
2021-11-02 19:46:18 +0100 | y04nn | (~y04nn@92.223.89.196) (Remote host closed the connection) |
2021-11-02 19:46:41 +0100 | zincy | (~tom@2a00:23c8:970c:4801:b46f:f559:1389:e031) |
2021-11-02 19:48:12 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) (Remote host closed the connection) |
2021-11-02 19:48:30 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) |
2021-11-02 19:49:06 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 19:49:49 +0100 | mmhat | (~mmh@55d4a263.access.ecotel.net) |
2021-11-02 19:52:08 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 19:52:30 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) (Read error: Connection reset by peer) |
2021-11-02 19:53:05 +0100 | <janus> | maerwald: when you say you can't reason about effects, is it because you have a fixed monad stack instead of accepting n^2 and having type class constraints all over the place? |
2021-11-02 19:53:42 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
2021-11-02 19:53:44 +0100 | <janus> | because it seems to me that if people use constraints everywhere instead of specifying the actual monad, then you _can_ reason about which effects are used where? |
2021-11-02 19:53:55 +0100 | <maerwald> | I use constraints |
2021-11-02 19:54:03 +0100 | <maerwald> | and it makes reasoning impossible |
2021-11-02 19:54:10 +0100 | fef | (~thedawn@user/thedawn) (Remote host closed the connection) |
2021-11-02 19:54:17 +0100 | <maerwald> | all it tells you is which functions may appear in the body (or not) |
2021-11-02 19:54:46 +0100 | <cigsender> | /3/3 |
2021-11-02 19:54:49 +0100 | <dsal> | The people defining standards on a project I'm working on are very opposed to "constraint-based DI" kinds of things. |
2021-11-02 19:55:20 +0100 | <maerwald> | I dislike thick monad types like `App` a lot, but I don't think mtl is better |
2021-11-02 19:55:52 +0100 | <dsal> | Everything should run in the `Handler` monad or whatever. Except for the things that I've defined in the `Transaction` monad which I guess doesn't get to log because all the logging functions are defined to only work in `Handler` which is how they get their logger function because doing that with a constraint is bad or something. |
2021-11-02 19:56:01 +0100 | <maerwald> | I'm not even sure a proper effects system would be better, it just shifts the problem away to where you defined your interpreters |
2021-11-02 19:56:10 +0100 | <maerwald> | now everything is so abstract, you don't know anything |
2021-11-02 19:56:27 +0100 | hseg | (~gesh@185.120.126.13) |
2021-11-02 19:56:29 +0100 | <dsal> | I've failed to try fancier effects systems a few times. |
2021-11-02 19:57:47 +0100 | pavonia | (~user@user/siracusa) |
2021-11-02 19:58:02 +0100 | <hseg> | working on adding an equivalent of `partition` to Witherable, just noticed that part :: f (Either a b) -> (f a, f b) only fuses a single pass, and in particular doesn't compose to partition arbitrarily many-way partitions in a single pass |
2021-11-02 19:58:03 +0100 | dsrt^ | (~dsrt@wsip-98-188-242-6.mc.at.cox.net) (Remote host closed the connection) |
2021-11-02 19:58:07 +0100 | <dsal> | The guy who doesn't like the constraint thing is having a hard time selling me on the concerns. It's something about how constraints can lie because if a function says it wants `:: Eq a => a -> Whatever` then it lies because I can use a `Double` and maybe something weird will happen. |
2021-11-02 19:58:23 +0100 | <hseg> | or have I missed something? |
2021-11-02 19:58:40 +0100 | <dsal> | Or more concretely, if I make a `HasLogger` it could do something wrong and suddenly we have bugs because the logger doesn't behave properly or whatever. |
2021-11-02 19:58:43 +0100 | <maerwald> | dsal: well, they lie because they don't tell you anything about the order of effects |
2021-11-02 19:59:03 +0100 | <geekosaur> | dsal, that kinda sounds like a complaint from 18ish hours ago that Maybe a is a lie because you could set a ~ Void |
2021-11-02 19:59:17 +0100 | <dsal> | maerwald: I've not heard that particular argument. |
2021-11-02 19:59:26 +0100 | <geekosaur> | I have |
2021-11-02 19:59:27 +0100 | <maerwald> | well, it's trivially true |
2021-11-02 19:59:44 +0100 | <dsal> | Sure, I'm just saying it's not come up. |
2021-11-02 19:59:53 +0100 | <maerwald> | on the other hand, it's also an advantage of some sorts |
2021-11-02 20:01:08 +0100 | <dsal> | Guy seems to really not like generic stuff in general. I was told not to use `fold` when `concat` will work because code could change in a way that compiles and doesn't work correctly. But also, testing is super important, so between writing lots of tests for behavior and not doing stupid things, I don't think the concerns are practical. |
2021-11-02 20:01:11 +0100 | <Boarders> | do any of you know how to configure hlint to ignore a hint within a folder (as opposed to module)? |
2021-11-02 20:01:41 +0100 | <maerwald> | dsal: well, that argument is true, especially for lens |
2021-11-02 20:01:42 +0100 | <geekosaur> | doesn't hlint have a config file? |
2021-11-02 20:01:46 +0100 | <awpr> | hseg: I've thought about a similar problem monomorphized to lists, and came up with: `[Sigma (Rep10 f) Identity] -> f []` where `f :: (k -> Type) -> Type`, `Rep10` is some GADT identifying typed fields of `f`, and `Sigma` is `data Sigma k m = forall a. Sigma (k a) (m a)` |
2021-11-02 20:02:41 +0100 | <hseg> | yeah, noted something similar on the Witherable issue tracker in offering directions to extend my patch https://github.com/fumieval/witherable/issues/45#issuecomment-958062035 |
2021-11-02 20:03:05 +0100 | <maerwald> | dsal: lens has caused a serious production bug for me that way, because documentation doesn't propagate and behavior isn't described everywhere. |
2021-11-02 20:03:19 +0100 | <dsal> | maerwald: It's not entirely false, but it conflicts with the testing concerns, IMO. |
2021-11-02 20:03:24 +0100 | <Boarders> | geekosaur: I am asking what I put in the config file |
2021-11-02 20:03:33 +0100 | <Boarders> | to exclude a folder |
2021-11-02 20:03:37 +0100 | <Boarders> | so yes, it does have a config file |
2021-11-02 20:04:31 +0100 | <awpr> | see also Data.Functor.Naperian, which kind of generalizes unzip the same way this generalizes partitionEithers |
2021-11-02 20:04:37 +0100 | <maerwald> | on the other hand, I use fmap a lot |
2021-11-02 20:05:00 +0100 | <maerwald> | coworkers would easily see which code was written by me by the amount of fmaps |
2021-11-02 20:05:21 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 20:05:32 +0100 | <maerwald> | nested fmaps, (fmap . fmap), fmap over <$>... fmap all the way |
2021-11-02 20:05:53 +0100 | <hseg> | awpr: https://hackage.haskell.org/package/naperian-0.1.0.0/docs/Data-Naperian.html ? |
2021-11-02 20:06:24 +0100 | max22- | (~maxime@2a01cb08833598003c892bb6cec267c2.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds) |
2021-11-02 20:06:34 +0100 | <awpr> | ah yeah, that one |
2021-11-02 20:07:05 +0100 | <awpr> | https://hackage.haskell.org/package/ten-0.1.0.2/docs/Data-Ten-Representable.html is where Representable10 came from, by the way |
2021-11-02 20:07:06 +0100 | <hseg> | awpr: note it is the type a ^ r, not pi_{i in r} a(i) |
2021-11-02 20:08:10 +0100 | <hseg> | in particular, writing dependently, want some dist :: f (sum_{i in r} a(i)) -> pi_{i in r} f (a(i)) |
2021-11-02 20:09:51 +0100 | <awpr> | yeah, that's roughly what I wrote before but with `f ~ []` and using isomorphism of `(forall a. Rep10 f a -> m a) ~= f m` |
2021-11-02 20:10:07 +0100 | <awpr> | just saying Naperian is the Product->Product analog of this |
2021-11-02 20:10:11 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 20:10:25 +0100 | <hseg> | K |
2021-11-02 20:10:58 +0100 | <awpr> | the motivation being: there's precedent for doing that sort of generalization |
2021-11-02 20:13:45 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) (Read error: Connection reset by peer) |
2021-11-02 20:14:27 +0100 | neurocyte0132889 | (~neurocyte@IP-213157011136.dynamic.medianet-world.de) |
2021-11-02 20:14:27 +0100 | neurocyte0132889 | (~neurocyte@IP-213157011136.dynamic.medianet-world.de) (Changing host) |
2021-11-02 20:14:27 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) |
2021-11-02 20:14:54 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2021-11-02 20:17:21 +0100 | mrckndt9 | (~mrckndt@user/mrckndt) |
2021-11-02 20:19:03 +0100 | desantra | (~skykanin@user/skykanin) |
2021-11-02 20:19:35 +0100 | mrckndt | (~mrckndt@user/mrckndt) (Ping timeout: 264 seconds) |
2021-11-02 20:19:35 +0100 | mrckndt9 | mrckndt |
2021-11-02 20:19:43 +0100 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Remote host closed the connection) |
2021-11-02 20:21:21 +0100 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
2021-11-02 20:21:26 +0100 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) (Remote host closed the connection) |
2021-11-02 20:24:26 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-11-02 20:26:13 +0100 | desantra | (~skykanin@user/skykanin) (Quit: WeeChat 3.3) |
2021-11-02 20:27:05 +0100 | nehsou^ | (~nehsou@wsip-98-188-242-6.mc.at.cox.net) |
2021-11-02 20:27:23 +0100 | MQ-17J | (~MQ-17J@d192-24-122-179.try.wideopenwest.com) |
2021-11-02 20:28:26 +0100 | lemonsnicks | (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-11-02 20:28:45 +0100 | lemonsnicks | (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) |
2021-11-02 20:29:49 +0100 | mei | (~mei@user/mei) (Ping timeout: 268 seconds) |
2021-11-02 20:33:52 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) |
2021-11-02 20:34:36 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 20:35:44 +0100 | Hanicef | (~gustaf@81-229-9-108-no92.tbcn.telia.com) |
2021-11-02 20:37:13 +0100 | <energizer> | is there a name for functions that are like "fold then map", such as subtracting the mean of xs from each x in xs ? |
2021-11-02 20:37:42 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 20:39:04 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) (Ping timeout: 268 seconds) |
2021-11-02 20:40:25 +0100 | <shapr> | energizer: do you mean like catamorphism? or perhaps map reduce? https://en.wikipedia.org/wiki/MapReduce |
2021-11-02 20:40:56 +0100 | <boxscape_> | that's the opposite, right? Map reduce means you map first, then fold |
2021-11-02 20:41:02 +0100 | <energizer> | ^ |
2021-11-02 20:41:38 +0100 | <shapr> | oh good point |
2021-11-02 20:41:51 +0100 | <tomsmeding> | the fact that that requires two traversals of the list makes it, intuitively to me, less of a "standard primitive" |
2021-11-02 20:41:57 +0100 | <tomsmeding> | so less likely to have a particular name |
2021-11-02 20:44:37 +0100 | mc47 | (~mc47@xmonad/TheMC47) (Ping timeout: 268 seconds) |
2021-11-02 20:47:21 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-11-02 20:47:52 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) |
2021-11-02 20:47:54 +0100 | max22- | (~maxime@2a01cb08833598001e044e1e5445c714.ipv6.abo.wanadoo.fr) |
2021-11-02 20:49:38 +0100 | <[exa]> | energizer: you might wrap Reader a bit to do that |
2021-11-02 20:50:12 +0100 | <[exa]> | > ( foldl (+) 0 >>= flip fmap length . div >>= map . flip (-) ) [0,1,2,3,4] |
2021-11-02 20:50:14 +0100 | <lambdabot> | [-2,-1,0,1,2] |
2021-11-02 20:50:23 +0100 | son0p- | (~ff@181.136.122.143) |
2021-11-02 20:50:53 +0100 | <boxscape_> | kind of seems like you should be able to get away with one traversal with some laziness/mutation stuff |
2021-11-02 20:52:22 +0100 | <tomsmeding> | you aren't going to be able to stream the list :p |
2021-11-02 20:52:26 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Ping timeout: 260 seconds) |
2021-11-02 20:52:33 +0100 | <tomsmeding> | that counts as >1 traversal to my operational ears |
2021-11-02 20:52:50 +0100 | <boxscape_> | hmm |
2021-11-02 20:54:02 +0100 | <tomsmeding> | (and streaming the list but remembering all elements doesn't count :p ) |
2021-11-02 20:54:12 +0100 | <boxscape_> | makes sense |
2021-11-02 20:54:51 +0100 | <boxscape_> | I'm just imagine something where you add subtract mean as a thunk from each value while traversing, but at the same time mutate the thunk to add the values you are traversing (so you're not storing all values, only the sum) |
2021-11-02 20:55:02 +0100 | <boxscape_> | s/add// |
2021-11-02 20:55:22 +0100 | <tomsmeding> | isn't that precisely the case I said didn't count |
2021-11-02 20:55:28 +0100 | <tomsmeding> | except you're now storing it in a chain of thunks |
2021-11-02 20:55:49 +0100 | <boxscape_> | hmm I suppose |
2021-11-02 20:58:48 +0100 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.3) |
2021-11-02 20:59:20 +0100 | neurocyte0132889 | (~neurocyte@IP-213157011136.dynamic.medianet-world.de) |
2021-11-02 20:59:20 +0100 | neurocyte0132889 | (~neurocyte@IP-213157011136.dynamic.medianet-world.de) (Changing host) |
2021-11-02 20:59:20 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) |
2021-11-02 21:01:35 +0100 | chomwitt | (~chomwitt@2a02:587:dc02:9f00:12c3:7bff:fe6d:d374) (Ping timeout: 264 seconds) |
2021-11-02 21:01:54 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 21:02:37 +0100 | <boxscape_> | can you load a .hs file with cabal repl? |
2021-11-02 21:02:53 +0100 | <boxscape_> | when I try it it doesn't seem to import the names |
2021-11-02 21:03:26 +0100 | <monochrom> | Perhaps get cabal repl started normally first, then use :load |
2021-11-02 21:03:48 +0100 | <boxscape_> | right, that's what I did - if I try to pass it as argument, it fails before that, saying it doesn't take arguments |
2021-11-02 21:04:01 +0100 | <geekosaur> | ^ my guess is it loads the compiled form which will only get exported symbols |
2021-11-02 21:04:11 +0100 | <monochrom> | If you have multiple components, you may have to say explicity "cabal repl <the component you mean>" |
2021-11-02 21:04:28 +0100 | <geekosaur> | but :load should work since cabal repl can't reach inside ghci and change how :load works |
2021-11-02 21:04:28 +0100 | <tomsmeding> | boxscape_: works if you give the thing a module name |
2021-11-02 21:04:31 +0100 | <tomsmeding> | iirc |
2021-11-02 21:04:38 +0100 | <boxscape_> | yes you guys are right, module name works |
2021-11-02 21:04:39 +0100 | <tomsmeding> | it's completely weird |
2021-11-02 21:04:40 +0100 | <geekosaur> | mm, might need to force source |
2021-11-02 21:04:51 +0100 | <geekosaur> | :load *moduleName |
2021-11-02 21:05:08 +0100 | <geekosaur> | (the * forces source instead of precompiled) |
2021-11-02 21:05:08 +0100 | <tomsmeding> | yeah but if you don't give the file a module header, there is no module name that works there |
2021-11-02 21:05:10 +0100 | <tomsmeding> | not even Main |
2021-11-02 21:05:32 +0100 | <boxscape_> | yeah it's strange that Main doesn't work |
2021-11-02 21:05:36 +0100 | juhp | (~juhp@128.106.188.220) (Ping timeout: 268 seconds) |
2021-11-02 21:05:37 +0100 | <geekosaur> | should be the file name in that case |
2021-11-02 21:05:50 +0100 | <geekosaur> | *foo.hs |
2021-11-02 21:05:52 +0100 | <monochrom> | The thing is I have been doing this my whole life with 100% success rate and no special treatment. |
2021-11-02 21:06:23 +0100 | <boxscape_> | geekosaur the asterisk doesn't seem to change things if I don't add a module name |
2021-11-02 21:06:47 +0100 | <tomsmeding> | I have a file A.hs containing 'foo = 42'. I have opened a repl with 'cabal repl' outside of a project. How do I load that file so that 'foo' is visible? |
2021-11-02 21:06:47 +0100 | juhp | (~juhp@128.106.188.220) |
2021-11-02 21:06:50 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 21:07:03 +0100 | <tomsmeding> | in my experience you can't, until you write 'module Something where' above that file |
2021-11-02 21:13:12 +0100 | Cajun | (~Cajun@user/cajun) (Quit: Client closed) |
2021-11-02 21:15:29 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 21:16:04 +0100 | jstolarek | (~jstolarek@137.220.120.162) (Ping timeout: 268 seconds) |
2021-11-02 21:16:42 +0100 | alx741 | (~alx741@181.196.69.253) (Ping timeout: 268 seconds) |
2021-11-02 21:16:50 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) |
2021-11-02 21:18:11 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2021-11-02 21:18:27 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 21:20:02 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:8d15:54ac:ed5f:296c) |
2021-11-02 21:21:45 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) |
2021-11-02 21:25:14 +0100 | jess | (~jess@libera/staff/jess) |
2021-11-02 21:26:06 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Ping timeout: 260 seconds) |
2021-11-02 21:29:12 +0100 | alx741 | (~alx741@186.178.109.189) |
2021-11-02 21:30:24 +0100 | gg | (~gg@2a01:e0a:819:1510:9c2f:617b:a3fa:cf0d) |
2021-11-02 21:31:09 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 21:31:13 +0100 | hololeap_ | (~hololeap@user/hololeap) |
2021-11-02 21:32:27 +0100 | hololeap | (~hololeap@user/hololeap) (Ping timeout: 276 seconds) |
2021-11-02 21:34:09 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:8d15:54ac:ed5f:296c) (Remote host closed the connection) |
2021-11-02 21:34:41 +0100 | max22- | (~maxime@2a01cb08833598001e044e1e5445c714.ipv6.abo.wanadoo.fr) (Remote host closed the connection) |
2021-11-02 21:35:16 +0100 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
2021-11-02 21:35:19 +0100 | <boxscape_> | tomsmeding does subtractMean' count as one traversal? I think I'm only storing the sum here, not the individual values https://paste.tomsmeding.com/I0ipKExN |
2021-11-02 21:35:49 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 21:35:55 +0100 | <boxscape_> | (also, FWIW: quickCheck \xs -> subtractMean xs == subtractMean' xs; +++ OK, passed 100 tests.) |
2021-11-02 21:38:33 +0100 | <tomsmeding> | boxscape_: I'm lazy, what's the type of that large do block in subtractMean' |
2021-11-02 21:39:43 +0100 | <tomsmeding> | okay not so lazy, ST s [ST s a] |
2021-11-02 21:39:45 +0100 | ss4 | (~wootehfoo@user/wootehfoot) |
2021-11-02 21:39:53 +0100 | <tomsmeding> | thank you for writing dependencyless code |
2021-11-02 21:40:06 +0100 | <boxscape_> | I think almost, go :: (Num a, Num b) => STRef s b -> [b] -> ST s (a, [ST s b]) |
2021-11-02 21:40:39 +0100 | <tomsmeding> | you're constructing a list of stuff the size of the original list, then traversing that again? |
2021-11-02 21:40:42 +0100 | <tomsmeding> | that's two traversals :p |
2021-11-02 21:40:54 +0100 | Null_A | (~null_a@2601:645:8700:2290:91de:cb47:8eef:9a3e) (Remote host closed the connection) |
2021-11-02 21:41:01 +0100 | <boxscape_> | oh lol right at the beginning |
2021-11-02 21:41:18 +0100 | <tomsmeding> | if that's allowed, I can traverse 'list' and build 'map id list' meanwhile, then traverse that second list afterwards and have it count as one traversal |
2021-11-02 21:41:32 +0100 | <boxscape_> | right, okay |
2021-11-02 21:41:32 +0100 | Null_A | (~null_a@2601:645:8700:2290:91de:cb47:8eef:9a3e) |
2021-11-02 21:41:55 +0100 | <tomsmeding> | my concept of "number of traversals" is based on "how many parallel loops can you write this in" |
2021-11-02 21:42:11 +0100 | <tomsmeding> | and here the answer is two |
2021-11-02 21:42:26 +0100 | <boxscape_> | I'm not quite sure what that meanss |
2021-11-02 21:42:26 +0100 | <tomsmeding> | (okay a scan also counts as such a loop in this case) |
2021-11-02 21:42:54 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds) |
2021-11-02 21:43:24 +0100 | <tomsmeding> | boxscape_: I like the sneaky :) at the end of line 23 |
2021-11-02 21:43:31 +0100 | <boxscape_> | :) |
2021-11-02 21:43:36 +0100 | <tomsmeding> | @botsnack |
2021-11-02 21:43:36 +0100 | <lambdabot> | :) |
2021-11-02 21:45:24 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) (Read error: Connection reset by peer) |
2021-11-02 21:46:31 +0100 | n8chan | (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 21:48:06 +0100 | <tomsmeding> | boxscape_: wait this particular problem can easily be written using one traversal because your formula is linear |
2021-11-02 21:48:18 +0100 | <Hecate> | woop woop, just released my babyyyy https://hackage.haskell.org/package/text-display-0.0.1.0 |
2021-11-02 21:48:33 +0100 | <boxscape_> | Hecate 🎉 |
2021-11-02 21:48:45 +0100 | neightchan | (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
2021-11-02 21:49:07 +0100 | <boxscape_> | I saw that a couple of days ago, looked interesting |
2021-11-02 21:49:15 +0100 | <tomsmeding> | oh ignore what I just said |
2021-11-02 21:49:20 +0100 | <boxscape_> | ok |
2021-11-02 21:49:31 +0100 | <Hecate> | boxscape_: :D |
2021-11-02 21:49:33 +0100 | <Hecate> | thank you |
2021-11-02 21:49:47 +0100 | <Hecate> | just waiting for tomsmeding's seal of approval |
2021-11-02 21:49:59 +0100 | tomsmeding | reads |
2021-11-02 21:50:07 +0100 | <boxscape_> | tomsmeding so if I'm understanding correctly, the "second traversal" in my solution was the fmap, is that right? |
2021-11-02 21:50:16 +0100 | <tomsmeding> | the sequence, I think |
2021-11-02 21:50:17 +0100 | <boxscape_> | i.e. fmap sequence |
2021-11-02 21:50:21 +0100 | <boxscape_> | ah right sorry |
2021-11-02 21:50:25 +0100 | <tomsmeding> | but yeah |
2021-11-02 21:50:40 +0100 | <boxscape_> | https://paste.tomsmeding.com/okd4PHqT it's gone |
2021-11-02 21:51:06 +0100 | <cigsender> | Hecate: right at the bottom of the docs, "You should not try to display ByteStrings!", you've put decudeUtf8 instead of decodeUtf8 |
2021-11-02 21:51:10 +0100 | <cigsender> | <3 |
2021-11-02 21:51:11 +0100 | <boxscape_> | still passes the tests, somewhat to my surprise |
2021-11-02 21:51:50 +0100 | <tomsmeding> | Hecate: looks neat! I think I've written a Pretty class like 10 times by now |
2021-11-02 21:52:12 +0100 | <cigsender> | same thing, decudeUtf8With :p |
2021-11-02 21:52:42 +0100 | <tomsmeding> | also in the docs for the instance :p |
2021-11-02 21:54:12 +0100 | <tomsmeding> | Hecate: I think it's good that you didn't go overboard with the predefined instances |
2021-11-02 21:54:27 +0100 | dsamperi | (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) (Quit: Konversation terminated!) |
2021-11-02 21:54:39 +0100 | <tomsmeding> | the point of classes like this, I think, is to be able to do some partial domain-specific debugging formatting |
2021-11-02 21:54:41 +0100 | dsamperi | (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) |
2021-11-02 21:55:38 +0100 | dsamperi | (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) (Client Quit) |
2021-11-02 21:56:29 +0100 | dsamperi | (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) |
2021-11-02 21:57:42 +0100 | <boxscape_> | tomsmeding I'm not missing something else, right? The updated version counts as one (hacky) traversal? |
2021-11-02 21:58:03 +0100 | <tomsmeding> | I'm reading, trying to figure out what the hell is happening with the nested unsafePerformIOs :p |
2021-11-02 21:58:15 +0100 | <boxscape_> | fair :) |
2021-11-02 21:58:16 +0100 | <tomsmeding> | why are you even unsafePerformIO'ing _inside_ an IO context |
2021-11-02 21:58:20 +0100 | <tomsmeding> | is that essential? |
2021-11-02 21:58:35 +0100 | <boxscape_> | urm my idea was that it should only unsafePerformIO after the mean is compute |
2021-11-02 21:58:36 +0100 | <boxscape_> | d |
2021-11-02 21:58:48 +0100 | <tomsmeding> | if so then before understanding what's happening, I claim linked list of thunks |
2021-11-02 21:58:52 +0100 | <tomsmeding> | if not then no idea |
2021-11-02 21:59:06 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 21:59:15 +0100 | <boxscape_> | hm I guess I'll have to figure out if it's essential |
2021-11-02 21:59:18 +0100 | <awpr> | this sounds like something that's impossible to do under a useful definition of "single-pass" |
2021-11-02 21:59:24 +0100 | <tomsmeding> | yeah |
2021-11-02 21:59:29 +0100 | <boxscape_> | :( |
2021-11-02 21:59:38 +0100 | <tomsmeding> | boxscape_ is trying very hard though |
2021-11-02 21:59:47 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2021-11-02 21:59:53 +0100 | <tomsmeding> | it's a nice puzzle to even figure out what's going on |
2021-11-02 21:59:53 +0100 | <awpr> | this impl might succeed in hiding the second pass in the form of thunks |
2021-11-02 22:00:07 +0100 | <tomsmeding> | yes :p |
2021-11-02 22:00:30 +0100 | <tomsmeding> | right yes |
2021-11-02 22:00:47 +0100 | <tomsmeding> | the output list has a thunk in each position, and each of those thunks calls unsafePerformIO |
2021-11-02 22:00:50 +0100 | <boxscape_> | if you have a list of thunks that consist of `1 + 1`, would you say that list effectively requires another traversal before it's evaluated? |
2021-11-02 22:01:13 +0100 | <awpr> | but you have to look all the way to the end of the list to finish computing the mean before you can produce the first element, so I don't think it'd be meaningfully better than making two normal passes |
2021-11-02 22:01:18 +0100 | <tomsmeding> | so after you've traversed the whole input list, you update the IORef with the final mean, and then when you force the list in the end, you evaluate each of the thunks |
2021-11-02 22:01:35 +0100 | <tomsmeding> | boxscape_: no, because in strict evaluation that's one traversal |
2021-11-02 22:01:51 +0100 | <boxscape_> | I see, whereas if I make my list strict, the result it different |
2021-11-02 22:01:55 +0100 | <tomsmeding> | you can choose evaluation style, but in some chosen sensible evaluation order it needs to be one traversal :p |
2021-11-02 22:02:08 +0100 | <awpr> | well this impl effectively copies the input list into thunks, so in terms of being able to stream the output in constant space, it's not any better |
2021-11-02 22:02:09 +0100 | <boxscape_> | (I think, anyway) |
2021-11-02 22:02:17 +0100 | <tomsmeding> | yeah |
2021-11-02 22:02:20 +0100 | <awpr> | it does avoid retaining the original input list, but it retains something equivalent to it |
2021-11-02 22:02:22 +0100 | burnsidesLlama | (~burnsides@dhcp168-013.wadham.ox.ac.uk) |
2021-11-02 22:02:22 +0100 | <tomsmeding> | then you'd be subtracting the partial means |
2021-11-02 22:02:29 +0100 | <tomsmeding> | what awpr says |
2021-11-02 22:02:32 +0100 | <boxscape_> | okay |
2021-11-02 22:03:09 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2021-11-02 22:03:46 +0100 | <boxscape_> | (I accept defeat) |
2021-11-02 22:03:51 +0100 | stefan-_ | (~cri@42dots.de) (Ping timeout: 245 seconds) |
2021-11-02 22:03:58 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) |
2021-11-02 22:04:37 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 22:04:44 +0100 | <tomsmeding> | you _can_, however, compute the variance of a list (sum_i (x_i - mean(x))^2) in a single traversal |
2021-11-02 22:04:45 +0100 | acidjnk | (~acidjnk@p200300d0c74411677812fb9732750684.dip0.t-ipconnect.de) |
2021-11-02 22:04:58 +0100 | <boxscape_> | interesting |
2021-11-02 22:05:24 +0100 | <tomsmeding> | but you need to do a little high-school algebra to get there, and no array fusion algorithm is going to produce that given the obvious two-pass algorithm :p |
2021-11-02 22:06:03 +0100 | <tomsmeding> | (The 2 in the exponent is non-essential, works with at the very least every _fixed_ nonnegative integer power) |
2021-11-02 22:06:23 +0100 | <tomsmeding> | (hm perhaps that's too much of a hint) |
2021-11-02 22:06:42 +0100 | <boxscape_> | I'm not about to do this anyway, I need to eat :) |
2021-11-02 22:07:34 +0100 | acidjnk_new | (~acidjnk@p200300d0c72670437812fb9732750684.dip0.t-ipconnect.de) |
2021-11-02 22:07:48 +0100 | unmanbearpig | (~unmanbear@45.76.95.141) (Ping timeout: 260 seconds) |
2021-11-02 22:08:05 +0100 | stefan-_ | (~cri@42dots.de) |
2021-11-02 22:08:59 +0100 | <tomsmeding> | it's not too interesting: sum_i (x_i - mu)^2 = sum_i x_i^2 - 2 mu sum_i x_i + n mu^2 |
2021-11-02 22:09:03 +0100 | Tuplanolla | (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) |
2021-11-02 22:09:41 +0100 | <tomsmeding> | so collecting the sum of squares, sum of values, and length (sounds like a pattern...), allows you to compute the final result in O(1) |
2021-11-02 22:09:53 +0100 | <boxscape_> | hm I see |
2021-11-02 22:09:59 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
2021-11-02 22:10:27 +0100 | <tomsmeding> | of course you collect (sum_i x_i^0, ..., sum_i x_i^k) if the power was not 2 but k |
2021-11-02 22:10:29 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 22:10:57 +0100 | acidjnk | (~acidjnk@p200300d0c74411677812fb9732750684.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
2021-11-02 22:12:34 +0100 | <tomsmeding> | for k=2 the end result is -s_1^2 / s_0 + s_2; I wonder if that gives a pattern as well, probably it does |
2021-11-02 22:15:09 +0100 | mc47 | (~mc47@xmonad/TheMC47) |
2021-11-02 22:15:09 +0100 | <maerwald> | cabal repl can't reload .hsc file changes it seems |
2021-11-02 22:15:31 +0100 | unmanbearpig | (~unmanbear@user/unmanbearpig) |
2021-11-02 22:20:34 +0100 | mc47 | (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
2021-11-02 22:20:46 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 22:21:07 +0100 | ss4 | (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
2021-11-02 22:21:14 +0100 | <monochrom> | My tie-knot solution: https://paste.tomsmeding.com/bbCS30Yd |
2021-11-02 22:22:32 +0100 | <geekosaur> | maerwald, ghci is not smart enough to run hsc2hs |
2021-11-02 22:22:41 +0100 | <tomsmeding> | monochrom: yes :) |
2021-11-02 22:23:04 +0100 | <tomsmeding> | monochrom: question 2 https://www.cs.uu.nl/docs/vakken/fp/2021/exercises/lazy.html |
2021-11-02 22:23:52 +0100 | <monochrom> | OMG that is a tough question. |
2021-11-02 22:24:45 +0100 | <monochrom> | Ugh "Implement the Sieve of Eratosthenes for computing prime numbers" |
2021-11-02 22:25:23 +0100 | epolanski | (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-02 22:26:24 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 22:28:06 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-02 22:28:14 +0100 | <tomsmeding> | yeah that's a bad question, implementing that with the right complexity in haskell is a pain. They aren't asking for the right complexity |
2021-11-02 22:29:13 +0100 | <[exa]> | where's my fav diophantine equation for prime number testing? |
2021-11-02 22:29:54 +0100 | <monochrom> | Beyond a certain point, I forsake laziness and use non-strictness instead, i.e., I forsake operational semantics and use denotational semantics. |
2021-11-02 22:31:12 +0100 | <tomsmeding> | monochrom: that tja thing is applying the same trick as your code: the left pair element can be computed first because it's not dependent on the second |
2021-11-02 22:31:27 +0100 | <tomsmeding> | so it does two traversals, to circle back to the topic we started with :p |
2021-11-02 22:33:35 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 22:38:11 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 264 seconds) |
2021-11-02 22:38:37 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-02 22:40:33 +0100 | jtomas | (~jtomas@95.red-88-11-64.dynamicip.rima-tde.net) (Ping timeout: 268 seconds) |
2021-11-02 22:43:09 +0100 | kupi | (uid212005@id-212005.hampstead.irccloud.com) |
2021-11-02 22:43:57 +0100 | cosimone | (~user@93-47-228-48.ip115.fastwebnet.it) (Quit: ERC (IRC client for Emacs 27.1)) |
2021-11-02 22:44:40 +0100 | Hanicef | (~gustaf@81-229-9-108-no92.tbcn.telia.com) (Quit: leaving) |
2021-11-02 22:46:43 +0100 | johnny_sitar | (~artur@078088015209.bialystok.vectranet.pl) (Ping timeout: 268 seconds) |
2021-11-02 22:49:46 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2021-11-02 22:51:45 +0100 | michalz | (~michalz@185.246.204.104) (Remote host closed the connection) |
2021-11-02 22:55:00 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 22:55:21 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-02 22:57:08 +0100 | kjak | (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Ping timeout: 246 seconds) |
2021-11-02 23:00:38 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
2021-11-02 23:01:20 +0100 | trillp | (~trillp@69.233.98.238) |
2021-11-02 23:01:21 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) |
2021-11-02 23:01:24 +0100 | hseg | (~gesh@185.120.126.13) (Quit: WeeChat 3.3) |
2021-11-02 23:01:44 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2021-11-02 23:02:38 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 260 seconds) |
2021-11-02 23:03:40 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 23:04:50 +0100 | fendor_ | (~fendor@178.165.199.1.wireless.dyn.drei.com) (Remote host closed the connection) |
2021-11-02 23:08:18 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds) |
2021-11-02 23:09:26 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-02 23:10:48 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-02 23:11:38 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 23:14:47 +0100 | dsamperi | (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) (Ping timeout: 264 seconds) |
2021-11-02 23:15:51 +0100 | <dsal> | Heh, it's nice having people I can argue with about everything every day. Currently: if you write code in the form of `:: MonadIO m => a -> m ()` you've most likely made your code incorrect because someone can send in an `m` that doesn't do `MonadIO` correctly. |
2021-11-02 23:16:07 +0100 | <dsal> | I mean, it's *true*, but also like, inside your own codebase, moving `liftIO` to all the callers doesn't really fix anything. |
2021-11-02 23:16:42 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-11-02 23:16:58 +0100 | <Rembane_> | dsal: That sounds fun! :D |
2021-11-02 23:17:01 +0100 | <monochrom> | I would slippery-slope that all the way to foldr and map. |
2021-11-02 23:17:04 +0100 | <[exa]> | dsal: in an ideal world, that person will be guilty of breaking monad instance laws, and expunged to python lands |
2021-11-02 23:17:18 +0100 | <Rembane_> | [exa]: No! Not the snake pit! :O :O :O |
2021-11-02 23:17:50 +0100 | <[exa]> | that is the way |
2021-11-02 23:18:19 +0100 | <monochrom> | "If I wrote map :: (a -> b) -> [a] -> [b], it would be likely incorrect because someone can send in a buggy f::a->b" |
2021-11-02 23:18:39 +0100 | <[exa]> | oR a BuGgy lIsT |
2021-11-02 23:18:42 +0100 | <dsal> | monochrom: There's already a lot of that sort of thing. I like the idea of making it so that people can't do bad things, but also, just because someone *can* do a bad thing doesn't mean we should make everything harder. |
2021-11-02 23:19:26 +0100 | <Rembane_> | Best def: map _ _ = [] |
2021-11-02 23:19:52 +0100 | <monochrom> | I like Rembane_'s solution. :) |
2021-11-02 23:19:55 +0100 | <dsal> | [exa]: examples include things like `liftIO action = Don't $ error "didn't do it"` and `liftIO action = Stupid $ action >> action` or even just doing extra stuff. |
2021-11-02 23:19:57 +0100 | <monochrom> | I mean >:) |
2021-11-02 23:20:38 +0100 | <dsal> | Rembane_: We've secretly replaced your `map` with a different implementation that satisfies the compiler. Let's see if anyone notices. |
2021-11-02 23:20:51 +0100 | <monochrom> | Really, nihilism is the unique solution to both parametricity and resilience against human mistakes. |
2021-11-02 23:22:18 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-02 23:22:30 +0100 | <boxscape_> | hm so this was just tweeted https://twitter.com/kerckhove_ts/status/1455657935019941892 |
2021-11-02 23:22:33 +0100 | <[exa]> | dsal: to the snake pit I said! :D |
2021-11-02 23:22:49 +0100 | <boxscape_> | (re: MonadIO) |
2021-11-02 23:22:53 +0100 | <dsal> | boxscape_: Heh. Person I'm arguing with... |
2021-11-02 23:22:56 +0100 | <boxscape_> | I see |
2021-11-02 23:22:58 +0100 | <Rembane_> | monochrom, dsal: Muaha! One of the best pranks was that a friend of mine changed the definition of addition, like this in ghci: (+) = (-) and then cleared the screen and watched the mayhem ensue. |
2021-11-02 23:23:08 +0100 | <boxscape_> | I thought that was likely too much of a coincidence to be a coincidence |
2021-11-02 23:23:31 +0100 | iqubic | (~user@2601:602:9502:c70:458b:ca39:de67:50b0) (ERC 5.3 (IRC client for GNU Emacs 29.0.50)) |
2021-11-02 23:24:56 +0100 | <[exa]> | dsal: anyway, the concerns of "someone could break it" are generally invalid, some assumption drift (easily generated by a thinking being) can break literally any code |
2021-11-02 23:25:05 +0100 | <dsal> | Yeah. That's kind of where I am. |
2021-11-02 23:25:29 +0100 | <dsal> | In this case, moving `liftIO` to all the callers doesn't seem clear to me. Or as I said in conversation, I've rarely seen a situation where writing more code in general leads to fewer bugs. |
2021-11-02 23:25:34 +0100 | <[exa]> | there's even some kind of rigorous proof for that, somewhere in the neighborhood of halting & rice theorems |
2021-11-02 23:25:45 +0100 | <dsal> | halters gonna halt |
2021-11-02 23:25:51 +0100 | <monochrom> | Is someone going to troll kerckhove with a Show instance that goes "show x = ackermann 100 100 `seq` <the actual code>"? |
2021-11-02 23:25:53 +0100 | <Rembane_> | dsal: I need that on a t-shirt |
2021-11-02 23:26:05 +0100 | <Rembane_> | But isn't this why we write tests? |
2021-11-02 23:26:13 +0100 | <[exa]> | takeaway: we still rely a lot of non-code communication while sharing the code |
2021-11-02 23:26:24 +0100 | <dsal> | This dude is big on tests. I'm still staring at that `Late` instance and failing to see the problem. |
2021-11-02 23:26:31 +0100 | <boxscape_> | Rembane_ but what if the evil MonadIO instance has code to figure out whether it's being run in a test or not |
2021-11-02 23:27:17 +0100 | <dsal> | monochrom: He pretty much dislikes all class constraints, so that's not going to change a mind. |
2021-11-02 23:27:35 +0100 | <monochrom> | OK, then perhaps my map and foldr. |
2021-11-02 23:27:42 +0100 | <Rembane_> | boxscape_: Now that's fun! Doesn't that sound an awful lot like Volkswagen's cars? |
2021-11-02 23:27:44 +0100 | <monochrom> | err, my map and foldr point. |
2021-11-02 23:27:50 +0100 | <boxscape_> | hah yeah |
2021-11-02 23:27:59 +0100 | <boxscape_> | they shouldn't allow car manufacturers to use type classes |
2021-11-02 23:28:06 +0100 | <monochrom> | Every criticism against class constraints can be translated to higher-order functions. |
2021-11-02 23:28:14 +0100 | <[exa]> | "does this volkswagen halt?" |
2021-11-02 23:28:33 +0100 | <monochrom> | Right? By the dictionary translation. |
2021-11-02 23:28:45 +0100 | <boxscape_> | monochrom that sounds right to me |
2021-11-02 23:29:00 +0100 | <boxscape_> | well |
2021-11-02 23:29:03 +0100 | <awpr> | the criticisms become /stronger/ when translated to HOFs |
2021-11-02 23:29:09 +0100 | <boxscape_> | you could argue that type classes with *laws* are special |
2021-11-02 23:29:19 +0100 | <boxscape_> | because then you can write an instance that type checks but doesn't satisfy laws |
2021-11-02 23:29:19 +0100 | <hpc> | every criticism of higher-order functions can be translated to first-order functions with sufficiently java-like data definitions |
2021-11-02 23:29:24 +0100 | <boxscape_> | which you can't really do with higher order functions |
2021-11-02 23:29:36 +0100 | <boxscape_> | but of course you can have pre-conditions on your higher-order functions as well |
2021-11-02 23:29:50 +0100 | <awpr> | because being a typeclass imposes a guarantee that a given type has only one instance (ignoring incoherent instances) |
2021-11-02 23:30:10 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
2021-11-02 23:30:20 +0100 | <hpc> | awpr: can't ignore those, the incoherent instance can be in another module |
2021-11-02 23:30:41 +0100 | <awpr> | I mean if you're using typeclasses in a not-broken way, you won't have them |
2021-11-02 23:30:58 +0100 | <hpc> | it could be in another package then |
2021-11-02 23:31:06 +0100 | <awpr> | can't argue against typeclasses by saying you can turn on an extension and break them intentionally |
2021-11-02 23:31:14 +0100 | <awpr> | at least, not reasonably |
2021-11-02 23:31:21 +0100 | <hpc> | but unreasonably... |
2021-11-02 23:31:44 +0100 | <awpr> | may as well argue against the notion of types because you can wreck everything with `unsafeCoerce` |
2021-11-02 23:33:27 +0100 | <dsal> | I think the thing that throws me off is "can write a bug if you try by deviating from something sensible" vs. "everything's harder, but we can't write specific types of bugs" |
2021-11-02 23:34:06 +0100 | <awpr> | I can still write that delay bug without any typeclasses |
2021-11-02 23:34:19 +0100 | <hpc> | without IO, even |
2021-11-02 23:34:25 +0100 | <monochrom> | slippery-slopeable to "if programming is impossible, then bugs are impossible too" |
2021-11-02 23:34:40 +0100 | <boxscape_> | what's the supposed solution here? Specializing the MonadIO instance so you know which implementation it will be? |
2021-11-02 23:34:41 +0100 | <awpr> | given `thing :: IO Something`, `let thing' = threadDelay 1010101010 >> thing` |
2021-11-02 23:35:18 +0100 | Gurkenglas | (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 260 seconds) |
2021-11-02 23:35:25 +0100 | <dsal> | boxscape_: Only use known concrete instances with no typeclasses. |
2021-11-02 23:35:29 +0100 | <hpc> | ooh, make that threadDelay use acme-now instead of a hard-coded number |
2021-11-02 23:35:32 +0100 | <boxscape_> | I see |
2021-11-02 23:35:48 +0100 | <dsal> | I really don't understand what's wrong with that `Late` instance other than just being slightly silly. |
2021-11-02 23:35:53 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-11-02 23:35:58 +0100 | <monochrom> | BTW this criticism also translates to using any library you didn't write yourself, too. |
2021-11-02 23:36:20 +0100 | <monochrom> | In fact in that case you are also vulnerable to supply-chain trust-network attacks. |
2021-11-02 23:36:27 +0100 | <hpc> | dsal: nothing imo, it's just "you don't want this instance therefore the class is bad" |
2021-11-02 23:36:30 +0100 | <dsal> | Someone checked in a change that generates an RSA keypair before every test iteration. That's basically the `Late` Monad. |
2021-11-02 23:36:34 +0100 | <hpc> | like saying Const invalidates Functor or something |
2021-11-02 23:36:45 +0100 | <monochrom> | And the javascript community did suffer that one prominently. |
2021-11-02 23:37:05 +0100 | <dsal> | hpc: That summarizes it well. |
2021-11-02 23:37:11 +0100 | <awpr> | yeah, I think that argument is not useful at all. "parameterizing your IO makes it possible to ask for bad instances" is not really any different from "parameterizing putStrLn makes it possible to print bad words" |
2021-11-02 23:37:24 +0100 | <awpr> | if you don't want to print bad words, then just... don't |
2021-11-02 23:37:43 +0100 | <awpr> | if you don't want to use an artificially slowed-down IO monad, then don't |
2021-11-02 23:37:48 +0100 | <hpc> | there's also, what law do you add to MonadIO that makes that definition impossible? |
2021-11-02 23:37:56 +0100 | <hpc> | what information could you even gain out of such a law? |
2021-11-02 23:38:12 +0100 | <hpc> | when you look at the Monoid laws, you get mconcat and so many other useful things |
2021-11-02 23:38:18 +0100 | <awpr> | hmm, `liftIO x >> liftIO y == liftIO (x >> y)`? |
2021-11-02 23:38:38 +0100 | <hpc> | they're not just to say "neener neener" to the acme authors of the world |
2021-11-02 23:38:54 +0100 | dsamperi | (~dsamperi@2603-7000-3b42-5400-c881-7958-2102-07bc.res6.spectrum.com) |
2021-11-02 23:39:32 +0100 | <hpc> | liftIO (m >>= f) = liftIO m >>= (liftIO . f) is already a law |
2021-11-02 23:39:35 +0100 | <hpc> | so... yeah |
2021-11-02 23:39:36 +0100 | <dsal> | This is the same "`fold` is bad" argument, though. I don't like knowing lots of things, so I just use `fold` whenever I want to fold things. |
2021-11-02 23:39:41 +0100 | <hpc> | actually, that makes that tweet wrong to begin with |
2021-11-02 23:39:51 +0100 | <awpr> | oh, yeah, that does seem to break laws then |
2021-11-02 23:40:09 +0100 | <hpc> | this whole discussion is like a bad branch prediction |
2021-11-02 23:40:26 +0100 | <dsal> | Delay is a weird side effect, though. |
2021-11-02 23:40:28 +0100 | Cajun | (~Cajun@user/cajun) |
2021-11-02 23:40:51 +0100 | <hpc> | but it is one |
2021-11-02 23:41:09 +0100 | <boxscape_> | why is it weird? |
2021-11-02 23:41:13 +0100 | <hpc> | sometimes it seems like the only thing that isn't a side effect of IO is seq making your cpu warm |
2021-11-02 23:41:31 +0100 | <dsal> | It's weird because it's not *exactly* observable. The delay may be indistinguishable from just having things be slow. |
2021-11-02 23:42:00 +0100 | <boxscape_> | at least in this context you can observe the IO expression that's built up rather than the actual effect |
2021-11-02 23:42:03 +0100 | <awpr> | from a laws perspective, computing the same thing but slower is generally considered not to be a difference. but putting it as an action in an IO makes it intuitively different somehow |
2021-11-02 23:42:07 +0100 | <boxscape_> | and I guess the laws are for the former |
2021-11-02 23:43:09 +0100 | <hpc> | it's just where the line is drawn |
2021-11-02 23:43:21 +0100 | <dsal> | One of the arguments used `error` which is not even IO. We try to hlint some of this stuff out, but I can bottom any function call. |
2021-11-02 23:43:29 +0100 | <hpc> | you could also argue pure code has side effects from being written slightly differently because of what ends up in the cpu cache at the end of evaluation |
2021-11-02 23:44:03 +0100 | <hpc> | timing is commonly useful in software written in haskell, so it goes in IO's model |
2021-11-02 23:45:11 +0100 | <boxscape_> | dsal eagerly awaiting someone to come up with the theoretical foundations for a haskell completeness checker |
2021-11-02 23:45:21 +0100 | <boxscape_> | s/dsal/dsal I'm |
2021-11-02 23:45:37 +0100 | <boxscape_> | or... totality checker might be a better word |
2021-11-02 23:46:39 +0100 | jkaye | (~jkaye@BELVEDERE-T.ear2.Denver1.Level3.net) (Quit: Leaving) |
2021-11-02 23:46:46 +0100 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2021-11-02 23:46:53 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-02 23:47:46 +0100 | acidjnk_new | (~acidjnk@p200300d0c72670437812fb9732750684.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
2021-11-02 23:47:47 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 264 seconds) |
2021-11-02 23:47:49 +0100 | <dsal> | Heh. Yeah. But in your own small codebase, you can also like, see what's calling what and with what. "someone can do MonadIO wrong" is just a weird concept to me. |
2021-11-02 23:48:02 +0100 | <boxscape_> | yeah |
2021-11-02 23:49:27 +0100 | <Cajun> | boxscape_: does section 3.3.3 in https://arxiv.org/abs/1610.07978 count for "theoretical foundations"? |
2021-11-02 23:50:02 +0100 | <Cajun> | ah well it doesnt define a foundation, he just talks about it |
2021-11-02 23:50:07 +0100 | <boxscape_> | Cajun IIRC the main thing it says about totality checking is that "totality checking haskell is hard" |
2021-11-02 23:50:22 +0100 | <Cajun> | what a shame ): |
2021-11-02 23:50:36 +0100 | <boxscape_> | yeah |
2021-11-02 23:50:36 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) |
2021-11-02 23:51:42 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-11-02 23:51:52 +0100 | <boxscape_> | not to mention GHC inserts Any in your Core if you blink for a second |
2021-11-02 23:52:03 +0100 | <hpc> | foo n | collatzConverges n = "defined" -- try checking that :D |
2021-11-02 23:52:44 +0100 | <boxscape_> | hpc totality checking in dependently typed languages is usually conservative, i.e. if it can't show that it's total, it just assumes that it isn't |
2021-11-02 23:53:02 +0100 | <hpc> | we're talking haskell though |
2021-11-02 23:53:23 +0100 | <boxscape_> | well, if haskell did have a totality checker, I'd imagine that it'd work similarly to those |
2021-11-02 23:53:45 +0100 | <hpc> | the question then though is how far in the analysis do you stop |
2021-11-02 23:53:56 +0100 | <hpc> | totality checking in haskell could potentially be very easy :P |
2021-11-02 23:54:02 +0100 | <boxscape_> | that is true |
2021-11-02 23:54:08 +0100 | <boxscape_> | const false will work |
2021-11-02 23:55:35 +0100 | Jing | (~textual@2604:a840:3::1021) (Remote host closed the connection) |
2021-11-02 23:55:47 +0100 | yauhsien | (~yauhsien@61-231-61-245.dynamic-ip.hinet.net) (Ping timeout: 268 seconds) |
2021-11-02 23:58:40 +0100 | thyriaen | (~thyriaen@x4dbf0bd8.dyn.telefonica.de) |
2021-11-02 23:59:21 +0100 | retro_ | (~retro@2e41e9c8.skybroadband.com) |
2021-11-02 23:59:22 +0100 | Jing | (~textual@2604:a840:3::1021) |
2021-11-02 23:59:29 +0100 | retroid_ | (~retro@2e41e9c8.skybroadband.com) (Ping timeout: 268 seconds) |