jeff bone zuutfplaceorg nov 2 2007 234 pm lion kimbro wrote code doodling lately affectionately calling aplpy pronounced apple pie deep heresy friends none take seriously want print files directory ppnnjoinotp p oh yeah well check crazy shit snip convenience curry lambda func args kw lambda p n funcargs p dictkwitems nitems class thingdict def __init__self dnone selfupdated def __getattr__self key selfhas_keykey return selfkey raise attributeerror reprkey def __setattr__self key value selfkey value def __repr__self return dict__repr__self parts generic mostly functional def prnsfdsysstdout print fd return def outofdsysstdout return prnrepro fd toks lambda stringsplits slurp lambda f p c ctokss freadlines ps cks lambda r r tl lambda l l1 hd lambda l l0 hdl lambda l hdl pairs lambda xs maptuple zipfrontxs tlxs abusing lambda notation tool thought haskell envy thing f lambda l tftrue oidl2 dl4 tsfloatl10 lambda l tffalse oidl2 dl4 tsfloatl7 marker dif lambda b bts ats delta fed lambda x xf x fed flip lambda b ad bd change dir flips lambda l b b pairsl flipab a_ lambda l hdll s_ lambda l hdlfilterfed l _s lambda l flipsfilterfed l _a lambda l flipsl aa lambda l a_l _al ss lambda l s_l _sl lambda l a_l _sl sa lambda l s_l _al def distillos fs def mark_fedo p p return fids foid f fs os mark_fedo ooid fids os ossortlambda b cmpats bts return os def runsymbol fdistill fs slurpopenfs currycks symbol f os slurpopenos currycks symbol return fos fs snip yeah thats snippet something actually wrote recently yeah actually made sense time theres one really clever bit notational abuse despite density whole thing im quite certain nobody else could ever understand accomplished sense like old apl saw probably writeonce writeonly code notationastoolofthought thing actually true wasnt hit notational density see could actually conceive solution problem aa ss sa functions permutations functional combinations functions lists list addition imperative iterative solution problem much difficult reason buggy errorprone much longer 002 jb thu 07 aug 2008 084024 0500 fork grand scheme things