Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→ 1,804,042 events total
2025-09-16 15:18:09 β†’ down200- joins (~down200@shell.lug.mtu.edu)
2025-09-16 15:18:15 Γ— trickard quits (~trickard@cpe-94-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-09-16 15:18:29 β†’ trickard_ joins (~trickard@cpe-94-98-47-163.wireline.com.au)
2025-09-16 15:18:30 <Guest19> Thanks so much, that really helped clarify things! πŸ™Œ
2025-09-16 15:18:31 <Guest19> Now I’m wondering about the inverse situationβ€”how do you reason about nested types like `((Int -> Int) -> Int)`?
2025-09-16 15:18:31 <Guest19> I get that it’s a higher-order function, but I’d love to hear how you mentally unpack or visualize what’s going on there.
2025-09-16 15:18:37 Γ— taktoa[c] quits (sid282096@id-282096.tinside.irccloud.com) (Ping timeout: 260 seconds)
2025-09-16 15:18:37 taktoa[c]_ is now known as taktoa[c]
2025-09-16 15:18:38 Γ— ames quits (~amelia@offtopia/offtopian/amelia) (Ping timeout: 260 seconds)
2025-09-16 15:18:38 Γ— jcarpenter2 quits (~lol@2603:3016:1e01:b980:50d7:d756:5d4d:269d) (Ping timeout: 260 seconds)
2025-09-16 15:18:38 ames8 is now known as ames
2025-09-16 15:18:38 Γ— AlexZenon quits (~alzenon@178.34.162.29) (Ping timeout: 260 seconds)
2025-09-16 15:18:38 Γ— ystael_ quits (~ystael@user/ystael) (Ping timeout: 260 seconds)
2025-09-16 15:18:38 Γ— confusedalex quits (~confuseda@user/confusedalex) (Ping timeout: 260 seconds)
2025-09-16 15:18:38 Γ— peutri quits (~peutri@bobo.desast.re) (Remote host closed the connection)
2025-09-16 15:18:38 Γ— mjrosenb quits (~mjrosenb@70.18.10.118) (Ping timeout: 260 seconds)
2025-09-16 15:18:38 Γ— tureba quits (~tureba@tureba.org) (Ping timeout: 260 seconds)
2025-09-16 15:18:38 Γ— down200 quits (~down200@shell.lug.mtu.edu) (Ping timeout: 260 seconds)
2025-09-16 15:18:45 <tomsmeding> that case is less trivial indeed
2025-09-16 15:19:00 β†’ mjrosenb joins (~mjrosenb@70.18.10.118)
2025-09-16 15:19:19 <tomsmeding> while you can work out the algebra -- it's a function that, when given an Int -> Int function, gives you back an Int -- it's often helpful when dealing with these kind of multi-layered higher-order functions to have some context to get intuition from
2025-09-16 15:19:23 β†’ Raito_Bezarius joins (~Raito@libera/contributor/wireguard.tunneler.raito-bezarius)
2025-09-16 15:19:34 <tomsmeding> since there is no context here (I suspect this is an exercise), one can try to invent context
2025-09-16 15:19:50 <tomsmeding> one could explain x as a service that, when passed an Int-mutator, gives you back an Int
2025-09-16 15:20:13 β†’ jmcantrell_ joins (~weechat@user/jmcantrell)
2025-09-16 15:20:14 jmcantrell_ is now known as jmcantrell
2025-09-16 15:20:17 β†’ confusedalex joins (~confuseda@user/confusedalex)
2025-09-16 15:20:29 <tomsmeding> this is exactly the same thing as the literal interpretation of the type, but it gives a little... crude intuition, maybe, for thinking about this x
2025-09-16 15:20:38 β†’ AlexZenon joins (~alzenon@178.34.162.29)
2025-09-16 15:21:01 <tomsmeding> so inside f10, we create an Int-mutattor (\a -> a + 10), pass it to the service, and indeed we get an Int back
2025-09-16 15:21:04 β†’ end joins (~end@user/end/x-0094621)
2025-09-16 15:21:15 <tomsmeding> now what is x supposed to do? I dunno, there's no context here
2025-09-16 15:21:54 <tomsmeding> x might always return 42; it might apply the passed Int-mutator function to 6; it might apply the function 100 times to 1; it might also `unsafePerformIO launchMissiles`
2025-09-16 15:23:10 <Guest19> haha it is an exercise, thanks for clarification
2025-09-16 15:23:26 <[exa]> Guest19: not sure if it helps but sometimes I got lucky getting stuff explained to myself by calling that function a "callback" as in procedural languages
2025-09-16 15:23:57 <[exa]> function `f :: (Int -> Int) -> Int` gets a callback that processes integers for it
2025-09-16 15:24:38 <[exa]> function `g :: ((Int -> Int) -> Int) -> Int` gets a callback which itself gets callback(s) and produces integers for `g`
2025-09-16 15:25:35 <[exa]> also tbh I don't recall a good "simple" example where such 2 layers would be used
2025-09-16 15:25:49 Γ— trickard_ quits (~trickard@cpe-94-98-47-163.wireline.com.au) (Read error: Connection reset by peer)
2025-09-16 15:26:45 <merijn> Guest19: Step one would be to figure out/write out what the type of each argument is
2025-09-16 15:29:26 β†’ tureba joins (~tureba@tureba.org)
2025-09-16 15:29:27 β†’ trickard_ joins (~trickard@cpe-94-98-47-163.wireline.com.au)
2025-09-16 15:30:37 Γ— Googulator quits (~Googulato@178-164-188-203.pool.digikabel.hu) (Quit: Client closed)
2025-09-16 15:30:48 β†’ Googulator joins (~Googulato@2a01-036d-0106-217b-9021-558a-ccea-f5e8.pool6.digikabel.hu)
2025-09-16 15:33:32 Γ— qqe quits (~qqq@185.54.23.100) (Remote host closed the connection)
2025-09-16 15:34:00 β†’ sprotte24 joins (~sprotte24@p200300d16f231d00e5b1a054e6dbcfed.dip0.t-ipconnect.de)
2025-09-16 15:36:46 trickard_ is now known as trickard
2025-09-16 15:37:16 Γ— tv quits (~tv@user/tv) (Read error: Connection reset by peer)
2025-09-16 15:37:26 Γ— Guest19 quits (~Guest77@static-186-121-238-172.acelerate.net) (Quit: Client closed)
2025-09-16 15:38:07 β†’ Guest77 joins (~Guest77@static-186-121-238-172.acelerate.net)
2025-09-16 15:40:20 β†’ tromp joins (~textual@2001:1c00:3487:1b00:988d:4246:ce46:c357)
2025-09-16 15:45:11 Γ— Guest77 quits (~Guest77@static-186-121-238-172.acelerate.net) (Quit: Ping timeout (120 seconds))
2025-09-16 15:47:34 β†’ kaol_ joins (~kaol@94-237-45-144.nl-ams1.upcloud.host)
2025-09-16 15:50:09 β†’ jmcantre1 joins (~weechat@user/jmcantrell)
2025-09-16 15:50:41 β†’ takuan_dozo joins (~takuan@d8D86B9E9.access.telenet.be)
2025-09-16 15:50:48 β†’ mima_ joins (~mmh@user/mima)
2025-09-16 15:51:01 β†’ TimWolla_ joins (~timwolla@2a01:4f8:150:6153:beef::6667)
2025-09-16 15:51:49 β†’ fn_lumi_ joins (3d621153a5@2a03:6000:1812:100::df7)
2025-09-16 15:51:59 β†’ sus03 joins (zero@user/zeromomentum)
2025-09-16 15:52:10 β†’ gentauro_ joins (~gentauro@91.226.144.99)
2025-09-16 15:52:50 β†’ pmk_ joins (6afe4476a1@2a03:6000:1812:100::26d)
2025-09-16 15:52:52 β†’ geekosaur_ joins (sid609282@xmonad/geekosaur)
2025-09-16 15:53:07 β†’ buhman_ joins (sid411355@user/buhman)
2025-09-16 15:53:14 β†’ sa_ joins (sid1055@id-1055.tinside.irccloud.com)
2025-09-16 15:53:50 Γ— tromp quits (~textual@2001:1c00:3487:1b00:988d:4246:ce46:c357) (*.net *.split)
2025-09-16 15:53:50 Γ— tureba quits (~tureba@tureba.org) (*.net *.split)
2025-09-16 15:53:50 Γ— jmcantrell quits (~weechat@user/jmcantrell) (*.net *.split)
2025-09-16 15:53:50 Γ— buhman quits (sid411355@user/buhman) (*.net *.split)
2025-09-16 15:53:50 Γ— Pozyomka quits (~pyon@user/pyon) (*.net *.split)
2025-09-16 15:53:51 Γ— sus0 quits (thelounge@user/zeromomentum) (*.net *.split)
2025-09-16 15:53:51 Γ— takuan quits (~takuan@d8D86B9E9.access.telenet.be) (*.net *.split)
2025-09-16 15:53:51 Γ— mmaruseacph2 quits (~mihai@mihai.page) (*.net *.split)
2025-09-16 15:53:51 Γ— absence quits (torgeihe@hildring.pvv.ntnu.no) (*.net *.split)
2025-09-16 15:53:51 Γ— bryanv quits (~quassel@2603:c028:4503:7500:45b7:933:ab17:bc10) (*.net *.split)
2025-09-16 15:53:51 Γ— haveo quits (~weechat@pacamara.iuwt.fr) (*.net *.split)
2025-09-16 15:53:51 Γ— fn_lumi quits (3d621153a5@2a03:6000:1812:100::df7) (*.net *.split)
2025-09-16 15:53:51 Γ— drlkf quits (~drlkf@chat-1.drlkf.net) (*.net *.split)
2025-09-16 15:53:51 Γ— bgtdsword quits (b968c1779f@user/titibandit) (*.net *.split)
2025-09-16 15:53:51 Γ— pmk quits (6afe4476a1@2a03:6000:1812:100::26d) (*.net *.split)
2025-09-16 15:53:51 Γ— kaol quits (~kaol@94-237-45-144.nl-ams1.upcloud.host) (*.net *.split)
2025-09-16 15:53:51 Γ— geekosaur quits (sid609282@xmonad/geekosaur) (*.net *.split)
2025-09-16 15:53:51 Γ— mima quits (~mmh@user/mima) (*.net *.split)
2025-09-16 15:53:51 Γ— Profpatsch quits (~Profpatsc@user/Profpatsch) (*.net *.split)
2025-09-16 15:53:51 Γ— sa quits (sid1055@id-1055.tinside.irccloud.com) (*.net *.split)
2025-09-16 15:53:51 Γ— flukiluke quits (~m-7humut@2603:c023:c000:6c7e:8945:ad24:9113:a962) (*.net *.split)
2025-09-16 15:53:51 Γ— feetwind quits (~mike@user/feetwind) (*.net *.split)
2025-09-16 15:53:51 Γ— TimWolla quits (~timwolla@2a01:4f8:150:6153:beef::6667) (*.net *.split)
2025-09-16 15:53:51 Γ— gentauro quits (~gentauro@user/gentauro) (*.net *.split)
2025-09-16 15:53:51 Γ— dfordivam1 quits (~dfordivam@160.16.87.223.v6.sakura.ne.jp) (*.net *.split)
2025-09-16 15:53:51 sus03 is now known as sus0
2025-09-16 15:53:51 fn_lumi_ is now known as fn_lumi
2025-09-16 15:53:51 buhman_ is now known as buhman
2025-09-16 15:53:51 TimWolla_ is now known as TimWolla
2025-09-16 15:53:51 geekosaur_ is now known as geekosaur
2025-09-16 15:53:54 sa_ is now known as sa
2025-09-16 15:54:00 β†’ absence joins (torgeihe@hildring.pvv.ntnu.no)
2025-09-16 15:54:49 β†’ bryanv joins (~quassel@2603:c028:4503:7500:45b7:933:ab17:bc10)
2025-09-16 15:55:11 β†’ Pozyomka joins (~pyon@user/pyon)
2025-09-16 15:55:11 β†’ haveo joins (~weechat@pacamara.iuwt.fr)
2025-09-16 15:55:11 β†’ drlkf joins (~drlkf@chat-1.drlkf.net)

All times are in UTC.