[{"data":1,"prerenderedAt":297},["ShallowReactive",2],{"project-9779097":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":34,"aspects":35,"strip":43,"post_text":45,"what":46,"said":88,"maker_in_thread":185,"shape":192,"grid":196,"attempts":258,"same_week":259,"maker_shows":31,"maker_hidden":289,"reader_version":290,"card":291},"9779097","hermetic","A Python with Hindley-Milner-like type annotations, compiling to C","title","Show HN: A Python with Hindley-Milner-like type annotations, compiling to C","https:\u002F\u002Fgithub.com\u002Falehander42\u002Fhermetic","github.com","alehander42",1435249954,2015,134,27,161,2565,7,"notable","languages","programming language","other",[24,25,26,27],"python compiler","typed python","compile python to c","hindley-milner","loved",0.333,{"positive":31,"neutral":32,"mixed":33,"critical":33},5,4,1,11,{"idea":36,"docs":39,"execution":40,"performance":41,"design":42},{"positive":37,"critical":38},2,0,{"positive":38,"critical":38},{"positive":38,"critical":33},{"positive":38,"critical":38},{"positive":33,"critical":38},[38,31,31,44,38,38,38,38,44,38,38,38,31,38,44,44,38,33,38,44,38,38,38,38,38,31,31],3,null,{"problem":47,"audience":45,"pricing":45,"motivation":59,"time_to_build":45,"stack":66,"openness":85,"stage":86,"team_size":87},{"value":48,"source":49,"evidence":50},"Python code lacks compile-time type checking and is slow to run","commenter",[51,55],{"id":52,"by":53,"text":54},"9784040","bkeroack","The value-add here is that it compiles to C and therefore the type enforcement is done at compile time. If you are OK with interpreted Python and runtime checking you can use…",{"id":56,"by":57,"text":58},"9782669","strictfp","A typed and fast Python with concurrency is something I've wanted for the longest time. I really hope that this will take off.",{"value":60,"source":61,"evidence":62},"Experimenting with a language type system that started from Hindley-Milner","maker",[63],{"id":64,"by":11,"text":65},"9784929","Well yeah, but I wanted to experiment with the language type system(it started from HM, but it can go anywhere). Classes\u002Frecords are not implemented yet, but I can imagine that…",[67,77],{"value":68,"source":49,"evidence":69},"Python",[70,73],{"id":71,"by":11,"text":72},"9784092","That looks cool! It's pretty different though, it's more like a \"design by contract\" tool. I have a similar one, more Python2 style dsl (it supports also function overloading…",{"id":74,"by":75,"text":76},"9783189","jjangsangy","A Python 3 based library that compiles to C?! > \"yeah, you need a shower now, doncha\" I saw that there is a requirements.txt file, but it's blank. This project amazes me, knowing…",{"value":78,"source":49,"evidence":79},"C (compile target)",[80,81],{"id":52,"by":53,"text":54},{"id":82,"by":83,"text":84},"9782612","jaytaylor","And that generated C code is quite amusing to boot!","open_source","prototype","unknown",{"praise":89,"objections":106,"requests":125,"questions":136,"alternatives":148},[90,94,102],{"value":91,"source":49,"evidence":92},"Typed, fast Python is a wanted idea",[93],{"id":56,"by":57,"text":58},{"value":95,"source":49,"evidence":96},"Impressive work and generated C is amusing",[97,101],{"id":98,"by":99,"text":100},"9782213","LukeHoersten","Really impressive work!",{"id":82,"by":83,"text":84},{"value":103,"source":49,"evidence":104},"Compile-time type enforcement is the key value",[105],{"id":52,"by":53,"text":54},[107,114,118],{"value":108,"source":49,"evidence":109},"Prototype does not yet support many basic constructs",[110],{"id":111,"by":112,"text":113},"9782908","lorenzhs","Very cool idea, I like it. But I can't really get much to compile yet -- while loops do not work, nor does range(). Anyway, quite impressive!",{"value":115,"source":61,"evidence":116},"Classes and records are not implemented yet",[117],{"id":64,"by":11,"text":65},{"value":119,"source":49,"evidence":120},"Hindley-Milner does not handle class-based inheritance",[121],{"id":122,"by":123,"text":124},"9783675","evacchi","Correct me if I'm wrong but IIRC HM is not applicable with class-based inheritance. How do you (plan to) deal with this? BTW I really like the idea of a typed, compilable Python,…",[126,130],{"value":127,"source":49,"evidence":128},"Support for while loops and range()",[129],{"id":111,"by":112,"text":113},{"value":131,"source":49,"evidence":132},"Add a benchmark of performance",[133],{"id":134,"by":112,"text":135},"9783147","Nice. I wanted to find out how well it performs (with a simple summing task) but I gave up before I had managed to loop over a range. I'll check back in a week or two ;)",[137,141],{"value":138,"source":49,"evidence":139},"How will class-based inheritance be handled under HM typing",[140],{"id":122,"by":123,"text":124},{"value":142,"source":49,"evidence":143},"Has cython been tried as an alternative",[144],{"id":145,"by":146,"text":147},"9782928","dagw","Have you looked at cython? It's (optionally) typed, fast (with only a little bit of effort extra effort over writing normal python), makes the GIL optional (for a reasonable…",[149,157,164,171,178],{"value":150,"source":49,"evidence":151},"Cython",[152,153],{"id":145,"by":146,"text":147},{"id":154,"by":155,"text":156},"9783847","kevin_thibedeau","+1 for cython. The only criticism I could make is that the real speedups come when you can avoid using PyObjects which means the easiest way to employ it is in the inner loops of…",{"value":158,"source":49,"evidence":159},"Nim",[160],{"id":161,"by":162,"text":163},"9782950","david-given","Have you tried Nim? The syntax is Python-inspired rather than Python-like, but it seems to combine a lot of the nice features of dynamic languages with the rigour of a static…",{"value":165,"source":49,"evidence":166},"MyPy",[167],{"id":168,"by":169,"text":170},"9782772","keypusher","MyPy is a pretty good typed Python variant. I believe the \"optional type annotations\" PEP used their style. http:\u002F\u002Fmypy-lang.org\u002F",{"value":172,"source":49,"evidence":173},"RPython",[174],{"id":175,"by":176,"text":177},"9782730","Animats","There have been other typed Python variants. RPython, in which PyPy was written, is sort of one. Shed Skin tried to do it entirely via type inference, which is really hard across…",{"value":179,"source":49,"evidence":180},"Runa",[181],{"id":182,"by":183,"text":184},"9784143","dochtman","Those who like this might also like my language project, Runa: A Python-like systems programming language. This means that the design borrows as much from Python as makes sense…",{"comments":32,"answered":33,"key":186},[187,188,189],{"id":71,"text":72},{"id":64,"text":65},{"id":190,"text":191},"9782922","Yep, it's still more like a prototype, so not everything is supported(but I'll add support for all basic constructs soon, stay tuned)",{"commenters":193,"max_depth":31,"maker_replies":32,"first_comment_mins":194,"lifespan_hours":195},21,544,23,[197,199,203,205,207,211,213,215,218,219,220,221,224,225,227,229,231,233,235,237,239,242,246,249,251,254,256],[182,38,38,198,183,38],"other\u002Fneutral\u002Fnone",[200,33,31,201,202,38],"9782034","project\u002Fpositive\u002Fnone","keenerd",[56,37,31,204,57,38],"project\u002Fpositive\u002Fidea",[145,37,44,206,146,38],"project\u002Fneutral\u002Fidea",[208,37,38,209,210,38],"9783823","commenter\u002Fneutral\u002Fnone","Demiurge",[154,37,38,212,155,38],"commenter\u002Fneutral\u002Fperformance",[214,37,38,209,146,38],"9784166",[216,37,38,212,217,38],"9784280","Fede_V",[161,37,44,206,162,38],[175,44,38,198,176,38],[168,44,38,198,169,38],[222,44,38,198,223,38],"9784026","nly",[52,32,31,204,53,38],[71,32,38,226,11,33],"maker\u002Fneutral\u002Fnone",[74,31,44,228,75,38],"project\u002Fmixed\u002Fdocs",[122,230,44,206,123,38],6,[64,230,38,232,11,33],"maker\u002Fneutral\u002Fidea",[111,18,33,234,112,38],"project\u002Fcritical\u002Fexecution",[190,18,38,236,11,33],"maker\u002Fneutral\u002Fexecution",[134,18,44,238,112,38],"project\u002Fneutral\u002Fperformance",[240,18,38,241,11,33],"9783895","maker\u002Fneutral\u002Fperformance",[243,244,38,198,245,38],"9782697",8,"agumonkey",[247,244,38,198,248,38],"9783803","__john",[250,244,38,198,245,38],"9783975",[252,244,38,198,253,38],"9784492","mdda",[98,255,31,201,99,38],9,[82,255,31,257,83,38],"project\u002Fpositive\u002Fdesign",[],[260,265,270,275,279,284],{"id":261,"name":262,"points":263,"category":264},"9806319","Clearbit Logo API",525,"infrastructure",{"id":266,"name":267,"points":268,"category":269},"9810534","Arrow Hero",195,"games",{"id":271,"name":272,"points":273,"category":274},"9791686","CuttlePhish",155,"security_privacy",{"id":276,"name":277,"points":278,"category":264},"9789960","a-sf-mirror",146,{"id":280,"name":281,"points":282,"category":283},"9784441","Hyperlax.tv",145,"consumer_social",{"id":285,"name":286,"points":287,"category":288},"9775695","Reddit alternative",104,"web_saas",false,"v2",{"id":292,"name":5,"line":6,"ai":289,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":293,"top":18,"kw":294,"maker":11,"domain":10,"tier":19,"attempts":38,"strip":295,"url":9,"mix":296,"praise":91,"objection":108,"sub":21},9779097,0.33,[24,25,26,27],"055300003000503301030000055",[31,32,33,33],1794036532793]