Logs: liberachat/#haskell
| 2021-08-01 17:50:52 | <Guest51> | previous call. Does Haskell do anything like this? |
| 2021-08-01 17:52:09 | → | burnsidesLlama joins (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
| 2021-08-01 17:52:19 | <Lycurgus> | there's a fallacy in your thinking, conflating values with variables |
| 2021-08-01 17:52:46 | <Lycurgus> | i.e. typed variables |
| 2021-08-01 17:53:08 | × | finsternis quits (~X@23.226.237.192) (Read error: Connection reset by peer) |
| 2021-08-01 17:53:46 | <Guest51> | could you give an example? |
| 2021-08-01 17:54:03 | <Lycurgus> | i will let others respond |
| 2021-08-01 17:54:57 | <pavonia> | I don't even understand that objection |
| 2021-08-01 17:54:59 | <spruit11> | it's called memoization and it's done usually in interpreters |
| 2021-08-01 17:55:12 | <spruit11> | hugs did it. not sure about ghci |
| 2021-08-01 17:55:28 | <spruit11> | maybe even ghc does it, dunno |
| 2021-08-01 17:56:33 | <spruit11> | https://stackoverflow.com/questions/3951012/when-is-memoization-automatic-in-ghc-haskell |
| 2021-08-01 17:56:39 | <Lycurgus> | memoization is not quite what Guest51 described |
| 2021-08-01 17:57:07 | <Guest51> | Memoization seems to be what I’m talking about |
| 2021-08-01 17:57:07 | <spruit11> | right, semantics are important |
| 2021-08-01 17:57:31 | <Guest51> | From 2 minutes on wikipedia |
| 2021-08-01 17:57:52 | × | burnsidesLlama quits (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Ping timeout: 265 seconds) |
| 2021-08-01 18:01:02 | × | reumeth quits (~reumeth@user/reumeth) (Ping timeout: 272 seconds) |
| 2021-08-01 18:02:09 | → | Pickchea joins (~private@user/pickchea) |
| 2021-08-01 18:05:46 | × | Guest51 quits (~Guest51@pool-96-252-123-136.bstnma.fios.verizon.net) (Quit: Client closed) |
| 2021-08-01 18:07:37 | × | mattil quits (~mattilinn@87-92-237-144.rev.dnainternet.fi) (Read error: Connection reset by peer) |
| 2021-08-01 18:09:18 | × | drd quits (~drd@93-39-151-19.ip76.fastwebnet.it) (Quit: ZNC 1.8.2 - https://znc.in) |
| 2021-08-01 18:09:37 | → | drd joins (~drd@2001:b07:a70:9f1f:1562:34de:f50f:77d4) |
| 2021-08-01 18:15:31 | × | gustik quits (~gustik@2a01:c844:241f:c020:312a:c22f:e497:698f) (Quit: Leaving) |
| 2021-08-01 18:16:39 | × | Guest82 quits (~Guest82@78.155.54.115) (Quit: Client closed) |
| 2021-08-01 18:17:12 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 2021-08-01 18:17:19 | → | haskell-lurk joins (~haskell-l@78.155.54.115) |
| 2021-08-01 18:19:32 | → | kenran joins (~kenran@200116b82bcccd0065aac765d90955b0.dip.versatel-1u1.de) |
| 2021-08-01 18:21:27 | → | asmit joins (~asmit@183.83.208.136) |
| 2021-08-01 18:22:50 | <asmit> | hello everyone |
| 2021-08-01 18:23:21 | × | Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt) |
| 2021-08-01 18:23:24 | × | asmit quits (~asmit@183.83.208.136) (Client Quit) |
| 2021-08-01 18:23:56 | → | asmit joins (~asmit@183.83.208.136) |
| 2021-08-01 18:24:52 | → | Guest9 joins (~Guest9@43.250.157.202) |
| 2021-08-01 18:26:31 | → | fef joins (~thedawn@user/thedawn) |
| 2021-08-01 18:29:11 | × | asmit quits (~asmit@183.83.208.136) (Quit: Leaving) |
| 2021-08-01 18:30:48 | × | justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 272 seconds) |
| 2021-08-01 18:31:24 | × | goepsilongo quits (~chacho@2603-7000-ab00-62ed-0000-0000-0000-0bd0.res6.spectrum.com) (Remote host closed the connection) |
| 2021-08-01 18:31:49 | → | goepsilongo joins (~chacho@2603-7000-ab00-62ed-0000-0000-0000-0bd0.res6.spectrum.com) |
| 2021-08-01 18:33:46 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds) |
| 2021-08-01 18:44:26 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-08-01 18:45:06 | <mikko> | anyone know of a good tutorial that explains "comparing" and "compare" and "on" functions? none of this is making any sense to me and the documentation is not great |
| 2021-08-01 18:46:14 | <monochrom> | First make sense of "compare". This should not be difficult after you understand that it is similar to C's "strcmp" and Java and Scala's "compareTo", but better. |
| 2021-08-01 18:46:37 | × | terrorjack quits (~terrorjac@ec2-54-95-39-30.ap-northeast-1.compute.amazonaws.com) (Remote host closed the connection) |
| 2021-08-01 18:47:00 | <monochrom> | IMO there is no hurry in understanding "comparing" or "on" until you are thoroughly annoyed by problems that need them. |
| 2021-08-01 18:47:23 | <monochrom> | This should be true of most tools. |
| 2021-08-01 18:47:35 | → | terrorjack joins (~terrorjac@ec2-54-95-39-30.ap-northeast-1.compute.amazonaws.com) |
| 2021-08-01 18:47:45 | → | curiousgay joins (~curiousga@77-120-186-48.kha.volia.net) |
| 2021-08-01 18:47:54 | <mikko> | i find myself using minimumBy/maximumBy or sorting all the time and it's a major pain to get working every time because i don't understand these |
| 2021-08-01 18:48:21 | → | sergio812 joins (~sergio812@lfbn-ren-1-403-102.w2-10.abo.wanadoo.fr) |
| 2021-08-01 18:49:34 | → | burnsidesLlama joins (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
| 2021-08-01 18:49:38 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds) |
| 2021-08-01 18:49:40 | <monochrom> | In that case the code of "comparing" and "on" are the best explanation. Meaning, better than any wordy explanation. |
| 2021-08-01 18:50:13 | <monochrom> | Because you're supposed to recognize that code matches something you have always repeated by hand. |
| 2021-08-01 18:50:46 | <mikko> | coming from ruby i'm used to doing arr.min_by(&:abs), so i don't understand why the need for additional compare function |
| 2021-08-01 18:50:58 | × | burnsidesLlama quits (~burnsides@dhcp168-012.wadham.ox.ac.uk) (Remote host closed the connection) |
| 2021-08-01 18:52:28 | → | justsomeguy joins (~justsomeg@user/justsomeguy) |
| 2021-08-01 18:52:57 | <sm> | mikko, study the haddocks and play around with them in GHCI, especially with some real sorting code you need to write - it'll click |
| 2021-08-01 18:53:29 | <sm> | there's no such tutorial, I'm guessing |
| 2021-08-01 18:56:17 | × | MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer) |
| 2021-08-01 18:56:32 | <sm> | actually, probably the best thing is to search haskell code on github for comparing, and look at examples |
| 2021-08-01 18:57:26 | <[exa]> | mikko: does 'maximumBy (compare `on` abs)' look like the way? the 'compare' is there because it specifies that you expect your data to have Ord instances |
| 2021-08-01 18:58:06 | <[exa]> | mikko: also in Data.List.Extra there's a definition for maximumOn that does precisely that |
| 2021-08-01 18:58:21 | → | markpythonicbitc joins (~textual@2601:647:5a00:35:ccd8:d07e:17cb:5010) |
| 2021-08-01 18:58:41 | <sm> | https://github.com/search?q=comparing+extension%3Ahs+language%3AHaskell&type=Code&ref=advsearch&l=Haskell&l= |
| 2021-08-01 18:58:59 | <mikko> | hmm maximumOn might be what i'm looking for then |
| 2021-08-01 18:59:03 | <[exa]> | mikko: in higher perspective, combining the functions is so cheap in haskell that people sometimes don't care to name/point out the combinations |
| 2021-08-01 18:59:12 | × | markpythonicbitc quits (~textual@2601:647:5a00:35:ccd8:d07e:17cb:5010) (Client Quit) |
| 2021-08-01 18:59:33 | <monochrom> | So this is just once again two communities using the "same" word "by" for two conflicting meanings. |
| 2021-08-01 18:59:42 | → | markpythonicbitc joins (~textual@2601:647:5a00:35:ccd8:d07e:17cb:5010) |
| 2021-08-01 18:59:48 | <monochrom> | Generally don't trust "meaningful" names. |
| 2021-08-01 19:00:16 | × | markpythonicbitc quits (~textual@2601:647:5a00:35:ccd8:d07e:17cb:5010) (Client Quit) |
| 2021-08-01 19:00:25 | [exa] | contacts Centralized Preposition Registry And Numbering Agency |
| 2021-08-01 19:00:26 | × | sergio812 quits (~sergio812@lfbn-ren-1-403-102.w2-10.abo.wanadoo.fr) (Quit: Client closed) |
| 2021-08-01 19:00:30 | <c_wraith> | trust in parametricity |
| 2021-08-01 19:00:43 | → | markpythonicbitc joins (~textual@2601:647:5a00:35:ccd8:d07e:17cb:5010) |
| 2021-08-01 19:01:19 | → | MQ-17J joins (~MQ-17J@d14-69-206-129.try.wideopenwest.com) |
| 2021-08-01 19:04:05 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 265 seconds) |
| 2021-08-01 19:05:00 | × | curiousgay quits (~curiousga@77-120-186-48.kha.volia.net) (Ping timeout: 272 seconds) |
| 2021-08-01 19:05:29 | × | fef quits (~thedawn@user/thedawn) (Quit: Leaving) |
| 2021-08-01 19:08:06 | → | burnsidesLlama joins (~burnsides@dhcp168-012.wadham.ox.ac.uk) |
| 2021-08-01 19:11:22 | → | finsternis joins (~X@23.226.237.192) |
| 2021-08-01 19:14:38 | → | brian_da_mage joins (~Neuromanc@user/briandamag) |
| 2021-08-01 19:14:53 | → | Atum_ joins (~IRC@user/atum/x-2392232) |
| 2021-08-01 19:15:37 | × | Atum_ quits (~IRC@user/atum/x-2392232) (Client Quit) |
| 2021-08-01 19:15:51 | → | jushur joins (~human@user/jushur) |
| 2021-08-01 19:15:59 | → | dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net) |
| 2021-08-01 19:19:24 | → | reumeth joins (~reumeth@user/reumeth) |
| 2021-08-01 19:20:17 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-08-01 19:21:37 | → | Atum_ joins (~IRC@user/atum/x-2392232) |
| 2021-08-01 19:23:15 | × | Atum_ quits (~IRC@user/atum/x-2392232) (Client Quit) |
| 2021-08-01 19:25:54 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds) |
| 2021-08-01 19:27:43 | → | curiousgay joins (~curiousga@77-120-186-48.kha.volia.net) |
| 2021-08-01 19:29:50 | × | lambdap quits (~lambdap@static.167.190.119.168.clients.your-server.de) (Quit: lambdap) |
| 2021-08-01 19:30:09 | → | lambdap joins (~lambdap@static.167.190.119.168.clients.your-server.de) |
| 2021-08-01 19:30:20 | × | kenran quits (~kenran@200116b82bcccd0065aac765d90955b0.dip.versatel-1u1.de) (Quit: WeeChat info:version) |
| 2021-08-01 19:30:52 | × | curiousgay quits (~curiousga@77-120-186-48.kha.volia.net) (Remote host closed the connection) |
| 2021-08-01 19:31:15 | → | curiousgay joins (~curiousga@77-120-186-48.kha.volia.net) |
| 2021-08-01 19:34:08 | × | cheater quits (~Username@user/cheater) (Ping timeout: 272 seconds) |
| 2021-08-01 19:34:42 | × | dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Ping timeout: 256 seconds) |
All times are in UTC.