TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Hacker News Readers as Progressive Web Apps

275 pointsby tbassettoabout 8 years ago

20 comments

andrewingramabout 8 years ago
It&#x27;s great that these examples have been collected in one place, but it&#x27;s an incredible leap to call this a spiritual successor to TodoMVC.<p>Fundamentally, every implementation is different at a UI level. They all have different designs, some have custom fonts. Some go directly to the Firebase source, whilst others go via an intermediate API. The scores that are being listed are affected by too many variables beyond the UI library for them to mean anything at all.<p>In addition, a spiritual successor to TodoMVC is going to have to reflect actual upcoming patterns in user interfaces. Things like shared element transitions, sound effects, perhaps some 3D effects, and numerous other things. Most HN clones don&#x27;t even allow write operations, even TodoMVC has that.
评论 #14382576 未加载
评论 #14383376 未加载
bluetechabout 8 years ago
All of the apps fail this test:<p>1. Go to main page. 2. Enter a long comments section. 3. Scroll down. 4. Hit back (back to main page again). 5. Hit forward (back to comments section).<p>Expected: Scroll position is restored.<p>Actual: Scroll position is not restored (most of them), back is broken (Svelte), scroll is some random place (Polymer).
评论 #14381498 未加载
zeptomuabout 8 years ago
What I find interesting is that subtle differences in load time have a great impact on the first impression. Furthermore loading animations seem to have an influence how one perceives performance - for me the non-loading animation pages seemed much faster (although the given latency numbers did not suggest such a big difference).
评论 #14380871 未加载
评论 #14380007 未加载
评论 #14381460 未加载
gwu78about 8 years ago
This is my &quot;Hacker News Reader&quot;. It converts HN to csv. (Only selected fields of interest to me.) From there it can easily be imported into kdb+. I have more reusable generalized lex techniques for other websites but HN is so simple it can be done via a braindead one-off as below.<p>Requirements: lex, cc<p>Usage:<p><pre><code> fetch -4o yc.htm https:&#x2F;&#x2F;news.ycombinator.com yc &lt; yc.htm </code></pre> To compile this I use something like<p><pre><code> flex -Crfa -8 -i yc.l; cc -Wall -pipe lex.yy.c -static -o yc; </code></pre> Save the text below as yc.l then compile as above.<p><pre><code> #define jmp BEGIN #define p printf #define x yytext %s aa bb cc dd ee ff gg hh %s ii jj kk ll mm nn oo aa &quot;span class=\&quot;rank\&quot;&quot; bb &quot;a href=\&quot;&quot; cc score_........ dd \&gt; &#x2F;* #include &lt;time.h&gt; *&#x2F; &#x2F;* #include &lt;util.h&gt; *&#x2F; %% [^\12\40-\176] , p(&quot;%2c&quot;); &#x2F;* rank (dont care) *&#x2F; {aa} jmp aa; &#x2F;* &lt;aa&gt;[1-9][^&lt;\.]* p(&quot;\n%s,&quot;,x);jmp bb; *&#x2F; &lt;aa&gt;[1-9][^&lt;\.]* p(&quot;\n&quot;);jmp bb; &#x2F;* url *&#x2F; &lt;bb&gt;{bb} jmp cc; &lt;cc&gt;http[^&quot;]* p(&quot;%s,&quot;,x);jmp dd; &#x2F;* title *&#x2F; &lt;dd&gt;{dd} jmp ee; &#x2F;* &lt;ee&gt;[^&gt;&lt;]* p(&quot;%s,&quot;,x);jmp ff; *&#x2F; &lt;ee&gt;[^&gt;&lt;]* p(&quot;%s&quot;,x);jmp ff; &#x2F;* host (omit) *&#x2F; &#x2F;* points (dont care) *&#x2F; &lt;ff&gt;{cc} jmp gg; &lt;gg&gt;{dd} jmp hh; &#x2F;* &lt;hh&gt;[1-9][^&lt;&gt; p]* p(&quot;%s,&quot;,x);jmp ii; *&#x2F; &lt;hh&gt;[1-9][^&lt;&gt; p]* p(&quot;,&quot;);jmp ii; &#x2F;* user *&#x2F; &lt;ii&gt;{bb} jmp jj; &lt;jj&gt;http[^&quot;]* p(&quot;%s,&quot;,x);jmp kk; &#x2F;* time (dont care) *&#x2F; &lt;kk&gt;{bb} jmp ll; &#x2F;* &lt;ll&gt;http[^&quot;]* ; *&#x2F; &lt;ll&gt;http[^&quot;]* jmp mm; &#x2F;* unix time (dont care) *&#x2F; &#x2F;* &lt;ll&gt;[1-9][^&lt;]* { time_t t0; time_t t1; time_t t2; t1=time(&amp;t0); t2=parsedate(x,&amp;t1,0); p(&quot;%d,&quot;,t2); jmp mm; } *&#x2F; &#x2F;* item *&#x2F; &lt;mm&gt;{bb} jmp nn; &#x2F;* &lt;nn&gt;http[^&quot;]* p(&quot;%s,&quot;,x);jmp oo; *&#x2F; &lt;nn&gt;http[^&quot;]* p(&quot;%s&quot;,x);jmp oo; &#x2F;* comments (dont care) *&#x2F; &lt;oo&gt;{dd} jmp oo; &#x2F;* &lt;oo&gt;[1-9d][^ &lt;]* p(&quot;%s&quot;,x);jmp 0; *&#x2F; &lt;oo&gt;[1-9d][^ &lt;]* jmp 0; . \n %% main(){ yylex();} yywrap(){ p(&quot;\n&quot;);}</code></pre>
评论 #14381518 未加载
评论 #14381771 未加载
TheAceOfHeartsabout 8 years ago
It&#x27;d be cool to see a version that allowed you to login and vote. Session management and all that entails can be really tricky to implement correctly, and it&#x27;s a frequently asked question with most frontend frameworks.<p>I haven&#x27;t read through each repo&#x27;s source yet, so take what I&#x27;m saying with a grain of salt. Glancing through each repo, only the Angular 2 version has tests. It&#x27;s pretty easy to write throw away code that works once and you don&#x27;t have to maintain long-term, so I&#x27;d advise caution in adopting patterns from these examples.
评论 #14380794 未加载
评论 #14380775 未加载
forgotmyhnaccabout 8 years ago
This is fantastic. todoMVC always lacked many features of standard apps, such as making an async request.<p>I wonder how fast a standard server side, non-JS version compares.
评论 #14380078 未加载
spocklivelongabout 8 years ago
Has anyone extensively used Preact? Would like to hear first hand experiences about any performance gains (or anything in general)
评论 #14381058 未加载
评论 #14384746 未加载
kohanzabout 8 years ago
Did the Svelte version hijack the back button for anyone else?
评论 #14380343 未加载
评论 #14380337 未加载
评论 #14380273 未加载
评论 #14380721 未加载
bennettfeelyabout 8 years ago
I&#x27;d like to see a comparison with old fashioned HTML and CSS.
评论 #14381865 未加载
jarek83about 8 years ago
When you click on Lighthouse for Vue.js the score is actually significantly worse: 78&#x2F;100<p>Why is that showing 93&#x2F;100 in the list?
MrAwesomeSauceabout 8 years ago
Genuinely can&#x27;t thank everybody for all the feedback. A lot of you mentioned that we&#x27;re not comparing apples to apples here, and you couldn&#x27;t be more right. I take full responsibility for this, and I really apologize if the site&#x27;s design made it look that way.<p>Each of the implementations were built at a completely different time by different authors and are not representative as official library implementations at all. In no way was it our intent to make it seem like a reference of performance comparison between the different libraries, so again I apologize if it comes across that way.<p>We do need to standardize each of the apps so that they can actually be compared, but until then we&#x27;ll need to make sure that things are more transparent. In the next few days we&#x27;ll add some changes to how we display each of the implementations for this [1].<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;tastejs&#x2F;hacker-news-pwas&#x2F;issues&#x2F;36" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tastejs&#x2F;hacker-news-pwas&#x2F;issues&#x2F;36</a>
11thEarlOfMarabout 8 years ago
It was kind of meta to click through each one to this same HN story. At least until Polymer, which displays an earlier first page. I suppose it should work that way, but it felt like I&#x27;d taken a wrong turn.
评论 #14380267 未加载
andrepdabout 8 years ago
They all look ugly, load slower, and consume more battery than a straight webpage, and they offer no discernible advantage or features.
评论 #14380572 未加载
acdhaabout 8 years ago
I especially liked the fact that although I have JavaScript disabled by default in Brave, I didn&#x27;t notice that at first for React, Preact, Svelte, and Viper because those degrade well.
kuonabout 8 years ago
Where is the elm version?
评论 #14380149 未加载
stefanwlbabout 8 years ago
This is really fascinating and informative. Thank you!
spankaleeabout 8 years ago
I wish these were ordered by speed.
tandavabout 8 years ago
React is worst.
r3blabout 8 years ago
I&#x27;m quite surprised that someone had enough will + time to develop seven implementations of the same thing.
评论 #14379986 未加载
pier25about 8 years ago
And again we see that React isn&#x27;t that great these days.
评论 #14382834 未加载
评论 #14381668 未加载