Amazon Bows To US Censorship Pressure: Refuses To Host Wikileaks - <AUTHOR> http://www.techdirt.com/articles/20101201/12255912081/amazon-bows-to-us-censorship-pressure-refuses-to-host-wikileaks.shtml <comment><USER3> Choose your news source:

<http://news.ycombinator.com/item?id=1959697> \- techdirt.com

<http://news.ycombinator.com/item?id=1959655> \- cnn.com

<http://news.ycombinator.com/item?id=1959633> \- arstechnica.com

<http://news.ycombinator.com/item?id=1959607> \- bgr.com

<http://news.ycombinator.com/item?id=1959335> \- npr.org

<http://news.ycombinator.com/item?id=1959328> \- guardian.co.uk

<http://news.ycombinator.com/item?id=1959308> \- readwriteweb.com

<http://news.ycombinator.com/item?id=1959305> \- reuters.com

<http://news.ycombinator.com/item?id=1959257> \- techcrunch.com

<http://news.ycombinator.com/item?id=1959142> \- foxnews.com

<comment><USER4> If this is _Hacker_ News, why is there no similar-story clustering algorithm (among other things)?

<comment><USER5> I'm guessing because pg does it in his spare time. Maybe he should take YC funding and really kick this thing into high gear.

<comment><USER4> It would take maybe 3 days for someone to come up with an algorithm, implement it and send it to pg ready-for-use. All he has to do is ask.

<comment><USER3> Yup, I agree with you entirely. It would be great, and it's absolutely trivial, anyone could do it. Off you go then, and let us know when it's done. The HN source is available for download, and while no doubt the one PG runs is slightly different I have no doubt that whatever you write can easily be integrated.

It doesn't even need to be automatic. You can just have people say "this" is the same story as "that" - amalgamate.

Shouldn't even be three days - bet you could do it in one.

<comment><USER6> And yet the concept is rife with potential problems. Which article & title becomes the default, first submitted or highest ranking? What happens if articles get combined that shouldn't be combined? Is there an undo? Who controls that? How simple is merging the discussions?

<comment><USER4> I didn't mean to imply that this is an easy problem to solve. My point is that there are very smart people on HN willing to figure this out for the rest of us.

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> This is completely and utterly preposterous.

If you are a citizen of Connecticut, or, hell, _anywhere_ , please email Lieberman and tell him that his actions and comments are completely ludicrous and, in fact, anti-Democratic.

[http://lieberman.senate.gov/index.cfm/contact/email-me- about...](http://lieberman.senate.gov/index.cfm/contact/email-me-about-an- issue)

<comment><USER8> But these leaks might make him look bad, and that hurts the next re-election.

Welcome to Amerika, where anyone who speaks out against you is branded a terrorist. (I have downmodded this exact comment a number of times, because I never thought it was really true. But this time, that's exactly what's happening! There is a well-established legal precedent in the US that you can publish anything that has been leaked, regardless of how you got that information. The person who leaked it gets in trouble, not the person who tells everyone about it. But now... we want to throw away our freedoms and call wikileaks a "terrorist organization". What the fuck? Terrorists fly airplanes full of people into buildings full of people. This is a collection of documents that say China hacked Google. NOT THE SAME AT ALL!)

</rant>

<comment><USER9> I'll give you nice counter-rant. Downvote if you like, but somebody needs to put what you said in context, so I'll play American Joe Sixpack for that purpose.

What did you expect? Did you honestly think you could dump years of State Department cables on the internet and what? Somebody would come give wikileaks an award? They'd win the Nobel Peace Prize? (yikes, that still might happen)

This is not wikileaks reporting that the war is going badly, ie making a point that we are being lied to by showing the lies. This isn't honorable. If you'll remember, when the Pentagon Papers happened the leaker was fully willing to take whatever punishment came to him. As he should have.

This isn't that, either.

This is some asshole with a computer connection hooking up with somebody else with a grievance and destroying billions of dollars of my collective property. His stated mission is to destroy the structure of my country by making it impossible for various nodes of the country to communicate with each other.

No amount of ranting is going to make an anarchist into a superhero. We need leaks for society to function, not crazy self-centered promoters bent on single-handedly redesigning our way of life.

</rant> (wink)

On a more serious note, I told you guys when this happened that there aren't actions without reactions. If Assange is just getting started? Well the other side is just getting started too. Expect more of this.

<comment><USER10> Wikileaks is putting the governments of the world naked under the scanner the same way most of us are being put under the scanner every time you take a flight.

If we can't have any privacy, the government can't either.

<comment><USER9> You guys keep hitting me over the head with what's fair or what's right or going on and on about some moral outrage and how wikileaks is needed.

I keep telling you that none of that matters. Consent of the governed isn't about the best way of governing people, it's about the general agreement that things are working this way. Wikileaks has done nothing to change any of that. So it's just an attack on the government itself. Expect the government to react. That's all I saying. For every person you _might_ convince that change is needed, you just created a hundred people wanting to throw the entire wikileaks bunch in jail.

Honestly, I agree with you that individual freedoms are at an all-time low -- in all kinds of ways. It's a travesty and a horrible thing. I'm just telling you that the emotional argument about how screwed up things are isn't going to hold much say when pitted against the way groups of people work. To them, this is an attack and a crime. Hell, it's an attack and crime to me too, and I agree with it. (The two beliefs are not mutually exclusive) Yelling about being surprised at the response here doesn't make much sense to me. You can easily see where this all is headed, and it's not a new golden age of human freedom, as much as one is needed.

<comment><USER11> Since you agree with the general sentiment (about individual freedoms), but think that expressing outrage here is futile, can you suggest a response that is constructive instead?

<comment><USER12> Go into politics yourself. There's no better response, it's stand up or shut up with this kind of issue. Far too complex for most people to understand, ramifications of great consequence that are hard to vocalise.

Just don't forget what you were getting into power for when you get there.

<comment><USER11> Thanks - but I was hoping to hear from DanielBMarkham, basically because his position seems fatalistic to me but it's also intelligently reasoned, so I was wondering if I was missing something.

Incidentally - when was the last time politicians changed world for the better in a major way? (and I don't mean simply voting money to schools or hospitals - I mean structurally).

<comment><USER13> What do you mean "structurally"? Politician's can't really change things in a major way apart from voting and signing legisislation, can they? Wouldn't that take more of a (benevolent) dictator?

<http://whatthefuckhasobamadonesofar.com/>

<comment><USER11> I think that's my point - major reform is almost impossible for politicians to enact without an external force to react to.

If we have structural problems (e.g. widespread corruption) then politicians alone won't fix it.

I can't say that I know whether Wikileaks is going to effective, or that it's going to cause any positive ourcomes, but it seems clear to me that _if_ there is going to be positive action on corruption it's either going to happen as a result of a massive crisis (i.e. the system breaks down), or because a new force shines light on the corruption from outside, forcing politicians to act. Both paths carry a risk of things getting worse rather than better - <USER2> so does a slow decline resulting from inaction.

Personally, I'd hate to see any (more?) major breakdowns in society, and the idea of a slow decline is equally tragic. Perhaps wikileaks is doing it wrong, but the idea of a non-government actor exposing corruption - something the media has stopped doing - seems entirely healthy to me.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> As an Argentinian who admires the entrepreneurial spirit of the USA, I'm amazed and appalled at how quickly it is becoming politically intolerant and borderline fascistic.

I can't help but draw parallels between cablegate and watergate and wonder if, had watergate occurred nowadays, would there be Senators trying to declare the Post a "terrorist organization" and wanting Bob Woodward dead.

Assange should zip all the documents and release them on Tor. Although I doubt the onion routers could whitstand that ammount of traffic.

<comment><USER15> As an Argentinian, you should be well familiar that your country took in scores of actual fascists from Nazi Germany and Mussolini's Italy, giving them safe harbor from war crimes prosecutions. There remain entire towns in Argentina where German is the primary spoken language, where still-living Nazis are residing undisturbed.

Calling America "borderline fascistic" because private companies aren't allowed to harbor illegally obtained diplomatic documents is less an accurate characterization of the United States than it is a display that you have little or no understanding of what fascism is. This should be particularly embarrassing because of your country's historical entanglement with fascists.

You could talk to some of your German-speaking countrymen if you're still unclear as to why Godwinning this thread is idiotic.

<comment><USER16> > _where still-living Nazis and their children are residing undisturbed_

why shouldn't their children reside undisturbed?

<comment><USER15> Edited so you'll no longer miss the point.

</comment></comment></comment></comment><comment><USER17> Cool, they'll have to distribute their content over hard-to-control media (Tor, P2P etc.), thus helping such technologies becoming widespread.

Throw in a P2P-based DNS sponsored by COICA, and those elder, digitally illiterate baby-boomer leaders will have done a lot for a freer Internet, although unwillingly.

<comment><USER18> Making wikileaks.org inaccessible by default still has tremendous impact. Not that many people have the technical proficiency to use Tor, use P2P software, or even know what the hell DNS, whereas almost anyone knows how to type "wikileaks.org" into their address bar.

<comment><USER19> A surprising number of people don't know how to even do that (my mum included, though I've tried to explain). They can type 'wikileaks' into Google though.

<comment><USER20> Even fewer people know how to take wikileaks.org data and do anything with it. Wikileaks, in general, serves intermediaries. Wikileaks.org is useful for fundraising though...

</comment></comment></comment></comment><comment><USER21> Amazon defended the child pedo guide based on free speech rights. They completely collapsed here to political pressure.

Hypocrites.

<comment><USER22> I'm pretty sure they took that down as well. They initially defended it, but a few hours later they took it down.

As is their right. They're a private company, they're entitled to do whatever they want.

<comment><USER23> They're actually a public company. But that doesn't matter unless you hold enough shares in the company to make them care the way you want to.

<comment><USER24> Private as in "not a governmental body subject to the whims of politicians", not private as in "not traded on the stock exchange".

<comment><USER25> Well, they succumbed to political pressure, thus, quite close to if not indeed at the whims of politicians.

</comment></comment></comment></comment></comment><comment><USER26> This sounds like a job for freenet. <http://freenetproject.org/>

<comment><USER8> Nah, BitTorrent is fine for this sort of thing. It's much more illegal to distribute a new movie than it is to distribute a bunch of now-public government documents.

<comment><USER26> Not sure why Freenet is less appropriate than BitTorrent.

<comment><USER27> Has to do with how much data can be effectively pushed across it to a large number of people.

</comment></comment></comment></comment><comment><USER28> We wouldn't allow Amazon to host DVD rips. Doesn't classified government information deserve a bit _more_ protection than mere copyright, not less?

<comment><USER29> The New York Times posted classified government information a while back -- "Months after the Sept. 11 attacks, President Bush secretly authorized the National Security Agency to eavesdrop on Americans and others inside the United States to search for evidence of terrorist activity without the court- approved warrants ordinarily required for domestic spying, according to government officials."

Do you think their hosting facility should drop them?

<comment><USER30> You mean this story: <http://www.nytimes.com/2005/12/16/politics/16program.html>

It ran Dec 16, 2005. Apparently, "Late October 2004: Top Administration officials convince NYT to spike the NSA domestic spying story." from [http://emptywheel.firedoglake.com/timeline- collection/warran...](http://emptywheel.firedoglake.com/timeline- collection/warrantless-wiretap-memos-timeline/)

The NYT did publish it, but one guesses they did it when the government agency(s) in question permitted them to. Or after someone else broke the story, and NYT would look stupid for not covering it.

<comment> brown9-2 "The NYT did publish it, but one guesses they did it when the government agency(s) in question permitted them to."

No, not at all.

The difference here though is breaking a story of huge interest to every citizen versus merely making public previously private and confidential communication between diplomats, indiscriminately.

<comment><USER31> Maybe you are right, but the point is whether Amazon (or any other hosting company) should act as a judge and decide whether the leak was justified or not.

<comment><USER32> No, they're acting as a property owner saying "get this shit off my lawn, we didn't ask for you to have your fight here".

Once again, the freedom of speech does not give you the right to abuse other people's freedom to control their own property. Amazon's servers are their property, why do they have to let their brand image go down in the mind of people who are anti-Wikileaks?

</comment></comment></comment></comment></comment></comment><comment><USER33> Honest question: Based on the general sentiment here, is there anything that a government should be legitimately allowed to keep secret?

</comment><comment><USER34> Amazon didn't bow to political pressure. It made a business decision to protect its _other_ clients from interruption of services that constant, government-level DDOS'ing would cause.

<comment><USER35> Government DOSing of Amazon would get a lot of attention... An organized attack bringing down ec2 / s3 would risk the attention of some pretty clever individuals who's businesses and hobbies were affected and produce some interesting fallout.

</comment></comment><comment><USER36> It will be interesting to see the overlap between those decrying this government pressure to infringe upon the free speech rights of an organization, and those decrying the Supreme Court's ruling in _Citizens United_ that such organizations are protected by the First Amendment.

</comment><comment><USER37> Lieberman is an authoritarian scumbag and a traitor, his loyalties lie with Israel over the U.S.</comment>


Best way to learn C in 2019? - <AUTHOR> What would be a good reference to learn C language (I presume ANSI C) today? It used to be K & R book, not sure if that is still relevant. I'm not looking for a resource that's for programming  newbies but for someone who can already program in higher level languages. <comment><USER2> * K&R Book

* Some course/book that includes gdb/compilers/modern style ect [https://www.youtube.com/playlist?list=PLpIxOj-HnDsPZIJYO4U9f...](https://www.youtube.com/playlist?list=PLpIxOj-HnDsPZIJYO4U9f-xRI8bBadaso) which covers [http://csapp.cs.cmu.edu/](http://csapp.cs.cmu.edu/)

* The SEI CERT C Coding Standard [https://wiki.sei.cmu.edu/confluence/display/c/SEI+CERT+C+Cod...](https://wiki.sei.cmu.edu/confluence/display/c/SEI+CERT+C+Coding+Standard) combined with C Traps and Pitfalls [http://literateprogramming.com/ctraps.pdf](http://literateprogramming.com/ctraps.pdf)

Really any C book you can find combined w/SEI CERT standard, there's even a functional C book from 1999 [https://pdfs.semanticscholar.org/31ac/b7abaf3a1962b27be9faa2...](https://pdfs.semanticscholar.org/31ac/b7abaf3a1962b27be9faa2322038d1ac9ed7.pdf)

</comment><comment><USER3> The 2nd edition of K&R (ANSI C) is the only enduring tome on my bookshelf.

Assuming you have some solid knowledge, that should be all you need. I find reading [John Regehr's blog]([https://blog.regehr.org/](https://blog.regehr.org/)) is good to get the gist of under-specified behaviours by the various compilers and what to watch out for.

Having written that, C programs that I wrote 10-20 years ago, still work without any problems. So unless you are doing some tricky stuff, like kernels or advanced device drivers, I would think that K&R will suffice. Of course, it is always a very good idea to check the compiler's warnings and edit your programs to eliminate them.

</comment><comment><USER4> I have found 21st Century C to be a fairly current treatment: [https://www.oreilly.com/library/view/21st- century-c/97814919...](https://www.oreilly.com/library/view/21st- century-c/9781491904428/)

<comment><USER5> I bought this on your recommendation and have to say how great it is so far, readable, just opinionated enough, reasonably concise and very pragmatic, the exact opposite of every other C book out there. It's not great for completely new programmers but it's fantastic for everyone else.

That first chapter alone and the C shebang ([https://github.com/RhysU/c99sh](https://github.com/RhysU/c99sh)) walkthrough put together so many ideas I've never thought or heeard of. It makes C usable in ways that you'd typical use something like python for.

</comment></comment><comment><USER6> 1) Get a book on C++ and stop reading once you get to classes and other C++ features. 2) Read these in any order: "The C Puzzle Book", "Deep C Secrets", "Class Construction in C and C++" (shows what C is capable of without touching C++ features).

</comment><comment><USER7> I would still start with K & R. If you're solid with everything there, you'll be fine.

</comment><comment><USER8> [http://c-faq.com](http://c-faq.com) might help too!

</comment><comment><USER9> Go to 42

[https://www.42.us.org/](https://www.42.us.org/)</comment>


Cause of gray hair discovered - <AUTHOR> http://www.msnbc.msn.com/id/29468796/

<comment><USER2> abstract:

[http://www.fasebj.org/cgi/content/abstract/fj.08-125435v1?ma...](http://www.fasebj.org/cgi/content/abstract/fj.08-125435v1?maxtoshow=&HITS=10&hits=10&RESULTFORMAT=&author1=wood&andorexactfulltext=and&searchid=1&FIRSTINDEX=0&sortspec=relevance&resourcetype=HWCIT)

</comment><comment><USER3> Internet Explorer ?</comment>


Graceful exit for employees of failed startup - <AUTHOR> I am working on simple app to create employee profile board of shutting down startups, so their founders can share that board with network, VC to help employee get job at other startups.
Recruiters from other companies can also find people with immediate need of job which fits jobs openings.
Is is something startups can use? <comment><USER2> It sounds like a perfectly reasonable idea, and I would be happy if it actually works out!

However, I must admit that HR portals are rabbit holes that looks good on paper, but then fall into one of two problems: chicken and egg, or garbage data. You need to have very clear strategy of how both sides of the job market are encouraged to adopt a new "empty" platform, while making sure that job listings are actually clean, truthful, and relevant.

Are you saying that founders will input the resumes? It sounds like a lot of work, and not something I'd expect a person with a failing project on hand be able to do.

<comment><AUTHOR> Thanks for your input. I completely agree that both sides have to be reached in a proper way.

In MVP, I was thinking someone, may be a founder or person who can help, will fill simple details. Later stage, they can send invitation links to employees to fill in the details.

</comment></comment><comment><USER3> I know this already happens informally, so there is probably a niche there.

<comment><AUTHOR> ohh, that's nice. What is the informal process?Is it the same?

Probably there is niche, but m not able to validate this idea.

<comment><USER3> Generally it's a personal connection. Someone will here a startup went out of business and they know they were good at there jobs and get reached out to.

Sometimes the entire team gets hired all at once.</comment></comment></comment>


Expired links should be less common - <AUTHOR>

We recently released a new version that uses constant urls for vote arrows and reply links on comments.  This should make "expired link" messages less common, because the supply of closure ids won't run out so fast.
The new code is gross, as I feared it would be. In other applications you might be able to postpone this compromise.  The big problem for News.YC turned out to be crawlers.  They burn up closure ids as fast as real users, but the traffic you get from them is a function of the total size of your site.
We also made a few optimizations, so the site should be a bit faster. <comment><USER2> Do you think that continuations are the right model for web applications (does this model still offer enough advantages if you have to make sure that you don't have too many closures)?

<comment><AUTHOR> I think they're like using lists to represent stuff. They're good for exploratory programming because they're extremely clean and flexible. When your focus switches to efficiency, you can switch to other representations.

It's hard to beat closures for elegance. You say: generate a link, and if the user clicks on it, run the following code. There's so much less to think about. In a closure, state is implicit: if you refer to a variable defined outside its scope, its value stays around. When you switch to putting state in urls, you have to explicitly encode and decode each bit of state you'll need. You also have to worry about bad things someone might do by sending requests with different arguments. It's sort of like the difference between dynamic memory allocation and explicit malloc, times 10.

<comment><USER3> Would it be fair to say that the issue wasn't with closures and the web as much as it was with the specific implementation of closures in news.YC?

[edited for grammar / clarity]

<comment><AUTHOR> Not so much the implementation of them, but the fact that the site used so many. A crawler hitting some old item page with 20 comments on it would generate at least 40 new closures, 20 for the upvote links and 20 for the reply links. That adds up, now that there are almost 250k potential pages in the site.

<comment><USER3> Thanks for the explanation - This is useful for those folks out there who are working with webservers that utilize continuations. There has been a ton of discussion surrounding stateless and session based web development, but a dearth of information regarding continuation based web development; especially as it relates to sites that get a reasonably high level of traffic.</comment></comment></comment></comment></comment>


DragonFly 4.6 Released - <AUTHOR> http://www.dragonflybsd.org/release46/ <comment><USER2> There is a note on "SMP Performance", is anyone here knows about whether and how the BSD's support the 72-core/64-core Intel Knights Landing chip? I couldn't find any relevant information via google.

<comment><USER3> You should ask this question to Intel, nobody in the DragonFly team has access to such hardware. We have to do with boring alternatives we can actually find on Newegg like dual Xeon-E5 and quad-Opteron boxes :-)</comment></comment>


Mozilla Firefox 14.01 release notes... - <AUTHOR> http://www.mozilla.org/en-US/firefox/14.0.1/releasenotes/

<comment><USER2> I'm pretty happy about the click-to-plugin. I have to use java on two sites and absolutely hate it when any other page has java content. I already use flashblock to get this behavior with Flash, and having it for the media plugins would be great too.

<comment><USER3> I like it as well. For those who haven't turned it on:

      1. Go to about:config
      2. Set plugins.click_to_play to true

</comment></comment><comment><USER4> Really excited about the pointer lock API. Makes the browser a viable gaming platform now.

Edit: There appears to be a bug in the pointer lock code - not sure what's going on, but my mouse is getting locked into the wrong monitor if I move the Firefox window between monitors.

<comment><USER5> Yay, pointer grabs in user-supplied code! What could possibly go wrong?

[https://encrypted.google.com/search?q=x11+mouse+grabs+proble...](https://encrypted.google.com/search?q=x11+mouse+grabs+problems)

For those not familiar with the problems: pointer grabs are notorious for being a pain to deal with. They have many strange corner cases and security problems. They also have weird interaction issues with things like modal windows, popups, screensavers and the like.

<comment><USER6> My understanding is that the app must be fullscreen, and the user can always escape fullscreen and pointer lock with the ESC key. I guess there is a risk that the browser could hang in that state, though, which makes it even more important for Mozilla to focus on their browser's stability.

<comment><USER5> > My understanding is that the app must be fullscreen, and the user can always > escape fullscreen and pointer lock with the ESC key.

It is similar in other windowing systems. But, but...

You are in fullscreen mode with a pointer grab. An important window pops up over the full screen: "10 minutes of battery remaining". What is the state of the grab while this window is shown? Will the code holding the grab be notified of this window? How will the pointer grab behave while the pointer is over the other window? Will the other window able to gain focus with a click? Should windows over other fullscreen windows be allowed at all? In general, how will the pointer grab reflect on the OS windowing system's pointer grab?

Past windowing systems tells us that it is extremely difficult to get all this right if the code doing the grab and doing the window management are the same code, something that is not going to happen with web apps.

<comment><USER7> Since there's a good chance moving the mouse is moving some gun around in 3D space rather than any visible pointer, the answer should be the same as for normal 3D games: to use the pointer or other windows, you must press ESC.

</comment></comment></comment></comment></comment><comment><USER8> Glad to see the screensaver/power save inhibit API <https://bugzilla.mozilla.org/show_bug.cgi?id=697132>. I was surprised when HTML5 <video> didn't do that from the start

<comment><USER5> Yes, browsers should take responsibility for doing it without asking the web devs to handle it, with the possibility of messing it up.

Operating systems have spent years dealing with power saving policies and application requests for keeping the display/disk/music/connection on. After about 10 years we are now reaching a point where all this have acceptable defaults and decent GUIs to change the settings to suit one's needs. Now all this will have to be redone again inside the browser.

Shortly people will complain that the browser did not let the monitor sleep at the end of a video/movie. Or, in the future, that the browser did not prevent the computer from going to sleep while the music was playing AND that the browser let the computer to sleep while the music was playing.

</comment></comment><comment><USER9> No Retina support :( There is a temporary fix for that, but it requires layers.acceleration to be disabled.

<comment><USER10> Well you saw how long it took to get OSX full-screen support. I wouldn't hold your breath about retina.

</comment></comment><comment><USER11> Why the "..." ? Am I missing something?

<comment><USER12> It probably implies "yet another Firefox release (without many significant user-facing changes)..."

There seems to be a general grudge among somewhat technically-minded people against the entire phenomenon of new Firefox releases since Firefox switched to its frequent release model.

<comment><USER13> Not at all. Most people don't care about the frequent updates. I certainly don't. I get a daily update. There's simply a section of the geek population that likes to whine loudly. If you don't like Firefox's update cycle switch to Chrome.

<comment><USER12> If you read my comment slowly, you'll note that I didn't express any dissatisfaction with Firefox updates, and said "somewhat technically-minded people", which corresponds to your definition of "a section of the geek population".

</comment></comment></comment></comment><comment><USER14> So does this now use SPDY to connect to Google's servers by default?

<comment><USER15> Not just Google's servers, but any server where SPDY is available (e.g. Twitter).

This is handy: [https://addons.mozilla.org/en-us/firefox/addon/spdy- indicato...](https://addons.mozilla.org/en-us/firefox/addon/spdy-indicator/)

<comment><USER16> really though, just google's servers because google is the only spdy-enabled site where https is forced. twitter doesn't come in over spdy unless you type in https.

<comment><USER17> Twitter does have an "Always use HTTPS" option for when you're logged in.

</comment></comment></comment></comment><comment><USER18> Favicons are not displaying in the address bar... erm, WonderBar or MarvelousBar or whatever it's called now... AwesomeBar?

Anyway, they show up in the sidebar (e.g. a new bookmark) but not in the AwesomeBar. Maybe a an issue in combination with extension IdentFavIcon (0.3.4.7)?

I know, HN is not a bug tracker. But since the thread's already here.

<comment><USER19> They were disabled intentionally, now displays the "trusted" status. This was to avoid some malicious sites putting a lock icon, thus pretending to be "safe" sites

<comment><USER18> I actually had a moment of speculation in that direction, but then figured that it would be contrary to the trends/momentum in... I don't know, "design" and "image" and, well, "looking pretty".

Thanks for the information. And I'm kind of glad to read it. :-)

P.S. Shame on me, for not looking further into the release notes -- although I did take an initial look but didn't note this change.

P.P.S. <http://blog.mozilla.org/ux/2012/06/site-identity-ui-updates/>

</comment></comment></comment><comment><USER20> > Full screen support for Mac OS X Lion implemented

Aaaand fuck.

<comment><USER21> I still don't get why everyone is so pissed off about fullscreen.

OK, sure, with two monitors, it renders the second display useless. I get that.

So why don't you just not use fullscreen mode, and continue doing everything you've been doing with dual monitors since the days of OS X 10.0 ?

You lose nothing, and gain nothing, so it makes absolutely 0 difference in your workflow.

<comment><USER20> > I still don't get why everyone is so pissed off about fullscreen

1\. because it's garbage

2\. because applications which used to have a working fullscreen mode — such as firefox — and get converted to the Lion API result in no gain and lots of pain

> So why don't you just not use fullscreen mode, and continue doing everything > you've been doing with dual monitors since the days of OS X 10.0 ?

Like use fullscreen mode on Firefox, which has been there forever? Oh wait, now I can't. Just as I can't use fullscreen mode on, say, Quicktime X. Or have movies display on the big screen. I didn't really want them on the 27" anyway, the 15" is so much better isn't it? Pulls you closer to the screen, unless you don't care for the picture.

> You lose nothing, and gain nothing, so it makes absolutely 0 difference in > your workflow.

Yes actually: Firefox still had a fullscreen mode which actually worked correctly. Now it does not, unless there is some sort of hidden setting able to toggle back to the "old" API as there is in VLC.

<comment><USER22> FWIW, Mountain Lion will fix this and comes out in about a week.

It doesn't fix the fact that you're left with one (or more) useless displays in full screen mode, but it does let you choose which display to do the full screening on.

<comment><USER23> Unless I have missed an article stating otherwise, there is a lot of noise about it not being fixed in Mountain Lion:

<http://news.ycombinator.com/item?id=4235432>

<comment><USER22> The problem that remains in Mountain Lion is that you can only use 1 display at a time when in full-screen mode.

It's better than Lion in that you will be able to choose _which_ of your displays is used to go into full-screen mode, rather than always just using the 'main' display.

Disclaimer: I haven't actually tested in Mountain Lion, but this is the only consistent explanation I've been able to gather from careful reading of people's complaints and Apple's description of the feature change.</comment></comment></comment></comment></comment></comment>


Ember.js is driving me crazy - <AUTHOR> http://softwaresimply.blogspot.com/2014/01/emberjs-is-driving-me-crazy.html <comment><USER2> " but at some point I decided that the widget was no longer needed, so I commented out the widget's markup"

SOURCE CONTROL, DO YOU SPEAK IT?

In all seriousness, this is a major peeve of mine - the time that you're _most_ confident that code can be deleted is when you're removing the pieces that depend on it. If the deletion really turns out to be wrong, you should be able to restore the code from source control. If you can't, stop using broken source control.

Leaving leftover dreck in your source files "just in case" is like stashing your leftover sandwich crumbs in your pocket at lunch. Clean up your mess!

<comment><USER3> The mental effort required to find and pull the old code is far greater than that required to toggle a code comment, or just the line using that code. The author rightly points out bad behavior by Ember: Unused code should not affect program behavior.

<comment><USER4> In this day and age, why isn't there an automated way to keep file history? (like Dropbox does, but locally and with a decent interface) I am looking for something like that for Linux and my (admittedly short) research didn't turn up much.

<comment><USER5> Looked at versioning file systems? ([http://en.wikipedia.org/wiki/Versioning_file_system#Linux](http://en.wikipedia.org/wiki/Versioning_file_system#Linux)). They've been around for awhile. Can't say why we don't have any mainstream system-level filesystem yet, though.

You may also want to check out FUSE ([http://en.wikipedia.org/wiki/Filesystem_in_Userspace](http://en.wikipedia.org/wiki/Filesystem_in_Userspace)). Something on top of git may already exist. If not, it wouldn't be too difficult to create something like that.

</comment></comment></comment></comment><comment><USER6> I'm an experienced web developer (Backbone is my preferred framework) whose team is migrating to Ember. It has its high points, but on the whole, it's been driving me nuts.

Ember, like most modern frameworks, represents itself as MVC. But it's more like MVCLCTMRA (model-view-controller-layout-component-template-mixin-router- application, if you're following along at home). There are just so many moving pieces, and there's a lot of overlap between them. Should I be using a layout, a view or a component here? They're ALMOST the same, and they don't always vary in the places you'd expect them to. Also, the "model" portion, ember- data, is fairly immature and doesn't seem to be anywhere near production- ready.

There are also some design decisions that just leave me baffled. If templates are supposed to be the ideal place to declare stuff, why does a view's root element have to be declared in a bunch of JavaScript properties instead? Why do some of their camel-case names (e.g. RESTAdapter) violate the (fairly strict) naming conventions they enforce in user land?

I don't hate Ember, and I'm sure it perfectly fits the mental schema of at least one person on the planet, but it doesn't click all that well for me. And it's abstract enough that I don't think working through problems in it is making me better at anything except Ember.

It's also probably worth mentioning that about 80% of the documentation online seems to be in the form of StackExchange posts, and about 80% of those are obsolete, as Ember has gone through a lot of radical changes in the not-too- distant past.

<comment><USER7> If you're experienced with Backbone but want something that competes with Angular/Ember in terms of features, you should really try CanJS[1]. It has a small API surface area so it's very easy to learn but still manages to bring advanced features like Web Components to the table.

[1][http://canjs.com/](http://canjs.com/)

</comment></comment><comment><USER8> I've worked on large javascript applications written in Ember, Angular, JavsacriptMVC (now can.js), and jQuery and the conclusion I've come to is that things have not settled down in the world of front-end development enough to justify a framework as opinionated as Ember. For example, Ember relies very much on routing being handled a certain way. In fact, much of the magic in Ember comes from the fact that it's making a lot of assumptions about how routes are handled, constructed, and organized. This is great if you can assume that an app's routes will be written in a very traditional way, aka one route per page. It breaks down however when you want to tie different routes to two or more components on the same page (i.e. two different tabbed sections). One concern per route makes perfect sense on the server when serving a traditional stateful web application but it often doesn't make sense for rich desktop-style applications (which is probably why Photoshop doesn't have urls).

Data persistence on the client is another area I feel hasn't been nailed down in general and thus can't support a lot of opinionated assumptions. Should data be persisted at all? Ember caches data from all requests to the server in a "store", but it's not clear how you keep that cache up-to-date. Perhaps you could use websockets to keep resources current but at the time I was using Ember there wasn't a clear, well supported way to do that. I think the jury is still out on whether we should be duplicating our schema on the front-end at all but Ember-Data has gone all-in on mimicking ActiveRecord. Again, the dust has not settled in a lot of areas of the front-end development world as far as I'm concerned so I don't feel comfortable with these decisions being made for me.

I tend to lean toward convention over configuration. On the server I'm a big Rails fan but I feel like it's solving problems that aren't moving targets. On the front end I prefer Angular because it solves the main headaches (two-way binding, testability, modularity) of front-end development without being too opinionated about the stuff we haven't reached consensus on.

<comment><USER9> I'm confused. Are you proposing that web apps don't use URLs? If so, this seems pretty antithetical to the very nature of the web. One of the things that often aggravates people about web apps is that the back (and refresh) button is often broken because of a disregard for URLs. You can see Tom Dale give a defense of URLs here [http://2013.jsconf.eu/speakers/tom-dale-stop- breaking-the-we...](http://2013.jsconf.eu/speakers/tom-dale-stop-breaking-the- web.html).

As far as Ember Data goes, this is something that it's clear that a lot of people do indeed want. That said, you can use Ember perfectly well without Ember Data (see Discourse for example).

It's funny that you point to Rails as an example of consensus, because when you look at the server-side development community as a whole, there is certainly not consensus that the Rails way is correct. I wouldn't expect complete consensus on the client side any more than I would expect complete consensus on the server side. Rails (and others) have shown that you can have multiple healthy ecosystems each with their own points of consensus.

<comment><USER8> I'm not proposing web apps don't us URLs. What I am saying is that the lines are being blurred as to when a web app _should_ use urls and when they shouldn't. When I click a tab on a nested component in a larger page, should the url route there? Should the url route change when a modal pops up? If an accordion control slides open should the url change? Not sure? Neither am I. Routing on the web is not as simple as you're implying it is.

You're right about ember-data being optional but I mentioned it because it's what we were using on the project I was on.

I guess what I meant when mentioning rails was that there's a lot less change happening on the server-side than on the client-side these days so it's easier to confidently build an opinionated framework there. It's hard to favor convention over configuration when the very platforms you're targeting don't have established, agreed upon conventions.

</comment></comment></comment><comment><USER10> I attempted to use Ember in side projects for quite a while, really dove in. Sadly, I never got productive with it. My conclusion was that Ember works for super smart people with a background in traditional MVC UI architecture (different than MVC server architecture), but that mortals like myself probably aren't up to the task.

I moved from Ember to React, and it has been a joy. It does what I actually want: makes interfaces easier to develop, lets you build your interface by composing parts together, lets you write view functions that are as smart as you are (no crippled templates like Ember/Ng). It is basically a simple low level building block that makes a lot of other stuff easier.

Anyway, as a non-genius developer who nonetheless has written a lot of javascript, React is my strong preference. Their approach is beautiful and simple.

<comment><USER11> It might not be so much a genius vs non-genius thing so much as your particular app not needing the heavyweight app-state management that Ember provides.

It's worth pointing out that the Ember core team has been approached by the React core team with the intent of unifying React's view layer with Ember's application state management, which is a major component of what Ember offers relative to other frameworks. If you haven't had to solve major problems with navigation, routing, complex nested async logic, etc., for the particular app you're trying to build, then it sounds like React would get you most of the way there, but even the React team themselves realize that for medium-large scale apps, React's only going to take you so far.

<comment><USER12> Where did those discussions lead? "EmberJS merges with ReactJS" seems like a pretty exciting headline.

<comment><USER11> Ember's approach to watching for changes is pretty different. Also, the Ember view layer refactor codenamed HTMLbars has yielded some extremely promising (though admittedly early/premature) performance improvements that often outperform the React equivalent. So we're open to the idea and we have much we can learn from each other but we're not going to merge in React if we can do a better job :)

<comment><USER10> For me, and I think most people who get excited about it, performance isn't what attracts me to React. It is the semantics (is that even the right word?). The nice way it lets me think about things.

It looks to me like htmlbars is handlebars emitting DOM rather than string. In that case, I think it will be missing the benefits of React. Again, though, I obviously don't understand Ember well.

</comment></comment></comment></comment></comment><comment><USER13> Convention over configuration achieved with opaque magic can actually harm the dev process more than it helps.

<comment><USER14> Haskell: favor composition over configuration over convention.

<comment><USER13> It works well for JS, too. Favor function composition & higher order functions for code reuse over complicated prototype hierarchies.

<comment><USER15> function composition in js can be tricky to visually parse the "types" (especially if curried).

<comment><USER13> It depends on the return value, yes. I usually try to keep modules small and use some kind of threading (needle + thread analogy, _not_ os threads/web workers) strategy when building functions -- pulling out common patterns into globally visible utility functions that work with common types (e.g. jQuery events/objects).

It's not ideal, but in the absence of a true type system, it's all about mitigating potential problem areas.

</comment></comment></comment></comment></comment><comment><USER16> He points back to static typing, but honestly I think UI code is harder to keep organized than service code (which I presume is what the Haskell backend does). Usually it's the UI that has to swallow the biggest chunk of the mismatch between the programming model and the user model – and as you move to smarter clients like you would with Ember.js, you end up pushing nearly all of that to the client. And you have to start interfacing with substantial complicated pieces of code, like the browser, code that every UI has to not just use, but _negotiate_ with. All this complexity can be a way of coping with this system – not just coping with the system of a dynamically typed language, but all the many conflicting constraints in a browser environment implementing a UI for real people.

That said, there are differing opinions on which part you should "simplify" through a framework. Some of them are going to feel more magical than others. And when you come in with preconceptions about what makes a good environment, you're going to think about how the framework and environment lives up to your ideal. Some things you fix, some you leave as they are – and choosing the right battles is incredibly important. But service code and UI code are different sorts of warfare against complexity, I'd be skeptical of intuitions across the two domains. (None of which means Ember.js gets it right either – but if they don't, then I doubt the _why_ is _they just need a statically typed language_.)

<comment><USER17> I've actually wondered some of this myself. I think the answer is that it's some combination of both inherent complexity in UI code AND problems that you get with weak and/or dynamic languages. In any case, we're probably going to switch all of our front-end code to Haskell, so I should be able to make a comparison at some point in the future.

</comment></comment><comment><USER18> Zombie Code Apocalypse: I would love to help you identify what it is that caused that problem. I don't suspect that it is an issue with Ember itself, though note that the Ember resolver _will_ load code when you store it in `App.Foo(Controller|View|Route|...)` if that code is "needed" (say, by visiting the Foo route). So, unless you commented out the entire declaration it is entirely possible for that code to execute.

Spontaneously Changing Values: What was the key that you were trying to set? On what type of object (Route, View, Controller, etc.)? There are indeed some special values and it might be something that Ember can warn you of in the console as well as be documented. I'll be glad to make some documentation changes that make this issue easier to catch if you can provide me reproduction.

Godlike Refactoring: I work on a team with a widely distributed level of skills. One of my favorite features of Ember (which both has and will continue to save me hundreds of hours) is the fact that even if you make a mess of something you can generally come back and clean it up one piece at a time. My metaphorical description of this is that "all of the crap is in nice neat little piles instead of spread on the walls."

JavaScript.next: In the next/current version of JS both of these warts should be possible to resolve using Modules and Object.defineProperties(). I firmly believe that your complaints are not centered around Ember (which I honestly believe is insulating you from the worst of it) but instead from flaws in a language that was literally designed and built in an incredibly short time (my recollection is "a week" but I can't find a source).

(Edited for clarity based upon mixonic's reply.)

<comment><USER19> Just a nit for accuracy, but the implication that "the Ember resolver will load code when you store it in App.Foo(Controller|View|Route|...)`" eagerly is not true. I believe the author use an HTML comment to comment out his usage and not a handlebars comment, so the code was still being run (just hidden behind html comments).

But regardless, Ember will not load everything in the App. namespace blindly- it will wait until that item is required, then try to load it.

This is your helpful Ember #protip for the day. :-p

<comment><USER18> I've edited it for clarity based upon my original comment. :) I actually rely on this behavior every day because the app I've built uses require.js to load values into the `App.` namespace dynamically.

That being said, now that you mention it, it seems far more likely that the issue was HTML vs HBS commenting. As an aside, what is the default behavior going to be for HTML comments inside of HTMLBars templates? That seems like a really weird edge case to decide how to handle (for developers).

<comment><USER19> Oh my man, you really need to dig into the resolver! You can avoid the App. namespace entirely if you already use modules. This is what Ember-App-Kit and Ember-App-Kit-Rails already do with ES6 modules, just transpiled to AMD internally.

And yeah, I'm unsure of that the behavior will be in HTMLBars. I really hope it doesn't touch logic inside HTML comments- that would be quite nice.

<comment><USER18> We started on this project using Ember 0.9.6 (though we've managed to keep up with HEAD) and much of our architecture is predicated on the toolchain choices we've made. Our _first_ big task on our list after reaching feature-complete is to migrate to EAK, don't you worry. (We knew it was coming and adopted require to make it easier to migrate.)

</comment></comment></comment></comment></comment><comment><USER20> Scala dev here who sometimes needs to do some JS (though haven't worked with ember). I feel your pain! Static typing and functional programming certainly make ones life easier once a project becomes bigger.

Anyway, for future reference, you may want to learn how to use the JS debugger (both Chrome and Firefox are quite good). You could have set a break/watchpoint on the variable 'foo'. Once it has changed, you can inspect the stack and would have found that the set('bar', ...) method was involved. Should be much quicker than printf-debugging...

<comment><USER17> I use the debugger all the time. One problem is that when you're using Ember a lot of the call stack is cluttered with Ember internal calls, which obscures things. But even after I isolated the problem down to that line, the debugger still didn't help me fix the problem.

<comment><USER12> I seem to remember reading that chrome added the ability to "black box" libraries to remove them from the debugging call stack to help with situations just like this.

<comment><USER21> its still WIP, once they provide framework authors with what we need, rest assured ember will land it.

We are actually working close with the firefox and chrome teams, to drastically improved general JavaScript developer ergonomics when debugging.

</comment></comment></comment></comment><comment><USER22> I think this is the culture shock of not working with a compiled language.

I mostly work in compiled, statically typed languages, and it can be a bit of a surprise in Javascript when you don't find out about a syntax error until execution just stops, half way through your application loading, because of some code in a function you didn't think was called.

It's a surprise. But that doesn't mean it's wrong. We just aren't using the right tools - unit tests, JSLint, etc.

Question to regular JS users - what do you do 'in place' of static checking?

<comment><USER23> Yep, compilers turn out to be a pretty cool idea :).

I don't think anyone's doing anything 'in place' of static type checking exactly. Oftentimes I'll check if a method exists on an object before calling it. Usually when I'm "type checking" I really just want to know if an object has a certain attribute. That gives a fair amount of flexibility because polymorphism is built in.

I think by and large the errors that would be compile-time errors in a statically typed language are caught with unit tests (I use mocha). For front- end work, end-to-end testing has also gotten quite good and easy. Take a look at karma if you're interested in a good front-end testing workflow.

</comment></comment><comment><USER24> OK, so that's a very link baity way of saying. I don't know JavaScript or how to use source control and when I come across unexpected behaviour in my code I don't take the time to understand the cause.

JavaScript is hard, it's a very loose language and it's implementation in browsers sets you up for all sorts of falls. If you're going to code using it you either need to be disciplined or understand it intimately, preferably both. The problems in the article were not caused by Ember.js

</comment><comment><USER25> > The root of the problem is the system we were operating in: an impure > programming language with weak dynamic typing.

Is it really fair to blame this on dynamic typing? Having setters with side effects seems like a design decision to me, and not one that is easily supported. I would be interested in hearing an explanation of why this behavior is javascript's fault.

<comment><USER17> I'm not blaming it definitively on dynamic typing. I'm blaming it on the overall system of incentives that I have observed seem to come up a lot more frequently with impurity and dynamic and/or weak typing.

</comment></comment><comment><USER26> The things that are frustrating about writing an Ember app are the things that are frustrating about Javascript in general.

Those "set" and "get" calls are a great example: they're an unfortunately necessary workaround for Javascript's lack of real dynamic message dispatching (like Ruby's method_missing). We all look forward to ES6 fixing this.

The run loop is another example. It's a gross hack that wouldn't be necessary in a nicer language that managed its own runloop internally. Javascript developers who are ignorant of other paradigms often make the false claim that all the callback-driven asynchronicity is worth it because of performance, but they fail to realize that you can have exactly the same asynchronous architecture while writing code that _reads_ synchronously.

<comment><USER27> I don't see how this relates to the problems posted in the article. How does the lack of Proxy make the behaviour less confusing? Where does the author mention asynchronous behaviour and JavaScript's run loop?

<comment><USER26> I was just commiserating and sharing my own experience.

The problems posted in the article are really hard to judge because the author doesn't actually explain what happened.

In the first example, he doesn't try. Fair enough, it's a judgement call on whether to spend time understanding what happened. Personally, I would consider it high priority, because otherwise you have no assurance that the same problem isn't biting you elsewhere.

In the second, he says something that doesn't actually make sense: "Ember's set function has special behavior for values in the content field". I know Ember's source about as a well as anybody not in the core team, and that statement isn't even false. If I had to guess, I'd assume he's really saying something about how ObjectControllers behave as proxies for models.

I don't mean to write off whatever problems he encoutered -- they are clearly real problems, either bugs in Ember or failures of developer ergonomics. If he could point to the specific actual problems I would personally work on a patch to address them. But I don't have enough to go on.

<comment><USER28> I think you correctly identified the second problem, an example was posted below in a comment: [http://softwaresimply.blogspot.com/2014/01/emberjs-is- drivin...](http://softwaresimply.blogspot.com/2014/01/emberjs-is-driving-me- crazy.html?showComment=1390936989410#c8688033875190378438)

</comment></comment></comment></comment><comment><USER29> Hey, I'm Erik, an Ember.js core team member.

I'd be happy to help you track down the issues you came across and explain to you what is going on.

You can reach out on Freenode or Twitter, I'm @ebryn. Otherwise, email me at erik.bryn -at- gmail.

</comment><comment><USER30> I write a lot of ember.

It can, occasionally, be frustrating (for example run loop craziness), but in my opinion it's no more frustrating than working with any other stateful front end framework (WPF, backbone etc...).

<comment><USER13> I've done quite a bit of Ember as well, and lately I'm kind of liking React's approach much better. It composes well with many routing/model solutions, and keeps the 'run loop' isolated in the view layer.

</comment></comment><comment><USER31> The author mentions "The Fifth Discipline" a couple of times. Has anyone read it? Worth reading?

</comment><comment><USER32> Ember is just too magical. Handlebars alone is larger than a lot of competing MVC frameworks. Avoid.

</comment><comment><USER33> I'm not sure why the author blames JavaScript for deficiencies in Ember. He wouldn't have encountered the stated problems with Angular, I bet.

</comment><comment><USER34> Okay, so you had a problem with Ember.

But the whole leap to needing "strong static type system like Haskell" leap seems really random.

It seems more like a need to spend more time with JS (which can be weird and a pain, but eventually makes sense) than blame Ember, which is pretty complex on top of the various aspects of JS that are a bit unintuitive to start with.

</comment><comment><USER9> I understand the frustration of the author, but it's hard to tell exactly what the source of his issues is. Not enough information is provided in his descriptions to actually understand what is going on. I suspect that either he has run into a bug (which of course should be fixed) or that he's misunderstanding the behavior. It's very possible that he was given some bad explanations for the behavior which has further confused him. I've reached out to him to see if I can get some more insight into the details of the issues.

</comment><comment><USER35> Most of the author's issues could have been replicated in any static typing language, apparently the author is just angry and wants to blame something other then the developers of the framework that confused him in the first place.

Also the whole static typing reasoning is BS, because the author could have simply used either Google Closure Compiler Linter that can enforce typehints, TypeScript or Dart.

</comment><comment><USER36> Can anyone who is more experienced with ember help explain what was going on in those two weird examples in the OP? (Commenting a widget affecting another one and setting the "bar" field also changing the value of "foo" field)

<comment><USER9> In the first case, he was using an `ObjectController` without understanding the special behavior of the `model`/`content` property.

In the second case, he used HTML comments to comment out Handlebars code, not realizing that he should have used Handlebars comments.

<comment><USER17> To be fair, the documentation I was linked to doesn't say anything about the 'content' property behaving this way. It only mentions 'model'.

In the second case, it seems quite reasonable to assume it knows about HTML comments and that they would behave as I expect.

<comment><USER37> The docs for ObjectController (and ObjectProxy, which ObjectController extends) both mention the specific behavior about 'content' (not model, the fact that model and content mean the same thing when you're talking about proxying controllers is something you learn as you go along):

[http://emberjs.com/api/classes/Ember.ObjectController.html](http://emberjs.com/api/classes/Ember.ObjectController.html) [http://emberjs.com/api/classes/Ember.ObjectProxy.html](http://emberjs.com/api/classes/Ember.ObjectProxy.html)

Sorry to hear about the pain points so far. I felt like this many times when I was starting with Ember. It definitely gets better the more you become familiar with all the different conventions.

</comment></comment></comment></comment><comment><USER38> The issue is that JavaScript is being given a larger load to carry than it was designed to hold. We need to upgrade to using Ruby with Meteor-esque frameworks, and fast.

</comment><comment><USER39> At some point every programming technology of any power will drive you nuts. If it was so simple a non-programmer could do it, we would all be flipping burgers.

</comment><comment><USER40> Remember to use Handlebar comments in your templates, instead of regular html comments.

</comment><comment><USER41> Should have gone with Angular :P</comment>


Ask HN: Snap v Nitrogen v Lift v Compojure - <AUTHOR>

I feel like this is the new "Rails v Django" discussion, but I'm really new to functional programming languages. My only experience is a bit of PLT Scheme/Racket and OCaml in college, but I want to get back into it via web development. Everyone seems to lean towards Haskell, Erlang, Clojure and Scala over here so I'm curious to hear your experiences with their most popular web frameworks. Are they as analogous as a Rails v Django comparison? The only thing I can comment on is Lift appears convincing with their users list, but Scala seems like it would be a poor way to learn functional programming because it's not purely functional. <comment><USER2> Of the listed frameworks I only have (limited) experience with compojure, but here is my advice. I love functional programming, but i think that we've over- hyped it a little. As you know(i hope), there are no silver bullets. I wouldn't worry about a language being impure, purity is over hyped as well, clojure is also impure. What I used to do with clojure was to take a bunch of components(compojure, sandbar, hiccup etc.) and glue them together to make an app. I haven't been following the clojure scene for a while, but i believe thats the idiomatic way to write web apps, not the full stack style of rails or django, where you just fill in the blanks.

<comment><USER3> I wrote the majority of my startup's code in Clojure using compojure et al. and that is indeed the way you end up doing it. These pieces that you use together, however, didn't require any glue for me. Like all functional programming, you use the pieces that you need in your application. In general, compojure and hiccup will take care of just about everything you need. If someone wanted a full service rails-like package, though, conjure can give that to you.

The benefit of not using a one sized fits all kind of framework, is that you have immense flexibility. Want to write your templates in more of a PHP style? Use string template instead of hiccup. Want to do it like JQuery on the server, use enlive. You have tons of options.

That being said, it's definitely new territory and not for the faint hearted. You will have to feel your way around a bit, but at the same time there is an extremely active and helpful community. The guy who works on compojure, for example, often responds in a matter of hours.

Now having written a fairly sizable app in clojure, I'll happily say it's by far the best experience I've had writing a web app. Once past the rough edges, there's just something to be said for generating your html in manipulable clojure structures that can be mapped over and all sorts of other fun things.

</comment></comment><comment><USER4> I've been using Clojure and Compojure this weekend. So far it's a big thumbs down. Documentation is terrible. Pretty sure I just killed a weekend on an over-hyped development style with an under documented ecosystem.

Oh, and good luck finding a tutorial for any recent version of Compojure or any of the components. Seems they rearranged all the code and broke it out into several different projects, which makes all the pre-0.4 tutorials useless.

So far it looks like the most helpful resources are: <http://vimeo.com/8356990> [http://stackoverflow.com/questions/3122749/good- current-docu...](http://stackoverflow.com/questions/3122749/good-current- documentation-and-or-tutorials-for-compojure-ring-development) and [http://cleancode.se/2010/08/30/getting-started-with- compojur...](http://cleancode.se/2010/08/30/getting-started-with- compojure.html)

<comment><USER5> Piecing together the documentation can certainly be painful, especially if you are doing things that don't mesh with the norm (for example last time I was refreshing myself on enlive the tutorials for that had switched to mustache, while I prefer compojure) making things entertaining until you get back into the groove.

However for me I love the power that comes with the fact I can piece together the parts I want easily after some initial experimentation, as they are all built to be independent of each other. Makes the workflow more fluid.

Though if I were to even want more of an "all in one box" solution I would be more prone to use Scala + Lift right now.

</comment></comment><comment><USER6> There is a growing community with quite a bit of support surrounding scala particularly for web development. Lift is well documented and in production at Foursquare which is vote of confidence. The Guardian is also switching to scala as described here <http://www.infoq.com/articles/guardian_scala>. Plus Twitter, Yammer and a bunch of others are also using scala for "web related" development.

Overall I think as it exists now Scala has the best community particularly around web development. Much like the Django v Rails debate try them out and see what you like.

I know personally scala is second on my list behind Ruby.

</comment><comment><USER7> There's definitely some subjectivity and it comes down to what you want from a language and framework. I think Haskell is the best way to learn functional programming because it's pure, has a powerful type system and helpful community, and it's easy to use it to replace shell scripts. One of the things that really bothers me about JVM based languages is the startup time that makes it painful to use them as shell scripts, but if you're just writing a web application this might not be an issue.

If you decide to go with Haskell then you need to decide what kind of framework you want. I started with Snap and it I enjoyed using it but it doesn't have the high level functionality that Rails or Django do. I'm now using Yesod and it's great. It seems very Haskelly to me and the high level functionality means I don't have to write my own authentication system and persistence layer.

<comment><USER8> <http://github.com/icylisper/jark>

<comment><USER8> Project Website: <http://icylisper.in/jark/>

<comment><USER7> That looks interesting, but at least for the near future solutions like that aren't good for things you want other people to run without having to do a lot of work. That said, I'll definitely look into using that as I learn Clojure.

</comment></comment></comment></comment><comment><USER9> Regarding Clojure, while compojure is popular, a compojure centric view of web programming is misguided. Compojure is part of a growing ecosystem of libraries built on top of ring[1][2].

Firstly this ecosystem is not analogous to rails or django. The closest is that Compojure is similar to Sinatra i believe.

If you are looking at getting started with web programming in Clojure you need to get familiar with ring (the http abstraction) and look at Compojure and Moustache (routing and handler composition), and Enlive[4] and Hiccup[5] (templating/html generation). Compojure and Moustache are fairly similar, but Enlive and Hiccup are extremely different. A web application will consist of ring plus one of each layer.

As has been mentioned by others in this thread, the depth, breadth and currentness of documentation for these libraries varies. David Nolen has a great tutorial for enlive[6] that i would encourage anyone looking at these libs to work through. Enlive is one of the most compelling aspects of the clojure web ecosystem at present.

These libraries provide the core pieces you would expect to see in any web framework, but a lot of the smaller details are missing. Of note there is no ORM for clojure (for obvious reasons) - If you are looking for a good SQL abstraction you should look at ClojureQL[7] - and aspects such as form generation, validation and processing is still in early days.

My day job has me building web apps with Django. I wouldnt suggest that my coworkers and I jump to clojure / ring et al yet. The breadth of libraries and out of the box stuff in django is still a huge advantage for the day to day rapid web site / web app development, however clojure's story is improving rapidly and i think that the functional model is a particularly good fit for web applications.

I cannot compare clojure's story with the other languages and frameworks mentioned.

      [1] https://github.com/mmcgrana/ring/
      [2] This is true of compojure 0.4 and newer. compojure existed prior to ring (with hiccup as part of it).
      [3] https://github.com/cgrand/moustache
      [4] https://github.com/cgrand/enlive
      [5] https://github.com/weavejester/hiccup
      [6] There is a link in the enlive readme
      [7] https://github.com/LauJensen/clojureql/

</comment><comment><USER10> RE: Nitrogen. I've started using an Erlang RESTful HTTP toolkit called Webmachine (<http://webmachine.basho.com/>) paired with an Erlang-based distributed key-value store called Riak (<http://wiki.basho.com/>) and I am very pleased with the ease of using these libraries. However, I can't offer you a comparison with other functional languages as I only have experience with Erlang.

I'm starting an extended and thorough series of technical articles regarding deploying Webmachine and Riak on Amazon Web Services on my personal website. Over the next week feel free to follow the articles and see what you think of Webmachine/Riak!</comment>


Why can't self-driving cars see cyclists? - <AUTHOR> https://www.bikerumor.com/2018/02/07/why-cant-self-driving-cars-see-cyclists/ <comment><USER2> Technology could be the solution - I'd gladly stick an RFID tag on my bike, if it meant the self-driving cards could 'see' me better. I wear a helmet, special clothes, reflective jacket etc. Why not defense against annihilation by self-driving cars?</comment>


How a Florida kid's "stupid app" saved his family's home - <AUTHOR> http://pando.com/2014/04/30/how-a-florida-kids-stupid-app-saved-his-familys-home-and-landed-him-on-the-main-stage-of-facebooks-f8/ <comment><USER2> What I love about this kid is that he admits it's a "stupid" app. If we could get a lot of SV to admit the same thing, perhaps we'd have a healthier culture.

But no, it's business-y-fake-success-killing-it-bullshit all the way down.

<comment><USER3> It's easy (or easier) to call your own app "stupid" when it's a single-person effort. As soon as you bring on other people to help, it's hard to call it "stupid" \- not because the app changed and not because you think it's any less stupid at that point, but simply because by calling it "stupid," you're ascribing the label to someone else's work (which may or may not be welcome).

For a team to maintain that perspective (that their app is _not_ going to solve world hunger any time soon) requires some real humility and open communication. You've got to take it seriously enough to produce quality work, but not so seriously that you convince yourself it's anything more than a stupid app at the end of the day.

<comment><USER4> You know the biggest reason for Steve Job's success was his ability to call stupid things stupid.

<comment><USER5> What‽ Steve Jobs called all his projects "revolutionary", "amazing", and other hyperbolic adjectives. Remember his speech to Sculley? "Do you want to sell sugared water for the rest of your life? Or do you want to come with me and change the world?" He believed that what he did was changing the world.

</comment></comment></comment></comment><comment><USER6> As much as I like the story, those stories are like exceptional lotto millionaire stories which keep the app rush alive, despite growing stats that overwhelming majority of app entrepreneurs can't make enough for a living, just with one app. So other kids, don't put too much hope on the possibility that you could do the same. But it could help you land a nice job..

<comment><USER7> > But it could help you land a nice job.

That's the advice I give to aspiring app store millionaires: on average there's no money in the app store, but there's plenty of money to be made making apps for someone else. Throw something on the store that's above the level of flashlight app, and point to it when in contact with a potential employer. There is no ??? step, you just move straight to Step 4: Profit.

<comment> FLUX-YOU Can't be that easy. Maybe if the employer is looking to pay you 10 an hour.

<comment><USER8> Well, your resume has to pass the filters, you still gotta do several phone screen interviews (at least one hour long, technical one), three panel interviews, an all day technical interview, and a 6 month "paid" (sorry, below market value) trial period.

Then you can get the job. The App only appears to help.

</comment></comment></comment></comment><comment><USER9> It's pretty alarming that the net financial outcome of all his efforts and 4Snaps' popularity and success is not enough to even pay his private school tuition. No doubt the intangibles will transform his life (network, fame, Zuckerberg, experience, etc...), but as a commentary on the viability of the app store for monetary gain in games, it's pretty bleak.

As a developer, it was wildly successful (can't overstate that enough). As an entrepreneur, it was a big failure. If, as an entrepreneur, you're jealous of his success, you need to reevaluate your priorities and consider a change of profession.

Too much Silicon Valley navel-gazing here.

<comment><USER10> I think of it as Google and Apples failure mostly. Current app stores are terrible for new app discovery. Even for games which used to be a lucrative market a couple of years ago there seems to be just a handful that take in most of the money - which causes Google and Apple to showcase them more hiding all the new interesting lesser known apps.

</comment></comment><comment><USER11> You know what, this is a wonderful age we live in. A 13 year old kid can make money off iOS apps, at 17 they can make _serious_ money.

When I was a kid the best I could do was have opensource stuff out there used by thousands of people. Personal gratification was high, but my wallet never got anything out of that, there just weren't any decent distribution channels for non-free stuff. And this was less than ten years ago.

Kudos to the kid!

<comment><USER12> A wonderful age indeed. I see building apps becoming the new "lemonade stand" for kids.

<comment><USER13> ... there's slightly more work involved in one of those things.

<comment><USER14> Indeed, those lemons don't cut themselves and have you seen the price of sugar these days?

</comment></comment></comment></comment><comment><USER15> "[It] was the most stressful time of my whole life," Sayman says. "It will help me as an adult in the future because I learned how to be [stressed]. Now I understand adults completely."

This quote makes me want to drop everything and walk off into the forest.

</comment><comment><USER16> Do you have any advice for kids who code? I am 14 years old and I started programming when I was 12. I primarily write open source software.

<comment><USER17> Log out of this website, turn away, and never come back. Assuming you want to keep your coding as natural, fun, and creative as possible. You likely don't have the awareness and wisdom yet to remain untarnished by the many garbage influences you'll find on a site like this.

Keep doing your own thing and building confidence in exploring your own paths, because there's a whole world out there that's going to tell you how things _should_ be done and what defines success (to _them_ ). They're even going to sound really smart and appear to be doing things right based on some metric for "success", but only _you personally_ can figure that out for yourself. It'll be harder to wrestle with figuring out your values, but will be far more worth it in the end, always stay true to what _you_ want to do.

Once you build some confidence and consistent integrity in your values and your own life approach, then come back.

<comment><USER18> This, a million times.

@caffinatedmonk I can't tell you what to do, but I can tell you what I regret. I regret not learning the boring structure of programming. The general terms and ideas about programming languages, computer science terminology, low-level stuff like kernel and operating system design (and thus hardware design), even some of the math to understand and talk about algorithm efficiency. All of that is necessary once you get a little older and want a really cool, creative job. Most of us put off learning the boring stuff because it never seems as important as the fun stuff you can do now, and then we have to deal with those consequences later in life.

Also, i'd suggest you keep working in open source. There's a lot of professionals and good best practices to be found in open source software. Important stuff that seems to be missing in the code released on HN (another reason to get out now!). Follow the good open source examples, make some cool things or contribute to others' projects, and start building a mini resume out of code you've done.

As more practical advice: you can learn programming languages like .NET, Java, C++, PHP and Python if you want to get crummy corporate jobs that are a dime a dozen. More fun stuff will probably be in some obscure language. Figure out what _kind_ of programming excites you, then look into what kind of projects there are like that out there and what languages and tools they use.

Oh, and for god's sake have some fun. Computers aren't everything. Go outside, climb a tree, read a book, hang out with people. Computers will last forever; youth won't. (Sorry, I know that's off-topic)

<comment><USER16> Thanks! I have been trying to stay away from structural information but recently I have wanted the contribute to the uofw/uofw project. This project aims to completely reverse Sony's PSP firmware. This requires me to learn MIPS ASM which requires me to learn the structure, general terms and ideas of computer science.

Your last point, about having fun, is a good one. Lately, I have been very busy with school and programming. Between my school work and my programming, almost all of my day is consumed. You have a good point.

Thanks for the advice!

</comment></comment></comment></comment><comment><USER19> > His father lost his job, and in 2012 their family home was foreclosed on.

> They had to move into a much smaller apartment, and at the age of 16, Sayman > found himself in the strange situation of helping his parents make the > mortgage payments on the new place.

This part sounds strange to me.

<comment><USER20> You missed the phrase "He also started pitching in for his and his sister's private school tuition." What kind of family, so obviously down in luck, would pay to have a member of their family go to a private school?

<comment><USER21> A family zoned for a very low-performing school -- not uncommon in South Florida.

<comment><USER20> I am from Canada, where such a thing is almost unheard of. Private school is considered a luxury.

This is a culture I'm very much unfamiliar with. Thank you.

<comment><USER22> And really, I've only ever seen rich kids with minor substance abuse problems get sent to private school.

<comment><USER21> That just tells me that you've never lived in a city with truly atrocious public schools like Detroit, Newark, or New Orleans.

In those cities, any caring family who can beg, scrape or borrow the funds sends their kids to private schools, including most middle class families, and many poor families (off a combination of scholarship money and extended family contributions).

</comment></comment></comment></comment></comment></comment><comment><USER23> The tone of this article is hilarious. Someone made an app, all by themselves! With no VC help! It's amazing! It wasn't that long ago that in the wreckage of the first .com bubble people could make websites, then apps, without millions in funding. This story is awesome, this kid is awesome, I wish stories like this weren't such "news".

</comment><comment><USER24> What a ridiculously overwrought writing style. This is why Pando is terrible:

> Instead, it took _sheer force of will_ and a refusal to back down to any of > the obstacles he faced. That, and an _unholy faith in the power of Google_ > to answer his questions.

Don't get me wrong, this kid is pretty awesome, and I'm happy for his success. But let's be serious: He got lucky with a silly fun app that caught on.

<comment><USER25> Did you even read the article? What I found most striking was the he didn't just "get lucky" ... he may have gotten lucky once but he had numerous setbacks that he had to overcome, and did so very creatively.

From his creative Instagram marketing, to his deals to get a server, to his numerous app enhancements and rewrites to address problems, he's got a lot more than "luck" on his side.

Your could argue the Flappy Birds guy got lucky, but this kid had multiple successes, setbacks and kept (and keeps) fighting to move to the next level.

</comment></comment><comment><USER26> Neat to see the community and parental support a kid who's willing to go outside of the usual methods of learning (school) and do things on his own. Not a real fan of the article though, seems unnecessarily patronizing to me: "His braces give him a charming little lisp." Really?

<comment><USER27> (perhaps? (= it '(a pun)))

</comment></comment><comment><USER28> "I knew this was going to be a huge app. I knew it because my sister liked it before it even existed."

Must be wonderful to have a validated idea fall in your lap like that!

</comment><comment><USER29> Is anyone else surprised by the quality of reporting from Pando on this one? I thought it was all SV link-bait but this reads like real, actual news.

</comment><comment><USER30> Honestly, this is cool. A lot of kids just sort of "stumble" into all of this and it's inspiring in a way.

</comment><comment><USER31> It isn't clear from this article... is there an Android version of his app? Or is he iOS-only?

</comment><comment><USER32> what a great story. chapeau, young michael. you are the unstartup!</comment>


How to Replace an Else-If Sequence with an Elegant Ternary Operator - <AUTHOR> https://www.fluentcpp.com/2018/02/27/replace-else-if-ternary-operator/ <comment><USER2> What that ... there was no need for a gratuitous picture of a woman to clarify what "cute" means.

Google Image search shows that it's a stock photograph, also used at [http://orangenaturals.com/blog/teaching-positive-self- image/](http://orangenaturals.com/blog/teaching-positive-self-image/) ("Marci Warhaft is teaching young people how to love themselves"), [http://www.inspiredlivingaffirmations.com/beauty-is-when- you...](http://www.inspiredlivingaffirmations.com/beauty-is-when-you-can- appreciate-yourself-when-you-love-yourself-thats-when-youre-most-beautiful/) ("6 Ways To Feel Good About Your Body"), , [http://horoscopean.com/heres-deal- heartbreak-based-zodiac-si...](http://horoscopean.com/heres-deal-heartbreak- based-zodiac-sign/) ("Here's How You Deal With Heartbreak, Based On Your Zodiac Sign"), [https://childrenandmediaman.com/2016/08/03/tween-girls- perce...](https://childrenandmediaman.com/2016/08/03/tween-girls-perceptions- of-the-just-right-body-ideal-and-what-it-means-for-them-socially/) ("Tween girls' perceptions of the "just-right" body ideal and what it means for them socially"), and more.

That last link uses the photograph to illustrate the social pressure, including from media, for tween girls to look a certain way. In that context, its use now for a programming blog gives an example of how that social pressure may manifest itself.

As to the topic at hand, the code I would prefer is:

      static inline char get_display_char(int x, int y)
      {
        if (x + y >= 30) return '.';
        if (x + y >= 25) return '/';
        if (x + y >= 20) return 'o';
        if (x - 3*y > 0) return '|';
        if (x - y > 0)   return '\\';
        return '_';
      }
       ...
      for (int y = 0; y < 20; ++y)
      {
        for (int x = 0; x < 20; ++x)
        {
          std::cout << get_display_char(x, y);
        }
        std::cout << '\n';
      }

</comment><comment><USER3> Clever. (In code, that's _not_ a compliment, it's the opposite of "readable": no value is added, yet the code's intent is obscured)</comment>


SDN with a secure blockchain-enabled packet parser - <AUTHOR> https://www.sciencedirect.com/science/article/pii/S0167404819301762 <comment><AUTHOR> another blockchain peddling BS paper. seems like this is the state of current academia.</comment>


Computer learns language by playing Civilization V - <AUTHOR> http://web.mit.edu/newsoffice/2011/language-from-games-0712.html

<comment><USER2> It's actually FreeCiv, based on Civ II, not V. The researchers needed to be able to modify the source to let the agent read messages from the screen.

Direct link to the paper: <http://people.csail.mit.edu/regina/my_papers/civ11.pdf></comment>