Logs on 2020-12-09 (freenode/#haskell)
| 00:00:21 | <Majiir> | Makes sense. I think I can get it there with some other refactors I have in mind. |
| 00:00:23 | <dminuoso> | if-then-else in general is a smell |
| 00:00:37 | <Majiir> | Fully aware I'm XY-problem'ing this :) |
| 00:00:55 | <dminuoso> | Like I said, Im willing to keep my focus to this region if you shared the rest of the code. |
| 00:01:05 | <dminuoso> | I dont mind people exploring XY problems. ;) |
| 00:01:14 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 00:01:34 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 00:01:46 | <Majiir> | I was curious if there's some handy-dandy tool (lens?!??) that would help me conditionally project a single record field without forcing the condition to evaluate when looking at any *other* field. |
| 00:02:10 | <dminuoso> | what do you mean by "project"? |
| 00:02:29 | <Majiir> | Erm... modify? |
| 00:03:00 | <dminuoso> | lens addresses a different set of problems |
| 00:03:16 | <dminuoso> | You could, perhaps, use the State monad to make it look a bit more imperative |
| 00:03:32 | <dminuoso> | Then the code would something along the lines of |
| 00:03:48 | <dminuoso> | (perhaps, together with lens) |
| 00:04:05 | × | cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Ping timeout: 240 seconds) |
| 00:04:10 | <Majiir> | The general pattern I am seeing is something like: if condition then x { foo = "bar", bar = "baz" } else x |
| 00:04:35 | <dminuoso> | Well with State it would just be `when f (modify g)` |
| 00:04:48 | × | ransom quits (c4264035@gateway/vpn/protonvpn/c4264035) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 00:05:28 | <Majiir> | Yep, but if I access any other field on the record, I'm forcing evaluation of that condition. I was hoping to only evaluate the condition if I'm evaluating the fields that are (potentially) modified. |
| 00:05:33 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 00:06:08 | <dminuoso> | I dont understand. |
| 00:06:18 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 00:06:19 | <Majiir> | Yeah, I dug myself into a dumb hole I guess |
| 00:06:57 | <Majiir> | Maybe I misunderstand what happened here, but my understanding led me to a 30x speedup, so I feel like I'm not too far off base. |
| 00:08:01 | <Majiir> | When I used the form (if condition then x { foo = "bar" } else x), where that record has several fields, my program ran slowly because there were cases where I would evaluate one of those other fields (but never 'foo') and it would force evaluation of the condition (expensive) |
| 00:08:39 | <Majiir> | That happened because to evaluate any part of the record, we had to evaluate the if block first. |
| 00:09:06 | <Majiir> | By switching to the form `x { foo = if condition then "bar" else foo x }`, that condition is only evaluated if I evaluate 'foo'. ...right? |
| 00:09:37 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 00:09:51 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 00:09:53 | <dminuoso> | That depends on how GHC floats it. |
| 00:10:02 | <dminuoso> | It's free to turn one into the other |
| 00:10:06 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 00:11:24 | <dminuoso> | But I'd say yeah |
| 00:11:26 | × | wonko7 quits (~wonko7@2a01:e35:2ffb:7040:14a1:46f4:68f7:2133) (Ping timeout: 264 seconds) |
| 00:11:39 | → | jdjdi joins (~androirc@p200300c847237a6b753ccc6256fa9525.dip0.t-ipconnect.de) |
| 00:12:31 | ← | jdjdi parts (~androirc@p200300c847237a6b753ccc6256fa9525.dip0.t-ipconnect.de) ("Quit") |
| 00:13:01 | × | thc202 quits (~thc202@unaffiliated/thc202) (Quit: thc202) |
| 00:14:49 | → | mbomba joins (~mbomba@bras-base-toroon2719w-grc-53-142-114-5-26.dsl.bell.ca) |
| 00:21:00 | × | MOSCOS quits (~MOSCOS@122.54.107.175) (Remote host closed the connection) |
| 00:21:24 | → | MOSCOS joins (~MOSCOS@122.54.107.175) |
| 00:21:49 | → | pjb joins (~t@2a01cb04063ec500548477681310a8e6.ipv6.abo.wanadoo.fr) |
| 00:22:00 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 00:23:30 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 00:23:33 | → | ubert joins (~Thunderbi@p200300ecdf1e5386e6b318fffe838f33.dip0.t-ipconnect.de) |
| 00:23:37 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 00:24:12 | × | ubert quits (~Thunderbi@p200300ecdf1e5386e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection) |
| 00:24:19 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@2403:6200:8876:a9cd:54a5:5132:6498:c2e9) |
| 00:24:45 | × | jmchael quits (~jmchael@87.112.60.168) (Ping timeout: 260 seconds) |
| 00:26:48 | × | chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 00:28:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 00:33:29 | → | u0_a298 joins (~user@65.35.205.131) |
| 00:33:50 | <texasmynsted> | Majiir: It is difficult for me to see what is happening from the types. If it were me I would pull the code apart into individual functions, with their sigs. |
| 00:34:30 | → | jmchael joins (~jmchael@87.112.60.168) |
| 00:34:47 | × | cheater quits (~user@unaffiliated/cheater) (Read error: Connection reset by peer) |
| 00:35:27 | × | jb55 quits (~jb55@gateway/tor-sasl/jb55) (Remote host closed the connection) |
| 00:35:58 | → | cheater joins (~user@unaffiliated/cheater) |
| 00:37:01 | <texasmynsted> | Right now you have two functions each GameState -> GameState. I do no know what a GameState is. Why are the function names doing work? pass1 vs. pass2 with the same signature. |
| 00:38:58 | × | bitmapper quits (uid464869@gateway/web/irccloud.com/x-wlqbdmxowqgsahkp) (Quit: Connection closed for inactivity) |
| 00:42:04 | × | howdoi quits (uid224@gateway/web/irccloud.com/x-kqlbqomhdamrwvuv) (Quit: Connection closed for inactivity) |
| 00:42:04 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 00:42:05 | <texasmynsted> | It might be useful to separate the "what" from the "how". Once you can _see_ your solution from just the function type signatures you can golf the code down then try out different implementations. |
| 00:43:10 | → | u0_a298 joins (~user@65.35.205.131) |
| 00:43:41 | <texasmynsted> | You might have done that already and I just can not see from the code you posted. Here is an example of what I mean. https://jproyo.github.io/posts/2019-03-17-tagless-final-haskell.html |
| 00:44:17 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 00:44:44 | × | tomboy64 quits (~tomboy64@gateway/tor-sasl/tomboy64) (Remote host closed the connection) |
| 00:45:13 | → | tomboy64 joins (~tomboy64@gateway/tor-sasl/tomboy64) |
| 00:46:44 | → | conal joins (~conal@64.71.133.70) |
| 00:49:08 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 00:49:30 | → | u0_a298 joins (~user@65.35.205.131) |
| 00:50:31 | <ski> | koz_ : i think so (re `MonadLogic') |
| 00:51:27 | <koz_> | ski: Seems like I was right, then. Good to know, though it's not terribly clearly explained IMHO. |
| 00:52:33 | × | statusbot quits (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) (Ping timeout: 256 seconds) |
| 00:52:51 | × | pharaun quits (~pharaun@static.88-198-62-245.clients.your-server.de) (Ping timeout: 265 seconds) |
| 00:52:51 | × | nemesit|znc quits (~nemesit@myriadvisuals.com) (Ping timeout: 265 seconds) |
| 00:53:00 | × | djanatyn quits (~djanatyn@ec2-18-209-155-56.compute-1.amazonaws.com) (Quit: ZNC 1.8.x-git-84-2f4b158 - https://znc.in) |
| 00:53:03 | → | pharaun joins (~pharaun@static.88-198-62-245.clients.your-server.de) |
| 00:53:24 | → | djanatyn joins (~djanatyn@ec2-18-209-155-56.compute-1.amazonaws.com) |
| 00:53:43 | → | vnz_ joins (~vnz@2001:bc8:604:94f::1) |
| 00:54:18 | × | dxld quits (~dxld@80-109-136-248.cable.dynamic.surfer.at) (Ping timeout: 265 seconds) |
| 00:54:18 | × | vnz quits (~vnz@unaffiliated/vnz) (Ping timeout: 265 seconds) |
| 00:54:18 | vnz_ | is now known as vnz |
| 00:54:19 | × | vnz quits (~vnz@2001:bc8:604:94f::1) (Changing host) |
| 00:54:19 | → | vnz joins (~vnz@unaffiliated/vnz) |
| 00:54:37 | × | theDon quits (~td@94.134.91.58) (Ping timeout: 260 seconds) |
| 00:54:56 | → | nemesit|znc joins (~nemesit@2a01:488:66:1000:2ea3:4eeb:0:1) |
| 00:55:05 | → | rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) |
| 00:55:26 | → | theDon joins (~td@94.134.91.58) |
| 00:55:29 | → | dxld joins (~dxld@rush.pub.dxld.at) |
| 00:55:43 | → | christo joins (~chris@81.96.113.213) |
| 00:57:40 | <monochrom> | https://youtu.be/z43bmaMwagI explains why "if cond then x{...} else x" is more conducive to your sanity. |
| 00:57:57 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 01:00:20 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 01:00:20 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 01:00:31 | → | statusbot joins (~statusbot@ec2-34-198-122-184.compute-1.amazonaws.com) |
| 01:00:49 | → | u0_a298 joins (~user@65.35.205.131) |
| 01:01:56 | × | danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 246 seconds) |
| 01:02:00 | <ezzieyguywuf> | so if I have a `Parser (Text, Text)` and I want to signal an error (this is megaparsec), how do I do that? |
| 01:02:45 | × | notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection) |
| 01:03:56 | × | drincruz_ quits (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 240 seconds) |
| 01:04:07 | → | notzmv joins (~user@unaffiliated/zmv) |
| 01:04:56 | × | mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 265 seconds) |
| 01:05:52 | <dsal> | ezzieyguywuf: What kind of error? You could probably just use fail |
| 01:06:22 | <ezzieyguywuf> | dsal: I tried fail, but it said "No instance for (MonadFail ((,) Text)) arising from use of fail" |
| 01:06:36 | <ezzieyguywuf> | "what kind of error", just "couldn't parse that sorry" |
| 01:06:43 | → | ransom joins (c4264035@gateway/vpn/protonvpn/c4264035) |
| 01:06:58 | <dsal> | There's a bit of xy here. Why do you have something you can't parse? |
| 01:07:29 | × | columbarius quits (~columbari@94.134.93.105) (Ping timeout: 260 seconds) |
| 01:07:47 | → | carlomagno joins (~cararell@148.87.23.8) |
| 01:07:52 | <dsal> | There's `parseError :: ParseError s e -> m a` -- but you may not need that. |
| 01:07:58 | <ezzieyguywuf> | hm...part of my configurable parser is "match something at the end of the string". In order to do that, I use takeRest and then use Data.Text functions to check the back-end of the string |
| 01:08:12 | <ezzieyguywuf> | if it doesn't match, I want the parse to fail. If it does match, I want to return a (Text, Text) |
| 01:08:22 | → | chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
| 01:08:25 | × | solonarv quits (~solonarv@astrasbourg-552-1-28-212.w90-13.abo.wanadoo.fr) (Ping timeout: 256 seconds) |
| 01:08:52 | <dsal> | Yeah, so having the parser do the actual work of that match would be ideal. Then it'll do the work for you and give you a good error for free. |
| 01:09:15 | <ezzieyguywuf> | dsal: sure, but my understanding is megaparsec isn't too good at matching things at the end of the string |
| 01:09:42 | → | columbarius joins (~columbari@94.134.93.27) |
| 01:10:07 | <ezzieyguywuf> | I could, I guess, do a "lookahead" or something to see how many characters are left, THEN consume `remainingChars - Text.length targetStringAtEnd', THEN use a regular parser to check |
| 01:10:17 | <ezzieyguywuf> | but then I also have a version where they can provide a list of potential matches |
| 01:10:21 | × | Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.) |
| 01:10:23 | <dsal> | You could just use something like manyTill |
| 01:10:27 | <ezzieyguywuf> | which I guess I could fmap over the first |
| 01:11:04 | <dsal> | manyTill_ p end applies parser p zero or more times until parser end succeeds. Returns the list of values returned by p and the end result. Use manyTill if you have no need in the result of the end. |
| 01:11:26 | <ezzieyguywuf> | 😍 |
| 01:11:45 | <ezzieyguywuf> | dsal: I owe you a beer, let me know where I can send funds |
| 01:12:04 | <dsal> | haha. Everything I know I know from here, so you'll have to send it to the channel. |
| 01:12:29 | <dsal> | There's a bunch of neat stuff ini https://hackage.haskell.org/package/parser-combinators-1.2.1/docs/Control-Monad-Combinators.html |
| 01:12:35 | <MarcelineVQ> | I accept bitcoin (I don't accept bitcoin) |
| 01:12:40 | → | Tristan joins (~tristan@luna.whatbox.ca) |
| 01:13:00 | × | alx741 quits (~alx741@181.196.69.205) (Ping timeout: 256 seconds) |
| 01:13:03 | Tristan | is now known as Guest80676 |
| 01:13:30 | <dsal> | I'll take MarcelineVQ's bitcoin. |
| 01:13:42 | <dsal> | heh, I was asking if choice is asum the other day: |
| 01:13:47 | <dsal> | choice :: (Foldable f, Alternative m) => f (m a) -> m a |
| 01:13:47 | <dsal> | choice = asum |
| 01:14:06 | <dsal> | The documentation actually says `choice = asum` |
| 01:14:21 | × | Tristan- quits (~tristan@luna.whatbox.ca) (Read error: Connection reset by peer) |
| 01:14:27 | <ezzieyguywuf> | dsal: lol, yea someone said "yes" two seconds later, you may have missed it. I saw it in the docs about 5 seconds after that, I chuckled |
| 01:15:25 | <dsal> | Yeah, I saw that. I just happened to notice it specifically says that in the docs. |
| 01:15:30 | <dsal> | :t choice |
| 01:15:32 | <lambdabot> | error: |
| 01:15:32 | <lambdabot> | • Variable not in scope: choice |
| 01:15:32 | <lambdabot> | • Perhaps you meant ‘choose’ (imported from Lambdabot.Plugin.Haskell.Eval.Trusted) |
| 01:15:40 | <dsal> | hmm... choice looks a lot like replicateM to me. |
| 01:15:42 | <dsal> | :t replicateM |
| 01:15:44 | <lambdabot> | Applicative m => Int -> m a -> m [a] |
| 01:15:45 | × | cods quits (~fred@tuxee.net) (Ping timeout: 240 seconds) |
| 01:15:57 | <dsal> | Er, I mean count |
| 01:15:57 | <dsal> | count :: Monad m => Int -> m a -> m [a] |
| 01:15:59 | → | cods joins (~fred@tuxee.net) |
| 01:16:12 | × | Raito_Bezarius quits (~Raito@unaffiliated/raito-bezarius/x-8764578) (Ping timeout: 260 seconds) |
| 01:16:22 | <dsal> | I like hoiw replicateM is applicative and count is Monad. |
| 01:16:33 | <dsal> | I also like how my keyboard randomly puts the letter i in things where I didn't type it. |
| 01:17:12 | × | DavidEichmann quits (~david@62.110.198.146.dyn.plus.net) (Remote host closed the connection) |
| 01:17:13 | × | cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving) |
| 01:17:43 | <MarcelineVQ> | Moinad |
| 01:20:13 | × | m0rphism quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 246 seconds) |
| 01:20:25 | <dsal> | Monaids |
| 01:20:30 | → | falafel joins (~falafel@pool-108-31-243-192.washdc.fios.verizon.net) |
| 01:21:13 | × | jmchael quits (~jmchael@87.112.60.168) (Ping timeout: 260 seconds) |
| 01:22:21 | <MarcelineVQ> | Monadis |
| 01:26:38 | ski | . o O ( IMonad ) |
| 01:27:21 | → | alx741 joins (~alx741@181.196.69.91) |
| 01:27:49 | <koz_> | ski: iMonad is what'll get added to Swift in around the year 3000. |
| 01:28:39 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) () |
| 01:31:10 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 01:32:58 | <Axman6> | if I have a class Foo a b c | a -> b, a -> c, and another class Foo a b c => Bar a b | a -> b, how can I ghc to stop complaining about the type variable c not being in scope? |
| 01:34:45 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 01:35:12 | <MarcelineVQ> | class (forall c. Foo a b c) => Bar a b | a -> b do anything? |
| 01:36:44 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 01:38:46 | × | Gladenko quits (~Gladenko@4e69b241.skybroadband.com) (Ping timeout: 265 seconds) |
| 01:39:45 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 01:40:31 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 01:41:04 | → | Tario joins (~Tario@201.192.165.173) |
| 01:41:11 | <ski> | i don't think that would express the intended semantics |
| 01:41:14 | × | mbomba quits (~mbomba@bras-base-toroon2719w-grc-53-142-114-5-26.dsl.bell.ca) (Quit: WeeChat 3.0) |
| 01:41:46 | <Axman6> | yeah that leads to other issues (sorry, details to come soon) |
| 01:41:49 | <ski> | `class Foo a where type B a; type C a' and `class Foo a => Bar a' seems to work .. |
| 01:42:53 | → | remy^ joins (~remy@2a02:a210:2140:f480:6e62:6dff:fe0a:58e9) |
| 01:43:15 | × | remy^ quits (~remy@2a02:a210:2140:f480:6e62:6dff:fe0a:58e9) (Changing host) |
| 01:43:15 | → | remy^ joins (~remy@unaffiliated/remy/x-3943829) |
| 01:43:24 | remy^ | is now known as Remy |
| 01:43:41 | → | Raito_Bezarius joins (~Raito@unaffiliated/raito-bezarius/x-8764578) |
| 01:44:40 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 256 seconds) |
| 01:45:25 | <Axman6> | safly we can;t use type families, this is really DAML, not Haskell |
| 01:45:29 | → | Lord_of_Life_ joins (~Lord@46.217.220.39) |
| 01:45:37 | <Axman6> | type families would be the solution |
| 01:45:42 | <ezzieyguywuf> | does hledger have a feature where it will "prettify" the input, i.e. specifically I want to right-adjust all my amounts such that `Assets 10 USD` turns into `Assets <enough spaces to make the D on column 80> 10 USD` |
| 01:46:13 | × | gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving) |
| 01:46:25 | × | Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 240 seconds) |
| 01:47:04 | × | shutdown_-h_now quits (~arjan@2001:1c06:2d0b:2312:9882:3ab:473b:209) (Ping timeout: 240 seconds) |
| 01:47:09 | → | ransom__ joins (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) |
| 01:47:49 | <sm[m]> | ezzieyguywuf: you know you're in #haskell ? Just checking :) |
| 01:48:14 | <ezzieyguywuf> | sm[m]: lol I didn't sory! |
| 01:48:18 | <ezzieyguywuf> | dang I always do that... |
| 01:49:21 | <MarcelineVQ> | I doubt anyone minds |
| 01:49:26 | × | ransom quits (c4264035@gateway/vpn/protonvpn/c4264035) (Ping timeout: 256 seconds) |
| 01:49:59 | → | coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
| 01:50:14 | <sm[m]> | me neither, but wouldn't want to spam y'all with too much #hledger chat |
| 01:51:29 | × | coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 01:52:13 | → | coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
| 01:53:16 | × | falafel quits (~falafel@pool-108-31-243-192.washdc.fios.verizon.net) (Ping timeout: 265 seconds) |
| 01:55:00 | → | guest129 joins (~user@49.5.6.87) |
| 01:56:25 | → | guest129` joins (~user@49.5.6.87) |
| 01:57:07 | → | notzmv` joins (~user@201-43-52-72.dsl.telesp.net.br) |
| 01:58:16 | × | notzmv quits (~user@unaffiliated/zmv) (Ping timeout: 256 seconds) |
| 01:59:03 | × | notzmv` quits (~user@201-43-52-72.dsl.telesp.net.br) (Remote host closed the connection) |
| 02:00:12 | × | guest129 quits (~user@49.5.6.87) (Ping timeout: 256 seconds) |
| 02:02:27 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 02:03:16 | → | u0_a298 joins (~user@65.35.205.131) |
| 02:04:30 | × | Remy quits (~remy@unaffiliated/remy/x-3943829) (Remote host closed the connection) |
| 02:05:31 | × | sparsity quits (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) (Quit: Connection closed) |
| 02:06:08 | × | Entertainment quits (~entertain@104.246.132.210) () |
| 02:06:12 | × | danso quits (~dan@69-165-210-185.cable.teksavvy.com) (Ping timeout: 256 seconds) |
| 02:08:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 02:08:36 | → | kupi joins (uid212005@gateway/web/irccloud.com/x-sihatzqhydqaqspq) |
| 02:08:49 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@2403:6200:8876:a9cd:54a5:5132:6498:c2e9) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 02:09:01 | → | remy^ joins (~remy@2a02:a210:2140:f480:6e62:6dff:fe0a:58e9) |
| 02:09:07 | × | remy^ quits (~remy@2a02:a210:2140:f480:6e62:6dff:fe0a:58e9) (Changing host) |
| 02:09:07 | → | remy^ joins (~remy@unaffiliated/remy/x-3943829) |
| 02:10:23 | × | shinobi_ quits (~shinobi@c-24-147-48-162.hsd1.ma.comcast.net) (Read error: Connection reset by peer) |
| 02:10:50 | → | shinobi_ joins (~shinobi@c-24-147-48-162.hsd1.ma.comcast.net) |
| 02:13:14 | → | drincruz_ joins (~adriancru@ool-44c748be.dyn.optonline.net) |
| 02:13:28 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 02:14:46 | × | jianbo quits (~jianbo@2601:246:4000:b22:2155:768d:869a:2ce3) (Remote host closed the connection) |
| 02:16:44 | → | geowiesnot joins (~user@87-89-181-157.abo.bbox.fr) |
| 02:17:27 | × | carlomagno quits (~cararell@148.87.23.8) (Remote host closed the connection) |
| 02:19:12 | × | xff0x quits (~fox@2001:1a81:5297:ce00:950a:3e50:5ed2:fa3d) (Ping timeout: 260 seconds) |
| 02:21:02 | → | xff0x joins (~fox@2001:1a81:52d1:1000:e22b:1ad:d895:be4e) |
| 02:21:19 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@171.5.29.209) |
| 02:22:18 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Ping timeout: 256 seconds) |
| 02:22:57 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 02:25:05 | × | jespada quits (~jespada@90.254.245.49) (Ping timeout: 240 seconds) |
| 02:26:25 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 02:28:09 | → | jespada joins (~jespada@90.254.245.49) |
| 02:28:47 | × | coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 02:29:20 | → | coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
| 02:29:35 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:842e:bf6c:baf1:11c6) (Ping timeout: 272 seconds) |
| 02:30:14 | × | dnlkrgr quits (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 256 seconds) |
| 02:30:58 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 02:31:08 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 02:31:30 | → | christo joins (~chris@81.96.113.213) |
| 02:31:57 | → | conal joins (~conal@64.71.133.70) |
| 02:32:29 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 02:32:57 | → | conal joins (~conal@64.71.133.70) |
| 02:32:58 | → | danso joins (~dan@69-165-210-185.cable.teksavvy.com) |
| 02:33:18 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 02:34:42 | → | conal joins (~conal@64.71.133.70) |
| 02:34:51 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 02:36:11 | → | conal joins (~conal@64.71.133.70) |
| 02:36:26 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 02:40:21 | × | coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 02:41:15 | → | coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
| 02:41:23 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:2bf5:8913:5fd7:7df1) |
| 02:43:26 | × | coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 02:44:05 | → | conal joins (~conal@64.71.133.70) |
| 02:44:56 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
| 02:45:17 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 02:46:32 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 02:46:49 | × | geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 258 seconds) |
| 02:49:13 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 02:49:50 | → | u0_a298 joins (~user@65.35.205.131) |
| 02:51:53 | × | u0_a298 quits (~user@65.35.205.131) (Remote host closed the connection) |
| 02:52:10 | → | u0_a298 joins (~user@65.35.205.131) |
| 02:54:17 | → | vicfred_ joins (~vicfred@unaffiliated/vicfred) |
| 02:55:07 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood) |
| 02:56:25 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 02:56:57 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Remote host closed the connection) |
| 02:57:09 | × | vicfred quits (~vicfred@unaffiliated/vicfred) (Ping timeout: 260 seconds) |
| 02:59:25 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 02:59:37 | × | hyperisco quits (~hyperisco@d192-186-117-226.static.comm.cgocable.net) (Ping timeout: 264 seconds) |
| 02:59:52 | → | u0_a298 joins (~user@65.35.205.131) |
| 03:01:03 | → | Akisy joins (~Akisy@4e69b241.skybroadband.com) |
| 03:03:06 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 03:03:35 | → | u0_a298 joins (~user@65.35.205.131) |
| 03:04:40 | → | sh9 joins (~sh9@softbank060116136158.bbtec.net) |
| 03:06:45 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 03:07:02 | → | wei2912 joins (~wei2912@unaffiliated/wei2912) |
| 03:07:08 | × | wei2912 quits (~wei2912@unaffiliated/wei2912) (Client Quit) |
| 03:07:16 | → | u0_a298 joins (~user@65.35.205.131) |
| 03:08:42 | → | Stanley00 joins (~stanley00@unaffiliated/stanley00) |
| 03:11:23 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 03:11:49 | × | cads2 quits (~cads@ip-64-72-99-232.lasvegas.net) (Read error: Connection reset by peer) |
| 03:11:55 | → | u0_a298 joins (~user@65.35.205.131) |
| 03:12:27 | → | Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas) |
| 03:14:48 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 03:15:13 | → | u0_a298 joins (~user@65.35.205.131) |
| 03:16:21 | × | urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna) |
| 03:17:44 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 03:18:20 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds) |
| 03:18:22 | → | cheater1 joins (~user@unaffiliated/cheater) |
| 03:19:55 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 03:20:45 | × | Axman6 quits (~Axman6@pdpc/supporter/student/Axman6) (Ping timeout: 240 seconds) |
| 03:20:45 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 03:21:10 | × | cheater quits (~user@unaffiliated/cheater) (Ping timeout: 260 seconds) |
| 03:21:10 | × | Ranhir quits (~Ranhir@157.97.53.139) (Ping timeout: 260 seconds) |
| 03:21:10 | × | theorbtwo quits (~theorb@cpc81822-swin19-2-0-cust3.3-1.cable.virginm.net) (Ping timeout: 260 seconds) |
| 03:21:17 | cheater1 | is now known as cheater |
| 03:22:47 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Ping timeout: 272 seconds) |
| 03:23:19 | → | Axman6 joins (~Axman6@pdpc/supporter/student/Axman6) |
| 03:24:33 | × | vicfred_ quits (~vicfred@unaffiliated/vicfred) (Quit: Leaving) |
| 03:24:53 | → | Ranhir joins (~Ranhir@157.97.53.139) |
| 03:25:38 | → | theorbtwo joins (~theorb@cpc81822-swin19-2-0-cust3.3-1.cable.virginm.net) |
| 03:28:04 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 03:29:01 | × | theDon quits (~td@94.134.91.58) (Ping timeout: 246 seconds) |
| 03:29:05 | → | Saukk joins (~Saukk@2001:998:ec:944:a00f:6382:4f0:3e7e) |
| 03:30:06 | → | xirhtogal joins (~lagothrix@unaffiliated/lagothrix) |
| 03:30:06 | × | lagothrix quits (~lagothrix@unaffiliated/lagothrix) (Killed (leguin.freenode.net (Nickname regained by services))) |
| 03:30:06 | xirhtogal | is now known as lagothrix |
| 03:31:11 | → | theDon joins (~td@muedsl-82-207-238-168.citykom.de) |
| 03:31:31 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 03:31:32 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Client Quit) |
| 03:31:46 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 03:33:08 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 256 seconds) |
| 03:33:11 | → | boxscape joins (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) |
| 03:35:36 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds) |
| 03:35:36 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 03:35:50 | → | u0_a298 joins (~user@65.35.205.131) |
| 03:38:05 | <boxscape> | Is there a name for a Functor that's both co- and contravariant (So the opposite of Invariant)? |
| 03:38:05 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 03:38:11 | × | christo quits (~chris@81.96.113.213) (Ping timeout: 258 seconds) |
| 03:38:24 | <boxscape> | Though I suppose it's not super useful since the only instances I can think of are (Const a) and Proxy |
| 03:38:36 | → | u0_a298 joins (~user@65.35.205.131) |
| 03:40:45 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 03:41:15 | → | u0_a298 joins (~user@65.35.205.131) |
| 03:41:50 | <boxscape> | I've provisionally called it Omnivariant |
| 03:43:52 | → | conal joins (~conal@64.71.133.70) |
| 03:43:53 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 03:44:05 | <boxscape> | I suppose |
| 03:44:10 | <jle`> | boxscape: i think it's a 'fact' that variations of Const are the only such things |
| 03:44:15 | → | u0_a298 joins (~user@65.35.205.131) |
| 03:44:21 | <jle`> | that's actualyl how the lens library constraints things to work for only Const a, or Proxy |
| 03:44:22 | <boxscape> | I think Coerce is exactly this class? |
| 03:44:35 | <jle`> | require both (Functor f, Contravariant f) => ... |
| 03:44:36 | <boxscape> | I see |
| 03:44:45 | <jle`> | essentially the same as requiring f to be some form of Const |
| 03:44:48 | → | christo joins (~chris@81.96.113.213) |
| 03:46:00 | × | andi- quits (~andi-@NixOS/user/andi-) (Remote host closed the connection) |
| 03:48:09 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 03:49:12 | → | u0_a298 joins (~user@65.35.205.131) |
| 03:49:24 | → | andi- joins (~andi-@NixOS/user/andi-) |
| 03:49:39 | <boxscape> | (Okay it's not Coerce, that class is called Coercible and has a different kind, but I think omnimap can always be implemented with coerce) |
| 03:50:37 | <jle`> | * -> * coerce maybe? |
| 03:51:08 | <koz_> | Both co and contravariance in the same parameter implies it is phantom-roled. |
| 03:51:16 | <koz_> | (or at least I'm pretty sure it does) |
| 03:51:29 | <boxscape> | that sounds reasonable |
| 03:51:30 | <jle`> | ooh yeah, phantom |
| 03:52:07 | <koz_> | I'm pretty confident parametricity would require this. |
| 03:53:36 | × | urek quits (~urek@179.182.119.135) (Ping timeout: 240 seconds) |
| 03:54:00 | <boxscape> | Coercible (f a) (f b) would also require that the parameter to f is phantom, right? |
| 03:54:15 | <boxscape> | hm |
| 03:54:18 | <boxscape> | if it's forall a and b that is? |
| 03:55:34 | <boxscape> | alas GHC can't infer the phantom role |
| 03:56:20 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 03:56:21 | <boxscape> | I was trying to write `instance forall f a b . Coercible (f a) (f b) => Invariant f` |
| 03:57:28 | <koz_> | Coercible (f a) (f b) could potentially work if it's representational and Coercible a b holds. |
| 03:57:38 | <boxscape> | ah |
| 03:57:40 | <boxscape> | right |
| 03:58:03 | <koz_> | Now if we have (Coercible (f a) (f b), Coercible (f b) (f a)) on the other hand... |
| 03:58:12 | <boxscape> | hm but then you should still be able to make an Invariant instance, since you have coerce :: a -> b and coerce :: b -> a |
| 03:58:16 | <koz_> | But I guess Coercible is symmetric? |
| 03:58:25 | <koz_> | Yeah, I think you could. |
| 03:58:44 | <koz_> | You just ignore the functions completely. |
| 03:58:51 | <jle`> | boxscape: i'm not sure that instance makes sense |
| 03:58:52 | <koz_> | So invmap _ _ = coerce :P |
| 03:59:01 | <jle`> | because you're quantifying over the f, which appears in the instance itself |
| 03:59:12 | <jle`> | so maybe it's shadowing the f in the instance |
| 03:59:14 | <koz_> | jle`: Yeah, good point. |
| 03:59:25 | <boxscape> | oh |
| 03:59:29 | <jle`> | instance (forall a b. Coercible (f a) (f b) => Inveriant f where .. might work |
| 03:59:30 | <koz_> | Since it's the 'f' that has an Invariant instance. |
| 03:59:34 | <jle`> | since the f isn't being shadowed |
| 03:59:45 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 03:59:53 | <jle`> | but also this is a bad instance of course since it overlaps with every Invariant instance...but it should at least be definable |
| 04:00:19 | <jle`> | instance (forall a b. Coercible (F a) (F b)) => Invariant F works, i think, for specific F |
| 04:00:28 | <koz_> | Yeah, Coercible causes the problem of 'overlaps with everything ever'. |
| 04:00:36 | <koz_> | Just in general. |
| 04:00:52 | <jle`> | the overlapping problem is mostly that `Invariant f`, heh |
| 04:01:21 | × | ransom__ quits (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 04:01:52 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 04:03:27 | <koz_> | On a semi-related note, it's a pity that 'fmap coerce' is not the same as 'coerce'. |
| 04:03:51 | → | ransom joins (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) |
| 04:04:06 | <jle`> | because it depends on the type's implementation of fmap probably, right? |
| 04:04:14 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Ping timeout: 264 seconds) |
| 04:04:18 | <jle`> | instance Functor Maybe where fmap _ _ = Nothing |
| 04:04:23 | <boxscape> | jle` fwiw `instance forall f . Functor => Invariant f` works fine so I don't think the forall is a problem |
| 04:04:32 | <boxscape> | s/Functor/Functor f |
| 04:04:42 | <jle`> | that sounds like a kind error |
| 04:04:46 | <jle`> | oh i see |
| 04:05:03 | <koz_> | jle`: Yeah, if you write law-breaking instances, it'd fail. |
| 04:05:17 | <koz_> | But to be honest, Functor is so strong under parametricity it should _really_ be a compiler built-in. |
| 04:07:22 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 04:08:03 | → | u0_a298 joins (~user@65.35.205.131) |
| 04:09:01 | → | Axma29712 joins (~Axman6@pdpc/supporter/student/Axman6) |
| 04:11:06 | × | Axman6 quits (~Axman6@pdpc/supporter/student/Axman6) (Ping timeout: 256 seconds) |
| 04:11:06 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 04:11:33 | → | u0_a298 joins (~user@65.35.205.131) |
| 04:12:35 | → | uraniumz joins (x64cmd@gateway/vpn/privateinternetaccess/x64cmd) |
| 04:13:52 | × | shatriff_ quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 04:14:16 | × | Axma29712 quits (~Axman6@pdpc/supporter/student/Axman6) (Ping timeout: 240 seconds) |
| 04:14:45 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 04:15:45 | → | SanchayanMaity joins (~Sanchayan@122.167.92.138) |
| 04:16:18 | × | rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo) |
| 04:16:31 | → | Tesseraction_n joins (~Tesseract@unaffiliated/tesseraction) |
| 04:16:34 | → | rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) |
| 04:17:06 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 04:17:06 | × | Tesseraction quits (~Tesseract@unaffiliated/tesseraction) (Ping timeout: 256 seconds) |
| 04:17:21 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Remote host closed the connection) |
| 04:17:36 | × | conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer) |
| 04:17:47 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 04:20:15 | → | fresheyeball joins (~isaac@c-71-237-105-37.hsd1.co.comcast.net) |
| 04:20:49 | × | rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Client Quit) |
| 04:21:06 | → | rcdilorenzo joins (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) |
| 04:21:34 | → | conal joins (~conal@64.71.133.70) |
| 04:22:16 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Ping timeout: 258 seconds) |
| 04:22:43 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 04:24:44 | <fresheyeball> | Is there any way to mapT :: (a -> b) -> IO (TVar a) -> IO (TVar b) without allocating a new TVar? |
| 04:24:46 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 04:25:15 | → | u0_a298 joins (~user@65.35.205.131) |
| 04:25:30 | <fresheyeball> | (note: state needs to stay synced between the `TVar a` and `TVar b` |
| 04:25:37 | <fresheyeball> | ) |
| 04:25:45 | <dmj`> | :t fmap . fmap |
| 04:25:47 | <lambdabot> | (Functor f1, Functor f2) => (a -> b) -> f1 (f2 a) -> f1 (f2 b) |
| 04:25:52 | × | conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer) |
| 04:26:00 | <fresheyeball> | dmj`: TVar is not a Functor |
| 04:26:30 | <dmj`> | fresheyeball: that blows |
| 04:27:32 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Ping timeout: 260 seconds) |
| 04:27:57 | × | Sheilong quits (uid293653@gateway/web/irccloud.com/x-xfocnvqeblymqavl) () |
| 04:28:23 | → | conal joins (~conal@64.71.133.70) |
| 04:28:24 | <dmj`> | fresheyeball: then no |
| 04:28:53 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 04:31:10 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 04:31:22 | <c_wraith> | well... sort of |
| 04:31:37 | <c_wraith> | Have you heard of our friend Coyoneda? |
| 04:31:40 | → | u0_a298 joins (~user@65.35.205.131) |
| 04:32:09 | <fresheyeball> | *raises hand, while shaking head* |
| 04:32:29 | <c_wraith> | though... "synchronized"? Like, you want to keep both around and to have changes to one reflected in the other? |
| 04:32:41 | <c_wraith> | Because that causes problems |
| 04:32:50 | <fresheyeball> | yes, that is what I mean |
| 04:32:51 | <jle`> | fresheyeball: yeah, you can only have it be write-only |
| 04:32:52 | <c_wraith> | In particular, (a->b) isn't strong enough |
| 04:33:06 | <jle`> | er, read-only |
| 04:33:09 | × | conal quits (~conal@64.71.133.70) (Read error: Connection reset by peer) |
| 04:33:13 | <jle`> | Coyoneda TVar a is a read-only tvar |
| 04:33:23 | → | nyd joins (~nyd@unaffiliated/elysian) |
| 04:34:30 | → | conal joins (~conal@64.71.133.70) |
| 04:34:46 | <jle`> | Data.Functor.Contravariant.Coyoneda's Coyoneda TVar a is a write-only tvar |
| 04:35:05 | <iqubic> | I don't understand Coyoneda at all. |
| 04:35:20 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 04:35:20 | <jle`> | oh, there's an invariant Coyoneda too |
| 04:35:56 | <jle`> | but i can't find it in any libraries |
| 04:35:56 | <koz_> | And a profunctor one. |
| 04:36:16 | <iqubic> | Coyoneda is werid. I wish I understood it, but I just don't. |
| 04:36:18 | <jle`> | Invariant Coyoneda will give you a fully mappable TVar, but you need both (a -> b) and (b -> c), so that's not necessarily what you want |
| 04:37:00 | <koz_> | iqubic: AFAICT, Coyoneda is like a free functor - it doesn't actually _do_ anything, but just tracks all the mappings. |
| 04:37:15 | <iqubic> | I see. That's bizarre. |
| 04:37:22 | <koz_> | iqubic: How is that bizarre? |
| 04:37:28 | <iqubic> | I don't know. |
| 04:37:29 | <koz_> | It's the same as the free Applicative, free Monad etc. |
| 04:38:06 | <c_wraith> | It's a pretty natural idea when you discover some types can't be a Functor instance. "Why don't I just pair it with a conversion function?" |
| 04:38:08 | <iqubic> | What does the Coyoneda data type look like? |
| 04:38:20 | <jle`> | https://hackage.haskell.org/package/kan-extensions-5.2.1/docs/Data-Functor-Coyoneda.html |
| 04:38:20 | <koz_> | iqubic: Depends on which functor type you're trying to fake being. |
| 04:38:53 | <iqubic> | Oh, there's no one single Coyoneda? It's different for each Functor? |
| 04:39:16 | <koz_> | Yep. |
| 04:39:30 | <c_wraith> | well. There's a different Coyoneda for each type of functor |
| 04:39:44 | <c_wraith> | But there's only one for covariant functors. |
| 04:39:47 | <iqubic> | Weird. jle gave me this: Coyoneda :: (b -> a) -> f b -> Coyoneda f a. |
| 04:40:06 | <jle`> | that's for covariant functors yeah, it gives you a free Data.Functor.Functor instance |
| 04:40:08 | <iqubic> | Is that the covariant version of coyoneda? |
| 04:40:09 | <c_wraith> | note: that's a constructor for a GADT, used to encode an existential |
| 04:40:11 | <jle`> | for funsies, try writing it :) |
| 04:40:19 | <jle`> | the Functor instance |
| 04:40:49 | <iqubic> | I would do that, but it's 20 minutes to AoC, and I don't want to fry my brain to much before then. |
| 04:41:03 | × | justanotheruser quits (~justanoth@unaffiliated/justanotheruser) (Ping timeout: 258 seconds) |
| 04:41:23 | <boxscape> | Hm I can't quite see the difference between Yoneda and Coyoneda |
| 04:41:26 | <jle`> | at least you know the next step in your path to understanding :) |
| 04:41:41 | × | esg quits (~emil@esg.xen.prgmr.com) (Remote host closed the connection) |
| 04:41:46 | <iqubic> | boxscape: I assume you take the arrows of one and flip them to get the other. |
| 04:42:11 | <iqubic> | That's what a categorical dual is, and the co- prefix implies categorical dual |
| 04:42:27 | <boxscape> | `data Coyoneda f a where Coyoneda :: (b -> a) -> f b -> Coyoneda f a` versus `newtype Yoneda f a = Yoneda { runYoneda :: forall r. (r -> a) -> f r }` seems like the same thing |
| 04:42:30 | <boxscape> | modulo strictness |
| 04:42:51 | × | rcdilorenzo quits (~rcdiloren@cpe-76-182-87-188.nc.res.rr.com) (Quit: rcdilorenzo) |
| 04:43:00 | <iqubic> | I assume the forall r. changes things. |
| 04:43:10 | <boxscape> | but there's an implicit forall b in the other one |
| 04:43:16 | <boxscape> | no? |
| 04:43:25 | <fresheyeball> | hmmm |
| 04:43:55 | <iqubic> | Look at the types. Yoneda f a = ... makes no mention of r on the LHS. That means the r is a rank2 type. |
| 04:44:38 | <iqubic> | Whereas Coyoneda is doesn't require Rank2 Types. |
| 04:44:59 | <boxscape> | ah, that's true |
| 04:45:01 | <fresheyeball> | ok I see |
| 04:45:11 | <iqubic> | Now, how does that make them different? I have no bloody clue. |
| 04:46:02 | <boxscape> | oh |
| 04:46:08 | <boxscape> | the bracketing is different |
| 04:46:12 | → | falafel joins (~falafel@pool-108-31-243-192.washdc.fios.verizon.net) |
| 04:46:17 | <boxscape> | Yoneda :: (forall r. (r -> a) -> f r) -> Yoneda f a |
| 04:46:25 | <boxscape> | Coyoneda :: (b -> a) -> f b -> Coyoneda f a |
| 04:46:37 | <iqubic> | Yes. That's right. |
| 04:47:14 | <iqubic> | How does that make them different. |
| 04:47:46 | → | fxg joins (~fxg@unaffiliated/fxg) |
| 04:48:07 | <fresheyeball> | iqubic: Yoneda :: (a <- b) -> f b -> Yoneda f a |
| 04:48:17 | <fresheyeball> | the first arrow is flipped |
| 04:48:28 | <iqubic> | Not that I can see. |
| 04:49:04 | → | argento joins (~argent0@168.227.96.51) |
| 04:49:13 | <boxscape> | oh no |
| 04:49:22 | <boxscape> | I accidentally copied the contrvariant yoneda |
| 04:49:28 | <boxscape> | instead of the covariant one |
| 04:49:39 | → | Axman6 joins (~Axman6@pdpc/supporter/student/Axman6) |
| 04:50:02 | <boxscape> | flip the (r -> a) to (a -> r) to get the covariant one |
| 04:50:39 | <iqubic> | Right. I see. |
| 04:51:59 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 04:52:41 | → | conal joins (~conal@64.71.133.70) |
| 04:53:06 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 04:53:36 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 240 seconds) |
| 04:53:42 | × | abhixec quits (~abhixec@c-67-169-141-95.hsd1.ca.comcast.net) (Ping timeout: 258 seconds) |
| 04:55:54 | → | conal_ joins (~conal@64.71.133.70) |
| 04:56:34 | × | nyd quits (~nyd@unaffiliated/elysian) (Quit: nyd) |
| 04:58:01 | × | kupi quits (uid212005@gateway/web/irccloud.com/x-sihatzqhydqaqspq) (Quit: Connection closed for inactivity) |
| 04:59:41 | → | crestfallen joins (~jvw@192-184-135-144.fiber.dynamic.sonic.net) |
| 05:00:07 | × | conal_ quits (~conal@64.71.133.70) (Client Quit) |
| 05:00:14 | × | texasmynsted quits (~texasmyns@212.102.45.115) (Ping timeout: 256 seconds) |
| 05:00:26 | → | DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
| 05:04:10 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 05:04:12 | × | phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 256 seconds) |
| 05:04:26 | × | drincruz_ quits (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 258 seconds) |
| 05:06:29 | <MarcelineVQ> | boxscape: you monster |
| 05:06:39 | <boxscape> | what did I do |
| 05:06:52 | <MarcelineVQ> | mixing variants |
| 05:06:54 | <boxscape> | oh no |
| 05:07:06 | <boxscape> | I apologize deeply |
| 05:07:30 | <MarcelineVQ> | A note will be made on your permanent record. |
| 05:07:58 | <boxscape> | :( |
| 05:08:24 | → | Axma68625 joins (~Axman6@pdpc/supporter/student/Axman6) |
| 05:08:37 | × | Saukk quits (~Saukk@2001:998:ec:944:a00f:6382:4f0:3e7e) (Remote host closed the connection) |
| 05:08:39 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Ping timeout: 258 seconds) |
| 05:09:52 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
| 05:11:00 | × | Axman6 quits (~Axman6@pdpc/supporter/student/Axman6) (Ping timeout: 256 seconds) |
| 05:13:08 | → | Axman6 joins (~Axman6@pdpc/supporter/student/Axman6) |
| 05:14:43 | × | philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Ping timeout: 240 seconds) |
| 05:15:10 | × | Axma68625 quits (~Axman6@pdpc/supporter/student/Axman6) (Ping timeout: 258 seconds) |
| 05:16:38 | <crestfallen> | hi I'm getting the error "Invalid input" from running > eval "2+(3*4)" . I've checked over the code thoroughly, and others online who've done the same exercise, their code also returns Invalid input. thanks for looking https://gist.github.com/varreli/b32fa33506737c3b3fa0ff236dbe1c2c |
| 05:16:57 | × | ransom quits (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 05:17:18 | × | dustypacer quits (~pi@2600:6c50:80:2f4a:e9d0:6569:1cea:d1d4) (Remote host closed the connection) |
| 05:17:31 | × | geekounet quits (~geekounet@185.204.1.185) (Remote host closed the connection) |
| 05:19:17 | → | ransom joins (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) |
| 05:19:49 | <pavonia> | crestfallen: It goes expr -> term -> factor -> symbol "(" and fails there |
| 05:20:02 | → | bitmagie joins (~Thunderbi@200116b806aa1d00e4084aa62cb9001a.dip.versatel-1u1.de) |
| 05:21:03 | <crestfallen> | pavonia: huh? thanks checking .. it compiles fine.. |
| 05:21:32 | × | gaze__ quits (sid387101@gateway/web/irccloud.com/x-ydjmiyqfbpsxuqlr) (Ping timeout: 260 seconds) |
| 05:21:57 | × | noan quits (~noan@2604:a880:400:d0::12fc:5001) (Remote host closed the connection) |
| 05:22:18 | → | noan joins (~noan@2604:a880:400:d0::12fc:5001) |
| 05:22:40 | <pavonia> | Well, I didn't check if it compiles, that's there the eval call fails |
| 05:24:04 | × | trepanger quits (~z@ics141-225.icsincorporated.com) (Quit: leaving) |
| 05:24:33 | → | gaze__ joins (sid387101@gateway/web/irccloud.com/x-tspxlbivlxnknxoj) |
| 05:25:18 | <crestfallen> | pavonia: sorry please elaborate |
| 05:26:48 | → | phaul joins (~phaul@ruby/staff/phaul) |
| 05:27:26 | × | loller_ quits (uid358106@gateway/web/irccloud.com/x-kppxruluvpavuchz) (Ping timeout: 258 seconds) |
| 05:27:37 | × | benwr____ quits (sid372383@gateway/web/irccloud.com/x-zroyfovbhqhiqzax) (Ping timeout: 260 seconds) |
| 05:27:38 | × | aristid quits (sid1599@gateway/web/irccloud.com/x-hkziwpbxvyapwndr) (Ping timeout: 260 seconds) |
| 05:27:38 | × | ryjm quits (sid383513@gateway/web/irccloud.com/x-xyruibfadgkaupwy) (Ping timeout: 260 seconds) |
| 05:27:38 | × | natim87 quits (sid286962@gateway/web/irccloud.com/x-mexmpkxgonbwfktv) (Ping timeout: 260 seconds) |
| 05:27:40 | × | d0liver quits (sid363046@gateway/web/irccloud.com/x-aajmemdhisvuoilm) (Read error: Connection reset by peer) |
| 05:27:40 | × | jared-w quits (uid405292@gateway/web/irccloud.com/x-pnfyamprydnozdqy) (Read error: Connection reset by peer) |
| 05:27:40 | × | benjamingr__ quits (uid23465@gateway/web/irccloud.com/x-pjfkrpyzckdbsmgh) (Read error: Connection reset by peer) |
| 05:27:42 | × | banjiewen_ quits (sid115913@gateway/web/irccloud.com/x-rntyoakqetturqhz) (Read error: Connection reset by peer) |
| 05:27:42 | × | wpcarro_ quits (sid397589@gateway/web/irccloud.com/x-ealbiyxzmxxgewpr) (Read error: Connection reset by peer) |
| 05:27:42 | × | AndreasK quits (uid320732@gateway/web/irccloud.com/x-plgftcbqpbpmnyrj) (Read error: Connection reset by peer) |
| 05:27:42 | × | bradparker quits (sid262931@gateway/web/irccloud.com/x-nbpjheuowgmlbzcp) (Read error: Connection reset by peer) |
| 05:27:42 | × | alanz quits (sid110616@gateway/web/irccloud.com/x-hvvxxgjtvnddfyee) (Read error: Connection reset by peer) |
| 05:27:48 | × | SrPx quits (sid108780@gateway/web/irccloud.com/x-htoyitviijeanpkh) (Read error: Connection reset by peer) |
| 05:27:54 | × | systemfault quits (sid267009@gateway/web/irccloud.com/x-wdlytpqqslmpiaxc) (Read error: Connection reset by peer) |
| 05:27:57 | × | eruditass quits (uid248673@gateway/web/irccloud.com/x-onjuwmppppmuaqzi) (Read error: Connection reset by peer) |
| 05:28:00 | → | benwr____ joins (sid372383@gateway/web/irccloud.com/x-xypphoshdxsnierw) |
| 05:28:03 | → | aristid joins (sid1599@gateway/web/irccloud.com/x-yiksygoupevldqqs) |
| 05:28:03 | → | natim87 joins (sid286962@gateway/web/irccloud.com/x-ncrxsokgqnkrgrgf) |
| 05:28:05 | → | benjamingr__ joins (uid23465@gateway/web/irccloud.com/x-jltmhnzuiyltdegi) |
| 05:28:06 | → | loller_ joins (uid358106@gateway/web/irccloud.com/x-nilnbxzdzripjyrd) |
| 05:28:07 | → | banjiewen_ joins (sid115913@gateway/web/irccloud.com/x-ivdebwukluxrlfrl) |
| 05:28:13 | → | systemfault joins (sid267009@gateway/web/irccloud.com/x-gzvcgufgrbzhytha) |
| 05:28:23 | → | SrPx joins (sid108780@gateway/web/irccloud.com/x-xegzulneumbuiqbu) |
| 05:28:33 | <pavonia> | crestfallen: Have you tried evaluating that expression by hand? It should be pretty obvious then that it tried to parse a "(" at the beginning of each expression |
| 05:28:43 | → | alanz joins (sid110616@gateway/web/irccloud.com/x-enbknkhtbzmhwhvg) |
| 05:28:48 | × | joshmeredith quits (sid387798@gateway/web/irccloud.com/x-uqsodavpxzxpcuwv) (Ping timeout: 260 seconds) |
| 05:28:48 | × | totbwf quits (sid402332@gateway/web/irccloud.com/x-txjandoufixsoprd) (Ping timeout: 260 seconds) |
| 05:28:48 | → | ryjm joins (sid383513@gateway/web/irccloud.com/x-bskhgqtqitkmfuiz) |
| 05:28:52 | → | d0liver joins (sid363046@gateway/web/irccloud.com/x-klrkxlxkdtrlbbwl) |
| 05:28:52 | → | AndreasK joins (uid320732@gateway/web/irccloud.com/x-frmbvilzwwwmnfhv) |
| 05:29:00 | → | eruditass joins (uid248673@gateway/web/irccloud.com/x-bonpdgcxjhnmearr) |
| 05:29:26 | × | lally quits (sid388228@gateway/web/irccloud.com/x-lkvfvytrcbfmnwwv) (Ping timeout: 264 seconds) |
| 05:29:31 | <monochrom> | And more importantly, if that fails, there is no alternative to try. |
| 05:29:55 | → | lally joins (sid388228@gateway/web/irccloud.com/x-bnjavsttoxuogooa) |
| 05:30:00 | → | bradparker joins (sid262931@gateway/web/irccloud.com/x-xfealfqvgophfdio) |
| 05:30:01 | → | jared-w joins (uid405292@gateway/web/irccloud.com/x-ipmzhtzxqfarjsqt) |
| 05:30:32 | → | totbwf joins (sid402332@gateway/web/irccloud.com/x-gkljgvwgjywgwgba) |
| 05:31:24 | → | wpcarro_ joins (sid397589@gateway/web/irccloud.com/x-uilyvixlkpnvjftn) |
| 05:31:37 | × | tsrt^ quits (tsrt@ip98-184-89-2.mc.at.cox.net) () |
| 05:32:13 | → | joshmeredith joins (sid387798@gateway/web/irccloud.com/x-asdwgzewpjdjmslj) |
| 05:34:20 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 05:35:31 | → | u0_a298 joins (~user@65.35.205.131) |
| 05:36:00 | <crestfallen> | pavonia: sorry do I have an error in the factor function? I have it precisely how the book has it. |
| 05:37:50 | × | johnw quits (~johnw@haskell/developer/johnw) (Quit: ZNC - http://znc.in) |
| 05:38:14 | <pavonia> | crestfallen: I guess the "<|> natural" part is supposed to refer to the do block, but it refers to the "return e" |
| 05:38:52 | <pavonia> | So it the parsing of a parenthesized expression fails, the whole parser fails |
| 05:38:57 | × | bitmagie quits (~Thunderbi@200116b806aa1d00e4084aa62cb9001a.dip.versatel-1u1.de) (Quit: bitmagie) |
| 05:39:38 | → | boxscape15 joins (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) |
| 05:40:14 | <crestfallen> | working thanks pavonia ... |
| 05:40:43 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 05:41:37 | × | boxscape quits (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) (Ping timeout: 264 seconds) |
| 05:43:53 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 05:44:21 | <crestfallen> | no matter how I do the identation pavonia , it fails. can't get it.. |
| 05:44:27 | → | u0_a298 joins (~user@65.35.205.131) |
| 05:44:35 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 05:45:46 | <pavonia> | You need parentheses. (do ...) <|> natural |
| 05:47:56 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 05:48:04 | <pavonia> | or use applicative style: symbol "(" *> expr <* symbol ")" <|> natural |
| 05:48:22 | → | u0_a298 joins (~user@65.35.205.131) |
| 05:49:25 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds) |
| 05:49:36 | × | chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 05:51:44 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 05:52:25 | → | u0_a298 joins (~user@65.35.205.131) |
| 05:53:12 | → | chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
| 05:53:12 | × | chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Client Quit) |
| 05:55:25 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 05:55:54 | <crestfallen> | pavonia: brutal no go; thanks for your help |
| 05:55:55 | → | u0_a298 joins (~user@65.35.205.131) |
| 05:56:47 | × | borne quits (~fritjof@200116b86420b200bcbe2553f445a41b.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 05:58:19 | → | borne joins (~fritjof@200116b86463a100bcbe2553f445a41b.dip.versatel-1u1.de) |
| 05:59:22 | <crestfallen> | pavonia: I got it to compile with the applicative version, but the same error is returned |
| 05:59:30 | → | shah^ joins (shah@ip98-184-89-2.mc.at.cox.net) |
| 06:00:02 | <pavonia> | Could you paste the new code? |
| 06:00:20 | <crestfallen> | sure |
| 06:02:07 | <ephemient> | rewrote part 2 to use a Sequence. I shoulda benchmarked before though, I don't know if it actually improved performance lol |
| 06:02:33 | <jle`> | ephemient: wrong channel? :) |
| 06:03:06 | <ephemient> | wrong yep, wrong channel. |
| 06:03:58 | <crestfallen> | https://gist.github.com/varreli/0896128aa3fb2e7bc1c5f3e1ff420f11 sorry working on getting the whole thing pasted pavonia |
| 06:04:58 | <crestfallen> | http://ix.io/2Hg8 for now pls use this pavonia |
| 06:05:50 | <pavonia> | crestfallen: The other parsers have the same problem |
| 06:06:02 | × | troydm quits (~troydm@unaffiliated/troydm) (Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset) |
| 06:06:53 | × | dave_uy quits (~david@108.61.193.26) (Quit: The Lounge - https://thelounge.chat) |
| 06:07:47 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 06:08:32 | × | fxg quits (~fxg@unaffiliated/fxg) (Quit: Leaving) |
| 06:08:53 | → | fxg joins (~fxg@unaffiliated/fxg) |
| 06:09:14 | <crestfallen> | pavonia: I'm sort of lost. I'm not sure how it chooses the parenthesized expressions first |
| 06:09:55 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 06:10:05 | <crestfallen> | aside from why it won't evaluate any expression |
| 06:10:16 | → | dave_uy joins (~david@108.61.193.26) |
| 06:10:59 | <boxscape15> | is maximum faster on a list than on a Seq? |
| 06:13:04 | <pavonia> | crestfallen: When you have something like `do foo; return blah <|> natual`, it's parsed as `do foo; (return blah <|> natual)`. But this is not what you want. You want to try the do-block first, and if it fails use the other alternative after <|>. To accomplish that you make the parser aware that the alternative is not part of the do-block by using parentheses |
| 06:13:04 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 06:13:45 | → | u0_a298 joins (~user@65.35.205.131) |
| 06:14:05 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 240 seconds) |
| 06:14:22 | × | fxg quits (~fxg@unaffiliated/fxg) (Quit: Leaving) |
| 06:15:41 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 06:15:58 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 06:16:18 | → | troydm joins (~troydm@unaffiliated/troydm) |
| 06:16:47 | <pavonia> | crestfallen: Not the best style, but it should work to just wrap each whole do-block before <|> in parentheses |
| 06:17:50 | <crestfallen> | pavonia: I got this to compile and evaluate: http://ix.io/2Hg9 |
| 06:18:26 | <crestfallen> | but the book and others online have it as I've pasted it. maddening! |
| 06:20:22 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 260 seconds) |
| 06:20:26 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Ping timeout: 264 seconds) |
| 06:20:29 | <pavonia> | Are you sure they have exactly the same thing, not a slightly different indentation for example? |
| 06:22:38 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 06:22:39 | → | bitmagie joins (~Thunderbi@200116b806aa1d00e4084aa62cb9001a.dip.versatel-1u1.de) |
| 06:22:59 | <crestfallen> | no not sure, at least in the book, since it is a kindle cloud reader book, and the indentation is way off. but I tried a few solution sets on github and every version returns [] or error Invalid input pavonia |
| 06:23:07 | → | u0_a298 joins (~user@65.35.205.131) |
| 06:23:28 | <crestfallen> | they all compile fine |
| 06:23:47 | × | mounty quits (~mounty@2001:8000:2f59:0:955e:b3d4:6deb:61b5) (Ping timeout: 258 seconds) |
| 06:24:22 | × | sh9 quits (~sh9@softbank060116136158.bbtec.net) (Read error: Connection reset by peer) |
| 06:25:04 | <crestfallen> | but the logic is what I'm more curious about. Like how those expr -> term -> factor -> natural act recursively. It is dawning on me a bit... |
| 06:25:07 | <crestfallen> | pavonia: |
| 06:25:13 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 06:25:23 | <pavonia> | Yeah, all your parsers are of type Parser Int which can make incorrectly indented code still compile fine. Yo usually have many different return types such that indentation errors pop up more often |
| 06:26:08 | → | sh9 joins (~sh9@softbank060116136158.bbtec.net) |
| 06:26:09 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
| 06:28:16 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 06:28:47 | → | u0_a298 joins (~user@65.35.205.131) |
| 06:30:56 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 06:31:17 | → | u0_a298 joins (~user@65.35.205.131) |
| 06:33:43 | → | rayyyy joins (~nanoz@gateway/tor-sasl/nanoz) |
| 06:35:57 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 06:36:16 | → | u0_a298 joins (~user@65.35.205.131) |
| 06:37:20 | <Axman6> | boxscape15: benchmark it and find out, possibly? |
| 06:37:29 | <boxscape15> | I suppose I should |
| 06:38:40 | × | dxld quits (~dxld@rush.pub.dxld.at) (Remote host closed the connection) |
| 06:40:47 | → | dxld joins (~dxld@80-109-136-248.cable.dynamic.surfer.at) |
| 06:43:23 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 06:43:41 | × | bitmagie quits (~Thunderbi@200116b806aa1d00e4084aa62cb9001a.dip.versatel-1u1.de) (Quit: bitmagie) |
| 06:44:02 | × | echoreply quits (~echoreply@unaffiliated/echoreply) (Quit: WeeChat 1.9.1) |
| 06:44:06 | → | bitmagie joins (~Thunderbi@200116b806aa1d00e4084aa62cb9001a.dip.versatel-1u1.de) |
| 06:44:08 | → | u0_a298 joins (~user@65.35.205.131) |
| 06:44:30 | → | echoreply joins (~echoreply@unaffiliated/echoreply) |
| 06:47:49 | → | falafel_ joins (~falafel@pool-108-31-243-192.washdc.fios.verizon.net) |
| 06:47:49 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 06:48:15 | → | u0_a298 joins (~user@65.35.205.131) |
| 06:50:31 | × | falafel quits (~falafel@pool-108-31-243-192.washdc.fios.verizon.net) (Ping timeout: 265 seconds) |
| 06:50:31 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 06:51:08 | → | u0_a298 joins (~user@65.35.205.131) |
| 06:51:41 | × | mrchampion_ quits (~mrchampio@38.18.109.23) (Remote host closed the connection) |
| 06:52:26 | → | toorevitimirp joins (~tooreviti@117.182.181.85) |
| 06:54:34 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 06:54:53 | × | crestfallen quits (~jvw@192-184-135-144.fiber.dynamic.sonic.net) (Quit: leaving) |
| 06:55:17 | → | u0_a298 joins (~user@65.35.205.131) |
| 06:55:40 | × | noecho quits (~noecho@2a01:4f8:1c0c:80ee::4223) (Quit: ZNC - http://znc.in) |
| 06:55:46 | × | phasespace quits (~sar@89-162-33-21.fiber.signal.no) (Ping timeout: 256 seconds) |
| 06:55:48 | → | acidjnk_new joins (~acidjnk@p200300d0c719ff8621cd498ce205b85b.dip0.t-ipconnect.de) |
| 06:56:14 | → | noecho joins (~noecho@2a01:4f8:1c0c:80ee::4223) |
| 06:57:40 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 06:58:11 | → | nerdypepper joins (~nerdypepp@152.67.162.71) |
| 06:59:42 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 06:59:45 | × | argento quits (~argent0@168.227.96.51) (Quit: leaving) |
| 07:02:07 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Ping timeout: 258 seconds) |
| 07:02:07 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 07:02:57 | → | u0_a298 joins (~user@65.35.205.131) |
| 07:03:17 | → | coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
| 07:03:21 | × | bitmagie quits (~Thunderbi@200116b806aa1d00e4084aa62cb9001a.dip.versatel-1u1.de) (Quit: bitmagie) |
| 07:04:02 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 07:04:16 | → | gedda joins (gedda@gateway/vpn/mullvad/gedda) |
| 07:06:03 | × | coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 07:06:58 | <gedda> | sometimes, just sometimes, containers are really frustrating |
| 07:07:00 | → | coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
| 07:07:17 | <gedda> | Why doesn't Data.Set implement construction from a Traversable? |
| 07:07:59 | <gedda> | am I forced to use an intermediate list when going from Vector -> Set? |
| 07:08:28 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 246 seconds) |
| 07:09:53 | × | danso quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: WeeChat 2.9) |
| 07:10:18 | × | boxscape15 quits (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) (Quit: Connection closed) |
| 07:12:40 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 07:12:45 | → | dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) |
| 07:13:24 | → | u0_a298 joins (~user@65.35.205.131) |
| 07:14:55 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 07:16:20 | → | phasespace joins (~sar@80-89-47-117.inet.signal.no) |
| 07:16:47 | → | sQVe joins (~sQVe@unaffiliated/sqve) |
| 07:17:18 | <koz_> | gedda: foldr Set.insert Set.empty myVector works? |
| 07:17:27 | <koz_> | No intermediate lists there. |
| 07:19:35 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 07:19:50 | → | u0_a298 joins (~user@65.35.205.131) |
| 07:20:45 | seasonal-staff | is now known as glguy |
| 07:21:07 | <koz_> | % import qualified Data.Set as Set |
| 07:21:08 | <yahb> | koz_: |
| 07:21:16 | <koz_> | % :t foldr Set.insert Set.empty |
| 07:21:16 | <yahb> | koz_: (Foldable t, Ord a) => t a -> S.Set a |
| 07:21:24 | <koz_> | gedda: ^ |
| 07:21:40 | <jle`> | gedda: it's not a Traversable because then it'd need to be a Functor |
| 07:21:52 | <koz_> | jle`: _From_ a Traversable. |
| 07:22:05 | <jle`> | ah, i did read too fast :) |
| 07:22:08 | <koz_> | (I had to re-read it a few times too) |
| 07:22:26 | <jle`> | gedda: i feel like you'd create no intermediate list if you did S.fromList . V.toList |
| 07:22:38 | <jle`> | that full list will never be allocated |
| 07:23:09 | <koz_> | jle`: Yeah, but using the method above, you can be _sure_. |
| 07:23:42 | <jle`> | fair enough :) |
| 07:23:56 | × | L29Ah quits (~L29Ah@unaffiliated/l29ah) (Ping timeout: 240 seconds) |
| 07:24:09 | → | shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:d8c3:612c:6813:238e) |
| 07:24:42 | × | lambdabot quits (~lambdabot@haskell/bot/lambdabot) (Remote host closed the connection) |
| 07:25:10 | → | lambdabot joins (~lambdabot@haskell/bot/lambdabot) |
| 07:25:13 | <gedda> | koz_, thanks! Very clever, was looking at foldr in Set and not in Vector for the answer |
| 07:25:25 | <koz_> | gedda: foldr is more general. |
| 07:25:27 | <koz_> | :t foldr |
| 07:25:34 | <lambdabot> | Foldable t => (a -> b -> b) -> b -> t a -> b |
| 07:25:49 | <koz_> | It'll fold basically anything even remotely container-shaped. |
| 07:25:54 | <koz_> | (along with some things which aren't) |
| 07:26:07 | <koz_> | % :t foldr @Maybe |
| 07:26:07 | <yahb> | koz_: (a -> b -> b) -> b -> Maybe a -> b |
| 07:26:21 | × | int-e quits (~noone@int-e.eu) (Remote host closed the connection) |
| 07:26:30 | <koz_> | % :t foldr @Proxy |
| 07:26:30 | <yahb> | koz_: (a -> b -> b) -> b -> Proxy a -> b |
| 07:26:31 | <gedda> | man I must have missed that foldr in Prelude was on Foldable and not a List |
| 07:26:52 | <koz_> | % :t foldr @Identity |
| 07:26:52 | <yahb> | koz_: (a -> b -> b) -> b -> Identity a -> b |
| 07:27:08 | → | int-e joins (~noone@int-e.eu) |
| 07:27:54 | <koz_> | There's a cuter way to do Vector -> Set. |
| 07:28:01 | <koz_> | % :t foldMap Set.singleton |
| 07:28:01 | <yahb> | koz_: (Foldable t, Ord a) => t a -> S.Set a |
| 07:29:19 | <gedda> | thats actually pretty neat, I'll go with that one, thanks! |
| 07:29:45 | × | uraniumz quits (x64cmd@gateway/vpn/privateinternetaccess/x64cmd) (Ping timeout: 240 seconds) |
| 07:30:36 | <koz_> | jle` can probably come up with an even cuter one. |
| 07:30:48 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 07:31:27 | <gedda> | :t maybe id |
| 07:31:30 | <lambdabot> | (a1 -> a2 -> a2) -> Maybe a1 -> a2 -> a2 |
| 07:31:37 | <koz_> | :t fromMaybe |
| 07:31:40 | <lambdabot> | a -> Maybe a -> a |
| 07:31:48 | <gedda> | which would be the same as foldr @Maybe? |
| 07:31:56 | × | jchia__ quits (~jchia@58.32.37.146) (Quit: Leaving.) |
| 07:32:07 | <koz_> | % foldr (+) 0 (Maybe 10) |
| 07:32:07 | <yahb> | koz_: ; <interactive>:133:14: error:; * Data constructor not in scope: Maybe :: t1 -> t0 b; * Perhaps you meant variable `maybe' (imported from Prelude) |
| 07:32:12 | <koz_> | % foldr (+) 0 (Just 10) |
| 07:32:12 | <yahb> | koz_: 10 |
| 07:32:15 | → | jchia__ joins (~jchia@58.32.37.146) |
| 07:32:17 | <koz_> | % foldr (+) 0 Nothing |
| 07:32:17 | <yahb> | koz_: 0 |
| 07:32:29 | × | jchia__ quits (~jchia@58.32.37.146) (Client Quit) |
| 07:32:47 | <jle`> | foldr f z = maybe z (`f` z) |
| 07:32:49 | → | jchia__ joins (~jchia@58.32.37.146) |
| 07:33:03 | × | jchia__ quits (~jchia@58.32.37.146) (Client Quit) |
| 07:33:20 | → | x64cmd joins (~x64cmd@2601:185:203:c440::d0c8) |
| 07:33:26 | <gedda> | seems like I've severly underestimated foldr |
| 07:33:39 | <koz_> | gedda: foldr is an all-purpose wonder-weapon for smashing containers. |
| 07:33:48 | <koz_> | (so's foldMap, and it's usually cuter while doing it) |
| 07:34:02 | <koz_> | For example, here's a definition of 'toList': |
| 07:34:08 | <koz_> | % :t foldMap pure |
| 07:34:08 | <yahb> | koz_: (Foldable t, Monoid (f a), Applicative f) => t a -> f a |
| 07:34:23 | <koz_> | (it'll do a bunch more than that, but toList is one possible use) |
| 07:34:48 | × | loller_ quits (uid358106@gateway/web/irccloud.com/x-nilnbxzdzripjyrd) (Quit: Connection closed for inactivity) |
| 07:34:50 | × | bthom quits (~thomas_07@2601:184:4700:b89:abdc:f6d7:f8b7:16e2) (Ping timeout: 264 seconds) |
| 07:35:19 | <koz_> | And here's one of 'length': |
| 07:35:26 | × | machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 256 seconds) |
| 07:35:31 | → | bthom joins (~bthom@2601:184:4700:b89:abdc:f6d7:f8b7:16e2) |
| 07:35:51 | <koz_> | % :t getSum . foldMap (\_ -> Sum 1) |
| 07:35:51 | <yahb> | koz_: (Foldable t, Num c) => t a -> c |
| 07:35:58 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 07:36:27 | <koz_> | % :t getSum . foldMap (Sum . const 1) -- for maximum pointless |
| 07:36:27 | <yahb> | koz_: (Foldable t, Num c) => t b -> c |
| 07:36:37 | × | Yumasi quits (~guillaume@2a01:e0a:5cb:4430:5178:619c:fc92:5a85) (Ping timeout: 258 seconds) |
| 07:37:08 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 07:37:51 | <gedda> | I need to find more reasons to use haskell |
| 07:38:05 | <gedda> | outside of advent of code |
| 07:38:21 | <koz_> | gedda: Get a job Haskelling. |
| 07:38:30 | <koz_> | That's a pretty good reason. :P |
| 07:38:50 | <int-e> | koz_: that one has a bootstrapping problem though :P |
| 07:39:06 | <koz_> | int-e: Yeah, I admit I was a Haskeller for fun long before I was one for profit. |
| 07:39:22 | <iqubic> | @quote jle` sleep |
| 07:39:22 | → | polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) |
| 07:39:22 | <lambdabot> | jle` says: let sleep = pure "zzz" in getSum sleep |
| 07:41:36 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 07:41:44 | <gedda> | Yeah would love to, but the offerings are slim to none in the areas I work with |
| 07:42:10 | <gedda> | From what I've seen, finance seems to use Haskell the most? |
| 07:42:59 | × | falafel_ quits (~falafel@pool-108-31-243-192.washdc.fios.verizon.net) (Ping timeout: 260 seconds) |
| 07:43:12 | → | u0_a298 joins (~user@65.35.205.131) |
| 07:45:16 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 07:47:17 | → | u0_a298 joins (~user@65.35.205.131) |
| 07:47:42 | → | werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) |
| 07:49:51 | × | hiroaki quits (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 07:50:28 | → | hiroaki joins (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de) |
| 07:50:52 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 07:51:54 | × | sgibber2018 quits (~arch-gibb@208.85.237.137) (Quit: WeeChat 2.9) |
| 07:54:22 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 07:55:17 | → | u0_a298 joins (~user@65.35.205.131) |
| 07:58:05 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 07:58:30 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 07:59:18 | → | u0_a298 joins (~user@65.35.205.131) |
| 08:00:10 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 08:01:04 | → | m0rphism joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) |
| 08:03:24 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 260 seconds) |
| 08:03:24 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 08:04:13 | → | u0_a298 joins (~user@65.35.205.131) |
| 08:06:19 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 08:06:56 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 08:07:42 | → | u0_a298 joins (~user@65.35.205.131) |
| 08:09:22 | → | chele joins (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) |
| 08:11:36 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 08:11:43 | <koz_> | gedda: Yeah, there's a lot of Haskell in finance stuff. |
| 08:11:58 | <koz_> | However, there's a range - there's some folks in the Netherlands doing _hardware design_ in Haskell. |
| 08:12:10 | <koz_> | (I even applied for them, but I got bounced cause I didn't wanna relocate) |
| 08:12:15 | → | Yumasi joins (~guillaume@static-176-175-104-214.ftth.abo.bbox.fr) |
| 08:12:16 | → | u0_a298 joins (~user@65.35.205.131) |
| 08:14:00 | × | coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 08:15:19 | → | coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
| 08:16:15 | × | x64cmd quits (~x64cmd@2601:185:203:c440::d0c8) (Quit: Leaving) |
| 08:17:05 | <maerwald> | oh no, snoyman just wrote a blog post about transformers in rust? It's not like I was missing them there... |
| 08:17:46 | <koz_> | maerwald: Yeah, while saying 'it's not like I actually _like_ transformers, baka!'. |
| 08:17:53 | <koz_> | (because Snoyman will Snoyman in _any_ language) |
| 08:18:23 | × | coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 08:19:08 | × | glguy quits (x@freenode/staff/haskell.developer.glguy) (Ping timeout: 606 seconds) |
| 08:21:08 | → | coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
| 08:21:20 | × | coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 08:22:01 | × | MOSCOS quits (~MOSCOS@122.54.107.175) (Remote host closed the connection) |
| 08:22:12 | × | Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer) |
| 08:22:26 | → | MOSCOS joins (~MOSCOS@122.54.107.175) |
| 08:22:48 | → | niko joins (~niko@freenode/staff/ubuntu.member.niko) |
| 08:23:01 | × | sim590 quits (~sim590@modemcable090.207-203-24.mc.videotron.ca) (Ping timeout: 264 seconds) |
| 08:23:24 | → | coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
| 08:23:47 | → | knupfer joins (~Thunderbi@200116b824fa4500946397fffe021fd1.dip.versatel-1u1.de) |
| 08:23:59 | <maerwald> | I'll have to go back to Go, because it's unlikely that crap will make it into the language :p |
| 08:24:26 | <maerwald> | (but then the language is crap...) |
| 08:24:34 | → | desophos joins (~desophos@2601:249:1680:a570:dc82:b6a1:9d59:9d35) |
| 08:24:35 | → | michalz joins (~user@185.246.204.39) |
| 08:24:53 | × | knupfer quits (~Thunderbi@200116b824fa4500946397fffe021fd1.dip.versatel-1u1.de) (Remote host closed the connection) |
| 08:25:02 | → | knupfer joins (~Thunderbi@200116b824fa450040da3329f3b9a8c8.dip.versatel-1u1.de) |
| 08:25:07 | <koz_> | maerwald: Lol. |
| 08:25:33 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@171.5.29.209) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 08:26:09 | × | borne quits (~fritjof@200116b86463a100bcbe2553f445a41b.dip.versatel-1u1.de) (Ping timeout: 272 seconds) |
| 08:27:51 | → | christo joins (~chris@81.96.113.213) |
| 08:30:05 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 08:30:11 | → | mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
| 08:30:35 | → | u0_a298 joins (~user@65.35.205.131) |
| 08:32:58 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 08:33:15 | → | u0_a298 joins (~user@65.35.205.131) |
| 08:35:39 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 08:35:56 | → | u0_a298 joins (~user@65.35.205.131) |
| 08:36:06 | → | sim590 joins (~sim590@modemcable090.207-203-24.mc.videotron.ca) |
| 08:36:16 | → | L29Ah joins (~L29Ah@unaffiliated/l29ah) |
| 08:37:40 | → | mbomba joins (~mbomba@bras-base-toroon2719w-grc-53-142-114-5-26.dsl.bell.ca) |
| 08:38:10 | × | DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
| 08:39:02 | → | DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
| 08:40:03 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 240 seconds) |
| 08:41:27 | × | coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Remote host closed the connection) |
| 08:41:45 | × | hiroaki quits (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de) (Ping timeout: 240 seconds) |
| 08:43:26 | × | sim590 quits (~sim590@modemcable090.207-203-24.mc.videotron.ca) (Ping timeout: 256 seconds) |
| 08:43:42 | → | boxscape joins (86ab2cb4@gateway/web/cgi-irc/kiwiirc.com/ip.134.171.44.180) |
| 08:45:08 | × | obfusk quits (~quassel@a82-161-150-56.adsl.xs4all.nl) (Ping timeout: 256 seconds) |
| 08:46:09 | → | sim590 joins (~sim590@modemcable090.207-203-24.mc.videotron.ca) |
| 08:46:12 | → | coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
| 08:46:49 | → | glguy joins (x@freenode/staff/haskell.developer.glguy) |
| 08:48:56 | → | obfusk joins (~quassel@a82-161-150-56.adsl.xs4all.nl) |
| 08:48:57 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 08:49:57 | → | u0_a298 joins (~user@65.35.205.131) |
| 08:51:01 | → | urek joins (~urek@2804:7f1:e10a:7d51:c470:9916:f9e5:aa4) |
| 08:53:56 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 08:54:17 | → | u0_a298 joins (~user@65.35.205.131) |
| 08:55:05 | × | benjamingr__ quits (uid23465@gateway/web/irccloud.com/x-jltmhnzuiyltdegi) (Quit: Connection closed for inactivity) |
| 08:56:37 | → | thc202 joins (~thc202@unaffiliated/thc202) |
| 09:00:06 | × | tersetears[m] quits (tersetears@gateway/shell/matrix.org/x-djplfbkhyixflrhq) (Quit: Idle for 30+ days) |
| 09:01:00 | → | wonko7 joins (~wonko7@2a01:e35:2ffb:7040:14a1:46f4:68f7:2133) |
| 09:02:05 | <boxscape> | is there a type that you can use to derive an Applicative instance if you have a Monad instance like `data MyFunctor = ... deriving Applicative via (DefaultApplicative MyFunctor)`? |
| 09:02:46 | × | phaul quits (~phaul@ruby/staff/phaul) (Ping timeout: 256 seconds) |
| 09:04:39 | → | phaul joins (~phaul@ruby/staff/phaul) |
| 09:06:14 | <lortabac> | boxscape: Control.Applicative.WrappedMonad |
| 09:06:20 | <boxscape> | ah, thank you |
| 09:06:28 | → | zaquest joins (~notzaques@5.128.210.178) |
| 09:06:49 | × | cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 265 seconds) |
| 09:07:44 | <hyiltiz> | I found a few days ago that Python is learning more (pattern matching and guards) from haskell except its list comprehension https://www.python.org/dev/peps/pep-0622/#exhaustiveness-checks though some folks doesn't seem to appreciate it https://news.ycombinator.com/item?id=23713795 |
| 09:07:45 | × | zaquest quits (~notzaques@5.128.210.178) (Remote host closed the connection) |
| 09:08:39 | <hyiltiz> | Let's see if a case-of expression comes back after all these years https://www.python.org/dev/peps/pep-3103/ |
| 09:11:04 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 09:11:29 | <boxscape> | java is going a similar route |
| 09:11:48 | <boxscape> | https://cr.openjdk.java.net/~briangoetz/amber/pattern-match.html |
| 09:12:12 | × | knupfer quits (~Thunderbi@200116b824fa450040da3329f3b9a8c8.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 09:12:15 | → | u0_a298 joins (~user@65.35.205.131) |
| 09:13:55 | → | jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se) |
| 09:14:36 | → | shf joins (~sheaf@2a01:cb19:80cc:7e00:4499:9502:e93c:8bfb) |
| 09:14:37 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 09:15:54 | <maerwald> | yeah, sum types are arguably the most valuable thing in haskell, the rest is just sweet options |
| 09:16:00 | × | desophos quits (~desophos@2601:249:1680:a570:dc82:b6a1:9d59:9d35) (Quit: Leaving) |
| 09:16:03 | <hyiltiz> | i thought i was reading nerd docs, not fasion mag :p |
| 09:16:40 | <boxscape> | At least you've been able to use Church/Scott encodings in the other languages for quite a while :) |
| 09:16:42 | <hyiltiz> | does java python or ruby has sum types (bolted on, that is) |
| 09:19:25 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 09:19:30 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 09:19:41 | → | u0_a298 joins (~user@65.35.205.131) |
| 09:20:11 | → | bitmagie joins (~Thunderbi@200116b806aa1d00e4084aa62cb9001a.dip.versatel-1u1.de) |
| 09:20:22 | × | bitmagie quits (~Thunderbi@200116b806aa1d00e4084aa62cb9001a.dip.versatel-1u1.de) (Client Quit) |
| 09:22:33 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 09:23:52 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Ping timeout: 260 seconds) |
| 09:24:14 | → | u0_a298 joins (~user@65.35.205.131) |
| 09:24:37 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 09:25:06 | → | christo joins (~chris@81.96.113.213) |
| 09:27:42 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 09:28:56 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 240 seconds) |
| 09:29:54 | × | christo quits (~chris@81.96.113.213) (Ping timeout: 256 seconds) |
| 09:31:14 | → | u0_a298 joins (~user@65.35.205.131) |
| 09:33:24 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 09:35:16 | → | u0_a298 joins (~user@65.35.205.131) |
| 09:36:52 | → | boxscape92 joins (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) |
| 09:39:03 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 09:39:04 | → | fendor joins (~fendor@77.119.128.243.wireless.dyn.drei.com) |
| 09:39:07 | → | Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk) |
| 09:39:44 | → | christo joins (~chris@81.96.113.213) |
| 09:40:24 | → | u0_a298 joins (~user@65.35.205.131) |
| 09:40:36 | × | boxscape quits (86ab2cb4@gateway/web/cgi-irc/kiwiirc.com/ip.134.171.44.180) (Ping timeout: 240 seconds) |
| 09:41:07 | → | danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) |
| 09:41:12 | × | hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-rmxdeovfftxpgutx) (Quit: Connection closed for inactivity) |
| 09:42:03 | → | SanchayanM joins (~Sanchayan@106.200.195.64) |
| 09:42:14 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 09:42:34 | → | dnlkrgr joins (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) |
| 09:43:33 | × | SanchayanMaity quits (~Sanchayan@122.167.92.138) (Ping timeout: 265 seconds) |
| 09:43:40 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 09:44:16 | boxscape92 | is now known as boxscape |
| 09:44:23 | × | olligobber quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection) |
| 09:46:23 | × | ChaiTRex quits (~ChaiTRex@gateway/tor-sasl/chaitrex) (Ping timeout: 240 seconds) |
| 09:47:03 | → | iqubic` joins (~user@c-67-171-38-72.hsd1.wa.comcast.net) |
| 09:48:52 | × | iqubic quits (~user@2601:602:9500:4870:9dce:a684:2556:7d9f) (Ping timeout: 258 seconds) |
| 09:51:19 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 09:52:18 | → | u0_a298 joins (~user@65.35.205.131) |
| 09:53:08 | × | neiluj quits (~jco@unaffiliated/neiluj) (Ping timeout: 256 seconds) |
| 09:55:17 | → | DavidEichmann joins (~david@62.110.198.146.dyn.plus.net) |
| 09:55:17 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 09:55:46 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:deb:313c:b080:2641) (Remote host closed the connection) |
| 09:57:11 | → | u0_a298 joins (~user@65.35.205.131) |
| 10:00:30 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 10:01:14 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 10:03:27 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 10:04:18 | → | u0_a298 joins (~user@65.35.205.131) |
| 10:05:18 | × | sh9 quits (~sh9@softbank060116136158.bbtec.net) (Ping timeout: 265 seconds) |
| 10:05:44 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Ping timeout: 258 seconds) |
| 10:07:58 | <boxscape> | hm seems strange that Data.Lens has |> and a pattern synonym for Empty like Seq but no pattern synonym for :|> |
| 10:08:30 | × | SanchayanM quits (~Sanchayan@106.200.195.64) (Ping timeout: 256 seconds) |
| 10:09:06 | <boxscape> | er, Control.Lens rather |
| 10:10:08 | × | seanparsons quits (~sean@cpc145088-gill21-2-0-cust281.20-1.cable.virginm.net) (Ping timeout: 256 seconds) |
| 10:11:42 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@mx-ll-171.5.29-209.dynamic.3bb.co.th) |
| 10:13:46 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 10:14:31 | → | u0_a298 joins (~user@65.35.205.131) |
| 10:15:12 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:2bf5:8913:5fd7:7df1) (Ping timeout: 260 seconds) |
| 10:16:45 | <maerwald> | hyiltiz: not really |
| 10:16:48 | <maerwald> | but there's https://coconut.readthedocs.io/en/master/DOCS.html#match |
| 10:18:23 | → | SanchayanMaity joins (~Sanchayan@106.200.195.64) |
| 10:18:31 | → | aqd joins (~aqd@84.20.147.33) |
| 10:21:44 | × | rprije quits (~rprije@14-201-170-17.tpgi.com.au) (Ping timeout: 265 seconds) |
| 10:22:07 | → | ubert joins (~Thunderbi@p200300ecdf1e5386e6b318fffe838f33.dip0.t-ipconnect.de) |
| 10:22:40 | × | shf quits (~sheaf@2a01:cb19:80cc:7e00:4499:9502:e93c:8bfb) (Read error: Connection reset by peer) |
| 10:22:46 | → | urek__ joins (~urek@2804:7f1:e10a:7d51:5950:bd78:756c:c071) |
| 10:24:08 | × | urek quits (~urek@2804:7f1:e10a:7d51:c470:9916:f9e5:aa4) (Ping timeout: 258 seconds) |
| 10:26:39 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 10:27:14 | → | u0_a298 joins (~user@65.35.205.131) |
| 10:27:14 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:5240:599:f44f:5dee) |
| 10:28:56 | → | seanparsons joins (~sean@cpc145088-gill21-2-0-cust281.20-1.cable.virginm.net) |
| 10:30:17 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 10:30:28 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 10:31:39 | × | guest129` quits (~user@49.5.6.87) (Quit: ERC (IRC client for Emacs 27.1)) |
| 10:32:19 | × | xsperry quits (~as@unaffiliated/xsperry) () |
| 10:34:16 | × | Cthalupa quits (~cthulhu@47.186.47.75) (Ping timeout: 240 seconds) |
| 10:35:56 | → | Cthalupa joins (~cthulhu@47.186.47.75) |
| 10:37:53 | → | kuribas joins (~user@ptr-25vy0i73uopu9zhtdmp.18120a2.ip6.access.telenet.be) |
| 10:38:38 | → | pthariensflame joins (~pthariens@2600:6c52:7280:100:2c51:f53e:7c95:7107) |
| 10:39:00 | × | pthariensflame quits (~pthariens@2600:6c52:7280:100:2c51:f53e:7c95:7107) (Client Quit) |
| 10:39:17 | → | shf joins (~sheaf@2a01:cb19:80cc:7e00:4499:9502:e93c:8bfb) |
| 10:41:29 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 10:42:15 | → | u0_a298 joins (~user@65.35.205.131) |
| 10:42:16 | × | hidedagger quits (~nate@unaffiliated/hidedagger) (Ping timeout: 240 seconds) |
| 10:42:40 | × | st8less quits (~st8less@inet-167-224-197-181.isp.ozarksgo.net) (Quit: WeeChat 2.9) |
| 10:42:59 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 10:44:46 | × | mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 10:45:32 | → | __monty__ joins (~toonn@unaffiliated/toonn) |
| 10:47:52 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Ping timeout: 260 seconds) |
| 10:47:53 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 10:48:12 | × | shah^ quits (shah@ip98-184-89-2.mc.at.cox.net) () |
| 10:48:14 | → | u0_a298 joins (~user@65.35.205.131) |
| 10:49:19 | → | tsrt^ joins (tsrt@ip98-184-89-2.mc.at.cox.net) |
| 10:51:35 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 10:52:13 | → | u0_a298 joins (~user@65.35.205.131) |
| 10:52:32 | → | solonarv joins (~solonarv@astrasbourg-552-1-28-212.w90-13.abo.wanadoo.fr) |
| 10:54:40 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) () |
| 10:55:08 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 10:56:09 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:deb:313c:b080:2641) |
| 10:57:23 | → | Tops2 joins (~Tobias@dyndsl-095-033-092-168.ewe-ip-backbone.de) |
| 10:58:51 | → | gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh) |
| 11:01:26 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 11:01:50 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:deb:313c:b080:2641) (Ping timeout: 264 seconds) |
| 11:02:16 | → | u0_a298 joins (~user@65.35.205.131) |
| 11:04:35 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 11:05:05 | → | u0_a298 joins (~user@65.35.205.131) |
| 11:05:15 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 11:07:00 | → | Martinsos joins (~user@cpe-188-129-36-113.dynamic.amis.hr) |
| 11:08:04 | → | LKoen joins (~LKoen@243.169.9.109.rev.sfr.net) |
| 11:10:25 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@mx-ll-171.5.29-209.dynamic.3bb.co.th) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 11:11:24 | × | darjeeling_ quits (~darjeelin@122.245.123.202) (Ping timeout: 256 seconds) |
| 11:12:46 | → | darjeeling_ joins (~darjeelin@122.245.123.202) |
| 11:14:05 | → | conal joins (~conal@64.71.133.70) |
| 11:14:39 | → | jurses joins (~jurses@185.190.253.115) |
| 11:15:07 | × | sQVe quits (~sQVe@unaffiliated/sqve) (Ping timeout: 258 seconds) |
| 11:15:56 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 240 seconds) |
| 11:18:19 | × | jurses quits (~jurses@185.190.253.115) (Client Quit) |
| 11:20:15 | → | hans_ joins (~hans@94-214-46-13.cable.dynamic.v4.ziggo.nl) |
| 11:22:26 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 11:22:56 | × | hans_ quits (~hans@94-214-46-13.cable.dynamic.v4.ziggo.nl) (Client Quit) |
| 11:22:57 | → | u0_a298 joins (~user@65.35.205.131) |
| 11:23:41 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 11:25:08 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 11:27:17 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 11:27:48 | → | u0_a298 joins (~user@65.35.205.131) |
| 11:28:40 | → | sQVe joins (sQVe@gateway/vpn/mullvad/sqve) |
| 11:29:17 | × | acidjnk_new quits (~acidjnk@p200300d0c719ff8621cd498ce205b85b.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 11:29:56 | × | jedws quits (~jedws@121.209.181.215) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 11:30:28 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 11:32:39 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 11:36:10 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 11:36:22 | → | the-smug-one joins (~user@83-92-112-87-cable.dk.customer.tdc.net) |
| 11:36:35 | → | u0_a298 joins (~user@65.35.205.131) |
| 11:37:40 | × | mbomba quits (~mbomba@bras-base-toroon2719w-grc-53-142-114-5-26.dsl.bell.ca) (Quit: WeeChat 3.0) |
| 11:39:08 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 11:40:31 | → | Amras joins (~Amras@unaffiliated/amras) |
| 11:43:01 | <the-smug-one> | Do you guys think it would be nice to have a journal which finds and summarizes current papers? |
| 11:43:12 | <the-smug-one> | Also does that exist? |
| 11:45:23 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 11:45:23 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 11:45:43 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 11:45:58 | × | sQVe quits (sQVe@gateway/vpn/mullvad/sqve) (Ping timeout: 256 seconds) |
| 11:46:14 | → | u0_a298 joins (~user@65.35.205.131) |
| 11:46:36 | × | dmiles quits (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) (Ping timeout: 240 seconds) |
| 11:47:48 | → | rayyyy joins (~nanoz@gateway/tor-sasl/nanoz) |
| 11:48:11 | <maerwald> | merijn: defining vim plugins in yaml, just what you wanted: https://github.com/itchyny/miv (and written in haskell) |
| 11:48:29 | <merijn> | maerwald: Why you gotta ruin my day like that |
| 11:48:33 | <maerwald> | lol |
| 11:49:47 | → | dmiles joins (~dmiles@c-73-67-179-188.hsd1.wa.comcast.net) |
| 11:52:04 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 11:52:35 | → | u0_a298 joins (~user@65.35.205.131) |
| 11:53:21 | × | hexfive quits (~hexfive@50-47-142-195.evrt.wa.frontiernet.net) (Quit: i must go. my people need me.) |
| 11:55:45 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 11:56:18 | → | u0_a298 joins (~user@65.35.205.131) |
| 11:58:25 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 11:58:41 | → | u0_a298 joins (~user@65.35.205.131) |
| 11:58:43 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 11:58:59 | <merijn> | maerwald: If it's any consolation, I'm not just a ghcup luddite, I'm also still using pathogen :p |
| 11:59:58 | × | urek__ quits (~urek@2804:7f1:e10a:7d51:5950:bd78:756c:c071) (Ping timeout: 258 seconds) |
| 12:00:13 | → | sQVe joins (~sQVe@unaffiliated/sqve) |
| 12:01:49 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 12:02:38 | <aplainzetakind> | https://hackage.haskell.org/package/bench produces significantly smaller times than the `time` command. What's the overhead with `time`? |
| 12:03:07 | <aplainzetakind> | Like I'm getting 0.05s with time and 0.02 with bench. |
| 12:03:34 | → | ph88 joins (~ph88@ip5f5af6cd.dynamic.kabel-deutschland.de) |
| 12:04:09 | <merijn> | "time" does a single run, which is noisey, bench uses criterion which repeats experiments and does statistical analysis to eliminate measurement noise from the equation |
| 12:04:28 | <ph88> | does anyone know the reason behind the historical decision to make a char in single quotes and string in double quotes ? why not type infer a string with only 1 char to be of type char ? |
| 12:05:03 | <boxscape> | how would you write a string literal of length 1 if that were the case? |
| 12:05:20 | <aplainzetakind> | merijn: So it's not cheating to go by the bench number I suppose. |
| 12:05:28 | × | jrm quits (~jrm@freebsd/developer/jrm) (Ping timeout: 260 seconds) |
| 12:05:41 | <merijn> | ph88: Because many languages prior to Python had that distinction |
| 12:05:49 | ← | remy^ parts (~remy@unaffiliated/remy/x-3943829) ("Leaving") |
| 12:05:55 | <merijn> | ph88: C, C++, Java (iirc?) all distinguish characters and strings |
| 12:06:17 | <merijn> | The lack of specific character type and allowing both types of quotes is a fairly new thing |
| 12:06:19 | <boxscape> | yeah Java works like C in that regard |
| 12:06:22 | <ph88> | boxscape, the same but it would be infered to be a string depending on how you would use it |
| 12:06:43 | <yushyin> | aplainzetakind: you could also compare it to perf stat -r 1000 $cmd |
| 12:06:43 | <merijn> | ph88: Your question is inverted, and thus unanswerable |
| 12:06:50 | × | DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
| 12:06:51 | <boxscape> | So like `'c' :: FromChar a => a` |
| 12:06:57 | <ph88> | merijn, do you have an advice which style to use for a new language ? |
| 12:07:05 | <merijn> | ph88: There was no "historical decision" to do that. It just copied what literally every other language at the time did |
| 12:07:11 | → | DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
| 12:07:29 | <merijn> | Having separate syntax for characters and strings is the right way, imo |
| 12:07:35 | <ph88> | why ? |
| 12:07:46 | → | jmchael joins (~jmchael@87.112.60.168) |
| 12:07:54 | <boxscape> | what do you gain by having a single syntax for both? |
| 12:08:24 | <ph88> | that single quotes can be used for strings |
| 12:08:38 | <merijn> | And that's useful because? |
| 12:08:54 | <ph88> | people are used to that from other languages |
| 12:08:56 | <merijn> | What does it let you write that you couldn't write before? |
| 12:09:21 | <ph88> | it's not about ability, rather about style and familiarity |
| 12:09:25 | <merijn> | Well, if you wanna be the same as other languages because people are used to them, why bother making a new one at all? :p |
| 12:09:51 | <merijn> | ph88: As I said, C, C++, and Java, (possibly C# and F# too?) all use the same distinction |
| 12:10:04 | <ph88> | we need a language for a specific domain and strings is one of the first things we need |
| 12:10:06 | <merijn> | I forget what Ocaml does, but I think it does the same |
| 12:10:22 | × | kritzefitz quits (~kritzefit@212.86.56.80) (Ping timeout: 260 seconds) |
| 12:10:52 | <boxscape> | to me it seems a bit weird to have two almost identical ways to write the same literal |
| 12:10:56 | <ph88> | i'm considering just not having a char type and allow single quotes for strings |
| 12:11:10 | <boxscape> | though arguably the same could be said about 5.0 and 5.00 |
| 12:11:16 | <ph88> | :P |
| 12:12:00 | <ph88> | in php you also have something funny where ' ' is a string literal, and " " is a string which is interpolated first with variables you drop in there |
| 12:12:09 | <ph88> | not that i plan on doing that :P |
| 12:12:58 | <[exa]> | ph88: you can have an instance for IsString Char |
| 12:13:25 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 12:13:29 | <lortabac> | instead of a redundant syntax for strings, I would rather use single quotes for identifiers composed of arbitrary characters, as in Prolog |
| 12:13:37 | <[exa]> | (related: scheme character literals) |
| 12:13:44 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 12:13:52 | <lortabac> | so you can have for ex. uppercase record fields |
| 12:14:14 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 12:14:26 | <[exa]> | lortabac: that might easily turn to lowercase and uppercase ' |
| 12:14:32 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 12:15:02 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 12:15:15 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 12:15:17 | <lortabac> | [exa]: sorry I don't understand |
| 12:15:35 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 12:15:48 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 12:16:03 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 12:16:36 | × | shatriff quits (~vitaliish@176.52.219.10) (Remote host closed the connection) |
| 12:18:03 | <[exa]> | lortabac: like, if you have uppercase record fields in 'Field', what if I wanted a typename called 'typename' ? |
| 12:18:31 | <lortabac> | you can't |
| 12:19:07 | → | jrm joins (~jrm@freebsd/developer/jrm) |
| 12:19:09 | <lortabac> | in Prolog, single-quoted identifiers are equivalent to lowercase ones without quotes |
| 12:19:38 | → | Entertainment joins (~entertain@104.246.132.210) |
| 12:20:31 | <[exa]> | yeah well, people will start solving the "you can't" :] |
| 12:21:19 | <lortabac> | there is nothing to solve, 'Foo' belongs to the same namespace as foo |
| 12:21:37 | <lortabac> | Foo belongs to the uppercase namespace |
| 12:22:43 | <lortabac> | unless by "solving" you mean proposing new extensions |
| 12:22:48 | <[exa]> | yeah |
| 12:23:01 | <lortabac> | oh I see :) |
| 12:23:34 | → | elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) |
| 12:24:58 | → | da39a3ee5e6b4b0d joins (~da39a3ee5@171.5.29.209) |
| 12:28:22 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 12:28:29 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 12:29:13 | → | u0_a298 joins (~user@65.35.205.131) |
| 12:29:16 | × | haritz quits (~hrtz@unaffiliated/haritz) (Ping timeout: 240 seconds) |
| 12:30:35 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 12:30:47 | <Martinsos> | ph88, merijn: Javascript might be a good example of what ph88 is talking about. I wouldn't be so bold to say there is a right way, since both approaches are obviously in use. It makes sense to have separate char and string in languages that are lower level, where that distinction is important. I also personally like having that distinction, since then we can reason about String as an array of Chars, and we can use array methods on it, |
| 12:30:47 | <Martinsos> | but on the other hands, I never had any problems with strings in JS or felt that something is missing. Personally, I would probably go with just string, if language is not much about string manipulation on the low level. If it is, I would consider introducing character. Maybe the easiest way is to start with just string and see how that goes. At least you are keeping things simpler for the user of the language if you have just string |
| 12:30:47 | <Martinsos> | and not string and char. However, I wouldn't allow usage of both single quote and double quote, I feel it just causes confusion and differences in style. If I am coming from Java to your language, I might think that 'a' is different type than "a", while it is not. I would use just double quotes, since those are standard way to describe string literal. That also leave space for introducing character down the line if you figure out you |
| 12:30:47 | <Martinsos> | need it. |
| 12:31:12 | → | haritz joins (~hrtz@62.3.70.206) |
| 12:31:12 | × | haritz quits (~hrtz@62.3.70.206) (Changing host) |
| 12:31:12 | → | haritz joins (~hrtz@unaffiliated/haritz) |
| 12:33:11 | <maerwald> | but then you gotta answer the question what a char is :p |
| 12:33:38 | <merijn> | maerwald: How hard could that be? :D |
| 12:33:43 | <maerwald> | haha... |
| 12:34:25 | → | conal joins (~conal@64.71.133.70) |
| 12:34:47 | <boxscape> | if you've figured out what strings are and have a substring function you're probably most of the way there, no? |
| 12:35:05 | <merijn> | boxscape: lol |
| 12:35:21 | <boxscape> | it just seems like figuring out what strings are is just as difficuly |
| 12:35:24 | <boxscape> | s/y/t |
| 12:35:25 | <merijn> | You could spend a decade and not figure out how to properly define "substring" |
| 12:35:35 | <boxscape> | right I suppose that's fair |
| 12:35:53 | <merijn> | boxscape: Figuring out strings is easy "unknown unicode blob that I'm *definitely* not going to touch" |
| 12:36:05 | <maerwald> | there are 3 popular choices already: 1. word8, 2. unicode char point, 3. grapheme |
| 12:39:01 | × | berberman_ quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.7.5 - https://znc.in) |
| 12:39:48 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 12:44:23 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 12:46:16 | × | lotuseater quits (~user@ip-176-198-181-124.hsi05.unitymediagroup.de) (Ping timeout: 240 seconds) |
| 12:48:03 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 12:49:10 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
| 12:49:13 | × | solonarv quits (~solonarv@astrasbourg-552-1-28-212.w90-13.abo.wanadoo.fr) (Read error: Connection reset by peer) |
| 12:50:22 | × | ubert quits (~Thunderbi@p200300ecdf1e5386e6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 12:50:26 | → | solonarv joins (~solonarv@astrasbourg-552-1-28-212.w90-13.abo.wanadoo.fr) |
| 12:51:07 | → | carlomagno joins (~cararell@148.87.23.11) |
| 12:52:34 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 12:53:14 | <boxscape> | I like Word7, to be fully ASCII-compliant |
| 12:53:32 | <merijn> | UTF-7 :p |
| 12:53:36 | → | scasc joins (~szabi@213142096072.public.telering.at) |
| 12:53:58 | <boxscape> | that sounds terrible |
| 12:54:05 | → | Martinso` joins (~user@cpe-188-129-36-113.dynamic.amis.hr) |
| 12:54:05 | <merijn> | It exists :p |
| 12:55:16 | <tomsmeding> | TIL about UTF-7 and I already hate it |
| 12:55:29 | <tomsmeding> | is that +base64- encoding really the best they could come up with |
| 12:55:47 | <merijn> | Ok, given a '[Foo]' and 'Foo -> Either Bar Quux' what's the most convenient way to stop at the first Right? |
| 12:56:48 | <tomsmeding> | :t msum |
| 12:56:49 | <lambdabot> | (Foldable t, MonadPlus m) => t (m a) -> m a |
| 12:57:05 | × | Martinsos quits (~user@cpe-188-129-36-113.dynamic.amis.hr) (Ping timeout: 258 seconds) |
| 12:57:05 | <tomsmeding> | well, msum . map f |
| 12:57:26 | <xerox_> | or asum |
| 12:57:28 | <merijn> | Well, no |
| 12:57:41 | <merijn> | Because Either isn't an instance of Alternative (and thus not MonadPlus) |
| 12:57:45 | <merijn> | Else I wouldn't be asking :p |
| 12:58:02 | <xerox_> | how sad |
| 12:58:26 | × | the-smug-one quits (~user@83-92-112-87-cable.dk.customer.tdc.net) (Ping timeout: 260 seconds) |
| 12:58:27 | <tomsmeding> | my technique of always testing this stuff with Maybe has failed me here |
| 12:58:28 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:deb:313c:b080:2641) |
| 12:58:36 | <tomsmeding> | what do you want on [] though |
| 12:59:00 | <tomsmeding> | or all-Left |
| 12:59:12 | <tomsmeding> | which is of course the reason it's not Alternative :p |
| 13:00:00 | → | ChaiTRex joins (~ChaiTRex@gateway/tor-sasl/chaitrex) |
| 13:00:04 | <xerox_> | :t rights |
| 13:00:08 | <lambdabot> | [Either a b] -> [b] |
| 13:00:12 | <xerox_> | I guess? |
| 13:00:13 | <merijn> | Guess I'll just turn Either into Maybe |
| 13:00:18 | <merijn> | xerox_: Doesn't stop at first Right |
| 13:00:26 | <tomsmeding> | safeHead . rights |
| 13:00:28 | <merijn> | xerox_: Still evaluates the whole list |
| 13:00:34 | <xerox_> | :t listToMaybe . rights |
| 13:00:36 | <lambdabot> | [Either a1 a2] -> Maybe a2 |
| 13:00:50 | <merijn> | Ah, that might work |
| 13:01:18 | <xerox_> | \o/ |
| 13:01:41 | <scasc> | Re UTF-7: that has an absolute valid rationale: "It was originally intended to provide a means of encoding Unicode text for use in Internet E-mail messages that was more efficient than the combination of UTF-8 with quoted-printable." |
| 13:01:42 | × | da39a3ee5e6b4b0d quits (~da39a3ee5@171.5.29.209) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:01:45 | <scasc> | Nothing to hate here |
| 13:02:04 | → | drincruz_ joins (~adriancru@ool-44c748be.dyn.optonline.net) |
| 13:02:37 | <scasc> | Of course, it has no practical place in Unicode compliance ever since we have transgressed the range of the BMP. |
| 13:02:42 | <tomsmeding> | fair, though I imagine it could have been even more efficient |
| 13:03:12 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:deb:313c:b080:2641) (Ping timeout: 260 seconds) |
| 13:04:30 | → | st8less joins (~st8less@2603:a060:11fd:0:7c8c:847e:4223:c614) |
| 13:04:32 | × | st8less quits (~st8less@2603:a060:11fd:0:7c8c:847e:4223:c614) (Client Quit) |
| 13:04:45 | → | st8less joins (~st8less@2603:a060:11fd:0:7c8c:847e:4223:c614) |
| 13:05:12 | → | fendor_ joins (~fendor@91.141.3.143.wireless.dyn.drei.com) |
| 13:05:14 | <scasc> | However, UTF-7 was introduced 1997, and the BMP was first transgressed, I think, in 2003 with Unicode 4.0 |
| 13:05:20 | × | Martinso` quits (~user@cpe-188-129-36-113.dynamic.amis.hr) (Remote host closed the connection) |
| 13:06:05 | → | Martinsos joins (~user@cpe-188-129-36-113.dynamic.amis.hr) |
| 13:06:17 | <tom__> | Should you generally strive to avoid partial functions in Haskell? Does this apply to other languages too? |
| 13:06:40 | → | ubert joins (~Thunderbi@91.64.116.6) |
| 13:07:14 | <scasc> | (Ah, no, Old Italic was already added in Unicode 3.1, 2001). Still, I think Old Italic or Linear B had little practical relevance in 7-bit transported e-mail even in 2003 :-) |
| 13:07:36 | × | fendor quits (~fendor@77.119.128.243.wireless.dyn.drei.com) (Ping timeout: 240 seconds) |
| 13:09:09 | <merijn> | tom__: Yes and yes :p |
| 13:09:55 | <hpc> | such as it's even possible, in some languages |
| 13:10:13 | <tom__> | I was explaining this to someone and they said oh well the tests will fail and we will know if its a problem |
| 13:10:23 | <tom__> | So I second guessed myself |
| 13:10:23 | <wz1000> | how do I get a callstack for "No match in record selector" |
| 13:10:27 | × | zebrag quits (~inkbottle@aaubervilliers-654-1-115-108.w86-198.abo.wanadoo.fr) (Quit: Konversation terminated!) |
| 13:10:37 | <merijn> | wz1000: Profiling and +RTS -xc ? |
| 13:10:39 | <tom__> | Whats that quote testing shows the presence not absence of bugs |
| 13:10:40 | → | Peanut_ joins (~Peanut@2a02:8388:a101:2600:19de:2669:9d43:379d) |
| 13:10:46 | → | zebrag joins (~inkbottle@aaubervilliers-654-1-115-108.w86-198.abo.wanadoo.fr) |
| 13:11:04 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 13:11:26 | <hpc> | i prefer the one about obviously not wrong vs not obviously wrong |
| 13:11:41 | <tom__> | haha great |
| 13:11:55 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 13:13:24 | × | ubert quits (~Thunderbi@91.64.116.6) (Ping timeout: 256 seconds) |
| 13:15:11 | → | AlterEgo- joins (~ladew@124-198-158-163.dynamic.caiway.nl) |
| 13:15:11 | <scasc> | tomsmeding: but I will concede, that an encoding scheme which would have preserved (encoded directly) the range 32-126 (similarly how UTF-8 encodes 0-127 directly) and used only the byte values 0-31 and 127 for the encoding of higher code points would seem nicer. And they did have UTF-8 as prior art, which stems from 1992. So I'll give you that |
| 13:16:02 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 13:16:14 | × | drincruz_ quits (~adriancru@ool-44c748be.dyn.optonline.net) (Ping timeout: 256 seconds) |
| 13:16:43 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection) |
| 13:18:11 | <scasc> | I stand corrected, while it was around since 1992 in proprietary systems, UTF-8's RFC is from 1998, that's one year after UTF-7, so no prior art here. |
| 13:18:55 | → | geekosaur joins (82659a09@host154-009.vpn.uakron.edu) |
| 13:20:51 | → | Tario joins (~Tario@201.192.165.173) |
| 13:23:29 | × | u0_a298 quits (~user@65.35.205.131) (Read error: Connection reset by peer) |
| 13:24:04 | → | u0_a298 joins (~user@65.35.205.131) |
| 13:25:04 | <tomsmeding> | tom__: Dijkstra, supposedly https://www.goodreads.com/quotes/506689-program-testing-can-be-used-to-show-the-presence-of |
| 13:25:08 | → | whatisRT joins (~whatisRT@2002:5b41:6a33:0:6050:7054:4f28:3954) |
| 13:25:36 | <scasc> | {- ok, it's a mess, UTF-8 appeared already in 1996 in the appendix of Unicode 2.0 -} |
| 13:25:41 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 13:25:55 | <tomsmeding> | it's all a mess anyway |
| 13:26:03 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds) |
| 13:27:05 | → | _deepfire joins (~user@80.92.100.69) |
| 13:27:53 | → | perry joins (7aa1dcc3@122.161.220.195) |
| 13:28:23 | <tom__> | tommeding: Ah cheers |
| 13:28:48 | <tom__> | Formally verifying software shows an absence of bugs right provided the proof is correct. |
| 13:28:56 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 13:29:03 | <tomsmeding> | and provided you're proving what you think you're proving |
| 13:29:24 | <tomsmeding> | you might be proving correctness assuming the user doesn't pull the power cord |
| 13:29:32 | <tomsmeding> | ... until they actually do |
| 13:29:41 | <boxscape> | Or a cosmic ray hits your RAM cell |
| 13:29:42 | × | zgrep quits (~zgrep@ircpuzzles/2015/april-fools/sixth/zgrep) (Quit: It's a quitter's world.) |
| 13:29:45 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds) |
| 13:29:47 | × | whatisRT quits (~whatisRT@2002:5b41:6a33:0:6050:7054:4f28:3954) (Ping timeout: 260 seconds) |
| 13:30:49 | <tomsmeding> | also often people prove correctness of a _model_ of the program, not of the program itself; that introduces even more points where you're not proving what you're testing |
| 13:31:04 | <tom__> | Ah yes |
| 13:31:56 | → | zgrep joins (~zgrep@ircpuzzles/2015/april-fools/sixth/zgrep) |
| 13:33:45 | × | u0_a298 quits (~user@65.35.205.131) (Ping timeout: 240 seconds) |
| 13:34:14 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Ping timeout: 264 seconds) |
| 13:37:08 | → | chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
| 13:39:01 | → | hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net) |
| 13:39:56 | × | hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection) |
| 13:40:14 | → | neiluj joins (~jco@91-167-203-101.subs.proxad.net) |
| 13:40:23 | → | hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 13:41:03 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 13:41:20 | × | aqd quits (~aqd@84.20.147.33) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 13:42:18 | → | mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
| 13:47:01 | × | Yumasi quits (~guillaume@static-176-175-104-214.ftth.abo.bbox.fr) (Ping timeout: 264 seconds) |
| 13:48:02 | → | kritzefitz joins (~kritzefit@212.86.56.80) |
| 13:48:36 | → | Yumasi joins (~guillaume@40.72.95.92.rev.sfr.net) |
| 13:48:46 | × | neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Quit: leaving) |
| 13:50:17 | → | bitmagie joins (~Thunderbi@200116b806aa1d00e4084aa62cb9001a.dip.versatel-1u1.de) |
| 13:50:28 | → | drincruz_ joins (~adriancru@ool-44c748be.dyn.optonline.net) |
| 13:50:30 | × | bitmagie quits (~Thunderbi@200116b806aa1d00e4084aa62cb9001a.dip.versatel-1u1.de) (Client Quit) |
| 13:50:43 | → | urek joins (~urek@2804:7f1:e10a:4c43:1885:4e54:855e:4b11) |
| 13:51:38 | → | hidedagger joins (~nate@unaffiliated/hidedagger) |
| 13:52:20 | → | conal joins (~conal@64.71.133.70) |
| 13:54:48 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 13:55:14 | → | ubert joins (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) |
| 13:55:22 | × | toorevitimirp quits (~tooreviti@117.182.181.85) (Remote host closed the connection) |
| 13:55:53 | → | toorevitimirp joins (~tooreviti@117.182.181.85) |
| 13:55:54 | × | mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 13:56:17 | × | urek quits (~urek@2804:7f1:e10a:4c43:1885:4e54:855e:4b11) (Ping timeout: 260 seconds) |
| 13:57:02 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 13:57:14 | × | hidedagger quits (~nate@unaffiliated/hidedagger) (Ping timeout: 260 seconds) |
| 13:57:44 | → | urek joins (~urek@179.187.120.29.dynamic.adsl.gvt.net.br) |
| 13:58:20 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 13:58:28 | × | scasc quits (~szabi@213142096072.public.telering.at) (Quit: Leaving) |
| 13:59:43 | × | rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Ping timeout: 240 seconds) |
| 13:59:54 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:deb:313c:b080:2641) |
| 14:00:09 | → | acidjnk_new joins (~acidjnk@p200300d0c719ff6609235681fd8d59d5.dip0.t-ipconnect.de) |
| 14:01:31 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 14:01:57 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 14:02:10 | → | texasmynsted joins (~texasmyns@212.102.44.36) |
| 14:03:40 | → | urek__ joins (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) |
| 14:04:15 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection) |
| 14:04:28 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:deb:313c:b080:2641) (Ping timeout: 260 seconds) |
| 14:04:33 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 14:07:25 | × | urek quits (~urek@179.187.120.29.dynamic.adsl.gvt.net.br) (Ping timeout: 264 seconds) |
| 14:07:51 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection) |
| 14:07:55 | → | mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
| 14:10:28 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 14:13:46 | → | fuzzypixelz joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 14:16:03 | → | ClaudiusMaximus joins (~claude@223.153.198.146.dyn.plus.net) |
| 14:16:03 | × | ClaudiusMaximus quits (~claude@223.153.198.146.dyn.plus.net) (Changing host) |
| 14:16:03 | → | ClaudiusMaximus joins (~claude@unaffiliated/claudiusmaximus) |
| 14:16:39 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 14:17:35 | × | xff0x quits (~fox@2001:1a81:52d1:1000:e22b:1ad:d895:be4e) (Ping timeout: 258 seconds) |
| 14:21:17 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) |
| 14:23:52 | × | gedda quits (gedda@gateway/vpn/mullvad/gedda) (Ping timeout: 246 seconds) |
| 14:23:54 | → | xff0x joins (~fox@2a03:1b20:1:f410:40::1e) |
| 14:24:00 | × | janne quits (~janne@punainen.org) (Remote host closed the connection) |
| 14:24:51 | → | gedda joins (gedda@gateway/vpn/mullvad/gedda) |
| 14:25:11 | → | janne joins (~janne@punainen.org) |
| 14:27:45 | × | sQVe quits (~sQVe@unaffiliated/sqve) (Ping timeout: 240 seconds) |
| 14:27:50 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Read error: Connection reset by peer) |
| 14:28:07 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 14:28:21 | → | jyang joins (~jyang@70.35.214.234) |
| 14:28:45 | × | edwtjo quits (~edwtjo@fsf/member/edwtjo) (Ping timeout: 240 seconds) |
| 14:28:46 | → | sQVe joins (~sQVe@unaffiliated/sqve) |
| 14:29:08 | → | edwtjo joins (~edwtjo@fsf/member/edwtjo) |
| 14:29:41 | × | teardown quits (~user@gateway/tor-sasl/mrush) (Remote host closed the connection) |
| 14:29:41 | × | sQVe quits (~sQVe@unaffiliated/sqve) (Client Quit) |
| 14:29:43 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 14:30:04 | → | teardown joins (~user@gateway/tor-sasl/mrush) |
| 14:30:20 | × | chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 14:30:57 | <[exa]> | hm, what's the correct alternative for `cabal haddock --hyperlink-source` now? |
| 14:31:00 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 14:31:20 | <merijn> | [exa]: For Hackage? or? |
| 14:31:49 | × | Peanut_ quits (~Peanut@2a02:8388:a101:2600:19de:2669:9d43:379d) (Quit: Peanut_) |
| 14:32:09 | × | xff0x quits (~fox@2a03:1b20:1:f410:40::1e) (Ping timeout: 258 seconds) |
| 14:32:33 | → | notzmv` joins (~user@201-43-52-72.dsl.telesp.net.br) |
| 14:34:07 | → | xff0x joins (~fox@2001:1a81:52d1:1000:e22b:1ad:d895:be4e) |
| 14:34:10 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 14:34:51 | <AWizzArd> | Anyone here who tried the IHP web framework, editing code with support of HLS? |
| 14:34:56 | → | chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
| 14:35:23 | × | jyang quits (~jyang@70.35.214.234) (Quit: leaving) |
| 14:35:50 | <[exa]> | merijn: well for anything.. I'm getting errors unless I use `cabal v1-haddock --hyperlink-source`.. |
| 14:36:45 | → | Wuzzy joins (~Wuzzy@p549c9bc8.dip0.t-ipconnect.de) |
| 14:37:20 | <[exa]> | uh noes, it's --haddock-hyperlink-source |
| 14:37:37 | <[exa]> | apologies for rubberducking. :] |
| 14:37:51 | <merijn> | [exa]: I was about to say that it's a haddock option you're using, not cabal ;) And for Hackage you probably want --haddock-for-hackage |
| 14:37:55 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood) |
| 14:38:07 | <merijn> | You can also set "hyperlink: True" in the haddock section of ~/.cabal/config |
| 14:39:11 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 14:39:41 | → | jyang joins (~jyang@70.35.214.234) |
| 14:41:44 | × | geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection) |
| 14:42:01 | → | Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net) |
| 14:43:08 | × | amiri quits (~amiri@cpe-76-91-154-9.socal.res.rr.com) (Remote host closed the connection) |
| 14:45:15 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9) |
| 14:45:53 | → | amiri joins (~amiri@cpe-76-91-154-9.socal.res.rr.com) |
| 14:47:25 | × | yahb quits (xsbot@haskell/bot/yahb) (Ping timeout: 240 seconds) |
| 14:47:31 | → | yahb joins (xsbot@haskell/bot/yahb) |
| 14:49:44 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Remote host closed the connection) |
| 14:51:52 | <tomsmeding> | not hyperlink-source ? |
| 14:52:47 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) |
| 14:53:05 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection) |
| 14:53:27 | → | cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it) |
| 14:56:15 | × | pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!) |
| 14:56:39 | <merijn> | oh, yeah, maybe |
| 14:56:48 | <merijn> | Checking things is for losers :p |
| 14:57:39 | → | knupfer joins (~Thunderbi@mue-88-130-61-156.dsl.tropolys.de) |
| 14:58:13 | × | knupfer quits (~Thunderbi@mue-88-130-61-156.dsl.tropolys.de) (Client Quit) |
| 14:58:14 | → | knupfer1 joins (~Thunderbi@200116b824fa450045fef7c51b47d281.dip.versatel-1u1.de) |
| 14:58:50 | × | toorevitimirp quits (~tooreviti@117.182.181.85) (Remote host closed the connection) |
| 14:59:05 | → | berberman_ joins (~berberman@unaffiliated/berberman) |
| 14:59:12 | → | cfricke joins (~cfricke@unaffiliated/cfricke) |
| 14:59:18 | → | toorevitimirp joins (~tooreviti@117.182.181.85) |
| 14:59:46 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 256 seconds) |
| 14:59:49 | <tomsmeding> | (That's what my config file contains, commented-out, at least) |
| 15:00:05 | × | perry quits (7aa1dcc3@122.161.220.195) (Ping timeout: 245 seconds) |
| 15:00:07 | <aplainzetakind> | If I write something like `let f i = xs !! i; go k l = somethingInvolvingLookinUpInxsViaf in go 0 0`, the list lookups are memoized right? |
| 15:00:08 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 258 seconds) |
| 15:00:34 | × | berberman_ quits (~berberman@unaffiliated/berberman) (Max SendQ exceeded) |
| 15:00:36 | <tomsmeding> | no you have to explicitly make a shared Data.Map or array or something |
| 15:00:37 | knupfer1 | is now known as knupfer |
| 15:00:40 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:deb:313c:b080:2641) |
| 15:00:52 | <tomsmeding> | values are memoised, function invocations aren't |
| 15:01:02 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 15:02:31 | × | berberman quits (~berberman@unaffiliated/berberman) (Max SendQ exceeded) |
| 15:02:59 | <aplainzetakind> | How about functions-as-values? i.e., let f = (xs !!) in ... |
| 15:03:06 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 15:03:44 | × | hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection) |
| 15:04:23 | → | hekkaidekapus_ joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 15:05:26 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:deb:313c:b080:2641) (Ping timeout: 264 seconds) |
| 15:05:39 | <aplainzetakind> | OK, I'm reading the answer here (unless it's obsolete somehow) https://stackoverflow.com/questions/11466284/how-is-this-fibonacci-function-memoized |
| 15:05:39 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 15:08:08 | → | nickr joins (~nickr@185.204.1.185) |
| 15:11:06 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 15:13:15 | → | jchia__ joins (~jchia@58.32.37.146) |
| 15:14:11 | → | Tario joins (~Tario@201.192.165.173) |
| 15:16:06 | × | cfricke quits (~cfricke@unaffiliated/cfricke) (Quit: WeeChat 2.9) |
| 15:20:34 | → | conal_ joins (~conal@66.115.157.103) |
| 15:20:45 | × | ent quits (entgod@kapsi.fi) (Ping timeout: 240 seconds) |
| 15:20:52 | → | ent joins (entgod@kapsi.fi) |
| 15:21:30 | → | mrchampion joins (~mrchampio@38.18.109.23) |
| 15:24:17 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection) |
| 15:24:35 | → | shekhar joins (2a6f0317@42.111.3.23) |
| 15:25:35 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 15:26:41 | × | liszt_ quits (sid336875@gateway/web/irccloud.com/x-porgwtafmjhpigsw) () |
| 15:27:16 | → | liszt joins (sid336875@gateway/web/irccloud.com/x-iluopyocuesnknfn) |
| 15:28:19 | × | gxt__ quits (~gxt@gateway/tor-sasl/gxt) (Remote host closed the connection) |
| 15:29:05 | → | gxt__ joins (~gxt@gateway/tor-sasl/gxt) |
| 15:29:58 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 256 seconds) |
| 15:33:08 | × | phasespace quits (~sar@80-89-47-117.inet.signal.no) (Ping timeout: 272 seconds) |
| 15:40:44 | × | darjeeling_ quits (~darjeelin@122.245.123.202) (Ping timeout: 272 seconds) |
| 15:41:01 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds) |
| 15:43:04 | × | dnlkrgr quits (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 260 seconds) |
| 15:43:07 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
| 15:43:23 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 15:44:04 | <AWizzArd> | I am looking at a code example from the IHP web framework: buildPost post = post |> fill @["title","body"] |
| 15:44:17 | <AWizzArd> | What is that @ doing there? |
| 15:44:33 | → | xsperry joins (~as@unaffiliated/xsperry) |
| 15:44:44 | <AWizzArd> | On the left-hand side it can be used for pattern matching. But in front of a list? |
| 15:44:58 | → | johnw joins (~johnw@haskell/developer/johnw) |
| 15:46:18 | × | SanchayanMaity quits (~Sanchayan@106.200.195.64) (Quit: SanchayanMaity) |
| 15:47:55 | <merijn> | > let x @ y = x + y in 2 @ 3 -- ? |
| 15:47:58 | <lambdabot> | <hint>:1:24: error: <hint>:1:24: error: parse error on input ‘@’ |
| 15:48:06 | <merijn> | hmm, that's not allowed? |
| 15:48:13 | <merijn> | No clue, then :p |
| 15:50:05 | × | ransom quits (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 15:50:32 | <lortabac> | TypeApplications? |
| 15:50:48 | <merijn> | oh, maybe |
| 15:50:58 | <lortabac> | I have no idea, I'm just guessing |
| 15:51:48 | → | ransom joins (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) |
| 15:53:10 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood) |
| 15:53:28 | <AWizzArd> | The extensions that are activated by default are: OverloadedStrings, NoImplicitPrelude, ImplicitParams, Rank2Types, NamedFieldPuns, TypeSynonymInstances, FlexibleInstances, DisambiguateRecordFields, DuplicateRecordFields, OverloadedLabels, FlexibleContexts, DataKinds |
| 15:53:40 | <AWizzArd> | Could one of those have introduced the @ syntax? |
| 15:53:59 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 15:54:27 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 15:55:20 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 15:55:32 | → | dnlkrgr joins (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) |
| 15:56:36 | <tomsmeding> | aplainzetakind: that answer seems to be a nice explanation |
| 15:56:53 | <tomsmeding> | the compiler doesn't memoise, it lazily evaluates global constants |
| 15:57:08 | <solonarv> | AWizzArd: this is a type application |
| 15:57:18 | <tomsmeding> | and local constants that don't depend on anything local can get lifted to global constants, which results in something that looks like memoisation |
| 15:58:29 | → | darjeeling_ joins (~darjeelin@122.245.123.202) |
| 15:58:30 | <tomsmeding> | AWizzArd: TypeApplications is not in there, but the thing you posted looks very much like type applications |
| 15:58:41 | <tomsmeding> | where the type in this case is a DataKinds lifted type ["title","body"] |
| 15:59:39 | <tomsmeding> | (well, "lifted type" is inaccurate terminology; it's a value lifted _to_ a type) |
| 16:00:27 | → | Rudd0 joins (~Rudd0@185.189.115.108) |
| 16:01:29 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:deb:313c:b080:2641) |
| 16:02:01 | <AWizzArd> | Okay, so that `fill` is a method and via @ we can tell GHC which instance we want to call here. |
| 16:03:17 | × | jonathanx quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Remote host closed the connection) |
| 16:05:28 | <tomsmeding> | well, it's a value, not necessarily a method |
| 16:05:40 | <dminuoso> | AWizzArd: Without seing the code, Im guessing you're supplying a type level list with type level symbols |
| 16:05:46 | <dminuoso> | So I suspect this means |
| 16:05:53 | <tomsmeding> | % mempty @String |
| 16:05:54 | <yahb> | tomsmeding: "" |
| 16:06:04 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:deb:313c:b080:2641) (Ping timeout: 258 seconds) |
| 16:06:56 | <dminuoso> | % fill :: forall (s :: [Symbol]). Int; fill = undefined |
| 16:06:56 | <yahb> | dminuoso: |
| 16:07:10 | <dminuoso> | % fill @["foo", "bar"] |
| 16:07:10 | <yahb> | dminuoso: *** Exception: Prelude.undefined; CallStack (from HasCallStack):; error, called at libraries/base/GHC/Err.hs:79:14 in base:GHC.Err; undefined, called at <interactive>:145:45 in interactive:Ghci76 |
| 16:07:15 | <dminuoso> | So we could do something like |
| 16:07:46 | <dminuoso> | oh well, you get the idea. You can use GHC.TypeLits and type families to work on the list, and eventually pull the symbols back into value world |
| 16:07:57 | <dminuoso> | (or alternatively MPTC+fundeps instead of tyfams) |
| 16:08:01 | → | philopsos joins (~caecilius@gateway/tor-sasl/caecilius) |
| 16:09:25 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds) |
| 16:09:47 | <dminuoso> | % type family TyLen (s :: [a]) where TyLen (x ': xs) = 1 + TyLen xs; TyLen '[] = 0 |
| 16:09:47 | <yahb> | dminuoso: |
| 16:10:28 | <dminuoso> | % :set -XScopedTypeVariables |
| 16:10:29 | <yahb> | dminuoso: |
| 16:10:44 | <srk> | > (pure Nothing) <|> (pure $ Just "fine") |
| 16:10:47 | → | bitmapper joins (uid464869@gateway/web/irccloud.com/x-vhcgctdtktfskqbh) |
| 16:10:47 | <lambdabot> | error: |
| 16:10:47 | <lambdabot> | • Ambiguous type variable ‘f0’ arising from a use of ‘show_M201537395400... |
| 16:10:47 | <lambdabot> | prevents the constraint ‘(Show |
| 16:11:09 | <srk> | /o\ is there something like asum for [IO (Maybe a)]? |
| 16:11:25 | <dminuoso> | srk: asum with MaybeT? |
| 16:11:36 | <merijn> | srk: "asum . map MaybeT"? :p |
| 16:11:51 | <srk> | thanks :) |
| 16:15:46 | → | lyxia joins (~lyxia@poisson.chat) |
| 16:16:44 | <dminuoso> | % fill :: Proxy '[Symbol] -> Integer; fill (Proxy :: Proxy l) = natVal (Proxy @(TyLen l)) |
| 16:16:44 | <yahb> | dminuoso: |
| 16:16:59 | <dminuoso> | % fill (Proxy @["foo", "bar"]) -- AWizzArd |
| 16:16:59 | <yahb> | dminuoso: ; <interactive>:170:7: error:; * Couldn't match type '["bar"] with '[]; Expected type: Proxy '[Symbol]; Actual type: Proxy '["foo", "bar"]; * In the first argument of `fill', namely `(Proxy @["foo", "bar"])'; In the expression: fill (Proxy @["foo", "bar"]); In an equation for `it': it = fill (Proxy @["foo", "bar"]) |
| 16:17:07 | <dminuoso> | Uhh |
| 16:17:08 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 16:20:05 | → | cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net) |
| 16:20:31 | <dminuoso> | Ah here we go |
| 16:20:33 | <dminuoso> | % fill :: forall (s :: [Symbol]) (n :: Nat). (KnownNat n, n ~ TyLen s) => Integer; fill = natVal (Proxy @n) |
| 16:20:33 | <yahb> | dminuoso: |
| 16:20:35 | → | hekkaidekapus{ joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 16:20:42 | <dminuoso> | % fill @["foo", "bar"] -- AWizzArd |
| 16:20:42 | <yahb> | dminuoso: 2 |
| 16:21:01 | × | acidjnk_new quits (~acidjnk@p200300d0c719ff6609235681fd8d59d5.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 16:21:25 | <dminuoso> | So this is a type leve list, with type level strings, and it's very likely consumed with type families (or fundeps) like in my examples. |
| 16:21:47 | <dminuoso> | This is how much of servant works for example |
| 16:22:03 | <dminuoso> | (They dont use type applications but a Proxy instead, but that's just different ergonomics) |
| 16:23:03 | × | hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Ping timeout: 240 seconds) |
| 16:23:58 | × | caubert quits (~mrbentari@207.246.80.112) (Quit: WeeChat 2.9) |
| 16:24:20 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:deb:313c:b080:2641) |
| 16:24:34 | → | abhixec joins (~abhixec@c-67-169-141-95.hsd1.ca.comcast.net) |
| 16:24:43 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Remote host closed the connection) |
| 16:26:36 | × | Kaivo quits (~Kaivo@104-200-86-99.mc.derytele.com) (Ping timeout: 240 seconds) |
| 16:29:16 | → | Kaivo joins (~Kaivo@ec2-15-222-231-32.ca-central-1.compute.amazonaws.com) |
| 16:29:25 | → | mrbentarikau joins (~mrbentari@207.246.80.112) |
| 16:29:41 | mrbentarikau | is now known as caubert |
| 16:30:24 | → | ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta) |
| 16:31:04 | → | plutoniix joins (~q@ppp-27-55-74-157.revip3.asianet.co.th) |
| 16:35:50 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 16:36:23 | → | cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) |
| 16:36:34 | → | Ariakenom joins (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se) |
| 16:36:42 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 16:40:39 | × | Codaraxis__ quits (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) (Remote host closed the connection) |
| 16:41:32 | → | Codaraxis__ joins (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) |
| 16:41:35 | → | Feuermagier joins (~Feuermagi@213.178.26.41) |
| 16:44:34 | × | matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Quit: ZNC 1.8.2 - https://znc.in) |
| 16:44:57 | × | Codaraxis__ quits (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) (Remote host closed the connection) |
| 16:44:57 | → | matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) |
| 16:46:19 | → | Codaraxis__ joins (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) |
| 16:46:42 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Ping timeout: 258 seconds) |
| 16:51:35 | × | shekhar quits (2a6f0317@42.111.3.23) (Remote host closed the connection) |
| 16:52:30 | × | fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Remote host closed the connection) |
| 16:52:39 | × | Boomerang quits (~Boomerang@xd520f68c.cust.hiper.dk) (Quit: Leaving) |
| 16:52:54 | → | fuzzypixelz joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 16:53:48 | × | fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Client Quit) |
| 16:54:13 | → | fuzzypixelz joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) |
| 16:55:54 | <dmj`> | hot take, GHC’s RTS settings are optimized for a compiler, not a long-running networked service |
| 16:56:45 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds) |
| 16:56:54 | <merijn> | How so? |
| 16:56:54 | × | chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
| 16:57:13 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 16:57:21 | → | chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) |
| 16:57:34 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 16:58:48 | × | Codaraxis__ quits (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) (Remote host closed the connection) |
| 16:58:49 | × | chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
| 16:59:08 | <dmj`> | merijn: the idle time GC runs every 0.3s, the assumption is that productive work is constantly happening |
| 16:59:10 | × | divVerent quits (~divVerent@xonotic/core-team/divVerent) (Quit: WeeChat 1.6) |
| 16:59:19 | → | Codaraxis__ joins (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) |
| 16:59:25 | <dmj`> | merijn: which would be true in a compiler |
| 16:59:27 | × | xff0x quits (~fox@2001:1a81:52d1:1000:e22b:1ad:d895:be4e) (Ping timeout: 260 seconds) |
| 16:59:39 | <dmj`> | merijn: but not necessarily true in a no traffic web server |
| 16:59:49 | <merijn> | dmj`: Well, is that actually negatively impacting the performance, though? |
| 16:59:55 | × | notzmv` quits (~user@201-43-52-72.dsl.telesp.net.br) (Read error: No route to host) |
| 16:59:57 | <merijn> | I'm not sure how it would |
| 16:59:59 | × | fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: fuzzypixelz) |
| 17:00:06 | <dmj`> | merijn: major GCs pause program execution |
| 17:00:08 | × | knupfer quits (~Thunderbi@200116b824fa450045fef7c51b47d281.dip.versatel-1u1.de) (Remote host closed the connection) |
| 17:00:16 | <dolio> | But your premise is that no work is happening. |
| 17:00:16 | → | knupfer joins (~Thunderbi@200116b824fa45007cc3c4f6f6cecd9b.dip.versatel-1u1.de) |
| 17:00:19 | → | xff0x joins (~fox@2001:1a81:52d1:1000:31d2:4099:6990:f516) |
| 17:00:20 | <dmj`> | it's just it could be every 10s, why busy wait |
| 17:00:29 | <dolio> | So it's pausing something that isn't doing anything. |
| 17:00:39 | <merijn> | ^^^ that |
| 17:00:49 | → | divVerent joins (~divVerent@xonotic/core-team/divVerent) |
| 17:00:58 | <dmj`> | dolio: true, but why keep checking every 0.3s if you're doing nothing for hours potentially |
| 17:01:16 | <c_wraith> | my experience is that 0.3s is pretty good for an http server |
| 17:01:26 | <merijn> | dmj`: Because engineering not too is 1) extra work and 2) negatively impacts all other code |
| 17:01:31 | <dmj`> | It's important to run the GC to so finalizers get called, so I think -I0 could be be bad actually |
| 17:01:36 | <dmj`> | so* |
| 17:01:38 | → | son0p joins (~son0p@181.136.122.143) |
| 17:01:45 | <merijn> | dmj`: Why invest work in doing something with no actual benefit? |
| 17:02:12 | → | hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-xgwlefwsyyfjewad) |
| 17:02:15 | × | Codaraxis__ quits (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) (Remote host closed the connection) |
| 17:02:18 | <merijn> | Like, concretely, what is improved by not running it every 0.3s? |
| 17:02:19 | <c_wraith> | It's long enough that it's unlikely to be idle for a whole 0.3s when it's getting traffic, but short enough that it doesn't need a long break to trigger |
| 17:02:21 | → | chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) |
| 17:02:40 | → | bitmagie joins (~Thunderbi@200116b806aa1d00e4084aa62cb9001a.dip.versatel-1u1.de) |
| 17:02:42 | → | Codaraxis__ joins (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) |
| 17:03:07 | <c_wraith> | The settings that really make a difference for web servers are the various generation sizes - especially the nursery size |
| 17:03:26 | <dmj`> | merijn: why run anything every 0.3s if you don't have to, 0.3s is an implicit assumption |
| 17:03:43 | × | Codaraxis__ quits (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) (Remote host closed the connection) |
| 17:04:12 | → | Codaraxis__ joins (~Codaraxis@ip68-5-90-227.oc.oc.cox.net) |
| 17:04:47 | → | justanotheruser joins (~justanoth@unaffiliated/justanotheruser) |
| 17:04:49 | <merijn> | dmj`: Why? "because not having complex heuristics simplifies engineering" |
| 17:05:06 | → | tlaxkit joins (~kvirc@89.35.63.181) |
| 17:05:08 | <c_wraith> | the dream is that you get your nursery size up to a point where most requests/responses fit entirely inside the nursery. |
| 17:05:36 | <merijn> | You can justify investing effort and/or having a more complex solution IF there is a benefit |
| 17:05:59 | <merijn> | If there is no benefit, then why bother investing either time or complexity budget into changing the status quo |
| 17:07:06 | → | notzmv joins (~user@unaffiliated/zmv) |
| 17:07:15 | × | son0p quits (~son0p@181.136.122.143) (Ping timeout: 265 seconds) |
| 17:07:26 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:ac90:c0e:32f4:a9c4) (Remote host closed the connection) |
| 17:07:59 | → | son0p joins (~son0p@181.136.122.143) |
| 17:08:47 | → | loller_ joins (uid358106@gateway/web/irccloud.com/x-rqmoabancwauhdqz) |
| 17:08:52 | → | cnmne[m] joins (cnmnematri@gateway/shell/matrix.org/x-hcmqjrvmyelkqweq) |
| 17:08:55 | → | Vulfe joins (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) |
| 17:09:13 | × | dnlkrgr quits (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 264 seconds) |
| 17:09:13 | × | mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 264 seconds) |
| 17:09:21 | × | DirefulSalt quits (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) (Remote host closed the connection) |
| 17:09:44 | → | DirefulSalt joins (DirefulSal@gateway/vpn/privateinternetaccess/direfulsalt) |
| 17:09:57 | × | thunderrd quits (~thunderrd@183.182.110.8) (Ping timeout: 246 seconds) |
| 17:10:34 | <merijn> | It's good to have a quantifiable reason for spending time/effort besides "it offends my sensibilities" |
| 17:11:01 | <dolio> | Yeah, the argument seems entirely aesthetic so far. |
| 17:11:36 | × | darjeeling_ quits (~darjeelin@122.245.123.202) (Ping timeout: 265 seconds) |
| 17:12:07 | <dolio> | Also, what about the situations where the web server actually is doing something? Is 10s going to be good enough during those periods? |
| 17:12:22 | <merijn> | Like, I doubt the actual GC on an idle server (especially if it's apparently idle for hours at a time) is going to have a significant cost in CPU time |
| 17:12:33 | <dolio> | Also, why optimize for this hypothetical web server instead of all the things that 0.3s is good for? |
| 17:13:30 | × | Vulfe quits (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Ping timeout: 256 seconds) |
| 17:13:55 | × | knupfer quits (~Thunderbi@200116b824fa45007cc3c4f6f6cecd9b.dip.versatel-1u1.de) (Ping timeout: 258 seconds) |
| 17:16:17 | → | geekosaur joins (82659a09@host154-009.vpn.uakron.edu) |
| 17:19:39 | × | skiold_ quits (~skiold@gateway/tor-sasl/skiold) (Remote host closed the connection) |
| 17:20:04 | → | skiold_ joins (~skiold@gateway/tor-sasl/skiold) |
| 17:21:14 | → | dnlkrgr joins (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) |
| 17:22:40 | → | thunderrd joins (~thunderrd@183.182.113.8) |
| 17:23:57 | × | robotmay quits (~beepboop@2001:8b0:7af0:2580:9de5:991:bf07:8253) (Remote host closed the connection) |
| 17:24:14 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 17:25:13 | → | robotmay joins (~beepboop@2001:8b0:7af0:2580:806d:1b3a:2bd5:8efb) |
| 17:26:06 | × | ubert quits (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Remote host closed the connection) |
| 17:26:42 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) |
| 17:26:51 | <dmj`> | I'm not advocating for optimizing for a networked service, but I'm making a point that not all workloads are created equal and 0.3s has an implicit assumption about a particular workload |
| 17:28:07 | → | darjeeling_ joins (~darjeelin@122.245.123.202) |
| 17:28:25 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds) |
| 17:29:47 | × | boxscape quits (54a35b08@gateway/web/cgi-irc/kiwiirc.com/ip.84.163.91.8) (Quit: Connection closed) |
| 17:30:08 | × | fresheyeball quits (~isaac@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.7.1) |
| 17:30:21 | × | jrm quits (~jrm@freebsd/developer/jrm) (Quit: ciao) |
| 17:30:24 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 17:31:20 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov) |
| 17:31:34 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 17:33:37 | × | son0p quits (~son0p@181.136.122.143) (Remote host closed the connection) |
| 17:34:47 | <merijn> | dmj`: Does it though? Because it sounds like it works fine for your workload |
| 17:35:24 | <dmj`> | merijn: If every workload was the same why allow any customization of GC settings? |
| 17:35:52 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit) |
| 17:35:54 | <merijn> | dmj`: I'm not saying everything's the same. I'm just not seeing how this setting isn't working for your workload? |
| 17:36:08 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 17:36:15 | → | fresheyeball joins (~isaac@c-71-237-105-37.hsd1.co.comcast.net) |
| 17:36:20 | <dmj`> | merijn: it's too frequent |
| 17:36:36 | <merijn> | Why? |
| 17:36:45 | <merijn> | What negative impact does frequency have? |
| 17:36:54 | <dmj`> | It's not negative, its just not necessary |
| 17:37:02 | <dmj`> | why busy wait? |
| 17:37:03 | <merijn> | Beyond offending your aesthetic |
| 17:37:12 | <dmj`> | this isn't an aesthetic issue |
| 17:37:13 | <merijn> | dmj`: I already gave arguments for that |
| 17:37:17 | <dmj`> | as did I |
| 17:37:25 | <merijn> | Anyway, dinner |
| 17:37:29 | <dmj`> | ciao |
| 17:38:39 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) (Remote host closed the connection) |
| 17:39:49 | <Uniaika> | 9 |
| 17:39:52 | <Uniaika> | eh |
| 17:41:16 | × | dnlkrgr quits (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 240 seconds) |
| 17:42:11 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) |
| 17:44:12 | → | jrm joins (~jrm@freebsd/developer/jrm) |
| 17:44:18 | → | dnlkrgr joins (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) |
| 17:44:56 | <koz_> | Uniaika: 9? |
| 17:45:15 | <Uniaika> | irssi fail, koz_ |
| 17:45:23 | → | phasespace joins (~sar@89-162-33-21.fiber.signal.no) |
| 17:45:26 | <koz_> | Ah. |
| 17:46:50 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) (Ping timeout: 264 seconds) |
| 17:56:31 | → | scasc joins (~szabi@213142096072.public.telering.at) |
| 17:57:27 | × | divVerent quits (~divVerent@xonotic/core-team/divVerent) (Quit: WeeChat 1.6) |
| 17:57:51 | → | Sheilong joins (uid293653@gateway/web/irccloud.com/x-pjysrbvdonubrfni) |
| 17:58:05 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) |
| 17:58:25 | <scasc> | Is there a function in some standard (or widespread) library which is essentially a more efficient version of \c x -> (takeWhile c x, dropWhile c x), not traversing the list twice? |
| 17:58:45 | <dolio> | span |
| 17:59:17 | × | shf quits (~sheaf@2a01:cb19:80cc:7e00:4499:9502:e93c:8bfb) (Read error: Connection reset by peer) |
| 17:59:52 | → | shf joins (~sheaf@2a01:cb19:80cc:7e00:8914:36aa:fb38:e6af) |
| 18:01:03 | → | urek joins (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) |
| 18:01:03 | × | chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
| 18:01:27 | → | chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) |
| 18:03:49 | × | dnlkrgr quits (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) (Ping timeout: 264 seconds) |
| 18:04:07 | <scasc> | Thanks! And I don't know why I put "[a] -> ([a],[a])" into Hoogle, rather than "(a -> Bool) -> [a] -> ([a],[a])" |
| 18:04:15 | → | dnlkrgr joins (~dnlkrgr@2a02:8070:a193:c900:f9d7:51d:a0ec:3ac2) |
| 18:04:23 | × | urek__ quits (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) (Ping timeout: 272 seconds) |
| 18:06:11 | <fresheyeball> | So I have some code using GHCJS.DOM |
| 18:06:17 | <fresheyeball> | and it compiles with GHC |
| 18:06:21 | <fresheyeball> | but in GHCJS it does not |
| 18:06:48 | <fresheyeball> | the culprit is `addListener` which takes a "SaferEventListener" on the GHC side, and an "EventListener" on the GHCJS side |
| 18:06:54 | × | Yumasi quits (~guillaume@40.72.95.92.rev.sfr.net) (Ping timeout: 260 seconds) |
| 18:08:56 | × | scasc quits (~szabi@213142096072.public.telering.at) (Ping timeout: 272 seconds) |
| 18:10:50 | × | dnlkrgr quits (~dnlkrgr@2a02:8070:a193:c900:f9d7:51d:a0ec:3ac2) (Ping timeout: 264 seconds) |
| 18:11:20 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov) |
| 18:11:36 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 18:12:04 | → | danso joins (~dan@69-165-210-185.cable.teksavvy.com) |
| 18:13:51 | → | dnlkrgr joins (~dnlkrgr@HSI-KBW-046-005-005-080.hsi8.kabel-badenwuerttemberg.de) |
| 18:14:37 | × | philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Remote host closed the connection) |
| 18:14:41 | → | texasmyn_ joins (~texasmyns@097-085-244-180.biz.spectrum.com) |
| 18:14:50 | → | philopsos joins (~caecilius@gateway/tor-sasl/caecilius) |
| 18:15:53 | × | ericsagn1 quits (~ericsagne@2405:6580:0:5100:5240:599:f44f:5dee) (Ping timeout: 260 seconds) |
| 18:15:59 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit) |
| 18:16:12 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 18:17:16 | × | texasmynsted quits (~texasmyns@212.102.44.36) (Ping timeout: 240 seconds) |
| 18:17:33 | → | divVerent joins (~divVerent@xonotic/core-team/divVerent) |
| 18:17:33 | × | chele quits (~chele@ip5b416ea2.dynamic.kabel-deutschland.de) (Remote host closed the connection) |
| 18:17:50 | → | sgibber2018 joins (~arch-gibb@208.85.237.137) |
| 18:22:03 | × | thunderrd quits (~thunderrd@183.182.113.8) (Ping timeout: 246 seconds) |
| 18:22:39 | × | conal_ quits (~conal@66.115.157.103) (Quit: Computer has gone to sleep.) |
| 18:22:45 | × | texasmyn_ quits (~texasmyns@097-085-244-180.biz.spectrum.com) (Ping timeout: 240 seconds) |
| 18:23:02 | × | MOSCOS quits (~MOSCOS@122.54.107.175) (Remote host closed the connection) |
| 18:23:03 | × | chrpape quits (~user@2a01:4f9:c010:632d::1) (Remote host closed the connection) |
| 18:23:03 | → | chrpape joins (~user@2a01:4f9:c010:632d::1) |
| 18:23:30 | → | MOSCOS joins (~MOSCOS@122.54.107.175) |
| 18:23:51 | → | howdoi joins (uid224@gateway/web/irccloud.com/x-cazclqzweogdjlbq) |
| 18:25:21 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) (Remote host closed the connection) |
| 18:26:23 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) |
| 18:26:52 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) (Remote host closed the connection) |
| 18:28:00 | → | ericsagn1 joins (~ericsagne@2405:6580:0:5100:e26e:cf9:1dd6:9615) |
| 18:28:21 | → | Vulfe_ joins (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) |
| 18:28:27 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 18:28:47 | → | invaser joins (~Thunderbi@31.148.23.125) |
| 18:30:01 | <fresheyeball> | I resorted to CPP |
| 18:30:03 | <fresheyeball> | Grrrr |
| 18:30:17 | Uniaika | offers fresheyeball a mug of hot chocolate and a blanket |
| 18:30:25 | × | dhouthoo quits (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9) |
| 18:30:58 | → | conal joins (~conal@64.71.133.70) |
| 18:31:25 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 18:32:56 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 18:34:03 | × | abhixec quits (~abhixec@c-67-169-141-95.hsd1.ca.comcast.net) (Quit: Lost terminal) |
| 18:34:44 | → | thunderrd joins (~thunderrd@183.182.110.8) |
| 18:36:44 | × | darjeeling_ quits (~darjeelin@122.245.123.202) (Ping timeout: 256 seconds) |
| 18:38:30 | × | DavidEichmann quits (~david@62.110.198.146.dyn.plus.net) (Remote host closed the connection) |
| 18:38:56 | × | Jesin quits (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving) |
| 18:40:13 | → | urek__ joins (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) |
| 18:40:22 | fendor_ | is now known as fendor |
| 18:40:32 | × | Vulfe_ quits (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) (Remote host closed the connection) |
| 18:40:34 | → | Jesin joins (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) |
| 18:41:10 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection) |
| 18:42:16 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) |
| 18:43:08 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 18:43:19 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) (Remote host closed the connection) |
| 18:43:39 | × | urek quits (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) (Ping timeout: 272 seconds) |
| 18:44:32 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) |
| 18:46:09 | × | hekkaidekapus{ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection) |
| 18:46:30 | → | hekkaidekapus{ joins (~tchouri@gateway/tor-sasl/hekkaidekapus) |
| 18:48:53 | → | scasc joins (~szabi@213142096072.public.telering.at) |
| 18:49:07 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) (Ping timeout: 260 seconds) |
| 18:50:06 | → | darjeeling_ joins (~darjeelin@122.245.123.202) |
| 18:50:25 | × | Cthalupa quits (~cthulhu@47.186.47.75) (Ping timeout: 240 seconds) |
| 18:51:20 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov) |
| 18:51:22 | → | Cthalupa joins (~cthulhu@47.186.47.75) |
| 18:51:36 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 18:52:03 | → | benjamingr__ joins (uid23465@gateway/web/irccloud.com/x-klvbiusyrufiamvx) |
| 18:53:30 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 18:55:10 | <justsomeguy> | I want to write a test that checks if something is a type constructor or data constructor. Is there any way to do that without using GHCi? |
| 18:55:37 | <Uniaika> | hmm, probably with multiline mode? :set +m ? |
| 18:55:52 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit) |
| 18:56:05 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 18:57:22 | <justsomeguy> | The thing is that I want to automate the test, so I'd like to avoid ghci, or possibly script the ghci session. |
| 18:57:52 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds) |
| 18:58:13 | × | shutdown_-h_now quits (~arjan@2001:1c06:2d0b:2312:d8c3:612c:6813:238e) (Ping timeout: 272 seconds) |
| 18:58:38 | × | toorevitimirp quits (~tooreviti@117.182.181.85) (Remote host closed the connection) |
| 18:58:59 | → | lofo899 joins (~florian@84-115-12-249.cable.dynamic.surfer.at) |
| 18:59:45 | <tomsmeding> | justsomeguy: https://hackage.haskell.org/package/hint exists, but also, why exactly do you want to test that? Is it generated code? |
| 19:01:49 | <Uniaika> | yes, could you please tell us a bit more about your usecase? |
| 19:01:49 | → | urek joins (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) |
| 19:02:19 | <justsomeguy> | tomsmeding: I'm trying to write test cases for the homework I'm doing in Haskell Programming from First Principles. It has a lot of exercises that require querying things in GHCi. |
| 19:02:43 | <justsomeguy> | I just found this SO post about using expect to automate ghci, so I think I'm going to give that a shot. https://stackoverflow.com/questions/47735327/is-there-a-way-to-script-a-ghci-session |
| 19:03:05 | × | berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 264 seconds) |
| 19:03:24 | <tomsmeding> | If you want a low-tech solution, then yes that's probably a fine option |
| 19:03:32 | → | berberman joins (~berberman@unaffiliated/berberman) |
| 19:03:46 | → | shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:f4bb:54f5:d69c:a304) |
| 19:04:07 | <tomsmeding> | especially if it's just for yourself |
| 19:04:18 | <tomsmeding> | using something like the 'hint' library I linked would be for a more production-like setting |
| 19:04:33 | × | urek__ quits (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) (Ping timeout: 272 seconds) |
| 19:04:52 | <justsomeguy> | Is there also a way to run a .hs file as if it were a script? ... Using hlint is an interesting idea. |
| 19:05:25 | <tomsmeding> | not hlint, hint ;) |
| 19:05:36 | <Rembane> | justsomeguy: ghci < Bla.hs |
| 19:05:40 | <Rembane> | ...I think. :D |
| 19:06:03 | <geekosaur> | runghc |
| 19:06:30 | <geekosaur> | although that's not so much "script" |
| 19:06:41 | <scasc> | Now this: I use the hexadecimal literal in ghci all right: |
| 19:06:46 | <scasc> | > 0xFFFF |
| 19:06:49 | <lambdabot> | 65535 |
| 19:06:58 | <scasc> | why doesn't |
| 19:07:02 | → | urek__ joins (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) |
| 19:07:02 | <scasc> | > read "0xFFFF" |
| 19:07:04 | <scasc> | work? |
| 19:07:05 | <lambdabot> | *Exception: Prelude.read: no parse |
| 19:07:30 | <xerox_> | > read "0xFFFF" :: Int |
| 19:07:33 | <lambdabot> | 65535 |
| 19:07:34 | → | delYsid joins (~user@unaffiliated/delysid) |
| 19:08:31 | <tomsmeding> | related to the scripting question from just now, cabal apparently has shebang support: https://github.com/haskell/cabal/pull/5483 |
| 19:08:34 | <tomsmeding> | but where are the docs? :p |
| 19:08:54 | <justsomeguy> | Can I insert ghci commands like :type <expression> or get exceptions like "error: Data constructor not in scope:" if I use runghc? |
| 19:09:02 | <justsomeguy> | (I'm guessing not..) |
| 19:09:15 | <tomsmeding> | no, runghc just transparently compiles and runs your file |
| 19:09:33 | <justsomeguy> | Ok. Still good to know. |
| 19:09:37 | × | urek quits (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) (Ping timeout: 272 seconds) |
| 19:09:55 | <scasc> | xerox: thanks. At the same time, in the actual code I did have the annotation, still returning with "no parse" -- but that will be something else, writing a compliant readsPrec seems hard :-) |
| 19:10:31 | <xerox_> | scasc: I'm guessing it wasn't exactly that then if it couldn't parse it |
| 19:11:47 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection) |
| 19:12:06 | <scasc> | Yeah, I'm pretty sure I messed up something in my readsPrec definition: it reads a simple value no problems `read "myrepr" :: MyType`, but I get 'no parse' with `read "[myrep1, myrep2]" :: [MyType]`. |
| 19:12:24 | <scasc> | I think I messed up the readsPrec somehow. |
| 19:12:27 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 19:13:16 | → | abhixec joins (~abhixec@c-67-169-141-95.hsd1.ca.comcast.net) |
| 19:13:24 | × | lofo899 quits (~florian@84-115-12-249.cable.dynamic.surfer.at) (Quit: leaving) |
| 19:14:10 | × | crblmr quits (~carbolyme@matrix.dropacid.net) (Remote host closed the connection) |
| 19:15:28 | × | lxsameer quits (lxsameer@gateway/vpn/protonvpn/lxsameer) (Quit: WeeChat 2.9) |
| 19:15:33 | tomsmeding | always uses Debug.Trace.trace liberally when debugging haskell code |
| 19:16:24 | Rembane | too |
| 19:17:44 | × | abhixec quits (~abhixec@c-67-169-141-95.hsd1.ca.comcast.net) (Ping timeout: 258 seconds) |
| 19:19:15 | → | pbgc joins (~pbgc@78.15.103.87.rev.vodafone.pt) |
| 19:20:33 | → | crblmr joins (~carbolyme@matrix.dropacid.net) |
| 19:22:35 | <topos> | @jackdk |
| 19:22:36 | <lambdabot> | Unknown command, try @list |
| 19:22:43 | <topos> | hopefully that answers your question |
| 19:24:34 | <solonarv> | tomsmeding: they are in the cabal manual, look under 'cabal run' IIRC |
| 19:24:47 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 19:26:17 | <tomsmeding> | solonarv: ah! I saw the link in a comment on a PR, but that link was apparently outdated and I neglected to see where it should have pointed |
| 19:26:23 | <tomsmeding> | indeed under cabal v2-run :) |
| 19:26:34 | × | cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: cosimone) |
| 19:28:33 | × | Jesin quits (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving) |
| 19:28:50 | × | geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Ping timeout: 245 seconds) |
| 19:28:52 | → | acidjnk_new joins (~acidjnk@p200300d0c719ff6609235681fd8d59d5.dip0.t-ipconnect.de) |
| 19:30:12 | × | justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) () |
| 19:30:37 | → | Jesin joins (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) |
| 19:32:47 | <solonarv> | oh yeah, printf debugging (of which Debug.Trace is a subset) is really quite good |
| 19:32:47 | × | crblmr quits (~carbolyme@matrix.dropacid.net) (Remote host closed the connection) |
| 19:33:35 | → | crblmr joins (~carbolyme@matrix.dropacid.net) |
| 19:33:43 | → | conal joins (~conal@64.71.133.70) |
| 19:35:45 | × | tsrt^ quits (tsrt@ip98-184-89-2.mc.at.cox.net) (Ping timeout: 256 seconds) |
| 19:36:24 | → | ADG1089 joins (uid455466@gateway/web/irccloud.com/x-qkwgyiwqvxxwtmum) |
| 19:38:28 | → | tput joins (~tput@S0106a84e3fe54613.ed.shawcable.net) |
| 19:38:36 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection) |
| 19:38:55 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) |
| 19:39:11 | → | urek joins (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) |
| 19:39:16 | <sm[m]> | I'll pimp my https://hackage.haskell.org/package/hledger-lib-1.20/docs/Hledger-Utils-Debug.html helpers, quite handy |
| 19:40:14 | × | crblmr quits (~carbolyme@matrix.dropacid.net) (Remote host closed the connection) |
| 19:41:17 | × | urek__ quits (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) (Ping timeout: 272 seconds) |
| 19:41:38 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 19:42:31 | → | crblmr joins (~carbolyme@matrix.dropacid.net) |
| 19:43:25 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) (Ping timeout: 258 seconds) |
| 19:44:55 | → | rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) |
| 19:46:27 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 19:47:23 | × | crblmr quits (~carbolyme@matrix.dropacid.net) (Remote host closed the connection) |
| 19:47:38 | × | bthom quits (~bthom@2601:184:4700:b89:abdc:f6d7:f8b7:16e2) (Ping timeout: 258 seconds) |
| 19:48:02 | → | geekosaur joins (82659a09@host154-009.vpn.uakron.edu) |
| 19:48:11 | → | bthom joins (~bthom@2601:184:4700:b89:abdc:f6d7:f8b7:16e2) |
| 19:48:46 | → | geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) |
| 19:50:07 | × | ADG1089 quits (uid455466@gateway/web/irccloud.com/x-qkwgyiwqvxxwtmum) (Quit: Updating details, brb) |
| 19:50:12 | → | crblmr joins (~carbolyme@matrix.dropacid.net) |
| 19:50:36 | → | ADG1089 joins (uid455466@gateway/web/irccloud.com/x-kegeyokgiugfjngo) |
| 19:50:46 | → | conal joins (~conal@64.71.133.70) |
| 19:50:52 | → | oish joins (~charlie@228.25.169.217.in-addr.arpa) |
| 19:51:01 | <geekosaur> | `xmobar` is just `statusBar` with xmobar as the bar and a wired-in default PP. if you want to change colors, you provide your own PP or override an exiting one using record update syntax |
| 19:51:49 | × | kuribas quits (~user@ptr-25vy0i73uopu9zhtdmp.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 19:51:55 | <geekosaur> | and "everyone does it their own freakin way" is the downside of being extremely customizable :) |
| 19:53:18 | <monochrom> | I inflicted type inference on my students! http://www.cs.utoronto.ca/~trebla/CSCC24-2020-Summer/type-inference.html |
| 19:53:52 | <koz_> | monochrom: You are either the very best of instructors, or the very worst. |
| 19:54:02 | <geekosaur> | whoops, I think I sent that to the wrong channel |
| 19:54:09 | × | rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 258 seconds) |
| 19:54:25 | → | nolrai joins (4c1bcada@c-76-27-202-218.hsd1.or.comcast.net) |
| 19:56:54 | × | raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 265 seconds) |
| 19:57:02 | × | amiri quits (~amiri@cpe-76-91-154-9.socal.res.rr.com) (Remote host closed the connection) |
| 19:57:07 | <monochrom> | I think I'm the best kind, because I looked hard for a presentation suitable for undergrads. |
| 19:57:24 | × | iqubic` quits (~user@c-67-171-38-72.hsd1.wa.comcast.net) (Quit: ERC (IRC client for Emacs 28.0.50)) |
| 19:57:40 | → | iqubic joins (~user@2601:602:9500:4870:e4e6:be2f:1199:107f) |
| 19:58:19 | <monochrom> | So for example first of all, none of the sequent notation, because it takes much training to eyeball how the sequent rules translates to an algorithm. |
| 19:59:38 | <monochrom> | Instead, for each sequent rule, I write down the corresponding few lines of imperative, recursive code, and just show the code to the students. |
| 20:01:00 | <monochrom> | As well, I made the difficult decision to keep it imperative, i.e., unification has a mutable table and updates it. Because the pure-functional alternative is more distracting. |
| 20:01:01 | × | daGrevis quits (~daGrevis@unaffiliated/dagrevis) (Quit: daGrevis) |
| 20:01:07 | <nolrai> | So I get an UArray and I want an immutable Vector, is there an easy way to convert? |
| 20:01:25 | <tomsmeding> | monochrom++ |
| 20:01:35 | <tomsmeding> | having an intuition for how type inference works is _so_ helpful |
| 20:02:53 | → | daGrevis joins (~daGrevis@unaffiliated/dagrevis) |
| 20:02:58 | <nolrai> | It always throws me that there's a person named "So" in this channel. |
| 20:03:23 | → | justsomeguy joins (~justsomeg@216.186.218.241) |
| 20:03:23 | × | justsomeguy quits (~justsomeg@216.186.218.241) (Changing host) |
| 20:03:23 | → | justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311) |
| 20:03:54 | <monochrom> | I think my most important invention is the opening "heuristically" section that shows how a human would infer types by hand, which motivates why an algorithm will need creating unknowns and solve them by unification. |
| 20:04:00 | → | cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it) |
| 20:04:05 | <tomsmeding> | nolrai: probably the easiest version is via []; with some luck it doesn't actually materialise the list an just compiles down to a loop |
| 20:04:13 | <tomsmeding> | if you need something more performant, dunno |
| 20:04:23 | <nolrai> | I guess I don't for now. |
| 20:04:34 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) |
| 20:04:36 | × | Jajik quits (xchlup2@gateway/shell/fi.muni.cz/x-ukqhigdeuvhuvbdj) (Ping timeout: 240 seconds) |
| 20:04:36 | × | xsarnik0 quits (xsarnik@gateway/shell/fi.muni.cz/x-gifsqugeqfqrfess) (Ping timeout: 240 seconds) |
| 20:04:42 | × | polyphem quits (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Quit: WeeChat 2.9) |
| 20:05:17 | → | xsarnik0 joins (xsarnik@gateway/shell/fi.muni.cz/x-siyupapsmlttvhqm) |
| 20:05:54 | <merijn> | Vector has generate "Int -> (Int -> a) -> Vector a" |
| 20:06:07 | × | wonko7 quits (~wonko7@2a01:e35:2ffb:7040:14a1:46f4:68f7:2133) (Ping timeout: 260 seconds) |
| 20:06:19 | <merijn> | You can basically pass in the lookup of the UArray and it's size in and build the vector in place without the list at all |
| 20:06:56 | <merijn> | Then you're sure it's just a single loop |
| 20:09:11 | × | crblmr quits (~carbolyme@matrix.dropacid.net) (Remote host closed the connection) |
| 20:09:49 | × | invaser quits (~Thunderbi@31.148.23.125) (Ping timeout: 264 seconds) |
| 20:12:01 | → | crblmr joins (~carbolyme@matrix.dropacid.net) |
| 20:12:03 | <monochrom> | No, that's only my second most important invention. :) |
| 20:12:36 | × | AlterEgo- quits (~ladew@124-198-158-163.dynamic.caiway.nl) (Quit: Leaving) |
| 20:13:50 | <monochrom> | My most important invention is unacademic but precise (therefore more informative than academic) terminology. This one I really thought hard over a long time (on and off of course), and finally came to a perfect solution. |
| 20:14:22 | <monochrom> | You know how you see the academic literature says "skolem variables", "rigid variables", "meta variables". I'll have none of that. |
| 20:15:18 | → | xensky joins (~xensky@xengarden.xen.prgmr.com) |
| 20:15:44 | → | raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
| 20:15:56 | <monochrom> | In Hindley-Milner (rank 1) and without programmer-supplied type sigs, you only have to worry about "meta variables". Well, their sole purpose is to stand for unknowns that may or may not be solved later. So, I call them, candidly, "unknowns". |
| 20:17:20 | <monochrom> | (I have also figured out what to rename "skolem variables" to: "givens". But I don't need them for now. Until one day if I cover type sigs and/or rank-n.) |
| 20:18:47 | × | daGrevis quits (~daGrevis@unaffiliated/dagrevis) (Quit: daGrevis) |
| 20:19:25 | × | puffnfresh quits (~puffnfres@119-17-138-164.77118a.mel.static.aussiebb.net) (Ping timeout: 264 seconds) |
| 20:20:04 | → | daGrevis joins (~daGrevis@unaffiliated/dagrevis) |
| 20:20:13 | × | Foritus quits (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) (Quit: ლ(ಠ益ಠლ) .:. <Ashley> my porn is hidden in a folder called "BBC Micro Emulator") |
| 20:20:20 | → | knupfer joins (~Thunderbi@mue-88-130-61-156.dsl.tropolys.de) |
| 20:20:56 | → | puffnfresh joins (~puffnfres@119-17-138-164.77118a.mel.static.aussiebb.net) |
| 20:21:10 | <geekosaur> | now all you need are wanteds and you can confuse anyone who work with ghc's typechecker plugins |
| 20:21:10 | → | Foritus joins (~buggery@cpc91316-watf11-2-0-cust68.15-2.cable.virginm.net) |
| 20:22:02 | <monochrom> | haha yikes |
| 20:23:15 | → | wonko7 joins (~wonko7@lns-bzn-55-82-255-183-4.adsl.proxad.net) |
| 20:23:26 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 20:23:40 | → | jamm_ joins (~jamm@unaffiliated/jamm) |
| 20:24:08 | → | amiri joins (~amiri@cpe-76-91-154-9.socal.res.rr.com) |
| 20:25:50 | → | Jajik joins (xchlup2@gateway/shell/fi.muni.cz/x-qznwsywzudvjynms) |
| 20:27:08 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 260 seconds) |
| 20:27:49 | × | jyang quits (~jyang@70.35.214.234) (Ping timeout: 264 seconds) |
| 20:27:52 | × | Jesin quits (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) (Quit: Leaving) |
| 20:28:17 | × | jamm_ quits (~jamm@unaffiliated/jamm) (Ping timeout: 260 seconds) |
| 20:29:53 | → | jyang joins (~jyang@70.35.214.234) |
| 20:31:36 | × | pbgc quits (~pbgc@78.15.103.87.rev.vodafone.pt) (Quit: Computer has gone to sleep.) |
| 20:33:22 | → | Jesin joins (~Jesin@pool-72-66-101-18.washdc.fios.verizon.net) |
| 20:33:23 | × | nolrai quits (4c1bcada@c-76-27-202-218.hsd1.or.comcast.net) (Remote host closed the connection) |
| 20:33:36 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds) |
| 20:36:21 | → | DTZUZU_ joins (~DTZUZU@207.81.171.116) |
| 20:36:29 | <dsal> | Is there any kind of fold that terminates while still being able to look at arguments? |
| 20:36:44 | <dsal> | I've written my own recursion + a toList and feel that better should be doable. |
| 20:36:47 | <merijn> | eh, foldr? :p |
| 20:37:12 | <monochrom> | foldr can terminate and look at arguments |
| 20:37:27 | glguy | doesn't understand the question |
| 20:37:36 | geekosaur | neither |
| 20:37:46 | <dsal> | Hmm... OK, how does that work? I thought if I did something with the accumulator, it'd keep consuming. |
| 20:38:02 | <glguy> | dsal: What's an example of what you want to do? |
| 20:38:10 | <glguy> | foldr doesn't have an accumulator |
| 20:38:13 | × | DTZUZU quits (~DTZUZU@205.ip-149-56-132.net) (Ping timeout: 260 seconds) |
| 20:39:18 | <dsal> | foldr (\x (m,o) -> if (f x m) then Just x else (g m, o)) -- something like that |
| 20:39:23 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds) |
| 20:39:59 | <dsal> | I guess my understanding of early termination in foldr is a little fuzzy. |
| 20:40:13 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 20:40:30 | <monochrom> | OK, I have an example of early-stopping foldr. |
| 20:41:14 | <monochrom> | and = foldr (\x r -> if x then r else False) False |
| 20:41:20 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Quit: vfaronov) |
| 20:41:26 | → | mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) |
| 20:41:33 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 20:41:34 | <glguy> | > let unique = foldr (\x rest -> x : dropWhile (x==) rest) [] in take 3 (unique "exxxam" ++ undefined) |
| 20:41:34 | <monochrom> | If you conditionally don't use r, you conditionally stop early. |
| 20:41:37 | <dsal> | Right. The problem is that I need to look at r on both sides. |
| 20:41:37 | <lambdabot> | "exa" |
| 20:41:53 | × | philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Quit: leaving) |
| 20:42:11 | <monochrom> | Does "f x m" sometimes not need m? |
| 20:42:17 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit) |
| 20:42:20 | <dsal> | m is always needed. |
| 20:42:45 | → | sord937 joins (~sord937@gateway/tor-sasl/sord937) |
| 20:44:01 | <glguy> | > foldr (\x rec m -> if even x then m else rec (2*m)) (\m -> m) [1,3,5,7] 1 |
| 20:44:04 | <lambdabot> | 16 |
| 20:44:08 | <glguy> | > foldr (\x rec m -> if even x then m else rec (2*m)) (\m -> m) (1:2:undefined) 1 |
| 20:44:11 | <lambdabot> | 2 |
| 20:44:44 | → | Deide joins (~Deide@217.155.19.23) |
| 20:45:06 | × | danso quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: WeeChat 2.9) |
| 20:45:23 | <glguy> | > foldr (\x rec m -> if even x then m else rec (2*m)) (\m -> m) (1:3:10:undefined) 1 |
| 20:45:26 | <lambdabot> | 4 |
| 20:45:28 | → | abhixec joins (~abhixec@c-67-169-141-95.hsd1.ca.comcast.net) |
| 20:45:59 | <glguy> | there m is the accumulator and it exists early on even numbers |
| 20:47:20 | → | conal joins (~conal@64.71.133.70) |
| 20:47:24 | → | DTZUZU joins (~DTZUZU@205.ip-149-56-132.net) |
| 20:47:50 | <dsal> | that's interesting. That 4 is confusing me, though. |
| 20:48:40 | <glguy> | it's not returning x, it's returning the "accumulator" which gets doubled each step |
| 20:49:20 | × | DTZUZU_ quits (~DTZUZU@207.81.171.116) (Ping timeout: 256 seconds) |
| 20:49:42 | × | brisbin quits (~patrick@pool-173-49-158-4.phlapa.fios.verizon.net) (Quit: WeeChat 2.9) |
| 20:50:06 | <monochrom> | = foldl (\a _ -> 2*a) 1 . takeWhile (not . even) |
| 20:51:05 | × | fendor quits (~fendor@91.141.3.143.wireless.dyn.drei.com) (Remote host closed the connection) |
| 20:51:08 | <dsal> | Ah, OK. That's an interesting idea, though. It's probably better for me to stop thinking about this for a while since I don't have a *real* problem. I just tend to treat explicit recursion as a bit of a smell. |
| 20:51:14 | <monochrom> | There is a proof by rewriting foldl as foldr and then use foldr fusion. Omitted. (Handwaved.) |
| 20:51:18 | → | brisbin joins (~patrick@pool-173-49-158-4.phlapa.fios.verizon.net) |
| 20:52:06 | <monochrom> | Code that your audience don't understand is the only code smell. |
| 20:52:28 | <glguy> | I made this years ago for foldl/foldr https://old.reddit.com/r/haskell/comments/2892a9/someone_asked_me_to_derive_foldl_from_foldr_is/ci8yp1b/?context=3 |
| 20:52:33 | <monochrom> | And paradoxically it sometimes means your own recursion, some other times means not your own recursion. |
| 20:53:12 | <glguy> | code smell is a code smell :nod: |
| 20:53:13 | <dsal> | Oh, I know. I don't think it's wrong per se. Just makes me wonder if there's a way I can do it better. In particular, toList feels a little like giving up. |
| 20:53:39 | tomsmeding | . o O ( [] is a control flow mechanism, not a data structure ) |
| 20:53:57 | <dsal> | That's how I'm using it. :( |
| 20:54:00 | <glguy> | import Control.List |
| 20:54:19 | <tomsmeding> | Could not find module ‘Control.List’ |
| 20:54:24 | <tomsmeding> | was disappointed |
| 20:54:33 | <monochrom> | Data.Lens and Control.Machine IMO. The two module names that ekmett got wrong. :) |
| 20:54:45 | × | crblmr quits (~carbolyme@matrix.dropacid.net) (Remote host closed the connection) |
| 20:55:02 | <dsal> | I feel a little like I'm lying with this function I wrote that works with any Foldable! (by converting it to a list and doing the recursion) |
| 20:55:10 | <dsal> | I'm my only user, so I'm lying to myself. |
| 20:55:20 | <geekosaur> | or put otherwise even ekmett gets confused by the module name mess |
| 20:55:36 | <monochrom> | Well, it is true that if you can do it with toList, you can do it with Foldable or MonoFoldable methods. |
| 20:57:04 | <glguy> | If the first thing you do is call toList, then it's probably better to just take a list as an argument |
| 20:57:05 | → | emmanuel_erc joins (~user@2604:2000:1382:ce03::9af) |
| 20:57:11 | → | mbomba joins (~mbomba@bras-base-toroon2719w-grc-53-142-114-5-26.dsl.bell.ca) |
| 20:57:12 | <dsal> | I did implement this with foldr, I just don't know that it's not θ(N) |
| 20:57:17 | → | crblmr joins (~carbolyme@matrix.dropacid.net) |
| 20:57:27 | <glguy> | unless you're trying to be clever and shave some seconds off your AoC common library :nod: |
| 20:57:57 | <dsal> | Yeah, it was originally taking a list and then I changed a data structure and thought it'd be convenient to work with more data structures. |
| 20:58:12 | → | vfaronov joins (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) |
| 20:58:37 | <dsal> | AoC each year is a combination of learning that there are lots of things I don't know and learning a few of them. |
| 20:59:30 | <dsal> | The löb thing was great. That one was frustrating in that I understood the concept fairly quickly, but my brain couldn't hold both that and my code in my head at the same time for a while. Holes are nice for that. |
| 21:00:39 | × | vfaronov quits (~vfaronov@broadband-95-84-210-78.ip.moscow.rt.ru) (Client Quit) |
| 21:00:49 | × | Entertainment quits (~entertain@104.246.132.210) () |
| 21:03:48 | × | m4lvin quits (~m4lvin@w4eg.de) (Quit: m4lvin) |
| 21:09:43 | × | christo quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 21:09:48 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 21:10:32 | → | conal joins (~conal@64.71.133.70) |
| 21:12:16 | × | urek quits (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) (Remote host closed the connection) |
| 21:12:46 | → | urek joins (~urek@2804:7f1:e10a:4c43:c16d:b553:6dc5:9c45) |
| 21:14:05 | × | carlomagno quits (~cararell@148.87.23.11) (Remote host closed the connection) |
| 21:14:15 | → | carlomagno joins (~cararell@148.87.23.11) |
| 21:14:29 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 21:14:56 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
| 21:15:10 | <koz_> | :t (<&>) |
| 21:15:12 | <lambdabot> | Functor f => f a -> (a -> b) -> f b |
| 21:15:14 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 21:15:49 | × | sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937) |
| 21:15:55 | <dsal> | It's & for functors. |
| 21:16:05 | × | tlaxkit quits (~kvirc@89.35.63.181) (Ping timeout: 240 seconds) |
| 21:17:49 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 21:17:53 | × | Martinsos quits (~user@cpe-188-129-36-113.dynamic.amis.hr) (Read error: Connection reset by peer) |
| 21:18:34 | hekkaidekapus{ | is now known as hekkaidekapus |
| 21:20:13 | × | knupfer quits (~Thunderbi@mue-88-130-61-156.dsl.tropolys.de) (Ping timeout: 260 seconds) |
| 21:20:34 | → | DTZUZU_ joins (~DTZUZU@207.81.171.116) |
| 21:20:43 | × | DTZUZU quits (~DTZUZU@205.ip-149-56-132.net) (Ping timeout: 246 seconds) |
| 21:21:43 | → | coot_ joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) |
| 21:21:43 | × | chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer) |
| 21:22:04 | → | chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) |
| 21:22:26 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 256 seconds) |
| 21:23:18 | → | tlaxkit joins (~kvirc@89.35.63.181) |
| 21:24:31 | × | tlaxkit quits (~kvirc@89.35.63.181) (Client Quit) |
| 21:24:59 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood) |
| 21:25:16 | × | coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Ping timeout: 246 seconds) |
| 21:25:16 | coot_ | is now known as coot |
| 21:26:16 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 21:28:16 | → | pbgc joins (~pbgc@a89-152-145-91.cpe.netcabo.pt) |
| 21:30:40 | → | DTZUZU joins (~DTZUZU@205.ip-149-56-132.net) |
| 21:32:40 | × | DTZUZU_ quits (~DTZUZU@207.81.171.116) (Ping timeout: 258 seconds) |
| 21:35:21 | × | acidjnk_new quits (~acidjnk@p200300d0c719ff6609235681fd8d59d5.dip0.t-ipconnect.de) (Ping timeout: 258 seconds) |
| 21:38:44 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 21:39:34 | × | abhixec quits (~abhixec@c-67-169-141-95.hsd1.ca.comcast.net) (Ping timeout: 258 seconds) |
| 21:41:05 | × | geekosaur quits (82659a09@host154-009.vpn.uakron.edu) (Remote host closed the connection) |
| 21:41:06 | → | elliott__ joins (~elliott@pool-108-45-178-3.washdc.fios.verizon.net) |
| 21:42:02 | × | eedgit quits (~eedgit@95.179.237.21) (Ping timeout: 260 seconds) |
| 21:42:02 | × | eedgit26 quits (~chat.free@95.179.237.21) (Ping timeout: 260 seconds) |
| 21:42:40 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 21:45:33 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Remote host closed the connection) |
| 21:47:32 | <dsal> | This "bad parts" series is getting sillier. |
| 21:48:24 | × | jess quits (jess@freenode/staff/jess) (Quit: rebooting) |
| 21:50:08 | × | bitmagie quits (~Thunderbi@200116b806aa1d00e4084aa62cb9001a.dip.versatel-1u1.de) (Quit: bitmagie) |
| 21:51:19 | × | jmchael quits (~jmchael@87.112.60.168) (Quit: Leaving) |
| 21:51:37 | → | jmchael joins (~jmchael@87.112.60.168) |
| 21:52:31 | ← | delYsid parts (~user@unaffiliated/delysid) ("ERC (IRC client for Emacs 27.1.50)") |
| 21:52:39 | → | jonatanb joins (jonatanb@gateway/vpn/protonvpn/jonatanb) |
| 21:52:44 | → | falafel joins (~falafel@pool-108-31-243-192.washdc.fios.verizon.net) |
| 21:52:48 | × | jmchael quits (~jmchael@87.112.60.168) (Client Quit) |
| 21:54:07 | → | jyang_ joins (~jyang@modemcable044.186-200-24.mc.videotron.ca) |
| 21:54:13 | → | jmchael joins (~jmchael@87.112.60.168) |
| 21:56:45 | × | jonatanb quits (jonatanb@gateway/vpn/protonvpn/jonatanb) (Ping timeout: 240 seconds) |
| 21:56:54 | → | ransom__ joins (c4264035@gateway/vpn/protonvpn/c4264035) |
| 21:57:28 | × | jyang quits (~jyang@70.35.214.234) (Ping timeout: 246 seconds) |
| 21:57:40 | × | pbgc quits (~pbgc@a89-152-145-91.cpe.netcabo.pt) (Quit: Computer has gone to sleep.) |
| 21:58:45 | × | ransom quits (~c4264035@c-73-243-2-10.hsd1.co.comcast.net) (Ping timeout: 240 seconds) |
| 21:59:18 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
| 21:59:23 | → | rprije joins (~rprije@14-201-170-17.tpgi.com.au) |
| 21:59:30 | × | ClaudiusMaximus quits (~claude@unaffiliated/claudiusmaximus) (Quit: ->) |
| 22:00:11 | × | fionnan quits (~fionnan@109.255.20.201) (Remote host closed the connection) |
| 22:00:32 | → | renzhi joins (~renzhi@modemcable070.17-177-173.mc.videotron.ca) |
| 22:00:39 | → | u0_a203 joins (~u0_a203@37.98.47.224) |
| 22:00:43 | → | lordyod joins (~lordyod@c-67-169-144-132.hsd1.ca.comcast.net) |
| 22:01:06 | × | u0_a203 quits (~u0_a203@37.98.47.224) (Client Quit) |
| 22:01:08 | × | Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa) |
| 22:01:41 | <nfd> | oh yeah shoutouts to glguy: i decided to pick up megaparsec starting at day4, and seeing the patterns you use after i'm finished with those levels has been helpful :) |
| 22:04:01 | <dolio> | Seems like it's been silly. |
| 22:08:43 | × | Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer) |
| 22:09:41 | × | Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection) |
| 22:12:54 | × | gedda quits (gedda@gateway/vpn/mullvad/gedda) (Quit: leaving) |
| 22:13:49 | → | Varis joins (~Tadas@unaffiliated/varis) |
| 22:14:33 | → | mounty joins (~mounty@2001:8000:2f59:0:955e:b3d4:6deb:61b5) |
| 22:16:07 | × | ADG1089 quits (uid455466@gateway/web/irccloud.com/x-kegeyokgiugfjngo) (Quit: Connection closed for inactivity) |
| 22:17:58 | × | renzhi quits (~renzhi@modemcable070.17-177-173.mc.videotron.ca) (Ping timeout: 260 seconds) |
| 22:18:00 | × | coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Quit: coot) |
| 22:18:36 | × | Amras quits (~Amras@unaffiliated/amras) (Remote host closed the connection) |
| 22:19:42 | → | olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber) |
| 22:19:45 | → | danso joins (~dan@69-165-210-185.cable.teksavvy.com) |
| 22:19:55 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) (Remote host closed the connection) |
| 22:22:04 | → | texasmynsted joins (~texasmyns@212.102.44.130) |
| 22:23:24 | → | son0p joins (~son0p@181.136.122.143) |
| 22:24:55 | × | ransom__ quits (c4264035@gateway/vpn/protonvpn/c4264035) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 22:27:01 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 22:28:14 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Remote host closed the connection) |
| 22:28:34 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 22:30:21 | → | amerigo joins (uid331857@gateway/web/irccloud.com/x-egprymtqwwmmkfhc) |
| 22:32:37 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds) |
| 22:34:09 | <pja> | dsal: Some good points though. |
| 22:34:59 | <glguy> | nfd: cool; are you solutions online? |
| 22:35:15 | × | michalz quits (~user@185.246.204.39) (Remote host closed the connection) |
| 22:36:00 | × | shinobi_ quits (~shinobi@c-24-147-48-162.hsd1.ma.comcast.net) (Read error: Connection reset by peer) |
| 22:36:49 | → | hiroaki joins (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de) |
| 22:37:03 | <pja> | I always seem to spend more time than I should staring at Megaparsec type errors. Probably entirely my own fault though. |
| 22:37:44 | <glguy> | I use the megaparsec parse errors to get useful feedback while I'm writing my parser in the first place (for AoC) |
| 22:38:18 | × | star_cloud quits (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) (Excess Flood) |
| 22:38:22 | <pja> | I’m probably just not /quite/ experienced enough with it to be able to spot what’s wrong quickly. |
| 22:38:27 | <nfd> | glguy: yeah; https://github.com/nfd9001/advent-of-code-2020. mine are a bit more verbose/defensive/etc. and some of these involved bouncing questions off another friend who was already pretty familiar with it |
| 22:38:28 | → | crestfallen joins (~john@128.32.176.159) |
| 22:39:36 | <nfd> | for day4, i ended up using the parseerrors to troubleshoot/build confidence that my stuff made sense |
| 22:39:45 | → | star_cloud joins (~star_clou@ec2-34-220-44-120.us-west-2.compute.amazonaws.com) |
| 22:39:59 | <nfd> | it was really satisfying when i started seeing big waves of parse errors that were correctly rejecting bad passports |
| 22:40:30 | <dsal> | My day 4 is pretty sad. I've not done anything to make that one better. |
| 22:41:21 | <dsal> | I went too hard on a specific datatype too soon. |
| 22:41:34 | <dsal> | Of course, the nice part is that `part1 = length` |
| 22:42:13 | → | jess joins (jess@freenode/staff/jess) |
| 22:42:44 | × | texasmynsted quits (~texasmyns@212.102.44.130) (Ping timeout: 256 seconds) |
| 22:43:46 | <glguy> | nfd: Are you on my #haskell-themed leaderboard? |
| 22:44:51 | × | danso quits (~dan@69-165-210-185.cable.teksavvy.com) (Quit: WeeChat 2.9) |
| 22:46:36 | → | Vulfe joins (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) |
| 22:46:36 | <dsal> | I'm not very fast this year, but I'm also not panicking about it. Just enjoying the learning. |
| 22:47:03 | <sgibber2018> | dsal: Sounds like a good attitude to me. :) |
| 22:47:16 | <glguy> | the leaderboard is more about links to solutions and seeing who's keeping up than having to race |
| 22:47:30 | <dsal> | Oh, is it supposed to link to answers? |
| 22:47:33 | × | LKoen quits (~LKoen@243.169.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.”) |
| 22:47:46 | <glguy> | It can link to your github; many people put their answrs on their githubs |
| 22:48:19 | <dsal> | I've been pushing mine into a keybase repo. I don't really have any reason to keep anything secret since smarter folks than I have good answers. |
| 22:48:46 | × | dax quits (dax@bitbot/dax) (Quit: brb) |
| 22:49:10 | → | dax joins (dax@bitbot/dax) |
| 22:49:33 | → | AwesomeRigg joins (awesomerig@45.15.143.179) |
| 22:49:33 | <nfd> | glguy: no! happy to join though |
| 22:49:58 | <glguy> | nfd: code in /topic |
| 22:50:19 | <crestfallen> | hi would someone kindly point out possible indent errors beginning line 152 in 'factor' ? the program compiles but only returns "Invalid input". thanks https://gist.github.com/varreli/b32fa33506737c3b3fa0ff236dbe1c2c |
| 22:50:19 | × | ph88 quits (~ph88@ip5f5af6cd.dynamic.kabel-deutschland.de) (Quit: Leaving) |
| 22:51:15 | <crestfallen> | I have another version that works but it's far different from this one from the textbook |
| 22:51:17 | <AwesomeRigg> | hey whats the best stuff App Language to learn that will get a job fast during covid 2021 |
| 22:51:57 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Remote host closed the connection) |
| 22:52:15 | <crestfallen> | The book doesn't cover nested do statements so far, and the kindle version has all the indentation wrong |
| 22:53:18 | → | sparsity joins (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) |
| 22:54:05 | <crestfallen> | a version I got online is here, using Data Expr ... https://termbin.com/amea |
| 22:54:26 | <nfd> | crestfallen: https://en.wikibooks.org/wiki/Haskell/Indentation may help in general |
| 22:54:38 | <nfd> | especially noting its Golden Rule |
| 22:54:59 | → | o1lo01ol1o joins (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) |
| 22:55:20 | → | Tario joins (~Tario@201.192.165.173) |
| 22:57:22 | <crestfallen> | nfd I had it that way last night - with the standard indentation - but it compiles and still returns the error |
| 22:57:26 | <crestfallen> | thanks btw |
| 22:57:44 | × | Ariakenom quits (~Ariakenom@h-98-128-229-53.NA.cust.bahnhof.se) (Quit: Leaving) |
| 22:57:58 | × | oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 256 seconds) |
| 22:58:02 | <dsal> | crestfallen: The <|> looks pretty confusing to me. I'd put it on a new line and not have it indented in the do. Or better, name the do block and just have `parens <|> natural` |
| 22:58:05 | × | sparsity quits (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) (Ping timeout: 240 seconds) |
| 22:58:58 | <crestfallen> | 'parens <|> natural' ? I don't understand dsal |
| 22:59:04 | <dsal> | or `factor = between "(" ")" expr <|> natural` |
| 22:59:36 | × | o1lo01ol1o quits (~o1lo01ol1@bl11-140-216.dsl.telepac.pt) (Ping timeout: 265 seconds) |
| 22:59:52 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 23:00:11 | <crestfallen> | this is the hutton book verbatim (but unsure of correct indent due to format of kindle pub). why can't I get it to return a value? |
| 23:00:14 | <crestfallen> | dsal |
| 23:00:39 | <dsal> | crestfallen: something like this: https://www.irccloud.com/pastebin/KyTlRwBb/factor.hs |
| 23:01:13 | <dsal> | I don't know the book, but the alternative looks like it's in the wrong place to me. |
| 23:01:41 | <dsal> | i.e., it's not even conceptually what you'd want, assuming you want (expr) or whatever natural is. |
| 23:01:55 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 23:02:14 | <crestfallen> | It's odd, other solution sets on github have alternative in different spots, they compile and get same Invalid input error |
| 23:03:07 | <dsal> | I don't exactly understand what you're experiencing, but it doesn't make sense to me for it to be there. I also wouldn't stick it after the do block (probably) because it's harder to read. |
| 23:03:11 | <dsal> | (but I also wouldn't use a do block there) |
| 23:04:57 | <crestfallen> | thanks, I'd assume the book uses standard practices; its presented very matter of factly; immensely terse. dsal |
| 23:05:49 | <crestfallen> | dsal where would you put alternative? |
| 23:06:02 | <dsal> | Well, where I did in the paste above ^ |
| 23:06:21 | <crestfallen> | ok I thought you meant the definition... sorry |
| 23:06:45 | <dsal> | Or `factor = ("(" *> expr <* ")") <|> natural` if you don't have between (though between is easy enough to write. |
| 23:07:12 | → | sparsity joins (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) |
| 23:07:39 | <dsal> | Adding <|> after a do block seems too easy to get wrong. You've also noticed that. :) |
| 23:07:59 | <dsal> | But at the very least, doing it on the last line can't mean what you want. |
| 23:08:36 | <crestfallen> | dsal sorry your version with the where statement compiles but does not return a value! |
| 23:08:48 | <dsal> | What does it mean to not return a value? |
| 23:09:22 | × | mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Ping timeout: 256 seconds) |
| 23:09:43 | <crestfallen> | for example with > eval "3+(4*5)" I get the Invalid input error |
| 23:10:22 | → | conal joins (~conal@64.71.133.70) |
| 23:10:29 | <crestfallen> | or with > parse expr "3+(4*5)" ==> [] |
| 23:10:36 | × | scasc quits (~szabi@213142096072.public.telering.at) (Quit: Leaving) |
| 23:10:51 | <dsal> | Ah. Your parser doesn't give super great diagnostics. heh |
| 23:11:34 | <crestfallen> | sorry the quip is over my head. I'm hoping the thing will return 23 :) |
| 23:11:45 | → | z0 joins (~z0@188.251.84.43) |
| 23:12:39 | <crestfallen> | leads me to think the issue is elsewhere |
| 23:12:51 | <sm[m]> | Hope is Not a Strategy! :-) |
| 23:13:04 | <dsal> | Oh, expr is also broken. |
| 23:14:04 | <dsal> | λ> parse expr "3+(4+5)" |
| 23:14:04 | <dsal> | [(12,"")] |
| 23:14:32 | <dsal> | All your alternatives are hard to get right with all the do blocks. You can `do` it, but it's just a confusing way to do things. |
| 23:14:58 | <nfd> | i sometimes use <|> inside do blocks in parsers, but i think you need to be kinda disciplined about it for it to be really clear |
| 23:14:59 | <crestfallen> | its for illustrative purposes in the book I guess |
| 23:15:24 | <nfd> | like https://github.com/nfd9001/advent-of-code-2020/blob/8703b659299c111b0e56296b1c0fe90a4e51eafc/day7.hs#L47 (obviously day7 aoc spoilers if you care) |
| 23:15:36 | × | tessier quits (~treed@kernel-panic/copilotco) (Remote host closed the connection) |
| 23:16:12 | <crestfallen> | nfd I'm just following a book. the section is remarkably brief. there are no uses of nested do blocks, very sparse explanations |
| 23:17:03 | <crestfallen> | dsal how to fix expr, it's precisely as written except for possible indent issues |
| 23:17:13 | <nfd> | oh, yeah, i'm just saying that using alternatives in a do isn't something you're Never Allowed to do if you're careful about it |
| 23:17:17 | <dsal> | crestfallen: BTW, I think this makes it a lot easier to read as well. :) https://www.irccloud.com/pastebin/nETZ5hIg/between.hs |
| 23:17:43 | <dsal> | You have to fix all of them such that the alternative is an alternative for the whole do block and not a thing within the do block. |
| 23:18:12 | <crestfallen> | dsal I tried with brackets and parens. please illustrate |
| 23:18:29 | <dsal> | For example: https://www.irccloud.com/pastebin/3Fzxhu6s/ex.hs |
| 23:18:52 | <z0> | how lazy is Set.fromList? i mean if we do (elem y $ Set.fromList [x,y,z]) are we traversing the full list or just until we find z? |
| 23:19:12 | <z0> | and what would be the best approach for me to find a source for questions like this? |
| 23:19:22 | × | iqubic quits (~user@2601:602:9500:4870:e4e6:be2f:1199:107f) (Remote host closed the connection) |
| 23:19:28 | <dsal> | My emacs indenter won't even do the right thing here. |
| 23:19:40 | <dsal> | I just wouldn't write that. That you're having trouble with it is why. |
| 23:19:41 | <dolio> | Creating the set consumes the entire list. |
| 23:20:25 | <crestfallen> | one less space indented on line 7? |
| 23:21:59 | <dsal> | I changed indentation until it expressed what you actually mean here and compiled. That seemed to be the spot. It looks silly, though. I'd reject anything that looked like this in code review. |
| 23:22:02 | → | iqubic joins (~user@2601:602:9500:4870:4825:944d:5fe3:72b9) |
| 23:23:42 | <z0> | dolio: that makes sense, thanks. sometimes haskell surprises me so im looking for a good resource on lazyness and performance that can help me know things like this |
| 23:25:20 | <crestfallen> | I really don't understand why the well-regarded book would teach it this way dsal there seems to be so many angles to this, with so little explanation. I think the more important point, also seemingly glossed over, is the logic behind how the recursion works between the parsers. I can only vaguely grasp it at this point |
| 23:27:07 | × | thc202 quits (~thc202@unaffiliated/thc202) (Quit: thc202) |
| 23:27:18 | <dsal> | Yeah, so just name the do blocks and combine the names with <|> and you'll be less confused. |
| 23:29:06 | × | Vulfe quits (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Remote host closed the connection) |
| 23:29:14 | <dolio> | z0: Well, in this case, the structure of the Set and its elements (keys in the case of Map) is fully evaluated. I imagine it says that somewhere in the docs. And you can't really create the structure without consuming the entire list. |
| 23:29:47 | × | __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving) |
| 23:29:59 | <dolio> | So to evaluate the set at all, the entire list must be evaluated. |
| 23:30:35 | → | Vulfe joins (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) |
| 23:31:13 | <nfd> | it might help to think about what a Set is as a data structure when you're thinking about if the whole list needs to be consumed |
| 23:32:37 | <dolio> | Also the `fromList` docs mention that it checks if the list is sorted to use a linear algorithm, which can't be done without inspecting the entire list. |
| 23:33:16 | <nfd> | that Ord constraint in the elem type is there because you're constructing a tree of elems, which means your Set lookups involve traversing some sort of balanced search tree. what would it mean to traverse a partially-constructed search tree? i don't think i have a great answer for that, because during that construction it may need to be rebalanced |
| 23:33:25 | × | Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 258 seconds) |
| 23:34:59 | × | Vulfe quits (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Ping timeout: 260 seconds) |
| 23:35:00 | <nfd> | so the simpler implementation on their end is to consume the whole structure before passing a value back |
| 23:35:47 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) |
| 23:35:49 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds) |
| 23:36:39 | <crestfallen> | dsal thanks kindly, not sure I'm clear on all this but thanks! |
| 23:36:47 | <crestfallen> | thanks nsd |
| 23:36:58 | <crestfallen> | thanks nfd |
| 23:39:23 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) (Remote host closed the connection) |
| 23:39:30 | → | ishutin_ joins (~Ishutin@94-21-55-45.pool.digikabel.hu) |
| 23:40:21 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) |
| 23:41:13 | × | son0p quits (~son0p@181.136.122.143) (Quit: leaving) |
| 23:42:44 | × | ishutin quits (~Ishutin@80-95-86-98.pool.digikabel.hu) (Ping timeout: 256 seconds) |
| 23:44:44 | → | pavonia joins (~user@unaffiliated/siracusa) |
| 23:44:52 | × | Vulfe quits (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) (Ping timeout: 260 seconds) |
| 23:45:04 | <z0> | i see how that's obvious. thanks |
| 23:46:20 | → | Vulfe joins (~vulfe@2600:1702:31b0:34e0:c9fa:63a9:d772:b19c) |
| 23:47:05 | × | plutoniix quits (~q@ppp-27-55-74-157.revip3.asianet.co.th) (Ping timeout: 240 seconds) |
| 23:49:20 | × | conal quits (~conal@64.71.133.70) (Quit: Computer has gone to sleep.) |
| 23:49:45 | × | chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 23:51:06 | → | conal joins (~conal@64.71.133.70) |
| 23:51:14 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 23:51:32 | → | chang joins (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) |
| 23:51:51 | → | vicfred joins (~vicfred@unaffiliated/vicfred) |
| 23:52:24 | × | crestfallen quits (~john@128.32.176.159) (Quit: Leaving) |
| 23:52:33 | → | conal joins (~conal@64.71.133.70) |
| 23:52:50 | × | conal quits (~conal@64.71.133.70) (Client Quit) |
| 23:53:39 | × | wonko7 quits (~wonko7@lns-bzn-55-82-255-183-4.adsl.proxad.net) (Ping timeout: 260 seconds) |
| 23:53:40 | → | christo joins (~chris@81.96.113.213) |
| 23:53:41 | × | chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Client Quit) |
| 23:55:23 | → | z0_ joins (~z0@188.251.72.233) |
| 23:56:16 | × | sakirious quits (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Quit: The Lounge - https://thelounge.chat) |
| 23:57:38 | → | Tops21 joins (~Tobias@dyndsl-095-033-092-168.ewe-ip-backbone.de) |
| 23:58:43 | × | z0 quits (~z0@188.251.84.43) (Ping timeout: 258 seconds) |
| 23:59:52 | → | plutoniix joins (~q@node-uss.pool-125-24.dynamic.totinternet.net) |
All times are in UTC on 2020-12-09.