Logs: liberachat/#haskell
| 2021-06-26 07:19:35 | → | v01d4lph4 joins (~v01d4lph4@user/v01d4lph4) |
| 2021-06-26 07:19:58 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds) |
| 2021-06-26 07:22:07 | → | acidjnk joins (~acidjnk@p200300d0c72b9545f908228849627247.dip0.t-ipconnect.de) |
| 2021-06-26 07:25:04 | → | Gurkenglas joins (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) |
| 2021-06-26 07:26:47 | × | arjun quits (~user@user/arjun) (Remote host closed the connection) |
| 2021-06-26 07:35:32 | × | teaSlurper quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2021-06-26 07:36:06 | → | teaSlurper joins (~chris@81.96.113.213) |
| 2021-06-26 07:36:35 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 250 seconds) |
| 2021-06-26 07:40:44 | × | teaSlurper quits (~chris@81.96.113.213) (Ping timeout: 265 seconds) |
| 2021-06-26 07:40:53 | × | Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
| 2021-06-26 07:41:34 | → | Guest9 joins (~Guest9@103.86.19.137) |
| 2021-06-26 07:42:26 | <Guest9> | " something is intact=still same", how to represent this statement in diagram/sketch form? |
| 2021-06-26 07:42:29 | × | gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving) |
| 2021-06-26 07:48:10 | × | dajoer quits (~david@user/gvx) (Quit: leaving) |
| 2021-06-26 07:49:12 | → | TFL joins (~user@64.114.96.246) |
| 2021-06-26 07:53:03 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-06-26 07:58:13 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds) |
| 2021-06-26 08:00:09 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-06-26 08:01:05 | × | dmang quits (~dmang@047-032-148-170.res.spectrum.com) (Ping timeout: 258 seconds) |
| 2021-06-26 08:02:19 | → | dmang joins (~dmang@user/dmang) |
| 2021-06-26 08:07:28 | × | dmang quits (~dmang@user/dmang) (Ping timeout: 272 seconds) |
| 2021-06-26 08:09:46 | × | hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 244 seconds) |
| 2021-06-26 08:14:48 | <tomsmeding> | Is there a sensible precedence value for the '->' type construction operator? |
| 2021-06-26 08:14:50 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c4e3:f231:bc2a:37da) (Remote host closed the connection) |
| 2021-06-26 08:15:00 | → | dmang joins (~dmang@user/dmang) |
| 2021-06-26 08:15:16 | <tomsmeding> | in the same list as where '+' has precedence value 6 |
| 2021-06-26 08:18:04 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-06-26 08:18:35 | → | geekosaur joins (~geekosaur@xmonad/geekosaur) |
| 2021-06-26 08:19:14 | <ephemient> | -∞? |
| 2021-06-26 08:20:46 | × | allbery_b quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 272 seconds) |
| 2021-06-26 08:20:49 | <tomsmeding> | well, 'it + 1' should have a sensible value that is distinct from it |
| 2021-06-26 08:21:01 | <tomsmeding> | given that I would like to use it in a showsPrec-like setting :p |
| 2021-06-26 08:22:04 | × | tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz) |
| 2021-06-26 08:22:05 | → | _ht joins (~quassel@82-169-194-8.biz.kpn.net) |
| 2021-06-26 08:22:09 | <tomsmeding> | like, it doesn't matter much because the same expression cannot currently contain arithmetic operators, but for consistency's sake I generally like to give stuff Haskell precedence levels if possible |
| 2021-06-26 08:22:33 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 258 seconds) |
| 2021-06-26 08:33:43 | → | hendursaga joins (~weechat@user/hendursaga) |
| 2021-06-26 08:36:36 | × | Guest9 quits (~Guest9@103.86.19.137) (Quit: Connection closed) |
| 2021-06-26 08:44:58 | <juri_> | Cajun: is your program terminating normally? I have found that when i control-C a program, sometimes the profile output has a partial frame at the end that i must cut off, for the tools to work. |
| 2021-06-26 08:46:05 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-06-26 08:46:21 | <Cajun> | its terminating normally, the terminal doesnt specify an abnormal exit code afaik |
| 2021-06-26 08:46:40 | <Cajun> | i am on WSL if that matters for the profiling, but i dont image it does |
| 2021-06-26 08:47:25 | × | elf_fortrez quits (~elf_fortr@adsl-72-50-4-54.prtc.net) (Ping timeout: 246 seconds) |
| 2021-06-26 08:50:26 | × | lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds) |
| 2021-06-26 08:51:39 | → | fef joins (~thedawn@user/thedawn) |
| 2021-06-26 08:54:33 | × | dunkeln_ quits (~dunkeln@188.71.193.140) (Ping timeout: 244 seconds) |
| 2021-06-26 08:56:43 | → | dunkeln_ joins (~dunkeln@94.129.65.28) |
| 2021-06-26 09:02:22 | × | Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 246 seconds) |
| 2021-06-26 09:03:31 | → | Feuermagier joins (~Feuermagi@user/feuermagier) |
| 2021-06-26 09:03:40 | × | maerwald quits (~maerwald@mail.hasufell.de) (Changing host) |
| 2021-06-26 09:03:40 | → | maerwald joins (~maerwald@user/maerwald) |
| 2021-06-26 09:03:57 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 258 seconds) |
| 2021-06-26 09:06:13 | → | elf_fortrez joins (~elf_fortr@adsl-72-50-6-22.prtc.net) |
| 2021-06-26 09:07:40 | → | Schrostfutz joins (~Schrostfu@p5de88aa6.dip0.t-ipconnect.de) |
| 2021-06-26 09:09:16 | → | Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) |
| 2021-06-26 09:09:49 | × | MidAutumnMoon quits (~MidAutumn@user/midautumnmoon) (Quit: Leaving for a break - theLounge) |
| 2021-06-26 09:10:05 | → | MidAutumnMoon joins (~MidAutumn@user/midautumnmoon) |
| 2021-06-26 09:10:36 | <Schrostfutz> | Hi, I find myself relatively often trying to combine multiple predicates into one, and noticing that it's not so simple. Both joining the predicates into one function only works via lifting the && operator into function application (?), or applying a list of functions ([(a -> b)] -> a -> [b]) to a value and then combining the result, both of which are not readily available in the standard library which I find weird, since the |
| 2021-06-26 09:10:36 | <Schrostfutz> | use-case seems quite common to me, especially in a functional language. Or is that assumption wrong? |
| 2021-06-26 09:15:16 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:c4e3:f231:bc2a:37da) |
| 2021-06-26 09:18:04 | <ChaiTRex> | :t flip (all . flip id) |
| 2021-06-26 09:18:05 | <lambdabot> | Foldable t => t (b -> Bool) -> b -> Bool |
| 2021-06-26 09:18:43 | <ChaiTRex> | Schrostfutz: ^ |
| 2021-06-26 09:18:48 | × | hnOsmium0001 quits (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity) |
| 2021-06-26 09:19:13 | <Schrostfutz> | What |
| 2021-06-26 09:19:17 | <shachaf> | Yikes, don't write that. |
| 2021-06-26 09:19:23 | <Schrostfutz> | *What's the reason for the `flip id`? |
| 2021-06-26 09:19:43 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:c4e3:f231:bc2a:37da) (Ping timeout: 250 seconds) |
| 2021-06-26 09:19:49 | <ChaiTRex> | You could also write: \ fs x -> and . map (\ f -> f x) $ fs |
| 2021-06-26 09:20:17 | <shachaf> | That doesn't even seem to be addressng the question. |
| 2021-06-26 09:21:44 | <Schrostfutz> | The closest I have found so far is `fmap ($ val) predicates`, but that seems unintuitive to me (maybe because I'm a beginner, but I was hoping I was overlooking the nice, canonical solution to this. |
| 2021-06-26 09:22:39 | <shachaf> | map ($ x) list is reasonable standard. |
| 2021-06-26 09:23:16 | <shachaf> | Some people would probably suggest "sequence :: [a -> b] -> a -> [b]" |
| 2021-06-26 09:23:22 | <shachaf> | But that's probably not that helpful. |
| 2021-06-26 09:27:00 | <Schrostfutz> | shachaf: What sequence is that, the one I could find has the type `t (m a) -> m (t a)` |
| 2021-06-26 09:27:16 | <shachaf> | That one. |
| 2021-06-26 09:27:37 | <shachaf> | And that sort of confusion is why I wouldn't suggest it. |
| 2021-06-26 09:30:58 | <Schrostfutz> | shachaf: Alright, thanks! Do you have a pointer for a solution for the solution that feels more functional to me, combinding a list of predicates into a single one?: foldl1 (&&) predicates |
| 2021-06-26 09:32:14 | × | dunkeln_ quits (~dunkeln@94.129.65.28) (Ping timeout: 252 seconds) |
| 2021-06-26 09:32:47 | → | Scotty_Trees joins (~Scotty_Tr@162-234-179-169.lightspeed.brhmal.sbcglobal.net) |
| 2021-06-26 09:33:07 | → | dunkeln_ joins (~dunkeln@94.129.65.28) |
| 2021-06-26 09:34:39 | <ChaiTRex> | Schrostfutz: Going with your solution, you can try: all ($ val) predicates |
| 2021-06-26 09:34:42 | <ChaiTRex> | @src all |
| 2021-06-26 09:34:42 | <lambdabot> | all p = and . map p |
| 2021-06-26 09:34:51 | <ChaiTRex> | @src and |
| 2021-06-26 09:34:51 | <lambdabot> | and = foldr (&&) True |
| 2021-06-26 09:35:53 | <dibblego> | sequence predicates |
| 2021-06-26 09:36:16 | <dibblego> | oh sorry, that discussion has already been had |
| 2021-06-26 09:37:14 | <Schrostfutz> | ChaiTRex: Thanks! |
| 2021-06-26 09:37:24 | → | gensyst joins (gensyst@user/gensyst) |
| 2021-06-26 09:38:01 | <gensyst> | I'm looking for a queue structure with min/max query support: https://www.geeksforgeeks.org/design-a-queue-data-structure-to-get-minimum-or-maximum-in-o1-time/ |
| 2021-06-26 09:38:12 | <gensyst> | Are you aware of any existing one for Haskell? |
| 2021-06-26 09:38:28 | × | dunkeln_ quits (~dunkeln@94.129.65.28) (Ping timeout: 252 seconds) |
| 2021-06-26 09:40:21 | → | dunkeln_ joins (~dunkeln@94.129.65.28) |
| 2021-06-26 09:40:59 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection) |
| 2021-06-26 09:41:51 | <juri_> | I can potentially call error in any one of 200 places in my program. *sigh* |
| 2021-06-26 09:43:48 | <juri_> | I've got my stan warnings down to 180, from over 500, so i guess that's progress. |
| 2021-06-26 09:44:42 | × | dunkeln_ quits (~dunkeln@94.129.65.28) (Ping timeout: 252 seconds) |
| 2021-06-26 09:45:37 | → | dunkeln_ joins (~dunkeln@94.129.65.28) |
| 2021-06-26 09:49:18 | → | takuan joins (~takuan@178-116-218-225.access.telenet.be) |
All times are in UTC.