Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 267 268 269 270 271 272 273 274 275 276 277 .. 17986
1,798,547 events total
2021-06-03 18:45:07 <bramhaag> I've implemented a basic eval function, but adding support for partial application and HOFs is rather painful with this implementation
2021-06-03 18:45:19 zmt01 is now known as zmt00
2021-06-03 18:45:22 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
2021-06-03 18:45:45 <[exa]> bramhaag: for partial application you might just need the correct abstraction (or "object") that represents it
2021-06-03 18:46:04 <[exa]> the usual way is to have "a function call with N holes for arguments that are still missing"
2021-06-03 18:47:04 × dysbarter quits (~dysbarter@adsl-72-50-4-119.prtc.net) (Ping timeout: 250 seconds)
2021-06-03 18:47:46 <[exa]> also feel free to show the eval here
2021-06-03 18:49:36 <bramhaag> I'm afraid my university wouldn't like that
2021-06-03 18:50:05 <bramhaag> another object to represent partial application is a good idea though, currently I've implemented it with the same object I use to represent regular funcalls and that's a bit of a mess
2021-06-03 18:50:29 <[exa]> yeah, you literally want to fold logic here in the data
2021-06-03 18:50:45 jolly18 is now known as jolly
2021-06-03 18:51:05 <[exa]> re university, I'd love if my students sometimes discussed the code with others before submitting :D
2021-06-03 18:51:35 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.1)
2021-06-03 18:51:54 <[exa]> like, copypasting is bad but avoiding various preventable pitfalls is much more important I guess
2021-06-03 18:52:17 × favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds)
2021-06-03 18:52:35 notzmv joins (~zmv@user/notzmv)
2021-06-03 18:52:39 <bramhaag> My current approach consists of two functions basically: bind which "binds" user-specified values to variables, and reduce which tries to simplify expressions into a constant value (using the bind function when needed)
2021-06-03 18:52:40 <[exa]> anyway, this "partially applied function" is also how haskell gets evaluated (you might google closures, thunks and similar things)
2021-06-03 18:52:44 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
2021-06-03 18:53:02 <[exa]> ah so you have a partial evaluator
2021-06-03 18:53:13 favonia joins (~favonia@user/favonia)
2021-06-03 18:55:16 <[exa]> that's good for some things but if you're after "just a normal evaluation", you generally want a single-layer function, something which takes the current bindings + AST, and outputs values
2021-06-03 18:55:36 ddellacosta joins (~ddellacos@89.45.224.92)
2021-06-03 18:56:05 <[exa]> in this view, the partially applied functions make nice values (also, remember to avoid using variable names in there)
2021-06-03 18:56:27 Rembane waves the DeBruijn flag
2021-06-03 18:57:25 thelounge920 joins (~thelounge@cpe-23-240-28-18.socal.res.rr.com)
2021-06-03 18:57:25 <[exa]> not debruijn indexes per se, just to avoid the result referring to a scope value that might disappear
2021-06-03 18:58:02 <Rembane> That's true
2021-06-03 18:58:37 <[exa]> (otoh a bit of DeBruijn never hurts. :D)
2021-06-03 18:58:45 <bramhaag> In this language you cannot assign variables, so the only variables in scope are the current function's parameters
2021-06-03 18:58:49 <bramhaag> that hopefully simplifies things a little
2021-06-03 18:59:12 <Rembane> [exa]: Exactly! :D
2021-06-03 18:59:38 <[exa]> I wanted to avoid a situation where you evaluator refers a reference to a variable like "take the value of X here" for an X that only existed in the function, or was shadowed there
2021-06-03 18:59:41 × thelounge92 quits (~thelounge@69.234.40.90) (Ping timeout: 272 seconds)
2021-06-03 18:59:41 thelounge920 is now known as thelounge92
2021-06-03 19:00:00 <[exa]> drawing a thick line between scope and values helps it a lot
2021-06-03 19:00:23 × ddellacosta quits (~ddellacos@89.45.224.92) (Ping timeout: 265 seconds)
2021-06-03 19:00:37 <[exa]> s/refers/returns/
2021-06-03 19:00:41 × o1lo01ol_ quits (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net) (Remote host closed the connection)
2021-06-03 19:00:43 × favonia quits (~favonia@user/favonia) (Ping timeout: 244 seconds)
2021-06-03 19:00:52 <bramhaag> Yeah makes sense, I'll try the single-layer approach, tyvm!
2021-06-03 19:01:45 o1lo01ol1o joins (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net)
2021-06-03 19:02:19 × jolly quits (~jolly@208.180.97.158) (Ping timeout: 265 seconds)
2021-06-03 19:02:19 favonia joins (~favonia@user/favonia)
2021-06-03 19:02:22 <[exa]> btw there might be a pitfall or two in handling the partially-applied functions that I didn't realize now, but hopefully nothing harsh
2021-06-03 19:03:02 <bramhaag> oh there always are pitfalls
2021-06-03 19:03:20 <bramhaag> but it'll be *fiiiineee*
2021-06-03 19:03:31 × o1lo01ol1o quits (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net) (Remote host closed the connection)
2021-06-03 19:03:43 o1lo01ol1o joins (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net)
2021-06-03 19:06:26 × rk04 quits (~rk04@user/rajk) (Quit: rk04)
2021-06-03 19:07:12 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-06-03 19:10:27 × azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Read error: Connection reset by peer)
2021-06-03 19:10:32 × favonia quits (~favonia@user/favonia) (Ping timeout: 244 seconds)
2021-06-03 19:10:56 favonia joins (~favonia@user/favonia)
2021-06-03 19:14:17 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
2021-06-03 19:14:20 dunkeln joins (~dunkeln@94.129.65.28)
2021-06-03 19:14:27 × shailangsa quits (~shailangs@host86-186-177-181.range86-186.btcentralplus.com) (Ping timeout: 272 seconds)
2021-06-03 19:16:49 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 265 seconds)
2021-06-03 19:16:55 × Voeid quits (luke@voeid.cf) (Quit: Leaving...)
2021-06-03 19:17:28 Voeid joins (luke@voeid.cf)
2021-06-03 19:17:48 ddellacosta joins (~ddellacos@89.46.62.43)
2021-06-03 19:18:08 azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it)
2021-06-03 19:18:36 Erutuon joins (~Erutuon@user/erutuon)
2021-06-03 19:19:43 × ddellaco_ quits (~ddellacos@89.46.62.114) (Ping timeout: 265 seconds)
2021-06-03 19:23:07 × azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Read error: Connection reset by peer)
2021-06-03 19:24:35 × o1lo01ol1o quits (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net) (Remote host closed the connection)
2021-06-03 19:25:16 o1lo01ol1o joins (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net)
2021-06-03 19:27:14 × favonia quits (~favonia@user/favonia) (Ping timeout: 252 seconds)
2021-06-03 19:27:38 favonia joins (~favonia@user/favonia)
2021-06-03 19:27:53 xakon joins (~xakon@46.165.219.81)
2021-06-03 19:31:17 × xakon quits (~xakon@46.165.219.81) (Client Quit)
2021-06-03 19:31:38 maerwald is now known as hasufell
2021-06-03 19:32:44 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
2021-06-03 19:38:51 × img quits (~img@2405:6580:b1c0:2500:67f2:d741:c73f:49d3) (Quit: ZNC 1.8.1 - https://znc.in)
2021-06-03 19:40:03 × tako quits (~user@net-2-45-30-17.cust.vodafonedsl.it) (Quit: ERC (IRC client for Emacs 27.2))
2021-06-03 19:40:29 img joins (~img@2405:6580:b1c0:2500:836a:9768:6f91:445b)
2021-06-03 19:40:48 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
2021-06-03 19:41:37 hasufell is now known as maerwald
2021-06-03 19:43:16 ubert1 joins (~Thunderbi@p200300ecdf259d40e6b318fffe838f33.dip0.t-ipconnect.de)
2021-06-03 19:43:27 shailangsa joins (~shailangs@host86-186-177-181.range86-186.btcentralplus.com)
2021-06-03 19:43:44 × peterhil quits (~peterhil@dsl-hkibng32-54f849-252.dhcp.inet.fi) (Ping timeout: 252 seconds)
2021-06-03 19:44:36 × ubert quits (~Thunderbi@p200300ecdf259dece6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
2021-06-03 19:44:36 ubert1 is now known as ubert
2021-06-03 19:44:44 × nerdypepper quits (znc@user/nerdypepper) (Read error: Connection reset by peer)
2021-06-03 19:46:30 nerdypepper joins (znc@152.67.162.71)
2021-06-03 19:47:13 × favonia quits (~favonia@user/favonia) (Ping timeout: 244 seconds)
2021-06-03 19:47:37 favonia joins (~favonia@user/favonia)
2021-06-03 19:47:53 pavonia joins (~user@user/siracusa)
2021-06-03 19:53:42 × beka quits (~beka@104.193.170-254.PUBLIC.monkeybrains.net) (Ping timeout: 264 seconds)
2021-06-03 19:57:02 jolly joins (~jolly@208.180.97.158)
2021-06-03 19:58:08 × Typedfern quits (~Typedfern@185.red-83-57-142.dynamicip.rima-tde.net) (Remote host closed the connection)
2021-06-03 19:58:59 heath is now known as ybit
2021-06-03 19:59:07 ybit is now known as heath
2021-06-03 19:59:16 thelounge927 joins (~thelounge@69.234.40.90)
2021-06-03 20:00:00 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
2021-06-03 20:00:52 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
2021-06-03 20:01:10 × thelounge92 quits (~thelounge@cpe-23-240-28-18.socal.res.rr.com) (Ping timeout: 244 seconds)
2021-06-03 20:01:10 thelounge927 is now known as thelounge92
2021-06-03 20:03:40 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
2021-06-03 20:05:42 × juhp quits (~juhp@128.106.188.199) (Ping timeout: 264 seconds)

All times are in UTC.