2020-12-12 00:00:43 +0100 | <iqubic> | I just dove into lens, and wrote this for myself: "arrIx a i = a ^? ix i" |
2020-12-12 00:01:03 +0100 | <iqubic> | It does the same thing as glguy's arrIx. |
2020-12-12 00:01:13 +0100 | <aev> | Michael Snoyman wrote about how head, tail, and !! are a problem due to laziness and in production code should be replaced by something that returns a Maybe. What do you think about that? Valid? And do such solutions exist already? |
2020-12-12 00:02:07 +0100 | <iqubic> | aev: If you want safe functions, I recommend using this: https://hackage.haskell.org/package/safe-0.3.19/docs/Safe.html |
2020-12-12 00:02:30 +0100 | <iqubic> | findJust :: (a -> Bool) -> [a] -> a |
2020-12-12 00:02:37 +0100 | <iqubic> | findJust op = fromJust . find op |
2020-12-12 00:02:40 +0100 | <iqubic> | That's not safe. |
2020-12-12 00:02:49 +0100 | <glguy> | aev: sweeping generalizations aren't too useful |
2020-12-12 00:03:10 +0100 | <aev> | iqubic: thank you! |
2020-12-12 00:03:14 +0100 | <glguy> | aev: if you're doing a lot of indexing into your lists you probably just have the wrong type |
2020-12-12 00:03:36 +0100 | <monochrom> | I don't have a reason to use head, tail, !! unless I know I'm using them correctly. |
2020-12-12 00:03:41 +0100 | <glguy> | replacing things with Maybe when there's no reasonable case for a Nothing to be returned creates cases that have to be ignored anyway |
2020-12-12 00:04:14 +0100 | juri_ | (~juri@178.63.35.222) (Ping timeout: 256 seconds) |
2020-12-12 00:04:45 +0100 | <monochrom> | No, scratch that. Unless both I'm using them correctly and I really need them. The latter is rare. |
2020-12-12 00:04:48 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds) |
2020-12-12 00:05:08 +0100 | <aev> | OK. So for instance you expect someone to input some characters in a console. And you don't expect them to not enter anything. Then using head or !!0 will break. |
2020-12-12 00:05:32 +0100 | <merijn> | I think any use of !! is almost certainly wrong anyway |
2020-12-12 00:05:38 +0100 | <aev> | Of course that happens only once and after that you learned and never do that again. |
2020-12-12 00:05:44 +0100 | <merijn> | head and tail have their uses, but are incredibly limited |
2020-12-12 00:06:21 +0100 | <phaazon> | !? all the way! |
2020-12-12 00:06:33 +0100 | <monochrom> | No, a better example is "map head (group xxx)" so I know my head is fed non-empty lists, always. |
2020-12-12 00:06:50 +0100 | <monochrom> | User input? Use a proper parser already. |
2020-12-12 00:06:51 +0100 | <aev> | phaazon: !? ? Interesting. I'll look that up. |
2020-12-12 00:06:51 +0100 | <iqubic> | I've legit seen someone pattern match on [] and on xs, and proceed to use head xs and tail xs there, instead of just pattern matching on the ":" constructor. |
2020-12-12 00:06:57 +0100 | <merijn> | Also, I can already preemptively answer "does everyone agree with Snoyman?" with "no" |
2020-12-12 00:07:03 +0100 | <phaazon> | aev: it’s defined on Vector |
2020-12-12 00:07:08 +0100 | <merijn> | iqubic: Sure, so have I |
2020-12-12 00:07:19 +0100 | <phaazon> | (!?) :: Vector a -> Int -> Maybe a |
2020-12-12 00:07:28 +0100 | <monochrom> | head, tail, !! are very low priority issues. |
2020-12-12 00:07:33 +0100 | <aev> | merijn: I didn't think so! :) |
2020-12-12 00:07:34 +0100 | <iqubic> | And in that case, once you fail to match on the empty list, you know head and tail will be safe. |
2020-12-12 00:07:43 +0100 | <Kronic> | what would you say is a high priority issue |
2020-12-12 00:07:50 +0100 | scasc | (~szabi@213142096072.public.telering.at) (Quit: Leaving) |
2020-12-12 00:08:00 +0100 | <monochrom> | In addition, every effort in "fixing" the issue is missing the point. |
2020-12-12 00:08:26 +0100 | kenran | (~kenran@i59F67BD5.versanet.de) (Quit: leaving) |
2020-12-12 00:08:49 +0100 | <monochrom> | Apart from unwashed beginners, realistic use cases of head don't benefit from Maybe. |
2020-12-12 00:09:06 +0100 | <merijn> | monochrom: pfft, nuance is for losers |
2020-12-12 00:09:12 +0100 | <merijn> | Black and white opinions only! |
2020-12-12 00:09:35 +0100 | <monochrom> | Instead of policing them (and not policing really important things), they should be either left alone or recommended to change over to Data.Nonempty. |
2020-12-12 00:10:00 +0100 | <Kronic> | I think it would be nice if there was some kind of indicator that a function is partial like head |
2020-12-12 00:10:19 +0100 | <phaazon> | well, a safe “head” and a safe “tail” is super easy to get at once by simply pattern matching |
2020-12-12 00:10:25 +0100 | <phaazon> | I think I almost never call those functions |
2020-12-12 00:10:31 +0100 | o1lo01ol1o | (~o1lo01ol1@31.22.250.118) |
2020-12-12 00:10:46 +0100 | <monochrom> | Snoyman is talented but that head-tail-!! blog is one unit of blog time wasted on an inconsequential trivia pursuit. |
2020-12-12 00:10:56 +0100 | son0p | (~son0p@181.136.122.143) |
2020-12-12 00:11:10 +0100 | <merijn> | Kronic: See...suggesting a new type of haddock notion that indicates partiality *that* is a much less controversial *and* more productive suggestion |
2020-12-12 00:11:11 +0100 | <exarkun> | How bad is this idea? https://gist.github.com/exarkun/e1b0c67e409c3223206d60256fe31b5e |
2020-12-12 00:11:16 +0100 | <exarkun> | (Conduit) |
2020-12-12 00:11:23 +0100 | <jle`> | merijn: there's Data.List.NonEmpty.group :) |
2020-12-12 00:11:23 +0100 | <monochrom> | Right, what phaazon said. You should be using pattern matching already 99.99% of the time. |
2020-12-12 00:11:34 +0100 | <jle`> | erm ^ monochrom |
2020-12-12 00:11:43 +0100 | <phaazon> | exarkun: oh I saw that in Idris |
2020-12-12 00:11:44 +0100 | xsperry | (~as@unaffiliated/xsperry) |
2020-12-12 00:11:46 +0100 | <phaazon> | your unwrap |
2020-12-12 00:11:51 +0100 | <monochrom> | I did say Data.Nonempty. Just call it a typo. |
2020-12-12 00:11:51 +0100 | <phaazon> | I think it’s called useless in Idris |
2020-12-12 00:11:55 +0100 | <phaazon> | or boring |
2020-12-12 00:11:58 +0100 | <phaazon> | I don’t recall exactly |
2020-12-12 00:12:03 +0100 | <phaazon> | it should be in base in Haskell :) |
2020-12-12 00:12:04 +0100 | <merijn> | exarkun: It's ok, but you might wanna consider using STM instead |
2020-12-12 00:12:33 +0100 | <jle`> | monochrom: oh, i missed that message, my bad |
2020-12-12 00:13:19 +0100 | chang | (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
2020-12-12 00:13:20 +0100 | <Kronic> | It is probably an operator that is in use elsewhere, but I thought when I first learned about partial stuff it would be cool if the type was head :: [a] ?> a -- Was that what you meant by haddock notion merijn ? |
2020-12-12 00:14:35 +0100 | <jle`> | % type a -!> b = a -> Maybe b |
2020-12-12 00:14:36 +0100 | <yahb> | jle`: |
2020-12-12 00:14:41 +0100 | <jle`> | whoops typo |
2020-12-12 00:14:46 +0100 | <jle`> | % type a -?> b = a -> Maybe b |
2020-12-12 00:14:47 +0100 | <yahb> | jle`: |
2020-12-12 00:14:59 +0100 | <merijn> | Kronic: Haddock is the doc generator that's being used on Hackage, so I meant some kinda of indicator for partial functions in Haddock might be useful. otoh, you end up wondering "should functions that potentially don't terminate be marked as partial?" and then you've got a whole new rabbit hole! |
2020-12-12 00:15:19 +0100 | <jle`> | % safeHead :: [a] -?> a; safeHead [] = Nothing; safeHead (x:_) = Just x |
2020-12-12 00:15:20 +0100 | <yahb> | jle`: |
2020-12-12 00:15:22 +0100 | <jle`> | % :t safeHead |
2020-12-12 00:15:22 +0100 | <yahb> | jle`: [a] -?> a |
2020-12-12 00:15:50 +0100 | <Kronic> | That is really what I mean, I am not sure what kind of implications it would have, it would just be nice to see in an unintrusive way that something is partial by the type |
2020-12-12 00:16:12 +0100 | <glguy> | If anyone's doing adventofcode.com this year and isn't on the Haskell leaderboard, grab the code from /topic ! |
2020-12-12 00:16:13 +0100 | <jle`> | there is a way to do it manually, by using an empty constraint |
2020-12-12 00:16:16 +0100 | <Kronic> | I got what you mean about haddock now though, I had forgotten about it, only recently returned to haskell :) |
2020-12-12 00:16:31 +0100 | <jle`> | some people use it to deal with IO exceptions |
2020-12-12 00:16:37 +0100 | <merijn> | Kronic: You might be interested in Liquid Haskell too :) |
2020-12-12 00:16:45 +0100 | __monty__ | (~toonn@unaffiliated/toonn) (Quit: leaving) |
2020-12-12 00:16:46 +0100 | <jle`> | oh i think actually purescript has this Partial typeclass constraint |
2020-12-12 00:16:52 +0100 | <monochrom> | @quote monochrom safefromjust |
2020-12-12 00:16:53 +0100 | <lambdabot> | monochrom says: I use safeFromJust :: Maybe a -> Maybe a |
2020-12-12 00:16:58 +0100 | <jle`> | and it automatically adds it to incomplete pattern matches |
2020-12-12 00:17:14 +0100 | <jle`> | so if you defined head (x:_) = x, its type will be inferred as head :: Partial => [a] -> a |
2020-12-12 00:17:25 +0100 | <jle`> | and so any code that uses 'head' will also have that typeclass constraint |
2020-12-12 00:17:38 +0100 | <jle`> | it's possible in Haskell too I think, but you have to manually add the constraint whenever you have a partial function |
2020-12-12 00:17:44 +0100 | <jle`> | % class Partial |
2020-12-12 00:17:44 +0100 | <yahb> | jle`: |
2020-12-12 00:18:07 +0100 | <jle`> | % partialHead :: Partial => [a] -> a; partialHead (x:_) = x |
2020-12-12 00:18:07 +0100 | <yahb> | jle`: |
2020-12-12 00:18:16 +0100 | <dolio> | It did at least used to be in purescript. I wouldn't describe it as useful. |
2020-12-12 00:18:20 +0100 | <jle`> | % :t \xs -> head xs + 3 |
2020-12-12 00:18:20 +0100 | <yahb> | jle`: Num a => [a] -> a |
2020-12-12 00:18:31 +0100 | <jle`> | % :t \xs -> partialHead xs + 3 |
2020-12-12 00:18:31 +0100 | <yahb> | jle`: ; <interactive>:1:8: error:; * Could not deduce Partial arising from a use of `partialHead'; from the context: Num a bound by the inferred type of it :: Num a => [a] -> a at <interactive>:1:1; Possible fix: add Partial to the context of the inferred type of it :: Num a => [a] -> a; * In the first argument of `(+)', namely `partialHead xs'; In the expression: partialHead xs + 3 |
2020-12-12 00:18:39 +0100 | <Kronic> | Seems cool but I think I should stick to just regular Haskell for now, it is not surprising that someone else already has something like this though haha. Thank you for pointing it out merijn |
2020-12-12 00:18:45 +0100 | <jle`> | hm. |
2020-12-12 00:19:28 +0100 | <merijn> | Kronic: Liquid Haskell are just special annotations + a GHC plugin on top of regular Haskell |
2020-12-12 00:19:51 +0100 | <monochrom> | I think it's the same phenomenon as: Just because you use "error :: HasCallBack => String -> a" doesn't mean callers automatically inherit that constraint. |
2020-12-12 00:20:34 +0100 | CMCDragonkai1 | (~Thunderbi@120.17.176.90) |
2020-12-12 00:21:05 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
2020-12-12 00:21:23 +0100 | elfets | (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving) |
2020-12-12 00:22:05 +0100 | fendor | (~fendor@178.165.131.83.wireless.dyn.drei.com) (Remote host closed the connection) |
2020-12-12 00:22:18 +0100 | wagle | (~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
2020-12-12 00:22:49 +0100 | wagle | (~wagle@quassel.wagle.io) |
2020-12-12 00:23:11 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2020-12-12 00:23:14 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-12-12 00:24:10 +0100 | son0p | (~son0p@181.136.122.143) (Quit: Lost terminal) |
2020-12-12 00:26:05 +0100 | <Kronic> | ah I see |
2020-12-12 00:26:05 +0100 | raehik | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Read error: Connection reset by peer) |
2020-12-12 00:26:36 +0100 | argento | (~argent0@168.227.97.34) (Ping timeout: 240 seconds) |
2020-12-12 00:26:38 +0100 | <dolio> | The reasons are basically what monochrom said above. If I'm using `head`, it's because I know something the compiler can't figure out, and the null class thing just makes it a big pain to actually use. |
2020-12-12 00:26:59 +0100 | <dolio> | And on something like incomplete matching, a warning is probably better. |
2020-12-12 00:28:53 +0100 | olligobber | (~olligobbe@unaffiliated/olligobber) |
2020-12-12 00:28:53 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.) |
2020-12-12 00:31:09 +0100 | <phaazon> | dolio: can’t you pattern-match the list instead? |
2020-12-12 00:31:09 +0100 | Tario | (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
2020-12-12 00:31:15 +0100 | <phaazon> | so that your compiler knows |
2020-12-12 00:31:31 +0100 | <dolio> | And put what in the null case? |
2020-12-12 00:31:37 +0100 | Tario | (~Tario@201.192.165.173) |
2020-12-12 00:31:39 +0100 | <dolio> | Something equally inconvenient to use. |
2020-12-12 00:31:55 +0100 | o1lo01ol1o | (~o1lo01ol1@31.22.250.118) (Remote host closed the connection) |
2020-12-12 00:32:25 +0100 | darjeeling_ | (~darjeelin@115.215.43.136) (Ping timeout: 256 seconds) |
2020-12-12 00:33:10 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2020-12-12 00:33:19 +0100 | darjeeling_ | (~darjeelin@115.215.43.136) |
2020-12-12 00:34:27 +0100 | <monochrom> | When I was younger I looked at all these freedoms offered by various languages and made doomsday speeches about how programmers would be reckless and stupid and malicious and abused those freedoms to produce completely broken code 24/7/365. |
2020-12-12 00:34:42 +0100 | chang | (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-12-12 00:34:50 +0100 | <dolio> | Well, they do do that. |
2020-12-12 00:34:53 +0100 | <monochrom> | No, it didn't happen, and never will. Programmers turn out to use that freedom wisely, in reality. |
2020-12-12 00:35:40 +0100 | <monochrom> | Or rather, statistical vast majority. We all make mistakes, yes. |
2020-12-12 00:35:42 +0100 | <koala_man> | generally, most of the time |
2020-12-12 00:36:06 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 00:38:42 +0100 | sgibber2018 | (~arch-gibb@208.85.237.137) |
2020-12-12 00:39:07 +0100 | conal | (~conal@66.115.157.156) (Quit: Computer has gone to sleep.) |
2020-12-12 00:39:25 +0100 | sgibber2018 | (~arch-gibb@208.85.237.137) (Client Quit) |
2020-12-12 00:40:36 +0100 | hyperisco | (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 240 seconds) |
2020-12-12 00:42:22 +0100 | sgibber2018 | (~arch-gibb@208.85.237.137) |
2020-12-12 00:42:39 +0100 | <dolio> | The point is that it doesn't stop me from writing the 'unsafe' thing that I happen to know is safe, it just makes me waste time. Because adding time wasting to 'incorrect' code is an easier way to make it more expensive than 'correct' code than actually improving the ability to write the latter. |
2020-12-12 00:42:51 +0100 | sgibber2018 | (~arch-gibb@208.85.237.137) (Client Quit) |
2020-12-12 00:43:49 +0100 | <jle`> | i do agree with you dolio . plus having to thread that Partial constraint up through your entire codebase for something at the low level...is pretty inconvenient |
2020-12-12 00:43:59 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 00:44:16 +0100 | <Kronic> | C++ programmers probably say the same thing about many of the things available in C++ |
2020-12-12 00:45:21 +0100 | sakirious | (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Quit: The Lounge - https://thelounge.chat) |
2020-12-12 00:45:21 +0100 | <jle`> | maybe something useful (for my specific announce) would be `yesIKnow :: (Partial => a) -> a` |
2020-12-12 00:45:54 +0100 | <dolio> | I think that was how you actually were supposed to use partial stuff in purescript. |
2020-12-12 00:46:07 +0100 | <jle`> | D: |
2020-12-12 00:46:16 +0100 | <dolio> | But that's just clutter. |
2020-12-12 00:46:40 +0100 | sakirious | (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) |
2020-12-12 00:46:49 +0100 | <jle`> | maybe better would be demanding a blood sacrifice every time you use a partial function |
2020-12-12 00:46:53 +0100 | <jle`> | same sort of cost |
2020-12-12 00:46:55 +0100 | sakirious | (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Client Quit) |
2020-12-12 00:47:21 +0100 | <jle`> | the idea is to slightly punish you for using it until you pay the pennance |
2020-12-12 00:47:33 +0100 | <jle`> | but that feels like an odd form of Boolean Blindness |
2020-12-12 00:47:43 +0100 | Tario | (~Tario@201.192.165.173) (Ping timeout: 260 seconds) |
2020-12-12 00:47:48 +0100 | <jle`> | it doesn't really do anything meaningful other than require some sort of token |
2020-12-12 00:48:05 +0100 | random-jellyfish | (524c366d@unaffiliated/random-jellyfish) |
2020-12-12 00:48:21 +0100 | chewb | (~chewb@abhz34.neoplus.adsl.tpnet.pl) (Ping timeout: 258 seconds) |
2020-12-12 00:48:39 +0100 | acidjnk_new | (~acidjnk@p200300d0c719ff72385a765c3f0a7348.dip0.t-ipconnect.de) (Remote host closed the connection) |
2020-12-12 00:48:43 +0100 | quantumvatican | (~private@lfbn-idf2-1-504-211.w86-246.abo.wanadoo.fr) (Quit: Lost terminal) |
2020-12-12 00:48:44 +0100 | justanotheruser | (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 258 seconds) |
2020-12-12 00:48:47 +0100 | <random-jellyfish> | are there any real world projects that use parsec |
2020-12-12 00:48:51 +0100 | <random-jellyfish> | ? |
2020-12-12 00:49:01 +0100 | acidjnk_new | (~acidjnk@p200300d0c719ff72385a765c3f0a7348.dip0.t-ipconnect.de) |
2020-12-12 00:49:03 +0100 | <dolio> | I guess the real crux is: I don't need the compiler to punish me for using partial functions. I already don't want to use them. But sometimes they're better than the alternative, and I don't want to jump through hoops in those cases. |
2020-12-12 00:49:05 +0100 | <jle`> | isn't parsec a real world project? |
2020-12-12 00:49:34 +0100 | <random-jellyfish> | yeah but I mean some language parsers built on parsec |
2020-12-12 00:49:48 +0100 | <random-jellyfish> | that are used in production |
2020-12-12 00:49:49 +0100 | <jle`> | oh sorry, i thought you wrote pandoc |
2020-12-12 00:50:01 +0100 | CMCDragonkai1 | (~Thunderbi@120.17.176.90) (Quit: CMCDragonkai1) |
2020-12-12 00:50:04 +0100 | <jle`> | hm, parsec in specific, or parser combinators? |
2020-12-12 00:50:15 +0100 | <merijn> | random-jellyfish: There's about 998 reverse dependencies of parsec, so..."yes" |
2020-12-12 00:50:16 +0100 | <random-jellyfish> | parsec in specific |
2020-12-12 00:50:20 +0100 | <jle`> | generally i see megaparsec, attoparsec, etc. used in the wild |
2020-12-12 00:50:24 +0100 | <merijn> | https://packdeps.haskellers.com/reverse/parsec |
2020-12-12 00:50:41 +0100 | <jle`> | megaprasec being a 'modern' fork of parsec, even though parsec is pretty modern now |
2020-12-12 00:51:05 +0100 | <mouseghost> | >acme-lolcat |
2020-12-12 00:51:07 +0100 | Tario | (~Tario@201.192.165.173) |
2020-12-12 00:51:10 +0100 | juri_ | (~juri@178.63.35.222) |
2020-12-12 00:51:20 +0100 | <random-jellyfish> | would it be possible to parse a language like c++ in parsec? |
2020-12-12 00:51:35 +0100 | <jle`> | the idris language implementation uses megaparsec |
2020-12-12 00:52:00 +0100 | <MarcelineVQ> | idris1 does yes |
2020-12-12 00:52:08 +0100 | <jle`> | lm uses parsec |
2020-12-12 00:52:10 +0100 | <jle`> | *elm |
2020-12-12 00:52:50 +0100 | <jle`> | pandoc uses both parsec and attoparsec (attoparsec presumably for the binary encodings) |
2020-12-12 00:52:53 +0100 | <MarcelineVQ> | speaking of which, re the last convo branc, you simply annotate just above your function whether it's partial, covering, or total in idris. |
2020-12-12 00:52:57 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
2020-12-12 00:54:29 +0100 | maroloccio | (~marolocci@pousada3ja.mma.com.br) |
2020-12-12 00:56:14 +0100 | <aev> | I'm pretty new to haskell. How do I recognize whether a function is partial? And why would I want to avoid it? |
2020-12-12 00:56:36 +0100 | cr3 | (~cr3@192-222-143-195.qc.cable.ebox.net) (Ping timeout: 240 seconds) |
2020-12-12 00:58:02 +0100 | <monochrom> | 1. can't. 2. wouldn't. |
2020-12-12 00:58:12 +0100 | random-jellyfish | (524c366d@unaffiliated/random-jellyfish) (Remote host closed the connection) |
2020-12-12 00:58:17 +0100 | <MarcelineVQ> | Something like head is partial in that given an empty list it crashes because it can't give you an element from the front of an empty list. avoiding crashes is usually a good thing to want to do, but not always |
2020-12-12 00:58:32 +0100 | <jle`> | aev: one of the major strengths in Haskell is how the compiler can help you with avoiding a major class of bugs by handling all cases of an ADT...it can be your friend in writing code. using partial (non-total matching) functions sort of dismisses a lot of the advantages you'd get over other languages |
2020-12-12 00:58:35 +0100 | <monochrom> | 3. spend your time on a more worthy issue, such as learning pattern matching and evangelizing it. |
2020-12-12 00:58:53 +0100 | <jle`> | at least when learning haskell, relying on partial functions steers you away from things like pattern matching, which give more robust solutions |
2020-12-12 00:59:06 +0100 | <monochrom> | and equational reasoning. |
2020-12-12 00:59:19 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-12-12 00:59:45 +0100 | o1lo01ol1o | (~o1lo01ol1@92.250.17.1) |
2020-12-12 00:59:46 +0100 | <dminuoso> | aev: Sadly there's no good way to recognize partial functions. If you gain experience, you'll not only learn the common partial functions, you'll also learn to see whether a function is partial based on the type signature and the description.. |
2020-12-12 00:59:52 +0100 | <jle`> | a simple mistake would be something like `head xs + 3`, which would crash if xs was empty. but if you wrote `case xs of x:_ -> 3; [] -> ???`, it makes you thiunk about what you'd really want to do in that case |
2020-12-12 01:00:08 +0100 | <jle`> | if you put in the thought about what to do in the empty case (or why it shouldn't come up), then it makes sense to use it |
2020-12-12 01:00:30 +0100 | aev_ | (~aev@pool-108-5-152-94.nwrknj.fios.verizon.net) |
2020-12-12 01:00:36 +0100 | <jle`> | but just leaving the pattern match can help with thinking about your code |
2020-12-12 01:00:40 +0100 | <jle`> | and later on when you decide to refactor it |
2020-12-12 01:00:50 +0100 | aev | (~aev@pool-108-5-152-94.nwrknj.fios.verizon.net) (Read error: Connection reset by peer) |
2020-12-12 01:00:59 +0100 | <jle`> | i guess they got scared |
2020-12-12 01:01:05 +0100 | aev_ | aev |
2020-12-12 01:02:03 +0100 | <monochrom> | No, they got dodgy connection. |
2020-12-12 01:02:09 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 258 seconds) |
2020-12-12 01:02:29 +0100 | <monochrom> | Perhaps the router go scared, yes. :) |
2020-12-12 01:02:36 +0100 | <aev> | oh dear, my connection just broke. And now my nick doesn't work. |
2020-12-12 01:02:54 +0100 | <dminuoso> | aev: See, partial code causes problems like spurious disconnects. |
2020-12-12 01:02:59 +0100 | <aev> | :D |
2020-12-12 01:03:11 +0100 | <monochrom> | No, I/O code does. |
2020-12-12 01:03:16 +0100 | <dminuoso> | heh |
2020-12-12 01:03:31 +0100 | <monochrom> | I/O and mutability are the ones worth fighting against. |
2020-12-12 01:03:55 +0100 | <monochrom> | partial functions *pfft* |
2020-12-12 01:03:57 +0100 | <aev> | What if I/O is exactly the effect I seek? |
2020-12-12 01:04:16 +0100 | <dminuoso> | I/O is not a particular effect, it's the sledge hammer of effects.. :) |
2020-12-12 01:04:27 +0100 | o1lo01ol1o | (~o1lo01ol1@92.250.17.1) (Ping timeout: 258 seconds) |
2020-12-12 01:04:37 +0100 | <aev> | I really dislike mutability. I worked hard to make all my java applications use immutable data. |
2020-12-12 01:05:37 +0100 | <Rembane> | aev: How did it go? |
2020-12-12 01:05:42 +0100 | <aev> | It's what I like about haskell and rust: it appears everything is immutable by default. Unless I haven't seen mutable things yet. Which is possible. |
2020-12-12 01:06:09 +0100 | <jle`> | yeah, haskell values are all immutable (barring unsafe compiler hacks) |
2020-12-12 01:06:13 +0100 | <aev> | Rembane: it turned out quite possible, though only through a lot of preparation. And def. not canon java. |
2020-12-12 01:06:27 +0100 | jb55 | (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection) |
2020-12-12 01:06:46 +0100 | <Rembane> | aev: Nice! I didn't think it was really possible. :) |
2020-12-12 01:06:59 +0100 | <aev> | Using immutable data had an unexpected side effect: my programs are much faster now. |
2020-12-12 01:07:09 +0100 | <jle`> | we can still describe mutable code, though, so it's nice |
2020-12-12 01:07:15 +0100 | <jle`> | kind of gets the best of both worlds in a way |
2020-12-12 01:07:25 +0100 | <jle`> | *mutable algorithms |
2020-12-12 01:07:54 +0100 | ski | . o O ( (`-Woverlapping-patterns',)`-Wincomplete-patterns',`-Wincomplete-uni-patterns',(`-Wmissing-fields',)`-Wincomplete-record-updates',`-Wpartial-fields' ) |
2020-12-12 01:08:24 +0100 | <aev> | Why doesn't -Wall include -Wincomplete-uni-patterns? |
2020-12-12 01:09:13 +0100 | <dminuoso> | Why would you think -Wall included *all* warnings? |
2020-12-12 01:09:17 +0100 | <dminuoso> | Seems quite unreasonable. |
2020-12-12 01:09:24 +0100 | dnlkrgr | (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 256 seconds) |
2020-12-12 01:10:52 +0100 | <merijn> | incomplete-uni-patterns is an annoying warning, that's why :p |
2020-12-12 01:11:06 +0100 | <monochrom> | all < everything because -Wall turns on a strict subset of -Weverything :) |
2020-12-12 01:11:36 +0100 | argento | (~argent0@168.227.97.34) |
2020-12-12 01:12:15 +0100 | <Kronic> | Does anyone know if there is anything special that needs to be done to get on-hover type lookups for a stack project with vscode haskell ? |
2020-12-12 01:12:33 +0100 | <ski> | (also `-Wincomplete-record-updates',`-Wpartial-fields') |
2020-12-12 01:13:05 +0100 | <dminuoso> | aev: I guess the ratoinale is `-Wall` turns on all the pessimistic warnings you'd likely want, without giving debatable warnings. Some particular examples that come to mind is `-fwarn-missing-import-lists` or `-fwarn-monomorphism-restriction` |
2020-12-12 01:13:15 +0100 | <dminuoso> | It's very unlikely you'd ever want to see warnings for these |
2020-12-12 01:13:19 +0100 | <Kronic> | Ah nevermind just restarting the lsp fixed it for some reason |
2020-12-12 01:13:38 +0100 | <dminuoso> | aev: So the choice of "which warnings should be excluded" is opinionated. |
2020-12-12 01:13:40 +0100 | <merijn> | dminuoso: That's explicitly the rationale in the user guide |
2020-12-12 01:13:59 +0100 | <merijn> | Also "-Wall" in gcc is "the standard thing you turn on" and gcc doesn't even *have* a flag to enable all warnings |
2020-12-12 01:14:17 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:c067:8b42:febe:186b) (Remote host closed the connection) |
2020-12-12 01:14:58 +0100 | <dminuoso> | merijn: I dont see any rationale for -Wall. |
2020-12-12 01:15:03 +0100 | <dminuoso> | Just a description of what it does. |
2020-12-12 01:15:37 +0100 | <merijn> | hmm, maybe I misremembered |
2020-12-12 01:17:56 +0100 | filwisher | (~filwisher@78.141.201.45) (Ping timeout: 240 seconds) |
2020-12-12 01:18:32 +0100 | matryoshka | (~matryoshk@184.75.223.227) |
2020-12-12 01:19:12 +0100 | Vulfe | (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) |
2020-12-12 01:19:24 +0100 | Tops2 | (~Tobias@dyndsl-095-033-093-163.ewe-ip-backbone.de) |
2020-12-12 01:21:40 +0100 | <aev> | dminuoso: sounds reasonable. Thank you! |
2020-12-12 01:22:09 +0100 | aev | (~aev@pool-108-5-152-94.nwrknj.fios.verizon.net) (Quit: See you later!) |
2020-12-12 01:22:50 +0100 | ski | . o O ( "Java Precisely" by Peter Sestoft (of Moscow ML fame) in 2002,2005,2016 at <https://www.itu.dk/people/sestoft/javaprecisely/> ) |
2020-12-12 01:22:51 +0100 | filwisher | (~filwisher@78.141.201.45) |
2020-12-12 01:23:16 +0100 | Vulfe | (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Ping timeout: 240 seconds) |
2020-12-12 01:23:54 +0100 | mouseghost | . o O ( . o O ) |
2020-12-12 01:24:22 +0100 | argento | (~argent0@168.227.97.34) (Ping timeout: 265 seconds) |
2020-12-12 01:24:24 +0100 | vnz | (~vnz@unaffiliated/vnz) (Quit: ZNC - http://znc.in) |
2020-12-12 01:25:54 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2020-12-12 01:26:56 +0100 | wonko7 | (~wonko7@lns-bzn-55-82-255-183-4.adsl.proxad.net) (Ping timeout: 240 seconds) |
2020-12-12 01:28:56 +0100 | nineonine | (~nineonine@50.216.62.2) (Ping timeout: 240 seconds) |
2020-12-12 01:28:56 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 01:29:13 +0100 | seveg | (~gabriel@2a02-ab04-0249-8d00-3603-db93-c217-257c.dynamic.v6.chello.sk) (Ping timeout: 272 seconds) |
2020-12-12 01:29:34 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) |
2020-12-12 01:29:59 +0100 | seveg | (~gabriel@2a02-ab04-0249-8d00-3603-db93-c217-257c.dynamic.v6.chello.sk) |
2020-12-12 01:30:16 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2020-12-12 01:33:06 +0100 | <koz_> | mouseghost: You're thinking about thinking? |
2020-12-12 01:33:14 +0100 | <mouseghost> | koz_, yes |
2020-12-12 01:33:34 +0100 | <mouseghost> | about this "emoji"thing |
2020-12-12 01:33:46 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds) |
2020-12-12 01:33:53 +0100 | <monochrom> | https://ro-che.info/ccc/9 |
2020-12-12 01:34:35 +0100 | <koz_> | ROFL |
2020-12-12 01:34:50 +0100 | <monochrom> | Don't forget the lens one, too. |
2020-12-12 01:34:58 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:dd32:f3f6:1e86:cd44) |
2020-12-12 01:35:41 +0100 | <koz_> | monochrom: Lens one? |
2020-12-12 01:36:20 +0100 | <monochrom> | https://ro-che.info/ccc/23 |
2020-12-12 01:38:17 +0100 | <koz_> | Lol. |
2020-12-12 01:38:37 +0100 | argento | (~argent0@168.227.97.34) |
2020-12-12 01:39:20 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-12-12 01:39:33 +0100 | nineonine | (~nineonine@50.216.62.2) |
2020-12-12 01:39:37 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:dd32:f3f6:1e86:cd44) (Ping timeout: 260 seconds) |
2020-12-12 01:39:50 +0100 | <phaazon> | ahah |
2020-12-12 01:39:55 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 01:40:01 +0100 | acidjnk_new | (~acidjnk@p200300d0c719ff72385a765c3f0a7348.dip0.t-ipconnect.de) (Read error: Connection reset by peer) |
2020-12-12 01:40:27 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-12-12 01:41:14 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 01:41:14 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-12-12 01:41:53 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 01:42:01 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-12-12 01:43:58 +0100 | nineonine | (~nineonine@50.216.62.2) (Ping timeout: 256 seconds) |
2020-12-12 01:45:07 +0100 | shenyi | (uid216035@gateway/web/irccloud.com/x-qbidixgzwkexrbur) (Quit: Connection closed for inactivity) |
2020-12-12 01:45:44 +0100 | vicfred | (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
2020-12-12 01:46:05 +0100 | nineonine | (~nineonine@50.216.62.2) |
2020-12-12 01:46:15 +0100 | Vulfe | (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) |
2020-12-12 01:48:08 +0100 | mouseghost | (~draco@wikipedia/desperek) (Quit: mew wew) |
2020-12-12 01:49:16 +0100 | st8less | (~st8less@inet-167-224-197-181.isp.ozarksgo.net) (Ping timeout: 240 seconds) |
2020-12-12 01:55:03 +0100 | codeAlways | (uid272474@gateway/web/irccloud.com/x-owjpcrxiqhhkvogb) |
2020-12-12 01:57:24 +0100 | xiinotulp | (~q@ppp-27-55-90-169.revip3.asianet.co.th) (Ping timeout: 256 seconds) |
2020-12-12 01:58:44 +0100 | cr3 | (~cr3@192-222-143-195.qc.cable.ebox.net) |
2020-12-12 02:00:32 +0100 | Vulfe | (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Remote host closed the connection) |
2020-12-12 02:00:46 +0100 | asnyx | (~asnyx@brettgilio.com) (Quit: Long live IRC! <https://brettgilio.com/irc.html>) |
2020-12-12 02:00:46 +0100 | brettgilio | (~brettgili@brettgilio.com) (Quit: Long live IRC! <https://brettgilio.com/irc.html>) |
2020-12-12 02:02:45 +0100 | argento | (~argent0@168.227.97.34) (Ping timeout: 240 seconds) |
2020-12-12 02:04:22 +0100 | star_cloud | (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 256 seconds) |
2020-12-12 02:04:57 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 02:05:28 +0100 | Vulfe | (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) |
2020-12-12 02:09:11 +0100 | xiinotulp | (~q@node-uks.pool-125-24.dynamic.totinternet.net) |
2020-12-12 02:09:49 +0100 | star_cloud | (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
2020-12-12 02:09:51 +0100 | asnyx | (~asnyx@brettgilio.com) |
2020-12-12 02:10:00 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
2020-12-12 02:10:24 +0100 | brettgilio | (~brettgili@brettgilio.com) |
2020-12-12 02:10:30 +0100 | Vulfe | (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Ping timeout: 272 seconds) |
2020-12-12 02:14:21 +0100 | Deide | (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
2020-12-12 02:16:29 +0100 | brettgilio | (~brettgili@brettgilio.com) (Quit: Long live IRC! <https://brettgilio.com/irc.html>) |
2020-12-12 02:16:29 +0100 | asnyx | (~asnyx@brettgilio.com) (Quit: Long live IRC! <https://brettgilio.com/irc.html>) |
2020-12-12 02:17:12 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) |
2020-12-12 02:17:56 +0100 | chang | (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
2020-12-12 02:18:00 +0100 | maroloccio | (~marolocci@pousada3ja.mma.com.br) (Quit: WeeChat 2.3) |
2020-12-12 02:20:01 +0100 | dnlkrgr | (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) |
2020-12-12 02:24:05 +0100 | dnlkrgr | (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 240 seconds) |
2020-12-12 02:25:58 +0100 | st8less | (~st8less@inet-167-224-197-181.isp.ozarksgo.net) |
2020-12-12 02:26:52 +0100 | olligobber | (~olligobbe@unaffiliated/olligobber) (Remote host closed the connection) |
2020-12-12 02:26:53 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 02:26:54 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:dd32:f3f6:1e86:cd44) |
2020-12-12 02:27:45 +0100 | pfurla | (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 240 seconds) |
2020-12-12 02:28:50 +0100 | pfurla | (~pfurla@216.151.180.196) |
2020-12-12 02:29:22 +0100 | asnyx | (~asnyx@brettgilio.com) |
2020-12-12 02:30:41 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection) |
2020-12-12 02:31:01 +0100 | Thoralf | (~Thoralf__@69.162.230.96) |
2020-12-12 02:31:03 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 02:31:25 +0100 | columbarius | (~columbari@i5E86B3A7.versanet.de) (Ping timeout: 240 seconds) |
2020-12-12 02:31:32 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:dd32:f3f6:1e86:cd44) (Ping timeout: 260 seconds) |
2020-12-12 02:31:53 +0100 | brettgilio | (~brettgili@brettgilio.com) |
2020-12-12 02:34:01 +0100 | columbarius | (~columbari@87.123.198.150) |
2020-12-12 02:37:14 +0100 | argento | (~argent0@168.227.97.34) |
2020-12-12 02:38:51 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 02:46:09 +0100 | <Thoralf> | Hello. I haven't been irc for a while. I'm just starting into Haskell. I want to do algorithms on abstract datatypes. Are their any particular libraries I should look into? |
2020-12-12 02:46:23 +0100 | enedil | (~enedil@d101-29.icpnet.pl) () |
2020-12-12 02:46:58 +0100 | Lord_of_Life_ | (~Lord@46.217.220.217) |
2020-12-12 02:47:34 +0100 | Lord_of_Life | (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 246 seconds) |
2020-12-12 02:48:25 +0100 | Ariakenom_ | (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se) (Quit: Leaving) |
2020-12-12 02:48:34 +0100 | asnyx | (~asnyx@brettgilio.com) (Quit: Long live IRC! <https://brettgilio.com/irc.html>) |
2020-12-12 02:50:33 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:90a6:68cd:a3b5:c04d) |
2020-12-12 02:50:50 +0100 | Jeanne-Kamikaze | (~Jeanne-Ka@66.115.189.177) |
2020-12-12 02:55:14 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:90a6:68cd:a3b5:c04d) (Ping timeout: 264 seconds) |
2020-12-12 02:55:48 +0100 | matryoshka | (~matryoshk@184.75.223.227) (Quit: ZNC 1.8.2 - https://znc.in) |
2020-12-12 02:56:11 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
2020-12-12 02:57:31 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Client Quit) |
2020-12-12 02:57:39 +0100 | <Kronic> | Thoralf, https://www.fpcomplete.com/haskell/learn/ you could see if something here interests you, not sure i have much for the topic you asked for though |
2020-12-12 02:57:55 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
2020-12-12 02:58:42 +0100 | vicfred | (~vicfred@unaffiliated/vicfred) |
2020-12-12 03:00:21 +0100 | nuncanada | (~dude@179.235.160.168) (Quit: Leaving) |
2020-12-12 03:00:57 +0100 | <koz_> | Thoralf: That's a very general question. It depends on what algorithms, and what abstract data types. |
2020-12-12 03:01:34 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 246 seconds) |
2020-12-12 03:02:36 +0100 | jespada | (~jespada@90.254.245.49) (Ping timeout: 240 seconds) |
2020-12-12 03:03:16 +0100 | Tario | (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
2020-12-12 03:03:25 +0100 | st8less | (~st8less@inet-167-224-197-181.isp.ozarksgo.net) (Quit: WeeChat 2.9) |
2020-12-12 03:03:40 +0100 | Tario | (~Tario@201.192.165.173) |
2020-12-12 03:05:29 +0100 | jespada | (~jespada@90.254.245.49) |
2020-12-12 03:08:13 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
2020-12-12 03:11:53 +0100 | gehmehgeh | (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving) |
2020-12-12 03:13:15 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
2020-12-12 03:15:37 +0100 | xff0x | (~fox@2001:1a81:5221:8f00:c3d7:cf86:7125:4808) (Ping timeout: 272 seconds) |
2020-12-12 03:17:19 +0100 | xff0x | (~fox@2001:1a81:525b:e100:290b:d404:9fb5:ba71) |
2020-12-12 03:17:38 +0100 | Tario | (~Tario@201.192.165.173) (Ping timeout: 260 seconds) |
2020-12-12 03:18:04 +0100 | Tario | (~Tario@201.192.165.173) |
2020-12-12 03:19:26 +0100 | cole-h | (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
2020-12-12 03:19:57 +0100 | thunderrd | (~thunderrd@183.182.110.8) (Ping timeout: 246 seconds) |
2020-12-12 03:22:36 +0100 | xsperry | (~as@unaffiliated/xsperry) (Remote host closed the connection) |
2020-12-12 03:24:10 +0100 | rprije | (~rprije@14-201-170-17.tpgi.com.au) |
2020-12-12 03:26:11 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
2020-12-12 03:26:22 +0100 | <dsal> | Go möb for maximum abstraction |
2020-12-12 03:26:39 +0100 | dsal | still hasn't used `möb foldMap` |
2020-12-12 03:32:37 +0100 | xsperry | (~as@unaffiliated/xsperry) |
2020-12-12 03:33:46 +0100 | mbomba | (~mbomba@bras-base-toroon2719w-grc-53-142-114-5-26.dsl.bell.ca) (Quit: WeeChat 3.0) |
2020-12-12 03:34:34 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 260 seconds) |
2020-12-12 03:35:58 +0100 | Tops2 | (~Tobias@dyndsl-095-033-093-163.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
2020-12-12 03:38:22 +0100 | carlomagno | (~cararell@148.87.23.8) (Remote host closed the connection) |
2020-12-12 03:39:04 +0100 | carlomagno | (~cararell@148.87.23.5) |
2020-12-12 03:43:27 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:90a6:68cd:a3b5:c04d) |
2020-12-12 03:46:38 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 03:48:33 +0100 | elliott__ | (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) (Ping timeout: 260 seconds) |
2020-12-12 03:49:41 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) |
2020-12-12 03:51:36 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2020-12-12 03:51:50 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 03:54:41 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
2020-12-12 03:55:00 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) |
2020-12-12 03:57:19 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Ping timeout: 260 seconds) |
2020-12-12 03:58:58 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
2020-12-12 03:59:04 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
2020-12-12 03:59:25 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) |
2020-12-12 03:59:53 +0100 | heatsink_ | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-12-12 04:02:26 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97) (Ping timeout: 264 seconds) |
2020-12-12 04:02:26 +0100 | chang | (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-12-12 04:02:28 +0100 | m0rphism | (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 260 seconds) |
2020-12-12 04:02:45 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:90a6:68cd:a3b5:c04d) (Remote host closed the connection) |
2020-12-12 04:04:20 +0100 | geowiesnot | (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 260 seconds) |
2020-12-12 04:05:25 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Ping timeout: 240 seconds) |
2020-12-12 04:12:21 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
2020-12-12 04:12:44 +0100 | filwisher | (~filwisher@78.141.201.45) (Ping timeout: 260 seconds) |
2020-12-12 04:13:12 +0100 | Cthalupa | (~cthulhu@47.186.47.75) (Ping timeout: 260 seconds) |
2020-12-12 04:14:17 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) |
2020-12-12 04:14:22 +0100 | Cthalupa | (~cthulhu@47.186.47.75) |
2020-12-12 04:16:38 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
2020-12-12 04:16:58 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
2020-12-12 04:17:52 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Ping timeout: 246 seconds) |
2020-12-12 04:18:25 +0100 | filwisher | (~filwisher@78.141.201.45) |
2020-12-12 04:18:34 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 246 seconds) |
2020-12-12 04:19:21 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 04:21:55 +0100 | Vulfe | (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) |
2020-12-12 04:24:00 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
2020-12-12 04:24:20 +0100 | matryoshka | (~matryoshk@184.75.223.227) |
2020-12-12 04:24:45 +0100 | coot | (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
2020-12-12 04:25:16 +0100 | theDon | (~td@muedsl-82-207-238-169.citykom.de) (Ping timeout: 240 seconds) |
2020-12-12 04:25:18 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
2020-12-12 04:25:25 +0100 | machinedgod | (~machinedg@24.105.81.50) (Ping timeout: 240 seconds) |
2020-12-12 04:27:24 +0100 | xirhtogal | (~lagothrix@unaffiliated/lagothrix) |
2020-12-12 04:27:24 +0100 | lagothrix | Guest78754 |
2020-12-12 04:27:24 +0100 | Guest78754 | (~lagothrix@unaffiliated/lagothrix) (Killed (hitchcock.freenode.net (Nickname regained by services))) |
2020-12-12 04:27:24 +0100 | xirhtogal | lagothrix |
2020-12-12 04:27:29 +0100 | theDon | (~td@94.134.91.51) |
2020-12-12 04:29:24 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
2020-12-12 04:30:48 +0100 | nowhere_man | (~pierre@2a01:e0a:3c7:60d0:e88f:4e24:f6a7:f155) |
2020-12-12 04:30:56 +0100 | MOSCOS | (~MOSCOS@122.54.107.175) (Remote host closed the connection) |
2020-12-12 04:31:24 +0100 | MOSCOS | (~MOSCOS@122.54.107.175) |
2020-12-12 04:34:56 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-12-12 04:35:46 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 04:36:34 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-12-12 04:37:53 +0100 | matryoshka | (~matryoshk@184.75.223.227) (Quit: ZNC 1.8.2 - https://znc.in) |
2020-12-12 04:38:17 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
2020-12-12 04:43:56 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 240 seconds) |
2020-12-12 04:45:17 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 04:47:39 +0100 | Kronic | (~Kronic___@84.203.98.133) (Quit: Leaving) |
2020-12-12 04:49:32 +0100 | fiddlerwoaroof | (~fiddlerwo@unaffiliated/fiddlerwoaroof) (Quit: Gone.) |
2020-12-12 04:49:43 +0100 | nitrix | (~nitrix@haskell/developer/nitrix) (Quit: Genius is one percent inspiration and ninety-nine percent perspiration) |
2020-12-12 04:50:02 +0100 | fiddlerwoaroof | (~fiddlerwo@unaffiliated/fiddlerwoaroof) |
2020-12-12 04:51:27 +0100 | Sheilong | (uid293653@gateway/web/irccloud.com/x-zbtjtxhgvedwatkk) () |
2020-12-12 04:52:29 +0100 | pavonia | (~user@unaffiliated/siracusa) (Quit: Bye!) |
2020-12-12 04:53:16 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2020-12-12 04:53:59 +0100 | FreeBird_ | (~freebirdl@101.228.42.108) |
2020-12-12 04:55:18 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
2020-12-12 04:55:38 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
2020-12-12 04:56:14 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) (Ping timeout: 260 seconds) |
2020-12-12 04:56:15 +0100 | fiddlerwoaroof | (~fiddlerwo@unaffiliated/fiddlerwoaroof) (Quit: Gone.) |
2020-12-12 04:56:23 +0100 | nitrix | (~nitrix@haskell/developer/nitrix) |
2020-12-12 04:56:26 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 04:57:18 +0100 | fiddlerwoaroof | (~fiddlerwo@unaffiliated/fiddlerwoaroof) |
2020-12-12 04:58:06 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-12-12 04:58:46 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Client Quit) |
2020-12-12 04:59:04 +0100 | matryoshka | (~matryoshk@184.75.223.227) |
2020-12-12 04:59:49 +0100 | solonarv_ | (~solonarv@astrasbourg-157-1-27-135.w90-40.abo.wanadoo.fr) (Ping timeout: 258 seconds) |
2020-12-12 05:01:08 +0100 | fiddlerwoaroof | (~fiddlerwo@unaffiliated/fiddlerwoaroof) (Client Quit) |
2020-12-12 05:01:29 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) |
2020-12-12 05:01:37 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
2020-12-12 05:02:44 +0100 | fiddlerwoaroof | (~fiddlerwo@unaffiliated/fiddlerwoaroof) |
2020-12-12 05:03:01 +0100 | FreeBird_ | (~freebirdl@101.228.42.108) (Ping timeout: 246 seconds) |
2020-12-12 05:03:16 +0100 | coot | (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
2020-12-12 05:05:47 +0100 | Jeanne-Kamikaze | (~Jeanne-Ka@66.115.189.177) (Quit: Leaving) |
2020-12-12 05:12:08 +0100 | matryoshka | (~matryoshk@184.75.223.227) (Quit: ZNC 1.8.2 - https://znc.in) |
2020-12-12 05:12:21 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
2020-12-12 05:14:26 +0100 | polyrain | (~polyrain@58.161.132.217) |
2020-12-12 05:19:41 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
2020-12-12 05:20:51 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 05:23:49 +0100 | wei2912 | (~wei2912@unaffiliated/wei2912) |
2020-12-12 05:24:32 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
2020-12-12 05:25:36 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2020-12-12 05:26:22 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-12-12 05:27:33 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 05:29:23 +0100 | sgibber2018 | (~arch-gibb@208.85.237.137) |
2020-12-12 05:29:28 +0100 | rekahsoft | (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
2020-12-12 05:29:33 +0100 | sgibber2018 | (~arch-gibb@208.85.237.137) (Client Quit) |
2020-12-12 05:29:50 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-12-12 05:29:55 +0100 | sgibber2018 | (~arch-gibb@208.85.237.137) |
2020-12-12 05:30:15 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 05:30:18 +0100 | sgibber2018 | (~arch-gibb@208.85.237.137) (Client Quit) |
2020-12-12 05:30:43 +0100 | sgibber2018 | (~arch-gibb@208.85.237.137) |
2020-12-12 05:32:46 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
2020-12-12 05:33:45 +0100 | rekahsoft | (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 240 seconds) |
2020-12-12 05:36:42 +0100 | chang | (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
2020-12-12 05:38:43 +0100 | sgibber2018 | (~arch-gibb@208.85.237.137) (Quit: WeeChat 2.9) |
2020-12-12 05:40:12 +0100 | sakirious | (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) |
2020-12-12 05:43:27 +0100 | justanotheruser | (~justanoth@unaffiliated/justanotheruser) |
2020-12-12 05:44:11 +0100 | DirefulSalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
2020-12-12 05:45:47 +0100 | Vulfe | (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Remote host closed the connection) |
2020-12-12 05:51:46 +0100 | heatsink_ | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
2020-12-12 05:53:34 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 05:54:31 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:90a6:68cd:a3b5:c04d) |
2020-12-12 05:58:51 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:90a6:68cd:a3b5:c04d) (Ping timeout: 258 seconds) |
2020-12-12 06:03:54 +0100 | fiddlerwoaroof | (~fiddlerwo@unaffiliated/fiddlerwoaroof) (Quit: Gone.) |
2020-12-12 06:05:21 +0100 | berberman_ | (~berberman@unaffiliated/berberman) |
2020-12-12 06:05:58 +0100 | fiddlerwoaroof | (~fiddlerwo@unaffiliated/fiddlerwoaroof) |
2020-12-12 06:06:48 +0100 | Thoralf | (~Thoralf__@69.162.230.96) (Read error: Connection reset by peer) |
2020-12-12 06:09:04 +0100 | cr3 | (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving) |
2020-12-12 06:11:35 +0100 | zaquest | (~notzaques@5.128.210.178) |
2020-12-12 06:11:50 +0100 | FreeBird_ | (~freebirdl@101.228.42.108) |
2020-12-12 06:13:12 +0100 | zaquest | (~notzaques@5.128.210.178) (Remote host closed the connection) |
2020-12-12 06:13:25 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) (Ping timeout: 240 seconds) |
2020-12-12 06:16:04 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:90a6:68cd:a3b5:c04d) |
2020-12-12 06:18:54 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) |
2020-12-12 06:20:47 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:90a6:68cd:a3b5:c04d) (Ping timeout: 260 seconds) |
2020-12-12 06:21:28 +0100 | FreeBird_ | (~freebirdl@101.228.42.108) (Ping timeout: 258 seconds) |
2020-12-12 06:21:29 +0100 | SanchayanMaity | (~Sanchayan@223.226.34.150) |
2020-12-12 06:22:32 +0100 | superstar64 | (6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net) |
2020-12-12 06:22:48 +0100 | <superstar64> | are there any versions of the lambda calculus that don't have function application? |
2020-12-12 06:22:59 +0100 | <superstar64> | like a version that only has composition or something? |
2020-12-12 06:27:25 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2020-12-12 06:29:20 +0100 | plutonux | (~q@node-uk0.pool-125-24.dynamic.totinternet.net) |
2020-12-12 06:31:33 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-12-12 06:31:41 +0100 | klardotsh | (~klardotsh@c-71-231-242-112.hsd1.wa.comcast.net) (Quit: WeeChat 2.9) |
2020-12-12 06:32:29 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 06:32:35 +0100 | xiinotulp | (~q@node-uks.pool-125-24.dynamic.totinternet.net) (Ping timeout: 258 seconds) |
2020-12-12 06:32:40 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-12-12 06:34:39 +0100 | chang | (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-12-12 06:38:37 +0100 | Saukk | (~Saukk@2001:998:ec:944:a00f:6382:4f0:3e7e) |
2020-12-12 06:39:14 +0100 | klardotsh | (~klardotsh@c-71-231-242-112.hsd1.wa.comcast.net) |
2020-12-12 06:44:38 +0100 | <ski> | superstar64 : in a cartesian closed category, there is no application, per se (while there is composition). however, there's still an "application morphism" `app : (A -> B) * A >---> B' that plays the role of application |
2020-12-12 06:46:14 +0100 | dirediresalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
2020-12-12 06:46:14 +0100 | Tario | (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
2020-12-12 06:47:07 +0100 | Tario | (~Tario@201.192.165.173) |
2020-12-12 06:47:17 +0100 | polyrain | (~polyrain@58.161.132.217) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-12-12 06:47:47 +0100 | polyrain | (~polyrain@2001:8003:e501:6901:4d74:df70:9155:39bf) |
2020-12-12 06:48:13 +0100 | <ski> | if e.g. `add : Nat * Nat >---> Nat' so that `curry add : Nat >---> (Nat -> Nat)', then `<curry add,id> : Nat >---> (Nat -> Nat) * Nat' and `app . <curry add,id> : Nat >--> Nat' then expresses `\n -> n + n' |
2020-12-12 06:49:23 +0100 | DirefulSalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Ping timeout: 260 seconds) |
2020-12-12 06:51:49 +0100 | <ski> | (note that `curry add' is not application of `curry' to `add'. rather `curry f' is a special construct that converts from a morphism `f : A * B >---> C' to a morphism `curry f : A >---> (B -> C)'. another name for `curry f' is `lambda f'. compare with that if `..x..y.. :: C' depending on free variables `x :: A' and `y :: B', then `(\y -> ..x..y..) :: B -> C' depending on free variable `x :: A') |
2020-12-12 06:52:10 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97) |
2020-12-12 06:52:31 +0100 | polyrain | (~polyrain@2001:8003:e501:6901:4d74:df70:9155:39bf) (Ping timeout: 258 seconds) |
2020-12-12 06:52:46 +0100 | <superstar64> | right, i need to go back to learning category theory eventually |
2020-12-12 06:53:50 +0100 | <superstar64> | ski that kinda reminds me of `ArrowApply` |
2020-12-12 06:53:54 +0100 | <ski> | yes |
2020-12-12 06:53:57 +0100 | <ski> | @type app |
2020-12-12 06:53:59 +0100 | <lambdabot> | ArrowApply a => a (a b c, b) c |
2020-12-12 06:54:32 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 06:54:37 +0100 | <ski> | except that doesn't really distinguish between the type of morphisms (i wrote `>--->' above), and the type of exponential objects (i wrote `->') |
2020-12-12 06:55:36 +0100 | <ski> | one could, very roughly, say that category theory is an abstract theory of "first-order functions". morphisms can not take morphisms as "input", nor produce them as output |
2020-12-12 06:56:08 +0100 | <ski> | in a cartesian closed category, we can simulate higher-order morphisms, by using exponential objects, though |
2020-12-12 06:56:44 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:10df:3645:c218:97) (Ping timeout: 258 seconds) |
2020-12-12 06:57:18 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 06:57:28 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:90a6:68cd:a3b5:c04d) |
2020-12-12 06:57:39 +0100 | <superstar64> | something like this then right? `data Term = Variable String | Lambda String Term | Compose Term Term | App` |
2020-12-12 06:58:27 +0100 | <superstar64> | wait, do you need products for this? |
2020-12-12 06:58:37 +0100 | <ski> | `A >---> B' describes a *set* of morphisms, between the two objects `A' and `B' (in whatever category we're talking about). `A -> B', on the other hand, is an object, can be placed to the left and to the right of `>--->' |
2020-12-12 06:58:49 +0100 | <ski> | you need products in a cartesian closed category, yes |
2020-12-12 06:59:34 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
2020-12-12 06:59:54 +0100 | <ski> | "something like this then right?" -- is that supposed to represent categorical morphism terms in a cartesian closed category ? |
2020-12-12 07:00:25 +0100 | <superstar64> | i'm just curious about other types of lambda calculi that don't have native application |
2020-12-12 07:00:46 +0100 | <superstar64> | like, ski combinator calculi don't have native lambdas right? |
2020-12-12 07:01:39 +0100 | <ski> | right |
2020-12-12 07:02:06 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:90a6:68cd:a3b5:c04d) (Ping timeout: 258 seconds) |
2020-12-12 07:02:37 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 260 seconds) |
2020-12-12 07:03:12 +0100 | sgibber2018 | (~arch-gibb@208.85.237.137) |
2020-12-12 07:03:20 +0100 | <ski> | (although, i'd say SKI combinators do not form a calculus, since there's no bound/local variables. see <http://lambda-the-ultimate.org/node/533#comment-7712>) |
2020-12-12 07:04:22 +0100 | <superstar64> | what do i call it then? a turing machine? |
2020-12-12 07:04:25 +0100 | <ski> | i think most things people would call lambda calculi have application. either as a primitive, or at least as a macro-defined / derived construct |
2020-12-12 07:05:19 +0100 | <ski> | perhaps you could call it (SKI combinators) a "combinator/combinatory system" ? |
2020-12-12 07:05:45 +0100 | <superstar64> | wikipedia calls it a calculus https://en.wikipedia.org/wiki/SKI_combinator_calculus |
2020-12-12 07:06:02 +0100 | <ski> | i'm well aware |
2020-12-12 07:06:46 +0100 | <ski> | (Turing machines are something specific. SKI combinators are not a machine model of computation, they're a language model. see e.g. <http://existentialtype.wordpress.com/2011/03/16/languages-and-machines>) |
2020-12-12 07:06:57 +0100 | <superstar64> | some difference |
2020-12-12 07:06:59 +0100 | <superstar64> | *same |
2020-12-12 07:07:19 +0100 | <int-e> | . o O ( it's a pointless calculus ) |
2020-12-12 07:07:32 +0100 | <ski> | anyway, i think there's some continuation-based systems, which have lambda, but not a primitive application |
2020-12-12 07:08:16 +0100 | <int-e> | My real objection to SKI is that the only way I know to make use of it is through abstraction elimination... there's no intuition to it. |
2020-12-12 07:08:57 +0100 | Foritus | (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) (Read error: Connection reset by peer) |
2020-12-12 07:09:03 +0100 | <superstar64> | well, there's this https://en.wikipedia.org/wiki/B,_C,_K,_W_system |
2020-12-12 07:09:09 +0100 | <ski> | it's pretty ad hoc yes. (just like Hilbert-style axiomatic systems commonly are) |
2020-12-12 07:09:13 +0100 | <int-e> | Lambda calculus is pretty much directly programmable once you have a few primitives; abstraction + applicatiin gives you a 'let' binding. |
2020-12-12 07:09:50 +0100 | <superstar64> | int-e bckw might be more manageable |
2020-12-12 07:10:03 +0100 | urodna | (~urodna@unaffiliated/urodna) (Quit: urodna) |
2020-12-12 07:10:12 +0100 | <ski> | not really much better, i'd say |
2020-12-12 07:10:43 +0100 | <int-e> | superstar64: that really has the same issue, it still only makes sense (to me) through abstraction eliminiation. And the W is awkward. |
2020-12-12 07:10:46 +0100 | <int-e> | ymmv |
2020-12-12 07:11:18 +0100 | <int-e> | points -- that is, named values -- turn out to be important for understanding things. |
2020-12-12 07:12:09 +0100 | <ski> | i guess one should also mention concatenative languages, here .. |
2020-12-12 07:12:29 +0100 | <ski> | @where Charity |
2020-12-12 07:12:29 +0100 | <lambdabot> | http://pll.cpsc.ucalgary.ca/charity1/www/home.html |
2020-12-12 07:12:34 +0100 | <superstar64> | i mean you could augment the ski combinator calculus with let in |
2020-12-12 07:12:34 +0100 | <int-e> | Is anybody doing BCKS |
2020-12-12 07:12:46 +0100 | <ski> | superstar64 : ^ that's a language based on categorical composition |
2020-12-12 07:13:14 +0100 | <superstar64> | cool |
2020-12-12 07:13:52 +0100 | Tario | (~Tario@201.192.165.173) (Ping timeout: 272 seconds) |
2020-12-12 07:14:05 +0100 | Foritus | (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) |
2020-12-12 07:15:15 +0100 | <ski> | anyway, i guess you could avoid products, if you use multicategories rather than categories .. |
2020-12-12 07:15:31 +0100 | <superstar64> | what do stack languages use for as stack manipulation primatives? |
2020-12-12 07:15:58 +0100 | <superstar64> | how would it be to translate them bckw |
2020-12-12 07:16:48 +0100 | <ski> | stuff like `drop',`dup',`swap',`rot',&c. |
2020-12-12 07:17:21 +0100 | <superstar64> | i know nothing about concatenative languages |
2020-12-12 07:17:31 +0100 | <ski> | SKI and BCKW uses application, concatenative languages use composition (of stack-transformers) |
2020-12-12 07:19:04 +0100 | <superstar64> | well, it's easy to translate a bunch of compositions to bckw, it's the stack transformers that i'm curious about |
2020-12-12 07:19:08 +0100 | <ski> | `1 2 +' evaluates to `3'. `1 2 + 3 *' evaluates to `9'. `1 2 3 * +' evaluates to `7' (that's reverse polish notation, so far. doesn't need a concatenative explanation) |
2020-12-12 07:20:09 +0100 | <nfd> | hey, I'm sure there's some Traversable t => a -> t (a -> a) -> a that i'm just not thinking of that chains a value through a bunch of pure transformations, yeah? |
2020-12-12 07:20:28 +0100 | <nfd> | sitting around in the common library |
2020-12-12 07:20:36 +0100 | <superstar64> | right, i read about this before https://github.com/leonidas/codeblog/blob/master/2012/2012-02-17-concatenative-haskell.md |
2020-12-12 07:20:43 +0100 | <ski> | `3 dup *' evaluates to `9', `1 2 3 drop +' evaluates to `3', `1 2 3 4 + swap - +' evaluates to `6' |
2020-12-12 07:22:01 +0100 | <nfd> | i mean, i can just do this with simple recursion over the list, but something like that sounds really elegant |
2020-12-12 07:22:22 +0100 | <ski> | `+',`*',`-' takes the two top elements off the stack, performs the arithmetic operation, and pushes the result back on top of the stack. numerals like `1',`2',`3' pushes the corresponding number on top of the stack. `dup' copies/duplicates the top item. `drop' removes the top item. `swap' exchanges the order of the top two items |
2020-12-12 07:23:11 +0100 | nowhere_man | (~pierre@2a01:e0a:3c7:60d0:e88f:4e24:f6a7:f155) (Remote host closed the connection) |
2020-12-12 07:23:14 +0100 | <superstar64> | nfd, i think you want foldr or foldl for that |
2020-12-12 07:24:18 +0100 | <superstar64> | foldMap and Endo might work too |
2020-12-12 07:24:33 +0100 | <ski> | @type appEndo . foldMap Endo |
2020-12-12 07:24:35 +0100 | <lambdabot> | Foldable t => t (a -> a) -> a -> a |
2020-12-12 07:24:45 +0100 | <ski> | @type ala Endo foldMap |
2020-12-12 07:24:47 +0100 | <lambdabot> | Foldable t => t (b -> b) -> b -> b |
2020-12-12 07:24:50 +0100 | <superstar64> | ski, i know the extreme basics of concatnative languages, i've just never used them |
2020-12-12 07:25:06 +0100 | <ski> | ok |
2020-12-12 07:26:07 +0100 | <nfd> | thanks. I didn't want foldl because the function on the inside is unary |
2020-12-12 07:26:26 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) |
2020-12-12 07:26:33 +0100 | <ski> | @type foldr (.) id |
2020-12-12 07:26:36 +0100 | <lambdabot> | Foldable t => t (b -> b) -> b -> b |
2020-12-12 07:27:01 +0100 | <ski> | @type foldr ($) |
2020-12-12 07:27:03 +0100 | <lambdabot> | Foldable t => a -> t (a -> a) -> a |
2020-12-12 07:28:07 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:162:3ea3:dfa1:29af) |
2020-12-12 07:28:08 +0100 | <superstar64> | or `foldr id` to make it more confusing |
2020-12-12 07:28:35 +0100 | <ski> | superstar64 : anyway, i prefer using CPS to get "heterogenous stacks" |
2020-12-12 07:29:24 +0100 | <superstar64> | i'm not too familiar with CPS either |
2020-12-12 07:30:56 +0100 | <superstar64> | what would be a good use case for the Cont monad? |
2020-12-12 07:31:20 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) (Ping timeout: 256 seconds) |
2020-12-12 07:31:36 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 07:32:46 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:162:3ea3:dfa1:29af) (Ping timeout: 258 seconds) |
2020-12-12 07:32:55 +0100 | abhixec | (~abhixec@c-67-169-141-95.hsd1.ca.comcast.net) |
2020-12-12 07:34:59 +0100 | Gurkenglas_ | (~Gurkengla@unaffiliated/gurkenglas) |
2020-12-12 07:36:02 +0100 | christo | (~chris@81.96.113.213) |
2020-12-12 07:39:16 +0100 | abhixec | (~abhixec@c-67-169-141-95.hsd1.ca.comcast.net) (Ping timeout: 256 seconds) |
2020-12-12 07:39:59 +0100 | <c_wraith> | mostly it's good for confusing people |
2020-12-12 07:39:59 +0100 | rayyyy | (~nanoz@gateway/tor-sasl/nanoz) |
2020-12-12 07:40:08 +0100 | plutonux | (~q@node-uk0.pool-125-24.dynamic.totinternet.net) (Quit: Leaving) |
2020-12-12 07:40:28 +0100 | <superstar64> | always a good use case |
2020-12-12 07:41:36 +0100 | <c_wraith> | you can find some literature on using it to linearize control in with-style functions, but it turns out somewhat simpler things like Codensity can solve the same problem with fewer opportunities for bugs |
2020-12-12 07:41:39 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
2020-12-12 07:42:40 +0100 | sunetoft | (~sunetoft@s91904426.blix.com) (Remote host closed the connection) |
2020-12-12 07:43:37 +0100 | <ski> | > let run f = f id; push x k = k x; dup k x = k x x; drop k _ = k; swap k y x = k x y; uop f k x = k (f x); bop f k y x = k (f x y) in run (push 1 . push 2 . dup . uop succ . push 4 . bop (+) . swap . bop (-) . bop (+)) |
2020-12-12 07:43:40 +0100 | <lambdabot> | 6 |
2020-12-12 07:46:02 +0100 | <monochrom> | http://www.vex.net/~trebla/haskell/cont.xhtml |
2020-12-12 07:49:03 +0100 | Lowl3v3l1 | (~Lowl3v3l@dslb-002-203-233-025.002.203.pools.vodafone-ip.de) |
2020-12-12 07:49:21 +0100 | Lowl3v3l1 | (~Lowl3v3l@dslb-002-203-233-025.002.203.pools.vodafone-ip.de) () |
2020-12-12 07:49:28 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:162:3ea3:dfa1:29af) |
2020-12-12 07:49:34 +0100 | <ski> | @where Backus |
2020-12-12 07:49:34 +0100 | <lambdabot> | "Can Programming Be Liberated from the von Neumann Style?: A Functional Style and Its Algebra of Programs" (Turing Award lecture) by John Warner Backus in 1977-10-17 at <https://amturing.acm.org/ |
2020-12-12 07:49:34 +0100 | <lambdabot> | award_winners/backus_0703524.cfm>,<http://www.thocp.net/biographies/papers/backus_turingaward_lecture.pdf> |
2020-12-12 07:51:33 +0100 | Lowl3v3l | (~Lowl3v3l@2001:638:1558:99f8::1) (Ping timeout: 258 seconds) |
2020-12-12 07:51:50 +0100 | <superstar64> | `(\k -> k 1) . (\k -> k 2) :: (Num t1, Num t2) => (t2 -> t1 -> c) -> c` |
2020-12-12 07:51:57 +0100 | <superstar64> | feels like semantic editor combinators |
2020-12-12 07:52:06 +0100 | brodie | (~brodie@207.53.253.137) (Quit: brodie) |
2020-12-12 07:53:13 +0100 | BusError1 | (~BusError@84.39.117.57) |
2020-12-12 07:53:29 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:f583:3a4a:33e8:d9b1) |
2020-12-12 07:53:53 +0100 | nineonin_ | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 07:53:56 +0100 | argento | (~argent0@168.227.97.34) (Quit: leaving) |
2020-12-12 07:54:07 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:162:3ea3:dfa1:29af) (Ping timeout: 260 seconds) |
2020-12-12 07:56:30 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2020-12-12 07:57:25 +0100 | nineonine | (~nineonine@50.216.62.2) (Ping timeout: 240 seconds) |
2020-12-12 07:58:04 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:f583:3a4a:33e8:d9b1) (Ping timeout: 258 seconds) |
2020-12-12 07:58:53 +0100 | jamm | (~jamm@unaffiliated/jamm) |
2020-12-12 08:00:44 +0100 | <ski> | (iirc, i worked out the above CPS representation of concatenative in Haskell, maybe fifteen years ago, or thereabouts ..) |
2020-12-12 08:01:04 +0100 | nineonin_ | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection) |
2020-12-12 08:01:55 +0100 | <superstar64> | jeez, that's a long time ago |
2020-12-12 08:02:09 +0100 | polyrain | (~polyrain@2001:8003:e501:6901:4d74:df70:9155:39bf) |
2020-12-12 08:03:08 +0100 | <int-e> | > let begin n = n id; end = id; run = ($ id); push c v n = n (c . (\k -> k v)); pop c n = n (c . (\k _ -> k)); uop c f n = n (c . (\k x -> k (f x))); bop c f n = n (c . (\k y x -> k (f x y))); swap c n = n (c . (\k x y -> k y x)) in run $ begin push 4 push 2 push 3 bop (*) uop succ swap bop (-) end |
2020-12-12 08:03:11 +0100 | <lambdabot> | 3 |
2020-12-12 08:06:01 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
2020-12-12 08:06:30 +0100 | <shachaf> | "Codensity is simpler than Cont" is, I guess, an argument you could make. |
2020-12-12 08:07:12 +0100 | <ski> | int-e : istr seeing some version of that, before |
2020-12-12 08:07:41 +0100 | <ski> | (maybe a paper or a blag) |
2020-12-12 08:07:51 +0100 | <int-e> | ski: yeah it has come up before... but I felt an urge to to reconstruct it |
2020-12-12 08:08:15 +0100 | <shachaf> | I feel like I saw a version without the pushes, but if it was just using Num instances I'm not sure how it would make (*) work as well. |
2020-12-12 08:08:30 +0100 | <shachaf> | Maybe it just called it mul or something. Or maybe I'm just making things up. |
2020-12-12 08:08:58 +0100 | geowiesnot | (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 272 seconds) |
2020-12-12 08:09:04 +0100 | <int-e> | > let begin n = n []; end [v] = v; push xs x n = n (x : xs); pop (_ : xs) n = n xs; uop (x : xs) f n = n (f x : xs); bop (y : x : xs) f n = n (f x y : xs); swap (x : y : xs) n = n (y : x : xs) in begin push 4 push 2 push 3 bop (*) uop succ swap bop (-) end |
2020-12-12 08:09:07 +0100 | <lambdabot> | 3 |
2020-12-12 08:09:20 +0100 | cads | (~cads@ip-64-72-99-232.lasvegas.net) |
2020-12-12 08:09:25 +0100 | <int-e> | I think that's closer to the original version. |
2020-12-12 08:10:07 +0100 | <ski> | being the one in the blag superstar64 linked to ? |
2020-12-12 08:10:13 +0100 | <int-e> | And in any case, this version is easier to understand. |
2020-12-12 08:11:05 +0100 | <int-e> | ski: I don't know, didn't look |
2020-12-12 08:11:28 +0100 | <ski> | > let begin n = n (); end (v,()) = v; push xs x n = n (x,xs); pop (_,xs) n = n xs; uop (x,xs) f n = n (f x,xs); bop (y,(x,xs)) f n = n (f x y,xs); swap (x,(y,xs)) n = n (y,(x,xs)) in begin push 4 push 2 push 3 bop (*) uop succ swap bop (-) end |
2020-12-12 08:11:30 +0100 | <lambdabot> | 3 |
2020-12-12 08:11:42 +0100 | <int-e> | "original" being something I've toyed with before, probably after seeing it elsewhere. |
2020-12-12 08:11:52 +0100 | <ski> | ok |
2020-12-12 08:11:57 +0100 | <superstar64> | ski, are `drop`, `dup`, and `swap` enough to create any permutation the stack? |
2020-12-12 08:12:03 +0100 | <ski> | no |
2020-12-12 08:12:05 +0100 | <int-e> | ah. tuples for type-checking. right. |
2020-12-12 08:12:30 +0100 | <ski> | you'd need `dip' or something like that |
2020-12-12 08:12:59 +0100 | <shachaf> | Is there an analogy to BCKW? |
2020-12-12 08:12:59 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 08:13:03 +0100 | <superstar64> | it would be nice if i could make this complete https://gist.github.com/Superstar64/d9262b493da18c32839167ad78247341 |
2020-12-12 08:13:31 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) (Remote host closed the connection) |
2020-12-12 08:13:46 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) |
2020-12-12 08:14:16 +0100 | <int-e> | . o O ( "assumtion" is a typo ) |
2020-12-12 08:14:41 +0100 | <superstar64> | i can't spell |
2020-12-12 08:16:37 +0100 | <superstar64> | i have a half complete c++ version too |
2020-12-12 08:17:51 +0100 | <superstar64> | ski, what's `dip`? |
2020-12-12 08:18:04 +0100 | <ski> | superstar64 : `dip' temporarily "lifts" up an element from the stack, and applies a word to the stack underneath it (then puts the lifted element back on top) |
2020-12-12 08:19:03 +0100 | <ski> | it's a higher-order word. you need to push the word you want to apply, to the top of the stack (Factor calls this a "quotation". see e.g. <https://docs.factorcode.org/content/word-dip%2Ckernel.html>) |
2020-12-12 08:19:06 +0100 | <shachaf> | I mean, CKW are certainly similar to swap/drop/dup. |
2020-12-12 08:19:50 +0100 | <ski> | (quotations makes the concatenative model deviate from a plain linear composition of words, adding nesting to it) |
2020-12-12 08:20:15 +0100 | hiroaki | (~hiroaki@2a02:908:4b1b:20a0::6874) (Ping timeout: 272 seconds) |
2020-12-12 08:20:31 +0100 | pfurla | (~pfurla@216.151.180.196) (Ping timeout: 265 seconds) |
2020-12-12 08:21:38 +0100 | polyrain | (~polyrain@2001:8003:e501:6901:4d74:df70:9155:39bf) (Ping timeout: 264 seconds) |
2020-12-12 08:22:35 +0100 | <int-e> | superstar64: How about a constructor PushAssm :: (Logic g a -> Logic h b) -> Logic (x ': g) a -> Logic (x ': h) |
2020-12-12 08:22:43 +0100 | <int-e> | ... b |
2020-12-12 08:23:08 +0100 | pfurla | (~pfurla@ool-182ed2e2.dyn.optonline.net) |
2020-12-12 08:23:16 +0100 | <superstar64> | what does that do? |
2020-12-12 08:23:28 +0100 | <int-e> | superstar64: then you can push swaps to any desired depth in the stack. Look at PushAssm (PushAssm ExchangeSwap) |
2020-12-12 08:24:20 +0100 | <int-e> | (same for contractions and weakenings) |
2020-12-12 08:24:49 +0100 | MarcelineVQ | (~anja@198.254.202.72) (Ping timeout: 264 seconds) |
2020-12-12 08:25:02 +0100 | <superstar64> | i'm just trying to picture that the typing rule would look like for `PushAssm` |
2020-12-12 08:25:23 +0100 | <ski> | > let run f = f id; push x k = k x; dip k w x = w (k x); swap k y x = k x y; cons k xs x = k (x:xs) in run (push 1 . push 2 . push 3 . push 4 . swap . push [] . cons . cons . cons . cons) |
2020-12-12 08:25:26 +0100 | <lambdabot> | [1,2,4,3] |
2020-12-12 08:25:28 +0100 | <ski> | > let run f = f id; push x k = k x; dip k w x = w (k x); swap k y x = k x y; cons k xs x = k (x:xs) in run (push 1 . push 2 . push 3 . push 4 . push swap . dip . push [] . cons . cons . cons . cons) |
2020-12-12 08:25:30 +0100 | <lambdabot> | [1,3,2,4] |
2020-12-12 08:25:32 +0100 | <ski> | > let run f = f id; push x k = k x; dip k w x = w (k x); swap k y x = k x y; cons k xs x = k (x:xs) in run (push 1 . push 2 . push 3 . push 4 . push (push swap . dip) . dip . push [] . cons . cons . cons . cons) |
2020-12-12 08:25:34 +0100 | <lambdabot> | [2,1,3,4] |
2020-12-12 08:26:00 +0100 | MarcelineVQ | (~anja@198.254.202.72) |
2020-12-12 08:26:24 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:6112:b849:59e3:f5a8) |
2020-12-12 08:27:39 +0100 | <ski> | (exercise : express `dip' in the pair-based formulation) |
2020-12-12 08:27:46 +0100 | <int-e> | superstar64: Oh right, it's not sound. Too bad |
2020-12-12 08:29:15 +0100 | <superstar64> | wait, isn't `dip` just `flip (.)`? |
2020-12-12 08:29:39 +0100 | <ski> | in my CPS formulation, yes |
2020-12-12 08:30:09 +0100 | <siraben> | ski: do you program in this pointfree way a lot? |
2020-12-12 08:30:21 +0100 | <ski> | .. not really |
2020-12-12 08:30:31 +0100 | <int-e> | it's a curiosity |
2020-12-12 08:30:40 +0100 | <siraben> | looks like forth at that point, heh |
2020-12-12 08:30:41 +0100 | <int-e> | it produces terrible type errors |
2020-12-12 08:30:55 +0100 | <ski> | siraben : yes, the point was to express concatenative programming |
2020-12-12 08:31:02 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:6112:b849:59e3:f5a8) (Ping timeout: 258 seconds) |
2020-12-12 08:32:02 +0100 | hiroaki | (~hiroaki@2a02:908:4b1b:20a0::7af8) |
2020-12-12 08:32:13 +0100 | cole-h | (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 260 seconds) |
2020-12-12 08:32:40 +0100 | <ski> | (see backlog back to about one hour and a quarter of an hour, ago, at least) |
2020-12-12 08:35:06 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 08:36:07 +0100 | <ski> | superstar64 : s/Constraction/Contraction/ |
2020-12-12 08:36:19 +0100 | <superstar64> | i really can't spell |
2020-12-12 08:36:44 +0100 | <int-e> | siraben: hmm, but nothing is stopping you from doing ExchangeSwap :: Logic (delta :++ x ': y ': gamma) a -> Logic (delta :++ y ': x ': gamma) a directly (apart from interfering with type inference) |
2020-12-12 08:38:34 +0100 | Saukk | (~Saukk@2001:998:ec:944:a00f:6382:4f0:3e7e) (Remote host closed the connection) |
2020-12-12 08:38:39 +0100 | <superstar64> | int-e did you mean me? |
2020-12-12 08:39:19 +0100 | Aleyna | (~Aleyna@4e69b241.skybroadband.com) (Ping timeout: 246 seconds) |
2020-12-12 08:39:56 +0100 | boxscape | (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) |
2020-12-12 08:40:09 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2020-12-12 08:40:49 +0100 | <boxscape> | is there some smart (possibly lensy) way if you have a function (a -> a -> a) and two tuples (a, a) to basically zipWith them together? |
2020-12-12 08:41:00 +0100 | Tuplanolla | (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
2020-12-12 08:41:00 +0100 | <int-e> | superstar64: yes |
2020-12-12 08:43:14 +0100 | dnlkrgr | (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) |
2020-12-12 08:43:47 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:280e:dac8:70d3:26e) |
2020-12-12 08:44:02 +0100 | <superstar64> | boxscape `\f -> join bimap (uncurry f)` maybe? |
2020-12-12 08:44:53 +0100 | <koz_> | @pl \f -> join bimap (uncurry f) |
2020-12-12 08:44:53 +0100 | <lambdabot> | join bimap . uncurry |
2020-12-12 08:45:00 +0100 | <int-e> | :t curry . join (***) . uncurry |
2020-12-12 08:45:04 +0100 | <lambdabot> | (a -> b -> c) -> (a, b) -> (a, b) -> (c, c) |
2020-12-12 08:45:09 +0100 | <boxscape> | nice, thanks |
2020-12-12 08:45:13 +0100 | <int-e> | oh, wrong way... |
2020-12-12 08:45:18 +0100 | <boxscape> | oh |
2020-12-12 08:45:28 +0100 | <ski> | @type \f -> curry (join (***) (uncurry f) . ((fst *** fst) &&& (snd *** snd))) -- not terribly elegant .. |
2020-12-12 08:45:28 +0100 | <int-e> | :t join bimap . uncurry |
2020-12-12 08:45:30 +0100 | <lambdabot> | (a -> b -> c) -> (a, a) -> (b, b) -> (c, c) |
2020-12-12 08:45:30 +0100 | <lambdabot> | Bifunctor p => (a -> b -> c) -> p (a, b) (a, b) -> p c c |
2020-12-12 08:48:17 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:280e:dac8:70d3:26e) (Ping timeout: 258 seconds) |
2020-12-12 08:49:23 +0100 | polyphem | (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 272 seconds) |
2020-12-12 08:49:59 +0100 | olligobber | (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
2020-12-12 08:52:26 +0100 | <ski> | @type (uncurry (&&&) . (join (***) *** join (***))) (fst,snd) |
2020-12-12 08:52:28 +0100 | <lambdabot> | ((a, b), (a, b)) -> ((a, a), (b, b)) |
2020-12-12 08:52:30 +0100 | <ski> | @type (uncurry (&&&) . join (***) (join (***))) (fst,snd) |
2020-12-12 08:52:32 +0100 | <lambdabot> | ((b, b), (b, b)) -> ((b, b), (b, b)) |
2020-12-12 08:52:48 +0100 | <ski> | @type (fst *** fst) &&& (snd *** snd) |
2020-12-12 08:52:50 +0100 | <lambdabot> | ((c, b1), (c', b2)) -> ((c, c'), (b1, b2)) |
2020-12-12 08:54:20 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:f583:3a4a:33e8:d9b1) |
2020-12-12 08:56:01 +0100 | <ski> | @type let diag x = (x,x); pap (f,g) (x,y) = (f x,g y) in \f x y -> diag f `pap` x `pap` y |
2020-12-12 08:56:03 +0100 | <lambdabot> | (t1 -> t2 -> b) -> (t1, t1) -> (t2, t2) -> (b, b) |
2020-12-12 08:56:05 +0100 | <ski> | @type let diag x = (x,x); pap (f,g) (x,y) = (f x,g y) in (pap .) . pap . diag |
2020-12-12 08:56:08 +0100 | <lambdabot> | (t1 -> t2 -> b) -> (t1, t1) -> (t2, t2) -> (b, b) |
2020-12-12 08:57:06 +0100 | <boxscape> | why pap? |
2020-12-12 08:57:13 +0100 | <ski> | "pair apply" |
2020-12-12 08:57:16 +0100 | <boxscape> | I see |
2020-12-12 08:57:34 +0100 | <superstar64> | unix level identifiers here |
2020-12-12 08:57:50 +0100 | justsomeguy | (~justsomeg@216.186.218.241) |
2020-12-12 08:57:50 +0100 | justsomeguy | (~justsomeg@216.186.218.241) (Changing host) |
2020-12-12 08:57:50 +0100 | justsomeguy | (~justsomeg@unaffiliated/--/x-3805311) |
2020-12-12 08:58:12 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 08:59:01 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:f583:3a4a:33e8:d9b1) (Ping timeout: 258 seconds) |
2020-12-12 08:59:07 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) |
2020-12-12 09:00:08 +0100 | argento | (~argent0@168.227.97.29) |
2020-12-12 09:01:44 +0100 | plutoniix | (~q@ppp-27-55-91-186.revip3.asianet.co.th) |
2020-12-12 09:02:56 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 240 seconds) |
2020-12-12 09:04:54 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:7431:bf69:c5fc:f139) |
2020-12-12 09:05:09 +0100 | dyeplexer | (~lol@unaffiliated/terpin) |
2020-12-12 09:08:26 +0100 | coot | (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
2020-12-12 09:09:22 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:7431:bf69:c5fc:f139) (Ping timeout: 260 seconds) |
2020-12-12 09:09:47 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 09:11:04 +0100 | Rudd0 | (~Rudd0@185.189.115.98) (Ping timeout: 256 seconds) |
2020-12-12 09:13:56 +0100 | argento | (~argent0@168.227.97.29) (Quit: leaving) |
2020-12-12 09:15:22 +0100 | justsomeguy | (~justsomeg@unaffiliated/--/x-3805311) (Read error: Connection reset by peer) |
2020-12-12 09:16:11 +0100 | justsomeguy | (~justsomeg@216.186.218.241) |
2020-12-12 09:16:11 +0100 | justsomeguy | (~justsomeg@216.186.218.241) (Changing host) |
2020-12-12 09:16:11 +0100 | justsomeguy | (~justsomeg@unaffiliated/--/x-3805311) |
2020-12-12 09:22:48 +0100 | Igloo | (~igloo@matrix.chaos.earth.li) (Ping timeout: 260 seconds) |
2020-12-12 09:24:23 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds) |
2020-12-12 09:26:03 +0100 | rayyyy | (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 240 seconds) |
2020-12-12 09:28:30 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) |
2020-12-12 09:30:43 +0100 | toorevitimirp | (~tooreviti@117.182.180.221) |
2020-12-12 09:31:12 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:648f:75d8:8e88:fb15) |
2020-12-12 09:32:31 +0100 | wonko7 | (~wonko7@2a01:e35:2ffb:7040:14a1:46f4:68f7:2133) |
2020-12-12 09:32:34 +0100 | SanchayanMaity | (~Sanchayan@223.226.34.150) (Quit: SanchayanMaity) |
2020-12-12 09:35:49 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:648f:75d8:8e88:fb15) (Ping timeout: 258 seconds) |
2020-12-12 09:36:55 +0100 | danvet | (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
2020-12-12 09:38:24 +0100 | rayyyy | (~nanoz@gateway/tor-sasl/nanoz) |
2020-12-12 09:39:27 +0100 | Boomerang | (~Boomerang@xd520f68c.cust.hiper.dk) |
2020-12-12 09:39:55 +0100 | howdoi | (uid224@gateway/web/irccloud.com/x-yhdmsladghejwjme) (Quit: Connection closed for inactivity) |
2020-12-12 09:45:31 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) (Remote host closed the connection) |
2020-12-12 09:45:53 +0100 | geowiesnot | (~user@87-89-181-157.abo.bbox.fr) |
2020-12-12 09:46:08 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) |
2020-12-12 09:47:08 +0100 | Aleyna | (~Aleyna@4e69b241.skybroadband.com) |
2020-12-12 09:50:54 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) (Ping timeout: 265 seconds) |
2020-12-12 09:52:58 +0100 | jamm | (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
2020-12-12 09:53:33 +0100 | christo | (~chris@81.96.113.213) (Remote host closed the connection) |
2020-12-12 09:54:08 +0100 | jamm | (~jamm@unaffiliated/jamm) |
2020-12-12 09:55:06 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:f583:3a4a:33e8:d9b1) |
2020-12-12 09:58:23 +0100 | Igloo | (~igloo@matrix.chaos.earth.li) |
2020-12-12 09:59:11 +0100 | o1lo01ol1o | (~o1lo01ol1@92.250.93.77) |
2020-12-12 09:59:26 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:f583:3a4a:33e8:d9b1) (Ping timeout: 264 seconds) |
2020-12-12 10:00:04 +0100 | ComaGrayce[m] | (commagrays@gateway/shell/matrix.org/x-wnllrsfagmchmmsu) (Quit: Idle for 30+ days) |
2020-12-12 10:00:07 +0100 | dominicusin[m] | (dominicusi@gateway/shell/matrix.org/x-cmzyfydfwudbfyjq) (Quit: Idle for 30+ days) |
2020-12-12 10:00:25 +0100 | geowiesnot | (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 240 seconds) |
2020-12-12 10:00:41 +0100 | boxscape | (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) (Quit: Connection closed) |
2020-12-12 10:00:51 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:70d3:cac2:13bd:e617) |
2020-12-12 10:02:17 +0100 | Vulfe_ | (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) |
2020-12-12 10:03:38 +0100 | kenran | (~kenran@mue-88-130-62-159.dsl.tropolys.de) |
2020-12-12 10:03:46 +0100 | o1lo01ol1o | (~o1lo01ol1@92.250.93.77) (Ping timeout: 256 seconds) |
2020-12-12 10:05:26 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:70d3:cac2:13bd:e617) (Ping timeout: 264 seconds) |
2020-12-12 10:06:36 +0100 | Vulfe_ | (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Ping timeout: 240 seconds) |
2020-12-12 10:06:46 +0100 | justsomeguy | (~justsomeg@unaffiliated/--/x-3805311) (Ping timeout: 272 seconds) |
2020-12-12 10:15:26 +0100 | superstar64 | (6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net) (Remote host closed the connection) |
2020-12-12 10:18:25 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2020-12-12 10:21:25 +0100 | geowiesnot | (~user@87-89-181-157.abo.bbox.fr) |
2020-12-12 10:26:46 +0100 | geowiesnot | (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 256 seconds) |
2020-12-12 10:32:05 +0100 | acidjnk_new | (~acidjnk@p200300d0c719ff439996fb92bd8d62ee.dip0.t-ipconnect.de) |
2020-12-12 10:40:14 +0100 | m0rphism | (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) |
2020-12-12 10:40:25 +0100 | _xor | (~xor@74.215.46.133) (Ping timeout: 246 seconds) |
2020-12-12 10:41:26 +0100 | bliminse | (~bliminse@host86-140-186-196.range86-140.btcentralplus.com) (Quit: leaving) |
2020-12-12 10:42:36 +0100 | _xor | (~xor@74.215.46.133) |
2020-12-12 10:43:06 +0100 | mputz | (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
2020-12-12 10:51:45 +0100 | cyphase | (~cyphase@unaffiliated/cyphase) (Ping timeout: 240 seconds) |
2020-12-12 10:52:16 +0100 | hlysig | (~hlysig@mobile-194-144-46-247.3G.internet.is) (Ping timeout: 240 seconds) |
2020-12-12 10:52:39 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 10:52:53 +0100 | neiluj | (~jco@91-167-203-101.subs.proxad.net) |
2020-12-12 10:55:45 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:5852:737a:bf84:ad99) |
2020-12-12 10:58:03 +0100 | codedmart | (~codedmart@149.28.9.205) (Quit: ZNC 1.7.5 - https://znc.in) |
2020-12-12 10:58:18 +0100 | codedmart | (~codedmart@149.28.9.205) |
2020-12-12 10:58:59 +0100 | _xor | (~xor@74.215.46.133) (Read error: Connection reset by peer) |
2020-12-12 10:59:21 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 10:59:43 +0100 | _xor | (~xor@74.215.46.133) |
2020-12-12 11:00:12 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:5852:737a:bf84:ad99) (Ping timeout: 260 seconds) |
2020-12-12 11:03:31 +0100 | keltono | (~keltono@x-160-94-179-178.acm.umn.edu) (Ping timeout: 246 seconds) |
2020-12-12 11:04:15 +0100 | Rudd0 | (~Rudd0@185.189.115.108) |
2020-12-12 11:05:20 +0100 | Boomerang | (~Boomerang@xd520f68c.cust.hiper.dk) (Quit: Leaving) |
2020-12-12 11:06:11 +0100 | keltono | (~keltono@x-160-94-179-178.acm.umn.edu) |
2020-12-12 11:09:38 +0100 | bitmagie | (~Thunderbi@200116b806732a00352e66f69926ee2c.dip.versatel-1u1.de) |
2020-12-12 11:09:58 +0100 | boxscape | (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) |
2020-12-12 11:10:03 +0100 | raichoo | (~raichoo@dslb-188-100-007-024.188.100.pools.vodafone-ip.de) |
2020-12-12 11:10:44 +0100 | <boxscape> | % [True, False] ^?! (to . map) (intToDigit . fromEnum) . binary |
2020-12-12 11:10:44 +0100 | <yahb> | boxscape: 2 |
2020-12-12 11:10:55 +0100 | <boxscape> | is there a more lensy function to use here than `to . map`? |
2020-12-12 11:12:02 +0100 | bitmagie | (~Thunderbi@200116b806732a00352e66f69926ee2c.dip.versatel-1u1.de) (Client Quit) |
2020-12-12 11:12:04 +0100 | Tops2 | (~Tobias@dyndsl-095-033-025-077.ewe-ip-backbone.de) |
2020-12-12 11:14:02 +0100 | bitmagie | (~Thunderbi@200116b806732a00352e66f69926ee2c.dip.versatel-1u1.de) |
2020-12-12 11:14:39 +0100 | LKoen | (~LKoen@214.175.9.109.rev.sfr.net) |
2020-12-12 11:15:49 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 264 seconds) |
2020-12-12 11:16:09 +0100 | bliminse | (~bliminse@host86-140-186-196.range86-140.btcentralplus.com) |
2020-12-12 11:17:04 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 11:18:36 +0100 | Codaraxis_ | (Codaraxis@gateway/vpn/mullvad/codaraxis) |
2020-12-12 11:20:10 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:744b:1304:691e:6e97) |
2020-12-12 11:20:34 +0100 | son0p | (~son0p@181.58.39.182) |
2020-12-12 11:21:37 +0100 | fresheyeball | (~isaac@ec2-35-155-97-88.us-west-2.compute.amazonaws.com) (Ping timeout: 258 seconds) |
2020-12-12 11:22:22 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds) |
2020-12-12 11:22:46 +0100 | Codaraxis__ | (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) (Ping timeout: 258 seconds) |
2020-12-12 11:23:40 +0100 | fresheyeball | (~isaac@c-71-237-105-37.hsd1.co.comcast.net) |
2020-12-12 11:24:38 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:744b:1304:691e:6e97) (Ping timeout: 264 seconds) |
2020-12-12 11:25:47 +0100 | plutoniix | (~q@ppp-27-55-91-186.revip3.asianet.co.th) (Quit: Leaving) |
2020-12-12 11:26:36 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
2020-12-12 11:27:34 +0100 | <boxscape> | % ([True, False] & each %~ intToDigit . fromEnum) ^?! binary |
2020-12-12 11:27:35 +0100 | <yahb> | boxscape: 2 |
2020-12-12 11:27:39 +0100 | <boxscape> | I suppose you can do that |
2020-12-12 11:30:26 +0100 | gentauro | (~gentauro@unaffiliated/gentauro) (Ping timeout: 258 seconds) |
2020-12-12 11:32:32 +0100 | Sgeo | (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer) |
2020-12-12 11:38:34 +0100 | knupfer | (~Thunderbi@200116b82c539b00206a0afffea30188.dip.versatel-1u1.de) |
2020-12-12 11:39:20 +0100 | knupfer | (~Thunderbi@200116b82c539b00206a0afffea30188.dip.versatel-1u1.de) (Remote host closed the connection) |
2020-12-12 11:39:33 +0100 | knupfer | (~Thunderbi@200116b82c539b002c2009fe07c95185.dip.versatel-1u1.de) |
2020-12-12 11:41:22 +0100 | bitmagie | (~Thunderbi@200116b806732a00352e66f69926ee2c.dip.versatel-1u1.de) (Quit: bitmagie) |
2020-12-12 11:42:16 +0100 | gentauro | (~gentauro@unaffiliated/gentauro) |
2020-12-12 11:47:30 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 11:47:46 +0100 | nomeata | (~jojo@dslb-084-056-082-238.084.056.pools.vodafone-ip.de) |
2020-12-12 11:52:25 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 264 seconds) |
2020-12-12 11:52:40 +0100 | rprije | (~rprije@14-201-170-17.tpgi.com.au) (Ping timeout: 258 seconds) |
2020-12-12 11:53:43 +0100 | justsomeguy | (~justsomeg@unaffiliated/--/x-3805311) |
2020-12-12 11:54:05 +0100 | Ariakenom | (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se) |
2020-12-12 11:55:10 +0100 | <iqubic> | This is really screwing with me. |
2020-12-12 11:56:20 +0100 | mputz | (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 272 seconds) |
2020-12-12 11:56:28 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:7900:2404:7a95:fd58) |
2020-12-12 11:56:30 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 11:58:05 +0100 | <boxscape> | iqubic are you talking about what I wrote or something else? |
2020-12-12 11:58:47 +0100 | <iqubic> | I don't like how you are doing [Bool] -> Int via Binary and lenses. It irks me. |
2020-12-12 11:59:39 +0100 | <boxscape> | Yeah it'd probably make more sense to use `foldl' (\acc x -> acc * 2 + fromEnum x) 0` |
2020-12-12 12:00:08 +0100 | <iqubic> | as day 5 of this year's Advent of Code tells me, that's also much faster. |
2020-12-12 12:00:15 +0100 | <boxscape> | interesting |
2020-12-12 12:00:27 +0100 | <iqubic> | The binary prism really takes a large chunk of time to run. |
2020-12-12 12:00:28 +0100 | <int-e> | > foldl' (\a d -> a*2 + fromIntegral (fromEnum d)) 0 [True, False] |
2020-12-12 12:00:35 +0100 | <lambdabot> | 2 |
2020-12-12 12:01:06 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:7900:2404:7a95:fd58) (Ping timeout: 258 seconds) |
2020-12-12 12:01:42 +0100 | <int-e> | Oh, it's converting to a string and then reading as a binary number? eww. |
2020-12-12 12:01:52 +0100 | <iqubic> | int-e: Yes it is. |
2020-12-12 12:02:02 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2020-12-12 12:02:11 +0100 | <int-e> | I wrote no code for day 5. |
2020-12-12 12:02:13 +0100 | <iqubic> | :t intToDigit |
2020-12-12 12:02:15 +0100 | <lambdabot> | Int -> Char |
2020-12-12 12:02:59 +0100 | <boxscape> | actually kind of strange that binary doesn't work for text and such |
2020-12-12 12:03:03 +0100 | <boxscape> | s/text/Text |
2020-12-12 12:03:09 +0100 | <int-e> | (And I'm not convinced I would have been faster if I had.) |
2020-12-12 12:03:35 +0100 | <int-e> | :t binary |
2020-12-12 12:03:37 +0100 | <lambdabot> | (Integral a, Choice p, Applicative f) => p a (f a) -> p String (f String) |
2020-12-12 12:04:41 +0100 | <iqubic> | For each Bool in the list, turn it into a Int with fromEnum and then turn each Int into a Char with intToDigit. Then run the slow (comparatively) binary prism. |
2020-12-12 12:05:32 +0100 | knupfer | (~Thunderbi@200116b82c539b002c2009fe07c95185.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
2020-12-12 12:07:52 +0100 | quantumvatican | (~private@lfbn-idf2-1-504-211.w86-246.abo.wanadoo.fr) |
2020-12-12 12:09:21 +0100 | hnOsmium0001 | (uid453710@gateway/web/irccloud.com/x-sljyysfpgmayjhiw) (Quit: Connection closed for inactivity) |
2020-12-12 12:21:33 +0100 | jamm | (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
2020-12-12 12:22:21 +0100 | jamm | (~jamm@unaffiliated/jamm) |
2020-12-12 12:26:47 +0100 | jamm | (~jamm@unaffiliated/jamm) (Ping timeout: 258 seconds) |
2020-12-12 12:29:04 +0100 | geowiesnot | (~user@87-89-181-157.abo.bbox.fr) |
2020-12-12 12:31:22 +0100 | <iqubic> | composeAll :: [a -> a] -> a -> a |
2020-12-12 12:31:25 +0100 | <iqubic> | composeAll fs x = foldl' (\x f -> f x) x fs |
2020-12-12 12:31:40 +0100 | <iqubic> | This is my favorite function that I've written in a long while. |
2020-12-12 12:32:47 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Read error: Connection reset by peer) |
2020-12-12 12:32:59 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 12:33:19 +0100 | <iqubic> | I can't simply do "appEndo . foldMap Endo" because that does a foldr and gets the order of the composition all wrong. I'd have to reverse my list first to get that to work. |
2020-12-12 12:33:19 +0100 | o1lo01ol1o | (~o1lo01ol1@188.140.12.65) |
2020-12-12 12:34:00 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
2020-12-12 12:34:20 +0100 | <boxscape> | I was about to suggest `ala Endo foldMap` but I suppose that's the same thing |
2020-12-12 12:37:00 +0100 | <iqubic> | boxscape: but that will turn "[f, g, h]" into "f . g . h", which is the wrong way around. I need "h . g . f" |
2020-12-12 12:37:35 +0100 | <boxscape> | iqubic right, I meant it's the same as what you said wouldn't work |
2020-12-12 12:37:39 +0100 | <boxscape> | % :t \fs x -> foldl' (&) x fs |
2020-12-12 12:37:40 +0100 | <yahb> | boxscape: Foldable t => t (a -> a) -> a -> a |
2020-12-12 12:37:41 +0100 | <boxscape> | this would work though |
2020-12-12 12:38:36 +0100 | o1lo01ol1o | (~o1lo01ol1@188.140.12.65) (Ping timeout: 240 seconds) |
2020-12-12 12:39:08 +0100 | <iqubic> | It might. |
2020-12-12 12:39:39 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:9562:4afc:5ab:31a9) |
2020-12-12 12:39:43 +0100 | <iqubic> | What does (&) do? |
2020-12-12 12:40:02 +0100 | <iqubic> | :t (&) |
2020-12-12 12:40:06 +0100 | <lambdabot> | a -> (a -> b) -> b |
2020-12-12 12:40:12 +0100 | <iqubic> | Ah. I see. |
2020-12-12 12:40:12 +0100 | <boxscape> | it's just `flip ($)` |
2020-12-12 12:40:36 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-12-12 12:41:37 +0100 | boxscape | (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) (Quit: Connection closed) |
2020-12-12 12:41:47 +0100 | boxscape | (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) |
2020-12-12 12:42:10 +0100 | <iqubic> | \fs x -> foldl' (&) x fs works. |
2020-12-12 12:42:55 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Ping timeout: 246 seconds) |
2020-12-12 12:43:24 +0100 | <iqubic> | This is similar to traversing over a container full of state actions, except that I don't care about any intermediate results. |
2020-12-12 12:44:26 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:9562:4afc:5ab:31a9) (Ping timeout: 264 seconds) |
2020-12-12 12:45:44 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds) |
2020-12-12 12:45:59 +0100 | <iqubic> | I have used Haskell for so long that just making a container full of functions, and then composing them all to get one final function was just the first thing I thought of when seeing today's Advent Of Code puzzle. |
2020-12-12 12:46:59 +0100 | jespada | (~jespada@90.254.245.49) (Quit: Sleeping) |
2020-12-12 12:49:29 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) |
2020-12-12 12:51:03 +0100 | <aplainzetakind> | Can I define typeclass constraint synonyms? |
2020-12-12 12:52:09 +0100 | <boxscape> | % type MyConstraint a = (Show a, Eq a) -- like this aplainzetakind? |
2020-12-12 12:52:09 +0100 | <yahb> | boxscape: |
2020-12-12 12:52:44 +0100 | <aplainzetakind> | If that works, exactly. |
2020-12-12 12:52:46 +0100 | <aplainzetakind> | Thanks. |
2020-12-12 12:52:57 +0100 | <int-e> | iqubic: I saw that the state had four scalars and refrained from that kind of foolishness :P |
2020-12-12 12:53:02 +0100 | JuanMiguel | (~juanmi@50.red-83-55-69.dynamicip.rima-tde.net) |
2020-12-12 12:53:11 +0100 | jamm | (~jamm@unaffiliated/jamm) |
2020-12-12 12:53:16 +0100 | <iqubic> | what kind of foolishness? |
2020-12-12 12:53:22 +0100 | JuanMiguel | (~juanmi@50.red-83-55-69.dynamicip.rima-tde.net) (Client Quit) |
2020-12-12 12:53:31 +0100 | <int-e> | composing a ton of functions |
2020-12-12 12:55:08 +0100 | <iqubic> | Right. That kind of foolishness isn't too slow though. In fact, it's quite fast. |
2020-12-12 12:55:51 +0100 | <int-e> | I'm not worried about speed of the resulting code here. I'm worried about overloading my puny brain :P |
2020-12-12 12:56:57 +0100 | rayyyy | (~nanoz@gateway/tor-sasl/nanoz) (Remote host closed the connection) |
2020-12-12 12:57:27 +0100 | BusError1 | (~BusError@84.39.117.57) (Remote host closed the connection) |
2020-12-12 12:57:29 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
2020-12-12 12:57:59 +0100 | <iqubic> | Ah. I see. To me, this is just the simplest way to deal with tons of stateful actions in a row in haskell |
2020-12-12 13:01:05 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
2020-12-12 13:01:06 +0100 | <pja> | Q: Is foldl strict in current ghc? I vaguely remember some discussion about switching it over. |
2020-12-12 13:02:02 +0100 | heatsink | (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
2020-12-12 13:02:11 +0100 | <iqubic> | pja: foldl is not strict. foldl' (note the appostrophe) is strict. Note that you might have to import it from Data.Foldable. |
2020-12-12 13:02:15 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:4196:bf01:8b7b:2503) |
2020-12-12 13:02:24 +0100 | <enikar> | R: Use foldl' instead. |
2020-12-12 13:06:01 +0100 | <boxscape> | hm apparently the definition of foldl in base is `foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z`, interesting |
2020-12-12 13:06:23 +0100 | <iqubic> | That is? Why!?! |
2020-12-12 13:06:39 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:4196:bf01:8b7b:2503) (Ping timeout: 258 seconds) |
2020-12-12 13:06:42 +0100 | <iqubic> | Why not just use the more standard recursive apporoach of: |
2020-12-12 13:06:45 +0100 | <int-e> | :t appEndo . foldMap Endo |
2020-12-12 13:06:47 +0100 | <lambdabot> | Foldable t => t (a -> a) -> a -> a |
2020-12-12 13:06:54 +0100 | <iqubic> | foldl _ [] = [] |
2020-12-12 13:07:04 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
2020-12-12 13:07:15 +0100 | <iqubic> | foldl f (x:xs) = f x : foldl f xs |
2020-12-12 13:07:24 +0100 | <boxscape> | because that's only for lists |
2020-12-12 13:07:29 +0100 | <iqubic> | Right. I see. |
2020-12-12 13:08:22 +0100 | <boxscape> | that also looks like foldr to me? |
2020-12-12 13:08:24 +0100 | <boxscape> | @src foldr |
2020-12-12 13:08:24 +0100 | <lambdabot> | foldr f z [] = z |
2020-12-12 13:08:24 +0100 | <lambdabot> | foldr f z (x:xs) = f x (foldr f z xs) |
2020-12-12 13:08:45 +0100 | <iqubic> | boxscape: No. What I wrote was actual map. |
2020-12-12 13:08:46 +0100 | <int-e> | it looks like map |
2020-12-12 13:08:53 +0100 | <boxscape> | oh, right |
2020-12-12 13:09:09 +0100 | <int-e> | @src foldl |
2020-12-12 13:09:09 +0100 | <lambdabot> | foldl f z [] = z |
2020-12-12 13:09:10 +0100 | <lambdabot> | foldl f z (x:xs) = foldl f (f z x) xs |
2020-12-12 13:09:55 +0100 | <pja> | iqubic: Why did foldl' get moved out of the Prelude? Given that you almost never want the non-strict version this seems a little ... perverse. |
2020-12-12 13:10:09 +0100 | <int-e> | pja: it was never in Prelude |
2020-12-12 13:10:22 +0100 | <iqubic> | pja: I'm the wrong person to ask about that, you'll need to ask someone else. |
2020-12-12 13:10:45 +0100 | <olligobber> | is there any advantage to using f . g $ x over f $ g $ x? |
2020-12-12 13:10:55 +0100 | <pja> | Wasn’t it? Maybe I’m mis-remembering |
2020-12-12 13:10:58 +0100 | <boxscape> | you have one fewer ugly dollar sign |
2020-12-12 13:11:16 +0100 | <olligobber> | I like $ signs, they make up for how little haskell programming pays |
2020-12-12 13:11:18 +0100 | nomeata | (~jojo@dslb-084-056-082-238.084.056.pools.vodafone-ip.de) (Quit: Client exiting) |
2020-12-12 13:11:21 +0100 | <int-e> | olligobber: you can factor out the f . g part directly. that's the strongest argument I know off |
2020-12-12 13:11:28 +0100 | <int-e> | olligobber: largely it just doesn't matter |
2020-12-12 13:11:33 +0100 | <olligobber> | ok |
2020-12-12 13:11:49 +0100 | <iqubic> | boxscape: dollar signs are the only way we can keep haskell from looking like lisp with a million parens. |
2020-12-12 13:12:00 +0100 | <boxscape> | Oh I agree, they're better than parentheses |
2020-12-12 13:12:04 +0100 | <boxscape> | just not better than dots |
2020-12-12 13:12:05 +0100 | <int-e> | I've done things like return $ f . g $ x with no regrets. |
2020-12-12 13:12:26 +0100 | <olligobber> | ew |
2020-12-12 13:12:35 +0100 | <int-e> | it's punctuation |
2020-12-12 13:12:37 +0100 | <iqubic> | int-e: That's some cursed haskell there. |
2020-12-12 13:12:43 +0100 | <boxscape> | ew, return |
2020-12-12 13:12:51 +0100 | <int-e> | iqubic: "return $" is a single entity to me |
2020-12-12 13:13:04 +0100 | <int-e> | boxscape: I'm approaching 20 years of Haskell. |
2020-12-12 13:13:14 +0100 | <iqubic> | Yeah, me too. I just don't like that statement. |
2020-12-12 13:13:14 +0100 | <boxscape> | heh, fair enough |
2020-12-12 13:13:48 +0100 | Varis | (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
2020-12-12 13:13:50 +0100 | mananamenos | (~mananamen@84.122.202.215.dyn.user.ono.com) |
2020-12-12 13:14:05 +0100 | <olligobber> | apparently I've used return 4 times in advent of code 2020 so far |
2020-12-12 13:14:13 +0100 | <int-e> | boxscape: I'm slowly switching to "pure" but it's a process. |
2020-12-12 13:14:37 +0100 | <int-e> | The fingers aren't there yet. |
2020-12-12 13:14:39 +0100 | <olligobber> | you'd think I would have switched to pure with all the purescript I've been writing, but apparently not |
2020-12-12 13:14:39 +0100 | <iqubic> | Yeah. Switching to "pure" is certainly a process. I know what you mean. |
2020-12-12 13:14:50 +0100 | mastarija | (~mastarija@93-136-86-23.adsl.net.t-com.hr) |
2020-12-12 13:14:59 +0100 | <boxscape> | hm "returnscript" |
2020-12-12 13:15:05 +0100 | <olligobber> | lol |
2020-12-12 13:15:34 +0100 | <iqubic> | It's just that when I see "pure" at the end of a do block, it feels all sorts of wwrong. |
2020-12-12 13:15:37 +0100 | mananamenos | (~mananamen@84.122.202.215.dyn.user.ono.com) (Remote host closed the connection) |
2020-12-12 13:15:50 +0100 | madnight | (~madnight@static.59.103.201.195.clients.your-server.de) (Quit: ZNC 1.7.1 - https://znc.in) |
2020-12-12 13:15:57 +0100 | <boxscape> | if you see pure at the end of a do block you can replace it with a MonadComprehension and get rid of the pure :) |
2020-12-12 13:16:00 +0100 | mananamenos | (~mananamen@84.122.202.215.dyn.user.ono.com) |
2020-12-12 13:16:24 +0100 | drmdst | (67e75c70@103.231.92.112) |
2020-12-12 13:16:29 +0100 | <iqubic> | yeah, but that's a whole different can of worms. |
2020-12-12 13:16:38 +0100 | <boxscape> | that's true |
2020-12-12 13:18:17 +0100 | <drmdst> | I was told to email hackage-trustees@haskell.org to request permission to upload, but my email is rejected with SPF failure. Which tells me to see details at openspf.net, which doesn't even resolve. But I have valid SPF records, and have no problems sending and receiving mail for the last 10 years. Sooo whoever is running hackage may want to fix |
2020-12-12 13:18:17 +0100 | <drmdst> | their email. |
2020-12-12 13:18:24 +0100 | <[exa]> | `pure` looks weird in a do-notation DSL that's aiming to simulate impurity |
2020-12-12 13:18:26 +0100 | olligobber | (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection) |
2020-12-12 13:18:57 +0100 | <int-e> | drmdst: #haskell-infrastructure may be a better place for this |
2020-12-12 13:19:33 +0100 | <drmdst> | int-e: thanks. |
2020-12-12 13:19:34 +0100 | <int-e> | at the very least it's less likely to scroll off before anybody sees it there |
2020-12-12 13:19:42 +0100 | <iqubic> | [exa]: that's exactly my take on this "return" vs "pure" dilemma |
2020-12-12 13:19:53 +0100 | wei2912 | (~wei2912@unaffiliated/wei2912) (Remote host closed the connection) |
2020-12-12 13:20:04 +0100 | <int-e> | (anybody with the power to fix it) |
2020-12-12 13:20:17 +0100 | <boxscape> | I could get on board with using `return` only in the context of the imperative DSL and pure everywhere else, I suppose |
2020-12-12 13:20:35 +0100 | <iqubic> | boxscape: I already do that. |
2020-12-12 13:20:50 +0100 | drmdst | amingoia |
2020-12-12 13:22:36 +0100 | <boxscape> | I think it's still confusing though because if you want a do-block to evaluate to to the result of `someAction :: IO String`, you don't end the do block with `return someAction` like you would in an imperative language, you end it with `someAction` |
2020-12-12 13:23:01 +0100 | <boxscape> | confusing from the point of view of someone who's trying to learn this and has imperative experience, I mean |
2020-12-12 13:23:10 +0100 | <[exa]> | the only technical problem is that `return` is in Monad and we're likely not removing it anytime soon b/c a lot of code depends on it |
2020-12-12 13:23:27 +0100 | <iqubic> | [ex] |
2020-12-12 13:23:45 +0100 | <boxscape> | [exa] and a lot of educational material uses it |
2020-12-12 13:24:02 +0100 | <[exa]> | that's the other, slightly lesser problem |
2020-12-12 13:24:12 +0100 | <iqubic> | [exa]: isn't pulling return out of the Monad typeclass part of the Monad Applicatic proposal? |
2020-12-12 13:24:36 +0100 | <[exa]> | not sure, but there's been a lot of discussion about that afaik |
2020-12-12 13:25:10 +0100 | <boxscape> | I'm hoping we can put `join` *into* Monad at some point but apparently roles have to be fixed first... |
2020-12-12 13:26:21 +0100 | <[exa]> | a tiny bit of extra syntax would help I'd say |
2020-12-12 13:26:28 +0100 | dyeplexer | (~lol@unaffiliated/terpin) (Ping timeout: 256 seconds) |
2020-12-12 13:26:48 +0100 | <boxscape> | extra syntax for what? |
2020-12-12 13:27:06 +0100 | <iqubic> | I don't know the current state of the Monad Applicative proposal is. God, GHC is like a patchwork system that's being held together by duct tape, and any tiny change to any one part of it could affect a completely different part of GHC. |
2020-12-12 13:27:21 +0100 | <[exa]> | instead of `return` and `pure` in do-notation. Like `-> result` instead of `return result` |
2020-12-12 13:27:34 +0100 | <boxscape> | hm I see |
2020-12-12 13:27:46 +0100 | <iqubic> | GHC is the perl of the haskell world. |
2020-12-12 13:27:57 +0100 | <[exa]> | both `pure` and `return` mean something else, and people apparently want to make the `do` syntax more applicative-ish too |
2020-12-12 13:28:03 +0100 | <[exa]> | iqubic: +1 |
2020-12-12 13:28:25 +0100 | mastarija | (~mastarija@93-136-86-23.adsl.net.t-com.hr) (Quit: Leaving) |
2020-12-12 13:28:52 +0100 | <[exa]> | or well, something less over-used than ->... like `= result`. Would also avoid a lot of unnecessary $'s |
2020-12-12 13:28:57 +0100 | <iqubic> | I mean, GHC has a laundry list of language pragmas you can enable. It doesn't strictly adhere to the 10 year old haskell2010 standard. |
2020-12-12 13:29:27 +0100 | <[exa]> | I'm saving this as a procrastination project #549234645 |
2020-12-12 13:30:20 +0100 | dyeplexer | (~lol@unaffiliated/terpin) |
2020-12-12 13:31:18 +0100 | sepples | (~sepples@67.205.168.224) |
2020-12-12 13:34:14 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 13:34:16 +0100 | amingoia | (67e75c70@103.231.92.112) (Remote host closed the connection) |
2020-12-12 13:34:51 +0100 | slidercrank1 | (~slidercra@s91904426.blix.com) |
2020-12-12 13:36:18 +0100 | Varis | (~Tadas@unaffiliated/varis) |
2020-12-12 13:37:00 +0100 | geekosaur | (ac3a8c7e@172.58.140.126) |
2020-12-12 13:37:04 +0100 | jpcooper | (~user@unaffiliated/jpcooper) |
2020-12-12 13:37:36 +0100 | <jpcooper> | Hello. Are there any examples of people trying to create a custom syntax, maybe with TH, which recreates the functionality seen in J's trains of verbs? https://www.jsoftware.com/help/learning/09.htm |
2020-12-12 13:39:34 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
2020-12-12 13:39:56 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection) |
2020-12-12 13:40:34 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 13:40:46 +0100 | <jpcooper> | If not, bagsy |
2020-12-12 13:42:30 +0100 | p-core | (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) |
2020-12-12 13:43:21 +0100 | <boxscape> | % :t ala Endo foldMap' . Reverse -- this isn't any better than your foldl' solution iqubic, but I figured out how to do it with ala without actually reversing the list |
2020-12-12 13:43:22 +0100 | <yahb> | boxscape: Foldable f => f (b -> b) -> b -> b |
2020-12-12 13:43:42 +0100 | <boxscape> | (Reverse just changes how foldMap operates rather than reversing the list) |
2020-12-12 13:44:26 +0100 | kenran | (~kenran@mue-88-130-62-159.dsl.tropolys.de) (Quit: leaving) |
2020-12-12 13:45:16 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 272 seconds) |
2020-12-12 13:47:56 +0100 | Kaiepi | (~Kaiepi@47.54.252.148) (Ping timeout: 256 seconds) |
2020-12-12 13:48:24 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 13:48:33 +0100 | jpcooper | (~user@unaffiliated/jpcooper) ("ERC (IRC client for Emacs 26.1)") |
2020-12-12 13:51:18 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) |
2020-12-12 13:52:16 +0100 | hexfive | (~hexfive@50-47-142-195.evrt.wa.frontiernet.net) (Quit: i must go. my people need me.) |
2020-12-12 13:53:17 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 260 seconds) |
2020-12-12 13:53:20 +0100 | Kronic | (~Kronic___@84.203.98.133) |
2020-12-12 13:56:08 +0100 | Kaiepi | (~Kaiepi@47.54.252.148) |
2020-12-12 13:56:54 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:b8a0:b828:e101:a624) |
2020-12-12 13:58:14 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:b8b7:e159:8e2c:1d1c) |
2020-12-12 14:00:34 +0100 | drbean | (~drbean@TC210-63-209-180.static.apol.com.tw) |
2020-12-12 14:01:50 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:b8a0:b828:e101:a624) (Ping timeout: 264 seconds) |
2020-12-12 14:03:02 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:b8b7:e159:8e2c:1d1c) (Ping timeout: 264 seconds) |
2020-12-12 14:03:28 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:2934:49bf:39ab:a879) |
2020-12-12 14:05:43 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 14:08:26 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:2934:49bf:39ab:a879) (Ping timeout: 264 seconds) |
2020-12-12 14:08:31 +0100 | thunderrd | (~thunderrd@183.182.111.131) |
2020-12-12 14:11:36 +0100 | geowiesnot | (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 240 seconds) |
2020-12-12 14:11:54 +0100 | dnlkrgr | (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 265 seconds) |
2020-12-12 14:12:33 +0100 | christo | (~chris@81.96.113.213) |
2020-12-12 14:12:41 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 14:13:22 +0100 | son0p | (~son0p@181.58.39.182) (Quit: Lost terminal) |
2020-12-12 14:14:12 +0100 | jamm | (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
2020-12-12 14:14:48 +0100 | nicren | (~nicren@81-66-205-86.rev.numericable.fr) |
2020-12-12 14:15:00 +0100 | jamm | (~jamm@unaffiliated/jamm) |
2020-12-12 14:17:01 +0100 | <boxscape> | hm I don't really understand why ala uses all the Wrapping stuff rather than Coercible |
2020-12-12 14:18:19 +0100 | Poscat[m] | (poscatmatr@gateway/shell/matrix.org/x-bvzvvoefeynvfsar) |
2020-12-12 14:18:36 +0100 | dnlkrgr | (~dnlkrgr@ip-109-42-3-164.web.vodafone.de) |
2020-12-12 14:19:08 +0100 | nicren | (~nicren@81-66-205-86.rev.numericable.fr) (Client Quit) |
2020-12-12 14:19:13 +0100 | <lortabac> | maybe ala is older than Coercible? |
2020-12-12 14:19:29 +0100 | jamm | (~jamm@unaffiliated/jamm) (Ping timeout: 258 seconds) |
2020-12-12 14:19:48 +0100 | <boxscape> | lortabac oh, yeah, that could be |
2020-12-12 14:20:54 +0100 | <geekosaur> | it definitely is, but one would thik by this point it would have been rewritten; Coercible has been around for a while |
2020-12-12 14:21:53 +0100 | <geekosaur> | unless they have a need to support pre-Coercible versions of ghc |
2020-12-12 14:22:17 +0100 | son0p | (~son0p@181.136.122.143) |
2020-12-12 14:22:56 +0100 | <boxscape> | hmm |
2020-12-12 14:23:03 +0100 | mouseghost | (~draco@87-206-9-185.dynamic.chello.pl) |
2020-12-12 14:23:03 +0100 | mouseghost | (~draco@87-206-9-185.dynamic.chello.pl) (Changing host) |
2020-12-12 14:23:03 +0100 | mouseghost | (~draco@wikipedia/desperek) |
2020-12-12 14:25:41 +0100 | jamm | (~jamm@unaffiliated/jamm) |
2020-12-12 14:26:24 +0100 | Gurkenglas_ | (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 265 seconds) |
2020-12-12 14:29:11 +0100 | madnight | (~madnight@static.59.103.201.195.clients.your-server.de) |
2020-12-12 14:32:03 +0100 | MOSCOS | (~MOSCOS@122.54.107.175) (Remote host closed the connection) |
2020-12-12 14:32:29 +0100 | MOSCOS | (~MOSCOS@122.54.107.175) |
2020-12-12 14:35:44 +0100 | solonarv | (~solonarv@astrasbourg-157-1-27-135.w90-40.abo.wanadoo.fr) |
2020-12-12 14:36:56 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 240 seconds) |
2020-12-12 14:36:56 +0100 | fendor | (~fendor@91.141.1.222.wireless.dyn.drei.com) |
2020-12-12 14:37:37 +0100 | berberman | (~berberman@unaffiliated/berberman) |
2020-12-12 14:38:16 +0100 | dnlkrgr | (~dnlkrgr@ip-109-42-3-164.web.vodafone.de) (Ping timeout: 240 seconds) |
2020-12-12 14:38:21 +0100 | berberman_ | (~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds) |
2020-12-12 14:38:41 +0100 | <boxscape> | % ala' :: forall a f g . (Functor f, Coercible a (g a), Coercible (g a) a) => (a -> g a) -> ((a -> g a) -> f (g a)) -> f a; ala' _ = au (iso coerce coerce) |
2020-12-12 14:38:41 +0100 | <yahb> | boxscape: |
2020-12-12 14:38:42 +0100 | <boxscape> | % ala' Sum foldMap [1..5] |
2020-12-12 14:38:43 +0100 | <yahb> | boxscape: 15 |
2020-12-12 14:38:46 +0100 | <boxscape> | it seems possible at least |
2020-12-12 14:39:23 +0100 | <boxscape> | edwardk do you know why ala uses Unwrapped rather than Coercible? Is it because no one has bothered to change the implementation since Coercible was introduced, or to support older ghc versions, or some deeper reason? |
2020-12-12 14:39:43 +0100 | cosimone | (~cosimone@93-47-228-249.ip115.fastwebnet.it) |
2020-12-12 14:40:12 +0100 | philopsos | (~caecilius@gateway/tor-sasl/caecilius) |
2020-12-12 14:40:18 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 256 seconds) |
2020-12-12 14:40:23 +0100 | dnlkrgr | (~dnlkrgr@HSI-KBW-46-223-1-192.hsi.kabel-badenwuerttemberg.de) |
2020-12-12 14:40:25 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
2020-12-12 14:40:37 +0100 | chang | (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
2020-12-12 14:41:06 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
2020-12-12 14:41:26 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) |
2020-12-12 14:41:41 +0100 | <siraben> | How can I get infix pattern synonyms? |
2020-12-12 14:42:05 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) (Read error: Connection reset by peer) |
2020-12-12 14:42:06 +0100 | <siraben> | I'm defining `(.:) :: a -> b -> a.:b` such that `a.:s = (a,s)` and would like to be able to pattern match on it |
2020-12-12 14:42:20 +0100 | <siraben> | so `dup (a.:s) = a.:a.:s` would work |
2020-12-12 14:42:25 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) |
2020-12-12 14:42:58 +0100 | <boxscape> | siraben it looks like operator patterns have to start with : |
2020-12-12 14:43:01 +0100 | Tario | (~Tario@201.192.165.173) |
2020-12-12 14:43:09 +0100 | <boxscape> | operator meaning... infix |
2020-12-12 14:43:59 +0100 | the-smug-one | (~user@83-92-112-87-cable.dk.customer.tdc.net) |
2020-12-12 14:44:36 +0100 | <boxscape> | % pattern a :. s = (a,s) -- siraben |
2020-12-12 14:44:36 +0100 | <yahb> | boxscape: |
2020-12-12 14:45:14 +0100 | raichoo | (~raichoo@dslb-188-100-007-024.188.100.pools.vodafone-ip.de) (Quit: Lost terminal) |
2020-12-12 14:45:48 +0100 | Tario | (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
2020-12-12 14:45:59 +0100 | <siraben> | boxscape: thanks |
2020-12-12 14:46:03 +0100 | Tario | (~Tario@201.192.165.173) |
2020-12-12 14:46:10 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:2934:49bf:39ab:a879) |
2020-12-12 14:47:57 +0100 | <tomjaguarpaw> | Does anyone know why cabal v2-exec doesn't rebuild if the source has changed (but v2-run does)? Is it just because the exact dependenties for a v2-exec can't be determined? |
2020-12-12 14:48:09 +0100 | drbean | (~drbean@TC210-63-209-180.static.apol.com.tw) (Ping timeout: 265 seconds) |
2020-12-12 14:49:44 +0100 | <ephemient> | siraben: types, constructors (pattern synonyms use this namespace too): name starts with uppercase or : \\ type variables, values: name starts with non-uppercase letter or non-: punctuation |
2020-12-12 14:49:51 +0100 | <[exa]> | tomjaguarpaw: cabal exec is meant to run build-tools (ie. not the "current project" or program), cabal run is for running the program |
2020-12-12 14:50:27 +0100 | elfets | (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
2020-12-12 14:50:28 +0100 | <boxscape> | ( ephemient well, type operators don't have to start with : if you use -XTypeOperators ) |
2020-12-12 14:51:17 +0100 | <siraben> | maybe we need PatternOperators too |
2020-12-12 14:51:37 +0100 | pavonia | (~user@unaffiliated/siracusa) |
2020-12-12 14:52:05 +0100 | <boxscape> | yeah I can't think of a good reason why patterns should have to start with : |
2020-12-12 14:53:04 +0100 | <geekosaur> | same reason constructors start with uppercase. constructor (including pattern) vs. variable is how pattern matching knows what to match on vs. what's a inding |
2020-12-12 14:53:05 +0100 | <ephemient> | I think it's just because they act like (de)constructors, so they follow the same rules that constructors do |
2020-12-12 14:53:09 +0100 | <geekosaur> | *binding |
2020-12-12 14:53:27 +0100 | slidercrank1 | (~slidercra@s91904426.blix.com) (Remote host closed the connection) |
2020-12-12 14:53:46 +0100 | <boxscape> | ephemient right, sorry, I meant I can't think of a good reason why infix constructors or patterns should have to start with : |
2020-12-12 14:53:54 +0100 | <boxscape> | but bindings make sense |
2020-12-12 14:54:01 +0100 | <boxscape> | I was only thinking of type level bindings, which can't be operators |
2020-12-12 14:54:06 +0100 | <boxscape> | but I suppose value level bindings can be |
2020-12-12 14:54:43 +0100 | <boxscape> | % let foo (!) a b = a ! b in foo (+) 1 2 |
2020-12-12 14:54:44 +0100 | <yahb> | boxscape: 3 |
2020-12-12 14:54:45 +0100 | <boxscape> | yeah |
2020-12-12 14:55:16 +0100 | <boxscape> | hmm how does agda handle thiss |
2020-12-12 14:57:21 +0100 | justanotheruser | (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 272 seconds) |
2020-12-12 14:57:36 +0100 | <boxscape> | looks like it treats it as a binding iff there is no constructor with that name in scope |
2020-12-12 14:58:25 +0100 | o1lo01ol1o | (~o1lo01ol1@31.22.216.239) |
2020-12-12 14:58:56 +0100 | o1lo01ol_ | (~o1lo01ol1@31.22.216.239) |
2020-12-12 14:59:07 +0100 | mputz | (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
2020-12-12 14:59:14 +0100 | gehmehgeh | (~ircuser1@gateway/tor-sasl/gehmehgeh) |
2020-12-12 15:00:16 +0100 | o1lo01ol1o | (~o1lo01ol1@31.22.216.239) (Read error: No route to host) |
2020-12-12 15:05:09 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
2020-12-12 15:05:30 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) |
2020-12-12 15:06:09 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
2020-12-12 15:06:30 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) |
2020-12-12 15:07:08 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
2020-12-12 15:07:29 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) |
2020-12-12 15:08:08 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
2020-12-12 15:08:29 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) |
2020-12-12 15:08:41 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:bbcd:2474:9519:9fb5:8678) |
2020-12-12 15:09:09 +0100 | GZJ0X_ | (~gzj@unaffiliated/gzj) (Remote host closed the connection) |
2020-12-12 15:10:06 +0100 | <boxscape> | % ala Endo foldMap [(+1), (*2)] 4 |
2020-12-12 15:10:07 +0100 | <yahb> | boxscape: 9 |
2020-12-12 15:10:08 +0100 | <boxscape> | % ala' Endo foldMap [(+1), (*2)] 4 |
2020-12-12 15:10:09 +0100 | <yahb> | boxscape: ; <interactive>:70:6: error:; * Occurs check: cannot construct the infinite type: a ~ a -> a; Expected type: (a -> a) -> Endo (a -> a); Actual type: ((a -> a) -> a -> a) -> Endo (a -> a); * In the first argument of ala', namely `Endo'; In the expression: ala' Endo foldMap [(+ 1), (* 2)] 4; In an equation for `it': it = ala' Endo foldMap [(+ 1), (* 2)] 4; * Relevant bi |
2020-12-12 15:10:23 +0100 | <boxscape> | looks like i didn't quite manage to replicate it actually |
2020-12-12 15:12:22 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) |
2020-12-12 15:12:26 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 15:12:29 +0100 | veox | (~veox@185.163.110.125) |
2020-12-12 15:14:39 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 15:15:52 +0100 | hlysig | (~hlysig@mobile-194-144-46-247.3G.internet.is) |
2020-12-12 15:18:25 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 240 seconds) |
2020-12-12 15:19:51 +0100 | sgibber2018 | (~arch-gibb@208.85.237.137) (Quit: WeeChat 2.9) |
2020-12-12 15:21:13 +0100 | <nshepperd2> | my dependently typed scanf is coming along well... https://github.com/nshepperd/advent-of-code/blob/master/2020/TScanf.hs |
2020-12-12 15:22:15 +0100 | cyphase | (~cyphase@unaffiliated/cyphase) |
2020-12-12 15:23:14 +0100 | <boxscape> | nice |
2020-12-12 15:25:41 +0100 | <merijn> | iqubic: I'm a bit late with this comment, but non-strict foldl is being slain in GHC 9.2 \o/ |
2020-12-12 15:26:02 +0100 | <nshepperd2> | slain how? |
2020-12-12 15:26:13 +0100 | Moyst | (~moyst@212-149-213-144.bb.dnainternet.fi) (Remote host closed the connection) |
2020-12-12 15:26:20 +0100 | DigitalKiwi | (~kiwi@unaffiliated/digitalkiwi) (Quit: quite.) |
2020-12-12 15:26:20 +0100 | noan | (~noan@2604:a880:400:d0::12fc:5001) (Quit: ZNC 1.8.2 - https://znc.in) |
2020-12-12 15:26:30 +0100 | <merijn> | nshepperd2: foldl is changed to be strict |
2020-12-12 15:26:41 +0100 | <merijn> | As are sum and product |
2020-12-12 15:26:43 +0100 | DigitalKiwi | (~kiwi@unaffiliated/digitalkiwi) |
2020-12-12 15:26:45 +0100 | noan | (~noan@2604:a880:400:d0::12fc:5001) |
2020-12-12 15:26:51 +0100 | Moyst | (~moyst@212-149-213-144.bb.dnainternet.fi) |
2020-12-12 15:27:08 +0100 | <boxscape> | huh, vmchale wrote a blog post recently saying that foldl is sometimes better than foldl', unfortunately I'm getting HTTP 500 atm http://blog.vmchale.com/article/fold-haskell |
2020-12-12 15:27:17 +0100 | <xerox_> | merijn: pretty cool |
2020-12-12 15:27:50 +0100 | <merijn> | nshepperd2: Cooler heads prevailed and those 2 guys that argued "something might hypothetically break!" were ignored and that 1.5 package on haskell that relies on lazy foldl (I can't imagine how that'd happen) can just deal with it |
2020-12-12 15:28:08 +0100 | dirediresalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
2020-12-12 15:28:15 +0100 | <merijn> | boxscape: She's to busy shitposting on twitter to maintain her server ;) |
2020-12-12 15:28:21 +0100 | <boxscape> | I guess so :D |
2020-12-12 15:28:38 +0100 | <nshepperd2> | fair enough |
2020-12-12 15:28:42 +0100 | dirediresalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
2020-12-12 15:28:43 +0100 | <merijn> | I'll check archive.org, because I find ithard to imagine a case where lazy foldl is better |
2020-12-12 15:29:13 +0100 | <boxscape> | https://web.archive.org/web/20201203003910/http://blog.vmchale.com/article/fold-haskell |
2020-12-12 15:29:14 +0100 | <merijn> | So far the 5 times it's been brought up on the mailing list people only brought up *hypothetical* breakage, no one has ever provided an example where lazy foldl is preferable |
2020-12-12 15:29:30 +0100 | <nshepperd2> | this only affects the instance for lists, right? |
2020-12-12 15:30:11 +0100 | <boxscape> | wait |
2020-12-12 15:30:20 +0100 | <boxscape> | merijn looks like she just said that foldr is better in that case actually |
2020-12-12 15:30:46 +0100 | <merijn> | nshepperd2: The Foldable default implementations are changed to strict by default, but instances of Foldable can override that, of course |
2020-12-12 15:31:07 +0100 | <merijn> | boxscape: That sounds more reasonable |
2020-12-12 15:31:37 +0100 | <merijn> | No one says foldl' is the best fold, people are just saying foldl' is always better than foldl, making the existence of foldl a dumb curiosity and a useless trap for newbies |
2020-12-12 15:31:42 +0100 | <merijn> | Same goes for sum and fold |
2020-12-12 15:31:56 +0100 | <merijn> | The number of times I've ever wanted lazy sum and fold in my life: 0 |
2020-12-12 15:32:33 +0100 | <merijn> | The number of times I forgot that "sum" and "fold" in Prelude where dangerous traps and I should reimplement them using foldl' in my own code: tons of times |
2020-12-12 15:33:26 +0100 | <ephemient> | lazy sum might make sense with peano numbers, but… that can't matter enough to affect the default |
2020-12-12 15:33:40 +0100 | fuzzypixelz | (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
2020-12-12 15:33:41 +0100 | <aplainzetakind> | What's wrong with this? |
2020-12-12 15:33:55 +0100 | <aplainzetakind> | Solver a b c is a -> (b, c) |
2020-12-12 15:33:55 +0100 | <merijn> | nshepperd2: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/4355/diffs |
2020-12-12 15:34:08 +0100 | <merijn> | nshepperd2: maximum, minimum, etc. are all changed too |
2020-12-12 15:34:23 +0100 | <solonarv> | ephemient: but then foldr is better than foldl(') anyway! |
2020-12-12 15:34:59 +0100 | <ephemient> | that is true |
2020-12-12 15:35:00 +0100 | <solonarv> | foldl and foldl' will not produce anything before traversing the entire list, foldr will (so with foldr (+) 0, you can get the head of your lazy peano natural immediately) |
2020-12-12 15:35:06 +0100 | <aplainzetakind> | "this" being: https://dpaste.com/3SVPETL2F |
2020-12-12 15:36:09 +0100 | <aplainzetakind> | I'm getting ambiguous type variable complaints, but don't know where to put what. |
2020-12-12 15:37:53 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
2020-12-12 15:38:00 +0100 | <dminuoso> | can you include the full error message? |
2020-12-12 15:39:26 +0100 | <aplainzetakind> | dminuoso: https://dpaste.com/C8NCK3MFT |
2020-12-12 15:40:12 +0100 | <dminuoso> | Ah yes, the typical `show . read` problem |
2020-12-12 15:40:26 +0100 | <aplainzetakind> | Not particular to RankNTypes? |
2020-12-12 15:42:31 +0100 | __monty__ | (~toonn@unaffiliated/toonn) |
2020-12-12 15:43:17 +0100 | <dminuoso> | Ah, not even that. It's quite simple |
2020-12-12 15:43:33 +0100 | <dminuoso> | aplainzetakind: At what type should `read` be instantiated at? |
2020-12-12 15:44:12 +0100 | <dminuoso> | % And equivalently, show? |
2020-12-12 15:44:13 +0100 | <yahb> | dminuoso: ; <interactive>:77:17: error: parse error on input `,' |
2020-12-12 15:44:14 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:bbcd:2474:9519:9fb5:8678) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-12-12 15:44:51 +0100 | <aplainzetakind> | dminuoso: Well, the 'a' in the type signature, but thats |
2020-12-12 15:45:07 +0100 | <aplainzetakind> | that's not how the scopes of type variables work I suppose. |
2020-12-12 15:45:21 +0100 | <boxscape> | mkSol :: (forall a b . (Read a, Show b) => a -> b) -> String -> String -- here's a simpler type signature with the same problem |
2020-12-12 15:45:22 +0100 | <dminuoso> | it looks like you're confused about who gets to pick the types |
2020-12-12 15:45:48 +0100 | <boxscape> | (and corresponding definition: mkSol f = show . f . read) |
2020-12-12 15:45:53 +0100 | <dminuoso> | aplainzetakind: You as the implementor of mkSol have to/get to instantiate `f` at one or multiple types. |
2020-12-12 15:46:17 +0100 | <dminuoso> | Not the caller/consumer of mkSol. |
2020-12-12 15:46:26 +0100 | <aplainzetakind> | Hmm. |
2020-12-12 15:46:42 +0100 | <dminuoso> | Equivalently you, the implementor of mkSol, as the *consumer/caller* of read *must* decide what to instantiate `read` at. |
2020-12-12 15:46:58 +0100 | <boxscape> | aplainzetakind if you look at (Read a, Show a), they're constaints for f, not for mkSol, so you can't use read and show of those instances inside mkSol |
2020-12-12 15:48:01 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:bbcd:2474:9519:9fb5:8678) |
2020-12-12 15:48:38 +0100 | <boxscape> | aplainzetakind I don't suppose you could just use `mkSol :: forall a b c. (Read a, Show b, Show c) => Solver a b c -> Solver String String String` instead? |
2020-12-12 15:48:57 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:2934:49bf:39ab:a879) (Ping timeout: 260 seconds) |
2020-12-12 15:49:16 +0100 | Saukk | (~Saukk@2001:998:ec:954:1c59:9bb5:b94c:3) |
2020-12-12 15:49:31 +0100 | <aplainzetakind> | boxscape: I have Solve a b c's from every day with different a b c's. |
2020-12-12 15:49:37 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 15:49:44 +0100 | <boxscape> | I see |
2020-12-12 15:50:04 +0100 | <aplainzetakind> | I want to pool them into a function which takes the day number as a parameter and gives me String -> (String, String) |
2020-12-12 15:50:05 +0100 | dminuoso | smells an AoC library |
2020-12-12 15:50:13 +0100 | <aplainzetakind> | dminuoso: Obviously. |
2020-12-12 15:50:15 +0100 | <dminuoso> | :) |
2020-12-12 15:50:40 +0100 | <aplainzetakind> | Is this sort of RankNTypes stuff not the right way to go about it? |
2020-12-12 15:50:53 +0100 | <dminuoso> | aplainzetakind: If you write `f :: (forall s. ... s ...) -> T` then you demand that the argument to `f` *must* be polymorphic. |
2020-12-12 15:51:07 +0100 | <dminuoso> | aplainzetakind: this gives the implementor of f the chance to instantiate its argument at multiple arguments |
2020-12-12 15:51:08 +0100 | <dminuoso> | for instance |
2020-12-12 15:52:04 +0100 | <dminuoso> | % f :: (forall s. Num s => s) -> (String, String); f n = (show @Float n, show @Int n) |
2020-12-12 15:52:05 +0100 | <yahb> | dminuoso: |
2020-12-12 15:52:07 +0100 | <aplainzetakind> | This is the whole file: https://dpaste.com/E34G4S5RE |
2020-12-12 15:52:08 +0100 | <dminuoso> | % f 2 |
2020-12-12 15:52:09 +0100 | <yahb> | dminuoso: ("2.0","2") |
2020-12-12 15:52:36 +0100 | <dminuoso> | aplainzetakind: ^- this demands, that you call `f` with a polymorphic Num value. You may not pass Int to it, the argument itself has to be polymorphic |
2020-12-12 15:52:44 +0100 | <dminuoso> | Then f can instantiate its arguments at multiple types as it sees fit |
2020-12-12 15:52:51 +0100 | <__monty__> | I'm running a criterion benchmark, something along the lines of `nfIO (readFile "myFile.txt" >>= process)` and I'm getting an error "openFile: resource exhausted (Too many open files)" Am I wrong in expecting criterion to fore the value of "process", which would force the value of readFile and close the fd? |
2020-12-12 15:53:00 +0100 | dminuoso | smells another AoC library |
2020-12-12 15:53:33 +0100 | <aplainzetakind> | dminuoso: I kind of understand. |
2020-12-12 15:53:35 +0100 | <merijn> | __monty__: You need to fully evaluate the String you read via readFile |
2020-12-12 15:53:45 +0100 | <merijn> | __monty__: Or better, don't use the String version of readFile... |
2020-12-12 15:54:00 +0100 | <__monty__> | Not a library, just my solution benchmark. This has worked fine so far, I'm not sure why it doesn't today. |
2020-12-12 15:54:19 +0100 | <aplainzetakind> | dminuoso: What I understand indicates that this is not going to solve my problem. |
2020-12-12 15:54:22 +0100 | <merijn> | __monty__: Actually, better yet even is not separate reading the input from the benchmark |
2020-12-12 15:54:31 +0100 | <merijn> | s/not// |
2020-12-12 15:54:34 +0100 | <dminuoso> | aplainzetakind: Right, you just need a regular polymorphic binding. :) |
2020-12-12 15:54:48 +0100 | <__monty__> | merijn: But I want that included. |
2020-12-12 15:54:51 +0100 | <merijn> | __monty__: Reading the input shouldn't be part of what your benchmarking, so I'm confused why you have it there |
2020-12-12 15:55:10 +0100 | <merijn> | __monty__: Why? |
2020-12-12 15:55:33 +0100 | <merijn> | It's completely arbitrary and dependent on disk contention, filesystem overhead, etc. super noisy and all that |
2020-12-12 15:55:44 +0100 | <__monty__> | Because it's closer to "Time it takes to run the program to solve for input X." |
2020-12-12 15:56:00 +0100 | <dminuoso> | aplainzetakind: for `f :: forall a. ... a ...` it is the caller/consumer of `f` that can instantiate `f` at multiple/different choices for the type a. To the implementor of `f` the type is unknown, it has to write code that works over any choice of it. |
2020-12-12 15:56:07 +0100 | <dminuoso> | aplainzetakind: With rank 2 types it's reversed |
2020-12-12 15:56:08 +0100 | <merijn> | Well, then you need to do it properly and fully evaluate the input each time |
2020-12-12 15:56:14 +0100 | <__monty__> | These benchmarks are just for me, not to compete or publish : ) |
2020-12-12 15:56:26 +0100 | <boxscape> | aplainzetakind how about this? https://i.imgur.com/helP7mx.png |
2020-12-12 15:56:51 +0100 | <merijn> | __monty__: Whether they're "just for you" is rather irrelevant when it comes to making them do something sensible :p |
2020-12-12 15:56:55 +0100 | <__monty__> | Megaparsec's sepEndBy doesn't consume the entire input? |
2020-12-12 15:57:08 +0100 | <aplainzetakind> | boxscape: Yeah, that works. |
2020-12-12 15:57:27 +0100 | <aplainzetakind> | I was confused as to where to make things polymorphic. |
2020-12-12 15:57:34 +0100 | <merijn> | __monty__: I fail to see how "sepEndBy" and "consuming entire input" are at all related? |
2020-12-12 15:58:22 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-12-12 15:58:30 +0100 | <merijn> | I mean, if you use sepEndBy and fuck up your parser implementation so it doesn't read anything, that seem unrelated to sepEndBy |
2020-12-12 15:58:51 +0100 | <__monty__> | Imo a realistic result includes the variation that comes with disk IO. Maybe I'd have to up the number of runs to get more reliable values but not measuring it makes the numbers useless to me. |
2020-12-12 15:59:12 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 265 seconds) |
2020-12-12 15:59:44 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:2934:49bf:39ab:a879) |
2020-12-12 15:59:48 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:b8b7:e159:8e2c:1d1c) |
2020-12-12 16:00:16 +0100 | <boxscape> | aplainzetakind FWIW, this way, the Constraints are locked up inside the Solver, rather than having to be provided by mkSol, which is why it works |
2020-12-12 16:00:20 +0100 | <merijn> | Then my use readFile from strict text still applies :p |
2020-12-12 16:01:56 +0100 | geekosaur | (ac3a8c7e@172.58.140.126) (Remote host closed the connection) |
2020-12-12 16:02:31 +0100 | <merijn> | __monty__: As for why it suddenly doesn't work, criterion keeps running test until it the statistical noise in timings is below a certain threshold |
2020-12-12 16:02:51 +0100 | <merijn> | __monty__: So if your machine's disk is noisier today, then it will cause more reruns which will run you out of file descriptors |
2020-12-12 16:02:56 +0100 | <__monty__> | Yeah but why would a file from a previous test stay open? |
2020-12-12 16:03:02 +0100 | _linker_ | (~linker@2a02:a31a:a041:9a80:30fe:7017:9f55:4ae6) |
2020-12-12 16:03:22 +0100 | Entertainment | (~entertain@104.246.132.210) |
2020-12-12 16:03:27 +0100 | <merijn> | __monty__: Because you're using lazy IO and apparently not consuming it strictly enough to trigger cleanup during GC |
2020-12-12 16:04:35 +0100 | berberman | (~berberman@unaffiliated/berberman) (Quit: ZNC 1.7.5 - https://znc.in) |
2020-12-12 16:04:42 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:b8b7:e159:8e2c:1d1c) (Ping timeout: 260 seconds) |
2020-12-12 16:04:55 +0100 | berberman | (~berberman@unaffiliated/berberman) |
2020-12-12 16:05:41 +0100 | <__monty__> | Lesson learned I guess, include eof in your parser if you want to be sure you've read the entire file. |
2020-12-12 16:06:28 +0100 | <Kronic> | For megaparsec, is there like a list of common examples I can look at -- taking all of the library functions and just trying to glue them together is proving to be quite hard |
2020-12-12 16:06:44 +0100 | <__monty__> | I was under the impression that eol consumed an eof too. I've always had to use `sepEndBy p eol` instead of `sepBy p eol <* eof`. |
2020-12-12 16:07:04 +0100 | <ephemient> | if you provide input through Criterion.Main.env, it's deepseq'ed it so that should not have issues either |
2020-12-12 16:07:10 +0100 | sm[m] | has a eolof |
2020-12-12 16:07:28 +0100 | <merijn> | ephemient: Yes, but that lifts the input out of the benchmark (as I said he should), but he doesn't want that |
2020-12-12 16:07:59 +0100 | <ephemient> | whoops, I missed reading wherever that was. why not though |
2020-12-12 16:08:17 +0100 | Codaraxis_ | (Codaraxis@gateway/vpn/mullvad/codaraxis) (Read error: Connection reset by peer) |
2020-12-12 16:09:15 +0100 | <__monty__> | Because reading the input seems to be most of the work timing-wise. Makes comparing to others' results useless. I think by using criterion I'm already not measuring loading up the GHC runtime? |
2020-12-12 16:10:50 +0100 | Saukk | (~Saukk@2001:998:ec:954:1c59:9bb5:b94c:3) (Remote host closed the connection) |
2020-12-12 16:10:58 +0100 | <__monty__> | Kronic: You'll probably want to use some of the combinators from the parser-combinators package. I'm not sure there's any simple reference to look at other than the megaparsec tutorial, maybe the parsec documentation? Or AoC repos if you don't mind spoilers : ) |
2020-12-12 16:11:04 +0100 | <merijn> | "comparing to others' results" and looking at more than order of magnitude is already useless |
2020-12-12 16:11:20 +0100 | <boxscape> | aplainzetakind also, basically, what you would want in your original type signature is exists instead of forall. Which doesn't exist, so I used an existential type as one of at least two possible encodings (Though apparently Richard Eisenberg is working on adding native existential quantification) |
2020-12-12 16:11:21 +0100 | <merijn> | This just in: Benchmarking properly is hard and trusting *anyone* else's benchmarks is folly |
2020-12-12 16:11:35 +0100 | <__monty__> | That's what I'm doing. But disk IO can easily make an order of magnitude of difference. |
2020-12-12 16:11:45 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) |
2020-12-12 16:11:46 +0100 | <merijn> | __monty__: And if you don't care to the level of precision of doing it properly, then there's little to no gain from benchmarking file IO |
2020-12-12 16:12:04 +0100 | <Kronic> | Trying to avoid spoilers! I'm using AOC as a way to teach myself things like parsers and lenses. I guess I will re-read their tutorial and see what I can find |
2020-12-12 16:12:06 +0100 | <merijn> | __monty__: If you're already benchmarking everything yourself you can just factor out the cost of disk access |
2020-12-12 16:12:38 +0100 | <ephemient> | IO speeds also vary greatly on depending on OS, hardware, other IO, and caching. assuming it's in hot cache, reading a few kB from page cache isn't going to outweigh the computation time. |
2020-12-12 16:12:55 +0100 | <merijn> | Kronic: tbh, the AoC problems aren't very well suited to parser combinators (you can use them, naturally, but the problems are small and simple enough that parser combinators have a lot of mental overhead compared to the simple problem) |
2020-12-12 16:13:10 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Read error: Connection reset by peer) |
2020-12-12 16:13:45 +0100 | <Kronic> | That's true, but I'm not solving AOC to solve AOC, I'm solving AOC to learn Haskell bits of Haskell in a fun way |
2020-12-12 16:13:48 +0100 | <__monty__> | It's been easy going since day 7 imo : ) |
2020-12-12 16:13:52 +0100 | <merijn> | If there's anything I've learned from my HPC it's this. There's two kinds of benchmarks: obviously wrong ones and subtly wrong ones ;) |
2020-12-12 16:14:27 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
2020-12-12 16:14:36 +0100 | <__monty__> | I just want something that's a little more reliable than "time dayXY". |
2020-12-12 16:14:39 +0100 | infinity0 | (~infinity0@freenet/developer/infinity0) (Ping timeout: 260 seconds) |
2020-12-12 16:14:40 +0100 | <siraben> | How do I properly use Kleisli? `runKleisli (P.getChar >>> ord >>> return ())` doesn't seem to work but I'm confused as to why |
2020-12-12 16:14:46 +0100 | <siraben> | I thought >>> would take the place of `>=>` here? |
2020-12-12 16:14:58 +0100 | infinity0 | (~infinity0@freenet/developer/infinity0) |
2020-12-12 16:15:16 +0100 | <merijn> | Kronic: Sure, I'm just saying that parser combinators can feel less practical than they are due to the lightweight problems |
2020-12-12 16:15:49 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 260 seconds) |
2020-12-12 16:16:04 +0100 | FreeBirdLjj | (~freebirdl@101.228.42.108) (Ping timeout: 246 seconds) |
2020-12-12 16:16:28 +0100 | <Kronic> | That's fair, I definitely see the value in learning them, I just figured being able to build a simple one would teach me a few things |
2020-12-12 16:17:20 +0100 | o1lo01ol_ | (~o1lo01ol1@31.22.216.239) (Remote host closed the connection) |
2020-12-12 16:18:11 +0100 | <merijn> | Kronic: tbh, a slightly more complex input with a well-defined grammar is probably easier (something like SMTP or HTTP), iirc attoparsec's benchmarks had a full HTTP parser in less than 100 lines |
2020-12-12 16:18:36 +0100 | <boxscape> | aplainzetakind here's a version using another encoding of existential quantification, without an existential type https://i.imgur.com/yEgviU4.png |
2020-12-12 16:18:42 +0100 | <merijn> | I guess a slightly more modern version would be something like JSON |
2020-12-12 16:18:52 +0100 | <siraben> | `runKleisli (Kleisli P.putStrLn . Kleisli P.readFile)` ooh |
2020-12-12 16:21:05 +0100 | <merijn> | Kronic: oh, 65 lines even, 18 of which are imports/exports :p |
2020-12-12 16:21:39 +0100 | ktor | (~sailfish@adsl-dyn204.78-98-180.t-com.sk) |
2020-12-12 16:21:51 +0100 | dmiles | (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) () |
2020-12-12 16:22:02 +0100 | ktor | (~sailfish@adsl-dyn204.78-98-180.t-com.sk) (Client Quit) |
2020-12-12 16:22:35 +0100 | <xerox_> | siraben: I remember using such a construction once but I can't remember why |
2020-12-12 16:22:47 +0100 | Jajik | (xchlup2@gateway/shell/fi.muni.cz/x-iogrzypdphdyrmwo) (Quit: Ping timeout (120 seconds)) |
2020-12-12 16:22:47 +0100 | xsarnik0 | (xsarnik@gateway/shell/fi.muni.cz/x-ctybhcsimuoygovq) (Quit: Ping timeout (120 seconds)) |
2020-12-12 16:25:10 +0100 | xsarnik0 | (xsarnik@gateway/shell/fi.muni.cz/x-sopdpeeczzokwttj) |
2020-12-12 16:25:54 +0100 | <siraben> | xerox_: i'm trying to generalize https://github.com/leonidas/codeblog/blob/master/2012/2012-02-17-concatenative-haskell.md |
2020-12-12 16:26:03 +0100 | <siraben> | generalize `>=>` to any Kleisli category |
2020-12-12 16:26:22 +0100 | <xerox_> | siraben: which '.' was that? |
2020-12-12 16:27:00 +0100 | <merijn> | Control.Category.. presumably |
2020-12-12 16:27:07 +0100 | mouseghost | (~draco@wikipedia/desperek) (Quit: mew wew) |
2020-12-12 16:27:28 +0100 | <xerox_> | aah |
2020-12-12 16:27:40 +0100 | <xerox_> | ok that matches |
2020-12-12 16:27:51 +0100 | <siraben> | xerox_: yeah control.category |
2020-12-12 16:28:55 +0100 | Jajik | (xchlup2@gateway/shell/fi.muni.cz/x-jeuscridzgvbxynx) |
2020-12-12 16:31:55 +0100 | <siraben> | Has anyone used the time traveling/backwards State monad and for what purpose? |
2020-12-12 16:31:56 +0100 | <siraben> | Single pass assembler seems cool |
2020-12-12 16:32:04 +0100 | justanotheruser | (~justanoth@unaffiliated/justanotheruser) |
2020-12-12 16:32:55 +0100 | jamm | (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
2020-12-12 16:34:53 +0100 | russruss84 | (~russruss@my.russellmcc.com) (Quit: The Lounge - https://thelounge.chat) |
2020-12-12 16:35:14 +0100 | russruss84 | (~russruss@my.russellmcc.com) |
2020-12-12 16:35:19 +0100 | russruss84 | russruss |
2020-12-12 16:35:26 +0100 | dirediresalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
2020-12-12 16:35:26 +0100 | russruss | (~russruss@my.russellmcc.com) (Client Quit) |
2020-12-12 16:35:44 +0100 | russruss | (~russruss@my.russellmcc.com) |
2020-12-12 16:36:19 +0100 | dirediresalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
2020-12-12 16:37:40 +0100 | <boxscape> | is there a way to make ex2 here work? And why doesn't it work? https://dpaste.com/EWFBYEE4Z |
2020-12-12 16:38:49 +0100 | urodna | (~urodna@unaffiliated/urodna) |
2020-12-12 16:39:21 +0100 | <boxscape> | Oh you need impredicative types for this don't you |
2020-12-12 16:39:31 +0100 | <c_wraith> | yes |
2020-12-12 16:39:42 +0100 | <c_wraith> | for it to work you need to instantiate map polymorphically |
2020-12-12 16:40:41 +0100 | <c_wraith> | And the list literal, for that matter |
2020-12-12 16:41:26 +0100 | <c_wraith> | Is the Quick Look stuff due in the next version of GHC? |
2020-12-12 16:41:31 +0100 | <boxscape> | c_wraith ah, yeah, if I use map @Ex it works |
2020-12-12 16:41:57 +0100 | <boxscape> | (with pre-quick-look impredicativity) |
2020-12-12 16:43:52 +0100 | <boxscape> | c_wraith also, yes, quick look is merged into master |
2020-12-12 16:44:42 +0100 | <c_wraith> | cool. I can't wait to play with that. Hopefully there will be some places it works well enough to be a real ergonomic improvement |
2020-12-12 16:44:52 +0100 | <boxscape> | yeah |
2020-12-12 16:45:33 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) |
2020-12-12 16:47:28 +0100 | <Boarders> | Does anyone know a fast way to compare mutable unboxed vectors? |
2020-12-12 16:48:50 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:bbcd:2474:9519:9fb5:8678) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-12-12 16:50:08 +0100 | mouseghost | (~draco@wikipedia/desperek) |
2020-12-12 16:52:42 +0100 | vnz | (~vnz@51.15.143.225) |
2020-12-12 16:52:43 +0100 | vnz | (~vnz@51.15.143.225) (Changing host) |
2020-12-12 16:52:43 +0100 | vnz | (~vnz@unaffiliated/vnz) |
2020-12-12 16:57:47 +0100 | kenran | (~kenran@mue-88-130-62-159.dsl.tropolys.de) |
2020-12-12 16:57:55 +0100 | kenran | (~kenran@mue-88-130-62-159.dsl.tropolys.de) (Client Quit) |
2020-12-12 16:58:10 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 265 seconds) |
2020-12-12 16:58:42 +0100 | kenran | (~kenran@mue-88-130-62-159.dsl.tropolys.de) |
2020-12-12 16:59:34 +0100 | chang | (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-12-12 17:00:15 +0100 | kenran | (~kenran@mue-88-130-62-159.dsl.tropolys.de) (Client Quit) |
2020-12-12 17:00:33 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:b8b7:e159:8e2c:1d1c) |
2020-12-12 17:00:58 +0100 | kenran | (~kenran@mue-88-130-62-159.dsl.tropolys.de) |
2020-12-12 17:01:57 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) |
2020-12-12 17:05:05 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:b8b7:e159:8e2c:1d1c) (Ping timeout: 258 seconds) |
2020-12-12 17:08:02 +0100 | mputz | (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
2020-12-12 17:08:29 +0100 | LKoen | (~LKoen@214.175.9.109.rev.sfr.net) (Remote host closed the connection) |
2020-12-12 17:08:56 +0100 | Gurkenglas_ | (~Gurkengla@unaffiliated/gurkenglas) |
2020-12-12 17:09:37 +0100 | the-smug-one | (~user@83-92-112-87-cable.dk.customer.tdc.net) (Ping timeout: 246 seconds) |
2020-12-12 17:13:41 +0100 | <exarkun> | What do I read to learn more about the execution model of Conduits? The implementation? |
2020-12-12 17:14:36 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:b8b7:e159:8e2c:1d1c) |
2020-12-12 17:15:03 +0100 | boxscape | (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) (Quit: Connection closed) |
2020-12-12 17:15:19 +0100 | <sm[m]> | exarkun: michael snoyman's blog posts about it, maybe |
2020-12-12 17:15:44 +0100 | boxscape | (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) |
2020-12-12 17:16:25 +0100 | <c_wraith> | if you go to his blog, be aware the implementation has changed several times - make sure you find posts describing the implementation you're using |
2020-12-12 17:16:31 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 17:18:19 +0100 | <sm[m]> | yes |
2020-12-12 17:19:23 +0100 | <exarkun> | is there a trick to find all the conduit posts or do I just have to manual scan the whole archive :/ |
2020-12-12 17:19:42 +0100 | knupfer | (~Thunderbi@200116b82c539b00d4a140fffe29ef76.dip.versatel-1u1.de) |
2020-12-12 17:20:01 +0100 | Entertainment | (~entertain@104.246.132.210) (Ping timeout: 264 seconds) |
2020-12-12 17:20:37 +0100 | knupfer1 | (~Thunderbi@200116b82c539b0098bdfcc50eb54675.dip.versatel-1u1.de) |
2020-12-12 17:20:38 +0100 | knupfer | (~Thunderbi@200116b82c539b00d4a140fffe29ef76.dip.versatel-1u1.de) (Remote host closed the connection) |
2020-12-12 17:20:38 +0100 | knupfer1 | knupfer |
2020-12-12 17:20:43 +0100 | <exarkun> | (kind of a rhetorical question) |
2020-12-12 17:20:49 +0100 | <merijn> | Tekmo also did a bunch of posts on pipes and contrasting them with conduit |
2020-12-12 17:20:56 +0100 | mastarija | (~mastarija@93-136-128-137.adsl.net.t-com.hr) |
2020-12-12 17:21:13 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 264 seconds) |
2020-12-12 17:22:23 +0100 | <merijn> | exarkun: https://kseo.github.io/posts/2017-01-25-write-your-own-stream-processing-library-part1.html ? |
2020-12-12 17:24:26 +0100 | hekkaidekapus} | (~tchouri@gateway/tor-sasl/hekkaidekapus) |
2020-12-12 17:24:54 +0100 | machinedgod | (~machinedg@24.105.81.50) |
2020-12-12 17:26:23 +0100 | hekkaidekapus{ | (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds) |
2020-12-12 17:27:01 +0100 | <exarkun> | Hmm maybe that will help, I dunno. Thanks though. I'm kind of unsure what my question really is. I just want to understand better :/ |
2020-12-12 17:28:39 +0100 | son0p | (~son0p@181.136.122.143) (Quit: leaving) |
2020-12-12 17:29:22 +0100 | hyperisco | (~hyperisco@d192-186-117-226.static.comm.cgocable.net) |
2020-12-12 17:30:56 +0100 | <sm[m]> | scanning a blog archive isn't that hard :) |
2020-12-12 17:31:23 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-12-12 17:32:41 +0100 | <monochrom> | In an ideal world, this would be right in the doc, not need to google or find blogs... |
2020-12-12 17:33:41 +0100 | kritzefitz | (~kritzefit@212.86.56.80) |
2020-12-12 17:37:42 +0100 | <merijn> | monochrom: And then the link dies because MS redoes the MSR website and giving a shit about durable URLs is so passe and Web1.0 ;) |
2020-12-12 17:37:49 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:2934:49bf:39ab:a879) (Remote host closed the connection) |
2020-12-12 17:38:54 +0100 | tomboy64 | (~tomboy64@gateway/tor-sasl/tomboy64) (Quit: Off to see the wizard.) |
2020-12-12 17:40:07 +0100 | patrickp | (~patrickp@windows98.dev) |
2020-12-12 17:40:54 +0100 | <monochrom> | This happened to cabal[-install] too when v2 first came out. Instead of putting the new information in the user guide where it belongs, "I'm so excited I'll blog it" |
2020-12-12 17:41:22 +0100 | Jajik | (xchlup2@gateway/shell/fi.muni.cz/x-jeuscridzgvbxynx) (Quit: Ping timeout (120 seconds)) |
2020-12-12 17:41:22 +0100 | xsarnik0 | (xsarnik@gateway/shell/fi.muni.cz/x-sopdpeeczzokwttj) (Quit: Ping timeout (120 seconds)) |
2020-12-12 17:41:31 +0100 | tomboy64 | (~tomboy64@gateway/tor-sasl/tomboy64) |
2020-12-12 17:41:40 +0100 | <monochrom> | The irony being if you blog it and then just copying the blog post into the user guide, that's already infinitely better and at no extra cost. |
2020-12-12 17:42:32 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:2934:49bf:39ab:a879) |
2020-12-12 17:43:26 +0100 | <monochrom> | This happened to backpack too. The necessary information, even merely user-facing one, was not entered into the GHC user guide or the cabal user guide. Instead, it's a bunch of blog posts. |
2020-12-12 17:43:27 +0100 | <Kronic> | What is a decent web framework to start out with as a beginner that has an easy to follow tutorial? |
2020-12-12 17:44:19 +0100 | Jajik | (xchlup2@gateway/shell/fi.muni.cz/x-bbqnixzbgkvhiykp) |
2020-12-12 17:44:31 +0100 | xsarnik0 | (xsarnik@gateway/shell/fi.muni.cz/x-ddaekukwitkncfss) |
2020-12-12 17:44:32 +0100 | codeAlways | (uid272474@gateway/web/irccloud.com/x-owjpcrxiqhhkvogb) (Quit: Connection closed for inactivity) |
2020-12-12 17:44:44 +0100 | <monochrom> | In that case it was fortunate that the author also had a PhD thesis due, so what I did was I went straight for the thesis. An author has much more incentive in making a PhD thesis complete and coherent than making a blog so. |
2020-12-12 17:46:24 +0100 | <merijn> | monochrom: Man...trigger warnings >.> |
2020-12-12 17:46:45 +0100 | <sm[m]> | are we sure it's not in the doc ? |
2020-12-12 17:47:21 +0100 | gawen | (~gawen@movzbl.root.sx) (Quit: cya) |
2020-12-12 17:47:30 +0100 | <merijn> | monochrom: I come here to peacefully procrastinate from writing and you gotta throw that stuff out there in plain sight >.> |
2020-12-12 17:47:47 +0100 | <sm[m]> | (exarkun?) |
2020-12-12 17:48:03 +0100 | polyphem | (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) |
2020-12-12 17:48:14 +0100 | <sm[m]> | Kronic: scotty is simplest, yesod is most mature and fully documented, IHP is newest and funnest |
2020-12-12 17:48:21 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 17:48:34 +0100 | <Kronic> | Are they all actively maintained ? |
2020-12-12 17:48:45 +0100 | <sm[m]> | the last two are at least |
2020-12-12 17:49:36 +0100 | gawen | (~gawen@movzbl.root.sx) |
2020-12-12 17:49:49 +0100 | Entertainment | (~entertain@104.246.132.210) |
2020-12-12 17:49:53 +0100 | Entertainment | (~entertain@104.246.132.210) (Client Quit) |
2020-12-12 17:49:57 +0100 | <Kronic> | Seems Scotty is maintained, I'll give it a shot I guess |
2020-12-12 17:50:18 +0100 | knupfer | (~Thunderbi@200116b82c539b0098bdfcc50eb54675.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
2020-12-12 17:51:16 +0100 | LKoen | (~LKoen@214.175.9.109.rev.sfr.net) |
2020-12-12 17:52:05 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-12-12 17:52:15 +0100 | geekosaur | (ac3a541c@172.58.84.28) |
2020-12-12 17:52:52 +0100 | quantumvatican | (~private@lfbn-idf2-1-504-211.w86-246.abo.wanadoo.fr) (Quit: Lost terminal) |
2020-12-12 17:53:15 +0100 | justsomeguy | (~justsomeg@unaffiliated/--/x-3805311) () |
2020-12-12 17:54:02 +0100 | <geekosaur> | the FadeHooks could probably use some work, I was basically cribbing from other code without knowing what I was doing at the time |
2020-12-12 17:54:50 +0100 | <geekosaur> | so there may be a more fundamental bug to fix under this, since I didn't intend just throwing away actions |
2020-12-12 17:54:51 +0100 | <monochrom> | FadeHooks is an interesting name... |
2020-12-12 17:54:57 +0100 | <geekosaur> | whoops |
2020-12-12 17:55:03 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 17:55:05 +0100 | <geekosaur> | I keep forgetting what channel I'm in |
2020-12-12 18:03:50 +0100 | <maerwald> | is there a way to reasonably figure out the highest base constraint of a package without running a full resolution? |
2020-12-12 18:03:52 +0100 | HarveyPwca | (~HarveyPwc@c-98-220-98-201.hsd1.il.comcast.net) |
2020-12-12 18:04:19 +0100 | <exarkun> | sm[m]: It doesn't seem to be in the README which is a large part of the "official" docs, and I can't deduce it from the API docs, though maybe a more expert Haskeller could |
2020-12-12 18:04:50 +0100 | <sm[m]> | exarkun: just curious what's missing exactly ? I had a quick look and the conduit docs seem excellent |
2020-12-12 18:04:50 +0100 | hlysig | (~hlysig@mobile-194-144-46-247.3G.internet.is) (Remote host closed the connection) |
2020-12-12 18:04:53 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 258 seconds) |
2020-12-12 18:05:09 +0100 | <merijn> | sm[m]: They don't talk about how they're implemented, though |
2020-12-12 18:05:18 +0100 | <merijn> | sm[m]: Which is what he was asking :) |
2020-12-12 18:05:23 +0100 | <sm[m]> | what about the presentation ? |
2020-12-12 18:05:38 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 18:05:39 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:2934:49bf:39ab:a879) (Remote host closed the connection) |
2020-12-12 18:06:14 +0100 | <sm[m]> | if not there, then I agree it would be great to link some of that history to the readme. The posts (his, Gabriel's, maybe others) were very informative |
2020-12-12 18:06:57 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection) |
2020-12-12 18:09:52 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 18:10:05 +0100 | <sm[m]> | presentation seems rather detailed. Maybe that LambdaConf 2017 talk was published ? |
2020-12-12 18:10:46 +0100 | <sm[m]> | yes indeed, https://www.google.com/search?client=safari&rls=en&q=LambdaConf+2017+michael+snoyman&ie=UTF-8&oe=U… |
2020-12-12 18:11:38 +0100 | mananamenos | (~mananamen@84.122.202.215.dyn.user.ono.com) (Read error: Connection reset by peer) |
2020-12-12 18:11:47 +0100 | shenyi | (uid216035@gateway/web/irccloud.com/x-rigdbqxfostrvmoh) |
2020-12-12 18:12:13 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 264 seconds) |
2020-12-12 18:13:17 +0100 | Vulfe | (~vulfe@2600:1702:31b0:34e0:2934:49bf:39ab:a879) |
2020-12-12 18:13:36 +0100 | filwisher | (~filwisher@78.141.201.45) (Ping timeout: 240 seconds) |
2020-12-12 18:13:56 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 240 seconds) |
2020-12-12 18:15:01 +0100 | knupfer | (~Thunderbi@i59F7FF2B.versanet.de) |
2020-12-12 18:15:41 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2020-12-12 18:17:07 +0100 | juuandyy | (~juuandyy@90.166.144.65) |
2020-12-12 18:17:14 +0100 | amerigo | (uid331857@gateway/web/irccloud.com/x-vjipgcwqkmvmljqz) |
2020-12-12 18:17:28 +0100 | <exarkun> | sm[m]: I am trying to implement a first-ready composition function |
2020-12-12 18:17:50 +0100 | o1lo01ol1o | (~o1lo01ol1@31.22.216.239) |
2020-12-12 18:17:57 +0100 | <exarkun> | sm[m]: I don't know if this is even a coherent thing to want from Conduit |
2020-12-12 18:18:07 +0100 | <exarkun> | sm[m]: It seems like a basic thing to want so maybe there's a good reason it's missing |
2020-12-12 18:18:16 +0100 | <exarkun> | sm[m]: Or maybe it's not even missing but I can't recognize it in the docs |
2020-12-12 18:18:55 +0100 | boxscape | (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) (Ping timeout: 246 seconds) |
2020-12-12 18:19:12 +0100 | <sm[m]> | Maybe.. here I defer to others |
2020-12-12 18:19:27 +0100 | <exarkun> | If it is coherent and doesn't exist then I'm not sure what tools I should reach for to implement it |
2020-12-12 18:19:52 +0100 | <exarkun> | Threads to run each component separately from each other? |
2020-12-12 18:20:06 +0100 | <exarkun> | Or is there something in the Conduit implementation that would make some other strategy better? |
2020-12-12 18:20:29 +0100 | filwisher | (~filwisher@78.141.201.45) |
2020-12-12 18:20:55 +0100 | boxscape | (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) |
2020-12-12 18:22:18 +0100 | <exarkun> | I guess Conduit is probably all single threaded and it just calls functions to get a value from the first component and then calls some functions to pass it to the second, and so on ... but it seems like I have to guess or read the implementation to find out |
2020-12-12 18:22:26 +0100 | o1lo01ol1o | (~o1lo01ol1@31.22.216.239) (Ping timeout: 256 seconds) |
2020-12-12 18:22:39 +0100 | <dminuoso> | exarkun: Have you tried looking at the implementation? |
2020-12-12 18:23:06 +0100 | <merijn> | exarkun: Conduit is (mostly) intended for single threaded processing, yes |
2020-12-12 18:23:27 +0100 | <merijn> | exarkun: I think there are other libraries that couple conduits running in separte threads together |
2020-12-12 18:23:45 +0100 | <merijn> | exarkun: And, of course, I wrote my own library for parallelising a specific conduit stage |
2020-12-12 18:24:01 +0100 | dirediresalt | (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
2020-12-12 18:24:07 +0100 | xff0x | (~fox@2001:1a81:525b:e100:290b:d404:9fb5:ba71) (Ping timeout: 260 seconds) |
2020-12-12 18:24:13 +0100 | <merijn> | exarkun: https://hackage.haskell.org/package/broadcast-chan-conduit-0.2.1.1/docs/BroadcastChan-Conduit.html… |
2020-12-12 18:24:28 +0100 | <exarkun> | dminuoso: I've tried a bit but I'm sufficiently inexperienced that it's slow going |
2020-12-12 18:24:43 +0100 | <merijn> | That works nicely if one of your conduit stages does some slow IO |
2020-12-12 18:24:45 +0100 | <dminuoso> | exarkun: Which parts in particular were holding you back? |
2020-12-12 18:25:27 +0100 | <merijn> | One of my pipelines has to do slow IO requests (they take a few seconds to complete) and parMapM means I can have multiple requests "in flight" at a time (you'll lose ordering, though) |
2020-12-12 18:26:31 +0100 | <exarkun> | merijn: That looks like it might be a good source of hints for implementing what I want (which is kind of like a fan-out / fan-in component) |
2020-12-12 18:27:04 +0100 | acarrico | (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 260 seconds) |
2020-12-12 18:27:13 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Read error: Connection reset by peer) |
2020-12-12 18:27:21 +0100 | matryoshka` | (~matryoshk@184.75.223.227) |
2020-12-12 18:27:53 +0100 | <merijn> | exarkun: Eh...word of warning |
2020-12-12 18:28:09 +0100 | <exarkun> | dminuoso: It's not necessarily any single thing, more to do with the fact that much of the implementation relies on features or libraries that I'm not familiar with |
2020-12-12 18:28:12 +0100 | <merijn> | exarkun: The implementation is a horrific nightmare of low-level threading and async exception details :) |
2020-12-12 18:28:25 +0100 | Jeanne-Kamikaze | (~Jeanne-Ka@66.115.189.157) |
2020-12-12 18:28:30 +0100 | <merijn> | exarkun: fan out/fan in can be accomplished much easier, tbh! |
2020-12-12 18:29:08 +0100 | <merijn> | exarkun: fan in is simply "conduit repeatedly reads from a single channel with multiple writers" |
2020-12-12 18:29:23 +0100 | <merijn> | exarkun: fan out is simply "conduit repeatedly writes into a single channel with multiple readers" |
2020-12-12 18:29:56 +0100 | <merijn> | exarkun: And if you need a channel that can be closed when the upstream is done writing, I've got you covered too ;) https://hackage.haskell.org/package/broadcast-chan |
2020-12-12 18:30:47 +0100 | taurux | (~taurux@net-188-152-78-21.cust.dsl.teletu.it) |
2020-12-12 18:31:03 +0100 | <exarkun> | Well, I guess that's kind of what I figured. I posted that MVar-based code yesterday or the day before (which just used MVar as the simplest proof of concept while I figured out how to glue it into Conduit) |
2020-12-12 18:31:08 +0100 | mouseghost | (~draco@wikipedia/desperek) (Quit: mew wew) |
2020-12-12 18:31:24 +0100 | <exarkun> | but I got stuck actually gluing it into Conduit |
2020-12-12 18:33:00 +0100 | <exarkun> | My Haskell skill is at the level that even "conduit repeatedly reads from a single channel with multiple writers" is probably an hour to figure out (which is fine, part of my goal here is to learn more) |
2020-12-12 18:33:29 +0100 | <merijn> | exarkun: "awaitForever $ \x -> liftIO (putMVar m x)" :p |
2020-12-12 18:34:23 +0100 | <merijn> | exarkun: "forever $ readMVar m >>= yield" |
2020-12-12 18:34:43 +0100 | <merijn> | oh, wait, that's gotta be "liftIO (takeMVar m) >>= yield" |
2020-12-12 18:35:02 +0100 | <merijn> | (readMVar would read the same element each time and without liftIO it doesn't type check) |
2020-12-12 18:36:07 +0100 | <merijn> | % forever $ print True |
2020-12-12 18:36:13 +0100 | <yahb> | merijn: True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; True; |
2020-12-12 18:36:19 +0100 | <merijn> | (I was smart enough to try that in PM first :p) |
2020-12-12 18:36:58 +0100 | <dminuoso> | Why is cabal failing to find a build plan here? https://gist.github.com/dminuoso/4dc113de1a22ab5db5b6a8880e18e58a |
2020-12-12 18:37:00 +0100 | <dminuoso> | Im a bit stunned |
2020-12-12 18:37:08 +0100 | <merijn> | exarkun: You need slightly more complex logic to handle "when will nothing ever be written to this MVar again" |
2020-12-12 18:37:29 +0100 | <dminuoso> | Where could the constraint `haskell-generate:setup.Cabal>=1.10 && <1.25` possibly come from? |
2020-12-12 18:37:35 +0100 | <dminuoso> | Im not finding these bounds anywhere |
2020-12-12 18:37:53 +0100 | <merijn> | dminuoso: I think that can happen if something is installed in the global database? |
2020-12-12 18:38:17 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 18:38:20 +0100 | <merijn> | Dinner time, though |
2020-12-12 18:39:03 +0100 | Aleyna_ | (~Aleyna@4e69b241.skybroadband.com) |
2020-12-12 18:39:38 +0100 | fuzzypixelz | (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: fuzzypixelz) |
2020-12-12 18:39:59 +0100 | matryoshka` | (~matryoshk@184.75.223.227) (Read error: Connection reset by peer) |
2020-12-12 18:40:00 +0100 | Aleyna | (~Aleyna@4e69b241.skybroadband.com) (Ping timeout: 256 seconds) |
2020-12-12 18:40:15 +0100 | matryoshka | (~matryoshk@184.75.223.227) |
2020-12-12 18:40:25 +0100 | <dminuoso> | Well.. uh |
2020-12-12 18:41:01 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection) |
2020-12-12 18:41:04 +0100 | <dminuoso> | So the only special thing here, is that it has a custom Setup.hs |
2020-12-12 18:41:18 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 18:42:32 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection) |
2020-12-12 18:44:37 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 18:44:55 +0100 | taurux | (~taurux@net-188-152-78-21.cust.dsl.teletu.it) (Quit: ZNC 1.7.5 - https://znc.in) |
2020-12-12 18:45:13 +0100 | taurux | (~taurux@net-188-152-78-21.cust.vodafonedsl.it) |
2020-12-12 18:45:57 +0100 | xff0x | (~fox@2001:1a81:525b:e100:290b:d404:9fb5:ba71) |
2020-12-12 18:46:37 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
2020-12-12 18:47:22 +0100 | hth313 | (~user@node-1w7jr9qio22jw89j5t7q3mryw.ipv6.telus.net) |
2020-12-12 18:47:28 +0100 | mastarija | (~mastarija@93-136-128-137.adsl.net.t-com.hr) (Ping timeout: 260 seconds) |
2020-12-12 18:48:31 +0100 | <sm[m]> | dminuoso: we had a case like this recently where a typo in the cabal file (cabal-version: >=N) activated a complicated legacy mode in cabal |
2020-12-12 18:48:39 +0100 | LKoen | (~LKoen@214.175.9.109.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
2020-12-12 18:49:12 +0100 | acidjnk_new | (~acidjnk@p200300d0c719ff439996fb92bd8d62ee.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2020-12-12 18:49:24 +0100 | <hth313> | what is the best way to build on Windows? using mingw, DOS prompt or Powershell? |
2020-12-12 18:49:25 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 264 seconds) |
2020-12-12 18:49:27 +0100 | vnz | (~vnz@unaffiliated/vnz) (Quit: ZNC - http://znc.in) |
2020-12-12 18:49:57 +0100 | <sm[m]> | hth313: stack, in any of those |
2020-12-12 18:50:46 +0100 | hnOsmium0001 | (uid453710@gateway/web/irccloud.com/x-qeakgiprhskzevyk) |
2020-12-12 18:50:52 +0100 | knupfer | (~Thunderbi@i59F7FF2B.versanet.de) (Remote host closed the connection) |
2020-12-12 18:50:59 +0100 | boxscape | (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) (Ping timeout: 260 seconds) |
2020-12-12 18:51:19 +0100 | vnz | (~vnz@51.15.143.225) |
2020-12-12 18:51:19 +0100 | vnz | (~vnz@51.15.143.225) (Changing host) |
2020-12-12 18:51:19 +0100 | vnz | (~vnz@unaffiliated/vnz) |
2020-12-12 18:52:52 +0100 | mastarija | (~mastarija@93-136-128-137.adsl.net.t-com.hr) |
2020-12-12 18:53:14 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) |
2020-12-12 18:53:49 +0100 | <adamCS> | exarkun: slightly OT, but streamly (https://hackage.haskell.org/package/streamly) is more...up-front about how to handle concurrency, etc. Maybe that would be a help? |
2020-12-12 18:54:22 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov) |
2020-12-12 18:54:48 +0100 | <exarkun> | adamCS: maybe! thanks for the tip, I'll check it out |
2020-12-12 18:54:50 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
2020-12-12 18:55:12 +0100 | <hth313> | I have a complex UNIX setup, using GHC, cabal, cmake (for a library), controlled by a custom Python script(does a lot more than just building), I try mingw, endless problems with paths, terminfo not there. I tried with mingw |
2020-12-12 18:55:18 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit) |
2020-12-12 18:55:37 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
2020-12-12 18:55:52 +0100 | <hth313> | I am wondering if it works without mingw, if I can go for native Windows scripting instead? |
2020-12-12 18:56:16 +0100 | <sm[m]> | hth313: haha, that on windows will be a whole nother kettle of fish. Maybe WSL2 is best |
2020-12-12 18:56:22 +0100 | <hth313> | mingw cannot even run cmake properly :( |
2020-12-12 18:56:47 +0100 | <hth313> | and that is from the mingw shell command line |
2020-12-12 18:57:03 +0100 | <sm[m]> | s/Maybe // |
2020-12-12 18:57:47 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 258 seconds) |
2020-12-12 18:58:25 +0100 | <hth313> | I want to build native Windows command line apps for end users, no UNIX for them |
2020-12-12 18:58:42 +0100 | mastarija | (~mastarija@93-136-128-137.adsl.net.t-com.hr) (Quit: Leaving) |
2020-12-12 18:58:51 +0100 | <hth313> | I thought mingw would be good for building native apps, but that seems not to be the case |
2020-12-12 18:59:28 +0100 | <hth313> | good when you come from a UNIX setting, to port it and have native Windows binaries that work like Windows command line programs in the end |
2020-12-12 19:00:07 +0100 | <hth313> | WSL2 means the end user would need to use WSL2 also? |
2020-12-12 19:02:01 +0100 | <Guest81293> | if i have e (iterate f x) that produces a list of xs that eventually stabilize - example: ([9,6,4,3,2,1,2,1,1,1,1...]) - what is the canonical way of getting the first repeated element? (in this case the 1) |
2020-12-12 19:02:30 +0100 | matryoshka` | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
2020-12-12 19:02:33 +0100 | <Guest81293> | *a |
2020-12-12 19:02:45 +0100 | <c_wraith> | There isn't any great solution, though there are clever answers |
2020-12-12 19:02:48 +0100 | matryoshka | (~matryoshk@184.75.223.227) (Read error: Connection reset by peer) |
2020-12-12 19:03:49 +0100 | <monochrom> | The "why functional programming matters" paper by John Hughes shows one way. |
2020-12-12 19:04:10 +0100 | <sm[m]> | hth313: generally a pure haskell app built with cabal or (more easily) stack will just work for any windows user, and they won't need any haskell tools installed. Yours is more complicated though |
2020-12-12 19:04:21 +0100 | <Guest81293> | now im curious |
2020-12-12 19:04:25 +0100 | <monochrom> | I also show it in my class. http://www.cs.utoronto.ca/~trebla/CSCC24-2020-Summer/03-haskell-evaluation.html#lazygood |
2020-12-12 19:06:47 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) |
2020-12-12 19:07:05 +0100 | <c_wraith> | > (\xs -> dropWhile (uncurry (/=)) . zip xs . tail $ xs) [4, 3, 7, 2, 9, 3, 5, 5, 23] -- too clever by half. Also incomplete for the sake of illustration |
2020-12-12 19:07:08 +0100 | <lambdabot> | [(5,5),(5,23)] |
2020-12-12 19:07:33 +0100 | <Guest81293> | ha |
2020-12-12 19:08:16 +0100 | matryoshka` | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
2020-12-12 19:09:11 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
2020-12-12 19:10:12 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Read error: Connection reset by peer) |
2020-12-12 19:10:29 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
2020-12-12 19:16:19 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 19:16:31 +0100 | boxscape | (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) |
2020-12-12 19:19:45 +0100 | matryoshka | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
2020-12-12 19:20:25 +0100 | fuzzypixelz | (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
2020-12-12 19:20:34 +0100 | <xerox_> | > let dup (x:y:_) | x == y = x; dup (_:xs) = dup xs in dup $ iterate (\x -> x/2 + 1/x) 1.0 |
2020-12-12 19:20:37 +0100 | <lambdabot> | 1.414213562373095 |
2020-12-12 19:23:01 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 264 seconds) |
2020-12-12 19:23:10 +0100 | acidjnk_new | (~acidjnk@p200300d0c719ff439996fb92bd8d62ee.dip0.t-ipconnect.de) |
2020-12-12 19:25:16 +0100 | <Kronic> | WSL2 would mean that, yes hth313, also as an aside, WSL is an incredibly frustrating experience imo. I tried it for a long time until I eventually swapped to vmware player and I've had no problems since. Would recommend. |
2020-12-12 19:25:41 +0100 | juuandyy | (~juuandyy@90.166.144.65) (Ping timeout: 256 seconds) |
2020-12-12 19:26:31 +0100 | fuzzypixelz | (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Remote host closed the connection) |
2020-12-12 19:26:58 +0100 | <hth313> | Kronic: all these UNIX-like environments on Windows are just various degrees of pain and should be avoided whenever possible |
2020-12-12 19:28:50 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 19:30:19 +0100 | <__monty__> | I thought WSL2 basically *was* linux running in a VM with some nice integrations on top? |
2020-12-12 19:30:24 +0100 | dyeplexer | (~lol@unaffiliated/terpin) (Remote host closed the connection) |
2020-12-12 19:31:26 +0100 | <hth313> | So if Python/GHC works in Windows, it sounds as it would be better to use a native Windows shell. I basically wonder if GHC and cabal (with many libraries to install) require mingw or similar to work properly |
2020-12-12 19:32:45 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 240 seconds) |
2020-12-12 19:33:23 +0100 | juuandyy | (~juuandyy@90.166.144.65) |
2020-12-12 19:34:08 +0100 | kritzefitz | (~kritzefit@212.86.56.80) (Ping timeout: 260 seconds) |
2020-12-12 19:34:25 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
2020-12-12 19:35:06 +0100 | <Kronic> | __monty__ be that as it may, it's filled with gotchas and all of the things that people didn't think about it. Every time I tried it it was a disappointment. |
2020-12-12 19:35:18 +0100 | <sm[m]> | I think they do, eg stack and maybe GHC include it (or msys2 or some such) |
2020-12-12 19:37:52 +0100 | D3R43 | (5d2282d7@93-34-130-215.ip49.fastwebnet.it) |
2020-12-12 19:38:31 +0100 | <D3R43> | Hello! I am approaching haskell, I was trying to configure the terminal in order to have a working environment within ubuntu. I was trying to install haskell-language-server, to do that I installed stack (v. 2.5.1) but it keeps telling me "Cabal file info not found for aeson-1.5.2.0". This error doesn't tell me anything at all, cabal didn't even |
2020-12-12 19:38:31 +0100 | <D3R43> | try to install it (the guide I'm following, https://github.com/haskell/haskell-language-serve, says I could either choose stack or cabal and completely randomly I chosen the first). The error message doesn't say anything to me, can someone help me find my way? |
2020-12-12 19:40:12 +0100 | <glguy> | The easiest way I know how to install hls is via ghcup |
2020-12-12 19:40:24 +0100 | <glguy> | But maybe a stack user has gotten it working with stack |
2020-12-12 19:40:46 +0100 | matryoshka | (~matryoshk@184.75.223.227) |
2020-12-12 19:43:18 +0100 | <merijn> | D3R43: Not directly related to your problem, but: https://gist.github.com/merijn/8152d561fb8b011f9313c48d876ceb07 |
2020-12-12 19:43:27 +0100 | neiluj | (~jco@91-167-203-101.subs.proxad.net) (Remote host closed the connection) |
2020-12-12 19:43:41 +0100 | <merijn> | D3R43: I am guessing you are using stack in combination with hpack? |
2020-12-12 19:44:02 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 19:44:53 +0100 | hiroaki | (~hiroaki@2a02:908:4b1b:20a0::7af8) (Ping timeout: 272 seconds) |
2020-12-12 19:44:56 +0100 | <sm[m]> | D3R43: the easiest easiest way is to use VS Code's Haskell extension which sets it up for you |
2020-12-12 19:46:42 +0100 | <merijn> | sm[m]: I'm not sure that "switching entire editors" is in fact the easiest way :) |
2020-12-12 19:47:00 +0100 | <glguy> | It's certainly the easiest way if your goal is HLS support |
2020-12-12 19:47:09 +0100 | <glguy> | but not if your goal is to use a specific editor |
2020-12-12 19:47:22 +0100 | <maerwald> | merijn: depends, heh... ever tried getting proper typescript support in vim? |
2020-12-12 19:47:47 +0100 | <merijn> | maerwald: No, because I live in a blissful world where Javascript (and by extension typescript) are a problem for "other people" |
2020-12-12 19:48:01 +0100 | <merijn> | The magic of the "Someone Else's Problem-field!" |
2020-12-12 19:48:50 +0100 | geekosaur | (ac3a541c@172.58.84.28) (Ping timeout: 245 seconds) |
2020-12-12 19:49:06 +0100 | <sm[m]> | I say offer the easiest solution first, it's often what a new poster wants |
2020-12-12 19:49:30 +0100 | <sm[m]> | we can swiftly get more complicated as needed |
2020-12-12 19:49:36 +0100 | livvy | (~livvy@gateway/tor-sasl/livvy) |
2020-12-12 19:50:21 +0100 | <sm[m]> | but, I did somehow assume D3R43 was on windows, I don't know why I did that |
2020-12-12 19:52:28 +0100 | <merijn> | sm[m]: Because the previous discussion was by someone else about windows and your brain short-circuited? ;) |
2020-12-12 19:52:47 +0100 | Sgeo | (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
2020-12-12 19:52:48 +0100 | <sm[m]> | no doubt. Sorry :) |
2020-12-12 19:54:56 +0100 | dagnabbit | (~thelounge@140.82.8.179) (Ping timeout: 240 seconds) |
2020-12-12 19:55:12 +0100 | knupfer | (~Thunderbi@200116b82c539b009c1c9f21e3904fbb.dip.versatel-1u1.de) |
2020-12-12 19:55:36 +0100 | blackdog | (~blackdog@198.211.112.85) (Ping timeout: 240 seconds) |
2020-12-12 19:55:43 +0100 | blackdog | (~blackdog@198.211.112.85) |
2020-12-12 19:56:00 +0100 | dagnabbit | (~thelounge@140.82.8.179) |
2020-12-12 19:56:35 +0100 | hiroaki | (~hiroaki@2a02:908:4b1b:20a0::4e53) |
2020-12-12 19:56:56 +0100 | Aleksejs | (~Aleksejs@haskell.lv) (Ping timeout: 240 seconds) |
2020-12-12 19:56:56 +0100 | catern | (~catern@104.131.201.120) (Ping timeout: 240 seconds) |
2020-12-12 19:57:56 +0100 | drewolson | (~drewolson@64.227.24.16) (Ping timeout: 240 seconds) |
2020-12-12 19:58:16 +0100 | ornxka | (~ornxka@unaffiliated/ornx) (Ping timeout: 240 seconds) |
2020-12-12 19:58:16 +0100 | drewolson | (~drewolson@64.227.24.16) |
2020-12-12 19:59:09 +0100 | Aleksejs | (~Aleksejs@haskell.lv) |
2020-12-12 19:59:10 +0100 | ornxka | (~ornxka@unaffiliated/ornx) |
2020-12-12 19:59:23 +0100 | catern | (~catern@104.131.201.120) |
2020-12-12 19:59:30 +0100 | motherfsck | (~motherfsc@unaffiliated/motherfsck) (Quit: quit) |
2020-12-12 20:01:16 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 20:01:16 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov) |
2020-12-12 20:01:32 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
2020-12-12 20:01:35 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-12-12 20:01:44 +0100 | geekosaur | (ac3a541c@172.58.84.28) |
2020-12-12 20:02:23 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 20:03:02 +0100 | berberman | (~berberman@unaffiliated/berberman) (Ping timeout: 264 seconds) |
2020-12-12 20:03:31 +0100 | berberman | (~berberman@unaffiliated/berberman) |
2020-12-12 20:04:00 +0100 | gproto23 | (~gproto23@unaffiliated/gproto23) |
2020-12-12 20:04:58 +0100 | gproto23 | (~gproto23@unaffiliated/gproto23) (Client Quit) |
2020-12-12 20:05:46 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit) |
2020-12-12 20:06:03 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
2020-12-12 20:06:09 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 260 seconds) |
2020-12-12 20:06:27 +0100 | kritzefitz | (~kritzefit@212.86.56.80) |
2020-12-12 20:07:33 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit) |
2020-12-12 20:08:04 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
2020-12-12 20:08:34 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit) |
2020-12-12 20:08:49 +0100 | solonarv | (~solonarv@astrasbourg-157-1-27-135.w90-40.abo.wanadoo.fr) (Ping timeout: 246 seconds) |
2020-12-12 20:08:59 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
2020-12-12 20:09:47 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-12-12 20:12:04 +0100 | <D3R43> | Great feedback guys. @sm[m] I'd rather not change to VS code, even though I know it is very lightweight and handy. Unfortunately I have to stick to the terminal only. I will look into ghcup thanks @glguy . @merijn I love not having to bother with javascript too! |
2020-12-12 20:12:32 +0100 | <D3R43> | So basically I'm just looking for something that will optimize my vim-experience with haskell ^^ |
2020-12-12 20:12:36 +0100 | shf | (~sheaf@2a01:cb19:80cc:7e00:159e:9ac:2ff5:a704) (Read error: Connection reset by peer) |
2020-12-12 20:13:23 +0100 | <merijn> | D3R43: ghcide (which is what haskell-lang-server is built on top of) + ALE seems to work well for me |
2020-12-12 20:13:53 +0100 | <merijn> | D3R43: Might need this too: https://github.com/merijn/dotfiles/blob/master/dotfiles/vim/autoload/ale_linters/haskell/ghcide.vim |
2020-12-12 20:14:20 +0100 | filwisher | (~filwisher@78.141.201.45) (Quit: ZNC 1.7.1 - https://znc.in) |
2020-12-12 20:14:26 +0100 | <glguy> | My favorite vim GHC experience is having a ghcid window open adjacent to my editor |
2020-12-12 20:15:01 +0100 | filwisher | (~filwisher@78.141.201.45) |
2020-12-12 20:15:29 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
2020-12-12 20:16:05 +0100 | <Kronic> | you could try onivim, it's basically vim and vscode glued together |
2020-12-12 20:16:09 +0100 | elliott__ | (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) |
2020-12-12 20:16:11 +0100 | <D3R43> | Yup, i'm planning on having two tmux sessions, one with ghci and one with vim, I was just looking for vim plugins providing syntax highlighting and mybe lyinting |
2020-12-12 20:16:20 +0100 | <D3R43> | *linting |
2020-12-12 20:16:22 +0100 | <glguy> | D3R43: not ghci, but ghcid |
2020-12-12 20:16:33 +0100 | <glguy> | well, I like having both, but ghcid tends to be more important |
2020-12-12 20:17:05 +0100 | <D3R43> | OK, I was about to ask about whether ghcid was a typo or not, I'm looking that up, don't know what that is |
2020-12-12 20:17:30 +0100 | <glguy> | It automatically reloads a ghci session that it wraps when files change |
2020-12-12 20:17:38 +0100 | <sm[m]> | ghc/ghci/ghcid/ghcide all different :) |
2020-12-12 20:17:38 +0100 | <MarcelineVQ> | ghcid is the bee's knees |
2020-12-12 20:17:40 +0100 | <glguy> | so you get feedback as soon as you save |
2020-12-12 20:17:45 +0100 | <merijn> | Well |
2020-12-12 20:17:55 +0100 | <glguy> | You can put _ holes in your file to get type information at a location |
2020-12-12 20:17:57 +0100 | <merijn> | You get feedback as soon as "cabal build" gets to the file you changed >.> |
2020-12-12 20:18:06 +0100 | <glguy> | no, it doesn't cabal build |
2020-12-12 20:18:09 +0100 | <glguy> | it ghci reloads |
2020-12-12 20:18:15 +0100 | <merijn> | Like, ghcid is at best "ok" the feedback cycle is entirely too long |
2020-12-12 20:18:18 +0100 | <glguy> | and with -fno-code or whatever it is, that's pretty fast |
2020-12-12 20:18:30 +0100 | <merijn> | glguy: By default, if you use ghci, but that doesn't work for multi package projects |
2020-12-12 20:18:39 +0100 | <merijn> | Then you need to use cabal build |
2020-12-12 20:18:41 +0100 | <Kronic> | I use stack build with file-watch and vs code, it has been working for me fairly well so far |
2020-12-12 20:18:41 +0100 | <glguy> | merijn: It doesn't work when you're editing multiple projects |
2020-12-12 20:18:41 +0100 | <sm[m]> | sure it does (can) |
2020-12-12 20:18:57 +0100 | <glguy> | merijn: but it works on multi-component projects when you're working on one component |
2020-12-12 20:19:06 +0100 | <sm[m]> | ghcid -c 'stack repl all', or ghcid ...-idir1 -idir2 |
2020-12-12 20:19:31 +0100 | <glguy> | merijn: and what you're describing is unlikely to be the case for a new user learning Haskell |
2020-12-12 20:19:38 +0100 | <MarcelineVQ> | merijn: You must have some pretty big projects, the feedback has always been very fast for me. Regardless for someone starting out it's gonna be plenty fast |
2020-12-12 20:19:49 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2020-12-12 20:20:37 +0100 | <merijn> | MarcelineVQ: Yes, some of the bigger project can easily take a few minutes to build if you change one of the files that is transitively included everywhere |
2020-12-12 20:20:43 +0100 | <merijn> | ghcide is orders of magnitude faster for that |
2020-12-12 20:20:49 +0100 | <Kronic> | perhaps the fact that you guys have different computers is playing a role here |
2020-12-12 20:21:06 +0100 | <merijn> | Kronic: Considering this is on a machine with 30+ cores and 192GB RAM I doubt it ;) |
2020-12-12 20:21:28 +0100 | <glguy> | merijn: considering that then yes, different computers |
2020-12-12 20:21:32 +0100 | <Kronic> | What's the single core speed on that? |
2020-12-12 20:21:32 +0100 | <merijn> | MarcelineVQ: Sure, ghcid is pretty good |
2020-12-12 20:21:50 +0100 | <D3R43> | Wow, ok, a lot of feedback, thanks everyone |
2020-12-12 20:22:05 +0100 | <merijn> | MarcelineVQ: My point is that everyone doesn't say "ghcid is pretty good for just starting out", everyone always says "I don't understand why anyone would ever want something other than ghcid" |
2020-12-12 20:22:23 +0100 | <glguy> | everyone certainly doesn't always say that |
2020-12-12 20:22:23 +0100 | <merijn> | If people would say "ghcid is pretty good for starting out", sure, no complaints |
2020-12-12 20:22:42 +0100 | <merijn> | glguy: Well, there;s always at least one person saying that whenever someone talks editor tools :) |
2020-12-12 20:22:57 +0100 | <sm[m]> | correcting myself.. I heard stack repl has an "all" target but I don't know what it is. You certainly can use ghcid for multi-package projects though, and it's fast. I've been doing it for years |
2020-12-12 20:23:00 +0100 | <MarcelineVQ> | hehe, well I've never needing anything but ghcid, but no that doesn't extend to others |
2020-12-12 20:23:04 +0100 | <monochrom> | I don't understand why anyone would ever want IDE. There! :) |
2020-12-12 20:23:11 +0100 | <merijn> | sm[m]: Stack repl fakes it |
2020-12-12 20:23:14 +0100 | <glguy> | /nick everyone |
2020-12-12 20:23:23 +0100 | <merijn> | sm[m]: It just dumps everything into a single component and hopes it works |
2020-12-12 20:23:34 +0100 | <sm[m]> | fine |
2020-12-12 20:23:46 +0100 | <merijn> | Which, admittedly, it often will |
2020-12-12 20:23:56 +0100 | <sm[m]> | I'll paste an actual command I use, so I don't screw up: |
2020-12-12 20:23:56 +0100 | <sm[m]> | stack exec -- ghci -rtsopts -Wall -fno-warn-unused-do-bind -fno-warn-name-shadowing -fno-warn-missing-signatures -fno-warn-orphans -fno-warn-type-defaults -ihledger-lib -ihledger-lib/other/ledger-parse -ihledger -ihledger-ui -ihledger-web -ihledger-web/app -DPATCHLEVEL=32 -DDEVELOPMENT -DVERSION="\"1.20\"" hledger/Hledger/Cli/Main.hs |
2020-12-12 20:23:56 +0100 | <monochrom> | In fact, I have a Kevlin Henney talk to back me up: https://www.youtube.com/watch?v=FyCYva9DhsI&feature=youtu.be&t=1858 |
2020-12-12 20:23:59 +0100 | <merijn> | But! iirc the work on multi-component ghci is getting merged soon! |
2020-12-12 20:24:25 +0100 | <sm[m]> | -iPKGDIR is the thing |
2020-12-12 20:24:30 +0100 | <merijn> | monochrom: I just want warnings highlighted in my editor and the ability to query "type under cursor" :p |
2020-12-12 20:24:55 +0100 | <monochrom> | I already have those. |
2020-12-12 20:25:18 +0100 | <merijn> | So do I with ghcide ;) |
2020-12-12 20:26:06 +0100 | elliott__ | (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) (Quit: WeeChat 2.9) |
2020-12-12 20:26:26 +0100 | <monochrom> | OK, good for you. I have those from emacs and haskell-mode or dante. For 1/10 of the installation hassle. |
2020-12-12 20:26:59 +0100 | <Kronic> | I don't understand, would people not want a good standalone IDE for haskell to exist? |
2020-12-12 20:27:14 +0100 | <blissful> | i wouldn't want to need a new IDE just for haskell |
2020-12-12 20:27:23 +0100 | <merijn> | Kronic: tbh, if it'd require me to use anything other than vim I personally wouldn't care |
2020-12-12 20:27:42 +0100 | <merijn> | Kronic: but then, I'm the kinda person who also works on 100k SLOC C++ applications in vim, rather than an IDE, so... |
2020-12-12 20:27:44 +0100 | <monochrom> | Kronic: I think https://ro-che.info/ccc/26 sums up human nature. |
2020-12-12 20:27:56 +0100 | <geekosaur> | different people are different. I never developed the habit of using an IDE for any language |
2020-12-12 20:28:07 +0100 | <Kronic> | I think it's evident considering how much code there is already written in Haskell that you don't need one. My question is what is wrong with one existing? |
2020-12-12 20:28:29 +0100 | <sm[m]> | Kronic: in haskell land, many of us are conditioned to hair shirts, bread and dry water :) |
2020-12-12 20:28:49 +0100 | <maerwald> | merijn: vim was written for and by C/C++ programmers, where source files are 10k lines and you need a way to navigate without losing your sanity |
2020-12-12 20:29:02 +0100 | <maerwald> | for many "modern" languages, this doesn't apply anymore |
2020-12-12 20:29:03 +0100 | <merijn> | Kronic: Nothing |
2020-12-12 20:29:18 +0100 | <blissful> | hmm, so on this topic, is anyone else using hls with coc in vim? |
2020-12-12 20:29:26 +0100 | <merijn> | Kronic: But, selection bias has obviously led to "most established Haskellers not caring about/needing IDEs" |
2020-12-12 20:29:42 +0100 | <merijn> | Kronic: And the people who want/need an IDE are obviously not versed enough in Haskell to write one |
2020-12-12 20:29:58 +0100 | <Kronic> | Seems like an unfortunate situation |
2020-12-12 20:30:17 +0100 | <merijn> | Kronic: So, the *practical* reason why people react antagonistically to "Haskell needs an IDE" is the silent part "and you guys who don't like IDEs should write it for me, for free" |
2020-12-12 20:30:54 +0100 | <monochrom> | I don't oppose other people using IDEs. |
2020-12-12 20:30:56 +0100 | <merijn> | I don't think anyone reasonable objects to the idea of "a Haskell IDE existing", but plenty object to getting blamed for the lack of one existing |
2020-12-12 20:30:59 +0100 | <Kronic> | To be fair, I don't think anyone is looking for it to be free. If there was an extremely clean well put together haskell IDE I'd happily pay whatever price that comes at |
2020-12-12 20:31:31 +0100 | <Kronic> | If not to support haskell development, but also to potentially give myself a new experience in working with this language |
2020-12-12 20:31:34 +0100 | <merijn> | Kronic: Yeah, but the market for that is too small for someone to create one and become the next IntelliJ |
2020-12-12 20:31:45 +0100 | <monochrom> | My angle is it's the IDE users that inflict on me "why are you not using an IDE? you're a criminal" and/or "I won't start learning Haskell until an IDE is up and running". |
2020-12-12 20:32:27 +0100 | elliott_ | (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) |
2020-12-12 20:33:19 +0100 | elliott_ | (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) (Client Quit) |
2020-12-12 20:33:22 +0100 | <sm[m]> | Kronic: also for years we had attempts at a nice IDE, which would always consume much sweat and end in tears. But just lately the situation has changed, VS Code + Haskell now works easily and well for many |
2020-12-12 20:33:31 +0100 | <monochrom> | Kronic: Empirical data has shown that the paid IDE for Mac, and the free IDE from FPComplete (see that comic again), have flopped. |
2020-12-12 20:33:52 +0100 | saki_ | (~saki@2a02:a03f:487f:9b00:9d1f:944e:1a51:aa7a) |
2020-12-12 20:34:38 +0100 | <monochrom> | Let me also tell you a piece of history of IRC math channels. |
2020-12-12 20:35:05 +0100 | <maerwald> | free IDE from FPComplete? |
2020-12-12 20:35:12 +0100 | <monochrom> | For like 20 years people in IRC math channels kept wishing for an "IRC LaTeX plugin". |
2020-12-12 20:35:39 +0100 | <monochrom> | Said plugin actually happened. Pidgin had one. |
2020-12-12 20:35:41 +0100 | <geekosaur> | intero? |
2020-12-12 20:35:46 +0100 | lep-delete | (~lep@94.31.80.94) (Read error: Connection reset by peer) |
2020-12-12 20:36:05 +0100 | <sm[m]> | maerwald: they had a web-based one years ago |
2020-12-12 20:36:08 +0100 | <monochrom> | Said people went on to wish for an "IRC LaTeX plugin" ignoring the IRC LaTeX plugin in Pidgin. |
2020-12-12 20:36:29 +0100 | fuzzypixelz | (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
2020-12-12 20:36:30 +0100 | <monochrom> | This is why I say that that comic is so piercing in exposing human nature. |
2020-12-12 20:36:33 +0100 | lep-delete | (~lep@94.31.80.94) |
2020-12-12 20:36:38 +0100 | <monochrom> | It is not just you people. |
2020-12-12 20:36:41 +0100 | lep-delete | test |
2020-12-12 20:37:06 +0100 | <Kronic> | I think there are too many black marks around the word IDE. My point simply put is that anything you can download which gives you an easy to use out of the box haskell experience is a good thing. Paid, free or some other model. I don't want an IDE personally because I'm pretty happy with my workflow but I wouldn't object to one existing, and I would in fact support it. |
2020-12-12 20:37:09 +0100 | test | Guest72755 |
2020-12-12 20:37:26 +0100 | <monochrom> | Also I wish everyone respected that "data" is plural and I would write "Empirical data have shown..." |
2020-12-12 20:37:30 +0100 | Guest72755 | lep-delete |
2020-12-12 20:37:49 +0100 | <MarcelineVQ> | but if you have two androids you have datas |
2020-12-12 20:37:52 +0100 | <merijn> | monochrom: Hard disagree |
2020-12-12 20:38:00 +0100 | <merijn> | monochrom: Data is clearly an uncountable mass noun |
2020-12-12 20:38:25 +0100 | <D3R43> | Wow, thanks for the great feedback everyone! I'm a bit overwalmed with the answers you provided ... So basically which benefits does hls offer over plain ghcid? I hope this doesn't start a flame war ... |
2020-12-12 20:38:37 +0100 | <geekosaur> | "codes" |
2020-12-12 20:38:37 +0100 | <monochrom> | No, please use "information" for the uncountable. |
2020-12-12 20:38:47 +0100 | <merijn> | geekosaur: I hate HPC people so much |
2020-12-12 20:38:50 +0100 | <sm[m]> | Kronic: certainly, no argument there. It's always one of the community's biggest wishes in surveys |
2020-12-12 20:38:58 +0100 | <merijn> | Gets under my skin at every conference |
2020-12-12 20:39:10 +0100 | <hpc> | merijn: hey! |
2020-12-12 20:39:36 +0100 | <sm[m]> | D3R43: basically instead of showing you the errors in a separate terminal window, it can (when integrated with an editor like VS Code) show them inline in your code |
2020-12-12 20:39:38 +0100 | <[exa]> | merijn: h p c people are somehow specific in saying data wrong? |
2020-12-12 20:39:50 +0100 | <merijn> | [exa]: No, they say "codes" instead of "code" |
2020-12-12 20:39:59 +0100 | <[exa]> | what the |
2020-12-12 20:40:00 +0100 | <merijn> | It's never "this HPC code" it's always "these HPC codes" >.< |
2020-12-12 20:40:05 +0100 | <D3R43> | @sm[m] does it apply to vim too? |
2020-12-12 20:40:05 +0100 | <lambdabot> | Unknown command, try @list |
2020-12-12 20:40:28 +0100 | <monochrom> | I want to say "codes" too. |
2020-12-12 20:40:29 +0100 | <MarcelineVQ> | what about people like me who never know when to say datum |
2020-12-12 20:40:33 +0100 | <sm[m]> | D3R43: any editor with supports Language Server Protocol. I'm sure vim does, but only in VS Code is it easy to set up |
2020-12-12 20:40:37 +0100 | <[exa]> | merijn: are they like really the people who do programming or just the supercomputer owners? |
2020-12-12 20:40:48 +0100 | <[exa]> | because the latter category _is_ saying a lot of bs |
2020-12-12 20:40:57 +0100 | <hpc> | are they speaking in their first language? |
2020-12-12 20:40:58 +0100 | <[exa]> | s/owners/managers/ etc |
2020-12-12 20:41:02 +0100 | <monochrom> | I am tired of "these two pieces of code" please allow me to just write "these two codes" and be done with it. |
2020-12-12 20:41:16 +0100 | <monochrom> | English is such a piece of work. |
2020-12-12 20:41:18 +0100 | <hpc> | i have only ever heard that before from people who aren't perfectly fluent |
2020-12-12 20:41:21 +0100 | <MarcelineVQ> | monochrom: programming isn't about generalizing to solve problems :O |
2020-12-12 20:41:31 +0100 | <[exa]> | monochrom: prograaaaaaaaams *trumpet meme* |
2020-12-12 20:41:31 +0100 | <sm[m]> | D3R43: ie yes, it can apply to vim too, if you can figure out how |
2020-12-12 20:42:04 +0100 | <monochrom> | Yeah OK I'll use "programs" and "code fragments/snippets". |
2020-12-12 20:42:16 +0100 | <[exa]> | snippets, great! |
2020-12-12 20:42:38 +0100 | <[exa]> | `code' collides with coding theory, that gets quite irritating sometimes |
2020-12-12 20:43:17 +0100 | <[exa]> | the worst part is mceliece-style cryptography where certain people talk about code that codes information using codes (respectively: programs, encrypt, codes) |
2020-12-12 20:43:23 +0100 | <monochrom> | Yeah, I recognize that "codes" is already taken: "two codes" = two encodings, esp. in coding theory. |
2020-12-12 20:43:32 +0100 | drincruz | (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 256 seconds) |
2020-12-12 20:46:30 +0100 | <monochrom> | Hey I found a way to 1-up that game! |
2020-12-12 20:46:42 +0100 | <monochrom> | code that codes the Napolean code using codes |
2020-12-12 20:47:02 +0100 | juuandyy | (~juuandyy@90.166.144.65) (Ping timeout: 258 seconds) |
2020-12-12 20:47:05 +0100 | solonarv | (~solonarv@astrasbourg-157-1-27-135.w90-40.abo.wanadoo.fr) |
2020-12-12 20:51:07 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:bbcd:2474:9519:9fb5:8678) |
2020-12-12 20:51:46 +0100 | saki__ | (~saki@2a02:a03f:487f:9b00:9d1f:944e:1a51:aa7a) |
2020-12-12 20:52:01 +0100 | saki_ | (~saki@2a02:a03f:487f:9b00:9d1f:944e:1a51:aa7a) (Ping timeout: 272 seconds) |
2020-12-12 20:53:28 +0100 | fuzzypixelz | (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Remote host closed the connection) |
2020-12-12 20:55:28 +0100 | elliott_ | (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) |
2020-12-12 20:55:28 +0100 | da39a3ee5e6b4b0d | (~da39a3ee5@2403:6200:8876:bbcd:2474:9519:9fb5:8678) (Ping timeout: 258 seconds) |
2020-12-12 20:55:55 +0100 | Codaraxis | (Codaraxis@gateway/vpn/mullvad/codaraxis) |
2020-12-12 20:57:12 +0100 | carlomagno | (~cararell@148.87.23.5) (Ping timeout: 272 seconds) |
2020-12-12 20:58:39 +0100 | elliott_ | (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) (Client Quit) |
2020-12-12 21:02:02 +0100 | saki__ | (~saki@2a02:a03f:487f:9b00:9d1f:944e:1a51:aa7a) (Quit: Konversation terminated!) |
2020-12-12 21:02:56 +0100 | <Guest81293> | when ghci tells me a module is a member of a hidden package, what does it mean and how do i unhide it? google is confusing me |
2020-12-12 21:03:11 +0100 | <merijn> | Guest81293: It means you didn't specify it as a build dependency |
2020-12-12 21:03:34 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
2020-12-12 21:03:41 +0100 | doct0rhu | (~orctarorg@pool-72-88-158-154.nwrknj.fios.verizon.net) (Remote host closed the connection) |
2020-12-12 21:03:41 +0100 | <merijn> | "Hey, I see you're importing this module that happens to be in this package, but you didn't tell me that was a dependency you were using" |
2020-12-12 21:04:49 +0100 | DataComputist | (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) (Quit: Leaving...) |
2020-12-12 21:04:51 +0100 | <Guest81293> | im not using a cabal file nor do i want to if i dont have to. are there any disadvantages to unhiding a package? |
2020-12-12 21:05:43 +0100 | <Guest81293> | the package is unordered-containers and im just solving aoc |
2020-12-12 21:05:44 +0100 | <merijn> | You can't unhide packages so much, as well tell ghc which packages it's allowed to use |
2020-12-12 21:06:07 +0100 | <merijn> | I forget the flag for specifying packages to GHC, though |
2020-12-12 21:06:17 +0100 | <merijn> | I just made a single cabal file for all AOC exercises, tbh |
2020-12-12 21:06:34 +0100 | <Guest81293> | :set -package maybe? |
2020-12-12 21:07:52 +0100 | DataComputist | (~lumeng@static-50-43-26-251.bvtn.or.frontiernet.net) |
2020-12-12 21:07:53 +0100 | <geekosaur> | -package, yes |
2020-12-12 21:08:39 +0100 | aev | (~aev@pool-108-5-152-94.nwrknj.fios.verizon.net) |
2020-12-12 21:08:45 +0100 | <aev> | join ##java |
2020-12-12 21:08:51 +0100 | <aev> | whoops |
2020-12-12 21:08:59 +0100 | <Guest81293> | someone tells me i can also do sudo ghc-pkg expose unordered-containers. any reason not to? |
2020-12-12 21:11:05 +0100 | shf | (~sheaf@2a01:cb19:80cc:7e00:d59b:49eb:ac7c:3f2a) |
2020-12-12 21:12:05 +0100 | g4br13l | (bf600db4@191.96.13.180) |
2020-12-12 21:12:43 +0100 | <Guest81293> | this is confusing |
2020-12-12 21:12:52 +0100 | whatisRT | (~whatisRT@ip5b416a33.dynamic.kabel-deutschland.de) (Ping timeout: 246 seconds) |
2020-12-12 21:13:13 +0100 | <sm[m]> | Guest81293 (IRC): perhaps ignore that someone, that's not something anyone needs to do normally |
2020-12-12 21:13:18 +0100 | <aev> | If you know what you're doing I don't see why you wouldn't want to expse hidden packages. |
2020-12-12 21:13:42 +0100 | <merijn> | tbh, figuring out how to get that to work without a cabal file is probably more work than adding a simple cabal file will ever be |
2020-12-12 21:13:43 +0100 | <aev> | Usually packages are hidden to protect us. |
2020-12-12 21:15:18 +0100 | <sm[m]> | ghci -package unordered-containers aoc.hs # fine |
2020-12-12 21:16:06 +0100 | whatisRT | (~whatisRT@ip5b416a33.dynamic.kabel-deutschland.de) |
2020-12-12 21:17:31 +0100 | D3R43 | (5d2282d7@93-34-130-215.ip49.fastwebnet.it) (Remote host closed the connection) |
2020-12-12 21:18:25 +0100 | g4br13l | (bf600db4@191.96.13.180) (Ping timeout: 245 seconds) |
2020-12-12 21:18:29 +0100 | <Guest81293> | tbh when it comes to cabal i usually don't know what i'm doing |
2020-12-12 21:18:54 +0100 | o1lo01ol1o | (~o1lo01ol1@31.22.216.239) |
2020-12-12 21:19:04 +0100 | <Guest81293> | thanks |
2020-12-12 21:20:27 +0100 | <aev> | I'm having problems with ghcid after installing it using cabal install ghcid. When I start it, it tells me it isn't trying to start ghcid, but instead it starts cabal repl with a whole bunch of options that it then complains about that it doesn't recognize them, and refuses to start. I reinstalled ghcid but it does the same thing. I'm on a fresh debian instance under WSL. Suggestions on how to fix that? |
2020-12-12 21:21:04 +0100 | <merijn> | aev: Which version of "cabal"? |
2020-12-12 21:21:41 +0100 | <merijn> | Guest81293: A super minimal example (other files in the repo are spoilers for previous days, obviously): https://github.com/merijn/AdventOfCode2020/blob/master/advent.cabal |
2020-12-12 21:21:49 +0100 | <sm[m]> | Guest81293 (IRC): when you want to save the list of packages required for your program, next step up is a cabal or stack "script", where you list them at the top of the file. When it gets more complicated still, a package |
2020-12-12 21:22:25 +0100 | <aev> | merijn: it says "cabal-install version 2.2.0.0" |
2020-12-12 21:23:48 +0100 | o1lo01ol1o | (~o1lo01ol1@31.22.216.239) (Ping timeout: 272 seconds) |
2020-12-12 21:23:48 +0100 | <merijn> | aev: Which options does it not recognise? (also 2.2 is kinda old, you should probably upgrade to 3.0 or 3.2) |
2020-12-12 21:23:58 +0100 | elliott_ | (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) |
2020-12-12 21:24:27 +0100 | <aev> | Odd: I installed it yesterday. Why wouldn't it give me the latest version? |
2020-12-12 21:24:56 +0100 | <aev> | I'm going to try upgrading first and see what happens. |
2020-12-12 21:25:14 +0100 | elliott_ | (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) (Client Quit) |
2020-12-12 21:25:14 +0100 | ddellacosta | (dd@gateway/vpn/mullvad/ddellacosta) |
2020-12-12 21:25:34 +0100 | <hyperisco> | I have a Digest SHA1 and I want a binary string, how do I get that? |
2020-12-12 21:25:48 +0100 | <hyperisco> | like a ByteString where the characters are bytes |
2020-12-12 21:26:15 +0100 | <merijn> | aev: "cabal install cabal-install" should work (or at least, put the newest version wherever cabal normally puts executables) |
2020-12-12 21:26:21 +0100 | <merijn> | aev: Where did you install it from? |
2020-12-12 21:26:23 +0100 | <sm[m]> | aev: it's easy to install a not-latest thing, depending how you do it |
2020-12-12 21:26:37 +0100 | <hyperisco> | the docs say to look here but this doesn't seem to give any clues https://hackage.haskell.org/package/memory-0.15.0/docs/Data-ByteArray.html |
2020-12-12 21:26:40 +0100 | <merijn> | hyperisco: I think there's a "convert" function somewhere |
2020-12-12 21:26:49 +0100 | <merijn> | hyperisco: I've got the code using it somewhere |
2020-12-12 21:27:36 +0100 | <merijn> | hyperisco: https://github.com/merijn/Belewitte/blob/master/benchmark-analysis/src/Types.hs#L45 |
2020-12-12 21:27:52 +0100 | <merijn> | oh, wait, that's reversed |
2020-12-12 21:28:13 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 21:28:33 +0100 | <merijn> | hyperisco: https://github.com/merijn/Belewitte/blob/d15a4a128925ca4e8f9ee14d85940085e88e6a1c/benchmark-analys… |
2020-12-12 21:28:35 +0100 | elliott_ | (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) |
2020-12-12 21:28:36 +0100 | <merijn> | That's the one |
2020-12-12 21:28:43 +0100 | <aplainzetakind> | How can I match a given Text with Megaparsec? |
2020-12-12 21:28:43 +0100 | <hyperisco> | I think convert works, type checks at least, lets see |
2020-12-12 21:28:57 +0100 | <aplainzetakind> | Text.Megaparsec.Char.string basically. |
2020-12-12 21:29:04 +0100 | boxscape | (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) (Ping timeout: 260 seconds) |
2020-12-12 21:29:14 +0100 | <aplainzetakind> | Can't use that because Tokens Text ~ Text apparently. |
2020-12-12 21:29:57 +0100 | <aev> | merijn: doing that now. I installed it from the packages available in the Debian apt list. There were 2 versions and I chose the newest. I'm quite sure the first thing I did after that was upgrading. Maybe I missed it. |
2020-12-12 21:30:15 +0100 | <hyperisco> | great thanks merijn |
2020-12-12 21:30:24 +0100 | <geekosaur> | hash -r? |
2020-12-12 21:30:28 +0100 | mputz | (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
2020-12-12 21:30:41 +0100 | <hyperisco> | so, I could be crazy, but I am appending the hash of a file to the file for the purposes of verifying the integrity of the file |
2020-12-12 21:30:50 +0100 | <sm[m]> | string (also named chunk) is the way, aplainzetakind |
2020-12-12 21:31:08 +0100 | <sm[m]> | aev: if installing with cabal, you must say cabal install cabal-install-3.2.0.0 to be sure |
2020-12-12 21:32:37 +0100 | <merijn> | aev: Oh, yeah, debian just installs stupidly old stuff |
2020-12-12 21:33:06 +0100 | <merijn> | aplainzetakind: Oh, do you have OverloadedStrings enabled? |
2020-12-12 21:33:39 +0100 | <merijn> | aplainzetakind: Char.string works, but you need to pass it Text, not String |
2020-12-12 21:33:59 +0100 | <merijn> | hyperisco: You are right, that is crazy ;) |
2020-12-12 21:34:10 +0100 | <hyperisco> | what would you do |
2020-12-12 21:34:12 +0100 | <merijn> | Well, depending on what you're verifying against |
2020-12-12 21:34:40 +0100 | <merijn> | hyperisco: Well, step 1 is identifying the goal. Corrupted downloads? Read errors? Active tampering? Unique identification of a file? |
2020-12-12 21:35:07 +0100 | <hyperisco> | you seemed more sure at the start there |
2020-12-12 21:36:13 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 264 seconds) |
2020-12-12 21:36:14 +0100 | <aplainzetakind> | sm[m]: For some reason I keep getting can't match [Char] with Text things. |
2020-12-12 21:36:16 +0100 | <merijn> | hyperisco: Well, "append checksum + signing" is a usual approach to authenticate files, but the exact order and operations are rather subtle to get right |
2020-12-12 21:36:28 +0100 | <merijn> | aplainzetakind: Because you don't have OverloadedStrings enabled :) |
2020-12-12 21:36:42 +0100 | <merijn> | aplainzetakind: If you write: Char.string "foo" |
2020-12-12 21:36:55 +0100 | <merijn> | Then "foo" is a String, and for Text input Char.string wants Text |
2020-12-12 21:37:08 +0100 | <merijn> | So you need to either do: Char.string (T.pack "foo") |
2020-12-12 21:37:15 +0100 | <merijn> | Or enable OverloadedStrings |
2020-12-12 21:37:16 +0100 | <aplainzetakind> | merijn: But I do. |
2020-12-12 21:37:24 +0100 | <merijn> | aplainzetakind: GHC disagrees :) |
2020-12-12 21:38:06 +0100 | <sm[m]> | @where paste perhaps, aplainzetakind |
2020-12-12 21:38:06 +0100 | <lambdabot> | Help us help you: please paste full code, input and/or output at eg https://paste.tomsmeding.com |
2020-12-12 21:39:38 +0100 | <aplainzetakind> | The problem is, I'm trying to change all my AoC stuff from String to Text. |
2020-12-12 21:39:52 +0100 | <aplainzetakind> | So there are many modules that are complaining. |
2020-12-12 21:40:14 +0100 | <aplainzetakind> | I first defined a global synonym type Input = String |
2020-12-12 21:40:32 +0100 | <aplainzetakind> | Changed all the parsing stuff's signatures to that Input. |
2020-12-12 21:41:21 +0100 | <aplainzetakind> | Then made parsing functions polymorphic, (Token s ~ Char, Stream s) => s -> ParseResult sort of. |
2020-12-12 21:41:40 +0100 | <aplainzetakind> | Then finally switched that Input = String to Input = Text. |
2020-12-12 21:41:51 +0100 | <aplainzetakind> | So the situation is pretty horrible :) |
2020-12-12 21:42:02 +0100 | <aplainzetakind> | Let me try to localize it. |
2020-12-12 21:42:32 +0100 | <sm[m]> | yeah, often the best thing is to back out your change and try again in much smaller steps |
2020-12-12 21:46:40 +0100 | <ezzieyguywuf> | How do I use =~ with a Data.Text? https://hackage.haskell.org/package/regex-tdfa-1.3.1.0/docs/Text-Regex-TDFA.html#v:-61--126- |
2020-12-12 21:47:02 +0100 | <ezzieyguywuf> | I've tried `"string" =~ "pattern" :: (Text, Text, Text, [Text])` but this does not work I get a kind error |
2020-12-12 21:47:18 +0100 | <ezzieyguywuf> | (with :set -XOverloadedStrings of course) |
2020-12-12 21:49:36 +0100 | cads | (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 240 seconds) |
2020-12-12 21:49:39 +0100 | psy-bot | (~yaaic@2600:380:5233:3c24:60c2:d5c2:5799:f2fe) |
2020-12-12 21:49:45 +0100 | <aplainzetakind> | OK, it seems it's not a fundamental issue. |
2020-12-12 21:50:04 +0100 | <aplainzetakind> | Just some incompatible functions here and there. |
2020-12-12 21:50:26 +0100 | toorevitimirp | (~tooreviti@117.182.180.221) (Remote host closed the connection) |
2020-12-12 21:50:39 +0100 | <aplainzetakind> | For instance, I have `many lowerChar` somewhere, which is of course [Char]. |
2020-12-12 21:50:57 +0100 | <merijn> | aplainzetakind: "fmap T.pack" ;) |
2020-12-12 21:51:03 +0100 | <aplainzetakind> | Should I just pack it in such cases? |
2020-12-12 21:51:04 +0100 | <aplainzetakind> | OK |
2020-12-12 21:51:10 +0100 | DavidEichmann | (~david@62.110.198.146.dyn.plus.net) |
2020-12-12 21:51:14 +0100 | <aplainzetakind> | Not inefficient? |
2020-12-12 21:51:25 +0100 | <merijn> | aplainzetakind: Well, it'd be "better" (in terms of efficiency) to use, like, takeWhileP |
2020-12-12 21:51:29 +0100 | <merijn> | But for AOC it won't matter |
2020-12-12 21:52:07 +0100 | <aplainzetakind> | Even megaparsec doesn't matter in that respect. |
2020-12-12 21:52:23 +0100 | DavidEichmann | (~david@62.110.198.146.dyn.plus.net) (Remote host closed the connection) |
2020-12-12 21:52:35 +0100 | <aplainzetakind> | Just for the sake of exercise. |
2020-12-12 21:53:16 +0100 | <aev> | So, building cabal-install failed because it couldn't locate zlib... gotta love fresh linux distros that lack everything. |
2020-12-12 21:53:26 +0100 | matryoshka | (~matryoshk@184.75.223.227) (Quit: ZNC 1.8.2 - https://znc.in) |
2020-12-12 21:53:29 +0100 | <merijn> | aplainzetakind: I mean, realistically it won't matter for any parser on still you start wanting to parse, like gigabytes of data |
2020-12-12 21:53:29 +0100 | <hyperisco> | are there archive types that include hashes so that they self-verify their contents? |
2020-12-12 21:53:44 +0100 | <dminuoso> | sm[m], merijn; Hah it's not a bug, it's a feature: https://github.com/haskell/cabal/issues/5278 |
2020-12-12 21:53:54 +0100 | <geekosaur> | just need zlib-dev, I suspect |
2020-12-12 21:53:58 +0100 | <dminuoso> | Guess I should make it a habit to run `cabal check` when running into unexpected issues |
2020-12-12 21:54:08 +0100 | <merijn> | dminuoso: oh, that was actually in the back of my mind |
2020-12-12 21:55:24 +0100 | <dminuoso> | Think Im gonna satisfy the feature request and rig in a diagnostic that tells the user why it introduced a non-obvious constraint. |
2020-12-12 21:55:39 +0100 | <sm[m]> | dminuoso: that's the one. A "feature". |
2020-12-12 21:56:50 +0100 | <hyperisco> | well what specifically about zlib? |
2020-12-12 21:57:23 +0100 | <sm[m]> | (I take it back, that's not the one from the other day. This is another one.) |
2020-12-12 21:59:42 +0100 | <sm[m]> | hyperisco: I think geekosaur was replying to aev |
2020-12-12 22:00:15 +0100 | <geekosaur> | I thought hyperisco was as well… |
2020-12-12 22:00:23 +0100 | Guest81293 | z0 |
2020-12-12 22:01:09 +0100 | <dminuoso> | aev: "[...] distros that lack everything" - are you suggesting a linux distribution should install everything by default? |
2020-12-12 22:01:45 +0100 | <geekosaur> | one might be used to e.g.arch where there's no difference between runtime and devel packages |
2020-12-12 22:02:09 +0100 | <geekosaur> | (granting that that is part of why they botched their haskell ecosystem) |
2020-12-12 22:02:26 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 22:03:09 +0100 | <sm[m]> | poor old arch.. they need a spokesperson in here :) |
2020-12-12 22:04:34 +0100 | hyperisco | (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 256 seconds) |
2020-12-12 22:04:43 +0100 | acarrico | (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) |
2020-12-12 22:05:51 +0100 | matryoshka | (~matryoshk@184.75.223.227) |
2020-12-12 22:06:17 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 22:07:24 +0100 | <aev> | dminuoso: on the contrary. I would like an installer package to identify which dependencies it requires before it starts building stuff. It's implicit dependencies like zlib in this case that consume a lot of time when they're missing. The package maintainer assumes that that lib is available. And on a fresh system it isn't. So it's their fault and they need to fix it. I'll see if I can send them a pull |
2020-12-12 22:07:26 +0100 | Jesin | (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving) |
2020-12-12 22:07:30 +0100 | <aev> | request for that. |
2020-12-12 22:07:49 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 246 seconds) |
2020-12-12 22:08:35 +0100 | <merijn> | aev: The Haskell package? How would you expect it to install zlib? |
2020-12-12 22:09:14 +0100 | Jesin | (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) |
2020-12-12 22:10:17 +0100 | matryoshka` | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
2020-12-12 22:10:20 +0100 | <sm[m]> | aev is suggesting that apt install cabal-install should also install some very common requirements like zlib-dev, I'm guessing |
2020-12-12 22:10:31 +0100 | matryoshka | (~matryoshk@184.75.223.227) (Read error: Connection reset by peer) |
2020-12-12 22:10:56 +0100 | <aev> | No. I'm suggesting it alerts us of missing libs before it starts a minutes-long building effort, only to break after half an hour. |
2020-12-12 22:11:09 +0100 | <sm[m]> | aev, which "it" ? |
2020-12-12 22:11:12 +0100 | <sm[m]> | cabal ? |
2020-12-12 22:11:25 +0100 | <aev> | The cabal-install package. |
2020-12-12 22:11:28 +0100 | <geekosaur> | that much it ought to be doing already, I think |
2020-12-12 22:11:32 +0100 | <sm[m]> | I agree that would be nice |
2020-12-12 22:11:33 +0100 | son0p | (~son0p@181.136.122.143) |
2020-12-12 22:11:41 +0100 | <merijn> | It depends if it's using pkg-config depends |
2020-12-12 22:11:49 +0100 | <merijn> | Or just blindly assuming zlib is there |
2020-12-12 22:11:54 +0100 | <sm[m]> | libtinfo-dev libtinfo5 are two other libs often needed on debian |
2020-12-12 22:12:07 +0100 | <geekosaur> | but theres a bootstrapping problem with cabal-install since the normal checks are part of cabal-install… |
2020-12-12 22:12:20 +0100 | <merijn> | Ah |
2020-12-12 22:12:23 +0100 | <merijn> | It's not cabal-install |
2020-12-12 22:12:36 +0100 | <merijn> | cabal-install depends on the zlib package and that doesn't check whether zlib is present |
2020-12-12 22:12:51 +0100 | <aev> | Right now it looks like it blindly assumes it's there. Rust packages have the same problem: the package devs have those dependencies themselves so they forget to include a check. |
2020-12-12 22:12:53 +0100 | <merijn> | Because (by default) pkg-config is disabled in the zlib package |
2020-12-12 22:13:30 +0100 | <merijn> | aev: The is no generic way to check whether a package is installed, though |
2020-12-12 22:13:40 +0100 | <merijn> | Nor is there a generic way to check if a C library is available |
2020-12-12 22:14:32 +0100 | knupfer | (~Thunderbi@200116b82c539b009c1c9f21e3904fbb.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
2020-12-12 22:14:39 +0100 | <aev> | Cabal-install gets installed by the cabal executable. There does not need to be anything generic. It can be completely custom. |
2020-12-12 22:15:13 +0100 | <merijn> | aev: It's not cabal-install package that is wrong, it's the zlib package |
2020-12-12 22:15:22 +0100 | <merijn> | aev: And how do you propose this custom thing would work? |
2020-12-12 22:15:41 +0100 | <sm[m]> | I think it would be reasonable and convenient for debian's ghc package to depend on debian's zlib-dev, libtinfo-dev, libtinfo5 packages |
2020-12-12 22:15:56 +0100 | <aev> | I don't know yet. At this point I'm at the stage of complaining because I have a fresh environment. |
2020-12-12 22:16:03 +0100 | <sm[m]> | a pity Clint is not here |
2020-12-12 22:16:16 +0100 | DTZUZU | (~DTZUZU@205.ip-149-56-132.net) (Ping timeout: 240 seconds) |
2020-12-12 22:16:52 +0100 | <aev> | Maybe the cabal package could depend on zlib-dev. That would fix the problem for cabal-install. |
2020-12-12 22:16:55 +0100 | <merijn> | aev: The problem is, as it usually is, that "why doesn't the package just check for X?" is that sensibly doing anything like that is generally impossible unless you assume very specific systems |
2020-12-12 22:17:20 +0100 | <sm[m]> | aev, I think ghc would be better, because you might be using stack or just ghc itself |
2020-12-12 22:17:25 +0100 | <merijn> | aev: Right, but that only works if we're talking actual linux distro packages |
2020-12-12 22:17:46 +0100 | <aev> | sm: agreed |
2020-12-12 22:17:48 +0100 | <merijn> | aev: The actual haskell package can't depend on "zlib-dev", because there's no notion of what "zlib-dev" even is |
2020-12-12 22:18:02 +0100 | <aev> | merijn: now that's a problem. |
2020-12-12 22:18:20 +0100 | <merijn> | aev: It's an unfixable problem |
2020-12-12 22:18:47 +0100 | <merijn> | aev: zlib-dev is a specific package on a specific distro. How could you possibly specify a dependency on a C library that works on all distros, macOS, and windows? |
2020-12-12 22:19:04 +0100 | <merijn> | aev: Answer: You can't, since there's no shared package manager that exists on all 3 |
2020-12-12 22:19:12 +0100 | <aev> | How does the builder figure out it needs zlib and then fail, if it doesn't know what zlib is? It doesn't even say it needs zlib-dev. It complains about zlib. Of course the distro has zlib by default, but not zlib-dev. |
2020-12-12 22:19:13 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 260 seconds) |
2020-12-12 22:19:39 +0100 | <merijn> | (not to mention macOS having multiple package managers, windows not really having one at all, and all linux distro using different ones with names that might be zlib, zlib-dev, or really anything |
2020-12-12 22:20:08 +0100 | <merijn> | aev: It just passed "-lzlib" to the system linker and the system linker checks if a library by that name exists and then uses it |
2020-12-12 22:20:35 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-12-12 22:20:41 +0100 | <aev> | So... can't the installer do that in the beginning of its process? |
2020-12-12 22:20:51 +0100 | <merijn> | aev: zlib-dev isn't the name of a library, it's the name of the package that has a library named zlib. But some distros tag libraries with -dev fixers |
2020-12-12 22:21:24 +0100 | <merijn> | aev: Not really, because there is no portable way to ask a linker of a library exists |
2020-12-12 22:21:55 +0100 | <merijn> | You'd need to ship some kind of dummy object file (which aren't portable either!) and try and link that with the linker and see if it fails |
2020-12-12 22:22:20 +0100 | <merijn> | aev: The rabbit hole just keeps going and going and getting less portable and more system specific as you go |
2020-12-12 22:22:30 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 22:23:03 +0100 | <merijn> | aev: The end result is something like ghcup/rustup which basically are just a long list of distro/OS specific instructions to get everything installed |
2020-12-12 22:23:10 +0100 | <geekosaur> | and then there's what happens if its there but has its own dependency for some reason |
2020-12-12 22:23:50 +0100 | <aplainzetakind> | Does Text have any disadvantages compared to String? |
2020-12-12 22:24:03 +0100 | <merijn> | aev: And that's the only real thing that works "write a script per possible distro/OS that fetches dependencies", which is not really something you wanna somehow embed inside, say, cabal-install. Which is why non have the build tools in any language do that |
2020-12-12 22:24:19 +0100 | <merijn> | aplainzetakind: Eh, it's harder to pattern match and list functions don't work? That's about it |
2020-12-12 22:24:38 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 22:24:42 +0100 | <aplainzetakind> | That's what I thought. |
2020-12-12 22:24:45 +0100 | <dolio> | Text uses slightly more memory for very small strings, I think. |
2020-12-12 22:24:49 +0100 | <c_wraith> | Text literals aren't as efficient |
2020-12-12 22:24:54 +0100 | <merijn> | dolio: tbh, I doubt it |
2020-12-12 22:25:05 +0100 | <sm[m]> | all that said.. there's two or three C libs that are typically missing and we've been helping new haskellers figure this out for years. There must be some things that can be done to reduce the hassle |
2020-12-12 22:25:13 +0100 | aev | (~aev@pool-108-5-152-94.nwrknj.fios.verizon.net) (Read error: Connection reset by peer) |
2020-12-12 22:25:14 +0100 | <dolio> | But that's not really worth worrying about. |
2020-12-12 22:25:20 +0100 | aev | (~aev@pool-108-5-152-94.nwrknj.fios.verizon.net) |
2020-12-12 22:25:20 +0100 | <merijn> | dolio: String has like 24 bytes per character, I dunno how big the overhead of Text is, but it's probably close unless you have like 1 character strings :p |
2020-12-12 22:25:24 +0100 | <aev> | Gah, my network connection broke again |
2020-12-12 22:25:41 +0100 | <c_wraith> | merijn: that overhead doesn't always exist. |
2020-12-12 22:25:41 +0100 | <aplainzetakind> | Can't one create an interface like the list one for strings using PatternSynonyms? |
2020-12-12 22:25:55 +0100 | <Clint> | sm[m]: if someone files a wishlist bug those dev packages could be added as some kind of weak dependencies |
2020-12-12 22:26:20 +0100 | <merijn> | aplainzetakind: Well, Text already has Text versions of most list functions, so...someone already did? :p |
2020-12-12 22:26:31 +0100 | <merijn> | aplainzetakind: And you can probably use PatternSynonyms, yes |
2020-12-12 22:26:37 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Remote host closed the connection) |
2020-12-12 22:26:51 +0100 | <sm[m]> | ah hi Clint. So that idea of making debian's ghc depend on say zlib-dev, libtinfo-dev, libtinfo5 might fly ? |
2020-12-12 22:27:11 +0100 | <c_wraith> | Text has bad ergonomics for anything you expect to be a code literal |
2020-12-12 22:27:35 +0100 | <geekosaur> | I think the intended fix for Text vs. String is backpack? but it's taking a while to actuallly happen because of missing build tool support |
2020-12-12 22:27:54 +0100 | <aev> | Debian keeps breaking the installs. Going to use ghcup instead. |
2020-12-12 22:28:12 +0100 | <merijn> | geekosaur: With ezyang doing pytorch I don't see it happening any time soon :p |
2020-12-12 22:28:46 +0100 | <c_wraith> | I'd use Text for input on anything I care about text input handling. But if you are writing functions that accept values you expect to be literals in code, String is a lot less likely to be a hassle and performance will usually be a wash. |
2020-12-12 22:30:06 +0100 | bitmapper | (uid464869@gateway/web/irccloud.com/x-npxxmdhrbnlnnshm) (Quit: Connection closed for inactivity) |
2020-12-12 22:31:48 +0100 | <sm[m]> | c_wraith++ |
2020-12-12 22:33:13 +0100 | aev | (~aev@pool-108-5-152-94.nwrknj.fios.verizon.net) (Ping timeout: 264 seconds) |
2020-12-12 22:33:41 +0100 | knupfer | (~Thunderbi@i59F7FF2B.versanet.de) |
2020-12-12 22:34:32 +0100 | <c_wraith> | Haskell doesn't have a "string problem". It has options for a lot of different cases, because it turns out that strings are *not* actually one representation fits all. |
2020-12-12 22:35:05 +0100 | <sm[m]> | Haskell has a "batteries" and "imports" problem :) |
2020-12-12 22:35:36 +0100 | <c_wraith> | yeah, those are fair. lots of options, surprisingly verbose to combine them |
2020-12-12 22:36:00 +0100 | <Kronic> | meh, I think it's not unreasonable to say that people coming from somewhere else expect it to simple when Haskell has made it harder than what they think it should be. Speaking as one of those people right now |
2020-12-12 22:36:38 +0100 | <c_wraith> | Though if you're writing an application rather than a library, you can do a lot to reduce the import overhead by creating a custom set of default imports. |
2020-12-12 22:37:03 +0100 | royal_screwup21 | (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
2020-12-12 22:37:06 +0100 | <c_wraith> | Unfortunately, you can't do that with qualified imports, so it has its limits |
2020-12-12 22:38:27 +0100 | <sm[m]> | Kronic: it's not unreasonable. The main problem is how to get from here to a clean modern complete standard library and language defaults that makes all the easy/right things easy |
2020-12-12 22:38:38 +0100 | <Clint> | sm[m]: cabal-install sounded more reasonable, i think.. if you're using debian-packaged libraries with debian-packaged ghc, all those will be pulled in for you automatically and you won't have to worry about it |
2020-12-12 22:40:04 +0100 | <sm[m]> | Clint: ie the cabal-install and stack packages could depend on those common C libs, maybe ? |
2020-12-12 22:40:12 +0100 | <Kronic> | Sure. I mean, if the biggest problem a language has is "working with text is a little bit annoying for someone new" then that's a good problem to have in comparison to what could be the case. I don't have any idea how to make it any easier, because much of Haskell is still very new to me. My only point was it's definitely not obvious why all of the various options exist at first |
2020-12-12 22:41:08 +0100 | <Clint> | sm[m]: yeah, but it would have to be a weak dependency because those things aren't actual dependencies |
2020-12-12 22:41:27 +0100 | <Clint> | so like a Recommends or a Suggests |
2020-12-12 22:41:28 +0100 | <sm[m]> | cool. aev was ready to submit requests.. come back aev.. |
2020-12-12 22:42:04 +0100 | <sm[m]> | Clint: when does apt install those ? automatically, or does it just mention them in the output ? |
2020-12-12 22:43:29 +0100 | danvet | (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 272 seconds) |
2020-12-12 22:44:40 +0100 | chang | (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
2020-12-12 22:45:19 +0100 | <sm[m]> | Kronic: yes, it's similar for time, dates, maps, vectors, ... I believe |
2020-12-12 22:46:25 +0100 | matryoshka` | (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Read error: Connection reset by peer) |
2020-12-12 22:46:29 +0100 | matryoshka | (~matryoshk@184.75.223.227) |
2020-12-12 22:46:33 +0100 | geekosaur | (ac3a541c@172.58.84.28) (Remote host closed the connection) |
2020-12-12 22:46:35 +0100 | jespada | (~jespada@90.254.245.49) |
2020-12-12 22:47:27 +0100 | <Sose> | I made a new servant stack project with `stack new todo servant` but I can't get it to build... I don't really understand these error messages. https://gist.github.com/Sose/d955fd1d1149abf4070eb6a9cd2216a7 |
2020-12-12 22:48:07 +0100 | Noldorin | (~noldorin@unaffiliated/noldorin) |
2020-12-12 22:48:51 +0100 | SomeoneSerge | (~someone-s@5.253.207.86) |
2020-12-12 22:48:54 +0100 | <merijn> | sm[m]: tbh, I'd like to know which languages do have a clean complete standard library and are easy to install :p |
2020-12-12 22:49:13 +0100 | <merijn> | sm[m]: I guess maybe Go? But their standard library is "just pull HEAD from github", afaict |
2020-12-12 22:49:40 +0100 | Noldorin | (~noldorin@unaffiliated/noldorin) (Client Quit) |
2020-12-12 22:49:50 +0100 | <MarcelineVQ> | complete for who >:< |
2020-12-12 22:50:04 +0100 | nineonine | (~nineonine@S01061cabc0b095f3.vf.shawcable.net) |
2020-12-12 22:50:21 +0100 | <merijn> | Kronic: On the one hand it can be tricky, but otoh, when was the last time a language you used was powerful enough for vectors to be something that could be implemented well in a 3rd party library? ;) |
2020-12-12 22:50:30 +0100 | <merijn> | (or Text or...) |
2020-12-12 22:50:31 +0100 | <sm[m]> | merijn: it's all relative of course, but people usually say python's or ruby's stdlib are more complete and easy to work with |
2020-12-12 22:50:34 +0100 | <merijn> | MarcelineVQ: Well, that too |
2020-12-12 22:50:51 +0100 | <merijn> | sm[m]: Python's standard lib is also filled with deprecated junk people keep having to tell people not to use :) |
2020-12-12 22:51:14 +0100 | <dolio> | Is this the same python where people are ranting about all the string types? |
2020-12-12 22:51:24 +0100 | <merijn> | dolio: Probably, but they are wrong |
2020-12-12 22:51:25 +0100 | <sm[m]> | I know you like to argue, but can you please just.. see my point ? :) |
2020-12-12 22:51:36 +0100 | <merijn> | If anything, we don't have enough string types :) |
2020-12-12 22:51:42 +0100 | <dolio> | Yeah, the 'string problem' is that programmers don't understand strings. :) |
2020-12-12 22:51:47 +0100 | <merijn> | sm[m]: I'm not disagreeing that haskell is a bit messy |
2020-12-12 22:52:04 +0100 | <merijn> | sm[m]: It's just that, imho, people have a romanticised view of how well it's "solved" in other languages |
2020-12-12 22:52:27 +0100 | <merijn> | Usually the solution in other languages is "we threw man-decades at things until it was manually fixed in all cases" |
2020-12-12 22:52:31 +0100 | <sm[m]> | thanks. Let's not let that be an excuse not to look at ways to improve |
2020-12-12 22:52:35 +0100 | <merijn> | Which, fine, that's good for users |
2020-12-12 22:52:43 +0100 | <merijn> | But not something we can easily replicate |
2020-12-12 22:52:54 +0100 | <merijn> | And in the grand scheme of things Haskell really isn't that bad |
2020-12-12 22:53:47 +0100 | <Kronic> | Haskellers have such a stranger vocabulary, otoh/machinery are phrases used constantly, I'll catch myself saying it eventually I guess |
2020-12-12 22:53:52 +0100 | <merijn> | You should try installing LLVM and libstdc++ without relying on a package manager...it's a disaster that no mortal can decipher, but LLVM is big enough to be packaged by "other people" so no one has to notice :) |
2020-12-12 22:53:56 +0100 | <Kronic> | or words, I mean |
2020-12-12 22:54:31 +0100 | <Sose> | merijn: oh no :D |
2020-12-12 22:55:26 +0100 | <merijn> | Sose: "GHC is so big, it's 1.5 GB!" *looks at LLVM with it's 40 GB build dir and 3.5 GB final install size* 'heh...yeah, you're right...' |
2020-12-12 22:57:06 +0100 | chang | (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2020-12-12 22:58:19 +0100 | <merijn> | Like, I get it, we all want everything to be a single button labelled "DWIM", but things are complicated and lots of the bad things with cabal and Haskell in general aren't bad because we design bad solutions, but because cross-platform and portable things are hard, especially when not designed into the architecture from the start |
2020-12-12 22:58:51 +0100 | <Clint> | sm[m]: it installs Recommends automatically unless you specifically opt out of that |
2020-12-12 22:59:36 +0100 | vfaronov | (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov) |
2020-12-12 22:59:42 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 23:00:17 +0100 | <Sose> | I was recommended servant for making web APIs but honestly I'd rather try something else than try to get llvm working myself :| |
2020-12-12 23:00:40 +0100 | <sm[m]> | cool |
2020-12-12 23:01:32 +0100 | olligobber | (~olligobbe@unaffiliated/olligobber) |
2020-12-12 23:01:56 +0100 | quarters | (~quarters@unaffiliated/quarters) |
2020-12-12 23:02:21 +0100 | <Kronic> | is there a vscode plugin for keeping equals signs in line in haskell? |
2020-12-12 23:02:36 +0100 | Tario | (~Tario@201.192.165.173) (Ping timeout: 272 seconds) |
2020-12-12 23:05:04 +0100 | <quarters> | hello. I was wondering if anyone can recommend a framework for building a trivial rest api with haskell |
2020-12-12 23:05:53 +0100 | <aplainzetakind> | Is there a brand new extension or something which lets one write nullary "operators" "infix"? |
2020-12-12 23:06:00 +0100 | <aplainzetakind> | I mean without parentheses. |
2020-12-12 23:06:12 +0100 | <aplainzetakind> | I mean for this empty Text synonym: https://dpaste.com/B7YCVRXYZ |
2020-12-12 23:06:25 +0100 | <Rembane> | quarters: Scotty! |
2020-12-12 23:06:36 +0100 | <Rembane> | quarters: https://hackage.haskell.org/package/scotty |
2020-12-12 23:06:47 +0100 | <quarters> | Rembane: thank you :) |
2020-12-12 23:06:53 +0100 | <Sose> | I guess I'll try scotty aswell :D |
2020-12-12 23:07:54 +0100 | <Sose> | I see that needs warp aswell! :D |
2020-12-12 23:08:00 +0100 | geowiesnot | (~user@87-89-181-157.abo.bbox.fr) |
2020-12-12 23:08:10 +0100 | <Rembane> | quarters: np! |
2020-12-12 23:09:49 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
2020-12-12 23:10:37 +0100 | psy-bot | (~yaaic@2600:380:5233:3c24:60c2:d5c2:5799:f2fe) (Remote host closed the connection) |
2020-12-12 23:13:15 +0100 | <Kronic> | Question: if you have a pattern that repeats a lot with slightly longer function names, like this (f2 . f1) $ f0 v1 v2, is it a bad idea to just bundle that up into a local function and slap the name "f/g" on it? |
2020-12-12 23:13:29 +0100 | <Kronic> | Or do you guys go out of your way to give a better name to things like that |
2020-12-12 23:14:20 +0100 | <Rembane> | Kronic: I try to not name things. It saves so much time. |
2020-12-12 23:14:50 +0100 | <Rembane> | Kronic: That does look like the dot operator: ((.) . (.)) |
2020-12-12 23:15:01 +0100 | <Rembane> | :t ((.) . (.)) |
2020-12-12 23:15:06 +0100 | <lambdabot> | (b -> c) -> (a1 -> a2 -> b) -> a1 -> a2 -> c |
2020-12-12 23:15:20 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
2020-12-12 23:15:30 +0100 | <Kronic> | you try to not name things? |
2020-12-12 23:15:41 +0100 | <quarters> | I noticed that when building a project with stack, it uses a lot of space. I was wondering if it's different for cabal |
2020-12-12 23:16:25 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 246 seconds) |
2020-12-12 23:16:54 +0100 | <sclv> | cabal doesn’t install its own ghc so that might save some space |
2020-12-12 23:17:03 +0100 | <Rembane> | Kronic: Yeah, I do pointfree style as much as I can. This means that nobody can read the code, but I don't have to name things. |
2020-12-12 23:17:43 +0100 | <quarters> | sclv: great. thank you |
2020-12-12 23:17:48 +0100 | jneira | (501e6453@gateway/web/cgi-irc/kiwiirc.com/ip.80.30.100.83) (Ping timeout: 272 seconds) |
2020-12-12 23:18:01 +0100 | <Kronic> | You could just not write code at all, then even you wouldn't have to read it as you write it |
2020-12-12 23:18:55 +0100 | <Rembane> | That's where I'm heading, not gotten there yet thoug. |
2020-12-12 23:20:02 +0100 | o1lo01ol1o | (~o1lo01ol1@31.22.216.239) |
2020-12-12 23:20:31 +0100 | Tario | (~Tario@201.192.165.173) |
2020-12-12 23:22:04 +0100 | <sm[m]> | quarters: also you can make stack use a single ghc with: stack --no-install-ghc --system-ghc ... |
2020-12-12 23:22:25 +0100 | <quarters> | sm[m]: ah nice. thanks! |
2020-12-12 23:22:28 +0100 | <sm[m]> | to clean up the ghcs you already have, ncdu ~/.stack is good |
2020-12-12 23:25:09 +0100 | o1lo01ol1o | (~o1lo01ol1@31.22.216.239) (Ping timeout: 260 seconds) |
2020-12-12 23:26:35 +0100 | heatsink | (~heatsink@2600:1700:bef1:5e10:b8b7:e159:8e2c:1d1c) (Remote host closed the connection) |
2020-12-12 23:27:01 +0100 | <dminuoso> | Kronic: Over the years I've become convinced that the better style is to have where clauses and lots of bindings. |
2020-12-12 23:27:45 +0100 | <dminuoso> | Trying to get smart with point-free might be fun as a golfing excercise, but when you re-visit your code a year later, you'll thank yourself for a) moving portions into separate bindings, b) giving them sensible names and c) attaching a type signature to them. |
2020-12-12 23:27:49 +0100 | chang | (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
2020-12-12 23:28:25 +0100 | <dminuoso> | And perhaps d) attaching a comment to it |
2020-12-12 23:28:44 +0100 | <monochrom> | There is no mutual exclusion between naming and pointfree (wherever pointfree makes sense). |
2020-12-12 23:28:57 +0100 | <dminuoso> | Right. But then I try to keep the point-free code relatively small |
2020-12-12 23:29:41 +0100 | <Kronic> | Ah, maybe I was not clear. The point about the where clause is good to hear, I've been doing that already, I find it very useful. My point was say I have some small expression I repeat a bunch to get a value, my example was listed above, does it make sense to spend some time naming what exactly that is, or is there some kind of practice for having a placeholder name here for some small internal where function that doesn't matter much e.g. f or g |
2020-12-12 23:30:43 +0100 | <dminuoso> | Kronic: Well, if you have to even repeat it, it's worth putting into a binding for that reason alone. :) |
2020-12-12 23:30:44 +0100 | <sm[m]> | it's pretty subjective Kronic, whatever makes you/your team most comfortable in that part of the code I'd say |
2020-12-12 23:30:46 +0100 | <monochrom> | In that case I go meta for a while. Does it make sense to spend a few minutes to decide whether it makes sense to spend a few minutes to... |
2020-12-12 23:31:26 +0100 | <dminuoso> | Kronic: Whenever I even think about "should I maybe put this into a binding" - that thought alone is reason enough to put it on a separate binding. |
2020-12-12 23:31:51 +0100 | <monochrom> | And then I short-circuit all that. If within 5 minutes I can think up a good name, I go with it. If not, move on. |
2020-12-12 23:32:13 +0100 | <dminuoso> | One name to bind them all, one name to find them, one name to bring them all, and in Haskell bind them. |
2020-12-12 23:32:24 +0100 | <Kronic> | The binding part I definitely agree about, it's just the name I'm concerned about. For example in kotlin, if you have a lambda that just one parameter that is always called "it" unless you specify otherwise |
2020-12-12 23:32:28 +0100 | <dminuoso> | Oh that doesn't quite flow |
2020-12-12 23:33:14 +0100 | <monochrom> | I think the first sentence can be better as "one name to name them all". |
2020-12-12 23:33:41 +0100 | kenran | (~kenran@mue-88-130-62-159.dsl.tropolys.de) (Quit: leaving) |
2020-12-12 23:33:46 +0100 | <dminuoso> | Oh I know! |
2020-12-12 23:34:05 +0100 | <Rembane> | Maybe if you change the words to operators. |
2020-12-12 23:34:11 +0100 | <dminuoso> | One where to name them all, one where to find them, one where to bring them all, and in Haskell bind them. |
2020-12-12 23:34:15 +0100 | <dminuoso> | monochrom: How about this? :) |
2020-12-12 23:34:26 +0100 | <monochrom> | Yes that works nicely. |
2020-12-12 23:34:27 +0100 | sord937 | (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
2020-12-12 23:34:51 +0100 | <sm[m]> | I think one where to sould be extracted to a where clause |
2020-12-12 23:35:20 +0100 | <monochrom> | You look at mathematics and you see that extremely useful theorems, extremely repeatedly used theorems, cannot have "meaningful" names unless you allow the names to be as lengthy as the theorems themsevles. |
2020-12-12 23:35:45 +0100 | <monochrom> | For example the Yoneda lemma. For example Löb. |
2020-12-12 23:36:16 +0100 | <dolio> | I'm not sure mathematicians even try. |
2020-12-12 23:36:33 +0100 | amerigo | (uid331857@gateway/web/irccloud.com/x-vjipgcwqkmvmljqz) (Quit: Connection closed for inactivity) |
2020-12-12 23:36:42 +0100 | fresheyeball | (~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.7.1) |
2020-12-12 23:36:44 +0100 | <monochrom> | But you can try. Yoneda's lemma. What would be a better name? |
2020-12-12 23:37:02 +0100 | fresheyeball | (~isaac@c-71-237-105-37.hsd1.co.comcast.net) |
2020-12-12 23:37:12 +0100 | <dolio> | Presheaf induction principle. |
2020-12-12 23:37:24 +0100 | geowiesnot | (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 260 seconds) |
2020-12-12 23:37:26 +0100 | <fresheyeball> | is there a way I can handle a MonadError locally so the constraint is not needed? |
2020-12-12 23:37:27 +0100 | <Rembane> | As long as they have a name that's fairly unique that you can use to chunk the concept I'm cool with it. |
2020-12-12 23:37:31 +0100 | <monochrom> | Eventually you accept that many helper functions have to stay as being called "my_helper" unless you accept a name that's longer than the implementation. |
2020-12-12 23:37:44 +0100 | <dminuoso> | fresheyeball: Can you elaborate? |
2020-12-12 23:37:55 +0100 | <fresheyeball> | Basically I have some functions that don't compose |
2020-12-12 23:38:02 +0100 | <dminuoso> | Well, in Haskell we tend to name helper functions `go` though. |
2020-12-12 23:38:08 +0100 | <fresheyeball> | the `e` in their MonadError constraints are in conflict |
2020-12-12 23:38:16 +0100 | <fresheyeball> | and I can handle the error case locally in a nice way |
2020-12-12 23:38:35 +0100 | <fresheyeball> | by in conflict, I mean "do not unify" |
2020-12-12 23:39:17 +0100 | <monochrom> | Nice, I like presheaf induction principle. Kan extension? |
2020-12-12 23:39:45 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2020-12-12 23:40:55 +0100 | <dolio> | Not sure. "Extension" is already an actual technical term. |
2020-12-12 23:41:30 +0100 | gnx | (~heh@elt/leader/gnx) |
2020-12-12 23:41:38 +0100 | <dolio> | The "Kan" part is mostly superfluous. |
2020-12-12 23:41:58 +0100 | <monochrom> | Ah OK, I agree. |
2020-12-12 23:41:59 +0100 | <dolio> | But people need to get credit. |
2020-12-12 23:42:13 +0100 | gnx | (~heh@elt/leader/gnx) ("Leaving") |
2020-12-12 23:42:13 +0100 | <dolio> | Or else they don't get paid. |
2020-12-12 23:42:51 +0100 | <dminuoso> | Mathematicians get paid? |
2020-12-12 23:42:57 +0100 | <dolio> | A little bit. |
2020-12-12 23:44:46 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
2020-12-12 23:45:38 +0100 | conal | (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
2020-12-12 23:46:01 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
2020-12-12 23:46:05 +0100 | conal | (~conal@64.71.133.70) |
2020-12-12 23:46:44 +0100 | conal | (~conal@64.71.133.70) (Client Quit) |
2020-12-12 23:46:44 +0100 | saline_soln | (~nord@2601:240:4a00:47e8:7a85:a2b5:7fa2:5039) |
2020-12-12 23:51:25 +0100 | monadmatt | (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 265 seconds) |
2020-12-12 23:51:38 +0100 | saline_soln | (~nord@2601:240:4a00:47e8:7a85:a2b5:7fa2:5039) (Ping timeout: 264 seconds) |
2020-12-12 23:54:29 +0100 | kritzefitz | (~kritzefit@212.86.56.80) (Remote host closed the connection) |
2020-12-12 23:56:57 +0100 | hexfive | (~hexfive@50-47-142-195.evrt.wa.frontiernet.net) |
2020-12-12 23:57:52 +0100 | aev | (~aev@pool-108-5-152-94.nwrknj.fios.verizon.net) |
2020-12-12 23:59:05 +0100 | knupfer | (~Thunderbi@i59F7FF2B.versanet.de) (Ping timeout: 240 seconds) |