Home liberachat/#haskell: Logs Calendar

Logs: liberachat/#haskell

←Prev  Next→
Page 1 .. 87 88 89 90 91 92 93 94 95 96 97 .. 17903
1,790,204 events total
2021-05-26 05:11:54 <dy> (If they start crawling URLs and not just regex matching.)
2021-05-26 05:12:51 × satai quits (~satai@ip-37-188-173-38.eurotel.cz) (Ping timeout: 272 seconds)
2021-05-26 05:12:53 ksqsf joins (~textual@67.209.186.120.16clouds.com)
2021-05-26 05:14:02 × GIANTWORLDKEEPER quits (~pjetcetal@2.95.204.25) (Quit: EXIT)
2021-05-26 05:14:23 GIANTWORLDKEEPER joins (~pjetcetal@2.95.204.25)
2021-05-26 05:15:15 × ddellacosta quits (~ddellacos@86.106.121.58) (Ping timeout: 264 seconds)
2021-05-26 05:17:16 GIANTWORLDKEEPER is now known as Guest6628
2021-05-26 05:17:45 anandprabhu joins (~anandprab@87.201.97.214)
2021-05-26 05:17:51 <oats> edwardk: guess we have to resort to leaving riddles or something in topics now :P
2021-05-26 05:18:20 × Guest6628 quits (~pjetcetal@2.95.204.25) (Client Quit)
2021-05-26 05:18:41 <edwardk> oats: i just linked to the haskell.org/irc page, not a terribly good riddle, but its a breadcrumb for the curious who came expecting 2k people and found 20.
2021-05-26 05:18:44 Tomurb joins (~tom@92-17.net.optinet.cz)
2021-05-26 05:19:01 <edwardk> and its really just that i can't fit the names of 64+ haskell related topic channels in the channel topic.
2021-05-26 05:19:11 Guest10 joins (~Guest10@113.172.47.69)
2021-05-26 05:19:44 <Axman6> "We have moved all out communications to use LibreOffice"
2021-05-26 05:19:50 notzmv joins (~zmv@user/notzmv)
2021-05-26 05:20:06 <dy> You're given a complex expression and a set of simple types and operations.
2021-05-26 05:20:19 <dy> When you work out (or infer) the type signature it spells the new server location.
2021-05-26 05:20:31 <dibblego> those with homework questions will be stuck, genius!
2021-05-26 05:20:40 <Axman6> ha
2021-05-26 05:20:43 <dy> Two birds, one stone!
2021-05-26 05:21:07 <Axman6> > map succ "irc.libre.chat#haskell
2021-05-26 05:21:08 <lambdabot> <hint>:1:33: error:
2021-05-26 05:21:08 <lambdabot> lexical error in string/character literal at end of input
2021-05-26 05:21:13 <Axman6> > map succ "irc.libre.chat #haskell"
2021-05-26 05:21:15 <lambdabot> "jsd/mjcsf/dibu!$ibtlfmm"
2021-05-26 05:25:11 × ksqsf quits (~textual@67.209.186.120.16clouds.com) (Remote host closed the connection)
2021-05-26 05:26:42 bhrgunatha joins (~bhrgunath@2001-b011-8011-6163-fde3-9a54-1125-48fe.dynamic-ip6.hinet.net)
2021-05-26 05:26:47 ddellacosta joins (~ddellacos@89.46.62.23)
2021-05-26 05:27:08 unyu joins (~pyon@user/pyon)
2021-05-26 05:27:16 xlei joins (znc@pool-68-129-84-118.nycmny.fios.verizon.net)
2021-05-26 05:27:30 <joeyh> good idea, but you can also comment on the situation if you /topic map succ "hqb-khaqd-bg`s\US\"g`rjdkk"
2021-05-26 05:27:54 × oxide quits (~lambda@user/oxide) (Ping timeout: 264 seconds)
2021-05-26 05:29:27 xerox_ is now known as xerox
2021-05-26 05:31:51 × ddellacosta quits (~ddellacos@89.46.62.23) (Ping timeout: 272 seconds)
2021-05-26 05:32:05 × anandprabhu quits (~anandprab@87.201.97.214) (Quit: Leaving)
2021-05-26 05:33:34 steven1 joins (~steven@209.58.129.97)
2021-05-26 05:34:09 thunderrd joins (~thunderrd@183.182.115.71)
2021-05-26 05:34:31 xff0x_ is now known as xff0x
2021-05-26 05:35:03 × falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 264 seconds)
2021-05-26 05:35:12 thunderrd parts (~thunderrd@183.182.115.71) ()
2021-05-26 05:35:18 × danso quits (~danso@23-233-111-52.cpe.pppoe.ca) (Quit: WeeChat 3.0)
2021-05-26 05:36:22 ksqsf joins (~textual@67.209.186.120.16clouds.com)
2021-05-26 05:40:49 × joniibou quits (~joniibou@softbank060120010042.bbtec.net) (Quit: joniibou)
2021-05-26 05:41:05 joniibou joins (~joniibou@softbank060120010042.bbtec.net)
2021-05-26 05:41:14 sondre joins (~sondrelun@cm-84.212.100.140.getinternet.no)
2021-05-26 05:42:03 <steven1> hello, let's say I have an Expr data type in a programming language, and I want to take an arbitrary Expr and replace some known pattern with another, for example maybe I want to replace a subexpression that consists of a Application to a Lambda with just the body of the Lambda. I wrote a fold for this data type, but I'm starting to think that it's not enough for what I want to do. It seems like I
2021-05-26 05:42:05 <steven1> need to fold over it while also reconstructing it as I go. What's the correct tool for this?
2021-05-26 05:43:05 <steven1> the fold is good for identifying those patterns, but swapping out a pattern for something else seems trickier
2021-05-26 05:43:09 <dy> It depends on the kind of replacements you want to do. i.e how much "context" above and below they need.
2021-05-26 05:43:36 <dy> This gets into fancier and trickier recursion schemes.
2021-05-26 05:43:57 <steven1> let's say I know how much context, e.g. my example of checking for (Application (Lambda ...) params)
2021-05-26 05:44:33 <dy> You could write a function that matches (Application (Lambda ...) params and returns your substitution (and recurses for ... and params) while leaving other stuff alone, no?
2021-05-26 05:44:33 <xerox> edwardk: I guess the ".tld" ones should say "-tld" on the irc page now?
2021-05-26 05:44:42 oxide joins (~lambda@user/oxide)
2021-05-26 05:44:43 ddellacosta joins (~ddellacos@86.106.121.100)
2021-05-26 05:44:49 <dy> rewrite (Application (Lambda ...) params = ...
2021-05-26 05:44:51 × Erutuon quits (~Erutuon@97-116-14-180.mpls.qwest.net) (Quit: WeeChat 2.8)
2021-05-26 05:44:56 <dy> rewrite other = other
2021-05-26 05:45:01 Erutuon joins (~Erutuon@97-116-14-180.mpls.qwest.net)
2021-05-26 05:45:06 <edwardk> xerox: yeah i mentioned it to davean after the page got pushed
2021-05-26 05:45:11 <dy> Then apply it to the top level Expr and you'll get back a new one.
2021-05-26 05:45:12 <steven1> well I need to recurse and look for subexpressions
2021-05-26 05:45:36 <edwardk> but i don't think anything has come of it pull request wise
2021-05-26 05:45:39 haskman joins (~haskman@171.61.174.98)
2021-05-26 05:45:47 <steven1> I could write it all out but I wouldn't be able to use it for anything else. I'm hoping there's a solution that's more general
2021-05-26 05:45:53 <dy> Can you paste a concrete (but minimal) example of the kind of rewrite you'd want to do?
2021-05-26 05:46:03 trent joins (~trent@2001:8003:340d:d00:b2de:b98:7a93:b0ea)
2021-05-26 05:46:04 <xerox> ok
2021-05-26 05:46:05 <steven1> yep let me write one up
2021-05-26 05:46:08 <dy> Well, each rewrite would require one function, right?
2021-05-26 05:46:29 tycho joins (~royce@133-133-42-72.gci.net)
2021-05-26 05:46:33 <dy> Then, you'd want to figure out how you could compose those all into a single function you can pass the entire Expr through...
2021-05-26 05:46:38 tycho parts (~royce@133-133-42-72.gci.net) (WeeChat 2.8)
2021-05-26 05:46:43 <xerox> edwardk: btw do founder/ops status from fn carry over here or is it a brand new world
2021-05-26 05:46:55 <edwardk> all the ops/founder crap got reset
2021-05-26 05:47:13 <edwardk> i had to forge them from whole cloth. just did so for everyone in #haskell-ops
2021-05-26 05:47:25 <edwardk> at least the ones left over there
2021-05-26 05:47:33 <dy> steven1 it sounds like you want some generic way to declaratively specify arbitrary match-and-replace's of sub-Exprs.
2021-05-26 05:47:34 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 264 seconds)
2021-05-26 05:47:39 <dy> That might be a lot more work than it's worth.
2021-05-26 05:47:44 <steven1> yes that's what I want
2021-05-26 05:47:49 <steven1> ah thought it might not be that bad
2021-05-26 05:47:57 <steven1> because the 'match' part is easy with a foldable instance
2021-05-26 05:48:11 <dy> How would you specify the rewrite rules?
2021-05-26 05:48:15 <edwardk> i'm just glad that most of the channels i ran were in ## namespaces where the eye of sauron didn't pass
2021-05-26 05:48:26 <dy> And would that specification be any shorter than a normal function that does the rewrite itself?
2021-05-26 05:48:47 <dy> This might be a case of YAGNI.
2021-05-26 05:48:48 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
2021-05-26 05:48:53 <steven1> mostly because I could only specify the cases I want. I'll give an example of what I'm imagining
2021-05-26 05:49:27 × ddellacosta quits (~ddellacos@86.106.121.100) (Ping timeout: 264 seconds)
2021-05-26 05:50:08 <dy> You can specify only the cases you want with a plain old function too.
2021-05-26 05:50:10 <steven1> recurseSubstituteExpr (\e -> case e of App (Lam param body) arg -> body; a -> a)
2021-05-26 05:50:19 <steven1> pretend the first case makes sense :)
2021-05-26 05:50:23 <dy> rewrite1 (Foo ...) = ...; rewrite1 other = other
2021-05-26 05:50:28 <dy> rewrite2 (Foo ...) = ...; rewrite2 other = other
2021-05-26 05:50:36 <dy> Bar *
2021-05-26 05:51:00 <dy> And then compose the two, e.g. rewrite = rewrite2 . rewrite1 (or whatever other order is appropriate)
2021-05-26 05:51:15 Heffalump joins (~ganesh@urchin.earth.li)
2021-05-26 05:51:23 Heffalump parts (~ganesh@urchin.earth.li) ()
←Prev  Next→
Page 1 .. 87 88 89 90 91 92 93 94 95 96 97 .. 17903

All times are in UTC.