2022-12-02 00:02:20 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 260 seconds) |
2022-12-02 00:03:09 +0100 | fockerize | (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 260 seconds) |
2022-12-02 00:04:52 +0100 | <rustisafungus> | hmm, page 13 here if anyone is curious https://simons.berkeley.edu/sites/default/files/docs/4393/moshevardi.pdf |
2022-12-02 00:05:20 +0100 | <rustisafungus> | this actually ought to overlap a lot with quickcheck |
2022-12-02 00:06:31 +0100 | <rustisafungus> | https://github.com/meelgroup/unigen |
2022-12-02 00:06:49 +0100 | king_gs | (~Thunderbi@187.201.204.122) |
2022-12-02 00:07:18 +0100 | neightchan | (~nate@98.45.169.16) |
2022-12-02 00:07:49 +0100 | natechan | (~nate@98.45.169.16) (Ping timeout: 260 seconds) |
2022-12-02 00:11:11 +0100 | gqplox | (~textual@2a02:c7c:941d:fd00:88ea:12e4:aa87:535d) |
2022-12-02 00:11:44 +0100 | <gqplox> | hi guys |
2022-12-02 00:11:53 +0100 | <rustisafungus> | hi gqplox |
2022-12-02 00:11:58 +0100 | <shapr> | howdy |
2022-12-02 00:12:07 +0100 | acidjnk_new | (~acidjnk@p200300d6e7137a26a0c5c39a40faf46b.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2022-12-02 00:12:13 +0100 | <gqplox> | i did my first advent of code today |
2022-12-02 00:12:30 +0100 | <shapr> | nice |
2022-12-02 00:12:32 +0100 | <rustisafungus> | in C++? |
2022-12-02 00:12:42 +0100 | <gqplox> | haha |
2022-12-02 00:12:44 +0100 | <gqplox> | haskell :) |
2022-12-02 00:12:50 +0100 | <rustisafungus> | oh |
2022-12-02 00:12:50 +0100 | <gqplox> | http://sprunge.us/AM56z3 |
2022-12-02 00:12:58 +0100 | Guest75 | (~Guest75@178.141.153.191) (Quit: Client closed) |
2022-12-02 00:13:00 +0100 | <gqplox> | please let me know improvements i could make |
2022-12-02 00:13:42 +0100 | <gqplox> | I think the groups there is a better way of doing it because filter is kind of a hack |
2022-12-02 00:14:23 +0100 | <gqplox> | also I think there must be a better way to write the groupBy without using the lambda right? |
2022-12-02 00:16:33 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 00:17:16 +0100 | gmg | (~user@user/gehmehgeh) (Quit: Leaving) |
2022-12-02 00:21:22 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
2022-12-02 00:21:36 +0100 | <EvanR> | what's the policy on AoC help on the same day the question is still happening |
2022-12-02 00:21:45 +0100 | <EvanR> | spoiler channel? |
2022-12-02 00:23:47 +0100 | <gqplox> | oh sorry! |
2022-12-02 00:26:25 +0100 | king_gs | (~Thunderbi@187.201.204.122) (Read error: Connection reset by peer) |
2022-12-02 00:26:34 +0100 | king_gs1 | (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) |
2022-12-02 00:26:46 +0100 | <geekosaur> | people have been helping out all day so I think it's a bit late for that |
2022-12-02 00:27:35 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 00:28:06 +0100 | <geekosaur> | usually after they've already solved it in whatever way, looking for improvements as here |
2022-12-02 00:28:07 +0100 | <yushyin> | at least mark the link as a day01 spoiler next time? |
2022-12-02 00:28:51 +0100 | king_gs1 | king_gs |
2022-12-02 00:29:39 +0100 | <sm> | we usually had a separate channel for advent solutions ? |
2022-12-02 00:30:27 +0100 | <dsal> | #adventofcode-spoilers is a #haskell2 |
2022-12-02 00:30:51 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 00:30:55 +0100 | <gqplox> | yyep sorry, I'll take care for next time |
2022-12-02 00:31:59 +0100 | sammelweis | (~quassel@c-68-48-18-140.hsd1.mi.comcast.net) (Ping timeout: 264 seconds) |
2022-12-02 00:32:08 +0100 | <dsal> | I made a foldable monoidal type that could hold N items and just used a different type for part 1 and part 2 and used sum to go `Top n Int -> Int` |
2022-12-02 00:32:27 +0100 | <monochrom> | IMO no worries in this case because just a few lines before the link it's already said this is someone's AoC solution. |
2022-12-02 00:32:33 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
2022-12-02 00:32:36 +0100 | zant | (~zant@62.214.20.26) (Ping timeout: 248 seconds) |
2022-12-02 00:32:54 +0100 | <dsal> | Theoretically, my parser does all the folding, but in practice, I'm using megaparsec which collects everything into a list before I can fold it. |
2022-12-02 00:33:01 +0100 | <monochrom> | Instead, more people should learn: 1. Read the context; 2. Don't just click links. |
2022-12-02 00:33:20 +0100 | <dsal> | I need to make variations of `sepBy` et. al. that let me bring my own monoid. |
2022-12-02 00:34:00 +0100 | Guest75 | (~Guest75@178.141.153.191) |
2022-12-02 00:35:25 +0100 | <dsal> | My solution is way better than the above though because instead of `solve 1` I get to type `solve @1` with a ton of extensions. |
2022-12-02 00:35:32 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
2022-12-02 00:36:59 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
2022-12-02 00:39:29 +0100 | <gqplox> | so is there a cleaner way to write the lambda where I used the groupBy? |
2022-12-02 00:39:36 +0100 | <gqplox> | I think there must be right? |
2022-12-02 00:41:13 +0100 | <jackdk> | `const (/= "")`? |
2022-12-02 00:41:20 +0100 | <dsal> | @pl \_ x -> x /= "" |
2022-12-02 00:41:20 +0100 | <lambdabot> | const ([] /=) |
2022-12-02 00:41:25 +0100 | <monochrom> | heh |
2022-12-02 00:41:37 +0100 | opticblast | (~Thunderbi@secure-165.caltech.edu) (Remote host closed the connection) |
2022-12-02 00:42:46 +0100 | <dsal> | maybe `const (not . null)` |
2022-12-02 00:42:54 +0100 | xff0x | (~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 256 seconds) |
2022-12-02 00:44:09 +0100 | zant | (~zant@62.214.20.26) |
2022-12-02 00:44:27 +0100 | <gqplox> | ah cool thank you |
2022-12-02 00:44:42 +0100 | <gqplox> | do you have any general feedback? |
2022-12-02 00:45:19 +0100 | oldsk00l | (~znc@ec2-18-185-101-38.eu-central-1.compute.amazonaws.com) (Remote host closed the connection) |
2022-12-02 00:45:30 +0100 | <gqplox> | @pl parse s = map (map read) (groups $ lines s) |
2022-12-02 00:45:30 +0100 | <lambdabot> | parse = map (map read) . groups . lines |
2022-12-02 00:46:29 +0100 | <dsal> | I was about to type something like that. Not sure it's *better*, but I'd probably have written that `parse = (fmap . fmap) read . groups . lines` |
2022-12-02 00:48:06 +0100 | <gqplox> | nice, thank you |
2022-12-02 00:48:24 +0100 | <dsal> | And `groups = fmap (filter (not . null)) . groupBy (const (not . null))` |
2022-12-02 00:49:20 +0100 | <dsal> | that's slightly better to me, but that doesn't mean it's better in general. |
2022-12-02 00:49:41 +0100 | <dsal> | I don't like unnecessary names (like `xs`) and I do like reading something like this as a pipeline from right to left. |
2022-12-02 00:50:49 +0100 | ub | (~Thunderbi@p200300ecdf264efbff642f477e75bc86.dip0.t-ipconnect.de) |
2022-12-02 00:51:14 +0100 | ubert | (~Thunderbi@p200300ecdf264e704707c189dcb0868f.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2022-12-02 00:51:14 +0100 | ub | ubert |
2022-12-02 00:51:19 +0100 | <dsal> | Similarly, I'd just say `parsed <- parse <$> readFile "01_input.txt"` so I'd have one fewer name / line of code that aren't essential. |
2022-12-02 00:51:31 +0100 | <dsal> | Basically, I don't like code, so I try to get rid of it where I can. |
2022-12-02 00:51:48 +0100 | chele | (~chele@user/chele) (Remote host closed the connection) |
2022-12-02 00:52:24 +0100 | <gqplox> | hahah fair point |
2022-12-02 00:52:41 +0100 | <gqplox> | i did initially have not . null but i changed it back |
2022-12-02 00:52:49 +0100 | <gqplox> | ah I don't know the <$> ill look that up |
2022-12-02 00:52:52 +0100 | <dsal> | Yeah, I'd go either way on that. |
2022-12-02 00:53:09 +0100 | <dsal> | <$> is fmap. You can't write any haskell code without. |
2022-12-02 00:53:14 +0100 | <monochrom> | I like code, but I don't like names. Similar conclusion though. |
2022-12-02 00:54:49 +0100 | <monochrom> | \_ (*) -> (*) /= "" |
2022-12-02 00:55:16 +0100 | <dsal> | One thing I did in mine was just not keep that inner `[Int]` -- you don't ever need it. My parser sums it while reading. |
2022-12-02 00:55:18 +0100 | <ChaiTRex> | In GHCi, `it` refers to the result of the last line. Is there a way to get the result of other previous lines? |
2022-12-02 00:55:25 +0100 | <monochrom> | No. |
2022-12-02 00:56:22 +0100 | <dsal> | The rule of thumb in GHCI is that if you want to do something that's not obvious, you probably shouldn't be in ghci. :) |
2022-12-02 00:56:48 +0100 | <monochrom> | I have a better rule. Or worse? I have a tautology... >:) |
2022-12-02 00:57:12 +0100 | <monochrom> | If you want to do something that ghci doesn't do, you shouldn't be in ghci >:) |
2022-12-02 00:57:26 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 00:57:58 +0100 | <monochrom> | A good rule though is: just don't expect ghci to be feature-rich. |
2022-12-02 00:58:37 +0100 | <hpc> | another general rule, find the things your tools are good at, and try to only do those things |
2022-12-02 00:58:42 +0100 | <monochrom> | We barely succeeded to convince the authors to add line editing. |
2022-12-02 00:59:07 +0100 | <hpc> | for ghci, imo that's mainly just :r |
2022-12-02 00:59:12 +0100 | <gqplox> | thank you guys for the help |
2022-12-02 00:59:27 +0100 | <gqplox> | heading off now, bye |
2022-12-02 00:59:31 +0100 | <monochrom> | Ugh that sounds dangerously close to "if you have a hammer, think of everything as only nails" |
2022-12-02 00:59:45 +0100 | <hpc> | more like if you have a hammer, don't buy screws |
2022-12-02 00:59:53 +0100 | <monochrom> | haha |
2022-12-02 01:00:02 +0100 | <ChaiTRex> | OK, thanks. |
2022-12-02 01:00:16 +0100 | <monochrom> | My dad has a hammering drill. |
2022-12-02 01:01:22 +0100 | <hpc> | ugh, this is just reminding me of how my nas upgrade went now |
2022-12-02 01:01:32 +0100 | <hpc> | tldr, https://monroeengineering.com/blog/how-jis-screws-differ-from-phillips-head-screws/ was VERY IMPORTANT and i almost found that out too late |
2022-12-02 01:01:44 +0100 | Guest88 | (~Guest88@c-67-183-222-152.hsd1.wa.comcast.net) |
2022-12-02 01:02:14 +0100 | <monochrom> | Ah right, yikes. |
2022-12-02 01:02:25 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 260 seconds) |
2022-12-02 01:02:30 +0100 | Guest88 | (~Guest88@c-67-183-222-152.hsd1.wa.comcast.net) (Client Quit) |
2022-12-02 01:02:59 +0100 | <monochrom> | A long history of: Japan domestic products differ trickily from US+Europe products. |
2022-12-02 01:03:11 +0100 | <monochrom> | For example, PCs back in the DOS days. |
2022-12-02 01:04:35 +0100 | <rustisafungus> | yeah like my japanese nintendo won't plug in to my harley davidson, what gives |
2022-12-02 01:05:16 +0100 | gqplox | (~textual@2a02:c7c:941d:fd00:88ea:12e4:aa87:535d) (Quit: Textual IRC Client: www.textualapp.com) |
2022-12-02 01:05:24 +0100 | <hpc> | should have plugged your saturn into your saturn |
2022-12-02 01:05:34 +0100 | <monochrom> | So, did you use a hammering drill to force your screws? :) |
2022-12-02 01:05:36 +0100 | xff0x | (~xff0x@ai071162.d.east.v6connect.net) |
2022-12-02 01:06:43 +0100 | aplainzetakind | (~aplainzet@178.249.214.17) |
2022-12-02 01:07:13 +0100 | <rustisafungus> | ok so how many hours do i have to hang around #haskell before i know the language well |
2022-12-02 01:08:14 +0100 | <dsal> | My wife's native language isn't English and I've been hanging around her for years and other than knowing when I'm in trouble, I don't know her native language at all. |
2022-12-02 01:08:16 +0100 | <hpc> | well, #haskell was created somewhere around the year 2000, so let's say at least that long :D |
2022-12-02 01:09:15 +0100 | <hpc> | but really it depends more on how actively you pursue learning it and such |
2022-12-02 01:09:26 +0100 | <monochrom> | infinitely many hours. |
2022-12-02 01:09:32 +0100 | pta2002 | (~pta2002@2001:818:ea73:e00:7ca6:1dab:9d99:2202) |
2022-12-02 01:09:42 +0100 | <hpc> | it took me about a month to tear down all my java/python preconceptions and build them back up to where i could write an irc bot |
2022-12-02 01:10:02 +0100 | <monochrom> | "How many World Cup matches do I watch to get good at soccer?" Answer: Infinite. |
2022-12-02 01:10:13 +0100 | <monochrom> | This is not a spectator sport. |
2022-12-02 01:11:16 +0100 | <monochrom> | Solution: I hang around #haskell after I know the language well. |
2022-12-02 01:11:18 +0100 | <hpc> | #haskell is more a source of peer review and things to google |
2022-12-02 01:12:19 +0100 | td__ | (~td@83.135.9.43) (Quit: waking up from the american dream ...) |
2022-12-02 01:12:28 +0100 | <rustisafungus> | 2000 years is a long time to spend on irc |
2022-12-02 01:14:36 +0100 | <rustisafungus> | buy defect process on steam and leave rave reviews praising the author for haskell-fu https://github.com/incoherentsoftware/defect-process |
2022-12-02 01:16:06 +0100 | dsrt^ | (~dsrt@76.145.185.103) |
2022-12-02 01:16:20 +0100 | king_gs | (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) (Ping timeout: 256 seconds) |
2022-12-02 01:17:06 +0100 | pta2002 | (~pta2002@2001:818:ea73:e00:7ca6:1dab:9d99:2202) (Quit: pta2002) |
2022-12-02 01:17:42 +0100 | dnlsur | (~textual@r179-25-244-111.dialup.adsl.anteldata.net.uy) |
2022-12-02 01:20:07 +0100 | rustisafungus | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 256 seconds) |
2022-12-02 01:20:58 +0100 | michalz | (~michalz@185.246.204.65) (Remote host closed the connection) |
2022-12-02 01:25:03 +0100 | aplainzetakind | (~aplainzet@178.249.214.17) (Ping timeout: 260 seconds) |
2022-12-02 01:25:48 +0100 | dnlsur | (~textual@r179-25-244-111.dialup.adsl.anteldata.net.uy) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-12-02 01:30:10 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 01:30:45 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-152.elisa-laajakaista.fi) (Quit: Leaving.) |
2022-12-02 01:31:19 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2022-12-02 01:34:30 +0100 | Guest4960 | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) |
2022-12-02 01:35:02 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
2022-12-02 01:36:20 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 01:36:58 +0100 | Guest4960 | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit) |
2022-12-02 01:37:46 +0100 | rustisafungus | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) |
2022-12-02 01:43:25 +0100 | Deide_ | (~Deide@wire.desu.ga) |
2022-12-02 01:44:51 +0100 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) (Quit: Leaving) |
2022-12-02 01:45:01 +0100 | dnlsur | (~textual@r179-25-244-111.dialup.adsl.anteldata.net.uy) |
2022-12-02 01:48:34 +0100 | <sm> | you can learn a lot hanging out here, but as said it's not enough |
2022-12-02 01:48:58 +0100 | <rustisafungus> | you're right i should join #agda too |
2022-12-02 01:51:57 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-12-02 01:52:55 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-02 02:02:48 +0100 | dnlsur | (~textual@r179-25-244-111.dialup.adsl.anteldata.net.uy) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2022-12-02 02:03:52 +0100 | natto | (~natto@140.238.225.67) (Quit: a.) |
2022-12-02 02:04:25 +0100 | ian_ | (~ian@matrix.chaos.earth.li) (Remote host closed the connection) |
2022-12-02 02:06:00 +0100 | td_ | (~td@83.135.9.43) |
2022-12-02 02:06:01 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds) |
2022-12-02 02:06:35 +0100 | natto | (~natto@140.238.225.67) |
2022-12-02 02:06:47 +0100 | <monochrom> | hahaha |
2022-12-02 02:07:07 +0100 | <EvanR> | monochrom, elaborate on these japanese dos differences |
2022-12-02 02:07:34 +0100 | natto | (~natto@140.238.225.67) (Client Quit) |
2022-12-02 02:07:42 +0100 | <monochrom> | "How many FIFA World Cup matches do I need to watch?" "Infinite." "You're right, I need to also watch Rugby World Cup too." |
2022-12-02 02:08:02 +0100 | <monochrom> | I forgot the actual differences. |
2022-12-02 02:09:52 +0100 | natto | (~natto@140.238.225.67) |
2022-12-02 02:10:08 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2022-12-02 02:10:33 +0100 | <geekosaur> | which rugby? |
2022-12-02 02:10:38 +0100 | <geekosaur> | 😛 |
2022-12-02 02:10:43 +0100 | <monochrom> | yikes |
2022-12-02 02:10:48 +0100 | <rustisafungus> | so basically haskell is the only language i can use to watch the world cup, you are saying |
2022-12-02 02:11:14 +0100 | <geekosaur> | (league and union are effectively two different sports. and you can see the origins of NFL in league) |
2022-12-02 02:12:43 +0100 | <rustisafungus> | is a sport a kind of monad |
2022-12-02 02:14:01 +0100 | <sm> | I have an actual haskell questino |
2022-12-02 02:14:06 +0100 | <davean> | I feel like rustisafungus is having a conversation with himself. |
2022-12-02 02:14:14 +0100 | <davean> | sm: yes, yes, that please. |
2022-12-02 02:14:21 +0100 | natto | (~natto@140.238.225.67) (Client Quit) |
2022-12-02 02:14:55 +0100 | <EvanR> | monadball |
2022-12-02 02:15:03 +0100 | <sm> | it's been a while since I updated stackage's build-constraints, and I'm always flailing around a bit with git. Do you know a simple reliable efficient way ? If not involving web browser, all the better ? |
2022-12-02 02:15:08 +0100 | natto | (~natto@140.238.225.67) |
2022-12-02 02:15:52 +0100 | <sm> | I have the github cli gh installed. Typically I cd src/stackage, git pull, then commit my change (on master), then I try to gh pr create -f and it tells me I can't |
2022-12-02 02:16:15 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2022-12-02 02:16:27 +0100 | <davean> | Oh so you're talking about workflow stuff :( I'm useless |
2022-12-02 02:16:35 +0100 | natto | (~natto@140.238.225.67) (Client Quit) |
2022-12-02 02:16:50 +0100 | <sm> | IIRC I need to create a branch first. What name ? does it matter to stackage ? do I have old stackage branches already on github ? There must be an easier way |
2022-12-02 02:17:19 +0100 | <sm> | my actual haskell is "actually getting things done with haskell" I guess, sorry |
2022-12-02 02:17:59 +0100 | <sm> | actually getting things done as a haskell developer... ? why does git suck ? |
2022-12-02 02:18:28 +0100 | <EvanR> | darcs it is |
2022-12-02 02:18:35 +0100 | <sm> | ok now I'm thinking the best thing is just use github web ui |
2022-12-02 02:19:04 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 260 seconds) |
2022-12-02 02:19:20 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-12-02 02:19:47 +0100 | natto | (~natto@140.238.225.67) |
2022-12-02 02:19:57 +0100 | <davean> | sm: so I know nothing about stackage, but you can create a branch with git, and a merge request github style kinda needs a branch |
2022-12-02 02:19:58 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-02 02:20:01 +0100 | Deide_ | (~Deide@wire.desu.ga) (Quit: Seeee yaaaa) |
2022-12-02 02:20:13 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2022-12-02 02:20:13 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2022-12-02 02:20:13 +0100 | wroathe | (~wroathe@user/wroathe) |
2022-12-02 02:20:24 +0100 | <davean> | This isn't even about git though, this is about how github tries to centralize a distributed system like git ... and how that interacts with stackage too I guess |
2022-12-02 02:21:14 +0100 | causal | (~user@50.35.83.177) |
2022-12-02 02:22:04 +0100 | rustisafungus | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 256 seconds) |
2022-12-02 02:22:35 +0100 | natto | (~natto@140.238.225.67) (Client Quit) |
2022-12-02 02:23:07 +0100 | natto | (~natto@140.238.225.67) |
2022-12-02 02:23:11 +0100 | <sm> | updating stackage/build-constraints.yaml is something lots of package maintainers do, or ought to do IMHO, and better if were drop dead easy |
2022-12-02 02:23:38 +0100 | <sm> | I was sort of hoping someone has figured out the minimal lazy method |
2022-12-02 02:24:22 +0100 | <sm> | github web ui is struggling to cope with the size of this file, sadly (9k lines) |
2022-12-02 02:24:51 +0100 | <sm> | so don't fat-finger it and have to redo, like me |
2022-12-02 02:24:59 +0100 | jludwig | (~justin@li657-110.members.linode.com) (Quit: ZNC - https://znc.in) |
2022-12-02 02:25:11 +0100 | <davean> | sm: I expect the easy way is to just have your own clone, on github, and use that, pulling from upstream, and produce the merge off that |
2022-12-02 02:25:23 +0100 | <davean> | because you need to have a way to get the IDs into the github centralized system |
2022-12-02 02:25:58 +0100 | jludwig | (~justin@li657-110.members.linode.com) |
2022-12-02 02:26:08 +0100 | <davean> | But this is what is nice for example about email patches, they're the self contained change without the ID issue. |
2022-12-02 02:26:25 +0100 | xff0x | (~xff0x@ai071162.d.east.v6connect.net) (Ping timeout: 260 seconds) |
2022-12-02 02:28:56 +0100 | <sm> | success. web ui was the simplest, and switching to a browser other than safari made it slightly less tedious |
2022-12-02 02:29:26 +0100 | rustisafungus | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) |
2022-12-02 02:29:29 +0100 | <sm> | better concrete workflows welcome, if someone has em |
2022-12-02 02:32:16 +0100 | Igloo | (~ian@matrix.chaos.earth.li) |
2022-12-02 02:32:21 +0100 | Guest7862 | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) |
2022-12-02 02:32:56 +0100 | Guest7862 | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit) |
2022-12-02 02:38:49 +0100 | <sm> | ok fine it's coming back to me.. always half an hour of flailing grumble grumble |
2022-12-02 02:43:42 +0100 | iqubic | (~user@2601:602:9502:c70:8e55:bd2f:72d2:8b70) (Remote host closed the connection) |
2022-12-02 02:47:00 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
2022-12-02 02:49:22 +0100 | <rustisafungus> | does darcs have a self-hosted github like webapp? |
2022-12-02 02:49:26 +0100 | <rustisafungus> | github-like |
2022-12-02 02:50:01 +0100 | <davean> | ... |
2022-12-02 02:50:17 +0100 | <davean> | right, github the exemplar of self-hosted. |
2022-12-02 02:50:29 +0100 | <davean> | I think this converseation has jumped the shark. |
2022-12-02 02:50:54 +0100 | <sm> | why yes rustisafungus , I happen to "maintain" one |
2022-12-02 02:51:02 +0100 | <rustisafungus> | sm: link? |
2022-12-02 02:51:15 +0100 | <rustisafungus> | lol maintain in quotes is not very reassuring ;-) |
2022-12-02 02:51:23 +0100 | Guest75 | (~Guest75@178.141.153.191) (Ping timeout: 260 seconds) |
2022-12-02 02:51:28 +0100 | <rustisafungus> | do you also "fix" bugs? lol |
2022-12-02 02:51:35 +0100 | <sm> | darcsden. darcs was once a flagship haskell app but I think it has reached old age |
2022-12-02 02:52:04 +0100 | <sm> | https://hub.darcs.net |
2022-12-02 02:52:06 +0100 | ubert | (~Thunderbi@p200300ecdf264efbff642f477e75bc86.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
2022-12-02 02:52:16 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-02 02:52:46 +0100 | <sm> | pijul is the likely darcs successor but I'm not sure it will ever become an adult |
2022-12-02 02:53:02 +0100 | <rustisafungus> | for whatever reason loading the main page takes many seconds for me, ... the others are rather fast |
2022-12-02 02:54:09 +0100 | <rustisafungus> | yeah there was another multi-second pageload, this time on viewing a source file |
2022-12-02 02:54:29 +0100 | <sm> | wow yes that has become rather slow, thanks for the report |
2022-12-02 02:54:47 +0100 | <davean> | sm: is it doing IO for all those listings instead of caching? |
2022-12-02 02:54:49 +0100 | <sm> | damnit now I have to maintain it |
2022-12-02 02:54:52 +0100 | <rustisafungus> | lol |
2022-12-02 02:54:56 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 02:54:58 +0100 | <sm> | opened my mouth... |
2022-12-02 02:55:31 +0100 | <sm> | probably davean. it used to be much faster though |
2022-12-02 02:56:32 +0100 | Feuermagier | (~Feuermagi@user/feuermagier) |
2022-12-02 02:56:45 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Ping timeout: 260 seconds) |
2022-12-02 02:58:50 +0100 | <davean> | I always felt its "must form a linear history" invalidated darcs from real use :( |
2022-12-02 02:59:19 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 252 seconds) |
2022-12-02 02:59:33 +0100 | <rustisafungus> | okay should i admit that i just copy my source files periodically |
2022-12-02 03:00:12 +0100 | <davean> | No, you should fix that |
2022-12-02 03:00:17 +0100 | <geekosaur> | that works until you actually need it and discover you didn't copy them recently enough |
2022-12-02 03:00:44 +0100 | <geekosaur> | \of course, using a VCS doesn't guarantee anything if you don't commit regularly |
2022-12-02 03:00:55 +0100 | <davean> | git rebase is also not a safe function to use. |
2022-12-02 03:01:04 +0100 | <davean> | geekosaur: well . . . |
2022-12-02 03:01:12 +0100 | <davean> | geekosaur: there are some older VCS systems ... |
2022-12-02 03:01:19 +0100 | <geekosaur> | indeed |
2022-12-02 03:01:26 +0100 | <davean> | not the ones we ended up using of course, but thats not entirely true. |
2022-12-02 03:01:26 +0100 | <geekosaur> | I remember using SCCS |
2022-12-02 03:01:49 +0100 | <EvanR> | sm, how is that page hosted? |
2022-12-02 03:02:07 +0100 | <EvanR> | is it a haskell web server. Maybe it hasn't been accessed in so long it had to collapse a years-long thunk xD |
2022-12-02 03:02:09 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 03:02:46 +0100 | <monochrom> | I'm tempted to be reactionary and go back to CVS and just say no to web apps. |
2022-12-02 03:03:09 +0100 | <monochrom> | Hell, 90% of the time I use git like I use CVS, no github. |
2022-12-02 03:03:28 +0100 | <sm> | EvanR: it's darcsden running on a small linode. Restarted hourly by cron since I don't have time to babysit it or debug mem leaks |
2022-12-02 03:03:31 +0100 | money_ | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) |
2022-12-02 03:03:32 +0100 | money_ | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit) |
2022-12-02 03:04:03 +0100 | antdurrant | (~antdurran@p7734086-ipoefx.ipoe.ocn.ne.jp) |
2022-12-02 03:04:32 +0100 | <EvanR> | if your app isn't also a webserver what is it even doing really |
2022-12-02 03:04:37 +0100 | <sm> | everything was working fine until rustisafungus started messing with it |
2022-12-02 03:04:45 +0100 | <rustisafungus> | lol |
2022-12-02 03:04:49 +0100 | rustisafungus | is hackerman |
2022-12-02 03:04:51 +0100 | <EvanR> | and all proper text editors read email |
2022-12-02 03:05:15 +0100 | <rustisafungus> | sm: restarted hourly? why |
2022-12-02 03:05:50 +0100 | <rustisafungus> | oh nvm missed that, mem leaks |
2022-12-02 03:06:08 +0100 | <EvanR> | sm set up the equivalent of the answering machine from IT crowd that just says have you tried turning it off and on again |
2022-12-02 03:06:16 +0100 | antdurrant | (~antdurran@p7734086-ipoefx.ipoe.ocn.ne.jp) (Client Quit) |
2022-12-02 03:06:28 +0100 | antdurrant | (~antdurran@p7734086-ipoefx.ipoe.ocn.ne.jp) |
2022-12-02 03:06:43 +0100 | <davean> | sm: Those pesky users! |
2022-12-02 03:07:02 +0100 | <rustisafungus> | babysit,... but like isn't this haskell |
2022-12-02 03:07:09 +0100 | <rustisafungus> | shouldn't it just work because types or something? |
2022-12-02 03:08:04 +0100 | <EvanR> | we can dream |
2022-12-02 03:08:24 +0100 | <davean> | I am wondering how it can mem leak, but apparently lots of people have that issue. I've almost never experienced it. I think its a style thing. |
2022-12-02 03:08:38 +0100 | <EvanR> | haskell - program runs but might be wrong |
2022-12-02 03:08:50 +0100 | <EvanR> | agda - program is correct but doesn't run |
2022-12-02 03:09:08 +0100 | <rustisafungus> | coq - program is correct but *chuckles* penis |
2022-12-02 03:09:39 +0100 | <monochrom> | Are you done? |
2022-12-02 03:09:40 +0100 | <sm> | rustisafungus: yeesss.... it is mostly remarkably solid, after significant time spent on it... but, darcs is not an easy thing to base a web app on. It's a moving target, and not designed or tested for this use case. eg it's not thread safe |
2022-12-02 03:09:45 +0100 | <geekosaur> | I imagine Agda can have "runs but might be wrong" — how do you know you modeled the problem correctly? compiler can't help with that level |
2022-12-02 03:10:09 +0100 | <rustisafungus> | not thread safe (?!?) |
2022-12-02 03:10:27 +0100 | <geekosaur> | why would it need to be? it's intended for use from a command line |
2022-12-02 03:10:36 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 03:10:38 +0100 | <sm> | it relies on environment variables or something |
2022-12-02 03:10:52 +0100 | razetime | (~quassel@49.207.211.219) |
2022-12-02 03:10:55 +0100 | <davean> | geekosaur: No, in that case the program is correct, what you asked for wasn't. ;) |
2022-12-02 03:11:05 +0100 | <rustisafungus> | are there languages which are thread safe? erlang? |
2022-12-02 03:11:09 +0100 | <davean> | sm: enviromental variables shouldn't affect thread safety |
2022-12-02 03:11:21 +0100 | <geekosaur> | that's what you think |
2022-12-02 03:11:43 +0100 | <sm> | I can dig up the issue |
2022-12-02 03:12:39 +0100 | <EvanR> | erlang implements processes so doesn't need to be thread safe xD |
2022-12-02 03:12:56 +0100 | <EvanR> | shared nothing |
2022-12-02 03:12:58 +0100 | <davean> | sm: Though come to think of it, darcs probably makes less issues for your use case above, since it depends on a lineralizability of history property that inherently centeralizes it? |
2022-12-02 03:13:00 +0100 | <geekosaur> | https://tomsmeding.com/blog/bugs/efault |
2022-12-02 03:13:31 +0100 | <rustisafungus> | and so haskell isn't thread safe...? |
2022-12-02 03:13:54 +0100 | <geekosaur> | no language is |
2022-12-02 03:14:06 +0100 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) |
2022-12-02 03:14:10 +0100 | <geekosaur> | heck, POSIX is mostly thread-unsafe, regardless of language |
2022-12-02 03:14:26 +0100 | <geekosaur> | (see the URL I just pasted) |
2022-12-02 03:14:42 +0100 | <rustisafungus> | no language? |
2022-12-02 03:14:53 +0100 | <geekosaur> | thread safety is not something you can "build into a language" |
2022-12-02 03:15:06 +0100 | <sm> | ..no I can't.. it's in there somewhere : https://hub.darcs.net/simon/darcsden/issues |
2022-12-02 03:15:16 +0100 | rustisafungus | 's jaw drops in a threadsafe manner |
2022-12-02 03:15:20 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
2022-12-02 03:15:48 +0100 | <geekosaur> | you can have languages that help you out with it (Haskell's STM helps a lot, you just don't expect you need to wrap setEnv calls with it…) |
2022-12-02 03:15:55 +0100 | <sm> | (browse that, anyone thinking haskell is a magic bullet!) |
2022-12-02 03:17:43 +0100 | <sm> | it was something like: libdarcs depends on mutating env vars, and that's not per thread with GHC RTS |
2022-12-02 03:17:48 +0100 | <EvanR> | you could design a paperlanguage which has some sort of concurrency guarantee built into the type system |
2022-12-02 03:17:56 +0100 | <EvanR> | and no one will use it for anything |
2022-12-02 03:18:15 +0100 | <geekosaur> | it's not per thread with any language. POSIX specifies envars as a process level facility |
2022-12-02 03:18:32 +0100 | <sm> | right |
2022-12-02 03:18:44 +0100 | antdurrant | (~antdurran@p7734086-ipoefx.ipoe.ocn.ne.jp) (Quit: Connection closed) |
2022-12-02 03:18:48 +0100 | <sm> | so darcs is dumb here |
2022-12-02 03:18:56 +0100 | <geekosaur> | for that matter, Windows has the same issue only more so, since they're stuffed into the registry or somewhere so they're not even process level |
2022-12-02 03:19:00 +0100 | <rustisafungus> | geekosaur: "The only situation in which posix_spawnp seems to always succeed, is when stdout of the process that worker's output is piped to, is block-buffered." lol wtf |
2022-12-02 03:19:16 +0100 | <sm> | bugs me that I can't find it now, it'll turn up |
2022-12-02 03:19:26 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
2022-12-02 03:20:03 +0100 | <davean> | Yah a bunch of POSIX needs a process level lock, but that makes sense for process level things. A safe language for threads would provide said lock I guess. |
2022-12-02 03:20:05 +0100 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) (Ping timeout: 260 seconds) |
2022-12-02 03:20:12 +0100 | <rustisafungus> | EvanR: oh why would noone use a threadsafe paperlang? |
2022-12-02 03:20:44 +0100 | <geekosaur> | same reason nobody uses Agda for anything other than proofs |
2022-12-02 03:20:55 +0100 | <geekosaur> | it's not practically usable |
2022-12-02 03:21:06 +0100 | <davean> | "POSIX.1 does not require setenv() or unsetenv() to be reentrant." <-- So you know, it already needed something. |
2022-12-02 03:21:37 +0100 | <rustisafungus> | geekosaur: isn't a perfect notepad app with very few features worth a lot more than uh evernote or whatever |
2022-12-02 03:21:41 +0100 | <davean> | I actually think this might be a bit of a design issue in how we expose the APIs for non-low-level use |
2022-12-02 03:22:08 +0100 | <EvanR> | perfect notepad = notepad but understands '\n' ? xD |
2022-12-02 03:22:21 +0100 | <rustisafungus> | hehe |
2022-12-02 03:23:16 +0100 | <monochrom> | I would think that it's a trivial tautology that a paperlanguage is unusable. |
2022-12-02 03:23:45 +0100 | <monochrom> | As trivial as factoring primes. |
2022-12-02 03:23:50 +0100 | beteigeuze | (~Thunderbi@bl14-81-220.dsl.telepac.pt) (Ping timeout: 256 seconds) |
2022-12-02 03:24:37 +0100 | ajb | (~ajb@mimas.whatbox.ca) (Quit: bye) |
2022-12-02 03:27:11 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 03:33:42 +0100 | ajb | (~ajb@mimas.whatbox.ca) |
2022-12-02 03:36:21 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 252 seconds) |
2022-12-02 03:36:46 +0100 | ajb | (~ajb@mimas.whatbox.ca) (Quit: bye) |
2022-12-02 03:37:53 +0100 | polo | money |
2022-12-02 03:38:24 +0100 | razetime | (~quassel@49.207.211.219) (Ping timeout: 260 seconds) |
2022-12-02 03:39:12 +0100 | ajb | (~ajb@mimas.whatbox.ca) |
2022-12-02 03:42:28 +0100 | ajb | (~ajb@mimas.whatbox.ca) (Client Quit) |
2022-12-02 03:42:28 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2022-12-02 03:43:02 +0100 | <rustisafungus> | but immutable means threadsafe or something? |
2022-12-02 03:43:40 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-12-02 03:46:11 +0100 | razetime | (~quassel@49.207.211.219) |
2022-12-02 03:46:13 +0100 | <sm> | haskell programs have to manage state, like any other |
2022-12-02 03:46:31 +0100 | <sm> | stateful apps, I mean |
2022-12-02 03:46:55 +0100 | <rustisafungus> | seems like haskell would be very well positioned for thread safety by default/by design or opt-out only thread unsafety or somesuch |
2022-12-02 03:47:55 +0100 | <sm> | it is, I think ? just don't use env vars for thread-specific state |
2022-12-02 03:48:12 +0100 | <rustisafungus> | ok so copy them? |
2022-12-02 03:48:32 +0100 | <rustisafungus> | or just, dont use env vars at all |
2022-12-02 03:48:49 +0100 | <sm> | 👍🏻 |
2022-12-02 03:48:54 +0100 | <sm> | afk, dinner o/ |
2022-12-02 03:49:22 +0100 | <rustisafungus> | 💪 |
2022-12-02 03:51:29 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
2022-12-02 03:57:05 +0100 | ajb | (~ajb@mimas.whatbox.ca) |
2022-12-02 04:01:14 +0100 | rustisafungus | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 256 seconds) |
2022-12-02 04:03:02 +0100 | ajb | (~ajb@mimas.whatbox.ca) (Quit: bye) |
2022-12-02 04:04:57 +0100 | yuribarros | (~yuribarro@2804:14c:65e4:865c::1000) (Ping timeout: 252 seconds) |
2022-12-02 04:05:40 +0100 | thegeekinside | (~thegeekin@189.217.82.244) |
2022-12-02 04:07:36 +0100 | thegeekinside | (~thegeekin@189.217.82.244) (Remote host closed the connection) |
2022-12-02 04:08:21 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-02 04:09:33 +0100 | Kaiepi | (~Kaiepi@108.175.84.104) (Ping timeout: 256 seconds) |
2022-12-02 04:09:35 +0100 | thegeekinside | (~thegeekin@189.217.82.244) |
2022-12-02 04:09:40 +0100 | dilaver | (~DilaverCa@95.70.234.215) |
2022-12-02 04:10:17 +0100 | thegeekinside | (~thegeekin@189.217.82.244) (Remote host closed the connection) |
2022-12-02 04:12:10 +0100 | dilaver | (~DilaverCa@95.70.234.215) (Excess Flood) |
2022-12-02 04:18:38 +0100 | mixfix41 | (~sdenynine@user/mixfix41) (Ping timeout: 246 seconds) |
2022-12-02 04:22:47 +0100 | rustisafungus | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) |
2022-12-02 04:23:49 +0100 | nattiestnate | (~nate@202.138.250.46) |
2022-12-02 04:24:23 +0100 | son0p | (~ff@2604:3d08:5b7f:5540::37af) |
2022-12-02 04:26:52 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-12-02 04:27:10 +0100 | rustisafungus | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 260 seconds) |
2022-12-02 04:27:52 +0100 | rustisafungus | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) |
2022-12-02 04:29:40 +0100 | califax | (~califax@user/califx) |
2022-12-02 04:30:08 +0100 | nattiestnate | (~nate@202.138.250.46) (Quit: WeeChat 3.7.1) |
2022-12-02 04:31:50 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 260 seconds) |
2022-12-02 04:32:39 +0100 | rustisafungus | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 260 seconds) |
2022-12-02 04:32:40 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 04:38:15 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-12-02 04:38:40 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-02 04:39:35 +0100 | accord | (uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2022-12-02 04:42:17 +0100 | koolazer | (~koo@user/koolazer) (Read error: Connection reset by peer) |
2022-12-02 04:44:09 +0100 | terrorjack | (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat) |
2022-12-02 04:45:29 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 255 seconds) |
2022-12-02 04:45:31 +0100 | terrorjack | (~terrorjac@2a01:4f8:1c1e:509a::1) |
2022-12-02 04:46:34 +0100 | nate4 | (~nate@98.45.169.16) |
2022-12-02 04:48:25 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 04:48:58 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-02 04:50:44 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-12-02 04:52:29 +0100 | td_ | (~td@83.135.9.43) (Ping timeout: 260 seconds) |
2022-12-02 04:53:03 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-02 04:53:53 +0100 | td_ | (~td@83.135.9.0) |
2022-12-02 04:58:19 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
2022-12-02 05:05:07 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-12-02 05:07:35 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
2022-12-02 05:07:47 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-02 05:10:56 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds) |
2022-12-02 05:12:33 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Remote host closed the connection) |
2022-12-02 05:14:20 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
2022-12-02 05:15:24 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 05:18:57 +0100 | mixfix41 | (~sdenynine@user/mixfix41) |
2022-12-02 05:20:32 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 268 seconds) |
2022-12-02 05:26:01 +0100 | gurkenglas | (~gurkengla@p548ac72e.dip0.t-ipconnect.de) |
2022-12-02 05:26:32 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
2022-12-02 05:27:37 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2022-12-02 05:29:13 +0100 | jargon | (~jargon@174-22-207-8.phnx.qwest.net) (Remote host closed the connection) |
2022-12-02 05:29:37 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 05:29:43 +0100 | stevenxl | (~stevenxl@c-73-50-142-156.hsd1.il.comcast.net) |
2022-12-02 05:31:27 +0100 | Sgeo | (~Sgeo@user/sgeo) |
2022-12-02 05:33:28 +0100 | mixfix41 | genjitsu41 |
2022-12-02 05:35:18 +0100 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 256 seconds) |
2022-12-02 05:37:36 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) |
2022-12-02 05:39:11 +0100 | zant | (~zant@62.214.20.26) (Ping timeout: 246 seconds) |
2022-12-02 05:41:33 +0100 | [Leary] | (~Leary]@user/Leary/x-0910699) (Remote host closed the connection) |
2022-12-02 05:45:20 +0100 | [Leary] | (~Leary]@user/Leary/x-0910699) |
2022-12-02 05:45:44 +0100 | stevenxl_ | (~stevenxl@45.76.30.6) |
2022-12-02 05:48:43 +0100 | nate4 | (~nate@98.45.169.16) (Ping timeout: 252 seconds) |
2022-12-02 05:48:54 +0100 | stevenxl | (~stevenxl@c-73-50-142-156.hsd1.il.comcast.net) (Ping timeout: 256 seconds) |
2022-12-02 05:48:57 +0100 | ph88 | (~ph88@2401:4900:45b3:a537:d6b5:7dd6:f89a:7276) |
2022-12-02 05:55:38 +0100 | iqubic | (~avi@2601:601:1100:edd0:d29b:dc2d:eab0:9e7d) |
2022-12-02 05:58:23 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-12-02 05:59:21 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-02 06:01:03 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-02 06:03:19 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 06:08:24 +0100 | johnw | (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in) |
2022-12-02 06:16:50 +0100 | ph88 | (~ph88@2401:4900:45b3:a537:d6b5:7dd6:f89a:7276) (Ping timeout: 260 seconds) |
2022-12-02 06:20:06 +0100 | ph88 | (~ph88@2401:4900:45b3:a537:1798:48a2:33e9:6a48) |
2022-12-02 06:20:34 +0100 | <EvanR> | ah nice to be 13 on haskell leaderboard, at least for a minute until I get bumped down |
2022-12-02 06:23:07 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2022-12-02 06:24:35 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2022-12-02 06:37:00 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
2022-12-02 06:41:09 +0100 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2022-12-02 06:41:19 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 268 seconds) |
2022-12-02 06:42:25 +0100 | Lord_of_Life_ | Lord_of_Life |
2022-12-02 06:45:23 +0100 | ph88 | (~ph88@2401:4900:45b3:a537:1798:48a2:33e9:6a48) (Ping timeout: 256 seconds) |
2022-12-02 06:46:36 +0100 | jargon | (~jargon@174-22-207-8.phnx.qwest.net) |
2022-12-02 06:55:16 +0100 | jargon | (~jargon@174-22-207-8.phnx.qwest.net) (Remote host closed the connection) |
2022-12-02 07:11:38 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
2022-12-02 07:22:46 +0100 | iqubic | (~avi@2601:601:1100:edd0:d29b:dc2d:eab0:9e7d) (Remote host closed the connection) |
2022-12-02 07:23:33 +0100 | iqubic | (~avi@2601:601:1100:edd0:d29b:dc2d:eab0:9e7d) |
2022-12-02 07:28:09 +0100 | thegeekinside | (~thegeekin@189.217.82.244) |
2022-12-02 07:29:26 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-12-02 07:33:11 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2022-12-02 07:33:28 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) |
2022-12-02 07:33:48 +0100 | echoreply | (~echoreply@45.32.163.16) (Quit: WeeChat 2.8) |
2022-12-02 07:33:58 +0100 | johnw | (~johnw@2600:1700:cf00:db0:ccd8:6dba:13b3:7200) |
2022-12-02 07:35:10 +0100 | echoreply | (~echoreply@45.32.163.16) |
2022-12-02 07:36:43 +0100 | king_gs | (~Thunderbi@187.201.204.122) |
2022-12-02 07:42:22 +0100 | oldsk00l | (~znc@ec2-18-196-97-233.eu-central-1.compute.amazonaws.com) |
2022-12-02 07:46:29 +0100 | bgs | (~bgs@212-85-160-171.dynamic.telemach.net) |
2022-12-02 07:46:40 +0100 | bgs | (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
2022-12-02 07:51:47 +0100 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Ping timeout: 255 seconds) |
2022-12-02 07:53:35 +0100 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2022-12-02 07:55:15 +0100 | jakalx | (~jakalx@base.jakalx.net) () |
2022-12-02 07:57:17 +0100 | king_gs | (~Thunderbi@187.201.204.122) (Read error: Connection reset by peer) |
2022-12-02 07:57:25 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2022-12-02 07:57:35 +0100 | king_gs | (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) |
2022-12-02 08:08:18 +0100 | merijn | (~merijn@86-86-29-250.fixed.kpn.net) (Ping timeout: 256 seconds) |
2022-12-02 08:12:56 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
2022-12-02 08:30:48 +0100 | <iqubic> | @quote zzz |
2022-12-02 08:30:48 +0100 | <lambdabot> | jle` says: let sleep = pure "zzz" in getSum sleep |
2022-12-02 08:31:39 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-12-02 08:32:09 +0100 | kenran | (~user@user/kenran) |
2022-12-02 08:32:39 +0100 | kenran | (~user@user/kenran) (Remote host closed the connection) |
2022-12-02 08:32:54 +0100 | acidjnk_new | (~acidjnk@p200300d6e7137a26a0c5c39a40faf46b.dip0.t-ipconnect.de) |
2022-12-02 08:33:14 +0100 | troydm | (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 256 seconds) |
2022-12-02 08:36:08 +0100 | nattiestnate | (~nate@202.138.250.62) |
2022-12-02 08:37:00 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-12-02 08:38:03 +0100 | nattiestnate | (~nate@202.138.250.62) (Client Quit) |
2022-12-02 08:38:47 +0100 | califax | (~califax@user/califx) |
2022-12-02 08:41:57 +0100 | king_gs | (~Thunderbi@2806:103e:29:94a4:81e0:429b:22ec:cf13) (Quit: king_gs) |
2022-12-02 08:45:15 +0100 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2022-12-02 08:46:23 +0100 | fockerize | (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-12-02 08:50:00 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2022-12-02 08:52:40 +0100 | oldsk00l | (~znc@ec2-18-196-97-233.eu-central-1.compute.amazonaws.com) (Remote host closed the connection) |
2022-12-02 08:53:51 +0100 | shriekingnoise | (~shrieking@186.137.167.202) (Quit: Quit) |
2022-12-02 09:05:13 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 09:05:20 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
2022-12-02 09:15:59 +0100 | mncheck | (~mncheck@193.224.205.254) |
2022-12-02 09:19:08 +0100 | fockerize | (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 256 seconds) |
2022-12-02 09:19:41 +0100 | acidjnk_new3 | (~acidjnk@p200300d6e7137a2610bc2c69f4fcc3e3.dip0.t-ipconnect.de) |
2022-12-02 09:21:43 +0100 | szkl | (uid110435@id-110435.uxbridge.irccloud.com) (Quit: Connection closed for inactivity) |
2022-12-02 09:23:07 +0100 | acidjnk_new | (~acidjnk@p200300d6e7137a26a0c5c39a40faf46b.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
2022-12-02 09:23:54 +0100 | ft | (~ft@p508dbd59.dip0.t-ipconnect.de) (Quit: leaving) |
2022-12-02 09:25:27 +0100 | ubert | (~Thunderbi@p200300ecdf264efbee8671ffffe5ba55.dip0.t-ipconnect.de) |
2022-12-02 09:30:04 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
2022-12-02 09:31:54 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2022-12-02 09:32:51 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:d06:f4b:7f4f:76b1) |
2022-12-02 09:33:15 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection) |
2022-12-02 09:33:28 +0100 | chexum | (~quassel@gateway/tor-sasl/chexum) |
2022-12-02 09:38:54 +0100 | euandreh | (~Thunderbi@179.214.113.107) (Ping timeout: 260 seconds) |
2022-12-02 09:38:55 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
2022-12-02 09:38:58 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds) |
2022-12-02 09:42:17 +0100 | <dminuoso> | What makes Haskell so fun for thread safety, is STM. |
2022-12-02 09:42:42 +0100 | <dminuoso> | And the reason STM is so great in Haskell and virtually non-existent outside, is because we can with our type systems keep side effects out of transactions |
2022-12-02 09:44:19 +0100 | <dminuoso> | Thing is, even with LLVM IR you can reorder things manually |
2022-12-02 09:44:23 +0100 | <dminuoso> | Oh sorry wrong chat. |
2022-12-02 09:45:50 +0100 | <mauke> | STM++ |
2022-12-02 09:46:11 +0100 | nate4 | (~nate@98.45.169.16) |
2022-12-02 09:47:00 +0100 | <mauke> | that reminds me: one time I needed a not-quite-trivial mutable data structure with concurrent access from multiple threads |
2022-12-02 09:47:19 +0100 | <mauke> | I couldn't figure out how to build it correctly, so I prototyped it in C |
2022-12-02 09:48:17 +0100 | <mauke> | single threaded C, that is. but it made it easy for me to figure out where the pointers needed to go |
2022-12-02 09:49:08 +0100 | <mauke> | I translated it back to Haskell (adding another level of Ref/Var wherever a C variable had its address taken), wrapped 'atomically' around the whole thing, and done |
2022-12-02 09:49:23 +0100 | potash | (~foghorn@user/foghorn) (Ping timeout: 264 seconds) |
2022-12-02 09:50:51 +0100 | nate4 | (~nate@98.45.169.16) (Ping timeout: 248 seconds) |
2022-12-02 09:51:12 +0100 | avicenzi | (~avicenzi@2a00:ca8:a1f:b004:a17d:97b8:494e:8b7b) |
2022-12-02 09:54:39 +0100 | cfricke | (~cfricke@user/cfricke) |
2022-12-02 09:54:54 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2022-12-02 09:55:07 +0100 | machinedgod | (~machinedg@d198-53-218-113.abhsia.telus.net) |
2022-12-02 09:55:18 +0100 | <c_wraith> | I worry about putting single mutable data structures in STM. If you aren't careful, that's a great way to get thundering herds |
2022-12-02 09:56:04 +0100 | <mauke> | is that an issue with a thread count < 6? |
2022-12-02 09:56:09 +0100 | <c_wraith> | oh yes. |
2022-12-02 09:56:50 +0100 | <c_wraith> | Err. I was thinking cores. If you have at max 5 waiting, the herd is pretty small. |
2022-12-02 09:57:35 +0100 | <c_wraith> | But you really need to be aware of the potential downsides to optimistic locking |
2022-12-02 09:58:19 +0100 | avicenzi | (~avicenzi@2a00:ca8:a1f:b004:a17d:97b8:494e:8b7b) (Remote host closed the connection) |
2022-12-02 09:58:27 +0100 | <c_wraith> | And this is why most uses of STM try to stripe their data structures, so there's no single ref that becomes a chokepoint for every transaction. |
2022-12-02 09:58:47 +0100 | avicenzi | (~avicenzi@2a00:ca8:a1f:b004::c32) |
2022-12-02 09:58:49 +0100 | michalz | (~michalz@185.246.204.93) |
2022-12-02 09:59:03 +0100 | gmg | (~user@user/gehmehgeh) |
2022-12-02 10:02:09 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 10:05:24 +0100 | <mauke> | score [ord -> c1, ' ', ord -> c2] = (c2 - c1 + 2) `mod` 3 * 3 + c2 - ord 'W' |
2022-12-02 10:05:30 +0100 | <mauke> | does this look sensible? |
2022-12-02 10:08:35 +0100 | <dminuoso> | Im starting to think Servant would have better been written in TemplateHaskell. :( |
2022-12-02 10:08:57 +0100 | <dminuoso> | The quality of diagnostics and compilation time overhead for non-trivial usecases is tremendous |
2022-12-02 10:09:39 +0100 | <dminuoso> | At least I managed to get rid of all generic+aeson uses and replaced them all with TH, speeding up module compilation from ~3min per module to about 2s. |
2022-12-02 10:13:12 +0100 | mastarija | (~mastarija@2a05:4f46:e03:6000:6cf2:8564:eee7:713a) |
2022-12-02 10:16:11 +0100 | mc47 | (~mc47@xmonad/TheMC47) |
2022-12-02 10:16:55 +0100 | CiaoSen | (~Jura@p200300c95716a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2022-12-02 10:22:02 +0100 | ubert | (~Thunderbi@p200300ecdf264efbee8671ffffe5ba55.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
2022-12-02 10:24:28 +0100 | <tomsmeding> | :o |
2022-12-02 10:26:20 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Remote host closed the connection) |
2022-12-02 10:27:41 +0100 | <maerwald[m]> | dminuoso: the overlapping instances dance is what worries me more |
2022-12-02 10:28:07 +0100 | <maerwald[m]> | And it's not very composable |
2022-12-02 10:28:08 +0100 | <dminuoso> | maerwald[m]: From a maintainer perspective sure. As a user, Im mainly worried about my quality of life when I hit cabal build. |
2022-12-02 10:28:53 +0100 | <dminuoso> | It took me a long while to realize that Yesod did some things really well in comparison. |
2022-12-02 10:29:20 +0100 | Guest75 | (~Guest75@178.141.153.191) |
2022-12-02 10:30:04 +0100 | <maerwald[m]> | I mean all DLSs are not composable |
2022-12-02 10:30:27 +0100 | <maerwald[m]> | If something is missing, you'll reach deep down into the internals |
2022-12-02 10:30:32 +0100 | <dminuoso> | It depends on what you mean by composable, really. |
2022-12-02 10:30:45 +0100 | <dminuoso> | Servant has composable pieces to it. |
2022-12-02 10:31:17 +0100 | ubert | (~Thunderbi@p200300ecdf264efbf25dacad1803575e.dip0.t-ipconnect.de) |
2022-12-02 10:31:21 +0100 | <dminuoso> | Im just mainly annoyed at how incredibly slow compilation becomes when by means of type level tricks you start introducing literally millions of types to the simplifier |
2022-12-02 10:31:36 +0100 | <maerwald[m]> | Composable for expected use cases |
2022-12-02 10:31:46 +0100 | <maerwald[m]> | Not unix philosophy |
2022-12-02 10:31:51 +0100 | <dminuoso> | It's kind of like encoding a program in a turing machine implemented in BGP. Yes you can do it, no its not going to perform well. |
2022-12-02 10:32:14 +0100 | <maerwald[m]> | Go libraries are composable |
2022-12-02 10:32:24 +0100 | <dminuoso> | Well data is easily composable. |
2022-12-02 10:32:26 +0100 | econo | (uid147250@user/econo) (Quit: Connection closed for inactivity) |
2022-12-02 10:32:43 +0100 | <dminuoso> | Since go doesnt have type level tricks, people just do it on the value level instead. |
2022-12-02 10:33:30 +0100 | <dminuoso> | One thing that golang has that works really well is the backticks on structs., |
2022-12-02 10:33:36 +0100 | <dminuoso> | I wish we had that too |
2022-12-02 10:34:00 +0100 | <dminuoso> | Maybe available in TH, then things like servant or aeson would have a really implementation style |
2022-12-02 10:34:16 +0100 | <maerwald[m]> | Yep true. That's a major downside of strong types |
2022-12-02 10:34:35 +0100 | <maerwald[m]> | That's why bytestring still rules the Haskell world |
2022-12-02 10:34:43 +0100 | <maerwald[m]> | It's the weakest possible type |
2022-12-02 10:36:08 +0100 | <maerwald[m]> | Especially lazy bytestring |
2022-12-02 10:36:32 +0100 | <dminuoso> | I have come to love bytestrings ever since I learned about flatparse |
2022-12-02 10:37:20 +0100 | Kaiepi | (~Kaiepi@108.175.84.104) |
2022-12-02 10:41:11 +0100 | zant | (~zant@62.214.20.26) |
2022-12-02 10:43:19 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-12-02 10:44:59 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-02 10:47:56 +0100 | dilaver | (~DilaverCa@95.70.234.215) |
2022-12-02 10:48:10 +0100 | dilaver | (~DilaverCa@95.70.234.215) (Excess Flood) |
2022-12-02 10:48:11 +0100 | ubert | (~Thunderbi@p200300ecdf264efbf25dacad1803575e.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
2022-12-02 10:48:11 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds) |
2022-12-02 10:49:08 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 10:54:09 +0100 | acidjnk_new3 | (~acidjnk@p200300d6e7137a2610bc2c69f4fcc3e3.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2022-12-02 10:58:37 +0100 | chele | (~chele@user/chele) |
2022-12-02 11:05:48 +0100 | ubert | (~Thunderbi@2a02:8109:abc0:6434:8400:d733:83f7:3040) |
2022-12-02 11:05:48 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2022-12-02 11:06:25 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 11:06:56 +0100 | <tomsmeding> | dminuoso: you can sortof tag fields with type-level data, but the issue is that you can't get around wrapping a newtype constructor then |
2022-12-02 11:07:15 +0100 | <tomsmeding> | Perhaps that gets less annoying when you use lenses religiously and define those lenses cleverly |
2022-12-02 11:08:19 +0100 | <tomsmeding> | or perhaps some deriving-via trick where the via datatype has some insane type-level list declaring lots of encoding info |
2022-12-02 11:08:28 +0100 | <tomsmeding> | but then you arrive in generics land again :p |
2022-12-02 11:09:14 +0100 | potash | (~foghorn@user/foghorn) |
2022-12-02 11:09:34 +0100 | xff0x | (~xff0x@125x103x176x34.ap125.ftth.ucom.ne.jp) (Ping timeout: 268 seconds) |
2022-12-02 11:09:55 +0100 | gmg | (~user@user/gehmehgeh) (Quit: Leaving) |
2022-12-02 11:11:08 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
2022-12-02 11:11:54 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) |
2022-12-02 11:12:56 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds) |
2022-12-02 11:12:56 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Ping timeout: 255 seconds) |
2022-12-02 11:16:47 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 11:16:54 +0100 | potash | (~foghorn@user/foghorn) (Ping timeout: 255 seconds) |
2022-12-02 11:18:16 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-02 11:26:48 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-02 11:31:07 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Ping timeout: 252 seconds) |
2022-12-02 11:32:17 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
2022-12-02 11:33:38 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) (Ping timeout: 255 seconds) |
2022-12-02 11:35:37 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) |
2022-12-02 11:37:32 +0100 | troydm | (~troydm@host-176-37-124-197.b025.la.net.ua) |
2022-12-02 11:38:05 +0100 | potash | (~foghorn@user/foghorn) |
2022-12-02 11:38:09 +0100 | mastarija | (~mastarija@2a05:4f46:e03:6000:6cf2:8564:eee7:713a) (Quit: WeeChat 3.7.1) |
2022-12-02 11:39:29 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds) |
2022-12-02 11:42:34 +0100 | mastarija | (~mastarija@2a05:4f46:e03:6000:df44:bef1:e897:d142) |
2022-12-02 11:45:02 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
2022-12-02 11:45:25 +0100 | mastarija | (~mastarija@2a05:4f46:e03:6000:df44:bef1:e897:d142) (Client Quit) |
2022-12-02 11:45:43 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) |
2022-12-02 11:45:50 +0100 | son0p | (~ff@2604:3d08:5b7f:5540::37af) (Ping timeout: 260 seconds) |
2022-12-02 11:50:04 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 11:52:12 +0100 | poscat | (~poscat@2408:8206:4823:5a14:59fc:9fd:2bdc:2771) (Quit: Bye) |
2022-12-02 11:55:04 +0100 | poscat | (~poscat@2408:8206:4821:f702:d964:a961:eb17:d7fd) |
2022-12-02 11:59:45 +0100 | dextaa | (~DV@user/dextaa) (Quit: Ping timeout (120 seconds)) |
2022-12-02 12:00:06 +0100 | dextaa | (~DV@user/dextaa) |
2022-12-02 12:02:18 +0100 | accord | (uid568320@id-568320.hampstead.irccloud.com) |
2022-12-02 12:02:56 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2022-12-02 12:08:46 +0100 | <albet70> | there is a string "a\r\nb\r\nc", how to replace this character '\r' to a string "\r\n" in it? |
2022-12-02 12:10:55 +0100 | pyrex | (~pyrex@user/pyrex) (Ping timeout: 260 seconds) |
2022-12-02 12:11:06 +0100 | <tomsmeding> | albet70: try to use concatMap |
2022-12-02 12:11:58 +0100 | xff0x | (~xff0x@ai071162.d.east.v6connect.net) |
2022-12-02 12:12:02 +0100 | <albet70> | tomsmeding , sorry I don't get it |
2022-12-02 12:12:30 +0100 | pyrex | (~pyrex@user/pyrex) |
2022-12-02 12:14:08 +0100 | califax | (~califax@user/califx) (Ping timeout: 255 seconds) |
2022-12-02 12:15:33 +0100 | <albet70> | I try use Data.ByteString.readFile to get a binary data, then use decodeUtf8With and unpack get a String, but this String contain line break, I put that string into html, it get errors "string literal contains an unescaped line break", after I remove '\r' and '\n' in that string, no error any more |
2022-12-02 12:16:21 +0100 | <albet70> | this character '\r' or '\n' inside a string, isn't string? I'm confused |
2022-12-02 12:17:04 +0100 | <tomsmeding> | albet70: you mean JS, not HTML, I guess? |
2022-12-02 12:17:12 +0100 | <albet70> | yes |
2022-12-02 12:17:23 +0100 | <tomsmeding> | in general you'll need to escape things then, for example when the string contains a " |
2022-12-02 12:17:24 +0100 | Unicorn_Princess | (~Unicorn_P@user/Unicorn-Princess/x-3540542) |
2022-12-02 12:17:35 +0100 | <tomsmeding> | if you don't escape that, JS will see "hello"etc" |
2022-12-02 12:17:38 +0100 | <tomsmeding> | which makes no sense |
2022-12-02 12:18:38 +0100 | <albet70> | so I should check that haskell string if it contain " at first? |
2022-12-02 12:18:50 +0100 | <tomsmeding> | yes, and newlines, and other characters that need to be escaped |
2022-12-02 12:19:04 +0100 | <albet70> | put a haskell string to js is really weird |
2022-12-02 12:19:16 +0100 | <tomsmeding> | you're generating code |
2022-12-02 12:19:22 +0100 | <tomsmeding> | generating code means that you need to escape things |
2022-12-02 12:20:53 +0100 | <tomsmeding> | this is not specific to haskell or JS |
2022-12-02 12:21:02 +0100 | <tomsmeding> | if you'd generate JS code from JS, you'd need to escape strings as well |
2022-12-02 12:21:09 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2022-12-02 12:21:12 +0100 | <tomsmeding> | bye |
2022-12-02 12:21:13 +0100 | <tomsmeding> | lol |
2022-12-02 12:27:16 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2022-12-02 12:28:16 +0100 | CiaoSen | (~Jura@p200300c95716a5002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 252 seconds) |
2022-12-02 12:29:22 +0100 | <davean> | Its a little specific to JS in that JS has the escapign scheme that matters here. |
2022-12-02 12:31:34 +0100 | califax | (~califax@user/califx) |
2022-12-02 12:33:15 +0100 | <davean> | If it was a length tracked string specification then we'd be prepending instead of escaping. |
2022-12-02 12:34:01 +0100 | <tomsmeding> | true -- though escaping is a general theme when generating code in another programming language |
2022-12-02 12:34:03 +0100 | <albet70> | "\r\n" in haskell are two characters, how to turn it to string |
2022-12-02 12:34:28 +0100 | <albet70> | fmap (<> "\r\n") $ lines aString, doesn't work |
2022-12-02 12:34:33 +0100 | beteigeuze | (~Thunderbi@bl14-81-220.dsl.telepac.pt) |
2022-12-02 12:34:45 +0100 | <tomsmeding> | albet70: Be sure to remember the difference between _code_ and _data_. |
2022-12-02 12:35:20 +0100 | <tomsmeding> | The bytes "hi\"abc" are haskell code; this code gets parsed (by GHC) and evaluates to the following data in memory: hi"abc |
2022-12-02 12:35:22 +0100 | <albet70> | then how to transformer code and data |
2022-12-02 12:35:37 +0100 | thegeekinside | (~thegeekin@189.217.82.244) (Read error: Connection reset by peer) |
2022-12-02 12:35:47 +0100 | <tomsmeding> | in JS these two happen to be the same, because JS and Haskell string escaping rules are similar (though not equal) |
2022-12-02 12:36:17 +0100 | <tomsmeding> | So if you have hi"abc in a haskell string, and you want to generate JS code that uses this string, you must generate JS _CODE_ that EVALUATES TO this string |
2022-12-02 12:36:36 +0100 | <tomsmeding> | thus, you must produce "hi\"abc" in your output |
2022-12-02 12:36:53 +0100 | <tomsmeding> | which you can accomplish in Haskell using, for example: putStrLn "\"hi\\\"abc\"" |
2022-12-02 12:37:10 +0100 | <tomsmeding> | this is Haskell code that generates JS code that evaluates to the string hi"abc |
2022-12-02 12:37:13 +0100 | <albet70> | yes, I tried "\"" <> "hi\"abc" <> "\"" |
2022-12-02 12:37:30 +0100 | dnlsur | (~textual@r186-50-121-2.dialup.adsl.anteldata.net.uy) |
2022-12-02 12:37:40 +0100 | <tomsmeding> | the Haskell notation "hi\"abc" represents the data hi"abc |
2022-12-02 12:37:58 +0100 | <tomsmeding> | so you're now printing this: "hi"abc" |
2022-12-02 12:38:00 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2022-12-02 12:38:01 +0100 | <tomsmeding> | that is not valid JS |
2022-12-02 12:38:04 +0100 | <albet70> | three backslash |
2022-12-02 12:38:18 +0100 | <geekosaur> | yes |
2022-12-02 12:38:31 +0100 | <geekosaur> | first \\ which becomes \, then \" which becomes " |
2022-12-02 12:38:46 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 12:39:14 +0100 | <albet70> | those transform are too brainf**ked, is there a library or module to do it? |
2022-12-02 12:39:36 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) (Ping timeout: 268 seconds) |
2022-12-02 12:39:54 +0100 | <albet70> | double quote, line break, and other special character need to transform like tab? |
2022-12-02 12:39:57 +0100 | <davean> | If you had it was Text, you probably want to use replace, like: replace "\\" "\\\\" |
2022-12-02 12:40:09 +0100 | <davean> | albet70: So, look at the JS spec |
2022-12-02 12:40:12 +0100 | <albet70> | it would be lot |
2022-12-02 12:40:14 +0100 | <davean> | it'll tell you what has to be escaped how |
2022-12-02 12:41:02 +0100 | <davean> | https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#escape_seq… will do |
2022-12-02 12:41:33 +0100 | <davean> | 13 cases? |
2022-12-02 12:41:54 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection) |
2022-12-02 12:42:07 +0100 | <mauke> | if it's in HTML, you also have to think about </script and <!-- |
2022-12-02 12:42:30 +0100 | <albet70> | tomsmeding, did your pastbin has this problem? |
2022-12-02 12:43:08 +0100 | <albet70> | 13 cases is a lot |
2022-12-02 12:44:15 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-12-02 12:44:31 +0100 | <davean> | If you say so |
2022-12-02 12:49:17 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2022-12-02 12:49:41 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 12:52:16 +0100 | <tomsmeding> | albet70: my pastebin doesn't generate JS code, just HTML, so this suffices https://github.com/tomsmeding/pastebin-haskell/blob/master/Pages.hs#L83-L93 |
2022-12-02 12:52:42 +0100 | euandreh | (~Thunderbi@179.214.113.107) |
2022-12-02 12:52:55 +0100 | <tomsmeding> | albet70: if you haven't done so yet, try looking (with your own eyes) at the JS code you're producing that you're getting the parse errors on |
2022-12-02 12:53:03 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2022-12-02 12:53:03 +0100 | <tomsmeding> | you should be able to see that you're generating nonsense JS |
2022-12-02 12:53:10 +0100 | <tomsmeding> | that should help you see what the core issue here is |
2022-12-02 12:53:26 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 12:56:30 +0100 | <davean> | tomsmeding: hum, you scan the text twice for that. It seems you could single pass that ... |
2022-12-02 12:56:36 +0100 | <tomsmeding> | probably :) |
2022-12-02 12:56:59 +0100 | <tomsmeding> | Text.concatMap is probably also not the best way to do this, but it works (tm) |
2022-12-02 12:57:13 +0100 | <davean> | no, it wants to be a fold |
2022-12-02 12:57:32 +0100 | <davean> | so you can cut the text as you need and splice the parts together instead of rewriting it. |
2022-12-02 12:57:48 +0100 | <tomsmeding> | davean: oh, the two-pass thing is to prevent reallocation when unnecessary, I expected (without any kind of benchmarking) that that would be a very cheap check against a fairly expensive reallocate |
2022-12-02 12:57:52 +0100 | <davean> | er, not "rewriting" in the sense you probably read it, copying |
2022-12-02 12:58:08 +0100 | <davean> | tomsmeding: right, a fold version only reallocates the parts that change |
2022-12-02 12:58:15 +0100 | <tomsmeding> | but I did not put too much thought in this code :p |
2022-12-02 12:58:43 +0100 | <davean> | tomsmeding: The fold collects till it hits something in the set, breaks, escapes, appends, and then starts collecting again. |
2022-12-02 12:59:11 +0100 | <davean> | If you do it well, most of it can be references to the origional data using splices |
2022-12-02 12:59:20 +0100 | <tomsmeding> | well the source is a strict Text, I don't see how you can reallocate only "part" of a strict Text |
2022-12-02 12:59:30 +0100 | <tomsmeding> | I guess if the target is a lazy Text that could work |
2022-12-02 13:00:15 +0100 | <davean> | Right, and the lazy target references slices of the origional strict text |
2022-12-02 13:00:49 +0100 | <davean> | If it contains nothing to escape you get a single element lazy text |
2022-12-02 13:00:55 +0100 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2022-12-02 13:01:06 +0100 | <davean> | Or you can generate a builder |
2022-12-02 13:01:18 +0100 | <davean> | which most webservers can write well |
2022-12-02 13:01:19 +0100 | <tomsmeding> | yeah generating a lazy Text is probably the nicest way to do this |
2022-12-02 13:01:37 +0100 | <tomsmeding> | maybe lazy Text isn't even that much different from a Builder in this case |
2022-12-02 13:01:44 +0100 | <davean> | Its not in this case |
2022-12-02 13:02:32 +0100 | <davean> | A problem with this approach is its REALLY bad in the case where there are differences because you don't even have a good estimate plugged in of the destination size |
2022-12-02 13:02:57 +0100 | <tomsmeding> | true |
2022-12-02 13:03:12 +0100 | <davean> | Even making a strict output you're better going via the lazy in this case |
2022-12-02 13:03:22 +0100 | <davean> | (or equivilent builder) |
2022-12-02 13:04:37 +0100 | <davean> | Mind you, since you used concatMap it isn't as bad as it could be, because it builds the lazy list and then walks that to find the length |
2022-12-02 13:05:00 +0100 | <davean> | so you just produce a lot of small garbage and then do a 3rd pass over the data to gather the length, and a 4th to copy it |
2022-12-02 13:06:02 +0100 | <davean> | but if you directly folded to a lazy list it would be 1 pass to find out if there was anything to escape, and also escape it, one pass in something in the size of things that needed escaping (which is usually massively less than the length), and 1 pass to copy |
2022-12-02 13:06:27 +0100 | <davean> | effectively half the passes, and if you directly stream out the lazy, you already had to scan it that time so only 1 |
2022-12-02 13:07:33 +0100 | <davean> | plus a massive reduction in garbage production |
2022-12-02 13:08:37 +0100 | yuribarros | (~yuribarro@2804:14c:65e4:865c::1000) |
2022-12-02 13:09:54 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2022-12-02 13:12:07 +0100 | <davean> | Hum, do we not have an efficient Maybe remapping function for Text? We really should. |
2022-12-02 13:12:07 +0100 | yuribarros | (~yuribarro@2804:14c:65e4:865c::1000) (Read error: Connection reset by peer) |
2022-12-02 13:12:16 +0100 | potash | (~foghorn@user/foghorn) (Ping timeout: 252 seconds) |
2022-12-02 13:13:05 +0100 | <davean> | I'd think remap :: (Char -> Maybe Text) -> Text -> Text would be generally useful to have well implimented. |
2022-12-02 13:13:11 +0100 | mc47 | (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
2022-12-02 13:13:32 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2022-12-02 13:14:15 +0100 | <tomsmeding> | davean: what would be the advantage of that type over (Char -> Text) -> Text -> Text? |
2022-12-02 13:14:20 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 13:14:20 +0100 | <tomsmeding> | surely Text.empty is cheap |
2022-12-02 13:15:16 +0100 | <davean> | tomsmeding: scanning over the ones you aren't changing. |
2022-12-02 13:15:33 +0100 | <davean> | depends on if the final text is strict or lazy |
2022-12-02 13:15:37 +0100 | <tomsmeding> | oh in that sense |
2022-12-02 13:16:06 +0100 | <davean> | but the Nothing case lets you scan forward so you copy in blocks, and don't have to resize buffers and such |
2022-12-02 13:16:25 +0100 | <davean> | Even with strict, it helps to know what is a block copy. |
2022-12-02 13:16:52 +0100 | <davean> | When you get a Maybe you bump a copy size counter so you don't have as many gathers to do. |
2022-12-02 13:17:11 +0100 | <davean> | er, when you get a Nothing. |
2022-12-02 13:17:23 +0100 | <davean> | You COULD do that with just Text, by doing an equality |
2022-12-02 13:20:40 +0100 | <davean> | well its a bit more than that too. Char is a complex type. Take a look at https://hackage.haskell.org/package/text-2.0.1/docs/src/Data.Text.html#filter for example. |
2022-12-02 13:21:21 +0100 | <davean> | So you really are best off with the Maybe encoding I think. It allows a number of optimizations. |
2022-12-02 13:21:45 +0100 | <davean> | tomsmeding: That make sense? |
2022-12-02 13:22:09 +0100 | <gurkenglas> | Hi, there's this folder of .hs files https://github.com/gwern/gwern.net/tree/master/build and I had vscode clone the repository and install haskell and a loooot of the modules used in those .hs files were missing, so i extracted the missing module names from the errors and asked a language model for packages containing those modules and ran parallel stack install ::: <what it replied>, but that didn't |
2022-12-02 13:22:15 +0100 | <gurkenglas> | seem to help vscode see em. Do I need to tell stack to make them globally available for naked .hs files? |
2022-12-02 13:22:40 +0100 | aeroplane | (~user@user/aeroplane) |
2022-12-02 13:24:59 +0100 | <int-e> | davean: But why can't you do the same optimizations on top of `concatMap`? |
2022-12-02 13:25:38 +0100 | <gurkenglas> | aka, can i tell the global stack.yaml to just fuck my shit up with all the installed packages, and then if there are namespace collisions let it throw errors? |
2022-12-02 13:26:05 +0100 | <opqdonut> | gurkenglas: btw looks like there are build instructions in https://github.com/gwern/gwern.net/blob/master/build/hakyll.hs |
2022-12-02 13:26:13 +0100 | <opqdonut> | but they use debian packages instead of stack/cabal |
2022-12-02 13:26:25 +0100 | <gurkenglas> | ooh, thanks. i happen to use debian too |
2022-12-02 13:26:42 +0100 | <opqdonut> | as for stack, why not just drop a stack.yaml into the directory |
2022-12-02 13:26:56 +0100 | <opqdonut> | and a whatever.cabal too of course |
2022-12-02 13:27:21 +0100 | <gurkenglas> | that sounds like what i can do if i ever want to have incompatible packages installed elsewhere on the same filesystem :3 |
2022-12-02 13:27:38 +0100 | <int-e> | (The current implementation of concatMap in Data.Text is naive, since it goes via a list of all the Texts, but it doesn't have to be that way.) |
2022-12-02 13:27:51 +0100 | <opqdonut> | but I think if you `stack install` some stuff without a stack.yaml, they go into your global stack project, and should be available in `stack ghci` etc |
2022-12-02 13:27:54 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) |
2022-12-02 13:28:17 +0100 | <gurkenglas> | they didnt appear as entries in the global stack.yaml |
2022-12-02 13:28:27 +0100 | <davean> | int-e: for all the reasons I just discussed. |
2022-12-02 13:28:36 +0100 | <opqdonut> | gurkenglas: yeah they don't appear in the yaml file |
2022-12-02 13:28:52 +0100 | <geekosaur> | I think they don't go into a stack.yaml, they're just registered for use by other stack,.yaml files |
2022-12-02 13:29:30 +0100 | <int-e> | davean: I don't agree with any of those reasons. Yes, you can optimize stuff. But you don't actually need that Maybe to accomplish that. |
2022-12-02 13:29:47 +0100 | <davean> | int-e: this is specificly concatMap with a Maybe marker. Its a concatMap that is optimized for mostly non-changes |
2022-12-02 13:29:54 +0100 | <davean> | int-e: no you kinda can't. Look at filter. |
2022-12-02 13:30:11 +0100 | <davean> | int-e: concatMap has to build a Text, and then you've done all that writing. |
2022-12-02 13:30:16 +0100 | <geekosaur> | also there is no way for stack to use stuff installed via debian. this is not stack's fault; compiled Haskell has references to the exact ghc that compiled it and won;t work with a stack-installed ghc, only with `system-ghc: true` |
2022-12-02 13:30:20 +0100 | <davean> | concatMap *must* scrible all over memory |
2022-12-02 13:30:32 +0100 | <int-e> | davean: Wait. "Nothing" is supposed to mean that the character is reused directly? That makes more sense. |
2022-12-02 13:30:35 +0100 | <davean> | the type forces it |
2022-12-02 13:30:44 +0100 | <int-e> | Sorry, I probably should've read further back. |
2022-12-02 13:30:54 +0100 | <davean> | int-e: yes, Nothing means there is no remapping |
2022-12-02 13:31:03 +0100 | <mauke> | Nothing ~ T.singleton c |
2022-12-02 13:31:16 +0100 | <davean> | So you get to just bump pointer instead of scribble |
2022-12-02 13:31:18 +0100 | Erutuon | (~Erutuon@user/erutuon) (Ping timeout: 256 seconds) |
2022-12-02 13:31:24 +0100 | <int-e> | Okay. Yes, that makes sense. |
2022-12-02 13:31:55 +0100 | <davean> | This is the same trick filter uses |
2022-12-02 13:32:12 +0100 | <gurkenglas> | so, uh. vscode says it couldnt find Text.Pandoc, though I stack-installed pandoc. What am I missing? |
2022-12-02 13:33:12 +0100 | <geekosaur> | `stack install pandoc` is likely to install the pandoc executable and build and throw away the library instead of registering it |
2022-12-02 13:33:47 +0100 | <geekosaur> | I don't know offhand how you make it register pandoc-the-library without using a stack.yaml to declare a dependency on it |
2022-12-02 13:34:43 +0100 | <davean> | int-e: concatMap is actually really pathalogical, look at https://hackage.haskell.org/package/text-2.0.1/docs/src/Data.Text.html#concat |
2022-12-02 13:35:42 +0100 | <davean> | int-e: we have to walk the list of chars in the Text to get the length before we can start copying |
2022-12-02 13:35:54 +0100 | <davean> | which means we have an intermediate state where we store multiples of its size in memory! |
2022-12-02 13:36:01 +0100 | <davean> | and not even a small multiple |
2022-12-02 13:37:23 +0100 | <davean> | A data Array = ByteArray ByteArray# and 2 Ints. |
2022-12-02 13:39:03 +0100 | acidjnk | (~acidjnk@p200300d6e7137a26551ef8a97b851ff9.dip0.t-ipconnect.de) |
2022-12-02 13:39:05 +0100 | <davean> | Sadly we have to kinda use 2x space because we lack a way to partially deallocate as we go. But with the lazy/builder approach we just store a set of patches and serve via a gather which is super efficient. |
2022-12-02 13:39:17 +0100 | <int-e> | davean: I saw that, it could certainly be better. |
2022-12-02 13:39:23 +0100 | <davean> | and only uses 1x+patch memory |
2022-12-02 13:39:27 +0100 | <int-e> | davean: It's worse, it also allocates a full list. |
2022-12-02 13:39:36 +0100 | <davean> | int-e: yah, it does. |
2022-12-02 13:39:40 +0100 | <davean> | I meant to mention that. |
2022-12-02 13:39:42 +0100 | <int-e> | Since `concat` computes the total length first. |
2022-12-02 13:40:03 +0100 | <int-e> | I did mention that above though... and wrote that it *could* be better. |
2022-12-02 13:40:05 +0100 | <davean> | Basicly concatMap is like 10x the space of the text. |
2022-12-02 13:40:20 +0100 | <davean> | int-e: I'm not sure concatMap can be. There are other optimizations but I'm not sure they're better. |
2022-12-02 13:40:45 +0100 | <davean> | like you can do quadratic buffer segment resizings. |
2022-12-02 13:40:58 +0100 | <davean> | Thats only better in some ways. It involves more walks over memory. |
2022-12-02 13:41:01 +0100 | <int-e> | davean: Well, you can bite the buffer doubling bullet. |
2022-12-02 13:41:13 +0100 | <int-e> | (which isn't quadratic) |
2022-12-02 13:41:14 +0100 | <davean> | int-e: thats a lot worse from a memory bandwidth perspetive though |
2022-12-02 13:41:37 +0100 | <davean> | You're just choosing to optimize for memory usage over CPU performance. |
2022-12-02 13:41:43 +0100 | <davean> | Thats not "better" thats different. |
2022-12-02 13:41:47 +0100 | <int-e> | You should probably be using Data.Text.Lazy at that point anyway. |
2022-12-02 13:42:03 +0100 | <int-e> | Which is yet another trade-off of course. |
2022-12-02 13:42:08 +0100 | <davean> | yah, concatMap isn't a great function |
2022-12-02 13:42:27 +0100 | <davean> | hence a version optimized for minimal change :-p |
2022-12-02 13:42:39 +0100 | <davean> | it degrades to concatMap's current form in the worst case. |
2022-12-02 13:42:54 +0100 | <int-e> | (I have not checked what concatMap does there... I /hope/ it makes a stream and collects it into chunks. But I won't dig.) |
2022-12-02 13:43:19 +0100 | <davean> | no, its |
2022-12-02 13:43:20 +0100 | <davean> | concatMap f = concat . foldr ((:) . f) [] |
2022-12-02 13:43:51 +0100 | <int-e> | that's okay for lazy consumption... okay I will have a look |
2022-12-02 13:44:22 +0100 | <davean> | int-e: but again, it can't be lazy because of concat. |
2022-12-02 13:44:41 +0100 | <davean> | concat needs to read the length to allocate the array size before any copying starts. |
2022-12-02 13:44:59 +0100 | <davean> | len = sumP "concat" $ L.map lengthWord8 ts' |
2022-12-02 13:44:59 +0100 | <int-e> | Ah, `concat` does not make any attempt to coalesce short chunks (except for omitting empty ones because those are forbidden) |
2022-12-02 13:45:25 +0100 | <int-e> | Okay. That's terrible for the recoding case (lots of very short fragments) too. |
2022-12-02 13:46:15 +0100 | geekosaur | wonders what this is doing to poor albet70… |
2022-12-02 13:47:27 +0100 | __monty__ | (~toonn@user/toonn) |
2022-12-02 13:47:28 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 252 seconds) |
2022-12-02 13:47:33 +0100 | <davean> | int-e: "recode" might be a better name, or just "escape" |
2022-12-02 13:47:39 +0100 | nate4 | (~nate@98.45.169.16) |
2022-12-02 13:49:37 +0100 | <mauke> | data Replacement = Pass | Replace Text |
2022-12-02 13:49:57 +0100 | <davean> | mauke: thats a Maybe isomorphism :-p |
2022-12-02 13:50:36 +0100 | <mauke> | yes, but the semantics are clearer |
2022-12-02 13:50:44 +0100 | <davean> | Also I'd call that 'Replace', 'Replacement' to me is 'Char -> Replace' |
2022-12-02 13:51:07 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-12-02 13:51:19 +0100 | <davean> | or maybe more its 'Replacement :: (Char, Replace)' |
2022-12-02 13:52:07 +0100 | <davean> | I guess 'Char -> Replace' is 'Replacements' |
2022-12-02 13:52:17 +0100 | <davean> | It really doesn't need a singular |
2022-12-02 13:52:21 +0100 | nate4 | (~nate@98.45.169.16) (Ping timeout: 252 seconds) |
2022-12-02 13:54:35 +0100 | <int-e> | davean: At least there are enough internals exposed that one can go via Data.Text.Internal.Lazy.Fusion.stream and unstream and do the concatenation on the stream level (using stuff from Data.Text.Internal.Fusion.Common.*) |
2022-12-02 13:54:56 +0100 | vektor | (~vektor@IP-185189141204.dynamic.medianet-world.de) |
2022-12-02 13:55:47 +0100 | <davean> | int-e: depending on what you want I don't think you'll get much of what you want - unless what you want is the doubling approach. |
2022-12-02 13:56:00 +0100 | son0p | (~ff@2604:3d08:5b7f:5540::ea0e) |
2022-12-02 13:56:33 +0100 | <int-e> | davean: This is for Data.Text.Lazy, so it would be a chunking approach (~16kb chunks by default) and only the final chunk will be resized in the end. |
2022-12-02 13:56:48 +0100 | <davean> | Ah, sure |
2022-12-02 13:57:13 +0100 | <davean> | for concatMap I guess? |
2022-12-02 13:57:21 +0100 | <int-e> | It's not great though, because there won't be any block copies. |
2022-12-02 13:57:42 +0100 | <int-e> | Then again the scenario was that the map function produces short fragments. |
2022-12-02 13:57:54 +0100 | <davean> | right map does, I was specificly avoiding that :-p |
2022-12-02 13:58:02 +0100 | <int-e> | Eh. It's all just theory, I don't have a pressing need for this right now. |
2022-12-02 13:58:34 +0100 | <vektor> | Is there a good way to constrain a type parameter? I have this data Expr x a = {...} type, and I know a priori that it only makes sense with certain types a. Can I move those constraints from the signature of *almost every function acting on Expr* to the definition of Expr? In my case it's Show and either RealFloat or Floating, not sure. |
2022-12-02 13:59:39 +0100 | <davean> | vektor: you're in Kinds and TypeFamilies territory, or perhaps you shoul go back and consider classes. |
2022-12-02 14:00:10 +0100 | <davean> | You REALLY DON'T want to move them though |
2022-12-02 14:00:13 +0100 | <davean> | They're where they SHOULD be |
2022-12-02 14:00:38 +0100 | <davean> | It changes semantics to move them. |
2022-12-02 14:00:56 +0100 | <int-e> | `text` is just surprisingly unsophisticated. |
2022-12-02 14:01:09 +0100 | <c_wraith> | it's also really nice when each type signature lists the things it actually needs. |
2022-12-02 14:01:10 +0100 | <vektor> | You think they should be there? I'm aware it changes semantics, but my type Expr with a non-Floating a makes *no* sense. |
2022-12-02 14:01:13 +0100 | <davean> | int-e: I mean there aren't any general solutions here. |
2022-12-02 14:01:29 +0100 | <davean> | vektor: no I mean it changes *what code gets run* |
2022-12-02 14:01:46 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2022-12-02 14:01:47 +0100 | <davean> | Where it goes changes the *code* |
2022-12-02 14:01:54 +0100 | <davean> | I know you think they're equivilent, they're not |
2022-12-02 14:01:59 +0100 | <vektor> | Oh yeah, I don't need to mess with that, that's fair. |
2022-12-02 14:02:07 +0100 | <davean> | you can use an existential to shove it into the datatype, but that shoves the dictionary in for example. |
2022-12-02 14:02:33 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 14:02:37 +0100 | <davean> | and now the dictionary is carried in a different location |
2022-12-02 14:02:55 +0100 | <mauke> | what are the semantics of class constraints on data types again? |
2022-12-02 14:03:13 +0100 | <davean> | data Expr x a = forall x . Floating x => {...} |
2022-12-02 14:03:24 +0100 | <davean> | mauke: do you mean existentials? |
2022-12-02 14:03:27 +0100 | <mauke> | (not that one, that's a constructor constraint) |
2022-12-02 14:03:42 +0100 | <vektor> | Well, alright then, analogy by different but similar use case: How would physics engines handle "parametric" precision, where you can run the same basic code with f32 or f64 numbers, depending on your mood today? |
2022-12-02 14:03:54 +0100 | <c_wraith> | mauke: it puts the constraint on the constructor, but it doesn't do anything with the instance dictionary |
2022-12-02 14:03:59 +0100 | <davean> | mauke: then I don't know what you mean by class constraints on datatypes - every other constraint is on a function |
2022-12-02 14:04:23 +0100 | <davean> | vektor: PhysicsEngine precision |
2022-12-02 14:04:25 +0100 | <mauke> | c_wraith: ah |
2022-12-02 14:04:29 +0100 | <mauke> | that makes sense |
2022-12-02 14:04:47 +0100 | <merijn> | mauke: Constraints on datatypes were removed in Haskell2010 |
2022-12-02 14:05:19 +0100 | <c_wraith> | well. removed by default. Last I checked you can still enable them (but you shouldn't) |
2022-12-02 14:05:26 +0100 | <mauke> | topdecl → data [context =>] simpletype [= constrs] [deriving] |
2022-12-02 14:05:37 +0100 | <mauke> | ^ that's from the 2010 report |
2022-12-02 14:05:37 +0100 | <vektor> | So same as Expr Float vs Expr Double? And literally every function that does anything with those has to specify if it wants to Show, Eq, Ord, whatever, those numbers? |
2022-12-02 14:06:08 +0100 | <davean> | vektor: For a VERY good reason, it changes *the calling convention of the function* |
2022-12-02 14:06:18 +0100 | <tomsmeding> | davean: yeah makes sense, sorry for the delay. Also saves allocation of lots of singleton Texts, which should help |
2022-12-02 14:06:25 +0100 | <davean> | What your'e imagining are not at all the same function calls. |
2022-12-02 14:06:26 +0100 | <mauke> | vektor: yes |
2022-12-02 14:06:46 +0100 | <davean> | vektor: you can make an alias for the shared constraints BTW |
2022-12-02 14:07:45 +0100 | <davean> | vektor: "f :: C c => c -> r" and "data D = forall c . C c => ..." "f :: D -> r" are DEEPLY different functions |
2022-12-02 14:07:55 +0100 | <davean> | vektor: you're thinking they're similar *they are not similar* |
2022-12-02 14:08:16 +0100 | <davean> | The case you showed was a little better |
2022-12-02 14:08:28 +0100 | <davean> | (Since you exposed it as 'D c') |
2022-12-02 14:08:33 +0100 | <vektor> | Ahh, the alias is a decent idea. So I'll just make my own typeclass FloatingWithBenefits that implies Floating and Show and whatever else I need. Then I just annotate everything with FloatingWithBenefits and have a lot less to worry about if I so much as print a value in a place I didn't think I'd have to. That'd help. |
2022-12-02 14:08:59 +0100 | zant | (~zant@62.214.20.26) (Ping timeout: 260 seconds) |
2022-12-02 14:09:03 +0100 | <davean> | vektor: you can just do "type FloatingWithBenefits a = (Floating a, ...)" |
2022-12-02 14:09:10 +0100 | <davean> | thats a constraint type |
2022-12-02 14:09:20 +0100 | <davean> | so you can use type to make an alias for the constraints |
2022-12-02 14:09:22 +0100 | cfricke | (~cfricke@user/cfricke) (Quit: WeeChat 3.7.1) |
2022-12-02 14:09:24 +0100 | <davean> | no type class needed |
2022-12-02 14:09:57 +0100 | <davean> | vektor: so can you figure out why the example things above are completely different *semanticly*? |
2022-12-02 14:10:31 +0100 | <mauke> | merijn: https://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-690004.2.1 |
2022-12-02 14:10:50 +0100 | <vektor> | I'm not completely sure. I'd expect different internal behavior for type reasons. Dynamic dispatch or similar things, but nah, I don't know. |
2022-12-02 14:11:34 +0100 | tremon | (~tremon@83-84-18-241.cable.dynamic.v4.ziggo.nl) |
2022-12-02 14:11:46 +0100 | <mauke> | yeah, pretty much |
2022-12-02 14:11:47 +0100 | <davean> | vektor: yes, the second is dynamically dispatched and has added a field holding a dictionary to D. |
2022-12-02 14:12:04 +0100 | <mauke> | that is, the second version packs an extra vtable into the data type |
2022-12-02 14:12:21 +0100 | <mauke> | so each value of that type can carry its own implementation of the class |
2022-12-02 14:12:30 +0100 | <davean> | The first version either passes the vtable as a parameter to the function, or eliminates it entirely. |
2022-12-02 14:12:43 +0100 | <davean> | the first version has a coherency property the second lacks. |
2022-12-02 14:13:07 +0100 | <vektor> | ohh, right, the second variant generates one function for a concrete D, but it doesn't know which flavor of C to use, so it has to solve that dynamically. The first variant can just generate one implementation for every C it comes in contact with. |
2022-12-02 14:13:10 +0100 | <davean> | mauke: of *every* class |
2022-12-02 14:13:18 +0100 | <davean> | vektor: yep |
2022-12-02 14:13:23 +0100 | <vektor> | Ewww |
2022-12-02 14:13:24 +0100 | <mauke> | davean: huh? |
2022-12-02 14:13:38 +0100 | <davean> | mauke: well, there could be multipel class constraints |
2022-12-02 14:13:49 +0100 | <davean> | vektor: this is why you don't move it! |
2022-12-02 14:14:27 +0100 | <mauke> | vektor: in practice, it probably doesn't generate different implementations for every instance of C |
2022-12-02 14:14:28 +0100 | <vektor> | Yeah, I see. I had hoped there was a construct that did what I wanted in a reasonable way. |
2022-12-02 14:14:36 +0100 | <mauke> | or does ghc aggressively specialize functions? |
2022-12-02 14:14:45 +0100 | <davean> | mauke: it agressively specializes usually. |
2022-12-02 14:14:58 +0100 | <davean> | mauke: usually, not universally, but usually. |
2022-12-02 14:15:21 +0100 | <merijn> | mauke: Statically known typeclasses are almost certainly inlined and specialised |
2022-12-02 14:15:23 +0100 | <mauke> | well, it can't be completely universally because you can create types at runtime :-) |
2022-12-02 14:15:53 +0100 | <c_wraith> | but if you know a function is likely to be called at only a couple instances, SPECIALIZE pragmas are nice |
2022-12-02 14:16:11 +0100 | <vektor> | I had hoped there was something like "Expr x a (Floating a, Show a) = [...] and it would just ensure that every a used in Expr x a ever had those type classes. Like moving the constraints, except without causing silliness in the process. |
2022-12-02 14:16:14 +0100 | <davean> | c_wraith: yah those are often redundent though. |
2022-12-02 14:16:36 +0100 | <c_wraith> | davean: I suspect they're most useful when doing cross-module stuff |
2022-12-02 14:16:40 +0100 | <davean> | vektor: so that can't be for a few reasons. |
2022-12-02 14:16:47 +0100 | <davean> | c_wraith: yah. |
2022-12-02 14:16:49 +0100 | <mauke> | vektor: unfortunately, every approach has some degree of silliness, only in different places |
2022-12-02 14:17:16 +0100 | <davean> | vektor: I could get into the details, but its litterly not possible to do that without semantic issues. |
2022-12-02 14:17:19 +0100 | <vektor> | mauke: Obviously haskell should've picked the one that moves all the silliness to places where I don't care about it, duh. |
2022-12-02 14:17:29 +0100 | <davean> | vektor: no, that can't exist. |
2022-12-02 14:17:36 +0100 | <davean> | thats litterly impossible. |
2022-12-02 14:17:46 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
2022-12-02 14:17:55 +0100 | <mauke> | :-) |
2022-12-02 14:18:01 +0100 | <davean> | vektor: consider a varargs function. |
2022-12-02 14:18:12 +0100 | <davean> | vektor: you don't know if it'll be passed a D or not. |
2022-12-02 14:18:31 +0100 | <davean> | Your approach is vulnerable to a shell game. |
2022-12-02 14:18:48 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "") |
2022-12-02 14:18:52 +0100 | <davean> | We can derive a contradiction in any approach that tries to emulate what you want. |
2022-12-02 14:19:12 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2022-12-02 14:19:28 +0100 | <vektor> | davean: Obviously you eliminate varargs from the language then, because I've never used them ;) |
2022-12-02 14:19:59 +0100 | <davean> | vektor: They're not in the language |
2022-12-02 14:20:03 +0100 | <mauke> | Haskell is way ahead of you: there are no varargs |
2022-12-02 14:20:16 +0100 | <davean> | We can build them though. |
2022-12-02 14:20:44 +0100 | <mauke> | > [id (), id id (), id id id (), id id id id ()] |
2022-12-02 14:20:46 +0100 | <lambdabot> | [(),(),(),()] |
2022-12-02 14:20:55 +0100 | <mauke> | how many arguments does 'id' take? |
2022-12-02 14:20:59 +0100 | <davean> | mauke: 1 |
2022-12-02 14:21:14 +0100 | <davean> | mauke: every function in Haskell takes 1 argument |
2022-12-02 14:21:25 +0100 | <mauke> | schöngefinkelt |
2022-12-02 14:21:51 +0100 | xilo | (~yourname@user/xilo) (Quit: leaving) |
2022-12-02 14:22:04 +0100 | <davean> | so if you have "f :: a -> b -> c" that is actually short hand for "f :: a -> (b -> c)" |
2022-12-02 14:22:14 +0100 | <davean> | you give it one argument and get back a function that takes a b to produce a c |
2022-12-02 14:22:26 +0100 | <int-e> | > id id id id id id id id id id id id id id id id id id id id id id id id 1 |
2022-12-02 14:22:32 +0100 | <lambdabot> | mueval-core: Time limit exceeded |
2022-12-02 14:22:37 +0100 | <vektor> | wat |
2022-12-02 14:22:37 +0100 | <mauke> | haha |
2022-12-02 14:22:52 +0100 | <vektor> | how? |
2022-12-02 14:23:01 +0100 | <merijn> | typechecking of that blows up |
2022-12-02 14:23:03 +0100 | <int-e> | vektor: it doesn't get to run, the type-checking takes too long when compiling |
2022-12-02 14:23:20 +0100 | <davean> | thats a LOT of type checking. |
2022-12-02 14:23:26 +0100 | <mauke> | :t id id id id id id id id id id id id id id id id id id id id id id id id 1 |
2022-12-02 14:23:26 +0100 | <lambdabot> | Num a => a |
2022-12-02 14:23:32 +0100 | <mauke> | looks fine to me |
2022-12-02 14:23:49 +0100 | <int-e> | :t id `asArgOf` (\i -> i id id ()) |
2022-12-02 14:23:50 +0100 | <lambdabot> | ((() -> ()) -> () -> ()) -> (() -> ()) -> () -> () |
2022-12-02 14:23:54 +0100 | <int-e> | :t id `asArgOf` (\i -> i id id id ()) |
2022-12-02 14:23:55 +0100 | <lambdabot> | (((() -> ()) -> () -> ()) -> (() -> ()) -> () -> ()) -> ((() -> ()) -> () -> ()) -> (() -> ()) -> () -> () |
2022-12-02 14:24:01 +0100 | <int-e> | etc. |
2022-12-02 14:24:06 +0100 | jmdaemon | (~jmdaemon@user/jmdaemon) (Ping timeout: 255 seconds) |
2022-12-02 14:24:25 +0100 | <vektor> | :t id |
2022-12-02 14:24:26 +0100 | <lambdabot> | a -> a |
2022-12-02 14:24:31 +0100 | <mauke> | @src id |
2022-12-02 14:24:31 +0100 | <lambdabot> | id x = x |
2022-12-02 14:25:00 +0100 | <int-e> | in order to use `id id`, the first `id` has to be instantiated as (a -> a) -> (a -> a) |
2022-12-02 14:25:04 +0100 | <davean> | vektor: Welcome to the base mathematics. Here lies your problems. |
2022-12-02 14:25:23 +0100 | <vektor> | The base maths were supposed to solve my problems, not cause them! |
2022-12-02 14:25:25 +0100 | <vektor> | :D |
2022-12-02 14:25:47 +0100 | <davean> | vektor: yah, uh, thats what type aliases do in this case :-p |
2022-12-02 14:26:03 +0100 | <vektor> | int-e ahh yeah now that weird chain makes sense. |
2022-12-02 14:26:13 +0100 | <davean> | vektor: so there is another option |
2022-12-02 14:26:16 +0100 | <davean> | you can use a Kind |
2022-12-02 14:26:32 +0100 | <davean> | "PhysicsEngine (f :: Precision)" |
2022-12-02 14:26:45 +0100 | <davean> | "data Precision = P32 | P64" |
2022-12-02 14:27:16 +0100 | <davean> | type family PrecisionType P32 = Float |
2022-12-02 14:27:18 +0100 | <davean> | etc. |
2022-12-02 14:27:51 +0100 | <vektor> | davean: Yeah, I guess I could. But I'd have to read a few more chapters of the book to understand what I'm actually doing :D |
2022-12-02 14:27:54 +0100 | xilo | (~yourname@user/xilo) |
2022-12-02 14:28:14 +0100 | <davean> | vektor: Its actually not that bad. |
2022-12-02 14:28:27 +0100 | <vektor> | (Jokes aside, I should read on, but I'm being paid to read ML papers, not PL books) |
2022-12-02 14:28:40 +0100 | <vektor> | ML = machine learning |
2022-12-02 14:28:42 +0100 | <davean> | I basicly just wrote it for you (a little syntax needs to be fixed up) |
2022-12-02 14:28:49 +0100 | <mauke> | ML is a PL, technically |
2022-12-02 14:29:02 +0100 | <vektor> | mauke, but only the other ML, right? |
2022-12-02 14:29:09 +0100 | <mauke> | yeah :-) |
2022-12-02 14:29:20 +0100 | zant | (~zant@ip-109-40-242-105.web.vodafone.de) |
2022-12-02 14:29:21 +0100 | bgs | (~bgs@212-85-160-171.dynamic.telemach.net) |
2022-12-02 14:29:21 +0100 | <davean> | vektor: We've just made a function of types and used a data type at the type level to act as an allowed set. |
2022-12-02 14:29:29 +0100 | <vektor> | TBF there's connections about PLs for ML, which is why I'm here. |
2022-12-02 14:29:40 +0100 | <davean> | Technically its not Haskell. |
2022-12-02 14:29:57 +0100 | <davean> | But lets ignore that because it works. |
2022-12-02 14:29:57 +0100 | <merijn> | Man...I wish GHC 8.10 was faster so this refactoring didn't take me forever >.> |
2022-12-02 14:29:57 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 14:30:08 +0100 | <davean> | merijn: people still use GHC 8 series? :-p |
2022-12-02 14:30:28 +0100 | <merijn> | davean: Yes, because this shit needs to be refactored before I can move on to 9.x |
2022-12-02 14:30:33 +0100 | bgs | (~bgs@212-85-160-171.dynamic.telemach.net) (Remote host closed the connection) |
2022-12-02 14:30:38 +0100 | <davean> | merijn: ouch. Good luck! |
2022-12-02 14:30:45 +0100 | ph88 | (~ph88@2409:4055:69b:8d2b:7459:2a5e:a35c:3cd4) |
2022-12-02 14:30:53 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-12-02 14:30:53 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) (Read error: Connection reset by peer) |
2022-12-02 14:30:59 +0100 | <davean> | to be fair 8.10 was a pretty good vintage. |
2022-12-02 14:31:08 +0100 | <merijn> | davean: old persistent doesn't support 9.x and new persistent broke, basically everything in my code |
2022-12-02 14:31:08 +0100 | <davean> | 9 had some rough bits. |
2022-12-02 14:31:27 +0100 | <davean> | Ah, I don't touch persistent. |
2022-12-02 14:31:36 +0100 | <merijn> | So I need to rework this code for new persistent before I can go to 9.2, but being big code + lots of TH == absolute shit compile times |
2022-12-02 14:31:41 +0100 | <merijn> | davean: Smart >.> |
2022-12-02 14:31:49 +0100 | <davean> | merijn: It was a well considered choice. |
2022-12-02 14:31:57 +0100 | <davean> | I read most libraries I consider using :-p |
2022-12-02 14:31:59 +0100 | ph88^ | (~ph88@2409:4055:69b:8d2b:7459:2a5e:a35c:3cd4) |
2022-12-02 14:32:22 +0100 | <merijn> | davean: Well, writing a manual SQL schema was scary when I hadn't done SQL in ages |
2022-12-02 14:32:37 +0100 | <merijn> | but in hindsight woulda been the sane choice |
2022-12-02 14:32:38 +0100 | ec_ | (~ec@gateway/tor-sasl/ec) |
2022-12-02 14:32:56 +0100 | <davean> | merijn: Yah, persistent can't do a good job, theres no abstraction that can space the range. |
2022-12-02 14:33:07 +0100 | <davean> | And Haskell has some good SQL systems. |
2022-12-02 14:33:26 +0100 | <davean> | SQL is annoying though. |
2022-12-02 14:33:30 +0100 | <merijn> | persistent was nicer at first, the problem is that parts of it have grown into contradictory directions and now everything is kind of a mess |
2022-12-02 14:33:33 +0100 | <davean> | I'd avoid it if I could. |
2022-12-02 14:33:39 +0100 | <merijn> | davean: :O |
2022-12-02 14:33:41 +0100 | <merijn> | SQL = <3 |
2022-12-02 14:33:56 +0100 | <davean> | Hey, its just the best option we have! |
2022-12-02 14:33:57 +0100 | <merijn> | My happiness is directly correlated too much of my stuff I managed to ram into SQLite |
2022-12-02 14:33:58 +0100 | <davean> | I can want better. |
2022-12-02 14:34:01 +0100 | geekosaur | wonders how much better the world would be if QUEL had won |
2022-12-02 14:34:29 +0100 | <vektor> | Man, SQL.... I need a haskell/rust kinda overhaul to that and latex. |
2022-12-02 14:34:43 +0100 | <merijn> | I mean, people keep trying to replace SQL with other stuff that's way, way worse |
2022-12-02 14:34:46 +0100 | yuribarros | (~yuribarro@2804:14c:65e4:865c::1000) |
2022-12-02 14:34:55 +0100 | <vektor> | I hate SQL, maybe a bit too much. Latex I love, but there's so much that could be done better by now. |
2022-12-02 14:34:59 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 264 seconds) |
2022-12-02 14:35:23 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-02 14:35:35 +0100 | ph88 | (~ph88@2409:4055:69b:8d2b:7459:2a5e:a35c:3cd4) (Ping timeout: 260 seconds) |
2022-12-02 14:36:19 +0100 | <tomsmeding> | lol why does :t on id*50 give a result instantly whereas evaluating it takes forever |
2022-12-02 14:36:20 +0100 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Ping timeout: 255 seconds) |
2022-12-02 14:36:23 +0100 | <davean> | Well, have a nice night all, its been interesting! I hope you play with the different approachs vektor, I think you'll find some enlightenment in looking at what the two versions of the code that aren't existential crisises are like. When you're bored of ML papers. |
2022-12-02 14:36:40 +0100 | <vektor> | TBF, if haskellers had their way I'd reckon latex and sql would be DSLs within haskell. |
2022-12-02 14:36:44 +0100 | Guest|84 | (~Guest|84@p5dffbb7a.dip0.t-ipconnect.de) |
2022-12-02 14:36:56 +0100 | <vektor> | I might have a minute on the weekend to play around. Thanks davean |
2022-12-02 14:37:04 +0100 | <davean> | and tomsmeding you might have inspired me to contribute some of my regularly writen functions back to 'text' |
2022-12-02 14:37:05 +0100 | <tomsmeding> | vektor: latex needs to compile _faster_, not slower |
2022-12-02 14:37:14 +0100 | Guest|84 | (~Guest|84@p5dffbb7a.dip0.t-ipconnect.de) (Client Quit) |
2022-12-02 14:37:19 +0100 | <davean> | vektor: SQL is a DSL inside Haskell |
2022-12-02 14:37:22 +0100 | <merijn> | tomsmeding: LaTeX needs better namespacing, modules, and errors |
2022-12-02 14:37:23 +0100 | <davean> | but I need to head out :) |
2022-12-02 14:37:27 +0100 | <tomsmeding> | merijn: true |
2022-12-02 14:37:57 +0100 | <vektor> | I'm not at all surprised that someone has rewritten SQL within haskell. Now take some substantial liberties and make it a sane user experience lol |
2022-12-02 14:38:26 +0100 | <geekosaur> | I suspect that absent row types it's not gonna be at all sane |
2022-12-02 14:38:46 +0100 | <int-e> | tomsmeding: yeah I don't know... speculation: type-checking works directly on the parsed Haskell code; running has to convert that to STG with explicit type applications and all that. |
2022-12-02 14:38:46 +0100 | <davean> | vektor: people might consider https://hackage.haskell.org/package/opaleye that for example, depending on your objective function. |
2022-12-02 14:38:52 +0100 | <davean> | but I've overstayed my time |
2022-12-02 14:39:22 +0100 | <tomsmeding> | int-e: oh, decent hypothesis, probably the Core is exponentially-sized whereas the types are only quadratic or something? |
2022-12-02 14:39:29 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds) |
2022-12-02 14:39:35 +0100 | <vektor> | not looking at the details, type safe and composable queries is the kinda stuff I'm thinking. |
2022-12-02 14:40:04 +0100 | <davean> | vektor: https://github.com/tomjaguarpaw/haskell-opaleye/blob/master/Doc/Tutorial/TutorialAdvanced.lhs |
2022-12-02 14:40:06 +0100 | <davean> | > rangeOfChildrensAges :: Select (Field SqlText, Field SqlInt4) |
2022-12-02 14:40:08 +0100 | <lambdabot> | error: |
2022-12-02 14:40:08 +0100 | <lambdabot> | Not in scope: type constructor or class ‘Select’error: |
2022-12-02 14:40:08 +0100 | <davean> | > rangeOfChildrensAges = aggregate (p2 (A.groupBy, range)) (selectTable personTable) |
2022-12-02 14:40:08 +0100 | <lambdabot> | Not in scope: type constructor or class ‘Field’ |
2022-12-02 14:40:10 +0100 | <lambdabot> | <hint>:1:22: error: parse error on input ‘=’ |
2022-12-02 14:40:14 +0100 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2022-12-02 14:40:16 +0100 | <davean> | really though, I'm gone! |
2022-12-02 14:40:20 +0100 | <int-e> | tomsmeding: There's a lot of sharing inside those types for sure. I know too little about how ghc implements the underlying unification though. |
2022-12-02 14:40:27 +0100 | <davean> | (and don't advocate Opaleye) |
2022-12-02 14:41:02 +0100 | <tomsmeding> | int-e: wasn't the large-records work from well-typed also simply because the types in Core have no sharing whatsoever? |
2022-12-02 14:41:13 +0100 | <merijn> | davean: Can I advocate sqlite-simple and postgresql-simple? ;) |
2022-12-02 14:41:34 +0100 | <int-e> | tomsmeding: Actually... I guess there isn't much to unify. You only have direct equations a = b -> b to solve, nothing deeper. So at least naively there's nothing that would blow up there. |
2022-12-02 14:42:20 +0100 | <tomsmeding> | int-e: I guess the type checking itself doesn't necessarily blow up, just that the generated Core with full type annotations is ridiculously large |
2022-12-02 14:42:46 +0100 | <tomsmeding> | (which presumably gets instantly simplified down to nothing) |
2022-12-02 14:43:55 +0100 | <int-e> | tomsmeding: More precisely, I think type-checking does create the full types (albeit with sharing so it doesn't blow up yet), but they're never traversed. That only happens when translating to STG, and sharing is lost. |
2022-12-02 14:43:55 +0100 | razetime | (~quassel@49.207.211.219) (Read error: Connection reset by peer) |
2022-12-02 14:44:14 +0100 | <int-e> | Or maybe it happens even later. |
2022-12-02 14:44:33 +0100 | <tomsmeding> | not already in generating Core? I'd be surprised if that only happens when going to STG |
2022-12-02 14:44:44 +0100 | <tomsmeding> | but anyway, sounds reasonable |
2022-12-02 14:44:52 +0100 | <int-e> | I don't know whether the type representation stays the same. |
2022-12-02 14:48:19 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 14:49:33 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 14:51:17 +0100 | zant | (~zant@ip-109-40-242-105.web.vodafone.de) (Read error: Connection reset by peer) |
2022-12-02 15:00:25 +0100 | irrgit_ | (~irrgit@176.113.74.74) |
2022-12-02 15:02:11 +0100 | cfricke | (~cfricke@user/cfricke) |
2022-12-02 15:10:29 +0100 | zant | (~zant@62.96.232.178) |
2022-12-02 15:10:46 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-12-02 15:11:20 +0100 | <int-e> | tomsmeding: Oh. Sorry, yes, Core. |
2022-12-02 15:11:42 +0100 | <int-e> | Evidently I'm not fully here. |
2022-12-02 15:13:09 +0100 | dextaa | (~DV@user/dextaa) (Ping timeout: 260 seconds) |
2022-12-02 15:16:20 +0100 | dnlsur | (~textual@r186-50-121-2.dialup.adsl.anteldata.net.uy) (Ping timeout: 246 seconds) |
2022-12-02 15:19:31 +0100 | titibandit | (~titibandi@xdsl-78-35-173-119.nc.de) |
2022-12-02 15:20:31 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-12-02 15:21:10 +0100 | potash | (~foghorn@user/foghorn) |
2022-12-02 15:24:05 +0100 | ft | (~ft@p508dbd59.dip0.t-ipconnect.de) |
2022-12-02 15:28:35 +0100 | dsrt^ | (~dsrt@76.145.185.103) (Ping timeout: 246 seconds) |
2022-12-02 15:30:15 +0100 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Remote host closed the connection) |
2022-12-02 15:30:16 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2022-12-02 15:30:31 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-02 15:30:47 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 15:30:51 +0100 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2022-12-02 15:32:18 +0100 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Remote host closed the connection) |
2022-12-02 15:32:37 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Remote host closed the connection) |
2022-12-02 15:32:59 +0100 | <tomsmeding> | int-e: don't worry, it's irc :p |
2022-12-02 15:33:00 +0100 | <merijn> | bah |
2022-12-02 15:33:12 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 15:33:18 +0100 | <tomsmeding> | hello dr merijn |
2022-12-02 15:33:26 +0100 | <merijn> | Changed 50 files to accommodate new persistent API and it's still not working as it should |
2022-12-02 15:33:54 +0100 | <yin> | i find myself using the pattern `uncurry h . (f &&& g)` which i found out it's called a fork in array based languages such as APL. is there a canonical way to do this in haskell? |
2022-12-02 15:34:22 +0100 | <tomsmeding> | :t \f g h -> uncurry h . (f &&& g) |
2022-12-02 15:34:23 +0100 | <lambdabot> | (a1 -> a2) -> (a1 -> b) -> (a2 -> b -> c) -> a1 -> c |
2022-12-02 15:34:46 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Ping timeout: 252 seconds) |
2022-12-02 15:35:01 +0100 | <tomsmeding> | hm, if f = g it's h `on` f |
2022-12-02 15:35:06 +0100 | <tomsmeding> | Data.Function.on |
2022-12-02 15:35:39 +0100 | <yin> | yeah but the point is exaclty that f /= g |
2022-12-02 15:35:57 +0100 | <yin> | hence "fork" |
2022-12-02 15:35:57 +0100 | <mauke> | wait, which one was liftM2 again? |
2022-12-02 15:36:06 +0100 | shriekingnoise | (~shrieking@186.137.167.202) |
2022-12-02 15:36:32 +0100 | <tomsmeding> | liftM2 = liftA2 = \f x y -> f <$> x <*> y |
2022-12-02 15:36:43 +0100 | <mauke> | no, in terms of functions |
2022-12-02 15:36:46 +0100 | <tomsmeding> | @hoogle (a -> b) -> (a -> c) -> (b -> c -> d) -> a -> d |
2022-12-02 15:36:47 +0100 | <lambdabot> | No results found |
2022-12-02 15:36:49 +0100 | <tomsmeding> | sad |
2022-12-02 15:37:14 +0100 | ph88^ | (~ph88@2409:4055:69b:8d2b:7459:2a5e:a35c:3cd4) (Remote host closed the connection) |
2022-12-02 15:37:34 +0100 | ph88^ | (~ph88@2409:4055:69b:8d2b:683f:b539:7dcf:d718) |
2022-12-02 15:37:37 +0100 | <mauke> | :t \h f g x -> liftM2 h f g x |
2022-12-02 15:37:38 +0100 | <lambdabot> | (a1 -> a2 -> t1) -> (t2 -> a1) -> (t2 -> a2) -> t2 -> t1 |
2022-12-02 15:37:42 +0100 | cafkafk | (~cafkafk@fsf/member/cafkafk) |
2022-12-02 15:37:58 +0100 | <mauke> | yeah, there we go |
2022-12-02 15:38:02 +0100 | <tomsmeding> | mauke++ |
2022-12-02 15:38:06 +0100 | <tomsmeding> | neat |
2022-12-02 15:38:41 +0100 | ss4 | (~wootehfoo@user/wootehfoot) |
2022-12-02 15:38:42 +0100 | <tomsmeding> | https://hackage.haskell.org/package/data-aviary-0.4.0/docs/Data-Aviary-Birds.html#v:phoenix |
2022-12-02 15:39:14 +0100 | <yin> | great |
2022-12-02 15:39:57 +0100 | <mauke> | of course, the Applicative instance works too (and nicely decomposes) |
2022-12-02 15:40:06 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-12-02 15:40:39 +0100 | <mauke> | @pl \h f g x -> h (f x) (g x) |
2022-12-02 15:40:39 +0100 | <lambdabot> | liftM2 |
2022-12-02 15:40:40 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-02 15:40:45 +0100 | <tomsmeding> | heh |
2022-12-02 15:40:50 +0100 | <yin> | nice! |
2022-12-02 15:40:50 +0100 | <mauke> | @pl \h f x -> h (f x) x |
2022-12-02 15:40:50 +0100 | <lambdabot> | flip flip id . liftM2 |
2022-12-02 15:40:53 +0100 | foul_owl | (~kerry@193.29.61.77) (Ping timeout: 256 seconds) |
2022-12-02 15:41:02 +0100 | <mauke> | @pl \h f x -> h x (f x) |
2022-12-02 15:41:02 +0100 | <lambdabot> | ap |
2022-12-02 15:41:26 +0100 | <tomsmeding> | exercise for the reader: query the types of flip, flip flip, flip flip flip, etc. and explain why this sequence converges |
2022-12-02 15:41:30 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) (Ping timeout: 260 seconds) |
2022-12-02 15:41:42 +0100 | <mauke> | there was a better one for h (f x) x |
2022-12-02 15:41:46 +0100 | <mauke> | I remember drawing it in paint |
2022-12-02 15:42:06 +0100 | <mauke> | @pl \x -> h x (f x) |
2022-12-02 15:42:06 +0100 | <lambdabot> | ap h f |
2022-12-02 15:42:13 +0100 | <mauke> | @pl \x -> h (f x) x |
2022-12-02 15:42:13 +0100 | <lambdabot> | h =<< f |
2022-12-02 15:42:19 +0100 | <mauke> | ah, there we go |
2022-12-02 15:43:33 +0100 | <yin> | tomsmeding: thanks... i *was* working |
2022-12-02 15:43:50 +0100 | <tomsmeding> | haha |
2022-12-02 15:45:13 +0100 | dtman34 | (~dtman34@76.156.89.180) (Ping timeout: 268 seconds) |
2022-12-02 15:47:23 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-12-02 15:50:16 +0100 | <tomsmeding> | I'm not even sure there is a very satisfying explanation |
2022-12-02 15:51:20 +0100 | dtman34 | (~dtman34@2601:447:d000:93c9:9275:521b:dd0e:68f1) |
2022-12-02 15:51:39 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 260 seconds) |
2022-12-02 15:52:00 +0100 | <lortabac> | a similar sequence is const, const const, const const const... |
2022-12-02 15:52:21 +0100 | <tomsmeding> | that one is easier to explain though :) |
2022-12-02 15:54:15 +0100 | foul_owl | (~kerry@193.29.61.77) |
2022-12-02 15:54:53 +0100 | <yin> | tomsmeding: that's the only kind of acceptable "exercises to the reader", the ones where there's no alternative to getting it on your own |
2022-12-02 15:55:29 +0100 | ph88^ | (~ph88@2409:4055:69b:8d2b:683f:b539:7dcf:d718) (Read error: Connection reset by peer) |
2022-12-02 15:56:48 +0100 | <tomsmeding> | in any case simplifying the value-level definition gives more insight than looking at the types :p |
2022-12-02 15:58:06 +0100 | <yin> | in the const case yes, but in the flip case? |
2022-12-02 15:58:38 +0100 | <yin> | well |
2022-12-02 15:58:39 +0100 | <tomsmeding> | the crux is that apparently, (\x y -> x y flip) flip = \y -> flip y flip = \y u -> y u flip |
2022-12-02 15:58:51 +0100 | <tomsmeding> | but I'm not yet sure how to explain that one |
2022-12-02 15:59:01 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-12-02 15:59:12 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 16:00:03 +0100 | <yin> | `flip flip flip flip === flip flip flip flip` is an insight, i guess... |
2022-12-02 16:03:24 +0100 | <tomsmeding> | did you mean to write `flip flip flip flip === flip flip flip`? |
2022-12-02 16:05:38 +0100 | <yin> | no! |
2022-12-02 16:05:58 +0100 | <yin> | i think i have an acceptable insight |
2022-12-02 16:06:07 +0100 | <yin> | @pl flip flip flip a |
2022-12-02 16:06:07 +0100 | <lambdabot> | flip a flip |
2022-12-02 16:06:11 +0100 | <yin> | @pl flip flip a flip |
2022-12-02 16:06:11 +0100 | <lambdabot> | flip flip a |
2022-12-02 16:06:48 +0100 | cfricke | (~cfricke@user/cfricke) (Quit: WeeChat 3.7.1) |
2022-12-02 16:07:03 +0100 | cods | (~fred@82-65-232-44.subs.proxad.net) (Ping timeout: 260 seconds) |
2022-12-02 16:07:16 +0100 | cods | (~fred@82-65-232-44.subs.proxad.net) |
2022-12-02 16:07:51 +0100 | <tomsmeding> | nice |
2022-12-02 16:08:34 +0100 | <tomsmeding> | f f f f = f f1 f2 f3 = f1 f3 f2 = f f f |
2022-12-02 16:08:41 +0100 | <tomsmeding> | that makes lots of sense |
2022-12-02 16:09:16 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) |
2022-12-02 16:09:24 +0100 | <tomsmeding> | :t flip flip flip |
2022-12-02 16:09:24 +0100 | <lambdabot> | (a1 -> ((a2 -> b -> c1) -> b -> a2 -> c1) -> c2) -> a1 -> c2 |
2022-12-02 16:09:32 +0100 | <tomsmeding> | @djinn (a1 -> ((a2 -> b -> c1) -> b -> a2 -> c1) -> c2) -> a1 -> c2 |
2022-12-02 16:09:32 +0100 | <lambdabot> | f a b = a b (\ c d e -> c e d) |
2022-12-02 16:09:50 +0100 | <tomsmeding> | i.e. \a b -> a b flip |
2022-12-02 16:12:12 +0100 | <yin> | i'm getting that feeling where a word loses its meaning when you keep repeating it |
2022-12-02 16:13:13 +0100 | <yin> | which is terribly appropriate! haha |
2022-12-02 16:13:17 +0100 | <tomsmeding> | yes :p |
2022-12-02 16:13:43 +0100 | Xeroine | (~Xeroine@user/xeroine) (Read error: Connection reset by peer) |
2022-12-02 16:14:32 +0100 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2022-12-02 16:14:51 +0100 | Xeroine | (~Xeroine@user/xeroine) |
2022-12-02 16:15:34 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:d06:f4b:7f4f:76b1) (Quit: WeeChat 2.8) |
2022-12-02 16:16:31 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2022-12-02 16:17:21 +0100 | ss4 | (~wootehfoo@user/wootehfoot) (Quit: Leaving) |
2022-12-02 16:17:25 +0100 | stevenxl_ | (~stevenxl@45.76.30.6) (Quit: leaving) |
2022-12-02 16:17:38 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) |
2022-12-02 16:17:54 +0100 | acidjnk | (~acidjnk@p200300d6e7137a26551ef8a97b851ff9.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
2022-12-02 16:22:20 +0100 | money_ | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) |
2022-12-02 16:22:51 +0100 | money_ | (~money@pool-100-11-18-203.phlapa.fios.verizon.net) (Client Quit) |
2022-12-02 16:27:14 +0100 | dextaa | (~DV@user/dextaa) |
2022-12-02 16:30:51 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
2022-12-02 16:33:37 +0100 | TonyStone | (~TonyStone@cpe-74-76-57-186.nycap.res.rr.com) (Remote host closed the connection) |
2022-12-02 16:34:59 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-12-02 16:35:17 +0100 | <albet70> | I'm still don't know how to turn a character '\r' inside a String like "a\r\nb" to "a\\r\\nb", fmap can't do that |
2022-12-02 16:35:33 +0100 | <mauke> | no, but concatMap can |
2022-12-02 16:35:48 +0100 | <albet70> | @hoogle concatMap |
2022-12-02 16:35:48 +0100 | <lambdabot> | Prelude concatMap :: Foldable t => (a -> [b]) -> t a -> [b] |
2022-12-02 16:35:48 +0100 | <lambdabot> | Data.List concatMap :: Foldable t => (a -> [b]) -> t a -> [b] |
2022-12-02 16:35:48 +0100 | <lambdabot> | Data.Foldable concatMap :: Foldable t => (a -> [b]) -> t a -> [b] |
2022-12-02 16:36:35 +0100 | <mauke> | > concatMap (\c -> if c == 'a' then "(@)" else [c]) "hallmark" |
2022-12-02 16:36:36 +0100 | <lambdabot> | "h(@)llm(@)rk" |
2022-12-02 16:36:51 +0100 | tromp | (~textual@92-110-219-57.cable.dynamic.v4.ziggo.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2022-12-02 16:38:03 +0100 | <albet70> | > concatMap (\x -> if x == '\r' then "\\r" else [x]) "a\r\nb" |
2022-12-02 16:38:05 +0100 | <lambdabot> | "a\\r\nb" |
2022-12-02 16:39:59 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
2022-12-02 16:51:53 +0100 | vektor | (~vektor@IP-185189141204.dynamic.medianet-world.de) (Quit: Client closed) |
2022-12-02 16:57:00 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 16:57:37 +0100 | Guest75 | (~Guest75@178.141.153.191) (Quit: Client closed) |
2022-12-02 17:01:04 +0100 | tessier | (~treed@98.171.210.130) (Ping timeout: 268 seconds) |
2022-12-02 17:01:48 +0100 | Guest75 | (~Guest75@178.141.153.191) |
2022-12-02 17:03:14 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
2022-12-02 17:07:38 +0100 | tessier | (~treed@98.171.210.130) |
2022-12-02 17:09:35 +0100 | vektor | (~vektor@IP-185189141204.dynamic.medianet-world.de) |
2022-12-02 17:12:53 +0100 | jakalx | (~jakalx@base.jakalx.net) () |
2022-12-02 17:14:12 +0100 | irrgit__ | (~irrgit@89.47.234.74) |
2022-12-02 17:14:30 +0100 | <tomsmeding> | Is there a sensible subset of Haskell (or any other generic FP language) for which it holds that if term1 reduces (with beta/alpha, perhaps also eta) to term2, then term1 and term2 have the same most-general type? |
2022-12-02 17:15:04 +0100 | irrgit_ | (~irrgit@176.113.74.74) (Ping timeout: 260 seconds) |
2022-12-02 17:15:09 +0100 | <tomsmeding> | a priori it is already clear that there _exists_ a type T such that term1 :: T and term2 :: T are valid, but this is not necessary the most-general type of both terms |
2022-12-02 17:15:59 +0100 | <tomsmeding> | e.g. `\x -> if x == x then x else x` has a smaller type than `\x -> x`, so one of these terms would not be in this subset |
2022-12-02 17:16:11 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 17:16:48 +0100 | <tomsmeding> | motivation: flip flip flip flip = flip flip flip, and they happen to have the same types as well, but can I somehow conclude that type equality without having to do tedious unification |
2022-12-02 17:18:22 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2022-12-02 17:20:14 +0100 | dtman34 | (~dtman34@2601:447:d000:93c9:9275:521b:dd0e:68f1) (Ping timeout: 265 seconds) |
2022-12-02 17:21:11 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 264 seconds) |
2022-12-02 17:21:36 +0100 | irrgit__ | (~irrgit@89.47.234.74) (Ping timeout: 252 seconds) |
2022-12-02 17:21:51 +0100 | thegeekinside | (~thegeekin@fixed-187-188-105-74.totalplay.net) |
2022-12-02 17:22:00 +0100 | irrgit__ | (~irrgit@176.113.74.74) |
2022-12-02 17:22:54 +0100 | <vektor> | Anyone want to monad-golf with me? https://paste.tomsmeding.com/hskha3pp |
2022-12-02 17:25:04 +0100 | <tomsmeding> | smells like a continuation monad |
2022-12-02 17:25:38 +0100 | troydm | (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 252 seconds) |
2022-12-02 17:25:45 +0100 | <tomsmeding> | vektor: what's the 'a'? Is that relevant to the point here? |
2022-12-02 17:26:11 +0100 | <vektor> | Nah, sorry. Should've removed that. It's the precision of the underlying computations, if you recall my previous question |
2022-12-02 17:27:42 +0100 | <tomsmeding> | vektor: why does bindLocally take and return a string? |
2022-12-02 17:28:51 +0100 | freeside_ | (~mengwong@185.223.152.46) |
2022-12-02 17:29:03 +0100 | dtman34 | (~dtman34@76.156.89.180) |
2022-12-02 17:30:36 +0100 | jlgw | (~jw@46-162-74-53.cust.bredband2.com) |
2022-12-02 17:31:10 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 260 seconds) |
2022-12-02 17:31:19 +0100 | <vektor> | Ohh, I'm kinda sloppy in my draft there. Basically, I want bindLocally to use the string argument and the Supply to generate a definitely-unique hopefully-useful name for the variable. The argument is the semantics, the Supply the uniqueness. The entire name should be returned, such that the variable can be called back up in the someOtherExpr. |
2022-12-02 17:31:51 +0100 | <tomsmeding> | Supply = State? |
2022-12-02 17:32:17 +0100 | <vektor> | Control.Monad.Supply |
2022-12-02 17:32:19 +0100 | <vektor> | but close enough |
2022-12-02 17:32:54 +0100 | <vektor> | I think supply is pretty much just a State (enum) with some added logic. |
2022-12-02 17:33:06 +0100 | <tomsmeding> | does it have a transformer variant |
2022-12-02 17:33:16 +0100 | segfaultfizzbuzz | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) (Ping timeout: 256 seconds) |
2022-12-02 17:34:22 +0100 | <mauke> | SupplyTeacher |
2022-12-02 17:34:27 +0100 | CiaoSen | (~Jura@p200300c9572f60002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2022-12-02 17:34:29 +0100 | <vektor> | Not that I can see, but basically I think you can homebrew that easily. |
2022-12-02 17:36:32 +0100 | <tomsmeding> | vektor: just jotted a few things down, no idea if it works, but https://paste.tomsmeding.com/RkzEGFFF |
2022-12-02 17:36:54 +0100 | <tomsmeding> | Control.Monad.{State.Strict,Cont} |
2022-12-02 17:36:58 +0100 | freeside | (~mengwong@103.252.202.193) |
2022-12-02 17:37:48 +0100 | <vektor> | Thanks, I'll see if I can get it to work for me. :) |
2022-12-02 17:38:15 +0100 | fockerize | (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2022-12-02 17:38:36 +0100 | freeside_ | (~mengwong@185.223.152.46) (Ping timeout: 265 seconds) |
2022-12-02 17:39:15 +0100 | <tomsmeding> | vektor: you may well be able to swap the transformers, i.e. ContT IRExpr (Supply Int) |
2022-12-02 17:39:27 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-02 17:39:36 +0100 | <tomsmeding> | then use ContT instead of cont, elide the 'lift', and insert some <$> in the body of ContT |
2022-12-02 17:40:08 +0100 | <vektor> | That choice depending on whether I want easier access to Cont or Supply, right? |
2022-12-02 17:40:18 +0100 | <tomsmeding> | there probably is a semantic difference :D |
2022-12-02 17:40:32 +0100 | <tomsmeding> | but not sure whether that difference is relevant if you don't callCC or shift/reset or anything |
2022-12-02 17:41:03 +0100 | <tomsmeding> | @unmtl ContT IRExpr (State Int) |
2022-12-02 17:41:04 +0100 | <lambdabot> | err: `ContT IRExpr (State Int)' is not applied to enough arguments, giving `/\A. (A -> Int -> (IRExpr, Int)) -> Int -> (IRExpr, Int)' |
2022-12-02 17:41:18 +0100 | <tomsmeding> | @unmtl ContT IRExpr (State Int) a |
2022-12-02 17:41:18 +0100 | <lambdabot> | (a -> Int -> (IRExpr, Int)) -> Int -> (IRExpr, Int) |
2022-12-02 17:41:27 +0100 | <tomsmeding> | @unmtl StateT Int (Cont IRExpr) a |
2022-12-02 17:41:27 +0100 | <lambdabot> | Int -> (a -> Int -> IRExpr) -> IRExpr |
2022-12-02 17:41:43 +0100 | <tomsmeding> | I guess the most intuitive is thinking about which of these you want |
2022-12-02 17:41:46 +0100 | freeside | (~mengwong@103.252.202.193) (Ping timeout: 256 seconds) |
2022-12-02 17:41:58 +0100 | freeside | (~mengwong@185.223.152.95) |
2022-12-02 17:42:00 +0100 | <tomsmeding> | as the type of runM |
2022-12-02 17:42:40 +0100 | acidjnk | (~acidjnk@p200300d6e7137a65e1a901d19b642858.dip0.t-ipconnect.de) |
2022-12-02 17:42:54 +0100 | <mauke> | the nice thing about abstractions is that we can remove them to make it easier to understand our code |
2022-12-02 17:44:35 +0100 | tessier | (~treed@98.171.210.130) (Ping timeout: 264 seconds) |
2022-12-02 17:44:38 +0100 | <aeroplane> | I've created a little haskell guard snippet or emacs. http://ix.io/4hvN/elisp |
2022-12-02 17:44:48 +0100 | <aeroplane> | *for |
2022-12-02 17:46:00 +0100 | tessier | (~treed@98.171.210.130) |
2022-12-02 17:46:36 +0100 | <tomsmeding> | vektor: hm not sure it works |
2022-12-02 17:47:52 +0100 | ubert | (~Thunderbi@2a02:8109:abc0:6434:8400:d733:83f7:3040) (Remote host closed the connection) |
2022-12-02 17:49:11 +0100 | nate4 | (~nate@98.45.169.16) |
2022-12-02 17:51:55 +0100 | CiaoSen | (~Jura@p200300c9572f60002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2022-12-02 17:52:43 +0100 | <tomsmeding> | hm, seems to work! |
2022-12-02 17:53:21 +0100 | <tomsmeding> | vektor: https://paste.tomsmeding.com/7oL9fFCu |
2022-12-02 17:53:43 +0100 | <tomsmeding> | oh ignore the commented-out 'literal' |
2022-12-02 17:54:07 +0100 | <vektor> | I think I nerdsniped someone? :D |
2022-12-02 17:54:14 +0100 | nate4 | (~nate@98.45.169.16) (Ping timeout: 256 seconds) |
2022-12-02 17:54:38 +0100 | <tomsmeding> | this is the second time in my life I've successfully used Cont |
2022-12-02 17:55:05 +0100 | <tomsmeding> | first time was https://github.com/tomsmeding/pastebin-haskell/blob/play/snap-server-utils/src/Snap/Server/Utils/E… |
2022-12-02 17:55:29 +0100 | <tomsmeding> | (which should have been a newtype over ContT) |
2022-12-02 17:57:07 +0100 | money | (Guest625@user/polo) () |
2022-12-02 17:57:10 +0100 | <tomsmeding> | mauke: I mean, who ever understands monad transformer stacks intuitively, including differences in semantics due to ordering |
2022-12-02 17:57:12 +0100 | <tomsmeding> | without rote memorisation |
2022-12-02 17:57:38 +0100 | euandreh | (~Thunderbi@179.214.113.107) (Ping timeout: 256 seconds) |
2022-12-02 18:00:07 +0100 | <tomsmeding> | vektor: I nerdsniped yin before with the flip^4 thing, so this was karma |
2022-12-02 18:00:16 +0100 | <vektor> | Heh |
2022-12-02 18:00:29 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 18:02:25 +0100 | <vektor> | So which stack ordering is more useful? My thinking is I only need the state to build local variable names, and then it's not too far from using the Cont to build up an expression piece by piece. Meanwhile, building up an expression piece by piece is not restricted to local variables. |
2022-12-02 18:03:09 +0100 | tomsmeding | is not quite sure what happens if you flip the stack |
2022-12-02 18:03:14 +0100 | <tomsmeding> | pun intended |
2022-12-02 18:05:22 +0100 | <tomsmeding> | ¯\_(ツ)_/¯ |
2022-12-02 18:05:29 +0100 | <tomsmeding> | seems to work just as well with stack flipped |
2022-12-02 18:06:06 +0100 | <tomsmeding> | - runM m = runCont (evalStateT m 0) id |
2022-12-02 18:06:06 +0100 | <tomsmeding> | + runM m = evalState (runContT m return) 0 |
2022-12-02 18:06:11 +0100 | <tomsmeding> | - lift $ cont (\f -> IRLetIn name rhs (f name)) |
2022-12-02 18:06:12 +0100 | <tomsmeding> | + ContT (\f -> IRLetIn name rhs <$> f name) |
2022-12-02 18:06:23 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
2022-12-02 18:06:58 +0100 | <vektor> | Oh, and by messing around with the cont in letin, I can even adapt it for situations where I want to Continue on a different branch of the syntax tree. Neat. |
2022-12-02 18:07:34 +0100 | tessier | (~treed@98.171.210.130) (Ping timeout: 260 seconds) |
2022-12-02 18:07:57 +0100 | <tomsmeding> | vektor: if you start doing anything else than just returning with an updated value in the cont, i.e. if you actually start to use different control flow, you should start watching out for the transformer stack ordering |
2022-12-02 18:08:22 +0100 | <tomsmeding> | I _think_ it has to do with whether the Supply state gets preserved when you "jump back" or something |
2022-12-02 18:08:55 +0100 | <vektor> | F in chat for the guy/gal who just gets pinged whenever anyone puts a space into controlflow O.o |
2022-12-02 18:09:29 +0100 | <tomsmeding> | if you choose a name like that, it's your own fault |
2022-12-02 18:09:43 +0100 | <vektor> | yeah |
2022-12-02 18:10:26 +0100 | <tomsmeding> | there's also an 'n p' (without the space) in the channel, which is a common abbreviation too |
2022-12-02 18:10:45 +0100 | <vektor> | p versus that one person on this channel. |
2022-12-02 18:10:57 +0100 | <tomsmeding> | yes |
2022-12-02 18:11:25 +0100 | <tomsmeding> | I also get pinged whenever someone posts a pastebin link |
2022-12-02 18:11:30 +0100 | thegeekinside | (~thegeekin@fixed-187-188-105-74.totalplay.net) (Remote host closed the connection) |
2022-12-02 18:11:40 +0100 | <geekosaur> | didn't I give you a filter for that? |
2022-12-02 18:11:51 +0100 | <tomsmeding> | you _may_ have |
2022-12-02 18:12:18 +0100 | ubert | (~Thunderbi@p200300ecdf264efbe3b3853aa4aea7d2.dip0.t-ipconnect.de) |
2022-12-02 18:12:38 +0100 | <tomsmeding> | heh back in 2021 there was a 'you' in the channel |
2022-12-02 18:12:59 +0100 | <vektor> | So basically if my Supply starts giving me duplicate names, I know to take a closer look at wtf I'm doing with my monad stack |
2022-12-02 18:13:17 +0100 | <tomsmeding> | yes, but I hope for your sanity you catch it earlier than that |
2022-12-02 18:13:20 +0100 | <vektor> | On this note I'm kinda happy I put the k in the username :D |
2022-12-02 18:13:52 +0100 | <vektor> | TBF, it's kinda simple to put a quickcheck invariant that all LetIns should have their own variable IDs |
2022-12-02 18:14:11 +0100 | tessier | (~treed@98.171.210.130) |
2022-12-02 18:14:23 +0100 | Guest9072 | (~Guest90@2401:4900:1f2d:8dc1:988a:4e1c:aabe:fec3) |
2022-12-02 18:14:31 +0100 | Guest9072 | (~Guest90@2401:4900:1f2d:8dc1:988a:4e1c:aabe:fec3) (Client Quit) |
2022-12-02 18:17:17 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) (Remote host closed the connection) |
2022-12-02 18:20:45 +0100 | sam | (~sam@129.234.0.191) |
2022-12-02 18:20:51 +0100 | sam | dignissimus |
2022-12-02 18:21:25 +0100 | cafkafk | (~cafkafk@fsf/member/cafkafk) (Quit: WeeChat 3.6) |
2022-12-02 18:21:30 +0100 | dignissimus | (~sam@129.234.0.191) (Changing host) |
2022-12-02 18:21:30 +0100 | dignissimus | (~sam@user/dignissimus) |
2022-12-02 18:23:18 +0100 | econo | (uid147250@user/econo) |
2022-12-02 18:26:50 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) |
2022-12-02 18:32:30 +0100 | avicenzi | (~avicenzi@2a00:ca8:a1f:b004::c32) (Remote host closed the connection) |
2022-12-02 18:34:19 +0100 | Alex_test | (~al_test@178.34.163.118) (Ping timeout: 252 seconds) |
2022-12-02 18:34:33 +0100 | AlexNoo_ | (~AlexNoo@178.34.150.202) |
2022-12-02 18:34:37 +0100 | Alex_test | (~al_test@178.34.150.202) |
2022-12-02 18:34:41 +0100 | AlexZenon | (~alzenon@178.34.163.118) (Ping timeout: 252 seconds) |
2022-12-02 18:34:44 +0100 | AlexNoo | (~AlexNoo@178.34.163.118) (Ping timeout: 248 seconds) |
2022-12-02 18:34:47 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 246 seconds) |
2022-12-02 18:35:02 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) (Ping timeout: 256 seconds) |
2022-12-02 18:36:30 +0100 | AlexNoo_ | AlexNoo |
2022-12-02 18:37:05 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) (Ping timeout: 255 seconds) |
2022-12-02 18:38:12 +0100 | ub | (~Thunderbi@p548c9ce5.dip0.t-ipconnect.de) |
2022-12-02 18:38:32 +0100 | AlexZenon | (~alex@178.34.150.202) |
2022-12-02 18:39:15 +0100 | mastarija | (~mastarija@2a05:4f46:e03:6000:ff3e:5e97:30a3:2fd6) |
2022-12-02 18:39:23 +0100 | ubert | (~Thunderbi@p200300ecdf264efbe3b3853aa4aea7d2.dip0.t-ipconnect.de) (Ping timeout: 256 seconds) |
2022-12-02 18:39:23 +0100 | ub | ubert |
2022-12-02 18:40:30 +0100 | stiell | (~stiell@gateway/tor-sasl/stiell) |
2022-12-02 18:40:46 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) |
2022-12-02 18:42:21 +0100 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2022-12-02 18:45:00 +0100 | AlexZenon | (~alex@178.34.150.202) () |
2022-12-02 18:45:11 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 255 seconds) |
2022-12-02 18:45:43 +0100 | Alex_test | (~al_test@178.34.150.202) (Quit: ;-) |
2022-12-02 18:45:44 +0100 | azimut | (~azimut@gateway/tor-sasl/azimut) |
2022-12-02 18:45:47 +0100 | califax | (~califax@user/califx) (Remote host closed the connection) |
2022-12-02 18:46:00 +0100 | AlexNoo | (~AlexNoo@178.34.150.202) (Quit: Leaving) |
2022-12-02 18:46:38 +0100 | califax | (~califax@user/califx) |
2022-12-02 18:47:50 +0100 | eggplantade | (~Eggplanta@2600:1700:38c5:d800:e558:b5d6:f082:6f2c) |
2022-12-02 18:49:28 +0100 | wootehfoot | (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer) |
2022-12-02 18:50:37 +0100 | AlexZenon | (~alzenon@178.34.150.202) |
2022-12-02 18:50:40 +0100 | AlexNoo | (~AlexNoo@178.34.150.202) |
2022-12-02 18:52:06 +0100 | dignissimus | (~sam@user/dignissimus) (Quit: WeeChat 3.7.1) |
2022-12-02 18:52:28 +0100 | Alex_test | (~al_test@178.34.150.202) |
2022-12-02 18:57:45 +0100 | titibandit | (~titibandi@xdsl-78-35-173-119.nc.de) (Remote host closed the connection) |
2022-12-02 18:59:54 +0100 | <__monty__> | Is there a widely used type class for cyclic orderings? A > B > C > A... |
2022-12-02 19:01:00 +0100 | <iqubic> | I'm not sure there is. |
2022-12-02 19:09:38 +0100 | paulpaul1076 | (~textual@95-29-5-111.broadband.corbina.ru) |
2022-12-02 19:15:14 +0100 | aeroplane | (~user@user/aeroplane) (Ping timeout: 255 seconds) |
2022-12-02 19:16:34 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.or.comcast.net) |
2022-12-02 19:20:02 +0100 | causal | (~user@50.35.83.177) (Quit: WeeChat 3.7.1) |
2022-12-02 19:23:52 +0100 | <dsal> | That's pretty weird, because normally one would expect that if A > B and B > C then A > C. If you had four items, such that C > D then what would the relationship between A and C be? |
2022-12-02 19:25:39 +0100 | segfaultfizzbuzz | (~segfaultf@23-93-74-212.fiber.dynamic.sonic.net) |
2022-12-02 19:26:40 +0100 | <segfaultfizzbuzz> | i've used ghcup to install stack, but when i try to run stack in my terminal, my ubuntu linux operating system can't find it,... i installed stack several reboots ago so this isn't a freshen up your paths thing i would expect,... what am i doing wrong? |
2022-12-02 19:27:56 +0100 | <segfaultfizzbuzz> | ghcup whereis stack reports ~/.ghcup/bin/stack-2.9.1 |
2022-12-02 19:28:56 +0100 | <geekosaur> | sounds like you forgot to 'set' it? |
2022-12-02 19:29:09 +0100 | euandreh | (~Thunderbi@179.214.113.107) |
2022-12-02 19:30:25 +0100 | <geekosaur> | if you `ghcup tui`, how many checkmarks are next to `stack-2.9.1`? |
2022-12-02 19:30:49 +0100 | <geekosaur> | (1 means installed, 2 means set as current version) |
2022-12-02 19:30:54 +0100 | <iqubic> | dsal: We're modeling a game of Rock Paper Scissors. |
2022-12-02 19:31:19 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 19:31:38 +0100 | dnlsur | (~textual@r186-49-240-19.dialup.adsl.anteldata.net.uy) |
2022-12-02 19:32:29 +0100 | dnlsur | (~textual@r186-49-240-19.dialup.adsl.anteldata.net.uy) (Client Quit) |
2022-12-02 19:32:49 +0100 | <dsal> | iqubic: Sure, I understand. But the question is whether there's a generalized way to do that, and I don't think it makes sense. It means you have to have a thing that's less than something that's greater than something than greater than it. |
2022-12-02 19:33:36 +0100 | <dminuoso> | tomsmeding: All these "solutions" are the reason why I want attaching data to fields in the first place/ |
2022-12-02 19:33:39 +0100 | <geekosaur> | segfaultfizzbuzz, alternately you can just run `ghcup set stack 2.9.1` and then `hash -r` |
2022-12-02 19:34:15 +0100 | <geekosaur> | just installing something does not set it as current, since you may want to have multiple versions installed |
2022-12-02 19:34:31 +0100 | <dminuoso> | Yes you can sort of force them into Haskell system one way or another (be it HKDs or via Tagged), but it causes a lot of artifacts and annoyance. |
2022-12-02 19:34:55 +0100 | <dminuoso> | But I dont want type level sort-of reflection. Im fine with TH reflection. |
2022-12-02 19:35:14 +0100 | <dsal> | You can rotate the enum, zip it to itself and get pairwise comparisons, but the "cyclical orderings" thing gets hard to reason about if you have more than or less than three items. At which point hardcoding the rules is the easiest approach. |
2022-12-02 19:35:30 +0100 | <dminuoso> | After a bunch of Haskell years, I have settled on considering TH to be drastically superior to type level metaprogramming. |
2022-12-02 19:36:25 +0100 | <dminuoso> | The code is easy to write, read and maintain, you can conjure up simple and effective diagnostics, you get good compile-time performance. Type level tricks avoid *all* of these. |
2022-12-02 19:41:07 +0100 | zant | (~zant@62.96.232.178) (Ping timeout: 260 seconds) |
2022-12-02 19:42:29 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-12-02 19:47:29 +0100 | <tomsmeding> | dminuoso: > easy to write, read and maintain |
2022-12-02 19:47:31 +0100 | <tomsmeding> | X doubt |
2022-12-02 19:47:56 +0100 | <tomsmeding> | though the flexibility is indeed nice; I don't know anything about TH performance so can't say anything about that (never benchmarked it) |
2022-12-02 19:48:09 +0100 | <tomsmeding> | but I agree that all the "solutions" I mentioned are kludges |
2022-12-02 19:48:10 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-02 19:48:49 +0100 | <tomsmeding> | what would you like as a design for this though, new syntax for attaching info to fields, and exposing that info via a TH api so that some TH deriving (as opposed to generic deriving) code can make use of that? |
2022-12-02 19:50:50 +0100 | <tomsmeding> | though I guess, re easy W/R/maintain, that a lot is better than ghc generics |
2022-12-02 20:01:30 +0100 | <lyxia> | __monty__: you can model rock paper scissors using the cyclic group Z/3Z, and as far as operations are concerned they are simply mempty and (<>) |
2022-12-02 20:01:59 +0100 | mastarija | (~mastarija@2a05:4f46:e03:6000:ff3e:5e97:30a3:2fd6) (Ping timeout: 264 seconds) |
2022-12-02 20:02:08 +0100 | <lyxia> | and an inverse function |
2022-12-02 20:05:42 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
2022-12-02 20:05:43 +0100 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2022-12-02 20:06:06 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2022-12-02 20:11:11 +0100 | vektor | (~vektor@IP-185189141204.dynamic.medianet-world.de) (Quit: Client closed) |
2022-12-02 20:16:42 +0100 | anpad | (~pandeyan@user/anpad) |
2022-12-02 20:19:00 +0100 | <Boarders___> | is there a way with cabal to build a haddock showing the documentation for all packages you depend on? |
2022-12-02 20:19:12 +0100 | <Boarders___> | is there a tool to do this? |
2022-12-02 20:22:33 +0100 | <monochrom> | I turn on "documentation: True" in my $HOME/.cabal/config. Then cabal already does that. |
2022-12-02 20:22:37 +0100 | euandreh | (~Thunderbi@179.214.113.107) (Quit: euandreh) |
2022-12-02 20:24:07 +0100 | <Boarders___> | by cabal already does that, what do you mean? Where does it generate the documentation? |
2022-12-02 20:24:14 +0100 | <monochrom> | cabal build |
2022-12-02 20:24:23 +0100 | <Boarders___> | where is it located |
2022-12-02 20:24:45 +0100 | <monochrom> | I don't bother to remember. But cabal build's output has it for some reason. I just use that. |
2022-12-02 20:25:05 +0100 | <Boarders___> | ok, I'll try that - thanks |
2022-12-02 20:25:30 +0100 | <monochrom> | Well, the output has the path of the doc of the package in the current directory. Then I follow links. |
2022-12-02 20:26:16 +0100 | <monochrom> | OK, if you really just want docs of the dependencies, try my shell script: https://github.com/treblacy/hasdoc |
2022-12-02 20:28:43 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 260 seconds) |
2022-12-02 20:30:34 +0100 | <Boarders___> | Tried out this hasdoc tool, seems like it doesn't work at all |
2022-12-02 20:31:06 +0100 | <monochrom> | I turn on "documentation: True" in my $HOME/.cabal/config. |
2022-12-02 20:31:59 +0100 | <monochrom> | Then maybe you have to force rebuild a lot of packages. |
2022-12-02 20:32:33 +0100 | <monochrom> | Although, why am I answering? There was no question. |
2022-12-02 20:33:46 +0100 | <Boarders___> | I rebuilt the documentation and can find it in the store, thanks |
2022-12-02 20:34:06 +0100 | <Boarders___> | I would prefer if I could do like with old cabal where you could build a local haddock index of all deps, I don't know if that is possible |
2022-12-02 20:34:42 +0100 | <monochrom> | New cabal doesn't have that. |
2022-12-02 20:34:51 +0100 | <monochrom> | You could go back to old cabal. |
2022-12-02 20:35:57 +0100 | <Boarders___> | thanks for the suggestion, but I have no interest in using old cabal |
2022-12-02 20:36:09 +0100 | <Boarders___> | I was just wondering if anyone knew any tools that did this sort of thing or new-cabal commands |
2022-12-02 20:36:33 +0100 | <monochrom> | I bet no. |
2022-12-02 20:36:40 +0100 | adium | (adium@user/adium) (Quit: Stable ZNC by #bnc4you) |
2022-12-02 20:37:06 +0100 | <monochrom> | You know what, I am lazy, I wouldn't write hasdoc if not for new cabal heh. |
2022-12-02 20:41:01 +0100 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2022-12-02 20:43:06 +0100 | Xeroine | (~Xeroine@user/xeroine) (Read error: Connection reset by peer) |
2022-12-02 20:43:45 +0100 | Xeroine | (~Xeroine@user/xeroine) |
2022-12-02 20:44:55 +0100 | jmdaemon | (~jmdaemon@user/jmdaemon) |
2022-12-02 20:45:20 +0100 | adium | (adium@user/adium) |
2022-12-02 20:45:47 +0100 | acidjnk | (~acidjnk@p200300d6e7137a65e1a901d19b642858.dip0.t-ipconnect.de) (Ping timeout: 248 seconds) |
2022-12-02 20:46:51 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2022-12-02 20:46:56 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
2022-12-02 20:48:22 +0100 | kurbus | (~kurbus@user/kurbus) |
2022-12-02 20:51:25 +0100 | troydm | (~troydm@host-176-37-124-197.b025.la.net.ua) |
2022-12-02 20:54:16 +0100 | werneta | (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
2022-12-02 20:54:57 +0100 | acidjnk | (~acidjnk@p200300d6e7137a65e1a901d19b642858.dip0.t-ipconnect.de) |
2022-12-02 20:57:08 +0100 | tired | (~tired@user/tired) (Quit: /) |
2022-12-02 20:57:23 +0100 | adium | (adium@user/adium) (Quit: Stable ZNC by #bnc4you) |
2022-12-02 20:58:08 +0100 | money | (money@id-532813.tinside.irccloud.com) |
2022-12-02 20:58:33 +0100 | tired | (~tired@user/tired) |
2022-12-02 21:00:59 +0100 | <__monty__> | lyxia: Yes but what type class does it fit in? You seem to be suggesting Monoid? |
2022-12-02 21:02:06 +0100 | <tomsmeding> | perhaps the monoid can be "maximum"? |
2022-12-02 21:02:09 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 21:02:13 +0100 | <tomsmeding> | as in, "the winner of these two" |
2022-12-02 21:02:32 +0100 | <tomsmeding> | surely that's associative, though 'mempty' is undefied |
2022-12-02 21:02:33 +0100 | <monochrom> | But it's rock-paper-scissor so not even a partial order. |
2022-12-02 21:02:34 +0100 | <tomsmeding> | so, Semigroup |
2022-12-02 21:02:45 +0100 | <kurbus> | oh is this advent of code talk? |
2022-12-02 21:02:49 +0100 | tomsmeding | has no clue |
2022-12-02 21:02:52 +0100 | <monochrom> | And group doesn't have a notion of successor. |
2022-12-02 21:03:17 +0100 | <monochrom> | OK cyclic group has a notion of successor but now it's two steps away from monoid. |
2022-12-02 21:03:20 +0100 | <tomsmeding> | okay scratch my use of the word "maximum" |
2022-12-02 21:03:39 +0100 | <tomsmeding> | oh scratch all what I say makes no sense |
2022-12-02 21:03:53 +0100 | <tomsmeding> | is not a semigroup, not associative |
2022-12-02 21:03:55 +0100 | <monochrom> | How many rock-paper-scissor types do you have anyway? I doubt you need a type class. |
2022-12-02 21:04:07 +0100 | money | (money@id-532813.tinside.irccloud.com) (Changing host) |
2022-12-02 21:04:07 +0100 | money | (money@user/polo) |
2022-12-02 21:04:07 +0100 | money | polo |
2022-12-02 21:04:40 +0100 | adium | (adium@user/adium) |
2022-12-02 21:05:04 +0100 | <monochrom> | Bah, I run into the irony that to define a pattern synonym I want, I need view patterns. -_- |
2022-12-02 21:06:13 +0100 | kurbus | (~kurbus@user/kurbus) (Quit: Client closed) |
2022-12-02 21:06:54 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 256 seconds) |
2022-12-02 21:07:25 +0100 | santa_kurbus | (~santa_kur@168.9.25.41) |
2022-12-02 21:07:55 +0100 | <tomsmeding> | monochrom: why is that irony? |
2022-12-02 21:08:08 +0100 | <tomsmeding> | almost all nontrivial pattern synonyms need view patterns |
2022-12-02 21:08:25 +0100 | santa_kurbus | (~santa_kur@168.9.25.41) (Client Quit) |
2022-12-02 21:08:25 +0100 | <monochrom> | Oh! haha OK I feel better. |
2022-12-02 21:08:35 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:ea96:a847:5069:64f8) |
2022-12-02 21:08:43 +0100 | <monochrom> | "This is state-of-art best practice." "This is fine." |
2022-12-02 21:08:44 +0100 | <EvanR> | the rps question involves a group right |
2022-12-02 21:08:50 +0100 | kurbus | (~kurbus@user/kurbus) |
2022-12-02 21:08:54 +0100 | <tomsmeding> | they end up looking strange, pattern Something a b c <- (f something -> (a,b,c)) |
2022-12-02 21:08:57 +0100 | kurbus | holly_jolly_kurb |
2022-12-02 21:09:19 +0100 | holly_jolly_kurb | kurbus |
2022-12-02 21:09:34 +0100 | <tomsmeding> | and then you have these https://github.com/AccelerateHS/accelerate/blob/master/src/Data/Array/Accelerate/AST/Idx.hs#L79 |
2022-12-02 21:10:02 +0100 | <tomsmeding> | EvanR: which one |
2022-12-02 21:10:28 +0100 | <monochrom> | I don't mind the syntax. I mind being analogous to "I wrote an Agda compiler that works by desugaring Agda to PHP" >:) |
2022-12-02 21:10:29 +0100 | nihonium | (~nihonium@109-252-9-82.nat.spd-mgts.ru) |
2022-12-02 21:10:41 +0100 | <tomsmeding> | lol it's not quite that bad, is it |
2022-12-02 21:11:03 +0100 | <monochrom> | heh I'm exaggerating, but it's Friday so "this is fine". |
2022-12-02 21:11:07 +0100 | <tomsmeding> | re syntax, look at the link; two -> in a row |
2022-12-02 21:11:28 +0100 | <tomsmeding> | that may or may not need some () to disambiguate for human readers |
2022-12-02 21:11:45 +0100 | <monochrom> | Yeah that one could use a pair of parentheses around the lambda. |
2022-12-02 21:12:05 +0100 | kurbus | festive_kurbus |
2022-12-02 21:13:09 +0100 | <EvanR> | tomsmeding, er nvm. Just that it requires you reverse the win lose computation |
2022-12-02 21:13:23 +0100 | <EvanR> | which isn't a group anymore because you leave the type |
2022-12-02 21:14:39 +0100 | kenran | (~user@user/kenran) |
2022-12-02 21:14:54 +0100 | <EvanR> | your arrows look weird but it could be worse, arrows used prefix or postfix |
2022-12-02 21:15:24 +0100 | <tomsmeding> | not sure you can use these anything but infix, they're the lambda -> arrow and the view-pattern -> arrow :p |
2022-12-02 21:15:45 +0100 | <EvanR> | amen |
2022-12-02 21:15:46 +0100 | kenran | (~user@user/kenran) (Remote host closed the connection) |
2022-12-02 21:17:30 +0100 | <EvanR> | actual ruby syntax |
2022-12-02 21:17:32 +0100 | <EvanR> | succ = ->(x) {x + 1} |
2022-12-02 21:28:08 +0100 | <tomsmeding> | EvanR: that's not standard ruby syntax, right? I hope? |
2022-12-02 21:29:42 +0100 | <c_wraith> | it is |
2022-12-02 21:30:39 +0100 | <c_wraith> | ruby faceplanted on syntax in several ways. That's actually a bandaid they added later to cover up some of the damage |
2022-12-02 21:34:39 +0100 | <monochrom> | Oh! "I wrote an Agda compiler, it works by desugaring to Ruby!" >:) |
2022-12-02 21:37:42 +0100 | festive_kurbus | (~kurbus@user/kurbus) (Quit: Client closed) |
2022-12-02 21:38:44 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:ea96:a847:5069:64f8) (Quit: WeeChat 2.8) |
2022-12-02 21:40:06 +0100 | barrucadu | (~barrucadu@carcosa.barrucadu.co.uk) (Quit: brb) |
2022-12-02 21:42:16 +0100 | ARJ0019 | (~arj0019@162.218.254.7) |
2022-12-02 21:42:28 +0100 | sajith_ | sajith |
2022-12-02 21:42:59 +0100 | tessier | (~treed@98.171.210.130) (Ping timeout: 256 seconds) |
2022-12-02 21:43:17 +0100 | barrucadu | (~barrucadu@carcosa.barrucadu.co.uk) |
2022-12-02 21:43:33 +0100 | <mauke> | wasn't there some kinf of {|params| ...} thing? |
2022-12-02 21:43:39 +0100 | <mauke> | *kind |
2022-12-02 21:44:09 +0100 | <c_wraith> | yes, that's a block. which is different from a function (Proc) object, because... bad choices |
2022-12-02 21:44:53 +0100 | <monochrom> | https://www.smbc-comics.com/comic/dualism applies. >:) |
2022-12-02 21:44:54 +0100 | mniip | (mniip@libera/staff/mniip) |
2022-12-02 21:45:22 +0100 | pavonia | (~user@user/siracusa) |
2022-12-02 21:45:26 +0100 | jargon | (~jargon@174-22-207-8.phnx.qwest.net) |
2022-12-02 21:46:41 +0100 | <darkling> | Bonus points for the use of "ontological". |
2022-12-02 21:47:11 +0100 | kurbus | (~kurbus@user/kurbus) |
2022-12-02 21:47:51 +0100 | kurbus | festive_kurbus |
2022-12-02 21:49:29 +0100 | tessier | (~treed@98.171.210.130) |
2022-12-02 21:50:40 +0100 | nate4 | (~nate@98.45.169.16) |
2022-12-02 21:50:59 +0100 | accord | (uid568320@id-568320.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2022-12-02 21:52:26 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2022-12-02 21:52:26 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2022-12-02 21:52:26 +0100 | wroathe | (~wroathe@user/wroathe) |
2022-12-02 21:52:37 +0100 | bravespear|2 | Ranhir |
2022-12-02 21:53:58 +0100 | Ranhir | (~Ranhir@157.97.53.139) (Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/) |
2022-12-02 21:54:17 +0100 | Ranhir | (~Ranhir@157.97.53.139) |
2022-12-02 21:55:38 +0100 | nate4 | (~nate@98.45.169.16) (Ping timeout: 256 seconds) |
2022-12-02 21:58:55 +0100 | mncheck | (~mncheck@193.224.205.254) (Ping timeout: 268 seconds) |
2022-12-02 22:00:10 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
2022-12-02 22:01:35 +0100 | festive_kurbus | (~kurbus@user/kurbus) (Quit: Client closed) |
2022-12-02 22:02:20 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 22:04:42 +0100 | Sgeo | (~Sgeo@user/sgeo) |
2022-12-02 22:08:04 +0100 | gmg | (~user@user/gehmehgeh) |
2022-12-02 22:12:27 +0100 | ec_ | ec |
2022-12-02 22:15:47 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) (Ping timeout: 264 seconds) |
2022-12-02 22:19:13 +0100 | polo | (money@user/polo) () |
2022-12-02 22:20:31 +0100 | polo | (polo@id-532813.tinside.irccloud.com) |
2022-12-02 22:20:54 +0100 | polo | (polo@id-532813.tinside.irccloud.com) (Changing host) |
2022-12-02 22:20:54 +0100 | polo | (polo@user/polo) |
2022-12-02 22:20:58 +0100 | polo | money |
2022-12-02 22:21:33 +0100 | money | (polo@user/polo) (Client Quit) |
2022-12-02 22:22:05 +0100 | money | (money@user/polo) |
2022-12-02 22:22:58 +0100 | VictorHugenay | (~jh@user/VictorHugenay) |
2022-12-02 22:23:30 +0100 | TheCoffeMaker | (~TheCoffeM@user/thecoffemaker) |
2022-12-02 22:25:29 +0100 | VictorHugenay | (~jh@user/VictorHugenay) (Quit: Konversation terminated!) |
2022-12-02 22:28:11 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection) |
2022-12-02 22:31:09 +0100 | jao | (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) |
2022-12-02 22:35:07 +0100 | titibandit | (~titibandi@xdsl-78-35-173-119.nc.de) |
2022-12-02 22:36:40 +0100 | spoiledfieldbuck | (~fieldbuck@mobile-access-5672d5-198.dhcp.inet.fi) |
2022-12-02 22:36:48 +0100 | <spoiledfieldbuck> | i am so angry |
2022-12-02 22:37:09 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 268 seconds) |
2022-12-02 22:37:45 +0100 | <spoiledfieldbuck> | because functional programming elitist keep saying that every newbie should learn fp and 7 years ago they said that fp is only thing that will be done after 7 yars |
2022-12-02 22:38:05 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
2022-12-02 22:38:06 +0100 | <dsal> | It's pretty much the only thing I do, so maybe they're onto something. |
2022-12-02 22:38:10 +0100 | Erutuon | (~Erutuon@user/erutuon) |
2022-12-02 22:39:12 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Client Quit) |
2022-12-02 22:39:31 +0100 | <spoiledfieldbuck> | 'but most of the fp community has been out of their mind! i can see that uh there have been a lot of fp practices adopted into traditional programming but still |
2022-12-02 22:39:38 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) |
2022-12-02 22:41:42 +0100 | <geekosaur> | that's more or less how it happens |
2022-12-02 22:42:04 +0100 | <geekosaur> | you get research languages that develop it and then it makes its way into mainstream languages |
2022-12-02 22:42:39 +0100 | <geekosaur> | nobody uses ALGOL any more but it has impacted every modern programming language |
2022-12-02 22:43:34 +0100 | <spoiledfieldbuck> | i am so so angry |
2022-12-02 22:44:01 +0100 | oldsk00l | (~znc@ec2-54-93-55-15.eu-central-1.compute.amazonaws.com) |
2022-12-02 22:44:22 +0100 | <dsal> | Why be angry? |
2022-12-02 22:45:21 +0100 | <ARJ0019> | "because functional programming elitist keep saying that every newbie should learn fp and 7 years ago they said that fp is only thing that will be done after 7 yars" |
2022-12-02 22:45:53 +0100 | <mauke> | traditional programming is functional programming |
2022-12-02 22:45:56 +0100 | <dsal> | People say all kinds of dumb things and do all kinds of dumb things. |
2022-12-02 22:46:00 +0100 | <mauke> | lambda calculus is older than assembler code |
2022-12-02 22:47:00 +0100 | <ARJ0019> | I get frustrated with "multi-paradigm" languages that claim to support FP and then just give a half assed lambda |
2022-12-02 22:47:22 +0100 | <mauke> | a "lam", if you will |
2022-12-02 22:48:02 +0100 | spoiledfieldbuck | (~fieldbuck@mobile-access-5672d5-198.dhcp.inet.fi) (K-Lined) |
2022-12-02 22:49:26 +0100 | <geekosaur> | huh. must have been trolling other channels too |
2022-12-02 22:49:35 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Remote host closed the connection) |
2022-12-02 22:49:45 +0100 | <geekosaur> | also, are you saying they're on the lam? 🙂 |
2022-12-02 22:50:07 +0100 | ec | (~ec@gateway/tor-sasl/ec) |
2022-12-02 22:50:27 +0100 | <ARJ0019> | Does anyone have experience with modeling equation domains effectively? Like for `a=b+c`, what is the correct way to model 'b=a-c' and 'c=a-b'. I am particularly concerned with managing conceptual complexity, ease of use. This is relevant to when I model mechanical engineering domains in software for analysis and design. |
2022-12-02 22:51:24 +0100 | <dsal> | I've done the simple thing when solving one of those "number" problems. |
2022-12-02 22:51:43 +0100 | <dsal> | I assume you're asking for something more complex than the parser examples have. |
2022-12-02 22:52:11 +0100 | <jean-paul[m]> | ARJ0019: If someone does have experience, what would you ask them? |
2022-12-02 22:52:19 +0100 | <darkling> | I've done trivial versions. Basically, build an AST of the equation and build functions to manipulate it. |
2022-12-02 22:53:18 +0100 | <darkling> | Implement operations like distributivity (both ways), associativity (both ways). |
2022-12-02 22:53:48 +0100 | <darkling> | The easy tricky bit in the general case is working out how to solve for a particular variable by simple rearrangements. |
2022-12-02 22:54:17 +0100 | <darkling> | The really hard tricky bit in the general case is solving for a particular variable in as many cases as possible. :) |
2022-12-02 22:54:38 +0100 | <darkling> | So it depends on what you're trying to achieve, really. |
2022-12-02 22:56:14 +0100 | <darkling> | There are symbolic computation tools out there which you could use for the heavy lifting end of things, but I suspect in many cases you can make it simpler than that. |
2022-12-02 22:56:22 +0100 | <ARJ0019> | My end goal is to have a library of engineering domains. Each domain has a set of equations that conceptually form relations between parameters. I do not have a good general approach for modeling the domains in an effective and clear way. |
2022-12-02 22:56:40 +0100 | <ARJ0019> | I have tried symbolic solvers before and it worked well, but it is slow. |
2022-12-02 22:57:28 +0100 | <ARJ0019> | @jean-paul I guess my question would just be how they achieved it |
2022-12-02 22:57:28 +0100 | <lambdabot> | Unknown command, try @list |
2022-12-02 22:58:34 +0100 | <darkling> | At that level of generality, my guess is that you're looking at either the symbolic solvers or a metric shedload of domain-specific results. |
2022-12-02 22:59:01 +0100 | <monochrom> | I would start with Mathematica and its C bindings. |
2022-12-02 22:59:29 +0100 | <darkling> | What's the open-source one? Octave? |
2022-12-02 22:59:34 +0100 | <monochrom> | Engineers already use Mathematica. |
2022-12-02 23:00:13 +0100 | <geekosaur> | octave is open source matlab, iirc. don't think there's a good open source alternative to mathematica yet |
2022-12-02 23:00:25 +0100 | <ARJ0019> | This is one of my attempts in Python: https://paste.tomsmeding.com/8E6OBcr5 . The downside is the equations only work one way. |
2022-12-02 23:00:42 +0100 | <darkling> | Aah, I thought Octave did more symbolic stuff than that. Not really my area. |
2022-12-02 23:00:57 +0100 | <geekosaur> | maybe it does these days |
2022-12-02 23:01:01 +0100 | <monochrom> | There is an old IBM one that's free since a decade ago or something. I forgot whether it's open-source. |
2022-12-02 23:02:57 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) (Remote host closed the connection) |
2022-12-02 23:03:45 +0100 | <ARJ0019> | One method that I am currently considering is using sets of constructors for each type; each constructor being a different equation that will provide the desired value. That could be converted to FP somewhat easily |
2022-12-02 23:05:53 +0100 | Guest75 | (~Guest75@178.141.153.191) (Ping timeout: 260 seconds) |
2022-12-02 23:10:56 +0100 | ChaiTRex | (~ChaiTRex@user/chaitrex) |
2022-12-02 23:14:40 +0100 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) |
2022-12-02 23:15:17 +0100 | ARJ0019 | (~arj0019@162.218.254.7) (Quit: Leaving) |
2022-12-02 23:16:05 +0100 | seydar | (~seydar@154-27-113-252.starry-inc.net) |
2022-12-02 23:20:46 +0100 | <loonycyborg> | For symbolic stuff there's sympy |
2022-12-02 23:22:32 +0100 | <seydar> | How do I get cabal to build an executable for me in a normal location? Here's my source and cabal file: https://paste.tomsmeding.com/E3LyGn0E |
2022-12-02 23:24:11 +0100 | waleee | (~waleee@2001:9b0:213:7200:cc36:a556:b1e8:b340) (Ping timeout: 264 seconds) |
2022-12-02 23:24:23 +0100 | <monochrom> | cabal install --install-method=copy --installdir=<normal location> --overwrite-policy=always |
2022-12-02 23:24:33 +0100 | <monochrom> | For more information, cabal install --help |
2022-12-02 23:24:56 +0100 | <monochrom> | Some (all?) of those 3 parameters can also be set in $HOME/.cabal/config |
2022-12-02 23:25:00 +0100 | <monochrom> | (I think I did.) |
2022-12-02 23:26:35 +0100 | <monochrom> | There is another choice. cabal list-bin exe:<exe section name> can tell you the "not normal" path. |
2022-12-02 23:26:39 +0100 | fockerize | (~finn@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Ping timeout: 260 seconds) |
2022-12-02 23:26:53 +0100 | <monochrom> | or rather the ephemeral in-place path. |
2022-12-02 23:28:34 +0100 | nihonium | (~nihonium@109-252-9-82.nat.spd-mgts.ru) (Ping timeout: 256 seconds) |
2022-12-02 23:28:44 +0100 | zant | (~zant@62.214.20.26) |
2022-12-02 23:29:18 +0100 | <seydar> | i could've sworn cabal build was building an executable for me right in the directory |
2022-12-02 23:29:23 +0100 | <seydar> | but mayhaps i was an idiot |
2022-12-02 23:30:08 +0100 | <geekosaur> | nope, all build artifacts are in dist-newstyle |
2022-12-02 23:32:17 +0100 | <sm> | it was a dream |
2022-12-02 23:33:16 +0100 | <sm> | or a parallel universe, where subdirectories were never a thing |
2022-12-02 23:33:24 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) |
2022-12-02 23:33:35 +0100 | <geekosaur> | personally I switched to the XDG mode in cabal HEAD (which will be 3.10 in a few months); it installs to ~/.local/bin which is a "normal location" per XDG |
2022-12-02 23:33:51 +0100 | <sm> | oh.. nice |
2022-12-02 23:33:57 +0100 | <geekosaur> | you could also specify that in your cabal config |
2022-12-02 23:34:02 +0100 | <sm> | stack and cabal will overwrite each other's binaries but that's fine |
2022-12-02 23:34:19 +0100 | <geekosaur> | hopefully you're not making that mess |
2022-12-02 23:34:25 +0100 | <sm> | maybe cargo etc. should do the same |
2022-12-02 23:34:51 +0100 | <sm> | sick of fiddling with those extra language-specific bin dirs in PATH |
2022-12-02 23:35:09 +0100 | <geekosaur> | (also cabal will by default refuse to overwrite; see monochrom's options to disable that) |
2022-12-02 23:35:25 +0100 | <sm> | ack |
2022-12-02 23:35:28 +0100 | <seydar> | can I get cabal to *only* install the executable? I don't care about a license file |
2022-12-02 23:35:32 +0100 | <sm> | what happened with good old unix silent destruction |
2022-12-02 23:35:37 +0100 | <seydar> | maybe this is my fault for mentioning it in the cabal file |
2022-12-02 23:35:58 +0100 | tomokojun | (~tomokojun@37.19.221.160) |
2022-12-02 23:35:59 +0100 | <geekosaur> | went away with rm --no-preserve-root 🙂 |
2022-12-02 23:36:26 +0100 | sm | learns an exciting new flag |
2022-12-02 23:36:38 +0100 | oldsk00l | (~znc@ec2-54-93-55-15.eu-central-1.compute.amazonaws.com) (Remote host closed the connection) |
2022-12-02 23:36:45 +0100 | <monochrom> | cabal already installs only the executable. |
2022-12-02 23:37:00 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2022-12-02 23:38:19 +0100 | merijn | (~merijn@c-001-001-017.client.esciencecenter.eduvpn.nl) (Ping timeout: 260 seconds) |
2022-12-02 23:38:49 +0100 | coot | (~coot@2a02:a310:e241:1b00:ec1a:e9df:79ac:66ba) (Quit: coot) |
2022-12-02 23:38:54 +0100 | <davean> | Yah, preserving root with rm was a really annoying design inconsistency making one directory special. |
2022-12-02 23:39:00 +0100 | ski__ | (~slj@ext-1-443.eduroam.chalmers.se) |
2022-12-02 23:39:16 +0100 | ski__ | (~slj@ext-1-443.eduroam.chalmers.se) () |
2022-12-02 23:39:41 +0100 | ski__ | (~slj@ext-1-443.eduroam.chalmers.se) |
2022-12-02 23:40:02 +0100 | money | (money@user/polo) () |
2022-12-02 23:41:34 +0100 | <monochrom> | root is already special in the first place: Even with no-preserve-root, you can have at most one root. |
2022-12-02 23:41:50 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2022-12-02 23:42:08 +0100 | <monochrom> | To really make it non-special, you need to allow multiple roots. This is also known as DOS. >:) |
2022-12-02 23:42:20 +0100 | <davean> | monochrom: not true, chroot makes lots of roots |
2022-12-02 23:42:36 +0100 | <davean> | Its only locally unique |
2022-12-02 23:43:50 +0100 | <davean> | Which is a good portion of why you need --no-preserve-root |
2022-12-02 23:44:12 +0100 | geekosaur | wonders if anyone remembers AFS. or WorkNet |
2022-12-02 23:44:17 +0100 | fieldbuck_ | (~fieldbuck@mobile-access-d51ce0-248.dhcp.inet.fi) |
2022-12-02 23:44:22 +0100 | <davean> | geekosaur: AndrewFS? |
2022-12-02 23:44:24 +0100 | <seydar> | monochrom: you're not gonna believe it -- i refused to believe the one-liner you gave me so i came up with my own, and i came up with EXACTLY what you said |
2022-12-02 23:44:27 +0100 | <geekosaur> | yep |
2022-12-02 23:44:28 +0100 | <davean> | geekosaur: Its still pretty commonly in use? |
2022-12-02 23:44:40 +0100 | <davean> | I assume people who use it every day remember it |
2022-12-02 23:44:43 +0100 | <geekosaur> | less so than it used to be but see https://openafs.org |
2022-12-02 23:45:07 +0100 | jle`` | (~jusle@user/jle/x-3894663) |
2022-12-02 23:45:25 +0100 | <geekosaur> | Altos WorkNet was a somewhat-similar-but-LAN thing. paths were @machine/... |
2022-12-02 23:45:32 +0100 | <geekosaur> | predated NFS |
2022-12-02 23:46:14 +0100 | <fieldbuck_> | so uh tell me how much $ does a decent software developer make in an year in us? i mean a software developer that is not google or anything similar but maybe a college graduate that a mediocre firm has hired? |
2022-12-02 23:46:15 +0100 | <monochrom> | Actually it is better to understand cabal install --help and use it to come up with your own, than to just look for recipes from randon strangers on the Internet without understanding. |
2022-12-02 23:46:18 +0100 | geekosaur | remembers emacs really not liking that, required some C hacking to stop it from prepending pwd (which started with @) to every WorkNet path |
2022-12-02 23:47:00 +0100 | <davean> | fieldbuck_: Thats not a useful question because things liek cost of living scale more than 2x across the US |
2022-12-02 23:47:14 +0100 | <geekosaur> | actually, not emacs. jove |
2022-12-02 23:47:49 +0100 | <geekosaur> | emacs wouldn't build much less run on machines that size |
2022-12-02 23:47:49 +0100 | <davean> | fieldbuck_: So you can get answers from 80k to 200k and have them really be the same answer. |
2022-12-02 23:49:50 +0100 | <sclv> | ah arj quit some time ago. for equations i was going to suggest the obvious normal form being always making the lhs zero |
2022-12-02 23:49:52 +0100 | <fieldbuck_> | hmm |
2022-12-02 23:50:43 +0100 | __monty__ | (~toonn@user/toonn) (Quit: leaving) |
2022-12-02 23:50:59 +0100 | <fieldbuck_> | 6.6k$ that would be very very senior's salary in my country |
2022-12-02 23:51:11 +0100 | money | (money@user/polo) |
2022-12-02 23:51:20 +0100 | <fieldbuck_> | maybe more if you were really doing profit and a consultant and so on! |
2022-12-02 23:52:31 +0100 | <fieldbuck_> | but how about a nurse or a wallmart cashier? |
2022-12-02 23:52:41 +0100 | <davean> | fieldbuck_: Many countries are smaller than cities in the US, which is one reason why asking for a "US Salary" is silly. |
2022-12-02 23:52:48 +0100 | <sm> | fieldbuck_: varies very strongly by location and industry |
2022-12-02 23:53:14 +0100 | <davean> | fieldbuck_: and again, you MUST consider cost of living |
2022-12-02 23:53:32 +0100 | <fieldbuck_> | yes yes i consider |
2022-12-02 23:54:01 +0100 | <fieldbuck_> | but ia m just trying to understand the uh i mean the gap between a cashier and a junior software developer |
2022-12-02 23:54:06 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) |
2022-12-02 23:54:06 +0100 | wroathe | (~wroathe@207-153-38-140.fttp.usinternet.com) (Changing host) |
2022-12-02 23:54:06 +0100 | wroathe | (~wroathe@user/wroathe) |
2022-12-02 23:54:32 +0100 | <davean> | fieldbuck_: well the poverty line in the US is $33148/year |
2022-12-02 23:54:54 +0100 | <davean> | but again you're REALLY going to have to pick a *location* the US is not at all coherent |
2022-12-02 23:55:40 +0100 | <fieldbuck_> | hmm thats actually what maybe a junior software dev makes here maybe? |
2022-12-02 23:55:44 +0100 | <davean> | If you ask about Boston MA you're going to get massively different results than asking about Anchorage AK |
2022-12-02 23:56:04 +0100 | <fieldbuck_> | yes yes |
2022-12-02 23:56:29 +0100 | <fieldbuck_> | but lets say if you work in macdonalds how much do you make? |
2022-12-02 23:57:03 +0100 | <davean> | IT DEPENDS ON WHERE YOU AER |
2022-12-02 23:57:11 +0100 | <davean> | By orders of magnitude |
2022-12-02 23:57:17 +0100 | <davean> | You aren't taking what I'm saying seriously. |
2022-12-02 23:57:39 +0100 | <sm> | https://www.wolframalpha.com/input/?i=us+mcdonalds+salary |
2022-12-02 23:57:44 +0100 | <fieldbuck_> | WELL MAYBE IN A BIG CITY IN NEBRASKA AND THEN IN SAN FRANCISCO? |
2022-12-02 23:57:45 +0100 | <sm> | good enough ? |
2022-12-02 23:58:15 +0100 | <fieldbuck_> | fair enough |
2022-12-02 23:58:16 +0100 | <davean> | https://minimumwage.com/in-your-state/ |
2022-12-02 23:58:37 +0100 | <sm> | ha, better: https://www.wolframalpha.com/input?i=us+macdonalds+salary |
2022-12-02 23:59:02 +0100 | <davean> | A place with a minimum wage of $7.25 is a lot different than one with a minimum wage of $$15.90 |
2022-12-02 23:59:34 +0100 | <geekosaur> | and in any case fast food joints in the US mostly pay more than minimum wage these days because they can't get employees otherwise (some pay up to double) |
2022-12-02 23:59:52 +0100 | <sm> | hmm maybe I expect too much from wolfram alpha. All the AI demos lately made me expect magic |
2022-12-02 23:59:55 +0100 | <fieldbuck_> | 10$ min wage would still be only 1600 a month :( |
2022-12-02 23:59:59 +0100 | <davean> | geekosaur: Right, but I wanted a good easy comparison of base levels across areas. |