[{"data":1,"prerenderedAt":351},["ShallowReactive",2],{"project-7010000":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":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":45,"post_text":47,"what":48,"said":83,"maker_in_thread":176,"shape":184,"grid":189,"attempts":309,"same_week":315,"maker_shows":32,"maker_hidden":343,"reader_version":344,"card":345},"7010000","LINQ","LINQ for Go","title","Show HN: LINQ for Go","https:\u002F\u002Fgithub.com\u002Fahmetalpbalkan\u002Fgo-linq","github.com","aabalkan",1388810881,2014,84,51,347,2272,16,"notable","languages","collection query library","library",[24,25,26,27,28],"go","linq","collections","query","golang","roasted",-0.611,{"positive":32,"neutral":33,"mixed":34,"critical":35},2,4,0,20,26,{"idea":38,"docs":41,"performance":42,"design":43},{"positive":39,"critical":40},1,5,{"positive":39,"critical":39},{"positive":34,"critical":40},{"positive":34,"critical":44},9,[39,34,34,34,34,34,34,40,39,34,39,46,34,39,34,39,34,39,39,39,39,46,39,39,46,34,39,34,34,39,39,34,39,39,34,34,46,34,34,39],3,null,{"problem":49,"audience":64,"pricing":47,"motivation":70,"time_to_build":47,"stack":75,"openness":81,"stage":82,"team_size":82},{"value":50,"source":51,"evidence":52},"Brings LINQ-style sequence querying to Go, which lacks generics and lambdas.","inferred",[53,56,60],{"id":54,"by":11,"text":55},"7010117","Yes I know that. I have been in touch with Matt several times about this. I really look for ways to improve it, even if it is one small step at a time. Just posted a thread to…",{"id":57,"by":58,"text":59},"7010199","overgard","Neat. I guess Go can't do type inference on the function types though? Those anonymous function signatures are all kinds of gross.",{"id":61,"by":62,"text":63},"7010322","DanWaterworth","yuck, I don't understand how go people can put up without parametric polymorphism.",{"value":65,"source":51,"evidence":66},"Go programmers who want LINQ-like querying.",[67],{"id":68,"by":11,"text":69},"7010627","I would not blame Google in particular. Go team operates like they are not part of Google most of the time. You are right about the abilities of other languages to make things…",{"value":71,"source":72,"evidence":73},"Maker's first Go project; maker plans to maintain it.","maker",[74],{"id":68,"by":11,"text":69},[76],{"value":77,"source":51,"evidence":78},"Go",[79],{"id":80},"post","open_source","unknown",{"praise":84,"objections":93,"requests":139,"questions":151,"alternatives":159},[85],{"value":86,"source":87,"evidence":88},"Useful and interesting work, helpful to other Go developers.","commenter",[89],{"id":90,"by":91,"text":92},"7012983","bad_user","Sorry for my rant on the language. It's interesting what you did and definitely helpful for other people, especially if you implement the other missing parts you mentioned.",[94,107,120,135],{"value":95,"source":87,"evidence":96},"Go lacks generics, so the API needs awkward casts and function signatures.",[97,98,102,103],{"id":57,"by":58,"text":59},{"id":99,"by":100,"text":101},"7011180","masklinn","> I guess Go can't do type inference on the function types though? It can't, and there are no generics which is why the input has to be cast back to a Student* in every function.…",{"id":61,"by":62,"text":63},{"id":104,"by":105,"text":106},"7010267","midas007","And the dots. Yuck.",{"value":108,"source":87,"evidence":109},"Missing SelectMany, fold and query expression support compared to LINQ.",[110,113,116],{"id":111,"by":91,"text":112},"7010603","In LINQ, the extension methods defined on IEnumerable are useful, but not that interesting, because they are standard functionality in most modern languages. I also think the…",{"id":114,"by":100,"text":115},"7011195","> much more interesting than Select and Where (i.e. you can implement Select and Where in terms of SelectMany). Well it doesn't provide a folding method either, and just about…",{"id":117,"by":118,"text":119},"7010409","olmo","Some problems with the Go implementation: Looks like go does not have something similar to extension methods, so a result() call should be put at the end to unwrap the…",{"value":121,"source":87,"evidence":122},"Goroutine-per-element approach adds heavy overhead for large inputs.",[123,127,131],{"id":124,"by":125,"text":126},"7010067","krakensden","From the documentation: > So if you have 1M elements as input to a plinq function, you will end up 1M goroutines. > Theoretically, there is not much wrong with that.…",{"id":128,"by":129,"text":130},"7010224","RyanZAG","Does it really sound alright to you? I mean it's not the end of the world or anything, but it's adding extra overhead which simply isn't needed when you're not gaining anything…",{"id":132,"by":133,"text":134},"7010868","JeanPierre","Just for reference, a single goroutine has a 8 kb stack size. Having one million of these things in memory at once would require 8 Gb of memory. Obviously, the scheduler kicks…",{"value":136,"source":87,"evidence":137},"Naming like Where and Select is unfortunate compared to filter and map.",[138],{"id":111,"by":91,"text":112},[140,144],{"value":141,"source":72,"evidence":142},"Add SelectMany, ToDictionary, GroupBy and Zip.",[143],{"id":68,"by":11,"text":69},{"value":145,"source":87,"evidence":146},"Support remote data sources via a pluggable query interface.",[147,148],{"id":117,"by":118,"text":119},{"id":149,"by":11,"text":150},"7010459","Great comments. I have thought about creating an interface so people can just implement their own query evaluation methods and, as you said, do querying from remote data sources.…",[152],{"value":153,"source":87,"evidence":154},"How would expression trees be translated into SQL in Go?",[155],{"id":156,"by":157,"text":158},"7013653","MichaelGG","Does golang support reified code\u002Fexpression trees\u002Fquoted code\u002Fwhatever you wanna call it? That seems to be a rather critical part of making it work. Or you use RethinkDB's RQL…",[160,167],{"value":161,"source":87,"evidence":162},"gen code generator for Go",[163],{"id":164,"by":165,"text":166},"7010091","kmontrose","Another approach using code generation is gen: http:\u002F\u002Fclipperhouse.github.io\u002Fgen\u002F (Disclaimer, I work with the guy behind it) Personally these sorts of libraries just strengthen…",{"value":168,"source":87,"evidence":169},"LINQ in C# and .NET",[170,173],{"id":171,"by":157,"text":172},"7010338","The real language part of LINQ isn't the simple sequence functions (.NET had them before LINQ), it's the LINQ monad embedded into the language. While personally I don't think…",{"id":174,"by":11,"text":175},"7010455","I am afraid that's actually not 100% accurate. Microsoft also uses term \"LINQ\" for method-based query syntax. See here:…",{"comments":177,"answered":39,"key":178},8,[179,180,181],{"id":68,"text":69},{"id":54,"text":55},{"id":182,"text":183},"7010454","Yes that's what C# and Python offers.",{"commenters":185,"max_depth":186,"maker_replies":177,"first_comment_mins":187,"lifespan_hours":188},31,6,32,102,[190,192,196,199,201,204,207,209,211,213,215,216,219,221,224,226,227,231,235,237,239,242,245,246,249,252,253,256,258,259,260,264,267,269,270,273,276,278,280,283,286,290,291,292,295,297,298,299,300,302,306],[111,34,39,191,91,34],"project\u002Fcritical\u002Fidea",[193,34,34,194,195,34],"7010612","commenter\u002Fneutral\u002Fnone","V-2",[197,34,34,194,198,34],"7010622","noelwelsh",[200,34,34,194,195,34],"7022784",[202,34,34,194,203,34],"7010847","_random_",[205,34,34,206,195,34],"7022787","other\u002Fneutral\u002Fnone",[208,34,34,194,91,34],"7013128",[210,34,34,194,195,34],"7022795",[68,34,34,212,11,39],"maker\u002Fneutral\u002Fidea",[90,34,40,214,91,34],"maker\u002Fpositive\u002Fidea",[114,34,39,191,100,34],[217,34,34,194,218,34],"7012789","kreeben",[220,34,39,191,91,34],"7013070",[222,34,39,191,223,34],"7011495","frowaway001",[164,39,46,225,165,34],"project\u002Fneutral\u002Fidea",[54,39,34,212,11,39],[228,39,39,229,230,34],"7010348","maker\u002Fcritical\u002Fdocs","burntsushi",[232,39,34,233,234,34],"7010388","commenter\u002Fneutral\u002Fdesign","frou_dh",[182,39,34,236,11,39],"maker\u002Fneutral\u002Fdesign",[124,32,39,238,125,34],"project\u002Fcritical\u002Fperformance",[240,32,34,241,11,39],"7010122","maker\u002Fneutral\u002Fperformance",[243,32,39,238,244,34],"7010217","kevingadd",[128,32,39,238,129,34],[247,32,34,248,11,39],"7010467","maker\u002Fpositive\u002Fperformance",[250,32,39,238,251,34],"7010339","nathanwdavis",[132,32,39,238,133,34],[254,32,40,255,125,34],"7013566","maker\u002Fpositive\u002Fdocs",[57,46,39,257,58,34],"project\u002Fcritical\u002Fdesign",[104,46,39,257,105,34],[99,46,39,257,100,34],[261,46,46,262,263,34],"7011318","project\u002Fneutral\u002Fdesign","mratzloff",[265,46,34,233,266,34],"7012907","codygman",[268,46,34,233,263,34],"7013408",[61,33,39,257,62,34],[271,33,34,194,272,34],"7010384","dsymonds",[274,33,34,194,275,34],"7010418","drdaeman",[277,33,34,194,272,34],"7010504",[279,33,39,257,62,34],"7010618",[281,33,39,257,282,34],"7010727","coldtea",[284,33,34,206,285,34],"7011537","_ak",[287,40,46,288,289,34],"7010814","maker\u002Fneutral\u002Fdocs","shadowmint",[171,186,39,191,157,34],[117,186,39,257,118,34],[293,186,34,194,294,34],"7010441","fleitz",[296,186,34,236,11,39],"7010463",[149,186,34,212,11,39],[156,186,46,262,157,34],[174,186,34,194,11,39],[301,186,34,194,157,34],"7013628",[303,304,39,257,305,34],"7010522",7,"codereflection",[307,177,39,257,308,34],"7010471","virtualwhys",[310,311],{"id":4,"t":12,"points":14,"comments":15},{"id":312,"t":313,"points":314,"comments":40},"8149130",1407434591,13,[316,321,325,330,335,340],{"id":317,"name":318,"points":319,"category":320},"7005348","Alpaca",268,"dev_tools",{"id":322,"name":323,"points":324,"category":320},"7023393","Codebox",136,{"id":326,"name":327,"points":328,"category":329},"7017580","Sneakers",114,"infrastructure",{"id":331,"name":332,"points":333,"category":334},"7007216","weather-explorer",85,"data",{"id":336,"name":337,"points":338,"category":339},"7000159","Lentor",69,"productivity",{"id":341,"name":342,"points":338,"category":20},"7019049","email",false,"v2",{"id":346,"name":5,"line":6,"ai":343,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":347,"top":18,"kw":348,"maker":11,"domain":10,"tier":19,"attempts":32,"strip":349,"url":9,"mix":350,"praise":86,"objection":95,"sub":21},7010000,-0.61,[24,25,26,27,28],"1000000510130101011113113010011011003001",[32,33,34,35],1793990901269]