[{"data":1,"prerenderedAt":329},["ShallowReactive",2],{"project-36786239":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":73,"maker_in_thread":160,"shape":172,"grid":176,"attempts":292,"same_week":293,"maker_shows":33,"maker_hidden":321,"reader_version":322,"card":323},"36786239","gmi100","Gemini web client in 100 lines of C","title","Show HN: Gemini web client in 100 lines of C","https:\u002F\u002Fgithub.com\u002Fir33k\u002Fgmi100","github.com","ir3k",1689774378,2023,91,45,707,3109,23,"notable","dev_tools","command line client","cli",[24,25,26,27],"gemini protocol","gemini client","ansi c","command line browser","curious",0.013,{"positive":31,"neutral":32,"mixed":33,"critical":34},3,6,1,2,12,{"execution":37,"idea":38,"design":40,"docs":41},{"positive":34,"critical":33},{"positive":33,"critical":39},0,{"positive":39,"critical":33},{"positive":39,"critical":39},[33,39,31,31,39,39,39,43,39,31,39,39,39,43,43,31,39,39,39,39,39,31,39,39,39,39,39,39,39,39,39,31,39,39,33,39,39,39,39,31],5,"Gemini protocol documentation claims that it is possible to write basic web client in 100 lines of code proving protocol simplicity. Easy in modern scripting language but can it be done in ANSI C? Let the source code decide.\n\nSomeone suggested to share this silly project of mine with HN community so here it is. Enjoy",{"problem":46,"audience":52,"pricing":52,"motivation":53,"time_to_build":52,"stack":57,"openness":70,"stage":71,"team_size":72},{"value":47,"source":48,"evidence":49},"Shows that a basic Gemini protocol web client can be written in 100 lines of ANSI C","maker",[50],{"id":51},"post",null,{"value":54,"source":48,"evidence":55},"Test whether the Gemini protocol's claim of 100-line clients holds in ANSI C",[56],{"id":51},[58,62],{"value":59,"source":48,"evidence":60},"C",[61],{"id":51},{"value":63,"source":64,"evidence":65},"OpenSSL","commenter",[66],{"id":67,"by":68,"text":69},"36789580","snvzz","Nice, except the dependency on openssl. It would have been a great opportunity to use BearSSL[0]. 0. https:\u002F\u002Fbearssl.org\u002F","open_source","launched","solo",{"praise":74,"objections":89,"requests":115,"questions":131,"alternatives":147},[75,82],{"value":76,"source":64,"evidence":77},"Impressive density and readability of code",[78],{"id":79,"by":80,"text":81},"36788453","sjmulder","Impressive, the code is dense but not too hard to follow. And you even managed to cram in history!",{"value":83,"source":64,"evidence":84},"Clever funnel-based goto control flow",[85],{"id":86,"by":87,"text":88},"36791203","__s","Nice to see someone else fall upon what I call funnel-based control flow, as opposed to stack-based control flow of most programs using functions. I used the same pattern in…",[90,97,104,108],{"value":91,"source":64,"evidence":92},"Resource leaks and buffer overflows in the code",[93],{"id":94,"by":95,"text":96},"36790633","pobrn","It's a nice project, but - I guess as is tradition with the majority of C projects - it has resource leaks and buffer overflows. There is at least one resource leak, namely,…",{"value":98,"source":64,"evidence":99},"Code is very hard to read",[100],{"id":101,"by":102,"text":103},"36791145","sbjs","This is the most unreadable code I may have ever seen. Congrats on successfully writing it and getting it to work.",{"value":105,"source":64,"evidence":106},"Depends on OpenSSL rather than a lighter TLS library",[107],{"id":67,"by":68,"text":69},{"value":109,"source":64,"evidence":110},"Described as a web client when it is a command line client",[111],{"id":112,"by":113,"text":114},"36788378","Narishma","What do you mean by web client? From the github it looks more like a command line program.",[116,124],{"value":117,"source":64,"evidence":118},"Use BearSSL or abstract the TLS layer",[119,120],{"id":67,"by":68,"text":69},{"id":121,"by":122,"text":123},"36791839","cryo","Is BearSSL still actively maintained? My approach is abstracting SSL away so the API can be exchanged wit OpenSSL, MbetTLS, etc.",{"value":125,"source":64,"evidence":126},"Replace comma-operator tricks with clearer code",[127],{"id":128,"by":129,"text":130},"36789738","jeremycw","https:\u002F\u002Fgithub.com\u002Fir33k\u002Fgmi100\u002Fblob\u002Fmaster\u002Fgmi100.c#L27 definitely threw me for a loop until I realized it was a line saving trick. It would be more readable to save lines…",[132,139],{"value":133,"source":64,"evidence":134},"Does it compile on OpenBSD",[135],{"id":136,"by":137,"text":138},"36792913","anthk","I remember gplaces, but it doesn't compile under OpenBSD. It needs lots of fixes to be built on systems beside GNU\u002FLinux. On golang, Bombadillo today supports \"images\" with…",{"value":140,"source":64,"evidence":141},"What does the project actually do",[142,143],{"id":112,"by":113,"text":114},{"id":144,"by":145,"text":146},"36795700","keepamovin","This is cool. I asked ChatGPT4 to explain to me what it does, and it gives a useful overview: This is a minimal Gemini protocol client written in C. The Gemini protocol is an…",[148,152,156],{"value":149,"source":64,"evidence":150},"Bombadillo",[151],{"id":136,"by":137,"text":138},{"value":153,"source":64,"evidence":154},"Amfora",[155],{"id":136,"by":137,"text":138},{"value":157,"source":64,"evidence":158},"gplaces",[159],{"id":136,"by":137,"text":138},{"comments":161,"answered":33,"key":162},11,[163,166,169],{"id":164,"text":165},"36791217","This is such a great feedback. Thank you a lot. OFC I will try to correct my mistakes. Not to make any excuses, just for the context. I'm a beginner in C programming and I wrote…",{"id":167,"text":168},"36849947","I looked into those points and: 1. `sfd` is now closed. This cost me an extra line of code tho so I had to improvise. 2. `j` was not initially -1 as even empty input contains one…",{"id":170,"text":171},"36797113","Yes, that was my reasoning. Also there is non-written rule in this project that forbids me from going wider than 80 columns. With that I initially had indentation set to 2 spaces…",{"commenters":173,"max_depth":32,"maker_replies":161,"first_comment_mins":174,"lifespan_hours":175},26,123,122,[177,179,181,184,188,192,196,198,200,204,206,208,211,213,215,218,219,221,224,227,229,231,234,237,239,242,244,247,250,253,256,259,261,263,265,268,270,271,273,276,278,281,285,288,290],[94,39,33,178,95,39],"project\u002Fcritical\u002Fexecution",[164,39,39,180,11,33],"maker\u002Fpositive\u002Fnone",[182,39,31,183,137,39],"36792947","maker\u002Fneutral\u002Fexecution",[185,39,31,186,187,39],"36793621","maker\u002Fneutral\u002Fnone","lelanthran",[189,39,39,190,191,39],"36795300","commenter\u002Fneutral\u002Fnone","onsclom",[193,39,39,194,195,39],"36796612","commenter\u002Fneutral\u002Fdocs","JNRowe",[167,39,39,197,11,33],"maker\u002Fpositive\u002Fexecution",[86,33,43,199,87,39],"project\u002Fpositive\u002Fidea",[201,34,39,202,203,39],"36794321","other\u002Fneutral\u002Fnone","kazinator",[170,34,39,205,11,33],"maker\u002Fneutral\u002Fdesign",[128,31,31,207,129,39],"project\u002Fneutral\u002Fdesign",[209,31,39,210,11,33],"36789827","maker\u002Fpositive\u002Fdesign",[136,212,39,202,137,39],4,[214,212,39,186,11,33],"36793601",[216,212,43,217,137,39],"36794469","project\u002Fpositive\u002Fexecution",[79,43,43,217,80,39],[112,32,31,220,113,39],"project\u002Fneutral\u002Fdocs",[222,32,39,223,11,33],"36788465","maker\u002Fneutral\u002Fdocs",[225,32,39,194,226,39],"36788816","ploum",[228,32,39,194,113,39],"36790193",[230,32,39,223,11,33],"36790243",[232,32,39,194,233,39],"36791234","hombre_fatal",[235,32,39,190,236,39],"36796066","chlorion",[238,32,31,220,80,39],"36788487",[240,32,39,194,241,39],"36789422","6581",[243,32,39,194,80,39],"36789816",[245,32,39,194,246,39],"36790028","hollerith",[248,32,39,190,249,39],"36793026","gkbrk",[251,32,39,252,11,33],"36793630","project\u002Fneutral\u002Fnone",[254,32,39,190,255,39],"36789692","lolinder",[257,32,39,190,258,39],"36789967","slondr",[260,32,39,190,255,39],"36793842",[262,32,39,190,113,39],"36802305",[264,32,39,190,255,39],"36802594",[67,266,31,267,68,39],7,"project\u002Fmixed\u002Fdesign",[269,266,39,205,11,33],"36789645",[121,266,39,190,122,39],[272,266,39,190,68,39],"36791888",[101,274,33,275,102,39],8,"project\u002Fcritical\u002Fdesign",[277,274,39,205,11,33],"36791331",[279,274,39,202,280,39],"36792341","eesmith",[282,283,39,202,284,39],"36790696",9,"marginalia_nu",[286,283,39,202,287,39],"36793960","dvorak_typist",[144,289,31,220,145,39],10,[291,289,39,223,11,33],"36797158",[],[294,299,304,309,313,317],{"id":295,"name":296,"points":297,"category":298},"36707877","Free Music Demixer",190,"creative",{"id":300,"name":301,"points":302,"category":303},"36750083","Automorphic",174,"ai",{"id":305,"name":306,"points":307,"category":308},"36754366","youpay",143,"infrastructure",{"id":310,"name":311,"points":312,"category":308},"36788210","Infisical",131,{"id":314,"name":315,"points":316,"category":308},"36758292","Peeng",84,{"id":318,"name":319,"points":320,"category":20},"36738295","PikaTorrent",65,false,"v2",{"id":324,"name":5,"line":6,"ai":321,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":325,"top":18,"kw":326,"maker":11,"domain":10,"tier":19,"attempts":39,"strip":327,"url":9,"mix":328,"praise":76,"objection":91,"sub":21},36786239,0.01,[24,25,26,27],"1033000503000553000003000000000300100003",[31,32,33,34],1793991069716]