[{"data":1,"prerenderedAt":322},["ShallowReactive",2],{"project-23127628":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":42,"post_text":44,"what":45,"said":67,"maker_in_thread":153,"shape":165,"grid":169,"attempts":285,"same_week":286,"maker_shows":32,"maker_hidden":314,"reader_version":315,"card":316},"23127628","Pyp","Easily, magically, run Python at the shell","title","Show HN: Pyp – Easily, magically, run Python at the shell","https:\u002F\u002Fgithub.com\u002Fhauntsaninja\u002Fpyp","github.com","hauntsaninja",1589052641,2020,285,42,146,3028,5,"legend","dev_tools","shell utility","cli",[24,25,26,27],"python shell","python one-liner","command line python","pipe python","loved",0.625,{"positive":31,"neutral":32,"mixed":33,"critical":34},11,2,1,0,14,{"idea":37,"design":38,"performance":39,"execution":40,"docs":41},{"positive":18,"critical":34},{"positive":32,"critical":34},{"positive":32,"critical":34},{"positive":34,"critical":34},{"positive":33,"critical":34},[34,34,34,34,34,34,34,18,34,34,18,34,34,34,43,34,34,34,34,18,34,18,18,18,43,34,34,34,34,18,34,43,34,34,34,18,18,18,34,34],3,null,{"problem":46,"audience":44,"pricing":44,"motivation":44,"time_to_build":44,"stack":58,"openness":66,"stage":66,"team_size":66},{"value":47,"source":48,"evidence":49},"Writing inline Python transformations in the shell without boilerplate","inferred",[50,54],{"id":51,"by":52,"text":53},"23128218","kortex","This is going straight into the toolkit. The main thing that keeps me from doing more inline python is all of the printing boilerplate. Well, two things, the second thing being…",{"id":55,"by":56,"text":57},"23128135","dbieber","This is fantastic -- I will certainly turn to this instead of awk\u002Fsed in many instances. I expect I'll use this in place of particularly tricky greps too. Really nice that you…",[59],{"value":60,"source":48,"evidence":61},"Python",[62],{"id":63,"by":64,"text":65},"23129466","Hello71","Looks like there are no dependencies, so it should start pretty fast. And sure enough, it's both easy and reasonably fast to run: ``` $ time seq 1 10000 | awk '{a+=$0}END{print…","unknown",{"praise":68,"objections":88,"requests":101,"questions":109,"alternatives":117},[69,82],{"value":70,"source":71,"evidence":72},"Useful for one-liner piping; magic feels well judged","commenter",[73,77,78],{"id":74,"by":75,"text":76},"23128904","Evanbenn","Brilliant, just the right amount of magic. The explain feature is what really sold me that you thought about users! I wonder if I can put a bit of humanfriendly support in there…",{"id":55,"by":56,"text":57},{"id":79,"by":80,"text":81},"23128744","daenz","Very cool! I'm the author of sh.py, and seeing projects that use just the right amount of magic to accomplish something unique and powerful is inspiring. Great work and good luck…",{"value":83,"source":71,"evidence":84},"Good documentation",[85],{"id":86,"by":64,"text":87},"23129448","I was going to ask \"isn't this basically just awk\" but the README quickly cleared that up! Excellent documentation. One thing I'm wondering is how's the startup time\u002Fperformance…",[89,96],{"value":90,"source":71,"evidence":91},"Name taken from an existing project called pyp",[92],{"id":93,"by":94,"text":95},"23130629","nightcracker","Yanking another projects name is more than just 'inspiration'. I would consider it a very hostile action.",{"value":97,"source":71,"evidence":98},"Startup time and performance concerns",[99,100],{"id":51,"by":52,"text":53},{"id":86,"by":64,"text":87},[102],{"value":103,"source":71,"evidence":104},"Add to CPython itself",[105],{"id":106,"by":107,"text":108},"23140297","slightwinder","Something like this should be baked straight into CPython itself. There are so many similar projects, there clearly is some demand for this. This could boost pythons usage for…",[110],{"value":111,"source":71,"evidence":112},"How to handle start\u002Fend marker ranges in streams",[113],{"id":114,"by":115,"text":116},"23134978","isignal","Pretty cool! How would one accomplish the following with pyp? * Wait until one sees a line with a start marker (say 'start:') * Perform on an operation on the lines until an end…",[118,125,132,139,146],{"value":119,"source":71,"evidence":120},"Mario",[121],{"id":122,"by":123,"text":124},"23128157","j88439h84","Mario is a very featureful application of similar ideas, and includes multiple built-in transformations, concurrency support, user-defined commands, and extensive documentation.…",{"value":126,"source":71,"evidence":127},"xonsh",[128],{"id":129,"by":130,"text":131},"23128333","chrisweekly","My cousin helped create xonsh (https:\u002F\u002Fxon.sh), a POSIX-compliant \"python as drop-in shell replacement\", years ago.",{"value":133,"source":71,"evidence":134},"Original pyp by imageworks",[135],{"id":136,"by":137,"text":138},"23128330","dagmx","There exists a very similar tool for several years with the exact same name https:\u002F\u002Fopensource.imageworks.com\u002Fpyp.html",{"value":140,"source":71,"evidence":141},"pythonpy",[142],{"id":143,"by":144,"text":145},"23128244","beagle3","Ubercool. There's a similar project called \"pythonpy\" which I had used in the past. It seems to have disappeared off the face of the earth, the only thing I found is this fork:…",{"value":147,"source":71,"evidence":148},"Perl one-liners",[149],{"id":150,"by":151,"text":152},"23137249","Erwin","Having moved from Perl to Python many years ago, this is one of those things that Perl has magic to handle, for example: ``` perl -lne '$sum += $_ if \u002Fstart:\u002F .. \u002Fend:\u002F;…",{"comments":154,"answered":32,"key":155},7,[156,159,162],{"id":157,"text":158},"23128410","Thanks for sharing! I hadn't seen Mario before. The async support is super nifty! From a quick look, it looks like pyp might be a little quicker for some use cases since it…",{"id":160,"text":161},"23128377","xonsh is great! I'm a fan of your cousin's work :-) I mentioned it in https:\u002F\u002Fgithub.com\u002Fhauntsaninja\u002Fpyp#related-projects for if you want even more Python in your shell.",{"id":163,"text":164},"23128356","Yup, that was the inspiration for this project and its name. See https:\u002F\u002Fgithub.com\u002Fhauntsaninja\u002Fpyp#related-projects for more discussion. By no means is this a new idea, but I…",{"commenters":166,"max_depth":18,"maker_replies":154,"first_comment_mins":167,"lifespan_hours":168},34,53,76,[170,172,175,177,178,181,182,185,189,192,195,197,200,203,206,209,210,211,213,216,218,220,223,227,232,233,236,239,243,245,248,252,256,259,261,262,264,267,268,273,277,281],[122,34,34,171,123,34],"other\u002Fneutral\u002Fnone",[173,34,34,171,174,34],"23128240","canada_dry",[157,34,34,176,11,33],"commenter\u002Fneutral\u002Fnone",[129,33,34,171,130,34],[179,33,34,171,180,34],"23128376","rahimnathwani",[160,33,34,176,11,33],[183,33,34,171,184,34],"23136898","joseph8th",[186,32,18,187,188,34],"23129092","project\u002Fpositive\u002Fidea","jeswin",[190,43,34,171,191,34],"23128227","gmfawcett",[193,43,34,176,194,34],"23131421","Drdrdrq",[55,196,18,187,56,34],4,[198,18,34,171,199,34],"23128242","tehalex",[201,18,34,176,202,34],"23128530","eloahx",[204,18,34,171,205,34],"23128650","freedomben",[136,207,43,208,137,34],6,"project\u002Fneutral\u002Fnone",[163,207,34,176,11,33],[93,207,34,176,94,34],[212,207,34,176,11,33],"23130727",[214,207,34,176,215,34],"23131556","andybak",[74,154,18,217,75,34],"project\u002Fpositive\u002Fdesign",[79,219,18,187,80,34],8,[221,219,34,171,222,34],"23128843","divbzero",[224,225,18,217,226,34],"23128325",9,"akubera",[228,229,18,230,231,34],"23128062",10,"project\u002Fpositive\u002Fperformance","vertak",[106,31,18,187,107,34],[51,234,43,235,52,34],12,"project\u002Fmixed\u002Fperformance",[237,234,34,238,11,33],"23128310","project\u002Fneutral\u002Fperformance",[240,241,34,171,242,34],"23128434",13,"rasengan",[244,241,34,176,202,34],"23128525",[246,35,34,247,11,33],"23161152","project\u002Fneutral\u002Fidea",[249,250,18,187,251,34],"23128002",15,"gigatexal",[253,254,34,171,255,34],"23128592",16,"beamatronic",[114,257,43,258,115,34],17,"project\u002Fneutral\u002Fexecution",[260,257,34,258,11,33],"23135873",[150,257,34,171,151,34],[143,263,34,171,144,34],18,[86,265,18,266,64,34],19,"project\u002Fpositive\u002Fdocs",[63,265,18,230,64,34],[269,270,18,271,272,34],"23141427",20,"project\u002Fpositive\u002Fnone","emblaegh",[274,275,34,171,276,34],"23129106",21,"geophile",[278,279,34,171,280,34],"23132754",22,"michaelmior",[282,283,34,171,284,34],"23130550",23,"auscompgeek",[],[287,292,297,302,306,310],{"id":288,"name":289,"points":290,"category":291},"23165333","SHA-256 Animation",1053,"learning_science",{"id":293,"name":294,"points":295,"category":296},"23169962","This Word Does Not Exist",956,"ai",{"id":298,"name":299,"points":300,"category":301},"23114103","Twitch Roulette",732,"consumer_social",{"id":303,"name":304,"points":305,"category":20},"23126458","Lite",607,{"id":307,"name":308,"points":305,"category":309},"23157408","Scan Your PDF","productivity",{"id":311,"name":312,"points":313,"category":309},"23101869","HPI",478,false,"v2",{"id":317,"name":5,"line":6,"ai":314,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":318,"top":18,"kw":319,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":320,"url":9,"mix":321,"praise":70,"objection":90,"sub":21},23127628,0.63,[24,25,26,27],"0000000500500030000505553000050300055500",[31,32,33,34],1794036590280]