Websocket Shootout: Clojure, C++, Elixir, Go, Node.js, and Ruby - <AUTHOR> https://hashrocket.com/blog/posts/websocket-shootout <comment><USER2> Phoenix creator here. At the very least, this post needs to include the following points:

\- Phoenix Channels is a higher-level abstraction over raw WS. We spawn isolated, concurrent "channels" on the underlying WebSocket connection. We monitor these channels so that clients can detect errors and recover automatically without dropping the entire connection. This contributes to overhead in both memory and throughput, which should be highlighted with how Phoenix faired in the runs.

\- Phoenix channels runs on a _distributed pubsub_ system. None of the other contestants had a distribution story, so their broadcasts are only node-local implementations, where ours is distributed out of the box

Phoenix faired quite well in these runs, considering we are comparing a robust feature set vs raw ws/pubsub implementations.

<comment><USER3> All interesting points. Even without them, Phoenix does great in this benchmark.

My takeaways from this article were:

1) Phoenix and Rails are clear winners on API.

2) Rails performance is unacceptable, which makes its nice API irrelevant.

3) All others are good enough that if I wanted to choose them for other reasons, this article wouldn't stop me.

</comment></comment><comment><USER4> Some discussion on the elixir subreddit a few days ago: [https://www.reddit.com/r/elixir/comments/50nvhg/websocket_sh...](https://www.reddit.com/r/elixir/comments/50nvhg/websocket_shootout_clojure_c_elixir_go_nodejs_and/)

Of note is that of these, I think only the elixir and ruby (?) solutions are distributed. Additionally, Phoenix channels are doing a lot of work that the other solutions aren't.

</comment><comment><USER5> Should have used [https://github.com/uWebSockets/uWebSockets](https://github.com/uWebSockets/uWebSockets) for Node.js, if performance was the objective.

<comment><USER6> There's a lot that could be improved about the Node one.

The library and the the lack of clustering (so you can compare apples to apples) are the main two.

Honestly? Running at 39% of the connections on one core is pretty impressive. Especially with its low memory footprint.

<comment><USER7> I'm not a node.js dev so I might be wrong here, but I imagine clustering would complicate the broadcast, no? I was under the impression that communication between the nodes of the cluster can be a pain.

<comment><USER8> In a way yes, you'd need a control channel to centralize the broadcast to the other processes. In more common use cases, Redis is used in conjunction with node for these types of things. There are relays for redis with sockjs, socket.io and others to make the setup/configuration a bit easier to work with.

</comment></comment></comment></comment><comment><USER9> Nice article. Not trying to start a subjective debate on languages/ technologies, but it did seem odd they would include a language like ruby but not python, c#, or java / scala.

<comment><USER10> I mostly thought it was odd that of all of the JVM languages they included it was Clojure. Ruby sort of makes since given that Rails recently included ActionCable.

<comment><USER11> Yeah, not having Scala or Java but having Clojure was strange to me. I would be curious to see how a CLR language (C# or F# mainly) fares relative to the JVM.

<comment><USER12> I think C# would have done well, based on IOCP.

</comment></comment></comment></comment><comment> chaotic-good With C++ one can go far further than that. It's the matter of time spent on the solution. With all that other languages there is a performance ceiling that can't be breached.

</comment><comment><USER13> Is single threaded node was 39% I wonder how a clustered node app would compare.

<comment><USER6> Plus with an efficient lib as well. They certainly didn't use a very performant one.

</comment></comment><comment><USER14> Odd there were no mention of Java.

Both high speed and simple to develop :

[http://docs.spring.io/spring/docs/current/spring- framework-r...](http://docs.spring.io/spring/docs/current/spring-framework- reference/html/websocket.html)

[https://spring.io/guides/gs/messaging-stomp- websocket/](https://spring.io/guides/gs/messaging-stomp-websocket/)

</comment><comment><USER15> Using the cluster module for nodejs will make it almost the fastest and when we add activities like reading from a database nodejs asynchronous pattern beats everybody

<comment><USER16> ahem, apart from C++

<comment><USER17> Citation needed. Not that i object to the fact that c++ is usually faster :)

<comment><USER16> That was the citation :-)

Seriously though, Node is written in C++ and is a single threaded interpreted / Jitted / Garbage Collected Virtual Machine which has to jump through trampolines and layers of abstraction to call system services.

While it might be very efficient at what it does, it isn't as close to the machine as a native C++ application.

One asynchronous WebSocket server written in C++ can run rings around one Node WebSocket server.

If the premise is that to mitigate this we can set up an entire cluster of node servers that will beat the C++ server, it follows that we can set up an entire cluster of C++ servers that would be even faster.

C++ is faster in every regard. There is no "usually", about it.

If we are talking about some metric like programmer productivity, sure sometimes it takes more effort to write code in C++ to achieve what may take a single line in Node.

<comment><USER17> Ok let me rephrase: The speed benefit of C++ not always matters. At Google scale, sure. For most intents and purposes, probably not.

Otherwise, totally agreed.

<comment><USER16> I use node quite a lot, mostly for prototyping, demos and where I just plain don't have the time or need to use something else. I have no problem with node as an application development platform.

Right tool for the right job is fine

The trick is to minimize aggregate kWh of energy use per unit task. Sometimes that means ordering a take out, and occasionally baking a pie.

A lot of the time I'm in the position of buildng upstream tools and platforms for people downstream, so whatever I do has a direct impact on their performance. The way I look at it is it is my duty to make them look good.

I do take that a little far though on occasion. Shipping is a feature too of course. Heh.

</comment></comment></comment></comment></comment></comment><comment><USER12> "C++ offers the best performance ..."

Yep

<comment><USER8> At the cost of the most complex implementation.</comment></comment>


Why Covid-19 may be less common in children than adults - <AUTHOR> https://www.sciencedaily.com/releases/2020/05/200521104653.htm <comment><AUTHOR> Original paper: [https://jamanetwork.com/journals/jama/fullarticle/2766524](https://jamanetwork.com/journals/jama/fullarticle/2766524)</comment>


GitHub is returning 502 - <AUTHOR> https://github.com <comment><USER2> Looking forward to the post mortem. GitHub tends to have informative ones, and it's been a while since their site has gone down so it's probably an interesting problem.

</comment><comment><USER3> Yup its having issues [https://www.githubstatus.com/](https://www.githubstatus.com/)

</comment><comment><USER4> Happy New Year!

<comment><USER5> Obviously a Y2K(+19) bug

</comment></comment><comment><USER6> Now API and Gists are out.

</comment><comment><AUTHOR> seems to be back up now.

</comment><comment><USER4> There are 4 posts on the HN homepage that links to github.com. All of them are leading to the page with unicorn.

</comment><comment><USER7> Back. Wonder what went wrong.

</comment><comment><USER8> > refreshing hn when github goes down

</comment><comment><USER9> need to update compiling excuse, [https://xkcd.com/303/](https://xkcd.com/303/)</comment>


Generation Later, Poor Are Still Rare at Elite Colleges - <AUTHOR> http://www.nytimes.com/2014/08/26/education/despite-promises-little-progress-in-drawing-poor-to-elite-colleges.html <comment><USER2> One problem is that the poor and highly qualified are mostly white kids from flyover country and to a lesser extent recent Asian immigrants, both of which are ethnic anti-priorities for colleges.

<comment><USER3> Hey fiatmoney. I think you're concerned about some thing that a lot of people don't vocalize civilly, so I'm glad that you are.

Though I don't work in admissions, I work alongside a number of people of that do.

I've gone out of my way to ask about those "white kids from flyover country". I will elaborate on those of my alma mater here.

Very few kids from rural school districts perform highly on standardized testing. Very few receive the encouragement (familial and cultural) to go to high-quality, distant schools. If you want to hear some horror stories about this from me, shoot me an email. I'd be happy to share them in private.

Point being that even within its state, my large public school struggles to recruit from its rural parts.

Contrary to what you assume, they actually do employ recruitment and affirmative action policies towards to the exact folks you're talking about -- predominantly poor and culturally disadvantaged rural people who are predominantly white.

<comment><USER4> I'm interested in hearing a few of these stories.

<comment><USER5> Well, I was a poor white kid from flyover country. I slacked off all through high school while hating the cruelty and boredom, and did my best to get terrible grades. I knew nothing about test-prep, and buying a Kaplan book would have been a stretch. But my HS's counselor gave me a SAT fee waiver so I took the test and got near-perfect scores.

That made me feel like I should apply to good schools, and I liked Thai food and the New Yorker mag so I applied to Columbia. I wrote them an admissions essay about living in an Indian tipi and having a single mom, and submitted an application photo of me standing in front of my tipi. CU admissions ate that up and the rest is history.

However, I did have a supporting, loving, literate mother and I avoided becoming a meth addict/pot smoking loser. Both of those things really help avoid small-town stagnation.

<comment><USER6> Well now we need to see the photo. Good story.

<comment><USER5> Unfortunately that photo was on a spinning-platter hard drive and I knew nothing about backups. Of course it's still on one of Columbia's servers somewhere but liberating it would involve an unbelievable amount of red tape.

</comment></comment></comment></comment></comment></comment><comment><USER7> Poor people are likely as rare in elite Silicon Valley investor portfolios.

The vast majority of investors today are from upper middle class backgrounds and educations. We know this isn't based on merit because they're almost universally bad at investing. But who makes the decision to invest in VCs? It's LP money managers with almost identical backgrounds.

<comment><USER4> Investing in poor people who are bad at managing their own money or improving their lot in life is probably not going to get you very good returns.

All joking aside. Upper middle class families are more likely to value, encourage and afford personal computers for their kids. That's what got me into programming. I started using my dad's computer too much when he had to work, so he bought the parts and a friend and I built my first computer at 14 with an awesome Riva TNT2 Ultra graphics card.

<comment><USER8> > Upper middle class families are more likely to value, encourage and afford > personal computers for their kids.

Afford, sure. Value and encourage? I'd say they're more likely to demonize personal computers than to encourage them. My mom recently bought laptops for my little brother and sister, but she can't stand that they want to use them.

Among the middle class, computers for children have become yet another parenting moral panic: [http://www.penny- arcade.com/comic/2014/06/30](http://www.penny-arcade.com/comic/2014/06/30)

</comment></comment></comment><comment><USER9> Question for the Americans: Does it really matter if you go to an "elite" college or a regular one? Where I'm from, about 8 universities offers roughly comparable Bc.S and Ph.D engineering programs. I'd guess that roughly 90% of the study material is the same. It's the same in many EU countries. No one, but an idiot, would claim that an engineer who studied in Luleå is more qualified than one who studied in Lund because of their choice of schools.

But in the US, if you graduated from (expensive) school X you are objectively more qualified than if you graduated from (cheaper) school Y?

Or if university programs are supposed to be equivalent across universities, cant you just lie and say you went to a brand-name university? Because it doesn't seem fair that someone who couldn't afford an expensive university should have his or her whole career retarded just because of that.

<comment><USER10> > Question for the Americans: Does it really matter if you go to an "elite" > college or a regular one?

One of the best engineers I know went to DeVry, which is definitely on the lower tier of schools. And I know a few great programmers that don't even technically have engineering degrees.

That being said, if I had to roll the dice I'd put my money on an MIT, Berkeley, or Caltech grad any day. The minimum standards, your peer group, and your opportunities are much better at an elite school. There are crappy grads from 'elite' schools, but the odds of this are a lot lower. And if you have a lot of talent, you're going to get noticed at the elite schools and have a much easier time finding a way to use your talent than at a lower-tier school.

<comment><USER9> But why are you contradicting your own anecdote? Do you have any evidence to believe "elite" university graduates are more competent? Seems to me like you and the sibling comments who also would pick the "elite" graduates could influenced by marketing.

But in the real world you don't have to roll the dice. You can ask applicants what courses they took and what their grade scores were. So if you had two applicants with the same grades in front of you, would you still pick the one that went to a brand name university?

<comment><USER10> > Do you have any evidence to believe "elite" university graduates are more > competent?

I guess I'm talking about the difference between a strict rule and playing the odds.]

> You can ask applicants what courses they took and what their grade scores > were. So if you had two applicants with the same grades in front of you, > would you still pick the one that went to a brand name university?

With no other data, yeah, I'd pick the guy who graduated from MIT with great grades over the DeVry guy with the same grades. But of course my job during hiring is to try to acquire more data, and I swear I tried really, really hard, and sometimes it made the difference.

</comment></comment></comment></comment><comment><USER11> Given that funding for elite colleges is largely about social signaling, if the poor and rich were fairly represented by ability in these colleges, wouldn't the rich move their money out and set up new elite colleges?

<comment><USER12> This is really interesting. It would be great to see how this plays out, as there are "menu effects" and "reputation effects", intertia and such that would make it awkward to have society make this change without people publicly admitting what they are doing.

<comment><USER11> This might be why you end up getting colleges within colleges within colleges. They are like a kind of social power fractal, that becomes crystallized in brick over time.

</comment></comment></comment><comment><USER13> > Sustaining one poor student who needs $45,000 a year in aid requires $1 > million in endowment devoted to that purpose

I don't see how this makes sense. Why does it require over 5x of what you would expect by multiplying cost per year times number of years??

<comment><USER14> The endowment is invested, and the dividend supports the student. This quote assumes a 4.5% yearly return on investment. If the institution spent the endowment directly, they would shortly no longer have it.

</comment></comment><comment><USER15> Shouldn't we be more concerned with the frequency of poor people becoming not poor? Frankly, I'm not convinced that going to college, potentially accumulating debt, and not having a guarantee of a job is really the best strategy for someone near or below the poverty line. Perhaps there are other avenues available that promise or at least offer positive outcomes that don't require a college education.

</comment><comment><USER16> The problem should not fall on colleges - if someone grew up poor and that held them back then sadly I think it is too late for them - colleges should not have to reach down. Assistance needs to begin way before poverty stricken kids apply for college!!!! That's why I think we need more programs like Head Start.

P.S. Teacher pay needs to increase while at the same time teachers must be tested for competency.

</comment><comment><USER17> I still feel offended that my alma mater, Washington University in St. Louis, is not need-blind despite its $5.7 Billion endowment.

<comment><USER18> Wash U alum here. I agree: unacceptable.

I believe Wash U uses the term "need-aware." It aggressively recruits based on "merit" at the cost of socioeconomic diversity. While I was attending, Wash U had the most National Merit Finalists, largely because those students get at bare minimum a $2k/yr scholarship for showing up.[1]

On the one hand, this has resulted in a significant increase in the standardized test performance of its student body [2]--and that has probably resulted in higher rankings overall. On the other hand, there's a simulated environment quality to being around people who are all so similarly well off. For example, every student from a 150k+ income family thinks of his/herself as middle class. Not much perspective.

[1] [http://www.nationalmerit.org/annual_report.pdf](http://www.nationalmerit.org/annual_report.pdf)

[2] [http://www.businessinsider.com/colleges-with-the-highest- sat...](http://www.businessinsider.com/colleges-with-the-highest-sat- scores-2014-8?op=1)

</comment></comment><comment><USER19> Thanks god. Last thing we need is actual meritocracy where people can cross class boundaries with hardwork and a bit of cunning.

Harvard and Princeton are rubber stamp universities for the elite. GW Bush graduated from Harvard.

<comment><USER20> Quite a few nobel laureates are also associated with Harvard. [1] I'm sure one could cherry pick rich jokers from virtually any school.

[1] [http://www.harvard.edu/nobel-laureates](http://www.harvard.edu/nobel- laureates)

</comment></comment><comment><USER21> What really matters: Are the most capable getting into elite colleges?

<comment><USER22> What really matters: Actually reading the article.

The entire point, beginning with the very first paragraph...

 _" This is despite the fact that there are many high school seniors from low- income homes with top grades and scores: twice the percentage in the general population as at elite colleges."_

...is that these students are completely capable, yet underrepresented with the cited studies bearing that out in good detail.

<comment><USER4> Elite colleges are overrated and overpriced for bachelors degrees. It's different if you're getting a masters degree but for the most part you learn the same basics in a bachelor degree at any accredited school. Maybe they are doing the smart thing by choosing schools with a better value per dollar.

<comment><USER23> If you're poor, the most elite colleges are either free or nearly free. Some avoid using debt at all in financial aid.

The most elite colleges can be a better deal than a state school.</comment></comment></comment></comment>


To Rescue Economy, Japan Turns to Supermom - <AUTHOR> http://www.nytimes.com/2015/01/02/business/international/in-economic-revival-effort-japan-turns-to-its-women.html

<comment><USER2> I see it quite often over here. I work in a private school that teaches both English and Japanese, quite often I have seen newly married women discriminated against.

I have seen one fired due to morning sickness making her late (meanwhile the class was doing quite fine with 2 other teachers in there, and myself helping out when I was able).

As for the extended hours, what they don't mention is their frequently expected to be unpaid. The amount of pressure I have received because I only do about 6 hours a week in unpaid overtime is quite surprising.

My wife was also recently told at work that they would not offer her a full time position because we were married recently, and they didn't want to risk her taking leave. Yet they kept her on for another 9 months on an hourly scale costing them more. Figure that one out. (She ended up leaving due to some of the managers and how they treated her and the other women, while PR did what they do best - looked after the managers).

Despite all that I do love it here :-) I can certaibtly see how Japanese companies are struggling, the management culture is quite acidic to keeping staff, as well as running a business efficiently (at least in my field, I'd imagine its not too much different in others through from what I have heard from other friends working in Japan).</comment>


"Seems like the type of job where you're only noticed when you make a mistake" - <AUTHOR> https://www.afforded.space/only-noticed-when-you-make-a-mistake/ <comment><USER2> It is the culture that creates this attitude, and can span any type of work.

<comment><AUTHOR> Agree, culture is perhaps the elephant in this room.

</comment></comment><comment><USER3> While it may not be a good idea for an individual to do this type of job, it can be quite lucrative for a business.

If you're a business that can get its products embedded into the "default procedure" of your customers and only get noticed if you don't work (e.g. Stripe, Twilio, AWS, etc.), customer churn is minimized and continued revenue is the default.

<comment><AUTHOR> Totally. Interesting parallel I hadn't considered. Set-it-and-forget-it SaaS is a sweet place to be :)</comment></comment>


Ask HN: User authentication in web frameworks - <AUTHOR> I have worked with couple of web frameworks and have realised that user authentication is something which is common in most of the web apps. In my case, I ended up rewriting the user authentication module from scratch while developing a new web app. Is there any boilerplate code available for this specific task in different frameworks(for example flask, django), which is flexible enough to be used in different web apps? Or is there any library which makes this task easier? I would really like to see a repository containing example code for user authentication in different frameworks. <comment><USER2> Little late to the party but have you considered using something like an authorization server?

We created Anvil Connect (based on OAuth 2.0 and OpenID Connect) to solve a bundle of auth-related problems all at once. It's a separate server instead of a library, because once you need to share user accounts between several apps (think different platforms) the complexity increases dramatically. There are (third party) client libraries available for a number of languages.

[https://github.com/anvilresearch/connect](https://github.com/anvilresearch/connect)</comment>


Mission and marketing in computer science degrees - <AUTHOR> https://www.cs.kent.ac.uk/people/staff/srk21/blog/2020/05/26/#marketing-speak-in-cs-programmes <comment><USER2> As a Kent 2010 CS grad, I can compare the module names.

OOP and Functional programming remains

Foundations of computing (maths) remains

"Algorithms, Data Structures and Complexity" is tweaked into two modules

"Computers and the Cloud" replaces "Distributed Systems and Networks"

"Web Development" replaces "Dynamic Web"

Not sure where "Operating Systems and Architecture" has gone? That's pretty important

The universally hated "Managers and Organisations" and "Information Systems" are gone, so that's good news.

Yes some marketing terms have crept in, but I'm not sure much has really changed. Correct me if I got the wrong message, but he seems focussed on the unfortunate financial situation Kent is in. I think there's been a gradual change towards money and away from teaching and research since 2007, when tuition fees started rapidly increading in the UK. I haven't checked, but I wouldn't be surprised if most UK CS courses also have buzzwords in them now.</comment>


Snapchat Introduces Context Cards - <AUTHOR> https://www.youtube.com/watch?v=Kn4KUvDzQFg <comment><USER2> It requires a good application to edit and work our images that we place on our website for it I use canva, with which I identify</comment>


The West Wing on privacy (1999) - <AUTHOR> http://www.youtube.com/watch?v=pj4PwyfDNuI http://www.imdb.com/title/tt0745704/<p>I'm amazed at how accurate this scene from 1999, 14 years ago, predicted today. <comment><USER2> I always loved this scene from that episode discussing if the 4th amendment includes an implied right to personal privacy:

SAM In 1787, there was a sizable block of delegates who were initially opposed to the Bill of Rights. One member of the Georgia delegation had to stay by way of opposition: 'If we list the set of rights, some fools in the future are going to claim that people are entitled only to those rights enumerated and no longer. The framers knew...'

HARRISON Were you just calling me a fool, Mr. Seaborn?

SAM I wasn't calling you a fool, sir, the brand new state of Georgia was.

<comment><USER2> Adding a bit: Here is a real quote from Alexander Hamilton. Less pithy but more powerful.

"I go further, and affirm that bills of rights, in the sense and in the extent in which they are contended for, are not only unnecessary in the proposed constitution, but would even be dangerous. They would contain various exceptions to powers which are not granted; and on this very account, would afford a colourable pretext to claim more than were granted. For why declare that things shall not be done which there is no power to do? Why for instance, should it be said, that the liberty of the press shall not be restrained, when no power is given by which restrictions may be imposed? I will not contend that such a provision would confer a regulating power; but it is evident that it would furnish, to men disposed to usurp, a plausible pretence for claiming that power. They might urge with a semblance of reason, that the constitution ought not to be charged with the absurdity of providing against the abuse of an authority, which was not given, and that the provision against restraining the liberty of the press afforded a clear implication, that a power to prescribe proper regulations concerning it, was intended to be vested in the national government. This may serve as a specimen of the numerous handles which would be given to the doctrine of constructive powers, by the indulgence of an injudicious zeal for bills of rights."

[http://press- pubs.uchicago.edu/founders/documents/bill_of_ri...](http://press- pubs.uchicago.edu/founders/documents/bill_of_rightss7.html)

</comment></comment><comment><AUTHOR> [http://www.imdb.com/title/tt0745704/](http://www.imdb.com/title/tt0745704/) 1999\. Amazing.</comment>


Bioengineers in the Netherlands are now growing meat in a laboratory - <AUTHOR> http://www.ft.com/intl/cms/s/2/87bf2654-89b3-11e1-85af-00144feab49a.html#axzz1se7I7IYx

<comment><USER2> I am no vegetarian, but after reading about mechanically separated meat, washed with ammonia, infused with "flavor," and formed into common products like pepperoni, I would rather have my low-grade meat be lab-grown.

Reference: <http://en.wikipedia.org/wiki/Mechanically_separated_meat> [http://www.foodsafetynews.com/2012/04/whats-the-deal-with- tu...](http://www.foodsafetynews.com/2012/04/whats-the-deal-with-tuna-scrape/)

<comment><USER3> For the past 60 years, when people defended women's rights in smalltalk they would often start with "I'm no feminist, but..."

Lately I've noticed an increased usage of the phrase "I'm no vegetarian, but...". Hopefully that's a sign that public awareness of the problems of industrial meat production may be nearing a critical mass, as eventually happened with the issues raised by Feminist movements.

</comment></comment><comment><USER4> I can imagine this going over well with people that want to eat meat, but don't really want to kill animals. I could see them paying twice as much for a steak produced this way.

Then, as it becomes cheaper and cheaper, it will become the norm for meat. Eventually "real" meat from animals will be the the luxury item.

<comment><USER5> I would pay twice as much for artificial meat that doesn't involve killing an animal, in a heartbeat. Being responsible for the deaths (often in abhorrent circumstances) of so many living creatures is simply difficult to swallow (pun ftw!). That said, there's a big if:

I would pay twice as much in a heartbeat, so long as the artificial meat tasted indistinguishable or close enough to the real thing. That means texture, juiciness, taste, consistency, etc.

I wouldn't pay anything for, for example, quorn.

I'm a meat-eater despite disliking killing so many animals because I love the taste of meat more than I dislike the killing.

<comment><USER6> Research and experience show that of all the people who say this (I would pay X more for animal-friendler meat), few follow through. I pay around 25% more for meat that is produced with the animals having better lives and the relative amount of such products available does not line up with the amount of people that _say_ they would buy it.

<comment><USER7> The full statement is probably "I would pay X more for animal-friendlier meat if it was sitting next to the animal-unfriendly meat on the supermarket shelf". Not an indictment per se but it usually takes a lot of work on the producer and consumer side of the equation to effect real change in people's habits.

<comment><USER8> And if someone trustworthy has verified the animal-friendliness, because otherwise sham self-certification by factory farms is sure to predominate.

</comment></comment></comment></comment></comment><comment><USER9> The way we treat our meat we might as well grow it in a lab. I love a good chicken as much as the next guy, but when you blast it with chemicals, drugs, and then freeze it for a few days, unfreeze it, freeze it again, and then finally shove it in my salad it doesn't taste any different than if you grew it in lab.

At least we can engineer the lab grown stuff to taste good after you beat the flavor out of it.

</comment><comment><USER10> A slightly off-topic question this brings up in my mind - considering the current availability of multivitamin pills, protein + carbohydrate bars / shakes, various iron/mineral supplements, is it not possible to sustain yourself using just engineered products? Without having to buy the staple food we currently do (breads, meats, salads).

From reading the article, it seems we're still a fair bit off lab grown food - but certainly for future generations it may just be the norm.

<comment><USER11> I am not a nutritionist, but my understanding from reading a bit about it and from the writings of Michael Pollan and others is that our understanding of the nutritional needs of humans is pretty rudimentary. There may be (or there likely are) unforeseen consequences of breaking down food into component nutrients and consuming a cocktail of pills instead of eating "food, mostly plants, not too much" as Pollan recommends. Even industrially produced meat and vegetables may contain things we don't understand and aren't currently capturing in supplements.

</comment></comment><comment><USER12> With how easy it seems to be to make meat carcinogenic [1][2], I'm going to wait a while on this one. (Yes, I eat meat, but limit what type and how much.)

[1] <http://www.bbc.co.uk/news/health-16526695>

[2] [http://www.guardian.co.uk/world/2011/may/23/cut-red-meat- can...](http://www.guardian.co.uk/world/2011/may/23/cut-red-meat-cancer- researchers)

</comment><comment><USER13> If lab grown meat, even if at first it is only hamburger, can be economically viable, then the boon to tissue engineering science could be very big indeed. There would be much more work done on bioreactors and biomaterials.

</comment><comment><USER14> I didn't know Veridian Dynamics set up shop in The Netherlands.

<http://www.movieweb.com/v/VIq12vszWI4Ftx>

</comment><comment><USER15> This is how "starving" will be solved in the future, with much cheaper lab- brown (replicator-grown?) food.

Of course for the first 2 decades or so it will still be in "beta" mode, and I wouldn't really want to be one of the early adopters. Hopefully regulators will monitor the whole situation and force them to put labels on it that clearly separates it from normal meat.

<comment><USER16> "Hopefully regulators will monitor the whole situation"

Which of course, they won't.

</comment></comment><comment><USER17> I'm excited about this, but there really needs to be societal consideration here. While I'm all for eating whatever tastes good, many of my meat-eating friends are grossed out even when they think about how regular meat is procured. I don't want to think how they'll react to test tube meat.

Then again, the next generation won't know anything else.

<comment><USER18> What's the consideration you speak of? I don't really see any reason to keep people comfortably separate from the production of their food.

</comment></comment><comment><USER19> "Vrandin, the new near meat will bring about a higher culture in the butcher fraternity" [1913]

[http://news.google.com/newspapers?nid=1338&dat=19130331&...](http://news.google.com/newspapers?nid=1338&dat=19130331&id=-M0zAAAAIBAJ&sjid=QPQDAAAAIBAJ&pg=5145,2823878)

</comment><comment><USER20> Deja Vu: [http://www.colbertnation.com/the-colbert-report- videos/22197...](http://www.colbertnation.com/the-colbert-report- videos/221975/march-17-2009/world-of-nahlej---shmeat)

</comment><comment><USER21> I think that it is the wrong approach to try to make lab grown meat taste indistinguishable from real meat.

Instead, they should aim to make it taste better than real meat.

</comment><comment><USER22> Entomophagy.

</comment><comment><USER23> Oh yay, they've finally found a way of over processing meat, the only thing that was still hard to over process.

<comment><USER24> What do you mean by "over process"?</comment></comment>


Jimmy Wales' Wikia surpasses IGN to become the largest gaming website - <AUTHOR> http://venturebeat.com/2012/03/12/wikia-is-biggest-numer-one-gaming-site/

<comment><USER2> Seems crooked for wikipedia to have such strict "notability" criteria as a non-profit while having a founder in control with a major conflict of interest: he owns a for-profit without said criteria...</comment>


Ask HN: What sites do you open everyday? - <AUTHOR> Sometimes I have free time, and don't know what to read to enrich my life. There's some resources that I definitely need to checkout everyday to read. What are yours? <comment><USER2> HN typically leads me to enough interesting things to fill my free time (which I don't have a lot of).</comment>


Literate Devops with Emacs Org-Mode (2014) - <AUTHOR> http://howardism.org/Technical/Emacs/literate-devops.html <comment><USER2> Org-mode & Magit really are the secret superpowers of modern emacs. And notmuch (full-text search of one's email, at least one order of magnitude faster than Gmail's!). And elfeed. And gnus. And dired. And pretty much everything else in emacs …

<comment><USER3> Is there some way to tell org exactly how I want it to spit out HTML?

I was going to do my blog entirely with org-mode+org-publish, but it spits out a mess of HTML and also a small bit of js for some reason, so I'm just writing html directly myself now.

I don't really find writing html myself all that annoying or anything, but it'd be nice if I could get org to generate really clean/simple HTML for me that I could then write a small script to parse and wrap in divs I've defined for styling.

<comment><USER4> I've been looking for a similar solution - albeit not for HTML - but haven't found anything convincing so far. My train of thought was: It'd be great to have a a canonical XML format for org files to export to, since after that, you could essentially write XSLT transforms for almost any target format (even back to org-files to go full circle). In my case, that e.g. would be odt-files with branding for the organization I'm taking minutes for.

After a bit of googling, I also found an email[1] on the mailing list asking for more or less exactly that, but things don't seem to have gotten far.

I've been thinking about adapting the existing HTML export for such an XML format, but I really haven't had the time for it. :-/

[1]: [https://lists.gnu.org/archive/html/emacs- orgmode/2009-08/msg...](https://lists.gnu.org/archive/html/emacs- orgmode/2009-08/msg00189.html)

<comment><USER5> Pandoc supports org-mode, so you should be able to use it to convert to DocBook, which you can then use with XLST (pandoc also supports HTML directly, by the way).

<comment><USER4> If I remember correctly, I had a look at the pandoc option, but got to the conclusion that this way, I would throw away useful 'syntactical' information (for example, I use todo-flags, tags and timestamps to track open tasks).

If you use org-mode without the need to extract such specific information (and are only interested in generating a document), pandoc might of course be a good way to go.

Edit: ...or maybe there even is a hack to identify and extract things like timestamps anyway. I didn't look into it that much.

</comment></comment></comment></comment></comment><comment><USER6> Org-mode and babel sound like good ideas, but in practice I've found it very finicky to use.

My main problem with it is that, unlike with executing commands in the shell, with org you don't get any progress, and emacs seems to hang while running the command.

For example, running apt update tends to freeze emacs without any progress reporting for a few minutes.

I'm hoping that I'm doing something wrong and that someone can chime in with a suggestion, because I really like org-mode, and I really like the idea of doing devops using it.

<comment><USER7> It's not 'freezing' Emacs so to speak, source block execution is synchronous.

Check out: [https://github.com/astahlman/ob- async](https://github.com/astahlman/ob-async) if you want to change that.

<comment><USER6> Thanks. I've tried that in the past. The problem is still that it doesn't give any feedback on progress.

I still struggle to see how people actually use this with devops on a day to day basis.

I think that some type of integration with tmux would work well - have a running tmux session, and then just queue commands from emacs to that session, instead of running directly through emacs.

<comment><USER8> If you want to see progress, it should be easy to add a process filter somewhere (I bet there already is a hook for that, but not that hard to do even if there isn't one) and make it display sth. on a secondary buffer. That's the thing with Emacs: if you don't have it, it's very easy to add it.

</comment></comment></comment></comment><comment><USER9> This is a cool use of emacs, but containers have made the process of iterative development/system creation so much easier. If you have the deployment story down, it's even easier. And the configs are much more portable.

<comment><USER10> The process demonstrated can be adapted to a wide variety of environments, containers or not.

It's mostly about making a literate program, _executable on the spot_ , sort of like a Jupyter notebook, only for shell commands (or nearly anything, frankly).

<comment><USER11> FWIW, Jupyter notebooks also have a kernel to support shell commands.

</comment></comment></comment><comment><USER12> So "Literate DevOps" is writing comments in your shell scripts and running the commands line by line?

I agree it's a good idea. I do similar things when writing PowerShell scripts (can run them line by line using PowerShell ISE).

EDIT: If you're going to downvote me, it'd be better to explain why.

<comment><USER13> I didn't downvote but I'll try to explain.

Is the fact that you got the idea exactly backwards: is not about putting comments on your scripts. Is about writing an article, intended to be read by humans, that is also executable.

Imagine it this way: Suppose you are reading a blog post on how to install, configure vagrant and install drupal on it. The article is pretty clear an well written and you enjoy it. And you also know that is correct because every single one of the instructions shown was executed while you were reading the article and every output was given back to you.

That is literate programming, is closer to a jupyter notebook than to 'comments on scripts'.

<comment><USER12> > "That is literate programming, is closer to a jupyter notebook than to > 'comments on scripts'."

Surely that's a matter of perspective? Imagine you have a text document containing one command and one description of that command. Is this a literate programming document or not?

Furthermore, does the mode change depending on which tool is used to open the source file? For example, if I open a Bash script in a text editor then it's a document, and if I open it in Bash then it's a script, but if I could open it in a tool that allows me to both read and execute the script at my leisure does it then become a literate programming document?

Aside from this, to use your Jupyter notebook example, is it necessary for the results of execution to be captured in-line in order to follow the literate programming methodology?

<comment><USER14> Answering questions one doesn't like is better than voting them down.

</comment></comment></comment></comment><comment><USER15> much of whats covered in org mode can be handled by vim's folding option. if you write ansible playbooks with coworkers who handle automation as a stream of consciousness out of a single file, folding can save you some sanity.

[http://vim.wikia.com/wiki/Folding](http://vim.wikia.com/wiki/Folding)

<comment><USER16> Do vim's folds give you a full literate programming environment with support for executing code, saving results in vars, WEB syntax, etc? From what I'm familiar with, vim's folding is a lot closer to outline-mode[1], which org relies on for folding. The folding is a _very_ small part of org-mode's functionality.

[1] [https://www.gnu.org/software/emacs/manual/html_node/emacs/Ou...](https://www.gnu.org/software/emacs/manual/html_node/emacs/Outline- Mode.html)

<comment><USER17> I think you can run python inline in vim. But I obviously vim doesn't really have something as full-featured as Org mode. I mean, there's vimwiki - and you could probably get a majority of the rest of the features through messing around with plugins. But at that point, you may as well just switch to spacemacs.</comment></comment></comment>


This Is the Surface Studio, Microsoft's New All-In-one PC - <AUTHOR> https://techcrunch.com/2016/10/26/this-is-the-surface-studio-microsofts-new-all-in-one-pc/ <comment><USER2> "Bringing user unserviceability to the future!"

I think I'll be staying with the stone age computers I currently own for some time until this trend of the Apple-school-of-design dies off. Just looking at that thing it seems like it will be a huge pain in the ass to even switch out RAM.</comment>


Putting pigs in the shade: the radical farming system banking on trees - <AUTHOR> https://www.theguardian.com/environment/2019/jul/13/pigs-radical-farming-system-trees-climate-crisis <comment><USER2> Makes sense to me. Why not use nature to help us?

And I have a hard time imagining the mental framing necessary to overthrow centuries of hard work and optimization.</comment>


New References to AMD Processors Discovered in macOS 10.15.4 Beta - <AUTHOR> https://www.macrumors.com/2020/02/07/macos-catalina-amd-apu-references/ <comment><USER2> I'm really uneducated on the matter, so appreciate some enlightenment: does AMD make the macOS experience better? Raw power doesn't necessarily correlate to better real world performance, so just wondering what this will mean.</comment>


Golang – The annoying remote import path - <AUTHOR> https://medium.com/p/c6c7e76517e5 <comment><USER2> recently encountered the same annoyance. had to fork a repo, and then do a replace-all on all references of import to the new path</comment>


Show HN: An Insta/FB/Twtr Marauder's Map. Easy Stories with Google Analytics - <AUTHOR> https://mystory.photos/ <comment><AUTHOR> Thanks for taking a look, and I appreciate any feedback or feature ideas.

Features: Get the exact location of all traffic(even if they never log in).

Drive ~4x more traffic from users who don't log in and can't access private stories on other platforms.

Add google analytics tags directly into your story.

Add swipe links from cold start without 10,000 followers.

Easily create and share stories to all platforms, and consolidate your social traffic into measurable funnels.

Unlimited swipe links out like Linktree, but you get google analytics directly unlike linktree.</comment>


Touch interfaces aren't just bad on phones (2019) - <AUTHOR> https://abe-winter.github.io/uxfail/2019/06/09/touch.html <comment><AUTHOR> I concur. Touch interfaces are great when the UI needs to be re-configurable and space is scarce but for anything else it is more a problem than actually a solution.

Our oven offers alarm timers, timed on-off-functions and such stuff - via a touch interface on the front. Sounds good in theory because if there are no buttons, there can't get any foreign matter behind them. Too bad that it barely registers touches and that the menus reset after a few seconds. So you frantically try to press the buttons to set a time while trying to not overshoot the time you want to pick. The user experience is certainly not great here.</comment>


Ask HN: How do you handle large files in Git Repos under development? - <AUTHOR> Our development team is facing this issue right now; we need to include some larger binaries (pip and debian install files) with our Github repo.  They're not likely to change much over the coming years, but necessary since we run our updates offline, and need the packages to be easily accessible for testing and development.  To test and release, right now we're simply able to click the green "Download Zip" on Github.  So we're balancing two issues:  Putting the binaries right in Github will eventually make the repo bloated.  And putting them aside and packaging them means that we have to take an extra step for testing, and that someone will eventually forget this or screw it up.
Anyone have any experience with this?  We've looked at the following:
1. Submodules - This seems almost perfect, but requires some change in developer behavior.  We are used to downloading a test zip package for offline testing from the Github website. 2. Batch/Bash File Packaging - Writing batch files that will automatically package up the larger files with the Github repo before we use in testing or release. 3. LFS - Git Large File Storage - We haven't really looked at the pros and cons here much.  Any experience? <comment><USER2> ... why do you want .deb files in git? Build them and put them in an apt repo.

<comment><AUTHOR> Good question. We need to be able to install offline with a USB drive.

<comment><USER2> Right but wouldn't a better option be to then mirror the apt repo to the USB key and just use `deb file:/mnt/usbkey $RELEASE $COMPONENTS` - then the setup, dependency management etc is all the same.

<comment><AUTHOR> It might be, we could look at it.

<comment><USER2> Even if you're not going to go the full apt repo route, using regular file/blob storage is still going to give you a better result I believe.</comment></comment></comment></comment></comment>


Visualizing Algorithms (2014) - <AUTHOR> https://bost.ocks.org/mike/algorithms/ <comment><USER2> Part of what the author talks about here makes me wonder about a potential application for visualizations like this (especially since I'm working on a general purpose 'structured data' visualization system).

If seeing these visualizations of algorithms can significantly speed up human understanding, how beneficial would it be for onboarding people to (e.g.) open source projects, if the codebase had its central algorithms visualized?

For instance, consider introducing someone to the Git codebase for the first time. What if the first step was allowing them to just use Git, while they could see the data comprising the working tree, index, commit tree, etc. changing as they performed various actions? After that, they could go to the code and see which parts were responsible for producing the visualization.

Or, what if library/framework/language maintainers incorporated it to teach people how to use/debug their systems. E.g. the 'state_machine' Ruby gem. How valuable would it be if users of the library could turn on a debug flag and just see their state machines being constructed and operating?

There's a video of the visualizer I'm working on running here (including _another_ visualization of quicksort towards the end): [http://symbolflux.com/projects/avd](http://symbolflux.com/projects/avd)

<comment><USER3> I love the idea, it'd be great to have a tool like this integrated with debuggers' watch. I'd love to be able to pick some variable and then, as I step through the code, at any point be able to see the visual representation of my data. Not a thing to use everyday probably, but from time to time it'd be immensely helpful to have it.

<comment><USER2> My original motivation for building it was because I wanted exactly that:)

</comment></comment></comment><comment><USER4> Older thread.

[https://news.ycombinator.com/item?id=7949995](https://news.ycombinator.com/item?id=7949995)

</comment><comment><USER5> I absolutely love these articles, and was inspired to create some (not nearly as cool) of my own.

Here is what a Graph looks like - [http://gun.js.org/see/graphs.gif](http://gun.js.org/see/graphs.gif)

Here is how an Ad-Hoc Mesh Network can deduplicate broadcast storms: [http://gun.js.org/see/ad-hoc-mesh-network.gif](http://gun.js.org/see/ad-hoc- mesh-network.gif) (This is also the same principle that neurons use when firing signals!)

Here is what a Radix structure looks like: [http://gun.js.org/see/radix.gif](http://gun.js.org/see/radix.gif)

Would love to see other visualizations by other people, please add links for me!

</comment><comment><USER6> Referenced in the top comment of the Gambler's Fallacy discussion: [https://news.ycombinator.com/item?id=14805939](https://news.ycombinator.com/item?id=14805939)

</comment><comment><USER7> The Fisher-Yates shuffle has an off-by-one.

<comment><USER8> How so? It seems correct to me.

<comment><USER9> This implementation always moves the nth item, it should only do it most of the time, it could never return the starting array but needs to be able to.

<comment><USER8> This implementation NEVER moves the nth item as that is past the end of the array.

       i = Math.random() * n-- | 0;

generates a value less than n.

And

        t = array[n];
        array[n] = array[i];
        array[i] = t;

is using a decremented n.

You are being confused by the `n--` in the random selection.</comment></comment></comment></comment>


Harsh lessons we may need to learn again - <AUTHOR> http://www.chinadaily.com.cn/opinion/2009-12/31/content_9249981.htm

<comment><USER2> Major Propaganda Vessel of Communist Country Denounces Capitalism; Hell Stays Hot; film at 11.

I'm sorry for the cheap joke, but the op-ed doesn't even try to be coherent. Lesson one is that free markets don't work, even though 3/4 of the argument supporting it has to do with the huge government bail-out of the financial industry.

Lesson two is that the reliance on that kind of bailout creates perverse incentives (and lesson one was that markets _don't_ work?).

Lesson three is that Keynesian policies do work. Which seems to contradict lesson one. (Yes, Keynesian policies do work. The debatable issues is whether they work better than letting the free-market work things out).

I don't understand lesson four (mea culpa) and lesson five "is that not all innovation leads to a more efficient and productive economy". Well, duh, no. But bailing out the innovation that doesn't work doesn't lead to anything good, either.

<comment><USER3> "The author is an Economics Nobel laureate and university professor at Columbia University."

Are you implying the author is being used as tool of the China government? Or that this isn't his original text and the "Propaganda Vessel" twisted his words?

As for the China Daily and Shanghai Daily, I've read them regularly for close to 10 years and find the reporting to be mostly professional and many times more informative than U.S. mainstream reporting.

<comment><USER2> No, I'm implying that his message (which is political, not scientific in nature) fits the goal of the Chinese government very well. I don't for a second think that Mr. Stiglitz doesn't hold the beliefs that he expresses, but knowing that China does not, whatever the other qualities of the papers mentioned are, have a free press, it's a safe bet that a equally qualified author with the opposite view of Mr. Stiglitz would not have been printed.

<comment><USER3> I understand your general position. Your assertion that of course China would print it seems to make at least the following assumptions that in my experience are not correct:

1 - China is the borg, everyone, and especially everyone in the gov thinks alike. Not my experience, which is that inside various Chinese government groups, there exists a wide variety of opinion.

2 - China's news is heavily censored. A few topics are taboo. Sometimes a reporter/editor gets reprimanded or fired for crossing the line. But for the most part, there is plenty to report on that does not get censored.

As to your general position that an opposite view would not have been printed, this may be true as it is true for many U.S. papers.

<comment><USER2> 1: I didn't think so. But there is only one party, and once the party settles on a policy, it pretty much stays that way, and debate is certainly not encouraged.

2: From <http://en.wikipedia.org/wiki/China_Daily> :

 _China Daily, has a monopoly, being the only official English-language national newspaper in China.[...] Journalists practice a high degree of self- censorship at the paper. Subjects such as Tibet, Taiwan and Falun Gong [...] have to be approved by a higher authority before publication [...] One journalist working at the paper said, despite more openness in the media, "80 per cent of what we know we cannot report." The editor of the paper has told foreign editors that the paper's editorial policy was to support the policies of the Communist Party and only make criticism of the authorities if there was deviation from Party policy._

Re. US papers - sure, but the U.S. (and other free countries) have competing papers and newsletters and even blogs.

To frame it differently: I'm in China and I disagree strongly with Mr. Stiglitz. Free markets have done wonders for China and the policies backed my Mr. Stiglitz serves only to promote poverty. What do I do to voice my opinion? I write the editor of China Daily, and maybe I'm published. But maybe not, and maybe the next day I'm fired from my job at a large Chinese University. Maybe they tell me I'm a reactionary, maybe they don't, but suddenly I just can't seem to find a job in academia.

Alternatively, if I'm not in China (which I'm not), I go on HN, and write my opinion. If I cared a bit more, I might write a blog entry or a letter to the editor of a newspaper I expect to find my view interesting. Whatever I do, my family and my self still have jobs tomorrow.

</comment></comment></comment></comment></comment><comment><USER4> What I find kind of funny is how roles and identities are mixed up in texts like this to make everything appear wonderfully clear when it is not.

He says: "In this case, too-big-to-fail financial institutions had perverse incentives: if they gambled and succeeded, they walked off with the profits; if they lost, the taxpayer would pay"

So we have the banks and the tax-payers he says. Are these disjoint sets? No, these are roles and there are individuals, lots of individuals, who are both owners of banks _and_ tax-payers. The more taxes someone pays the more likely they are owners of banks as well.

The perverse incentives were provided by these owners, demanding low risk and returns way above anything that could possibly be sustainable.

He goes on to say "It certainly did not serve homeowners who are losing their homes, workers who have lost their jobs, retirees who have seen their retirement funds vanish, or taxpayers who paid hundreds of billions of dollars to bail out the banks."

Homeowners are sadly losing their homes. Homes they wouldn't have been able to afford if it hadn't been for the reckless lending of banks. And those risky sup-prime loans, who bought them? Pension funds bought them (among others). Pension funds who demanded outsized profits for the benefit of exactly those people who now lost their retirement funds.

If the banks had walked away with all the profits or were saved when they made mistakes then people would not have lost their retirement funds, because the banks' profits _are_ their retirement funds.

Workers sadly lost their jobs. Jobs in the financial industry were lost. Construction workers lost their jobs building sup-prime homes. Many other people lost their jobs that used to be funded by people (themselves) borrowing like there's no tomorrow trusting in their homes gaining value and their retirement funds growing fat from fat bank profits.

Now, is this a zero-sum game? Have only people lost who had gained from the same system before? No, of course not, there were indeed people who did not benefit much and are now suffering hardship. And there are rich people who benefited and did not lose much.

But what Stiglitz does not say is that these people are few. Most people, particularly those who are tax-payers, are on both sides of the game in various different roles.

<comment><USER5> Actually, there are a huge number of people who lost: home owners (as distinct from mortgage-owners) and renters.

Both these groups were forced to subsidize mortgage holders and banks on the way up and on the way down.

</comment></comment><comment><USER6> Where he published the article is _funny_. Who cares about theories? A pox on all their houses. His core observations are unassailable:

* The bankers' pursuit of self-interest (greed) did not lead to the well-being of society

* It certainly did not serve homeowners who are losing their homes, workers ... retirees ... or taxpayers.

* Those who had preached fiscal restraint when it came to small welfare programs for the poor now clamored for the world's largest welfare program

Our 'leadership' has failed us repeatedly. The appropriate response is obvious.

<comment><USER7> > Those who had preached fiscal restraint when it came to small welfare > programs for the poor now clamored for the world's largest welfare program

What are you babbling about?

The folks that brought us the financial crisis did claiming to be fighting poverty. Why do you think Fannie and Freddie were created and lied about mortage quality?

</comment></comment><comment><USER8> Adam Smith's warned us that self regulation of the financial industry would lead to the financial ruin of the country.

His invisible hand concerned the freedom to trade physical goods.

I don't have a bunch of snappy quotes available, the book is 1200+ pages long and took me 3 months to read, I wished I'd taken notes!

"The legal rate ought not be much above the lowest market rate. If the legal rate of interest in Great Britain, for example, was fixed so high as eight or ten per cent, the greater part of the money which was to be lent would be lent to prodigals and projectors [promoters of fraudulent schemes], who alone would be willing to give this high interest. A great part of the capital of the country would thus be kept out of the hands which were most likely to make a profitable and advantageous use of it, and thrown into those which were most likely to waste and destroy it.

When the legal rate of interest, on the contrary is fixed but a very little above the lowest market rate, sober people are universally preferred, as borrowers, to prodigals and projectors. The person who lends money gets nearly as much interest from the former as he dares to take from the latter, and his money is much safer in the hands of the one set of people than in those of the other. A great part of the capital of the country is thus thrown in the hands in which it is most likely to be employed with advantage."

Adam Smith - On The Wealth Of Nations

<comment><USER9> High interest rates normally occur with high inflation making it cheaper to borrow. The "real" rate your paying back is interest-inflation. Prodigals and projectors borrow at a premium above the interest rate whatever the prevailing rate.

Directly quoting Adam Smith is an argument via authority. Evolution doesn't rest on The Origin of the Species but on predictive power. Unless your interest is historical you would be better off reading a modern text.

edit: Actually Smith is talking about Usury Laws.

<comment><USER8> The quote was to illustrate that Smith wasn't anti-regulation.</comment></comment></comment>


Critiquing Clojure - <AUTHOR> http://items.sjbach.com/567/critiquing-clojure

<comment><USER2> A lot of these are personal preference and borderline traditionalist, and as pointed out by others, the dynamic binding one is in fact not strictly true.

One thing that _does_ however bother me about Clojure is the interaction of dynamic binding and lazy evaluation. Allow me to illustrate:

      => (def *test* 0)
      #'user/*test*
      => (binding [*test* 2]
           (map #(* % *test*) '(1 2 3)))
      (0 0 0)

The call to _map_ is lazy, and the returned seq is only evaluated once it hits the 'P' of REPL, which is outside the dynamic binding of _test_. If you surround the _map_ call with _(doall_ and _)_ , the result is (2 4 6).

This is of course a trivial case, but I've been bitten by this in practice where the binding, lazy sequence and var evaluation were a few call steps apart, and it's always been very unpleasant. Most of the time, it's involved vars which don't have a root binding, so it throws an error, but in other cases it's a lot more serious.

I guess the same problem can be provoked in both Clojure and CL by returning a closure evaluating that var to back outside the dynamic binding, but since you'd be explicitly invoking the closure, it's a lot more obvious what's going to happen than the "magic" that is lazy evaluation.

</comment><comment><USER3> I was interested in Clojure before, but the critisism I found in the two recent posts here on HN make it even more interesting. I feared something substantial might turn up that really defies using it, but to the contrary: if issues listed in the blog posts are the biggest problems people find with Clojure, then that is quite promising.

<comment><USER4> I find the mention of obscure debug information where most of the time you can't find line number of Clojure code where the error occurred --- as a big problem.

</comment></comment><comment><USER5> I don't have much experience in CL, but I started to really like the fact that clojure is Lisp 1. When I have a hash map "client", I can use all three:

(get client :phone)

(:phone client)

(client :phone)

It takes some getting used to, but I already came to expect (and enjoy) that any symbol I use can be a function.

<comment><USER6> I also think that reading lots of "funcall"s makes the intent of the code less readily apparent.

<comment><USER7> it is definitely more verbose and uglier. but in practice it does not seem to be a problem. for instance, comparing to arc, if you had notfn for ~, and testify, you could write all as:

      (defun all (test seq)
        (funcall (notfn #'some) (complement (testify test)) seq))

doesn't seem that bad.

</comment></comment></comment><comment><USER8> On #5, the code isn't doing what the author may think:

         (let [#^int a 2
               #^int b 3]
           (cons a b))

_a_ and _b_ are not hinted to be primitive types. Type hinting is purely for objects. Use hinting to make it clear to the compiler what sort of _objects_ you are passing into something (e.g. a constructor that takes a String). If there is confusion, clojure will do reflection.

The right thing to do in this case, is the second thing that the author mentions:

       (let [a (int 2)
             b (int 3)]
         (cons a b))

a way to see that _a_ and _b_ are really primitive is:

        (let [x (int 5)]
          (.shortValue #^Integer x)) ; exception: "can't type hint primitive..."

There's a post on the mailing list that goes over this much better than I did (and where I drew the examples): [http://groups.google.com/group/clojure/browse_thread/thread/...](http://groups.google.com/group/clojure/browse_thread/thread/b0554f7381b8db96/74bf85fabc12761a)

I understand that this is really beside the point, that the author finds type hinting syntax unattractive, but I just wanted to clear up confusion (if there was any).

EDIT: clarity

</comment><comment><USER9> I'm not familiar with CL's "PROGV", but you can indeed dynamically rebind vars at runtime with Clojure: <http://paste.lisp.org/display/73551>

</comment><comment><USER10> #2, "Functions must be declared before first call",is very irritating (to me) It feels like I am back in Pascal land

<comment><USER11> It also eliminates a very large class of errors- typos when referencing other functions. Tradeoffs...</comment></comment>


How I made a game played in Notepad - <AUTHOR> https://sheepolution.com/blog/gamedev/how-i-made-a-game-played-in-notepad/ <comment><USER2> Related, and recently discussed here[1], a ray tracer that uses Notepad for its UI: [http://kylehalladay.com/blog/2020/05/20/Rendering-With- Notep...](http://kylehalladay.com/blog/2020/05/20/Rendering-With-Notepad.html)

Though the ray tracer used a more complicated, and more efficient way of manipulating the Notepad "framebuffer".

[1] [https://news.ycombinator.com/item?id=23246221](https://news.ycombinator.com/item?id=23246221)

</comment><comment><USER3> This reminds me of a time at a games company one of the tasks we had to do was to fake the game running in a browser for a demo (this was around 2008) easy trick as you just had to change the render handle to any window handle and you were done.

In fact, initially that's what I thought this article was going to be about.

Wish I hadn't dismissed it as too easy and joined the team, as the accolades and attention they got for demoing the game 'running' in Notepad made me quite jealous, especially knowing how technically trivial it was!

The lesson here, I think, is that there is nearly always something compelling about recontextualising something mundane that people are familiar with into something dynamic and unexpected.

</comment><comment><USER4> > With this feature unlocked, I basically created an ASCII based renderer.

Haha this is great, having an external program that watches a text file for changes and then writes to it, and forcing a text editor to not complain in order to make it merely an "ASCII based renderer" is a neat concept.

Also very interesting that the interaction with the game involves a sort of awkward GUI where you have to bring the cursor to the right spot and then type an 'x' in order to click.

This is a stellar example of a GAAUI. Graphical ASCII Art User Interface.

<comment><USER5> From what the video showed, it seems that some of the interaction in the game actually involves modifying or copying the "graphics" in the center window (to clean a window, or obtain an object for example). So it seems that he actually really developed this dynamic quite a lot. It really makes me want to play.

</comment></comment><comment><USER6> > An experienced Javascript programmer should have no trouble reading and > understanding the general idea of C code.

Sigh, how I wish that were generally true.

<comment><USER7> Does JavaScript even have a concept of stack vs heap? Seems like someone who has only used pure JS would be missing a lot of fundamental knowledge on how C works.

<comment><USER8> Javascript sort of does

Stack - the event loop uses this for handling callback executions

Heap - memory addresses for objects. For instance if you copy over an array of objects, you are copying the pointers to those memory addresses inside the array. Also memory leaks to some extent with eventListeners especially when you use a framework like React

</comment></comment></comment><comment><USER9> I gotta say, I was expecting a form of interactive fiction that makes you go to certain parts of the text using "find" and maybe type custom text here and there for personalization or keeping state, and/or something like the vim tutorial which takes place entirely in standard vim and lets you practice cursor movements etc...

Still neat, with the animations it's more like an ascii art terminal or text mode game

</comment><comment><USER10> Well, the customized editor makes it less charmant. Anyway, big compliments for the patience and the dedication!

<comment><USER2> Notepad++ has a setting to skip the dialog, if you wanted to replicate this with a bit less work: [https://i.stack.imgur.com/WTQo1.png](https://i.stack.imgur.com/WTQo1.png)

</comment></comment><comment><USER11> We spent so much time wondering if we could... we never stopped to think if we should.

</comment><comment><USER12> Text editors as display engines in not entirely uncommon. Emacs has all manner of games, (in case non-windows users feeling left out..):

M-x tetris

and for the text adventure fans:

M-x dunnet

</comment><comment><USER13> this is awesome :-D

nice work man.. My son (12) (who has just started writing text based games in batch shell) is super keen. I think you've given him ideas :-D

</comment><comment><USER14> I've seen enough. Get the stake and the fire.</comment>


Ask HN: How do you make a vision come true? - <AUTHOR>

I would appriciate any detailed advise on how do you make something, which should involve many people, knowledge and investment. Thank you! <comment><USER2> The first step is not to be so vague.

You can't expect detailed advice without providing any details yourself.

</comment><comment><USER3> Awesome question, but probably won't get a great response here because potential answers can't be objectively debated. There are patterns worth observing though: find a handful of people who have achieved similar to what you have in mind, study them, and look for common traits to emulate.

</comment><comment><USER4> A lot of people have visions, the ones that are able to make them come true are the ones that can focus and work hard with consistent progress on their minds.</comment>


Study Finds 43% Drop in Time Spent on Facebook - <AUTHOR> https://www.emarketer.com/content/snapchat-snags-second-place-in-social-media-stickiness <comment><AUTHOR> Sadly the article doesn't link to the study by Verto Analytics and I wasn't able to found it on their website ([http://www.vertoanalytics.com/verto- reports/](http://www.vertoanalytics.com/verto-reports/)).</comment>


Show HN: Neural Painter – Paint artistic patterns using random neural network - <AUTHOR> https://github.com/zxytim/neural-painter <comment><USER2> I made a random SVG generator in pure javascript based on chancejs: [https://jsfiddle.net/franciscop/819Lr84a/embedded/result/](https://jsfiddle.net/franciscop/819Lr84a/embedded/result/)

See more info: [https://github.com/chancejs/chancejs/issues/193](https://github.com/chancejs/chancejs/issues/193)

</comment><comment><USER3> Not going into any of the technical details...but does someone know what "artistic patterns" mean? Because frankly all i'm seeing is some kind of coloured interferance?

Not sure if I'm missing the point, but I just can't get impressed by this in the same way the "emulate an artist's style with neural networks" did.

<comment><USER4> I'm on a road trip at the moment, and the patterns in the gallery look similar to some of the paintings on the walls of a couple of motels I've stayed at. It was my first thought on seeing the gallery.

</comment></comment><comment><USER5> Although it was only made with procedural algorithms, I believe this has a much greater artistic value:

[https://www.reddit.com/r/generative/comments/5h5796/slow_col...](https://www.reddit.com/r/generative/comments/5h5796/slow_colors/)

</comment><comment><USER6> If you found this interesting I recommend looking at Picbreeder ([http://www.picbreeder.org/](http://www.picbreeder.org/)). Collaborative interactive evolution of pattern producing networks produced very interesting results.

</comment><comment><USER7> Do I understand correctly? You have f:R^2 -> R^3, where the input is the image coordinate, the output is an RGB value, and f is a neural net with activations, weights, etc, chosen so that the image (literal and mathematical) of the map looks aesthetically pleasing?

<comment><USER7> Nevermind. Just read the docs of the `get_func` function:

        '''return function of [0,1]^2 -> intensity \in [0, 1]^c'''

... so yes.

<comment><USER8> The weights are random. No attempt has been made to make sure the generated image looks aesthetically pleasing. That's the surprising bit: a random neural network generates good-looking images.

<comment><USER7> > That's the surprising bit: a random neural network generates good-looking > images.

Despite the randomness in the weights, there's structure and coherence imposed by the activation functions and the manner in which activations are combined (the network architecture). There's nothing inherently magical going on: take a rational function with random coefficients and do domain coloring [1], and you'll get something interesting, too.

[1]: [https://en.wikipedia.org/wiki/Domain_coloring](https://en.wikipedia.org/wiki/Domain_coloring)

</comment></comment></comment></comment><comment><USER9> I've been meaning to experiment with adding random patterns into my painting workflow, mainly as starting points. I find it's usually easier to have something other than a blank surface to start from. This looks like it might help, thanks!

</comment><comment><USER10> Most of my friends who are artists will tell you: art is 3 pages dissertations to tell you how anything you produce is art. Hence the «fontaine de Jouvence» or the monochrome of Soulage.

Met newly educated kids from university in Art they told me art is just about the public power sustaining the market of art for the benefits of those who sponsor art.

Hence, the real «artistic pattern» should also come with a dissertation and evaluation of its value on the market.

If a program can produce thousands of it per hour, even at .1$ and you can sell them, you still get rich and famous at the end.

<comment><USER11> I think it's poor taste to judge art by how much money someone else is willing to pay for it. It's like judging software by how much money it can to extract from its users, or by how many people know the name of its authors. Both measures ignore the actual value that is provided.

<comment><USER12> Definitely.

What defines art is whether or generates a visceral, human response. Is it evocative? Does it spark emotion or memory?

An ML algorithm can luck out and get this right, provided enough training data. But would it sustain if its audience knew there was no human element? I think the machine behind the curtain would throttle any emotional response.

As to this implementation, I have to agree it doesn't produce much interesting from the sample images. I haven't dug into the code to know if this is implementation related or a symptom of its input.

<comment><USER13> As far as visceral human responses to abstraction go, open_nsfw nailed it.

[https://open_nsfw.gitlab.io](https://open_nsfw.gitlab.io)</comment></comment></comment></comment>