[{"data":1,"prerenderedAt":402},["ShallowReactive",2],{"project-14439789":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":42,"post_text":44,"what":45,"said":84,"maker_in_thread":187,"shape":200,"grid":204,"attempts":363,"same_week":364,"maker_shows":202,"maker_hidden":394,"reader_version":395,"card":396},"14439789","Legion","An as-simple-as-possible blockchain server written in Haskell","title","Show HN: Legion, an as-simple-as-possible blockchain server written in Haskell","https:\u002F\u002Fgithub.com\u002Faviaviavi\u002Flegion","github.com","aviaviavi",1496074277,2017,239,71,111,2242,5,"notable","languages","blockchain example in haskell","api",[24,25,26,27],"haskell","blockchain","literate haskell","cloud haskell","curious",0.065,{"positive":31,"neutral":32,"mixed":33,"critical":18},10,16,0,31,{"docs":36,"execution":37,"idea":39,"design":41},{"positive":18,"critical":33},{"positive":38,"critical":33},4,{"positive":40,"critical":18},1,{"positive":33,"critical":33},[18,18,18,43,33,18,18,33,43,43,33,18,40,33,43,43,33,33,43,40,43,33,33,18,43,43,33,18,40,33,40,33,18,33,40,33,43,33,33,18],3,null,{"problem":44,"audience":44,"pricing":44,"motivation":46,"time_to_build":44,"stack":53,"openness":82,"stage":83,"team_size":83},{"value":47,"source":48,"evidence":49},"Small open source blockchain example and a way to learn Haskell","maker",[50],{"id":51,"by":11,"text":52},"14440378","Heh, well if there are actually problems I can definitely change it... But I only meant this to be a fun, small, open source blockchain example (and to learn more Haskell). So I…",[54,59,70,78],{"value":55,"source":48,"evidence":56},"Haskell",[57],{"id":58},"post",{"value":60,"source":61,"evidence":62},"Spock","inferred",[63,67],{"id":64,"by":65,"text":66},"14441220","m-j-fox","Nicely done. It reads like Ikea instructions. I didn't really know how blockchain worked until I read this code. If this was written as a teaching tool or a portfolio piece or…",{"id":68,"by":11,"text":69},"14441589","Yeah, it's for the compiler, otherwise it can't figure out that a BlockChainState is actually a SpockState m. I'm not really sure how it could otherwise, since the definition is…",{"value":71,"source":72,"evidence":73},"distributed-process","commenter",[74],{"id":75,"by":76,"text":77},"14440549","shadytrees","Great use of distributed-process and distributed-process-p2p! Being able to access service discovery and peer-to-peer communication as simple Haskell packages is kind of amazing.…",{"value":79,"source":72,"evidence":80},"distributed-process-p2p",[81],{"id":75,"by":76,"text":77},"open_source","unknown",{"praise":85,"objections":108,"requests":124,"questions":154,"alternatives":173},[86,101],{"value":87,"source":72,"evidence":88},"Clean, readable, approachable code",[89,93,94,98],{"id":90,"by":91,"text":92},"14441741","KirinDave","Okay. And your code is just very clean and approachable and doesn't try to do popular gymnastics. I'll ping you via GitHub.",{"id":64,"by":65,"text":66},{"id":95,"by":96,"text":97},"14440026","cocktailpeanuts","Thanks for sharing, the code looks very elegant. This alone makes me want to sit down and learn Haskell.",{"id":99,"by":91,"text":100},"14441523","Well uh, value judgements aside my reading of those code is that it is short, straightforward in its choices and generally quite good. I'm not sure what there is to be mad about.…",{"value":102,"source":72,"evidence":103},"Good introduction to blockchain and Haskell",[104,107],{"id":105,"by":91,"text":106},"14441562","I'm tempted to just make a youtube video going over this code line by line. It's a really great introduction to a non-trivial bit of Haskell.",{"id":64,"by":65,"text":66},[109],{"value":110,"source":72,"evidence":111},"No proof-of-work, so history can be rewritten; essentially a linked list",[112,116,120],{"id":113,"by":114,"text":115},"14440079","jstanley","I had a brief look through, and it looks like there's no proof-of-work in the mining? What stops somebody from rewriting history and passing it off as legitimate?",{"id":117,"by":118,"text":119},"14443818","runeks","A blockchain without a consensus algorithm is just a linked list.",{"id":121,"by":122,"text":123},"14444681","bernardlunn","My takeaway from this was to learn more about Literate Haskell. As somebody points out a Blockchain without a consensus mechanism is simply a linked list ie this is not really…",[125,135,146],{"value":126,"source":72,"evidence":127},"Add proof-of-work",[128,132],{"id":129,"by":130,"text":131},"14440391","18nleung","To implement rudimentary proof of work, you could add a nonce field and then force every block hash to start with a certain number of zeroes - I'll see what I can do and submit a…",{"id":133,"by":11,"text":134},"14440263","Correct, the goal for this was as minimal as possible. However, if I (or anyone wanting to contribute) can come up with a very compact way to implement that, we could definitely…",{"value":136,"source":72,"evidence":137},"Literate Haskell version",[138,142],{"id":139,"by":140,"text":141},"14441800","seanparsons","Would it make sense to make the code Literate Haskell?",{"id":143,"by":144,"text":145},"14442330","elviejo","A literate blockchain implementation?? YES please!!!",{"value":147,"source":72,"evidence":148},"Video or line-by-line walkthrough",[149,150],{"id":105,"by":91,"text":106},{"id":151,"by":152,"text":153},"14441776","tomcam","Please do",[155,163],{"value":156,"source":72,"evidence":157},"Meaning of the type equality squiggle in getBlockChain",[158,159],{"id":64,"by":65,"text":66},{"id":160,"by":161,"text":162},"14441248","eutectic","It is an equality assertion: https:\u002F\u002Fdownloads.haskell.org\u002F~ghc\u002F7.6.1\u002Fdocs\u002Fhtml\u002Fusers_guide\u002Fequality-constraints.html",{"value":164,"source":72,"evidence":165},"Why block hash concatenates four hashes",[166,170],{"id":167,"by":168,"text":169},"14443059","eemax","Neat. Just browsing through the source, is there a reason that: ``` calculateBlockHash (Block i p t b _) = concatMap hashString [show i, p, show t, b] ``` is not ```…",{"id":171,"by":11,"text":172},"14443096","You're correct, it really should be the 2nd way. The current form isn't really a problem per se, mostly just that the generated hashes are really long and make the output harder…",[174,180],{"value":175,"source":48,"evidence":176},"Naivechain (JavaScript blockchain)",[177],{"id":178,"by":11,"text":179},"14440384","I suggest you take a look at https:\u002F\u002Fgithub.com\u002Flhartikk\u002Fnaivechain, the original version of this work, written in JS",{"value":181,"source":72,"evidence":182},"Haskoin (Bitcoin implementation in Haskell)",[183],{"id":184,"by":185,"text":186},"14441146","SkyMarshal","In case you're not aware of it, also check out Haskoin, a Bitcoin implementation in Haskell. https:\u002F\u002Fgithub.com\u002Fhaskoin\u002Fhaskoin",{"comments":188,"answered":189,"key":190},15,6,[191,194,197],{"id":192,"text":193},"14441625","That would be awesome! Hopefully over time I (or anyone contributing) can spend a little more time making it as idiomatic as possible and beefing up the docs a little bit. Please…",{"id":195,"text":196},"14441937","I'm not familiar with Literate Haskell, what would that involve?",{"id":198,"text":199},"14442882","This is a cool idea. I would love to do this, but realistically won't have time for a little while. I can certainly look into it more when I get some spare time!",{"commenters":201,"max_depth":202,"maker_replies":188,"first_comment_mins":203,"lifespan_hours":34},36,7,42,[205,207,209,211,212,214,215,217,221,223,224,228,231,234,236,239,240,242,244,247,249,251,254,258,259,260,263,266,268,271,273,275,278,280,281,283,285,289,291,294,296,297,298,300,301,303,305,307,309,311,312,313,317,320,322,325,327,329,331,334,336,339,342,343,346,349,352,355,358,360,361],[105,33,18,206,91,33],"project\u002Fpositive\u002Fdocs",[192,33,33,208,11,40],"maker\u002Fneutral\u002Fnone",[90,33,18,210,91,33],"maker\u002Fpositive\u002Fexecution",[151,33,18,206,152,33],[139,33,43,213,140,33],"project\u002Fneutral\u002Fdocs",[195,33,33,208,11,40],[216,33,43,213,91,33],"14442202",[218,33,33,219,220,33],"14446836","commenter\u002Fneutral\u002Fnone","piaste",[222,33,43,213,144,33],"14442369",[143,33,18,206,144,33],[225,33,18,226,227,33],"14443046","project\u002Fpositive\u002Fidea","closeparen",[229,33,33,230,91,33],"14443278","other\u002Fneutral\u002Fnone",[232,33,33,230,233,33],"14444847","mrkgnao",[235,33,33,230,91,33],"14446423",[237,33,43,213,238,33],"14442639","pcthrowaway",[198,33,33,208,11,40],[241,33,43,213,91,33],"14443276",[243,33,33,219,238,33],"14447353",[245,33,33,246,91,33],"14449267","other\u002Fneutral\u002Fidea",[75,40,18,248,76,33],"project\u002Fpositive\u002Fexecution",[250,40,33,230,11,40],"14440641",[113,252,40,253,114,33],2,"project\u002Fcritical\u002Fidea",[255,252,43,256,257,33],"14440252","project\u002Fneutral\u002Fidea","empath75",[133,252,33,208,11,40],[129,252,43,256,130,33],[261,252,33,262,11,40],"14440418","maker\u002Fpositive\u002Fnone",[264,252,43,256,265,33],"14440393","terhechte",[267,252,33,219,11,40],"14440421",[269,252,33,219,270,33],"14440668","vog",[272,252,33,219,114,33],"14440796",[274,252,33,219,270,33],"14440942",[276,252,43,256,277,33],"14441179","SomeStupidPoint",[279,252,33,219,270,33],"14444359",[117,252,40,253,118,33],[167,43,43,282,168,33],"project\u002Fneutral\u002Fexecution",[171,43,33,284,11,40],"maker\u002Fneutral\u002Fexecution",[286,38,43,287,288,33],"14440345","project\u002Fneutral\u002Fdesign","greglindahl",[51,38,33,290,11,40],"maker\u002Fneutral\u002Fdesign",[292,38,33,230,293,33],"14441531","jboynyc",[295,38,33,230,288,33],"14441547",[64,18,18,206,65,33],[160,18,43,213,161,33],[299,18,43,282,65,33],"14441463",[68,18,33,284,11,40],[302,18,43,282,65,33],"14442086",[304,18,33,210,11,40],"14442113",[306,18,33,282,11,40],"14441707",[308,18,33,219,11,40],"14441458",[310,18,18,206,65,33],"14441560",[121,189,40,253,122,33],[184,202,43,256,185,33],[314,315,33,246,316,33],"14443340",8,"erikb",[318,315,33,246,319,33],"14443407","quchen",[321,315,40,253,114,33],"14443620",[323,315,33,246,324,33],"14447142","kaoD",[326,315,33,246,316,33],"14444210",[328,315,33,246,324,33],"14447164",[95,330,18,248,96,33],9,[332,330,33,230,333,33],"14440104","artursapek",[335,330,33,219,11,40],"14440267",[337,31,40,253,338,33],"14440344","hestefisk",[340,31,33,219,341,33],"14440363","codnee",[178,31,33,256,11,40],[344,31,43,213,345,33],"14441322","flavio81",[347,31,33,230,348,33],"14440638","solidsnack9000",[350,31,33,230,351,33],"14440707","aabaker99",[353,31,33,230,354,33],"14440978","Nullabillity",[356,31,33,230,357,33],"14441145","kcorbitt",[359,31,33,230,348,33],"14441723",[99,31,18,248,91,33],[362,31,33,230,118,33],"14443884",[],[365,370,375,379,384,389],{"id":366,"name":367,"points":368,"category":369},"14417340","ORY Editor",369,"web_saas",{"id":371,"name":372,"points":373,"category":374},"14440993","Pipes",280,"dev_tools",{"id":376,"name":377,"points":378,"category":20},"14447885","BuildMyVocab",225,{"id":380,"name":381,"points":382,"category":383},"14436381","Stretch",168,"consumer_social",{"id":385,"name":386,"points":387,"category":388},"14415126","µTT",115,"infrastructure",{"id":390,"name":391,"points":392,"category":393},"14444030","Programming with Escher",110,"learning_science",false,"v2",{"id":397,"name":5,"line":6,"ai":394,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":398,"top":18,"kw":399,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":400,"url":9,"mix":401,"praise":87,"objection":110,"sub":21},14439789,0.07,[24,25,26,27],"5553055033051033003130053305101050103005",[31,32,33,18],1794036555857]