Logs on 2022-12-06 (liberachat/#haskell)
| 00:10:59 | × | chomwitt quits (~chomwitt@2a02:587:7a0c:6a00:1ac0:4dff:fedb:a3f1) (Ping timeout: 264 seconds) |
| 00:12:51 | × | acidjnk quits (~acidjnk@p200300d6e7137a1979c4b3a1e8b4bdac.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 00:13:35 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 00:15:14 | → | tcard joins (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) |
| 00:17:08 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds) |
| 00:19:33 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 00:20:31 | <gqplox[m]> | hi guys, im back |
| 00:20:51 | <gqplox[m]> | didn't have too much time today but managed to solve, although not very cleanly |
| 00:20:57 | <gqplox[m]> | http://sprunge.us/x41xkb |
| 00:22:25 | × | CiaoSen quits (~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 00:23:23 | → | rburkholder joins (~blurb@96.45.2.121) |
| 00:26:12 | ← | moonsheep parts (~user@user/moonsheep) (ERC 5.4 (IRC client for GNU Emacs 28.2)) |
| 00:27:32 | × | gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
| 00:28:03 | × | zeenk quits (~zeenk@2a02:2f04:a30d:4300::7fe) (Quit: Konversation terminated!) |
| 00:29:20 | <Axman6> | I don't know what the test is, but `filter (any isAlpha)` feels weird to me; why would you care if a string contained just a single alpha character? |
| 00:29:37 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 00:32:29 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 00:33:53 | → | king_gs joins (~Thunderbi@187.201.204.122) |
| 00:35:05 | <gqplox[m]> | i think after transposing all the remaining strings are [, ], whitespcace or lettesr |
| 00:35:28 | <iqubic> | They are. |
| 00:35:35 | <gqplox[m]> | i could have maybe not all elem "[] " perhaps |
| 00:35:39 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 00:35:39 | <gqplox[m]> | would have been clearer |
| 00:36:21 | × | fizbin quits (~fizbin@user/fizbin) (Ping timeout: 268 seconds) |
| 00:37:55 | → | JonathanWatson[m joins (~jjwmatrix@2001:470:69fc:105::2:a544) |
| 00:46:49 | × | freeside quits (~mengwong@103.252.202.193) (Ping timeout: 260 seconds) |
| 00:46:50 | × | freeside_ quits (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
| 00:47:24 | × | king_gs quits (~Thunderbi@187.201.204.122) (Ping timeout: 260 seconds) |
| 00:49:30 | × | bobbingbob quits (~dfadsva@2604:3d09:207f:f650::7b3a) (Ping timeout: 252 seconds) |
| 00:50:35 | → | bobbingbob joins (~dfadsva@2604:3d09:207f:f650::7b3a) |
| 00:50:42 | <EvanR> | trying to write a proper validating parsing for AoC input? |
| 00:53:48 | → | king_gs joins (~Thunderbi@187.201.204.122) |
| 00:55:39 | × | perrierjouet quits (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) (Quit: WeeChat 3.7.1) |
| 00:57:18 | × | thyriaen quits (~thyriaen@2a01:aea0:dd4:470d:6245:cbff:fe9f:48b1) (Ping timeout: 256 seconds) |
| 00:57:21 | → | merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
| 00:58:10 | × | xff0x quits (~xff0x@2405:6580:b080:900:3610:c321:ec1f:485b) (Ping timeout: 252 seconds) |
| 00:58:52 | → | freeside joins (~mengwong@103.252.202.193) |
| 01:02:16 | × | seydar quits (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 265 seconds) |
| 01:03:11 | × | Kaipei quits (~Kaiepi@108.175.84.104) (Ping timeout: 246 seconds) |
| 01:03:35 | <dsal> | The `iterate` and `!!` thing look pretty suspicious. |
| 01:05:02 | <dsal> | Oh, I see what you're doing. That's not terrible. But you don't need to do it. |
| 01:05:38 | <dsal> | This is a good case of "list isn't the right data structure" though it's not super bad here. |
| 01:06:27 | → | perrierjouet joins (~perrier-j@modemcable048.127-56-74.mc.videotron.ca) |
| 01:06:54 | × | mmhat quits (~mmh@p200300f1c73b51cbee086bfffe095315.dip0.t-ipconnect.de) (Quit: WeeChat 3.7.1) |
| 01:07:11 | × | freeside quits (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
| 01:09:19 | <dsal> | gqplox[m]: If you're down with spoilers, megaparsec + IntMap: https://gist.github.com/dustin/637350c9179f8fadc663d5deaa266745 |
| 01:10:15 | × | albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
| 01:10:26 | <dsal> | There's a partial function in there just for fun. |
| 01:13:29 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 01:13:29 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 01:13:29 | → | wroathe joins (~wroathe@user/wroathe) |
| 01:13:57 | <iqubic> | I used an IntMap String as my state and folded over a list of moves to thread the state through. |
| 01:13:59 | <dsal> | gqplox[m]: Also note that your arguments are backwards here: `apply :: [Move] -> [Crate] -> [Crate]` It's mildly confusing because your state type is `[Crate]` but if you aliased it `type State = [Crate]` then you'd see that you're intending to iterate over a list which comes before the state. Flipping that around, you'd have `apply :: State -> [Move] -> State` whose implementation would be `apply state = foldl f` |
| 01:14:10 | <iqubic> | type Move = (Int, Int, Int) |
| 01:14:17 | <dsal> | At which point, introducing a new name for foldl is probably not helpful. :) |
| 01:15:12 | → | seydar joins (~seydar@154-27-113-252.starry-inc.net) |
| 01:16:16 | × | bobbingbob quits (~dfadsva@2604:3d09:207f:f650::7b3a) (Ping timeout: 252 seconds) |
| 01:16:19 | <dsal> | `solve f moves crates = map head (apply moves crates)` flipped is `solve f = fmap head . foldl f` |
| 01:16:22 | → | albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
| 01:16:39 | <dsal> | (something like that -- you might need to include the initial state) |
| 01:16:39 | → | razetime joins (~quassel@49.207.203.213) |
| 01:17:35 | <iqubic> | dsal: fold' better |
| 01:18:03 | <dsal> | Sure, foldl is "always wrong" but that's just an unfortunate wart. |
| 01:18:22 | → | freeside joins (~mengwong@103.252.202.193) |
| 01:18:33 | <iqubic> | foldl' is more strict and causes less thunks to be built up |
| 01:19:51 | × | pavonia quits (~user@user/siracusa) (Read error: Connection reset by peer) |
| 01:22:23 | → | bobbingbob joins (~dfadsva@2604:3d09:207f:f650::7b3a) |
| 01:23:24 | → | freeside_ joins (~mengwong@103.252.202.193) |
| 01:23:35 | × | king_gs quits (~Thunderbi@187.201.204.122) (Read error: Connection reset by peer) |
| 01:24:42 | → | king_gs joins (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) |
| 01:26:48 | × | bobbingbob quits (~dfadsva@2604:3d09:207f:f650::7b3a) (Ping timeout: 255 seconds) |
| 01:27:57 | → | pavonia joins (~user@user/siracusa) |
| 01:31:44 | × | merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
| 01:34:20 | <gqplox[m]> | oh nice thanks for the feedback |
| 01:34:39 | <gqplox[m]> | yeah I don't know why i wrote the apply for foldl |
| 01:36:17 | × | segfaultfizzbuzz quits (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Remote host closed the connection) |
| 01:37:15 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 248 seconds) |
| 01:39:09 | → | waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) |
| 01:39:56 | → | xff0x joins (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
| 01:40:13 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) |
| 01:41:32 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5) |
| 01:42:06 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 01:44:54 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Ping timeout: 256 seconds) |
| 01:46:39 | × | juri_ quits (~juri@84-19-175-179.pool.ovpn.com) (Ping timeout: 268 seconds) |
| 01:52:04 | × | phma quits (phma@2001:5b0:210b:fa28:7bf5:3e57:e59:39a9) (Read error: Connection reset by peer) |
| 01:52:32 | → | phma joins (phma@2001:5b0:210b:fa28:3019:703:1a42:7f84) |
| 01:53:26 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds) |
| 01:55:07 | × | king_gs quits (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) (Quit: king_gs) |
| 01:55:14 | → | razetime_ joins (~quassel@49.207.203.213) |
| 01:55:22 | → | king_gs joins (~Thunderbi@187.201.204.122) |
| 01:56:14 | × | mncheckm quits (~mncheck@193.224.205.254) (Ping timeout: 260 seconds) |
| 01:56:28 | × | razetime_ quits (~quassel@49.207.203.213) (Client Quit) |
| 01:56:43 | × | razetime quits (~quassel@49.207.203.213) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 02:01:05 | → | jpds joins (~jpds@gateway/tor-sasl/jpds) |
| 02:02:17 | → | juri_ joins (~juri@79.140.120.121) |
| 02:02:39 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 02:06:57 | <EvanR> | foldl is "always wrong" for list maybe |
| 02:10:05 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 268 seconds) |
| 02:10:42 | × | zant quits (~zant@62.214.20.26) (Ping timeout: 268 seconds) |
| 02:13:03 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 02:13:08 | × | money_ quits (~money@user/polo) (Quit: money_) |
| 02:13:44 | × | opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 260 seconds) |
| 02:14:50 | × | king_gs quits (~Thunderbi@187.201.204.122) (Read error: Connection reset by peer) |
| 02:16:03 | → | king_gs joins (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) |
| 02:23:04 | × | freeside_ quits (~mengwong@103.252.202.193) (Ping timeout: 260 seconds) |
| 02:23:49 | → | opticblast joins (~Thunderbi@secure-165.caltech.edu) |
| 02:24:16 | × | freeside quits (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
| 02:24:43 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
| 02:26:18 | → | FinnElija joins (~finn_elij@user/finn-elija/x-0085643) |
| 02:28:40 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds) |
| 02:30:15 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 02:32:39 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 252 seconds) |
| 02:32:54 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 02:35:12 | → | freeside joins (~mengwong@103.252.202.193) |
| 02:38:49 | × | machinedgod quits (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 252 seconds) |
| 02:39:16 | × | freeside quits (~mengwong@103.252.202.193) (Ping timeout: 248 seconds) |
| 02:39:55 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 252 seconds) |
| 02:41:23 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds) |
| 02:43:03 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 02:43:38 | → | [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470) |
| 02:45:19 | <albet70> | let's assume blist contain alist, is there a function can get the position of alist in blist? |
| 02:45:36 | → | merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
| 02:46:07 | <albet70> | f [3..6] [0..9] == 3 |
| 02:49:01 | <EvanR> | indexOf [3..6] (tails [0..9]) |
| 02:49:18 | <EvanR> | not super efficient |
| 02:49:31 | <jackdk> | elegant, though. I was gonna say go look up Boyer-Moore or something |
| 02:50:28 | × | merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 248 seconds) |
| 02:50:46 | × | nattiestnate quits (~nate@202.138.250.37) (Quit: WeeChat 3.7.1) |
| 02:51:06 | → | aeroplane joins (~user@user/aeroplane) |
| 02:53:47 | <albet70> | where is indexOf from? |
| 02:54:42 | <EvanR> | I don't think it's anywhere, I've just seen it defined a lot |
| 02:54:59 | × | king_gs quits (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) (Quit: king_gs) |
| 02:55:15 | <albet70> | @hoogle indexOf |
| 02:55:15 | <lambdabot> | Data.TCache.IndexQuery indexOf :: (Queriable reg a) => (reg -> a) -> STM [(a, [DBRef reg])] |
| 02:55:15 | <lambdabot> | Control.CanAquire indexOf :: HasIndex t i => t -> i |
| 02:55:15 | <lambdabot> | Numeric.LinearAlgebra type family IndexOf (c :: * -> *) |
| 02:55:35 | <ephemient> | they more likely mean https://hackage.haskell.org/package/base/docs/Data-List.html#v:elemIndex |
| 02:55:45 | <EvanR> | one of those "this list operation shell not be implemented because it's the wrong data structure" functions |
| 02:56:02 | <EvanR> | damn it exists |
| 02:56:13 | <[Leary]> | > (\xs ys -> findIndex (xs `isPrefixOf`) (tails ys)) [3..6] [0..9] |
| 02:56:15 | <lambdabot> | Just 3 |
| 02:56:30 | <[Leary]> | The question is probably wrong though. |
| 02:56:39 | <EvanR> | lol |
| 02:57:21 | <EvanR> | @hoogle Eq a => a -> [a] -> Maybe Int |
| 02:57:21 | <lambdabot> | Data.List elemIndex :: Eq a => a -> [a] -> Maybe Int |
| 02:57:21 | <lambdabot> | GHC.OldList elemIndex :: Eq a => a -> [a] -> Maybe Int |
| 02:57:21 | <lambdabot> | Data.List.Utils elemRIndex :: Eq a => a -> [a] -> Maybe Int |
| 02:57:25 | <ephemient> | https://hackage.haskell.org/package/KMP looks like a pretty simple way to get faster subsequence matching |
| 02:58:26 | → | instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net) |
| 03:00:25 | → | freeside joins (~mengwong@103.252.202.193) |
| 03:00:26 | → | freeside_ joins (~mengwong@103.252.202.193) |
| 03:00:31 | <jackdk> | `indexOf x xs = xs ^? traversed . ifiltered (const (== x)) . asIndex`, maybe |
| 03:01:26 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5) |
| 03:01:52 | → | notzmv joins (~zmv@user/notzmv) |
| 03:02:20 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) |
| 03:02:53 | <albet70> | is hoogle down? I got 502 bad gateway |
| 03:03:14 | <iqubic> | Yes. Hoogle is down |
| 03:03:16 | <albet70> | @hoogle findIndex |
| 03:03:17 | <lambdabot> | Data.List findIndex :: (a -> Bool) -> [a] -> Maybe Int |
| 03:03:17 | <lambdabot> | GHC.OldList findIndex :: (a -> Bool) -> [a] -> Maybe Int |
| 03:03:17 | <lambdabot> | Data.ByteString findIndex :: (Word8 -> Bool) -> ByteString -> Maybe Int |
| 03:05:25 | × | freeside_ quits (~mengwong@103.252.202.193) (Ping timeout: 260 seconds) |
| 03:05:25 | × | freeside quits (~mengwong@103.252.202.193) (Ping timeout: 260 seconds) |
| 03:09:14 | × | iqubic quits (~avi@2601:602:9502:c70:5424:6247:46f4:3180) (Remote host closed the connection) |
| 03:09:19 | <EvanR> | getDown :: Down Hoogle -> Hoogle |
| 03:09:40 | → | iqubic joins (~avi@2601:602:9502:c70:e046:e69e:de6e:24b2) |
| 03:10:06 | → | inkbottle[m] joins (~inkbottle@2001:470:69fc:105::2ff5) |
| 03:18:05 | <seydar> | am I a bad person for using Debug.Trace? |
| 03:18:26 | <monochrom> | depends on using it for what |
| 03:18:30 | → | freeside joins (~mengwong@103.252.202.193) |
| 03:19:44 | <EvanR> | I usually want to be more bad, but the burden to go put an import Debug.Trace means I use it less |
| 03:19:47 | <monochrom> | I use money, eat meat, say the f word sometimes, and use Debug.Trace. Am I a bad person? |
| 03:19:48 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 248 seconds) |
| 03:20:07 | → | freeside_ joins (~mengwong@103.252.202.193) |
| 03:20:13 | <monochrom> | I also invest in capitalistic companies. |
| 03:20:51 | <EvanR> | debugging haskell in general is so dicey I want every non-debugging technique there is to avoid it |
| 03:21:17 | <seydar> | I have started Debug.Trace, LLC. I will not disclose what I do with the proceeds. Donations can be made at the following... |
| 03:21:29 | <monochrom> | haha |
| 03:21:30 | <seydar> | I have an infinite loop that is only discovered at runtime |
| 03:21:49 | <monochrom> | That's normal. |
| 03:22:10 | <seydar> | i wish haskell debugging upon my enemies |
| 03:22:21 | <seydar> | i am struggling hard with AoC #5 |
| 03:22:49 | <EvanR> | just like partial functions aren't partial if you never give bad inputs, trace is a pure function if you don't care about the stray outputs |
| 03:22:55 | <monochrom> | Perhaps s/debugging // >:) |
| 03:23:43 | <albet70> | > let d=[0..9]; c=[3..6] in filter (> 0) $ fmap (\x -> if (c isPrefixOf (snd x)) then (fst x) else -1) $ zip [0..(length d)] $ tails d [3] |
| 03:23:44 | <lambdabot> | error: |
| 03:23:44 | <lambdabot> | • Couldn't match expected type ‘([a0] -> [a0] -> Bool) |
| 03:23:44 | <lambdabot> | -> b0 -> Bool’ |
| 03:23:47 | <monochrom> | I state the dual of that. Total functions aren't total until you get rid of bugs. |
| 03:24:38 | <EvanR> | all functions are correct, they just may have the wrong type signature xD |
| 03:24:47 | <albet70> | let d=[0..9]; c=[3..6] in filter (> 0) $ fmap (\x -> if (c isPrefixOf (snd x)) then (fst x) else -1) $ zip [0..(length d)] $ tails d [3] |
| 03:25:25 | <EvanR> | on Day 5 I am skeptically curious why you need the sublist index of something |
| 03:25:25 | <monochrom> | Be a cup-is-half-full person and rejoice that your function works for some input at all. >:) |
| 03:25:26 | → | razetime joins (~quassel@49.207.203.213) |
| 03:26:00 | <EvanR> | oh that's not the same person |
| 03:26:49 | <monochrom> | So basically yesterday's lesson is "use array, not list", and today's is "use list, not array"? :) |
| 03:27:48 | <dolio> | Seems like there's a meta lesson that a lot of people fail to get. |
| 03:28:17 | <monochrom> | Would that be "don't use yesterday's approach"? :) |
| 03:29:04 | <dolio> | Think about what is best for the particular situation, instead of assuming one thing is always the best. |
| 03:29:26 | <seydar> | my shame: https://paste.tomsmeding.com/brCoU4aG |
| 03:29:50 | <monochrom> | I see that failure all the time when I was a TA for a 1st-year calculus course. |
| 03:30:44 | <ephemient> | seydar, https://github.com/ephemient/aoc2019/commit/1fb90418c89d07463f1031233b205ed0884d074c I have a dumb hack to be able to turn trace output on and off :) |
| 03:31:33 | <monochrom> | It appears as though students differentiated the function in question, set it to 0, solve. Before even reading the rest of the question (that went on to ask anything except finding critical points). |
| 03:31:59 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 03:31:59 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 03:31:59 | → | wroathe joins (~wroathe@user/wroathe) |
| 03:33:41 | <monochrom> | Cynically, generally, humans just want to avoid thinking about what's best for the question, or even reading the question at all. Wishing that there is only one thing to learn and do. |
| 03:33:47 | × | Xeroine_ quits (~Xeroine@user/xeroine) (Ping timeout: 264 seconds) |
| 03:33:55 | → | finn_elija joins (~finn_elij@user/finn-elija/x-0085643) |
| 03:33:55 | × | FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija))) |
| 03:33:55 | finn_elija | is now known as FinnElija |
| 03:34:00 | × | aeroplane quits (~user@user/aeroplane) (Ping timeout: 260 seconds) |
| 03:34:28 | <dolio> | Yeah. |
| 03:34:53 | <seydar> | ephemient: thank you thank you |
| 03:37:01 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 03:38:13 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 252 seconds) |
| 03:38:26 | × | jero98772 quits (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) (Remote host closed the connection) |
| 03:38:56 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 03:39:12 | <iqubic> | For those who care, Hoogle is back online |
| 03:40:36 | <EvanR> | do the AoC puzzle first, read the question after |
| 03:40:45 | <EvanR> | faster that way |
| 03:42:30 | <seydar> | turns out I had a type error. I still have an infinite loop, but I no longer have my type errors |
| 03:44:35 | <EvanR> | I'd much rather have type errors than mysterious infinite loops |
| 03:46:10 | × | td_ quits (~td@83.135.9.25) (Ping timeout: 256 seconds) |
| 03:46:35 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 246 seconds) |
| 03:48:00 | → | td_ joins (~td@83.135.9.33) |
| 03:48:15 | <seydar> | i'll be honest |
| 03:48:18 | <seydar> | this whole lazy thing |
| 03:48:41 | <ephemient> | what's the law that says "if your inferred type is `a' you might have an infinite loop" |
| 03:48:46 | <seydar> | making it kinda hard to reason about why my code is littered with trace statements, yet I'm not getting any output |
| 03:49:04 | <seydar> | wondering if maybe i should've been a poet |
| 03:50:47 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 255 seconds) |
| 03:51:16 | × | [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
| 03:52:58 | → | Guest40 joins (~Guest40@50-247-81-49-static.hfc.comcastbusiness.net) |
| 03:56:36 | × | kritzefitz quits (~kritzefit@debian/kritzefitz) (Ping timeout: 248 seconds) |
| 04:00:47 | × | img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
| 04:01:06 | <seydar> | ah. it is entirely possible I forgot to set a base case in a recursive function that occurs on like line 5 of my code |
| 04:02:28 | × | Guest40 quits (~Guest40@50-247-81-49-static.hfc.comcastbusiness.net) (Ping timeout: 260 seconds) |
| 04:07:20 | × | crazazy quits (~user@130.89.173.127) (Read error: Connection reset by peer) |
| 04:09:40 | → | tabaqui joins (~root@88.231.62.215) |
| 04:12:11 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 264 seconds) |
| 04:15:28 | → | causal joins (~user@50.35.85.7) |
| 04:15:59 | → | merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
| 04:16:39 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 04:18:13 | → | img joins (~img@user/img) |
| 04:19:37 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Read error: Connection reset by peer) |
| 04:20:08 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 04:33:35 | × | seydar quits (~seydar@154-27-113-252.starry-inc.net) (Quit: leaving) |
| 04:39:26 | × | caryhartline quits (~caryhartl@2600:1700:2d0:8d30:b403:2f20:d663:1bea) (Quit: caryhartline) |
| 04:40:10 | → | fizbin joins (~fizbin@user/fizbin) |
| 04:46:19 | → | kritzefitz joins (~kritzefit@debian/kritzefitz) |
| 04:51:02 | × | merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
| 04:51:02 | × | ddellacosta quits (~ddellacos@143.244.47.89) (Ping timeout: 268 seconds) |
| 04:53:32 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:6956:303f:1676:5fd5) (Remote host closed the connection) |
| 04:53:52 | → | use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:6956:303f:1676:5fd5) |
| 05:00:04 | × | waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 265 seconds) |
| 05:05:40 | × | instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 252 seconds) |
| 05:08:54 | × | jargon quits (~jargon@184.101.177.18) (Remote host closed the connection) |
| 05:13:21 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 05:15:37 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 05:17:11 | → | instantaphex joins (~jb@c-73-171-252-84.hsd1.fl.comcast.net) |
| 05:21:41 | × | instantaphex quits (~jb@c-73-171-252-84.hsd1.fl.comcast.net) (Ping timeout: 255 seconds) |
| 05:24:02 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 05:24:02 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 05:24:02 | → | wroathe joins (~wroathe@user/wroathe) |
| 05:24:31 | <iqubic> | Was there someone in here who had a lensy way of doing firstIndex? |
| 05:26:31 | × | mimmy quits (~mimmy@159.203.19.37) (Quit: ZNC 1.9.x-git-187-32d4a4d5 - https://znc.in) |
| 05:26:47 | → | mimmy joins (~mimmy@2604:a880:cad:d0::3e:1001) |
| 05:27:11 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 255 seconds) |
| 05:28:02 | × | fizbin quits (~fizbin@user/fizbin) (Ping timeout: 268 seconds) |
| 05:31:32 | <iqubic> | I can't seem to find that in the logs. |
| 05:32:13 | <jackdk> | 1:00 PM <jackdk> `indexOf x xs = xs ^? traversed . ifiltered (const (== x)) . asIndex`, maybe |
| 05:32:21 | <iqubic> | Yes. That. Thanks. |
| 05:32:30 | <jackdk> | I think you can use `folded` and `filtered` instead of `ifiltered` |
| 05:32:42 | <jackdk> | `folded` instead of `traversed`, that is |
| 05:32:46 | <iqubic> | I think so. |
| 05:33:03 | <iqubic> | Traversed is only needed if you want to set multiple things. |
| 05:33:41 | <EvanR> | another instance of getting the name wrong = powerless (at searching for it) xD |
| 05:33:47 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 05:36:12 | → | chomwitt joins (~chomwitt@2a02:587:7a0c:6a00:1ac0:4dff:fedb:a3f1) |
| 05:39:51 | × | mimmy quits (~mimmy@2604:a880:cad:d0::3e:1001) (Quit: ZNC 1.9.x-git-187-32d4a4d5 - https://znc.in) |
| 05:40:07 | → | mimmy joins (~mimmy@159.203.19.37) |
| 05:41:54 | <iqubic> | jackdk: You can also replace (^?) with (^..) to get the indicies of all matches as a [Int] |
| 05:42:11 | <jackdk> | iqubic: yes, that's a cool trick. |
| 05:42:26 | <iqubic> | And yes, it will return [] for no matches. |
| 05:42:30 | <iqubic> | indexOf :: (Foldable f) => (a -> Bool) -> f a -> [Int] |
| 05:42:34 | <iqubic> | indexOf p xs = xs ^.. folded . ifiltered (const p) . asIndex |
| 05:42:39 | × | hrberg quits (~quassel@171.79-160-161.customer.lyse.net) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 05:42:59 | → | hrberg joins (~quassel@171.79-160-161.customer.lyse.net) |
| 05:44:41 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 05:47:09 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 06:06:42 | × | razetime quits (~quassel@49.207.203.213) (Ping timeout: 256 seconds) |
| 06:08:25 | <jackdk> | iqubic: s/ifiltered (const p)/filtered p/ |
| 06:08:39 | <iqubic> | Oh? Does that work? |
| 06:08:53 | → | Kaipei joins (~Kaiepi@108.175.84.104) |
| 06:09:35 | <jackdk> | Beware of bugs in the above suggestion; I have only typechecked it, not tried it. |
| 06:10:02 | <iqubic> | I'll try it now. |
| 06:10:55 | <iqubic> | That seems to work for me. |
| 06:11:34 | <iqubic> | My test for this was "I used that function in today's Advent of Code solution" |
| 06:12:59 | <iqubic> | Thnks jackdk |
| 06:16:13 | → | merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
| 06:18:15 | → | michalz joins (~michalz@185.246.204.72) |
| 06:21:10 | <mauke> | :t fmap (+ 4) . findIndex ((== 4) . length . nub . take 4) . tails |
| 06:21:11 | <lambdabot> | Eq a => [a] -> Maybe Int |
| 06:23:07 | <dsal> | Oh, heh, I was comparing it for some reason. |
| 06:27:14 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 06:31:44 | → | biberu\ joins (~biberu@user/biberu) |
| 06:34:03 | <mauke> | alternatively: /(.{4})(?(?{ !all_distinct $1 })(?!))/ and say $+[1]; |
| 06:35:36 | × | biberu quits (~biberu@user/biberu) (Ping timeout: 256 seconds) |
| 06:35:36 | biberu\ | is now known as biberu |
| 06:35:36 | <mauke> | where sub all_distinct($chars) { my $set = ''; vec($set, $_, 1)++ and return 0 for unpack 'C*', $chars; 1 } |
| 06:38:26 | × | freeside_ quits (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
| 06:38:57 | × | freeside quits (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
| 06:39:36 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:42:14 | <iqubic> | mauke: This is #haskell. I'm not sure if you are in the right channel |
| 06:43:26 | <_________> | iqubic: above you have haskell solution |
| 06:48:18 | <mauke> | I'm sure the code could be desugared to haskell |
| 06:50:23 | × | merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
| 06:50:27 | → | king_gs joins (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) |
| 06:52:03 | <yushyin> | iqubic: no this is #aoc-spoilers |
| 06:55:44 | <mauke> | besides, 'where' is totally haskell syntax, right? |
| 06:57:46 | → | aliosablack joins (~chomwitt@2a02:587:7a0c:6a00:1ac0:4dff:fedb:a3f1) |
| 06:58:07 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 06:58:23 | × | chomwitt quits (~chomwitt@2a02:587:7a0c:6a00:1ac0:4dff:fedb:a3f1) (Ping timeout: 264 seconds) |
| 06:58:41 | <albet70> | this is my splitOn implement, https://paste.tomsmeding.com/jQ7AnlFx any suggestion? |
| 06:59:55 | <dsal> | albet70: lots of passes. You definitely don't need `[0..(length sourceList)]` Just `[0..]` |
| 07:00:18 | <dsal> | Type annotations are a good idea on every toplevel binding. |
| 07:01:15 | × | Chai-T-Rex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 07:01:48 | → | Chai-T-Rex joins (~ChaiTRex@user/chaitrex) |
| 07:03:28 | <mauke> | > zip [0 ..] "hello" |
| 07:03:29 | <lambdabot> | [(0,'h'),(1,'e'),(2,'l'),(3,'l'),(4,'o')] |
| 07:03:54 | <int-e> | > let (xs, ys) = span (not . isPrefixOf "ba") (init (tails "abcbabcd")) in (map head xs, map head ys) |
| 07:03:55 | <lambdabot> | ("abc","babcd") |
| 07:04:20 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 07:04:53 | <glguy> | I can't imagine it's news to anyone here, but if you're doing adventofcode.com in Haskell this year, we've got a Haskell-oriented leaderboard in the /topic you can join |
| 07:05:09 | <albet70> | dsal , ok, [0..] it is |
| 07:05:59 | <int-e> | the whole indexing feels nonidiomatic |
| 07:06:05 | <dsal> | You're doing a lot of passes through your lists overall, though. Seems like something you could do in a single pass. |
| 07:06:36 | <sayola> | i've done today's aoc just now. i'm scrolling up and find mauke having the exact same solution. lol |
| 07:06:44 | <mauke> | what's the point of leaderboards with aoc? isn't it just about who can wake up at 6:00 the fastest? |
| 07:07:04 | <glguy> | mauke: finding other people's solutions, seeing who's keeping up, etc |
| 07:07:05 | <mauke> | I knew regex was the obvious solution |
| 07:08:01 | <sayola> | i've done unga bungu parsing with lines/groupby etc for past challenges lol |
| 07:08:31 | <sayola> | parser combinators always break in my hands |
| 07:09:16 | <dsal> | Parser combinators are fun. Today's parser was `readFile` which was a little bit of a disappointment. |
| 07:09:38 | <mauke> | `interact` or bust |
| 07:09:47 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds) |
| 07:10:12 | <sayola> | copy&paste into ghci or bust :> |
| 07:10:35 | <shachaf> | whoa, it's mauke |
| 07:10:45 | <mauke> | glguy: how do I see other people's solutions? |
| 07:11:08 | <sayola> | search github? |
| 07:11:11 | <int-e> | mauke: Well, you still have to parse the problem and turn it into code even if you're awake when it starts. And you can get really serious about automation if you're so inclined. And I rather suspect that for two days, the top scores for part 1 was by people who actually managed to mis-timestamp submitted solutions? Not sure, impossible to prove, but the times were not plausible at all,... |
| 07:11:17 | <int-e> | ...especially when taking part 2 into account as well. |
| 07:11:32 | <mauke> | shachaf: hi! |
| 07:12:12 | <glguy> | int-e: I'd heard that the 10-second time for the early problem was due to using one of the Ai program generators |
| 07:12:31 | <sayola> | ^ |
| 07:12:40 | <int-e> | glguy: Hmm, but why would the same thing fail so miserably on part 2? But I guess you can get lucky. |
| 07:12:44 | <sayola> | new chatgpt is abused for this, so i heard |
| 07:13:03 | <glguy> | int-e: the stuff is amazing but not magic, so I think it got lucky in the generated program |
| 07:13:29 | <glguy> | but I really don't know |
| 07:13:50 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 07:14:12 | <albet70> | > let (xs, ys) = span (not . isPrefixOf "/a/b") (init (tails "this is a test /ab/c/a/b /c /a/b absurd")) in (map head xs, map head ys) |
| 07:14:14 | <lambdabot> | ("this is a test /ab/c","/a/b /c /a/b absurd") |
| 07:15:10 | <albet70> | the second part isn't split |
| 07:15:58 | <int-e> | albet70: I know, but it's a viable start |
| 07:17:16 | <glguy> | My parabox is easier to use now that is has a level select menu, if anyone wants to play: https://asciinema.org/a/7h6ROJTAWtMzBoaYCsPMqfrpM https://glguy.net/gitea/glguy/parabox |
| 07:18:35 | <int-e> | oh, span . (not .) = break, I keep forgetting about `break` |
| 07:20:35 | <sayola> | sometimes i look at haskell code and wonder if we just code golf for fun here |
| 07:20:56 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 256 seconds) |
| 07:21:04 | <c_wraith> | sometimes, yes |
| 07:21:20 | <c_wraith> | But that's more of an IRC thing than a Haskell thing, I think |
| 07:21:23 | <mauke> | sometimes we @. unpl . pl undo |
| 07:25:54 | → | merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
| 07:30:45 | × | merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
| 07:32:01 | → | kenran joins (~user@user/kenran) |
| 07:32:08 | × | V quits (~v@ircpuzzles/2022/april/winner/V) (Remote host closed the connection) |
| 07:34:22 | × | kenran quits (~user@user/kenran) (Remote host closed the connection) |
| 07:35:30 | <iqubic> | glguy: What library are you using to create the graphics in your Parabox? |
| 07:38:21 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 07:39:34 | × | bgs quits (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
| 07:40:13 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 07:40:52 | × | king_gs quits (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) (Remote host closed the connection) |
| 07:41:10 | → | king_gs joins (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) |
| 07:42:28 | × | jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 268 seconds) |
| 07:43:54 | <int-e> | iqubic: *checks .cabal file* vty |
| 07:44:24 | → | merijn joins (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
| 07:45:05 | → | fserucas joins (~fserucas@212.157.222.3) |
| 07:45:56 | → | jonathanx joins (~jonathan@c-5eea67cc-74736162.cust.telenor.se) |
| 07:47:26 | → | fserucas_ joins (~fserucas@212.157.222.2) |
| 07:47:35 | × | azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
| 07:49:25 | → | comerijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 07:49:42 | × | merijn quits (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
| 07:50:53 | × | jonathanx quits (~jonathan@c-5eea67cc-74736162.cust.telenor.se) (Read error: No route to host) |
| 07:52:41 | × | fserucas quits (~fserucas@212.157.222.3) (Ping timeout: 256 seconds) |
| 07:52:41 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 07:55:09 | → | trev joins (~trev@user/trev) |
| 07:55:11 | <glguy> | The version on steam is just better than my clone, but I like making console apps |
| 08:02:14 | × | shriekingnoise quits (~shrieking@186.137.167.202) (Quit: Quit) |
| 08:03:12 | → | Scraeling joins (~Scraeling@user/scraeling) |
| 08:11:03 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 08:11:33 | → | mmhat joins (~mmh@p200300f1c73b51cbee086bfffe095315.dip0.t-ipconnect.de) |
| 08:11:58 | → | kenaryn joins (~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) |
| 08:19:28 | × | sympt quits (~sympt@user/sympt) (Ping timeout: 268 seconds) |
| 08:25:23 | × | king_gs quits (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) (Ping timeout: 264 seconds) |
| 08:25:32 | → | acidjnk joins (~acidjnk@p200300d6e7137a1979c4b3a1e8b4bdac.dip0.t-ipconnect.de) |
| 08:26:27 | → | fserucas__ joins (~fserucas@212.157.222.3) |
| 08:28:56 | × | fserucas_ quits (~fserucas@212.157.222.2) (Ping timeout: 256 seconds) |
| 08:30:00 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 08:32:34 | → | Tuplanolla joins (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) |
| 08:34:05 | → | zant joins (~zant@62.214.20.26) |
| 08:34:36 | × | son0p quits (~ff@2604:3d08:5b7f:5540::37af) (Ping timeout: 256 seconds) |
| 08:36:03 | → | lortabac joins (~lortabac@2a01:e0a:541:b8f0:3971:4229:3d13:9247) |
| 08:37:59 | → | freeside joins (~mengwong@103.252.202.193) |
| 08:39:45 | <mauke> | I've only watched the first three videos so far, but https://www.youtube.com/playlist?list=PLbgaMIhjbmEnaH_LTkxLI7FMa2HsnawM_ is really, really good |
| 08:40:01 | <mauke> | (Category Theory by Bartosz Milewski) |
| 08:41:14 | <mauke> | I have to crank the speed up to 1.4x because he talks slow, but I feel like I'm actually starting to understand the basics of category theory |
| 08:41:40 | × | kenaryn quits (~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) (Quit: leaving) |
| 08:43:01 | → | freeside_ joins (~mengwong@103.252.202.193) |
| 08:43:34 | <trev> | funny, i watched about 8 episodes on 1.5 too |
| 08:45:31 | → | sympt joins (~sympt@user/sympt) |
| 08:45:37 | → | king_gs joins (~Thunderbi@187.201.204.122) |
| 08:50:58 | → | zeenk joins (~zeenk@2a02:2f04:a30d:4300::7fe) |
| 08:57:47 | × | Chai-T-Rex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds) |
| 08:58:05 | → | fockerize joins (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
| 08:58:59 | → | machinedgod joins (~machinedg@d198-53-218-113.abhsia.telus.net) |
| 08:59:19 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 08:59:49 | → | Chai-T-Rex joins (~ChaiTRex@user/chaitrex) |
| 09:01:48 | × | lbseale quits (~quassel@user/ep1ctetus) (Ping timeout: 256 seconds) |
| 09:03:19 | × | fockerize quits (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Quit: WeeChat 3.5) |
| 09:04:39 | × | king_gs quits (~Thunderbi@187.201.204.122) (Read error: Connection reset by peer) |
| 09:05:40 | → | king_gs joins (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) |
| 09:07:34 | × | Vajb quits (~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) (Read error: Connection reset by peer) |
| 09:08:02 | → | Vajb joins (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) |
| 09:09:20 | → | kuribas joins (~user@ptr-17d51eo0qm84xeejuqw.18120a2.ip6.access.telenet.be) |
| 09:18:51 | × | king_gs quits (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) (Ping timeout: 260 seconds) |
| 09:19:05 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 09:23:28 | → | lbseale joins (~quassel@user/ep1ctetus) |
| 09:26:41 | → | Unicorn_Princess joins (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
| 09:31:51 | → | chele joins (~chele@user/chele) |
| 09:39:11 | × | L29Ah quits (~L29Ah@wikipedia/L29Ah) (Ping timeout: 264 seconds) |
| 09:43:45 | → | jonathanx joins (~jonathan@h-98-128-168-222.NA.cust.bahnhof.se) |
| 09:53:26 | → | MajorBiscuit joins (~MajorBisc@145.94.137.174) |
| 09:55:54 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Remote host closed the connection) |
| 09:56:43 | → | king_gs joins (~Thunderbi@187.201.204.122) |
| 09:57:11 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
| 10:02:32 | → | CiaoSen joins (~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 10:12:01 | → | gmg joins (~user@user/gehmehgeh) |
| 10:12:55 | → | Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915) |
| 10:13:29 | → | ubert1 joins (~Thunderbi@2a02:8109:abc0:6434:6faa:61b1:766c:c219) |
| 10:14:10 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
| 10:14:13 | Lord_of_Life_ | is now known as Lord_of_Life |
| 10:15:49 | → | gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
| 10:15:51 | × | king_gs quits (~Thunderbi@187.201.204.122) (Ping timeout: 256 seconds) |
| 10:16:09 | × | xff0x quits (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Quit: xff0x) |
| 10:23:50 | × | comerijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 246 seconds) |
| 10:24:32 | → | alexiscott joins (~user@4.red-83-36-45.dynamicip.rima-tde.net) |
| 10:25:16 | × | tessier quits (~treed@98.171.210.130) (Ping timeout: 268 seconds) |
| 10:27:31 | → | nattiestnate joins (~nate@202.138.250.13) |
| 10:29:06 | → | dextaa8 joins (~DV@user/dextaa) |
| 10:31:02 | × | dextaa quits (~DV@user/dextaa) (Ping timeout: 252 seconds) |
| 10:31:02 | dextaa8 | is now known as dextaa |
| 10:31:08 | → | tessier joins (~treed@98.171.210.130) |
| 10:39:02 | × | gmg quits (~user@user/gehmehgeh) (Ping timeout: 255 seconds) |
| 10:40:00 | <dminuoso> | While it is a good introduction to category theory, I think the basic premise (CT for programmers) is a bit problematic, because CT doesnt pull much weight unless your business is trying to generalize mathematics problems |
| 10:40:22 | <dminuoso> | Which is something programmers are usually not concerned about. |
| 10:40:33 | → | gmg joins (~user@user/gehmehgeh) |
| 10:41:44 | <dminuoso> | Things like Yoneda are certainly interesting from category theory, but you dont need the slightest bit of mathematical knowledge to know why its useful for fmap fusion or recognize that its behaviorally correct. |
| 10:42:39 | <tomsmeding> | dminuoso: I think the "for programmers" isn't necessarily intended as "the things in CT that are useful for programmers", but "CT presented with examples from programming, so that programmers can understand it" |
| 10:42:55 | <tomsmeding> | the latter as opposed to the usual way, which is presenting examples from abstract math, which is unhelpful to a programmer |
| 10:43:27 | <dminuoso> | tomsmeding: Im not sure you gain much understanding unless you happen to have other fields or mathematics to apply this to. |
| 10:43:49 | <dminuoso> | It's kind of like explaining Monad but only ever picking IO as an example. |
| 10:43:57 | <tomsmeding> | true |
| 10:44:15 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 10:45:34 | → | son0p joins (~ff@2604:3d08:5b7f:5540::a58f) |
| 10:49:50 | × | gmg quits (~user@user/gehmehgeh) (Ping timeout: 255 seconds) |
| 10:51:31 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 10:51:41 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 10:53:22 | → | gmg joins (~user@user/gehmehgeh) |
| 10:55:13 | → | thyriaen joins (~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1) |
| 10:56:26 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) |
| 10:56:34 | <kuribas> | dminuoso: it only helps if you are Edward Kmett and implement advanced lenses :) |
| 11:00:33 | <kuribas> | Or if you write recursion schemes. But they don't seem to add that much value for the complexity. |
| 11:00:59 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Ping timeout: 255 seconds) |
| 11:01:31 | <dminuoso> | Every now and then I get a twitter post with some "*finally* a problem for which recursion schemes leads to better code" |
| 11:03:08 | <kuribas> | it can remove some boilerplate. |
| 11:03:41 | <dminuoso> | I recently read a really length article explaining the etymology of boilerplate code. |
| 11:03:47 | <dminuoso> | That was quite an interesting revelation |
| 11:03:57 | <dminuoso> | The connection is so incrediby distant |
| 11:04:27 | <int-e> | Hmmmmm category theory abstracts from boilerplate? |
| 11:05:21 | <dminuoso> | No, we just switched topics. Recursion schemes can save boilerplate. |
| 11:05:35 | × | Kaipei quits (~Kaiepi@108.175.84.104) (Ping timeout: 264 seconds) |
| 11:05:39 | <dminuoso> | At the expensive of legibility |
| 11:06:21 | <kuribas> | for those who don't understand recursion schemes. |
| 11:06:38 | <dminuoso> | Also at the expensive of performance, apparently. |
| 11:06:57 | <kuribas> | they aren't that difficult, it just takes a time to get to learn about the whole zoo. |
| 11:07:42 | <dminuoso> | I mean heck, we even need special tricks like (#.) in order for foldMap' performance to not degrade in many of its uses.. |
| 11:09:07 | → | xff0x joins (~xff0x@2405:6580:b080:900:f990:42a1:d746:59a8) |
| 11:14:26 | <kuribas> | but the goal is safer and more elegant code, not better performance |
| 11:17:12 | <int-e> | dminuoso: I've seen some of that... at least those tricks are less scary than they used to be before Coercible. |
| 11:24:05 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 246 seconds) |
| 11:24:47 | × | gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Quit: Lost terminal) |
| 11:25:07 | → | gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
| 11:26:40 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 11:26:58 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 11:30:38 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 268 seconds) |
| 11:57:14 | × | juri_ quits (~juri@79.140.120.121) (Ping timeout: 255 seconds) |
| 11:58:59 | → | juri_ joins (~juri@84-19-175-179.pool.ovpn.com) |
| 12:01:45 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 12:04:40 | → | Kaipei joins (~Kaiepi@108.175.84.104) |
| 12:05:13 | × | opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 256 seconds) |
| 12:05:21 | → | jpds1 joins (~jpds@gateway/tor-sasl/jpds) |
| 12:06:47 | × | jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 255 seconds) |
| 12:06:51 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds) |
| 12:07:08 | × | econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity) |
| 12:20:39 | <dminuoso> | kuribas: There's very limited sets of problem where severe performance degradation is acceptable, especially since something like recursion schemes can easily sit inside libraries. |
| 12:21:59 | → | opticblast joins (~Thunderbi@secure-165.caltech.edu) |
| 12:22:13 | × | CiaoSen quits (~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 12:28:19 | × | acidjnk quits (~acidjnk@p200300d6e7137a1979c4b3a1e8b4bdac.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 12:28:50 | → | acidjnk joins (~acidjnk@p200300d6e7137a1939f2f6580d858898.dip0.t-ipconnect.de) |
| 12:31:10 | × | Scraeling quits (~Scraeling@user/scraeling) (Quit: Scraeling) |
| 12:37:42 | × | opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 256 seconds) |
| 12:39:16 | × | alexiscott quits (~user@4.red-83-36-45.dynamicip.rima-tde.net) (Ping timeout: 248 seconds) |
| 12:43:13 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 12:43:48 | → | razetime joins (~quassel@49.207.203.213) |
| 12:44:27 | × | mzan quits (~quassel@mail.asterisell.com) (Quit: No Ping reply in 180 seconds.) |
| 12:45:51 | → | mzan joins (~quassel@mail.asterisell.com) |
| 12:46:21 | → | heinz9 joins (~trace@user/trace) |
| 12:46:58 | <heinz9> | Is functional programming kinda using functions for every combination or for every what? |
| 12:48:00 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 12:48:03 | <heinz9> | and is procedural programming using procedures for every order / sequence ? |
| 12:49:36 | <kmein> | and logic programming uses logic for the programming |
| 12:49:44 | <heinz9> | prolog |
| 12:50:00 | <heinz9> | for old style AIs |
| 12:51:04 | <heinz9> | I am just looking for the equivalent of the programming paradigm in relations of paradigms |
| 12:54:30 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 268 seconds) |
| 12:55:19 | × | pavonia quits (~user@user/siracusa) (Quit: Bye!) |
| 12:59:59 | <heinz9> | or isnt functional programming not functions in functions? |
| 13:01:11 | × | chele quits (~chele@user/chele) (Remote host closed the connection) |
| 13:01:55 | <int-e> | Functional programming has functions as first-class values; you can pass functions as arguments to other functions. |
| 13:02:31 | <int-e> | > let plus1 x = 1 + x in map plus1 [1,2,3] -- like plus1 here |
| 13:02:32 | <lambdabot> | [2,3,4] |
| 13:03:09 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Quit: WeeChat 3.7.1) |
| 13:03:48 | <heinz9> | it is functions in functions |
| 13:04:01 | <lortabac> | other than what int-e said, I don't think there is a universally accepted definition of functional programming |
| 13:04:19 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 13:04:33 | → | CiaoSen joins (~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
| 13:05:00 | <lortabac> | Haskell, Clojure, Erlang, F#... are all considered functional languages but are quite different from each other |
| 13:05:48 | <mrkun[m]> | And OOP is all about objects; notice how none of these descriptions tell you anything if you don't already know what these paradigms are about |
| 13:08:49 | → | acidjnk_new joins (~acidjnk@p200300d6e7137a665d3a2af2e35b2922.dip0.t-ipconnect.de) |
| 13:09:26 | × | Alex_test quits (~al_test@178.34.151.8) (Ping timeout: 256 seconds) |
| 13:10:13 | × | acidjnk quits (~acidjnk@p200300d6e7137a1939f2f6580d858898.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 13:13:55 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 13:13:58 | × | noctux quits (~noctux@user/noctux) (Ping timeout: 256 seconds) |
| 13:16:25 | → | noctux joins (~noctux@user/noctux) |
| 13:16:26 | → | Alex_test joins (~al_test@178.34.151.8) |
| 13:19:04 | → | chele joins (~chele@user/chele) |
| 13:19:24 | <dminuoso> | heinz9: The term "functional programming" is not well defined. |
| 13:19:28 | <dminuoso> | It means different things to different people. |
| 13:19:48 | <dminuoso> | It is perhaps best to look at the different things that people may associate it with. |
| 13:20:15 | <dminuoso> | One notion is having higher order functions - that is functions act as first class objects and can be passed and/or returned to. |
| 13:20:18 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
| 13:21:00 | <dminuoso> | Another is having higher order functions *and* being very idiomatic to encode problems using higher order functions (say using folds rather than a `while` in structured programming languages) |
| 13:21:20 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds) |
| 13:21:44 | <dminuoso> | Another might think more about purity of functions since if you have pure functions, the usefulness of higher order functions raises quickly |
| 13:22:28 | × | kritzefitz quits (~kritzefit@debian/kritzefitz) (Ping timeout: 248 seconds) |
| 13:23:04 | <dminuoso> | So some might call C functional on the basis that you can pass function pointers around. |
| 13:24:09 | <dminuoso> | One further bit that extends on the third case (purity) is that in some compsci there is a distinction between `function` and `routine/procedure/action`, this holds true in Haskell in particular |
| 13:25:07 | <dminuoso> | What C calls functions in haskell we would rather refer to as `routines` and not functions. So perhaps `functional programming` might also refer to programming with functions in the mathematical sense. |
| 13:25:11 | <heinz9> | when can networks as things in your programming language not be derived, as classes could |
| 13:27:43 | <Logio> | functional as the antonym of dysfunctional is IMO also quite apt in the context of programming, more often than not |
| 13:28:42 | × | ezzieyguywuf quits (~Unknown@user/ezzieyguywuf) (Ping timeout: 256 seconds) |
| 13:29:15 | <kuribas> | dminuoso: GRIN uses recursion schemes, AFAIK there is no "severe" performance degrading. |
| 13:29:56 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 255 seconds) |
| 13:30:54 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 13:33:48 | × | jmdaemon quits (~jmdaemon@user/jmdaemon) (Ping timeout: 256 seconds) |
| 13:39:44 | <heinz9> | what is a network more than a graph? I would say, it can have also states and information can go from state to state? is it this? |
| 13:41:47 | × | Chai-T-Rex quits (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
| 13:42:15 | → | Chai-T-Rex joins (~ChaiTRex@user/chaitrex) |
| 13:48:32 | × | causal quits (~user@50.35.85.7) (Ping timeout: 256 seconds) |
| 13:50:52 | → | gmg joins (~user@user/gehmehgeh) |
| 13:54:41 | → | kritzefitz joins (~kritzefit@debian/kritzefitz) |
| 13:56:34 | → | alexiscott joins (~user@4.red-83-36-45.dynamicip.rima-tde.net) |
| 13:58:01 | → | festive_kurbus joins (~festive_k@user/kurbus) |
| 13:58:33 | <alexiscott> | ls |
| 13:58:50 | <dminuoso> | #haskell: command not found: ls |
| 13:59:24 | <festive_kurbus> | you're looking for #linux |
| 13:59:49 | <dminuoso> | Actually #posix would be the right spot. |
| 14:00:03 | <festive_kurbus> | ls is under posix? |
| 14:00:07 | <dminuoso> | https://pubs.opengroup.org/onlinepubs/009696899/utilities/ls.html |
| 14:00:26 | → | jero98772 joins (~jero98772@2800:484:1d80:d8ce:efcc:cbb3:7f2a:6dff) |
| 14:01:53 | × | xff0x quits (~xff0x@2405:6580:b080:900:f990:42a1:d746:59a8) (Ping timeout: 265 seconds) |
| 14:02:29 | → | causal joins (~user@50.35.85.7) |
| 14:05:48 | → | shriekingnoise joins (~shrieking@186.137.167.202) |
| 14:07:14 | → | irrgit_ joins (~irrgit@176.113.74.74) |
| 14:08:40 | × | zant quits (~zant@62.214.20.26) (Ping timeout: 260 seconds) |
| 14:09:38 | → | cafce25 joins (~cafce25@2001:a62:68e:bb01:a1bc:db0:b9af:a2f) |
| 14:10:38 | × | irrgit__ quits (~irrgit@176.113.74.74) (Ping timeout: 256 seconds) |
| 14:13:18 | → | xff0x joins (~xff0x@2405:6580:b080:900:f990:42a1:d746:59a8) |
| 14:15:56 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
| 14:16:26 | → | kenaryn joins (~aurele@89-88-44-27.abo.bbox.fr) |
| 14:17:58 | <gurkenglas> | I asked the originator of a big list of *.hs files in a folder with no .cabal to print their ghc-pkg list output so I could make a .cabal file to reproduce their build. https://bpa.st/2TOA says rejecting: base-4.17.0.0/installed-4.17.0.0 (conflict: gwernnetstub => |
| 14:18:21 | <gurkenglas> | base==4.15.0.0) |
| 14:18:58 | <gurkenglas> | How do I find out what causes the 4.17? |
| 14:19:02 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 14:19:28 | <dminuoso> | gurkenglas: its what ghc comes with (the /installed part) |
| 14:20:05 | <gurkenglas> | dminuoso: so i need to tell cabal to use another ghc, right? how? |
| 14:20:11 | <dminuoso> | Not cabal |
| 14:20:18 | <dminuoso> | Your installation environment |
| 14:20:36 | <dminuoso> | cabal only invokes whatever `ghc` is on path (presumably you can also pass it some flags to point it at a given ghc installation, I do not know) |
| 14:20:37 | <gurkenglas> | .oO( aaaa what is an installation environment ) |
| 14:20:43 | <dminuoso> | Well, ghcup, your package manager |
| 14:20:46 | <dminuoso> | however you installed ghc |
| 14:21:10 | → | L29Ah joins (~L29Ah@wikipedia/L29Ah) |
| 14:22:39 | <gurkenglas> | ooh, ghcup tui was what i needed to type. |
| 14:22:41 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 14:25:44 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 246 seconds) |
| 14:29:15 | <gurkenglas> | His ghc-pkg list output was http://ix.io/4hJW - I tried to as straightforwardly as possible turn that into a package.yaml to run hpack on (possibly it would have made more sense to turn it directly into a .cabal?), but I get the feeling I need to know what it means that there are sections for "/opt/ghc/9.0.1/lib/ghc-9.0.1/package.conf.d" and "/home/gwern/.ghc/x86_64-linux-9.0.1/package.conf.d" in |
| 14:29:21 | <gurkenglas> | order to not jump into dependency hell |
| 14:29:32 | → | LemanR joins (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) |
| 14:30:12 | → | opticblast joins (~Thunderbi@secure-165.caltech.edu) |
| 14:30:46 | → | irrgit__ joins (~irrgit@176.113.74.138) |
| 14:30:46 | <dminuoso> | Are you trying to use cabal old-style? |
| 14:32:10 | × | acidjnk_new quits (~acidjnk@p200300d6e7137a665d3a2af2e35b2922.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 14:32:57 | → | bontaq joins (~user@ool-45779fe5.dyn.optonline.net) |
| 14:34:14 | × | irrgit_ quits (~irrgit@176.113.74.74) (Ping timeout: 260 seconds) |
| 14:34:28 | <gurkenglas> | dminuoso: I'm trying to make vscode/hls work with https://github.com/gwern/gwern.net/tree/master/build |
| 14:34:56 | <dminuoso> | What is this abomination? A polyglot with Haskell, python, R, bash and PHP? |
| 14:35:00 | <dminuoso> | o.o |
| 14:35:14 | <gurkenglas> | doesn't h ave to work with the non-Haskell parts |
| 14:35:49 | <dminuoso> | gurkenglas: anyway, dependency hell is a thing long in the past since v2-style builds (which for years have become the default) |
| 14:35:56 | <dminuoso> | no more ghc-pkg management, no dependency hell. |
| 14:36:01 | × | CiaoSen quits (~Jura@p200300c95747e0002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
| 14:36:05 | <dminuoso> | So how are you trying to build this? |
| 14:36:22 | <gurkenglas> | as far as i understand, hls needs a .cabal file to even, so i asked gwern to do ghc-pkg list, *hoping* that it would work like pip freeze |
| 14:36:46 | <dminuoso> | What is gwern? |
| 14:36:55 | <dminuoso> | Oh thats a who, isnt it? |
| 14:37:25 | <dminuoso> | How does gwern even build this? |
| 14:38:01 | <dminuoso> | Oh man. That code looks like PHP but in Haskell syntax.... |
| 14:38:16 | <dminuoso> | https://github.com/gwern/gwern.net/blob/master/build/LinkMetadata.hs#L1017-L1080 |
| 14:38:17 | <gurkenglas> | yeah you may remember him from classics like "https://github.com/gwern/..." and ".../gwern.net/tree/master/build" :D |
| 14:38:33 | <dminuoso> | Im getting these weird itches when staring at that code.. |
| 14:38:40 | <gurkenglas> | yeah i got those same itches |
| 14:38:47 | <gurkenglas> | how do you think i got into this mess |
| 14:38:54 | → | avicenzi joins (~avicenzi@2a00:ca8:a1f:b004::c32) |
| 14:39:07 | <dminuoso> | Ask your lawyer how to get out of it? |
| 14:39:10 | <dminuoso> | :) |
| 14:39:28 | <gurkenglas> | i'm not fundamentally opposed to being in this mess |
| 14:39:39 | <gurkenglas> | after all, if i were to get out of it, it would still be there |
| 14:39:49 | × | jonathanx quits (~jonathan@h-98-128-168-222.NA.cust.bahnhof.se) (Ping timeout: 260 seconds) |
| 14:39:58 | × | festive_kurbus quits (~festive_k@user/kurbus) (Quit: Client closed) |
| 14:40:25 | <dminuoso> | gurkenglas: anyway, is there any build script or makefile in this mess? |
| 14:40:28 | <gurkenglas> | bringing us back to: how do I properly turn ghc-pkg list output into a working hls |
| 14:40:46 | <dminuoso> | well you need to find a list of packages used in this mess |
| 14:41:04 | <gurkenglas> | http://ix.io/4hJW |
| 14:41:07 | <dminuoso> | use that list of packages to conjure up a build-depends section, include the ghc-pkg output to set appropriate bounds |
| 14:41:16 | <dminuoso> | Yeah but thats not necessarily the packages used here. |
| 14:41:22 | <dminuoso> | Hence my question: where is the build script? |
| 14:41:45 | <gurkenglas> | dminuoso: you mean, there may be packages installed but not used, or used but not installed? |
| 14:41:58 | <dminuoso> | well, first the ghc-pkg may have packages not used for that build process |
| 14:42:05 | <dminuoso> | second, this is also transient dependencies |
| 14:42:23 | <dminuoso> | (which is not necessairly an issue, but also very dishonest) |
| 14:42:43 | → | festive_kurbus joins (~festive_k@user/kurbus) |
| 14:42:43 | <dminuoso> | so where is the build script? |
| 14:42:45 | <gurkenglas> | *googles transient dependencies* dishonest on whose part? |
| 14:43:30 | <dminuoso> | Uhhh hold on... |
| 14:43:33 | <dminuoso> | #!/usr/bin/env runghc |
| 14:43:40 | <dminuoso> | I dont even... |
| 14:44:01 | <dminuoso> | Yeah this entire repository is PHP in Haskell. |
| 14:44:09 | <dminuoso> | Just wow. |
| 14:44:30 | <dminuoso> | I dont think there will be a simple answer how to uncovolute this mess. |
| 14:45:00 | <gurkenglas> | if im following along right we can make it run without unconvoluting it |
| 14:45:18 | <dminuoso> | You would have to write a cabal file (or multiple) with one component per file (or one component if multiple files), to make it at least buildable you can just include every package you have in that ghc-pkg in a build-depends section, and `import` that to each component |
| 14:45:42 | <dminuoso> | (that would allow HLS to pick it up) |
| 14:45:49 | <gurkenglas> | why not one component total? |
| 14:46:12 | <dminuoso> | guess that would probably work too |
| 14:46:18 | <dminuoso> | but you couldnt easily use `cabal run` then. |
| 14:46:40 | <dminuoso> | and it might introduce additional problems in case there's overlapping instances |
| 14:46:44 | <dminuoso> | not entirely sure |
| 14:46:56 | <dminuoso> | but making one component per file is not going to be much work |
| 14:47:10 | <dminuoso> | just feed `ls -1 *.hs` into some template |
| 14:47:33 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 14:47:57 | <dminuoso> | As for the build-depends, just make it a simple sed, turning say `mtl-2.2.2` into `, mtl == 2.2.2` |
| 14:47:57 | → | Sgeo joins (~Sgeo@user/sgeo) |
| 14:48:22 | <dminuoso> | use a `common` section, and `import` it in the template |
| 14:48:40 | × | nattiestnate quits (~nate@202.138.250.13) (Quit: WeeChat 3.7.1) |
| 14:48:49 | <gurkenglas> | so when I turned the ghc-pkg list output into a package.yaml and hpack'd it and ran cabal build I got rejecting: base-4.15.0.0/installed-4.15.0.0 (conflict: regex-compat-tdfa |
| 14:48:52 | <gurkenglas> | +/-newbase +/-splitbase => base<4.15) |
| 14:48:57 | <dminuoso> | and you'll have to resolve the duplicate packages there yourself |
| 14:49:06 | <gurkenglas> | which sounded to me like I failed to execute the strategy "reproduce what he has so it'll at least build *something*" |
| 14:49:17 | <dminuoso> | thats because you're using a too new ghc |
| 14:49:33 | <dminuoso> | this is one of those very unfortunate decisions to decouple base from ghc versions. |
| 14:49:37 | <gurkenglas> | i thought i fixed that when i set the ghc to 9.0.1 |
| 14:49:54 | <gurkenglas> | in ghcup tui |
| 14:50:03 | <dminuoso> | you must then ensure that each dependency has an exact version bound |
| 14:50:13 | → | seydar joins (~seydar@154-27-113-252.starry-inc.net) |
| 14:50:29 | <gurkenglas> | yeah here's the generated .cabal https://bpa.st/IUOA |
| 14:50:30 | <dminuoso> | dont go through hpack (its a bit silly for what you are doing), just write out the cabal yourself |
| 14:50:41 | <dminuoso> | mmm that looks fine in principle |
| 14:50:43 | → | zer0bitz_ joins (~zer0bitz@196.244.192.57) |
| 14:51:25 | × | urdh quits (~urdh@user/urdh) (Ping timeout: 252 seconds) |
| 14:51:26 | <dminuoso> | whats the full error you are getting now? |
| 14:51:46 | <seydar> | here's my day 6 solution, i'd love to get some feedback on it: https://paste.tomsmeding.com/YXQ3z0ow |
| 14:51:54 | <gurkenglas> | dminuoso: https://bpa.st/6QGA |
| 14:51:56 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 246 seconds) |
| 14:52:03 | → | zant joins (~zant@dynamic-089-014-024-192.89.14.pool.telefonica.de) |
| 14:52:26 | → | jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
| 14:52:39 | × | bgamari_ quits (~bgamari@64.223.170.234) (Ping timeout: 260 seconds) |
| 14:52:51 | <dminuoso> | seydar: Im just going to name things in no particular order. In your nubOrd, the element should be strict. |
| 14:52:53 | × | leeb quits (~leeb@tk2-243-31079.vs.sakura.ne.jp) (Quit: ZNC 1.7.2+deb3 - https://znc.in) |
| 14:53:07 | → | urdh joins (~urdh@user/urdh) |
| 14:53:11 | <dminuoso> | or mmm |
| 14:53:30 | <gurkenglas> | seydar: print $ (case args of "one":_ -> partOne; _ -> partTwo) inp |
| 14:54:16 | × | zer0bitz quits (~zer0bitz@196.244.192.57) (Ping timeout: 256 seconds) |
| 14:54:43 | → | bgamari joins (~bgamari@64.223.169.135) |
| 14:55:20 | <dminuoso> | seydar: your use of (!!) and == is better dealt with pattern matching `case args of "one":_ -> ... _ -> ... |
| 14:55:31 | <gurkenglas> | ninja'd |
| 14:55:47 | <dminuoso> | Ah. |
| 14:56:31 | <c_wraith> | dminuoso: what's that about nubOrd? It looks the correct amount of strict to me |
| 14:56:32 | <gurkenglas> | interact $ map (case args of "one":_ -> packetStart; _ -> messageStart) . lines |
| 14:57:13 | × | jludwig quits (~justin@li657-110.members.linode.com) (Changing host) |
| 14:57:13 | → | jludwig joins (~justin@user/jludwig) |
| 14:57:50 | <dminuoso> | c_wraith: Im thinking this should have `go (s (!x):xs) = ...` |
| 14:59:06 | <gurkenglas> | seydar: in general, "foo1 x = foo x 1; foo2 x = foo x 2" indicates that the argument order for foo should be flipped |
| 14:59:22 | <c_wraith> | dminuoso: I don't think that matters for anything. |
| 14:59:26 | <dminuoso> | Mmm. |
| 14:59:29 | <dminuoso> | Fair. |
| 14:59:53 | <gurkenglas> | so uniqueSubstring :: Int -> String -> Int; uniqueSubstring duration = helper 0 |
| 14:59:55 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) |
| 15:00:13 | <c_wraith> | dminuoso: set insert will already force enough evaluation of x to figure out where it goes in the set. and the set insertion itself is forced by branching on the guards |
| 15:00:34 | <gurkenglas> | interact $ map (uniqueSubstring (case args of "one":_ -> 4; _ -> 14)) . lines |
| 15:01:21 | <gurkenglas> | uniq = (==duration) . length . nubOrd . take duration |
| 15:01:22 | × | kraftwerk28 quits (~kraftwerk@178.62.210.83) (Quit: ZNC 1.8.2 - https://znc.in) |
| 15:01:36 | <dminuoso> | c_wraith: Yeah I think Im arriving at the same conclusion. Sometimes I hate non-strict semantics because its not entirely obvious at first glance. |
| 15:02:39 | → | ix joins (~ix@2a02:8010:674f:0:d65d:64ff:fe52:5efe) |
| 15:02:42 | → | kraftwerk28 joins (~kraftwerk@178.62.210.83) |
| 15:02:57 | → | akegalj joins (~akegalj@180-243.dsl.iskon.hr) |
| 15:03:59 | × | zant quits (~zant@dynamic-089-014-024-192.89.14.pool.telefonica.de) (Quit: WeeChat 3.5) |
| 15:04:22 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 15:04:22 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 15:04:22 | → | wroathe joins (~wroathe@user/wroathe) |
| 15:04:26 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Ping timeout: 255 seconds) |
| 15:04:28 | → | zant joins (~zant@dynamic-089-014-024-192.89.14.pool.telefonica.de) |
| 15:05:41 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 15:05:47 | <gurkenglas> | seydar, "uniqueSubstring duration = helper2 . zip [0..] . tails" will get rid of your explicit recursion in helper, and then you can soon remove helper2 completely I think |
| 15:06:18 | × | LemanR quits (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) (Ping timeout: 260 seconds) |
| 15:08:17 | → | LemanR joins (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) |
| 15:08:29 | <gurkenglas> | do we have a one-word shortcut for "snd (mapAccumL f xs)" yet? |
| 15:11:11 | <gurkenglas> | also, is there some language extension that enables a monomorphism restriction which makes "traversable" and "foldable" default to []= |
| 15:11:14 | <gurkenglas> | *[]? |
| 15:11:20 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 15:11:46 | <gurkenglas> | (plus perhaps more, as a tutorial mode for more readable errors) |
| 15:12:33 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 15:13:14 | <[exa]> | gurkenglas: that mapAccumL looks kinda like you could do execState/evaState + traverse but all expressions I'm finding are strictly longer |
| 15:13:32 | × | festive_kurbus quits (~festive_k@user/kurbus) (Quit: Client closed) |
| 15:15:14 | × | dsrt^ quits (~dsrt@76.145.185.103) (Ping timeout: 256 seconds) |
| 15:17:05 | → | festive_kurbus joins (~festive_k@user/kurbus) |
| 15:17:14 | <[exa]> | :t \f xs init -> evalState (traverse (fmap state f) xs) init |
| 15:17:15 | <lambdabot> | Traversable t => (a -> s -> (b, s)) -> t a -> s -> t b |
| 15:17:29 | <[exa]> | gurkenglas: probably not better^ |
| 15:18:05 | <dminuoso> | gurkenglas: the topic of monormophized version comes up every now and then |
| 15:18:28 | × | cafce25 quits (~cafce25@2001:a62:68e:bb01:a1bc:db0:b9af:a2f) (Quit: Client closed) |
| 15:18:29 | <dminuoso> | I've suggested this as a haddock hook rather, where haddock could display a beginner version with polymorphic types monomorphized to some author preferred types. |
| 15:19:10 | <dminuoso> | A language extension that will give you diagnostic that are very different from whatever haddock tells you is not a good idea I think |
| 15:19:18 | × | LemanR quits (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) (Quit: Client closed) |
| 15:20:53 | × | thyriaen quits (~thyriaen@2a01:aea0:dd4:4bae:6245:cbff:fe9f:48b1) (Remote host closed the connection) |
| 15:22:25 | <dminuoso> | Consider how special ($) is treated both in terms of levity polymorphism (which the GHC diagnostics hide, but haddock does not), and in terms of impredicativity (GHC selectively turns on QuickLook for it) |
| 15:22:30 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds) |
| 15:23:50 | × | In0perable quits (~PLAYER_1@fancydata.science) (Excess Flood) |
| 15:24:19 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 15:24:33 | → | acidjnk_new joins (~acidjnk@p200300d6e7137a665d3a2af2e35b2922.dip0.t-ipconnect.de) |
| 15:25:39 | → | Inoperable joins (~PLAYER_1@fancydata.science) |
| 15:27:03 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:6956:303f:1676:5fd5) (Remote host closed the connection) |
| 15:27:21 | → | use-value joins (~Thunderbi@2a00:23c6:8a03:2f01:6956:303f:1676:5fd5) |
| 15:28:16 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
| 15:30:15 | <gurkenglas> | [exa]: yeah usually i use evalState in that situation but it seemed silly when the usecase is that common |
| 15:30:55 | × | notzmv quits (~zmv@user/notzmv) (Ping timeout: 260 seconds) |
| 15:31:30 | × | opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 260 seconds) |
| 15:31:53 | × | fserucas__ quits (~fserucas@212.157.222.3) (Ping timeout: 246 seconds) |
| 15:32:21 | <[exa]> | gurkenglas: you can do it with `fold` if your stuff is monoid :D |
| 15:32:46 | → | ezzieyguywuf joins (~Unknown@user/ezzieyguywuf) |
| 15:33:47 | → | opticblast joins (~Thunderbi@secure-165.caltech.edu) |
| 15:34:21 | <gurkenglas> | :t auf (iso evalState state) traverse -- [exa] |
| 15:34:22 | <lambdabot> | Traversable t => (a -> s -> (b, s)) -> t a -> s -> t b |
| 15:35:54 | × | tabemann_ quits (~tabemann@2600:1700:7990:24e0:ca39:3d1d:9852:a6c9) (Remote host closed the connection) |
| 15:36:04 | × | MajorBiscuit quits (~MajorBisc@145.94.137.174) (Ping timeout: 268 seconds) |
| 15:36:07 | → | tabemann_ joins (~tabemann@2600:1700:7990:24e0:61f0:ea0e:b3a2:c286) |
| 15:36:49 | <gurkenglas> | dminuoso: the full error you wanted is https://bpa.st/6QGA |
| 15:38:09 | × | opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 260 seconds) |
| 15:38:58 | <gurkenglas> | which seems like it would be the first out of dozens or hundreds of errors, which is why I think I failed to execute the strategy "just reproduce gwern's exact environment state and it should build" |
| 15:39:05 | <[exa]> | gurkenglas: lovable auf. |
| 15:40:30 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 15:41:37 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 15:45:00 | → | azimut joins (~azimut@gateway/tor-sasl/azimut) |
| 15:46:48 | <gurkenglas> | [exa]: I was on second thought disturbed that evalState, which I have cached as "has wrong argument order", should fit well into this. in fact: |
| 15:47:02 | <gurkenglas> | :t auf (iso (flip evalState ?s) state) traverse |
| 15:47:03 | <lambdabot> | (?s::s, Traversable t) => (a -> s -> (b, s)) -> t a -> t b |
| 15:48:21 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 15:52:07 | <c_wraith> | gurkenglas: well, it's the wrong argument order because it's the same argument order as runState. and runState has that argument order because it used to be the getter for a newtype, which is what makes that iso work nicely |
| 15:52:34 | × | zant quits (~zant@dynamic-089-014-024-192.89.14.pool.telefonica.de) (Ping timeout: 265 seconds) |
| 15:53:33 | <c_wraith> | At least conceptually. nevermind that Identity hiding in there, it doesn't really exist! |
| 15:53:46 | <gurkenglas> | On third thought, fine. I now see that both of those argument orders have a place. The one evalState has is for drawing a correspondence between "s -> (large, s)" and "s -> (small, s)". The one I've long thought is the right one is for drawing a correspondence between "large" and "s -> (small, s)" |
| 15:57:17 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 15:58:11 | <gurkenglas> | The former composes better, the latter fits into applications. It's like composing lenses vs calling view on a lens |
| 15:59:48 | <gurkenglas> | Which still leaves me at: flip evalState ought to have a name! Perhaps an operator |
| 16:00:00 | → | dsrt^ joins (~dsrt@76.145.185.103) |
| 16:00:34 | <gurkenglas> | https://hackage.haskell.org/package/lens-5.2/docs/Control-Lens-Lens.html#v:-38--126- yes that, thank you memory |
| 16:00:51 | <gurkenglas> | (where's the StateT one?) |
| 16:05:34 | <gurkenglas> | ...oh no, I just remembered that after all these years, IxState didn't take off :( |
| 16:05:48 | → | zant joins (~zant@dynamic-089-014-024-192.89.14.pool.telefonica.de) |
| 16:06:32 | <gurkenglas> | Has anyone played around with having ChatGPT explain their compiler errors? |
| 16:06:48 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 16:08:03 | → | opticblast joins (~Thunderbi@secure-165.caltech.edu) |
| 16:08:24 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) |
| 16:10:59 | <c_wraith> | If it's truly trained on feedback from the internet, it'll mostly say "put a type signature on that and try again" |
| 16:11:36 | <akegalj> | gurkenglas: I think that would be interesting experiment. I played with using chatgpt to give a review on assignments (like teacher assistant would) and results are interesting |
| 16:13:53 | × | festive_kurbus quits (~festive_k@user/kurbus) (Quit: Client closed) |
| 16:16:15 | → | festive_kurbus joins (~festive_k@user/kurbus) |
| 16:17:34 | → | bobbingbob joins (~dfadsva@2604:3d09:207f:f650::7b3a) |
| 16:20:38 | <sm> | or for tech support in channel or on reddit |
| 16:21:01 | × | lortabac quits (~lortabac@2a01:e0a:541:b8f0:3971:4229:3d13:9247) (Quit: WeeChat 2.8) |
| 16:21:12 | <sm> | "what's a good book to learn haskell ?" "why this cabal/stack error ?" "why isn't hls working ?" |
| 16:21:24 | <festive_kurbus> | welcome to tech support |
| 16:22:41 | <gurkenglas> | I appear to have gotten myself into a pickle. I have a directory "cabaltest" containing only cabaltest.cabal with contents: https://bpa.st/QFLQ |
| 16:23:15 | <gurkenglas> | running cabal build gets me: https://bpa.st/4GJA |
| 16:24:29 | × | festive_kurbus quits (~festive_k@user/kurbus) (Quit: Client closed) |
| 16:25:58 | <geekosaur> | a cabal file without a cabal-version field is assumed to be cabal v1 |
| 16:26:37 | <geekosaur> | (cabal library that is) |
| 16:26:58 | <gurkenglas> | ah. how silly of me to think that starting from an empty slate would get comprehensible errors :P |
| 16:27:31 | <geekosaur> | empty slate is `cabal init` |
| 16:28:21 | <geekosaur> | problem is there are still a lot of cabal v1 files floating around that don't declare themselves as such, so cabal-install has to assume any cabal file that doesn't say otherwise is one of the |
| 16:28:24 | <geekosaur> | m |
| 16:29:00 | <geekosaur> | because cabal v2+ are very different from cabal v1 |
| 16:29:38 | <gurkenglas> | geekosaur: shouldn't it be able to notice from looking at "rejecting: test:setup.Cabal-3.4.0.0/installed-3.4.0.0 (conflict: test => test:setup.Cabal>=1.0 && <1.25)" that this is not what's happening, though? |
| 16:30:10 | <geekosaur> | `test:setup.Cabal>=1.0 && <1.25` is precisely that happening |
| 16:30:59 | <geekosaur> | it inserts that dpeendency because it sees what it thinks is a cabal v1 file |
| 16:31:19 | <gurkenglas> | misunderstanding? i mean: shouldn't it notice from the conflict with 3.4 that the file is probably not intended as v1? |
| 16:31:33 | → | festive_kurbus joins (~festive_k@user/kurbus) |
| 16:31:46 | <geekosaur> | no, because people quite often try to build cabal v1 packages with later cabal versions |
| 16:34:07 | <gurkenglas> | ah so that error line expects the user to read it as: "i am rejecting this because you're apparently trying to use Cabal 3.4 to build a Cabal 1.0 project. No can do. Downgrade your cabal installation or change the cabal-version in *.cabal"? |
| 16:34:40 | <geekosaur> | yes |
| 16:35:05 | <geekosaur> | it'd be nice if cabal reported this better, admittedly |
| 16:35:24 | <geekosaur> | it's almost as bad reporting "this package requires a different version of ghc" |
| 16:36:19 | <Hecate> | hello |
| 16:36:29 | <Hecate> | are we talking about ergonomics in haskell tooling? |
| 16:36:34 | <geekosaur> | yep |
| 16:36:50 | <geekosaur> | cabal error messages have long been frustrating |
| 16:36:55 | <Hecate> | indeed they have |
| 16:37:01 | <Hecate> | we can fix this |
| 16:37:40 | <Hecate> | geekosaur: would you mind creating a ticket for this ergonomics problem? |
| 16:41:39 | <geekosaur> | creating |
| 16:48:59 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 16:50:02 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Remote host closed the connection) |
| 16:50:03 | <glguy> | We could probably benefit both from a warning when building a cabal package missing a cabal-version declaration, and a reason attached to the 1.x version bound in the error about unsolvable deps |
| 16:51:36 | <sclv> | glguy: i agree on the version stuff. when we first added the req it was a soft cutover, but enough time had passed. what does “cabal check” say btw |
| 16:52:59 | × | opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 248 seconds) |
| 16:57:20 | <geekosaur> | https://github.com/haskell/cabal/issues/8626 |
| 16:57:30 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) |
| 17:03:07 | × | zant quits (~zant@dynamic-089-014-024-192.89.14.pool.telefonica.de) (Ping timeout: 248 seconds) |
| 17:03:10 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 17:04:54 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 17:07:00 | <gurkenglas> | sclv: http://ix.io/4hUk |
| 17:08:00 | → | Topsi joins (~Topsi@dyndsl-095-033-034-215.ewe-ip-backbone.de) |
| 17:08:20 | <sclv> | that's not a bad set of warnings, lmao. i wonder if any should be upgraded to errors, or to "more vocal" warnings (ones that get displayed even w/o cabal check). |
| 17:08:43 | <gurkenglas> | I wasn't complaining about that set of warnings ^^! in fact I wasn't aware of it |
| 17:08:44 | <sclv> | or maybe if there's enough warnings we can just print "uh... you probably want to run cabal check" |
| 17:08:50 | × | festive_kurbus quits (~festive_k@user/kurbus) (Quit: Client closed) |
| 17:09:03 | <sclv> | right -- the ergonomics is mainly that cabal notices all the problems but doesn't direct you to them |
| 17:09:04 | → | festive_kurbus joins (~festive_k@user/kurbus) |
| 17:09:31 | <sclv> | because users who Know What They Are Doing would tend to get mad at most of these warnings being on by default |
| 17:11:10 | → | zant joins (~zant@62.214.20.26) |
| 17:12:11 | × | alexiscott quits (~user@4.red-83-36-45.dynamicip.rima-tde.net) (Ping timeout: 264 seconds) |
| 17:12:58 | → | alexiscott joins (~user@4.red-83-36-45.dynamicip.rima-tde.net) |
| 17:13:00 | × | Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 260 seconds) |
| 17:13:29 | × | werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 17:13:31 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 17:14:07 | × | seydar quits (~seydar@154-27-113-252.starry-inc.net) (Ping timeout: 252 seconds) |
| 17:16:37 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:17:31 | × | EvanR quits (~EvanR@user/evanr) (Remote host closed the connection) |
| 17:17:49 | → | EvanR joins (~EvanR@user/evanr) |
| 17:19:00 | × | alexiscott quits (~user@4.red-83-36-45.dynamicip.rima-tde.net) (Ping timeout: 255 seconds) |
| 17:20:24 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 17:21:20 | × | ec_ quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
| 17:21:29 | → | sammelweis_ joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 17:21:36 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 256 seconds) |
| 17:21:58 | → | opticblast joins (~Thunderbi@secure-165.caltech.edu) |
| 17:22:22 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 17:22:44 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 17:23:16 | <gurkenglas> | dminuoso: ha, ~all i needed to do for cabal build to work was slap an --allow-newer on it. Now for hls... |
| 17:23:32 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 17:24:41 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Remote host closed the connection) |
| 17:25:44 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 17:26:27 | × | opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 268 seconds) |
| 17:27:41 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 17:28:50 | → | opticblast joins (~Thunderbi@secure-165.caltech.edu) |
| 17:31:13 | × | chele quits (~chele@user/chele) (Quit: Leaving) |
| 17:31:39 | → | LemanR joins (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) |
| 17:31:42 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 17:32:22 | → | seydar joins (~seydar@154-27-113-252.starry-inc.net) |
| 17:33:14 | × | opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 268 seconds) |
| 17:35:57 | × | festive_kurbus quits (~festive_k@user/kurbus) (Quit: Client closed) |
| 17:37:48 | → | bgs joins (~bgs@212-85-160-171.dynamic.telemach.net) |
| 17:38:07 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 17:39:11 | × | Xeroine quits (~Xeroine@user/xeroine) (Ping timeout: 264 seconds) |
| 17:39:32 | → | opticblast joins (~Thunderbi@secure-165.caltech.edu) |
| 17:39:44 | × | avicenzi quits (~avicenzi@2a00:ca8:a1f:b004::c32) (Ping timeout: 256 seconds) |
| 17:39:46 | → | Xeroine joins (~Xeroine@user/xeroine) |
| 17:41:23 | <mrkun[m]> | Are users who know what they are doing really the target audience of the default config |
| 17:41:48 | <geekosaur> | that was the point I tried to make in my ticket |
| 17:42:24 | <geekosaur> | newcomers have no idea they need to work around the history of cabal-install, no idea they should use v2-build and friends, etc. |
| 17:42:39 | <geekosaur> | it's time to let cabal v1 die a natural death, I think |
| 17:43:13 | <gurkenglas> | Ah, probably I need to also tell hls to use --allow-newer. |
| 17:43:18 | <sclv> | geekosaur: btw note this isn't about v1 vs v2 build |
| 17:43:27 | <sclv> | this is about cabal file format versions |
| 17:43:42 | <sclv> | like literally the Cabal 1.0 library and file format |
| 17:44:11 | <mrkun[m]> | Cabal v1 still alive?! Gosh. I'd say some unnaturality would also be appropriate. |
| 17:44:30 | <geekosaur> | no, but I did note that while filing the ticket because of the comment that "you should use v2-build" in the example |
| 17:44:35 | × | ubert1 quits (~Thunderbi@2a02:8109:abc0:6434:6faa:61b1:766c:c219) (Remote host closed the connection) |
| 17:44:44 | <geekosaur> | that might be the first time a newcomer discovers that's an issue |
| 17:45:12 | <geekosaur> | there's a lot of baggage hanging around |
| 17:45:19 | → | use-value1 joins (~Thunderbi@2a00:23c6:8a03:2f01:2d36:9da8:a662:60e2) |
| 17:45:40 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 17:46:27 | → | Erutuon joins (~Erutuon@user/erutuon) |
| 17:47:35 | × | use-value quits (~Thunderbi@2a00:23c6:8a03:2f01:6956:303f:1676:5fd5) (Ping timeout: 264 seconds) |
| 17:47:35 | use-value1 | is now known as use-value |
| 17:50:03 | → | tomokojun joins (~tomokojun@static-198-54-130-102.cust.tzulo.com) |
| 17:56:11 | <gurkenglas> | Looking at haskell-language-server-9.0.1~1.6.1.0 --help to figure out how to get an hie.yaml file to add an --allow-newer flag to, --probe-tools Show haskell-language-server version and other tools |
| 17:56:29 | <gurkenglas> | welp, sometimes your clipboard contents are wrong and contain a newline. |
| 17:58:15 | <gurkenglas> | ...to add an --allow-newer flag to, haskell-language-server-9.0.1\~1.6.1.0 generate-default-config 2>hie.yaml turned out to be not it at all :D |
| 17:59:20 | <gurkenglas> | Can i put the --allow-newer in the *.cabal, since it looks like haskell-language-server wants to not need hie.yaml? |
| 17:59:23 | → | festive_kurbus joins (~festive_k@user/kurbus) |
| 17:59:46 | <sclv> | allow-newer goes in cabal.project |
| 18:00:05 | → | eggplantade joins (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) |
| 18:00:13 | <gurkenglas> | allow me to be dismayed at yet another new kind of file |
| 18:00:17 | <seydar> | gurkenglas, dminuoso: sorry, i got pulled away to a meeting. Thank you both for your feedback! I'm going over it now |
| 18:00:42 | × | LemanR quits (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) (Quit: Client closed) |
| 18:03:26 | × | son0p quits (~ff@2604:3d08:5b7f:5540::a58f) (Ping timeout: 246 seconds) |
| 18:03:41 | → | irrgit_ joins (~irrgit@89.47.234.26) |
| 18:04:06 | × | sammelweis_ quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 18:05:22 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 18:05:29 | × | irrgit__ quits (~irrgit@176.113.74.138) (Ping timeout: 246 seconds) |
| 18:05:59 | × | razetime quits (~quassel@49.207.203.213) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
| 18:06:24 | → | tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
| 18:06:47 | <gurkenglas> | "packages: ./*.cabal\nallow-newer:*" in a cabal.project file made cabal build act like cabal build --allow-newer, thanks |
| 18:06:56 | × | terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Ping timeout: 256 seconds) |
| 18:08:31 | → | terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1) |
| 18:10:05 | <gurkenglas> | https://bpa.st/344Q "Please report this as a GHC bug" :o |
| 18:11:05 | × | Vajb quits (~Vajb@hag-jnsbng11-58c3a5-27.dhcp.inet.fi) (Read error: Connection reset by peer) |
| 18:11:51 | <gurkenglas> | strange that the cabal.project needed the packages: ./*.cabal line, https://cabal.readthedocs.io/en/3.4/cabal-project.html#specifying-the-local-packages says this is the default |
| 18:12:09 | ← | jakalx parts (~jakalx@base.jakalx.net) (Error from remote client) |
| 18:14:22 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 18:14:36 | → | Vajb joins (~Vajb@2001:999:504:3ad6:52a4:a3b5:32d8:e74d) |
| 18:15:07 | → | jakalx joins (~jakalx@base.jakalx.net) |
| 18:15:27 | → | irrgit__ joins (~irrgit@86.106.90.226) |
| 18:18:46 | × | irrgit_ quits (~irrgit@89.47.234.26) (Ping timeout: 252 seconds) |
| 18:19:17 | × | zeenk quits (~zeenk@2a02:2f04:a30d:4300::7fe) (Quit: Konversation terminated!) |
| 18:25:25 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 18:37:08 | → | econo joins (uid147250@user/econo) |
| 18:37:15 | → | son0p joins (~ff@2604:3d08:5b7f:5540::a58f) |
| 18:41:59 | × | stevenxl quits (uid133530@id-133530.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
| 18:44:17 | <gurkenglas> | In one of EK's libraries iirc there's a file defining one arcane category-theory newtype, and among its exports is one function whose type signature does not mention the newtype, and its purpose is to reparanthesize a degenerate nested composition into the more efficient order. What was it? |
| 18:44:24 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 18:45:20 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 18:45:56 | × | Chai-T-Rex quits (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds) |
| 18:49:14 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 18:49:59 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 264 seconds) |
| 18:50:57 | → | Chai-T-Rex joins (~ChaiTRex@user/chaitrex) |
| 18:52:14 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
| 18:53:39 | → | ec joins (~ec@gateway/tor-sasl/ec) |
| 18:53:44 | <mauke> | https://hackage.haskell.org/package/category-extras-0.52.1/docs/Control-Functor-Yoneda.html says it makes stuff more efficient and it looks inscrutable |
| 18:53:53 | → | LemanR joins (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) |
| 18:55:56 | → | Lycurgus joins (~juan@user/Lycurgus) |
| 19:04:03 | × | samt___ quits (uid578768@id-578768.ilkley.irccloud.com) (Quit: Connection closed for inactivity) |
| 19:04:09 | × | eggplantade quits (~Eggplanta@104-55-37-220.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 19:05:19 | → | bjourne2 joins (~bjorn@94.191.136.157.mobile.tre.se) |
| 19:11:20 | × | wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
| 19:14:24 | → | mestre joins (~mestre@191.177.185.178) |
| 19:14:47 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:15:34 | × | seydar quits (~seydar@154-27-113-252.starry-inc.net) (Quit: leaving) |
| 19:16:13 | × | opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 252 seconds) |
| 19:17:28 | × | bjourne2 quits (~bjorn@94.191.136.157.mobile.tre.se) (Read error: Connection reset by peer) |
| 19:18:39 | → | V joins (~v@ircpuzzles/2022/april/winner/V) |
| 19:20:17 | <gurkenglas> | mauke: thanks, that was it! Yoneda was the first thing I looked at, but https://hackage.haskell.org/package/kan-extensions-5.2.5/docs/Data-Functor-Contravariant-Coyoneda.html doesn't give the goods :( |
| 19:20:42 | <gurkenglas> | uh, https://hackage.haskell.org/package/kan-extensions-5.2.5/docs/Data-Functor-Contravariant-Yoneda.html , I mean. |
| 19:21:47 | <gurkenglas> | um. I should have checked your link before affirming |
| 19:22:41 | <gurkenglas> | I still think there was one file defining a newtype and an export that only internally uses it |
| 19:23:12 | <gurkenglas> | (though what you gave slightly decreases my certainty that it exists) |
| 19:23:24 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: Exeunt https://tinyurl.com/4m8d4kd5) |
| 19:25:04 | × | Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 260 seconds) |
| 19:27:43 | × | festive_kurbus quits (~festive_k@user/kurbus) (Quit: Client closed) |
| 19:28:04 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Ping timeout: 252 seconds) |
| 19:28:11 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 19:30:26 | → | money_ joins (~money@user/polo) |
| 19:30:49 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) |
| 19:31:52 | → | coot joins (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
| 19:33:26 | → | troydm joins (~troydm@host-176-37-124-197.b025.la.net.ua) |
| 19:35:41 | → | festive_kurbus joins (~festive_k@user/kurbus) |
| 19:36:51 | → | opticblast joins (~Thunderbi@secure-165.caltech.edu) |
| 19:46:43 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 19:46:56 | → | bjourne2 joins (~bjorn@94.191.136.201.mobile.tre.se) |
| 19:48:13 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 19:48:48 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 19:54:07 | × | sammelweis quits (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) (Quit: No Ping reply in 180 seconds.) |
| 19:54:14 | → | sammelweis joins (~quassel@2601:401:8200:2d4c:bd9:d04c:7f69:eb10) |
| 19:56:04 | → | ericjmorey[m] joins (~ericjmore@2001:470:69fc:105::7afc) |
| 20:00:18 | → | wroathe joins (~wroathe@207-153-38-140.fttp.usinternet.com) |
| 20:00:18 | × | wroathe quits (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
| 20:00:18 | → | wroathe joins (~wroathe@user/wroathe) |
| 20:01:00 | × | tcard quits (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) (Ping timeout: 260 seconds) |
| 20:01:20 | → | fserucas__ joins (~fserucas@laubervilliers-657-1-66-228.w90-63.abo.wanadoo.fr) |
| 20:01:55 | → | tcard joins (~tcard@2400:4051:5801:7500:cf17:befc:ff82:5303) |
| 20:04:44 | → | kenran joins (~user@user/kenran) |
| 20:04:56 | × | kenran quits (~user@user/kenran) (Remote host closed the connection) |
| 20:06:05 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Remote host closed the connection) |
| 20:06:28 | <gqplox[m]> | hello |
| 20:06:43 | × | shriekingnoise quits (~shrieking@186.137.167.202) (Ping timeout: 260 seconds) |
| 20:06:47 | → | shriekingnoise_ joins (~shrieking@186.137.167.202) |
| 20:06:50 | <gqplox[m]> | http://sprunge.us/QNATWu |
| 20:07:27 | <gqplox[m]> | today's aoc seemed pretty simple, how did you guys solve? |
| 20:08:03 | <darkling> | It was easier overall than yesterday, but that's because yesterday's was a bit more complex to parse the input. |
| 20:09:06 | <mauke> | :t fmap (+ 4) . findIndex ((== 4) . length . nub . take 4) . tails |
| 20:09:07 | <lambdabot> | Eq a => [a] -> Maybe Int |
| 20:09:15 | × | wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
| 20:11:17 | <dsal> | gqplox[m]: ha. basically that. |
| 20:11:32 | <dsal> | But I did come up with a thing I liked for doing duplicate checking in a single pass. |
| 20:11:40 | <darkling> | I was a bit more complex: https://github.com/darkling/AoC2022/blob/main/day06/Main.hs |
| 20:12:19 | <dsal> | gqplox[m]: Note that you *usually* don't need explicit recursion because so many concepts already exist. |
| 20:12:57 | <darkling> | It's just finding them that's the hard part. :) |
| 20:13:35 | <dsal> | gqplox[m]: e.g., if you didn't have `findIndex` you could make it by doing something like `fmap head . listToMaybe . filter (\(_,x) -> f x) . zip [0..]` |
| 20:13:50 | dsal | imagines an extra `)` in there |
| 20:14:56 | → | Guest|94 joins (~Guest|94@43.224.111.221) |
| 20:15:10 | <dsal> | > tails "gqplox" |
| 20:15:12 | <lambdabot> | ["gqplox","qplox","plox","lox","ox","x",""] |
| 20:15:15 | <gqplox[m]> | oh nice |
| 20:15:50 | <dsal> | I found a nice way to avoid nub: `allUnique = isJust . foldM (flip $ Set.alterF (bool (Just True) Nothing)) mempty` |
| 20:16:17 | <dsal> | My actual code is `allUnique = isJust . foldM (flip $ BitSet.alterF @Word32 (bool (Just True) Nothing)) (BitSet.bitSet ('a', 'z'))` because I have a BitSet type Ixes a range over a thing that has bits |
| 20:16:24 | <gqplox[m]> | tails is cool i didn't know aaabout that |
| 20:16:46 | <gqplox[m]> | nice |
| 20:16:53 | <mauke> | alternatively: /(.{4})(?(?{ !all_distinct $1 })(?!))/ and say $+[1]; |
| 20:16:55 | <Guest|94> | Hi, I'm having trouble installing ghcup in windows 11. Tried several times w/ and w/o admin. Restarted pc. The bin folder is always empty after installation and "ghc" command is not recognized by powershell (restarted powershell after installation as well) |
| 20:17:09 | <mauke> | is there a haskell regex library that lets you embed arbitrary code in the matching process? |
| 20:17:13 | <mauke> | or is it all just string based? |
| 20:17:19 | <EvanR> | yes haskell can solve these in ones liners like, fmap (+size) . findIndex unique . map (take size) . tails, where unique xs = nub xs == xs, but that's no fun. We need to deploy heavy machinery just because xD |
| 20:17:20 | <dsal> | gqplox[m]: There's a bunch of junk in Data.List and Data.Foldable that are neat. |
| 20:17:33 | <gqplox[m]> | also how i have for examepl, how I have solve input 14 0 I can change it as you can see in this paste |
| 20:17:35 | <gqplox[m]> | http://sprunge.us/yMEq27 |
| 20:17:54 | <dsal> | Your args are out of order, though. input should be last. |
| 20:18:10 | <gqplox[m]> | how can i do this whilst keeping args order the same? |
| 20:18:13 | <mauke> | I mean, that also applies to http://sprunge.us/cuIj3E |
| 20:18:23 | <mauke> | part 2 is literally a one character change |
| 20:19:08 | <dsal> | gqplox[m]: There's often a natural ordering of arguments. You started discovering this when you moved the accumulator (which you'd generally not want to be exposed in your api) |
| 20:19:16 | <gurkenglas> | mauke: https://hackage.haskell.org/package/lens-regex-0.1.3/docs/Text-Regex-Lens.html will let you turn a regex into an optic and then you can compose them with arbitrary optics you have lying around, like filtered |
| 20:19:19 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds) |
| 20:20:40 | <gqplox[m]> | so I guess the best way to do it is to expose the solve taking input and length and then have a where inside solve which calls solve' input length 0 |
| 20:20:50 | <mauke> | gurkenglas: that's just doing stuff with the results of a regex :-/ |
| 20:20:59 | <dsal> | gqplox[m]: Yeah, that's common. Often called something like `go` or `loop` |
| 20:21:44 | <dsal> | e.g. solve l = go 0 where go _ (x:xs) ... |
| 20:22:08 | <dsal> | The next step is "does something like this already exist?" :) |
| 20:22:33 | <dsal> | This is sort of a hylomorphism, but I don't think we have a handy hylomorphism in base do we? |
| 20:23:07 | <EvanR> | there's a natural order of arguments, and then foldl wants them in the other order xD |
| 20:23:12 | → | ddellacosta joins (~ddellacos@static-198-44-136-91.cust.tzulo.com) |
| 20:23:13 | <dsal> | I don't think doing it as a hylomorphism is better than just chaining a bunch of stuff together and let it fuse. |
| 20:23:37 | <dsal> | EvanR: yeah. :( I'm using foldM above which is a left fold. I didn't like that part. |
| 20:24:09 | <mauke> | gurkenglas: I'm looking for something that lets me do more interesting stuff in the [r|...|] part |
| 20:24:30 | → | crazazy joins (~user@mobiela8a1593778d7.roaming.utwente.nl) |
| 20:24:57 | → | pablito joins (~pablito@93.51.40.51) |
| 20:25:03 | ← | pablito parts (~pablito@93.51.40.51) () |
| 20:26:16 | → | otis90 joins (~otis@93.51.40.51) |
| 20:27:24 | <otis90> | Hello, is there some documentation on the syntax adopted in order to use functions on type literals? e.g. https://hackage.haskell.org/package/base-4.17.0.0/docs/GHC-TypeNats.html#t:-60--61- |
| 20:31:25 | <gqplox[m]> | Evan cool solution :) |
| 20:31:50 | <gqplox[m]> | it's nice i was just reading about fmap yesterday too |
| 20:31:53 | <gurkenglas> | mauke: soo you'd like regex-like bindings for a parser combinator library? |
| 20:32:25 | × | fserucas__ quits (~fserucas@laubervilliers-657-1-66-228.w90-63.abo.wanadoo.fr) (Ping timeout: 252 seconds) |
| 20:33:22 | → | christiansen joins (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) |
| 20:33:28 | <mauke> | gurkenglas: good point |
| 20:33:37 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 20:33:40 | <mauke> | yes, I suppose |
| 20:34:03 | <mauke> | or at least more compact notation for parser combinators |
| 20:34:14 | → | pavonia joins (~user@user/siracusa) |
| 20:34:54 | × | trev quits (~trev@user/trev) (Remote host closed the connection) |
| 20:36:38 | × | festive_kurbus quits (~festive_k@user/kurbus) (Quit: Client closed) |
| 20:41:57 | × | phma quits (phma@2001:5b0:210b:fa28:3019:703:1a42:7f84) (Read error: Connection reset by peer) |
| 20:42:05 | <EvanR> | take the most common 10000 haskell combinators and assign a chinese character to each one |
| 20:42:17 | <sm> | ha.. what are regexps after all but a (fixed) set of parser combinators with compact notation |
| 20:42:47 | <geekosaur> | otis90, what about the syntax? |
| 20:42:50 | → | phma joins (~phma@2001:5b0:2144:44d8:212c:2869:b063:882b) |
| 20:42:51 | <zzz> | is `LeErrMsg` what they call error messages in French? |
| 20:42:54 | <EvanR> | sm, that usually return () xD |
| 20:43:17 | <EvanR> | or always, if you don't have captures |
| 20:44:23 | × | Guest|94 quits (~Guest|94@43.224.111.221) (Quit: Connection closed) |
| 20:46:52 | × | opticblast quits (~Thunderbi@secure-165.caltech.edu) (Ping timeout: 268 seconds) |
| 20:47:42 | → | ec_ joins (~ec@gateway/tor-sasl/ec) |
| 20:49:14 | → | `2jt joins (~jtomas@129.red-88-17-230.dynamicip.rima-tde.net) |
| 20:50:35 | × | ec quits (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
| 20:51:01 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 20:58:43 | → | oldsk00l joins (~znc@ec2-18-194-66-165.eu-central-1.compute.amazonaws.com) |
| 20:59:33 | → | jmdaemon joins (~jmdaemon@user/jmdaemon) |
| 21:01:56 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 246 seconds) |
| 21:03:48 | × | heinz9 quits (~trace@user/trace) (Remote host closed the connection) |
| 21:05:53 | → | tromp joins (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
| 21:06:00 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
| 21:06:02 | × | otis90 quits (~otis@93.51.40.51) (Quit: Client closed) |
| 21:06:35 | → | eggplantade joins (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) |
| 21:11:11 | × | eggplantade quits (~Eggplanta@2600:1700:38c5:d800:111a:339b:4372:c307) (Ping timeout: 255 seconds) |
| 21:12:20 | × | `2jt quits (~jtomas@129.red-88-17-230.dynamicip.rima-tde.net) (Ping timeout: 248 seconds) |
| 21:12:41 | × | LemanR quits (~LemanR@pool-74-109-28-147.phlapa.fios.verizon.net) (Quit: Client closed) |
| 21:16:00 | × | gmg quits (~user@user/gehmehgeh) (Remote host closed the connection) |
| 21:16:40 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 21:19:36 | → | gmg joins (~user@user/gehmehgeh) |
| 21:21:11 | × | Patternmaster quits (~georg@user/Patternmaster) (Ping timeout: 264 seconds) |
| 21:21:24 | → | Patternmaster joins (~georg@user/Patternmaster) |
| 21:22:55 | → | mvk joins (~mvk@2607:fea8:5ce3:8500::efb) |
| 21:22:56 | × | mvk quits (~mvk@2607:fea8:5ce3:8500::efb) (Client Quit) |
| 21:26:45 | × | jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 260 seconds) |
| 21:28:53 | × | mmhat quits (~mmh@p200300f1c73b51cbee086bfffe095315.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 21:29:15 | → | mmhat joins (~mmh@p200300f1c73b5136ee086bfffe095315.dip0.t-ipconnect.de) |
| 21:32:52 | × | kenaryn quits (~aurele@89-88-44-27.abo.bbox.fr) (Quit: Lost terminal) |
| 21:35:12 | → | waleee joins (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
| 21:35:49 | <shapr> | is there some way to use FFI from inside ghci? |
| 21:35:54 | <shapr> | I mean, it seems unlikely |
| 21:37:59 | <geekosaur> | use FFI should just work. declare it, probably not, it doesn't support the syntax from the prompt yet |
| 21:38:14 | <tomsmeding> | mauke: https://paste.tomsmeding.com/iPIXa20t |
| 21:39:43 | <tomsmeding> | as we say in dutch, "warranty till your front door", i.e. I tested it on 1 input lol |
| 21:40:54 | <geekosaur> | actually it works at the prompt: https://paste.tomsmeding.com/lAFdhG53 |
| 21:41:38 | <tomsmeding> | mauke: for example, `render (Optional)` should probably return some empty groups if it doesn't match :p |
| 21:42:26 | → | kenaryn joins (~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) |
| 21:45:47 | <geekosaur> | shapr, if you need an external library you probably have to exit and restart ghci with the library specified on the command line; last I heard there wasn't a way to attach one after startup |
| 21:46:05 | <shapr> | geekosaur: oh is there an example of that? |
| 21:46:05 | × | tromp quits (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
| 21:46:43 | <geekosaur> | example of what? it's just "ghci [foo.hs] -lsomelib" (or "someobj.o" or whatever) |
| 21:46:57 | <shapr> | oh ok, thanks |
| 21:49:13 | <shapr> | we've cross-compiled a shared object via rustc onto android, next to see if it works in ghci |
| 21:49:26 | <shapr> | I was surprised to discover that ghci works fine in termux on my phone |
| 21:50:03 | × | gmg quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 21:50:04 | <tomsmeding> | Note the use of parsec to parse a parsec parser |
| 21:50:06 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 252 seconds) |
| 21:51:18 | <shapr> | wow |
| 21:51:24 | <mauke> | TIL about unsafeCodeCoerce |
| 21:52:24 | <dsal> | tomsmeding: I heard you liked parsers |
| 21:53:19 | <shapr> | :-D |
| 21:53:24 | <tomsmeding> | mauke: it's not quite as unsafe as unsafeCoerce though, the resulting haskell expression is still run through the typechecker as usual |
| 21:54:02 | <EvanR> | fix parsec |
| 21:55:10 | × | shailangsa quits (~shailangs@host217-39-45-196.range217-39.btcentralplus.com) (Remote host closed the connection) |
| 21:56:30 | → | `2jt joins (~jtomas@129.red-88-17-230.dynamicip.rima-tde.net) |
| 21:57:44 | → | Kaiepi joins (~Kaiepi@108.175.84.104) |
| 21:58:23 | × | `2jt quits (~jtomas@129.red-88-17-230.dynamicip.rima-tde.net) (Client Quit) |
| 22:00:11 | × | Kaipei quits (~Kaiepi@108.175.84.104) (Ping timeout: 264 seconds) |
| 22:02:01 | <tomsmeding> | % :t \s -> fix (\p -> let Right p' = Text.Parsec.parse p "" s in p') |
| 22:02:01 | <yahb2> | <interactive>:1:7: error: ; Variable not in scope: ; fix :: (Text.Parsec.Prim.Parsec s () a0 -> a0) -> t |
| 22:02:12 | <tomsmeding> | % import Data.Function |
| 22:02:12 | <yahb2> | <no output> |
| 22:02:23 | <tomsmeding> | % :t \s -> fix (\p -> let Right p' = Text.Parsec.parse p "" s in p') |
| 22:02:23 | <yahb2> | <interactive>:1:61: error: ; • Couldn't match expected type ‘Text.Parsec.Prim.Parsec s () a’ ; with actual type ‘a’ ; ‘a’ is a rigid type variable bound by ; the... |
| 22:02:27 | × | michalz quits (~michalz@185.246.204.72) (Remote host closed the connection) |
| 22:02:39 | <tomsmeding> | Ah right |
| 22:09:48 | × | coot quits (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
| 22:23:38 | → | jargon joins (~jargon@184.101.177.18) |
| 22:24:47 | × | christiansen quits (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) (Ping timeout: 264 seconds) |
| 22:27:59 | → | jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
| 22:28:20 | × | phma quits (~phma@2001:5b0:2144:44d8:212c:2869:b063:882b) (Read error: Connection reset by peer) |
| 22:28:44 | → | phma joins (phma@2001:5b0:2144:44d8:212c:2869:b063:882b) |
| 22:30:04 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 22:34:23 | × | waleee quits (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 264 seconds) |
| 22:35:47 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 22:36:16 | × | Kaiepi quits (~Kaiepi@108.175.84.104) (Remote host closed the connection) |
| 22:36:40 | × | bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 256 seconds) |
| 22:37:14 | → | shailangsa joins (~shailangs@host217-39-45-196.range217-39.btcentralplus.com) |
| 22:37:17 | → | Kaiepi joins (~Kaiepi@108.175.84.104) |
| 22:39:13 | × | zant quits (~zant@62.214.20.26) (Quit: WeeChat 3.5) |
| 22:39:28 | → | zant joins (~zant@62.214.20.26) |
| 22:41:52 | → | waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) |
| 22:46:19 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
| 22:46:59 | × | akegalj quits (~akegalj@180-243.dsl.iskon.hr) (Quit: leaving) |
| 22:49:04 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 22:49:37 | × | oldsk00l quits (~znc@ec2-18-194-66-165.eu-central-1.compute.amazonaws.com) (Remote host closed the connection) |
| 22:50:00 | <money> | Hey |
| 22:55:56 | × | gurkenglas quits (~gurkengla@p548ac72e.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 22:59:53 | → | christiansen joins (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) |
| 23:04:59 | × | waleee quits (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) (Ping timeout: 264 seconds) |
| 23:05:00 | × | christiansen quits (~christian@83-95-137-75-dynamic.dk.customer.tdc.net) (Ping timeout: 256 seconds) |
| 23:07:41 | → | crazazy` joins (~user@130.89.173.127) |
| 23:09:39 | × | crazazy quits (~user@mobiela8a1593778d7.roaming.utwente.nl) (Ping timeout: 260 seconds) |
| 23:09:45 | × | crazazy` quits (~user@130.89.173.127) (Remote host closed the connection) |
| 23:17:38 | <iqubic> | tomsmeding: What ae you trying to do? |
| 23:18:53 | → | beteigeuze joins (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
| 23:19:35 | × | Tuplanolla quits (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.) |
| 23:21:02 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 268 seconds) |
| 23:25:31 | → | gurkenglas joins (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
| 23:26:08 | <iqubic> | s/ae/are/ |
| 23:28:06 | → | waleee joins (~waleee@h-176-10-137-138.NA.cust.bahnhof.se) |
| 23:31:01 | → | king_gs joins (~Thunderbi@187.201.204.122) |
| 23:32:24 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 23:32:32 | <dsal> | ær |
| 23:32:32 | → | masterbuilder joins (~master@user/masterbuilder) |
| 23:33:01 | × | kenaryn quits (~aurele@cre71-h03-89-88-44-27.dsl.sta.abo.bbox.fr) (Quit: leaving) |
| 23:34:26 | × | stiell quits (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
| 23:35:50 | × | king_gs quits (~Thunderbi@187.201.204.122) (Ping timeout: 268 seconds) |
| 23:36:39 | → | stiell joins (~stiell@gateway/tor-sasl/stiell) |
| 23:45:25 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 23:45:40 | × | hippoid quits (~idris@user/hippoid) (Quit: WeeChat 3.5) |
| 23:46:07 | × | mestre quits (~mestre@191.177.185.178) (Quit: Lost terminal) |
| 23:46:30 | → | merijn joins (~merijn@86-86-29-250.fixed.kpn.net) |
| 23:46:43 | → | hippoid joins (~idris@user/hippoid) |
| 23:49:33 | × | aliosablack quits (~chomwitt@2a02:587:7a0c:6a00:1ac0:4dff:fedb:a3f1) (Ping timeout: 260 seconds) |
| 23:49:36 | × | bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
| 23:49:46 | × | acidjnk_new quits (~acidjnk@p200300d6e7137a665d3a2af2e35b2922.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
| 23:50:44 | → | bitdex joins (~bitdex@gateway/tor-sasl/bitdex) |
| 23:51:25 | × | merijn quits (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 260 seconds) |
| 23:59:33 | → | opticblast joins (~Thunderbi@secure-165.caltech.edu) |
All times are in UTC on 2022-12-06.