Concurrent Memory Deallocation in the Objective-C Runtime - <AUTHOR> http://www.mikeash.com/pyblog/friday-qa-2015-05-29-concurrent-memory-deallocation-in-the-objective-c-runtime.html <comment><USER2> That's a cool GC algorithm, but it has two big drawbacks:

1\. It works well only if the number of GCed data structures -- i.e. the number of entry/exit points -- is relatively small (in this case, just the method cache).

2\. It prevents inlining of the data structure's access functions, which adds quite a bit of overhead to each access (though not as much as two fenced CASes).

It can, however, be very useful for hot code swapping (provided there's no inlining or you have a JIT that can un-inline).

<comment><USER3> I think the way to look at this is more of as a synchronization technique as opposed to a general-purpose GC algorithm.

I don't understand the objection about inlining--could you explain? You could in principle not use function boundaries to delimit the critical section: a range of PC addresses within a function would do just as well.

<comment><USER2> > a range of PC addresses within a function would do just as well

Yes, but you'll need to know where those ranges are (i.e. you'll need some feedback from the compiler), and then be very careful that no tool injects any instructions into, or moves code around your executable/library.

</comment></comment></comment><comment><USER3> Fascinating. I had never considered sending signals to stop all threads and check their PCs as a synchronization technique. But it works, and it brings down the uncontended lock acquisition and release time down to zero in the case where no synchronization needs to be performed.

Now I'm trying to think of other places to use this trick. :)

<comment><USER4> It isn't actually stopping the threads. The thing to understand is that you don't need to ensure that all threads are outside of a critical section at the time you free the cache, what you need is the weaker guarantee that all threads have to have exited any critical sections they were in at the time of the pointer swap before you can call free.

You don't have to do anything heavy weight like stop all the threads, instead you can just pull their PCs out and check them. Sure, they may have moved on (and even back into the critical section) by the time you call free, but it doesn't matter because they'll be using the new cache buffer. The downside is that you might get false positives for the critical section, but you can either run the dealloc in a loop or defer it and try again later.

<comment><USER5> No, you pretty much have to stop them. If you observe the PC of other threads at a point in time while they are running, that is no guarantee that they aren't _about to enter_ the unsafe region immediately after you make the check.

Your suggestion sounds akin to replacing a mutex acquire with an "is the lock held?" [like trylock with 0 timeout, then immediate release]. Observing that it's unheld at time _t_ makes no guarantee it won't be held by the time of your next instruction. It therefore becomes a meaningless check, not useful at all for real synchronization.

[PS: mentioned this on HN before, but my favorite "observe the PC as part of a synchronization primitive" hack was this one from Linux on armv5: [http://lwn.net/Articles/314561/](http://lwn.net/Articles/314561/)]

[PPS: How much does objc_msgSend() do inline and how much is external calls? This PC hack seems like it could have huge holes if some of its critical work is done in a non-inlined function.]

<comment><USER6> Hmm? No I don't think you have to stop them.

Basically you have:

        cache = <newval>
        if ok() {
            free(<oldval>)
        }

The problem you have is if anyone is still using <oldval> at the point you free it. So:

        // maybe someone here gets a reference to <oldval> (1)
        cache = <newval>
        // from this point onward no one can reference <oldval>
        if ok() {
            free(<oldval>)
        }

So ok() only has to check if threads have a reference to <oldval> that they are still using.

Imagine ok() pauses all threads. It sees if any threads threads are in BAD=[PC_BAD_START, PC_BAD_END]. If yes, return false, if no, return true.

Now imagine PC doesn't pause the threads. What can happen?

A thread that was in BAD leaves BAD. That's fine.

A thread that wasn't in BAD enters BAD. But that will use <newval>, so that's fine too.

That thread that was in BAD leaves BAD, and then reenters. That's also fine.

So there's no problem.

(re your question, I believe objc_msgSend is hand optimized assembly that doesn't make any function calls; if it did, you'd just have to make sure to include those functions in the range of bad PC addresses.)

<comment><USER5> > So ok() only has to check if threads have a reference to <oldval> that they > are still using.

Right. The problem with doing this while other threads are running is that ok() can return true, correctly so for its point in time, then _immediately after_ ok() returns another thread could enter objc_msgSend() while you are inside free(). Maybe ok() ran on thread A while thread B was right at unrelated function foo()'s "call objc_msgSend" instruction. The check is OK at a point in time, but perhaps by the time you enter free() thread B did an unsafe read.

> A thread that wasn't in BAD enters BAD. But that will use <newval>, so > that's fine too.

You can't make guarantees that it will see newval. Whether or not it does depends on timing. For example, maybe the guy who calls ok() gets a page fault or is on a very busy CPU with lots of preemption happening. That will alter timing in the direction of this being unsafe. Cache coherence may also be an issue here.

<comment><USER6> You have to be atomically reading and writing cache (which you can do). So then after

        cache = <newval>

...any future reads of cache will use <newval> (or <newer-val>, but not <oldval>).

That's what makes the trick work w/o having to pause threads.

<comment><USER5> > cache = <newval>

As written, that is _not_ a guarantee that all cores will see <newval> immediately. It's very CPU-specific but you may need memory fences to achieve this.

Further, in my opinion it's kind of playing with fire.

Edit: Also, it is my impression reading the article that <oldval> is actually a shared list of old caches to be freed (gOldCachesList). That makes it a lot more complicated than your example snippet and leaves more potential for nasty synchronization problems.

<comment><USER7> Strictly speaking you're right. However it's not necessary that other cores see the new store immediately: it's only necessary that they see it before the memory is freed, which occurs after a substantial delay sufficient to prevent these out-of-order issues on other CPUs. This is the technique by which memory barriers are elided on the read side (but not the write side).

<comment><USER8> This is both clever and terrifying :). How do they prevent compiler from scheduling the load early, observing, and using the stale cache pointer? Do they have at least a compiler fence on the read side?

<comment><USER9> The read-side code in question is hand-written assembly code, isn't it? And on the hardware side, observing pc will probably result in an actual memory barrier happening anyway (even if no signal is sent internally the kernel must still suspend the thread to capture register state, and then it needs a barrier to communicate that result back to the asking thread).

<comment><USER8> Yes, perhaps that part is in the hand written assembly portion that's mentioned.</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment>


Iran's blogfather: Facebook, Instagram and Twitter are killing the web - <AUTHOR> http://www.theguardian.com/technology/2015/dec/29/irans-blogfather-facebook-instagram-and-twitter-are-killing-the-web <comment> aaron-lebo _But hyperlinks aren't just the skeleton of the web: they are its eyes, a path to its soul. And a blind webpage, one without hyperlinks, can't look or gaze at another webpage – and this has serious consequences for the dynamics of power on the web.

More or less all theorists have thought of gaze in relation to power, and mostly in a negative sense: the gazer strips the gazed and turns her into a powerless object, devoid of intelligence or agency. But in the world of webpages, gaze functions differently: it is more empowering. When a powerful website – say Google or Facebook – gazes at, or links to, another webpage, it doesn't just connect it , it brings it into existence; gives it life. Without this empowering gaze, your web page doesn't breathe. No matter how many links you have placed in a webpage, unless somebody is looking at it, it is actually both dead and blind, and therefore incapable of transferring power to any outside web page.

Apps like Instagram are blind, or almost blind. Their gaze goes inwards, reluctant to transfer any of their vast powers to others, leading them into quiet deaths. The consequence is that web pages outside social media are dying._

Best part of the piece, imo.

<comment> open-source-ux A lot of sites seem terrified that users might (gasp!) leave their site to go elsewhere. The result is ridiculous articles like this: _42 startups that grew to be worth billions in 2015._ Not a single link to any of the comapnies mentioned in the article.

[http://uk.businessinsider.com/new-billion-dollar-startup- uni...](http://uk.businessinsider.com/new-billion-dollar-startup-unicorns- in-2015-2015-12)

Another horrible trend is to hide links behind Javascript. Simple Hypertext links should _never_ require Javascript to be clickable, on many websites they very often are.

<comment><USER2> Pet peeve: pdf links on google. When you want to mail someone a link to a pdf you search for the pdf, then copy-and-paste the link from the results page and _boom_ a whole screen full of garbage and a link that is next to unusable instead of the actual link to the document.

Super annoying.

<comment><USER3> Actually, this happens for all Google results, not just PDFs.

<comment><USER2> With a normal result you can just click on it and then cut-paste the URL to your email. But with a pdf the link will simply start a download without ever showing you the link.

<comment><USER3> Hm, I hadn't considered that. I use Chrome, so for downloads I can press Ctrl+J and copy the link from the Downloads page.

</comment></comment></comment></comment></comment></comment><comment><USER4> It seems the real shift is from the web's nodes being ideas/text, to being people/personas. Guided and organized not by what is said and the relationship of ideas, but by who said it, their relationship to me, and what liking it says about me. From ideas to identities. From the message to the messenger.

The author nailed it when talking about "two of the most dominant, and most overrated, values of our times: newness and popularity" and the shift from a book to tv mentality. The newness/TV aspect is another way to look at FOMO...these things are exploiting deep fears about group status and exclusion.

I don't think this means the death of ideas, but they are secondary now and spread when tied to a story/hero's journey involving a strong persona. Ironically, the author has a great one in being imprisoned for his ideas then freed.

<comment><USER5> "It seems the real shift is from the web's nodes being ideas/text, to being people/personas."

Brilliant.

I would add that just this point in itself is a sufficient reason to stand up for an internet whose technology and culture allows you to be anonymous

</comment></comment><comment><USER6> I'm sympathetic to this point of view—I write one blog and contribute to another!—but at the same time, it's not really FB, Instagram, and Twitter that're killing the web—it's _us_ , every day, with every choice we make. Every time we fire up Facebook we choose to enable the proprietary web instead of the open web.

It's fun pointing at corporate villains. I've done it. But it's more true and less satisfying to say that we enable the online world that has come to be.

<comment><USER7> Given that this is the Y-Combinator news aggregator it's much worse than "us" choosing to use these services. Most of us here would love to be a substantial part of the next Facebook, Twitter or Instagram. I am sure the vast majority here would do everything they can to make it happen if they thought they had an idea that could turn them into the next Mark Zuckerberg, Steve Jobs or even "just" Evan Williams. I've been ranting about Facebook being the new AOL since at least 2009 and yet I would become an unstoppable force in order to create the next one.

<comment><USER5> I disagree. I think of this community as driven as much by intellectual thirst as it is by entrepreneurship.

I tried working for a start up and I hated it. But I love YC news for everything the web has ceased to be,

Interesting and intellectually engaging Quick to load Simple UI Strictly text

Which was the internet when I first encountered it I all its 28kbs glory (with songs gifs)

</comment></comment></comment><comment><USER8> The author also published a related article on the Matter publication on Medium titled. "The Web We Have to Save": [https://medium.com/matter/the-web- we-have-to-save-2eb1fe15a4...](https://medium.com/matter/the-web-we-have-to- save-2eb1fe15a426?mod=e2this#.6gdnjidkp)

His writing can be found on his personal site: [http://hoder.ir/en](http://hoder.ir/en)

<comment><USER9> And the same article was previously discussed here on HN at [https://news.ycombinator.com/item?id=9994653](https://news.ycombinator.com/item?id=9994653)

</comment></comment><comment><USER10> Forgive me for lacking the time or energy to read this article. I've read a previously posted on HN piece by the same author on the same subject, though.

Those three services are quite different. Instagram is a stream of photos, nothing more, nothing less. It's not a site that links outward, it's not even a site you really link to. It is simply pretty pictures. There's nothing wrong with that, really. Instagram doesn't want to and doesn't need to be a communication tool.

Facebook is website for keeping in touch with friends and relatives, organising your social life, viewing advertising videos, viewing plagiarised YouTube videos, and viewing sponsored BuzzFeed videos. It doesn't link outward much because that's not really what it's useful for. Facebook wants to deliver you a stream of mostly garbage, addictive and not-entirely-unpleasant content. It's almost useless as a platform for real communication, and nobody should expect it to be one, they'll be disappointed.

Twitter is a website for following people who interest you, and sharing things with people interested in you. Twitter, unlike Facebook or Instagram, is actually very outward-looking: Twitter is a huge source of links to other websites. People use Twitter to share pieces they find interesting, to share content they have created, to comment on pieces they have seen. People use Twitter and end up finding new and wonderful websites.

None of these are killing the web in the end.

<comment><USER11> Who is then? What is then?

<comment><USER10> Perhaps people choosing to use sites which are inward-looking. It's not really the sites themselves' fault.

And this really is a choice thing. Many people (myself included) can't afford not to be on Facebook, but I'd argue we do have the choice of whether or not to use it much.

</comment></comment></comment><comment><USER12> I wonder if there is really a smaller blog audience now than before.

Or is it that a massive number of people have arrived to the Internet knowing only the FB, IG, and WA apps. Those people don't quite get it yet. Some of them are new because of finances. Computers and routing equipment too expensive 10 years ago. The smartphone has brought massive numbers of new arrivals.

I think the problem could be app stores. Could be paid search results.

But these are short term problems. I think eventually all these new people will discover blogs. And podcasts.

Just like people these days are discovering grunge rock, and mullet hair. Or at least they were 8 years ago - last time I had a look.

<comment><USER13> I think it's the majority of people won't ever pay $10/year for a domain name. If domain registrations were free, that might help save the Internet as we know it. But $10/year vs. free Facebook, most people will take the free cookie.

<comment><USER14> It doesn't matter what domain registration costs when there _are_ no domains to register. The namespaces of the TLDs people have heard of were picked clean by squatters years ago. It taxes extraordinary creativity and a giant heap of luck to come up with a relevant, vaguely pronounceable string for which the .COM is available. Reliably determining which John Smith you mean based on your social graph is one of Facebook's main value propositions.

<comment><USER13> I disagree. You can easily find good names if you have an original idea. One technique that I use, just combine two words. Most two-word combinations for an original idea are not taken. Also, use an honest registrar that won't register the name ahead of you.

</comment></comment></comment></comment><comment><USER15> Evgeny Morozov [0] has talked [1] and written extensively [2] about the capacity for social media to entrap those the regime deems social undesirables, and also about the naiveti of those in Silicon Valley who don't realize this capacity of their technology (insert Oppenheimer world-eater quote here...)

From what I understand of my own family's experience, it is safe to say that far fewer butchers would have discovered safe havens in Rwanda (such as my grandmothers' \-- my _muzungu_ father calls it the Anne Frank house of Kigali. I never noticed the bullet holes littered throughout the bricks in her compound until my latest visit...) through their own self-determination, if the locations had not been broadcast on government radio channels... _sigh_

[0] [http://www.evgenymorozov.com](http://www.evgenymorozov.com)

[1] [https://www.ted.com/talks/evgeny_morozov_is_the_internet_wha...](https://www.ted.com/talks/evgeny_morozov_is_the_internet_what_orwell_feared?language=en)

[2] See "To Save Everything, Click Here: The Folly of Technological Solutionism" by Evgeny Morozov

</comment><comment><USER16> When Hossein Darekshan went to jail, the Internet was for the pioneers, an uncharted territory. It was a place for the brave, required _arcane_ knowledge (computer literacy), and basic understanding of the underlying systems. When he came out it was _settled_.

Was it the availability of easy to use technology (smartphones) that created the market for populist interfaces or the simplification of interaction that made the demand for simplified devices? That's a debate. However as more and more people came online, they didn't want to explore the frontier. They wanted their patch of land. They didn't want diverse ideas, but affirmations for their beliefs, as News media has trained us all to expect from the world.

It was this way before. Most people's idea of music was limited to whatever was on the radio or MTV. Political discourse was limited to what was the news. The reason early Internet was the bastion of outsiders, freaks, geeks and degenerates because these people wanted to break new ground, wanted new ideas. Those people are still here, but they are minority.

I do think Derakshan overestimates the value of the blogospheres. My primary interaction was message boards, which were closed-off, and in many cases private spaces. That is whete I discovered new music, new movies and new ideas. They too still exist, but they are also _minority_ , as far as reach and influence are concerned.

</comment><comment><USER17> He seems like a gifted writer, so I am sure, over time, he will make these platforms work for him, perhaps in greater ways then he could have ever imagined just using blogs.

People I know use the "big-3" because it allows them to easily connect to their real-world friends and share tidbits with them, not because they are looking for a publishing platform to reach the entire world.

<comment><USER18> One could argue that Tumblr fills the 'social publishing platform' niche, and it seems reasonably popular.

I think the wider issue is content discovery outside social networks. I wonder whether there are still lingering issues for blogs after the death of Google Reader, or whether new services have been successful at filling that void.

</comment></comment><comment><USER19> I know that a big concern is the centralisation of power (something that might be mitigated by legislation, albeit problematically if the legislators are the ones to worry about) but aside from that, are aggregation sites like FB and such really that bad?

His argument that they only show you what you like, keeping you in a little bubble, _feels_ plausible, but is it true in practice? Those who are interested in new ideas will find them regardless of FB, and may even be shown them by FB if it works out that is what they will like. And those that are more passive get the benefit of the net without effort. Seems like a good arrangement, at least for now.

<comment><USER3> I think part of the problem is that one benefit of the web is to be exposed to new ideas, and passive users are hardly benefiting from seeing stuff that doesn't challenge them.

Centralisation of power is not just a problem in that Facebook tailors content to your preferences, but also that it has the power to choose how it does so. For example, I believe that Facebook said that it might choose to ignore that a user clicked "Show me less of this", because what we say we want isn't always what we actually want. Another example is that when even people who have liked an organisation's page don't see its content, Facebook basically forces them to pay for advertising.

Some of these ideas I found in a TED talk: [https://www.youtube.com/watch?v=B8ofWFx525s](https://www.youtube.com/watch?v=B8ofWFx525s)

<comment><USER20> And some people like living in a bubble. A friend of mine "unfriended" me (and a few others) because we dared to present differing points of view to what he posted (in my case, it was a study that showed marijuana use had potential side effects).

It's all too easy to remove yourself from alternative points of view, which was another prediction David Brin made in his novel _Earth_.

<comment><USER21> _Most_ people like living it in a bubble and go to lengths to create a comfortable bubble. That's why we hang out with like-minded friends, choose jobs at companies we share values with, watch Vice and not Fox News (or vice versa), etc.

Support and backing for the choices we make give us a warm and fuzzy feeling that we're in a good place or on the right path there.

Bubble is good. Cognitive dissonance is a bitch.

</comment></comment></comment></comment><comment><USER22> The author seems to fail to understand the new social dynamic present in the web. Just because the author fails to find his target audience does not mean these platforms are killing the web. I was a fan but not any more of the mentioned social media, but some of his statements are not insightful.

These platforms are the gateway to a better web not born yet, which is just about to emerge. High-quality content is becoming more relevant.

These social media websites are not killing the web. I'd argue it is doing something that is opposite to killing the web. People can find people who share the same ideologies in the social media platforms described. A decade ago, would you consider the web more prosperous without the presence of these social media platforms? I'd like to think that these platforms are gateway to a better web.

Bloggers are still rock stars in contemporary time. Hossein Derakhshan is just looking at the wrong place.

There is also more competition in the blogging space. What does he think happens when there is an inflow of supply?

People are smarter now. In fact, they are getting really smart with the availability of knowledge, wisdom, skills, and ideas. If you want more people to read your blog? Better start finding ways to influence new people and affect their lives, while offering meaningful. Furthermore, I hope he finds a way to get the numbers he wants by out-competing other bloggers in his niche.

<comment><USER23> > Just because the author fails to find his target audience does not mean > these platforms are killing the web.

He didn't make that claim, that's a strawman. The social media things are not the normal web anyway. His point isn't complaining about his audience issues, it's about the closed silo nature of these systems that give them massive power as gatekeepers in ways that the normal web doesn't.

> People are smarter now.

Now that's just the rantings of a myopic futurist-cultist.

<comment><USER22> >He didn't make that claim, that's a strawman.

Was it not implied from reading the whole article?

>social media things are not the normal web anyway.

What is normal? If billions of people are using social media would that not be normal still? How many people have to do a certain behaviour for it to become normal?

>> People can find [other] people who share the same ideologies in the social media platforms described.

It is a close silo.

>Now that's just the rantings of a myopic futurist-cultist.

Now that's just the rantings of a pessimist. How about things like the Flynn effect. Or do you have proof that people are not getting smarter or people are getting dumber?

<comment><USER23> No, the article was _not_ about him saying he lost his audience. That's the sort of reading that comes from simplistically thinking that everyone is only ever taking any position because of self-interest. Yes, he has a conflict of interest, which was clearly revealed. But the point of the article was about the shift in power, and the concentration of power in the way that the social media networks work. The point has NOTHING to do with his own access to an audience and is all about his concern about imagining the way today's versions of himself (young Iranians writing about issues today) will be limited and controlled to favor commercial interests in ways that were not the case before.

Re: pessimism vs futurism etc., you're the one that made the "people are getting smarter" claim, which is quite bold and demands evidence. I'll grant that it's possible that more percentage of people are getting adequate nutrition, health care, and education such that they are potentially more intelligent, but there's no basis for just asserting that an educated, well- nourished person today is generally any smarter than someone of that status from generations ago. So the curve is more about the percentage of people with decent health and education, and that's not something that leads to a conclusion of ever-increasing future intelligence.

</comment></comment></comment></comment><comment><USER24> Other than social networks, I really miss the internet before youtube got so popular. These days, people put a video on youtube for everything. Things that used to be written, parsed and easily searchable, now are locked inside lengthy videos.

</comment><comment><USER25> I think this is an interesting problem. Facebook, Twitter, Tumblr et al dominate the internet. They are mostly used for garbage. There are more people on the web now than ever and they use these platforms like they use a permanent marker and a bathroom stall. At the same time, as has been mentioned elsewhere in these comments, it hasn't gotten much easier to run a blog. There are hosting costs to consider and the technical barrier is still there, although it is lower than it used to be. Also, perhaps most importantly, it is not immediately clear whether one can or cannot gain traction with a blog. People don't seem to read them as much as they used to and they don't have a fancy interface to subscribe and follow (at least not one that most people are familiar with today). Maybe someone could make a platform for people who want to make a blog but are dealing with these issues. Some kind of intellectual Tumlr? A place where making a blog is simple and you are sure to make traction because of the large readership of the platform. A place like Hacker News but with blog posts perhaps.

<comment><USER26> I guess that's what Medium is aiming for. It's certainly how I use it.

</comment></comment><comment><USER27> This is at least the third or fourth generation of whining I've been through about XYZ is going to kill the Web, in the last 20 years.

AOL was going to kill the Web in its infancy, ensuring a walled off garden.

Microsoft was going to kill the Web and dominate cyberspace by inserting various points of control. Magazine cover after magazine cover predicted and warned on this for years in the mid to late 1990s.

Apps were going to kill the Web.

Facebook, Twitter et al. are going to kill the Web.

Four or five years from now: new thing is going to kill the Web. Rinse & repeat for an eternity. Absolutely nothing has changed in the argument, they just keep replacing one boogieman with another. I'm pretty sure after watching it for two decades that it's just an excuse to whine, forecast doom, and be overly dramatic. As it turns out, the Web is _extraordinarily_ resilient + adaptive and will be just fine.

<comment><USER28> Nothing _kills_ the web, at least at a reliable time scope. Just the comfort of browsing and quality content decreases in the "main stream" (not to be confused with stream_(social networking)). In the past, there were nice, plain text peer-to-peer newsgroups, plain text chat (IRC, maybe XMPP), (almost) plain text websites, plain text emails. Nowadays, newsgroups are no longer popular enough to be considered a window to the world. People send bloated HTML emails and chat using proprietary services, requiring heavy GUI. Websites prompt for Java, JavaScript and Flash just to show you less than 2KB of text, and run tons of scripts to make you share a link to their content to the social networks, or even just to upvote their content on such. Almost nobody uses trackbacks.

What people mean by "killing the web" can be compared to what people meant when talking about Eternal September, but now it got worse, and way more people are in it.

<comment><USER29> > Almost nobody uses trackbacks.

No one sane allows trackbacks on his blog any more. Too abused and spam- ridden.

<comment><USER28> Is really trackback spamming still _that_ popular amongst spammers? There are really more than 10 IPs a month? In 2015, when nobody uses trackbacks?

</comment></comment></comment></comment><comment><USER30> I feel like users don't really want to get switched out of apps as they scroll through a feed. I've noticed Facebook has many links that point outside of facebook.com/, but the constant new tab context switch is a pretty big distraction.

<comment><USER3> This reminds me of when tabs were introduced to browsers (remember when you had to open a new window for each webpage in IE6?)

</comment></comment><comment><USER31> i have to strongly disagree i am egyptian, and the revolution that started in egypt in 25th Jan 2011, was more or less organized on facebook on a facebook page that started few years earlier to condemn the torture and killing of a young man "khaled Said"

it was even kinda a surprise to the twitter crowd where most of the activists hanged out

in the two following years, twitter played a major role in sharing information on whats happening in the streets vs what the controlled media show

twitter and facebook did kill the web they revolutionised the world, literally

<comment><USER32> I think your point sort of proves the case that a revolution that's guided by mass submissions of Twitter and sensationalism and populism rather than well thought out ideas will end up in the dust bin of history. Egypt is back exactly where it was pre Arab spring. If not a little worse. Hence the point this blogger makes.

</comment></comment><comment><USER33> I disagree and here's why. The web platforms he mentions are for following the lives of people you like. Links get in the way on these specific apps. Especially on mobile where clicking links by accident is a dread. If you want to share your web links then post it on your blog. Make a link from Twitter to your blog. But DONT expect apps to allow you to spam your garbage links to others. That's what Reddit is for.

</comment><comment><USER34> I was watching Solyent Green last night. I have seen the movie so many tines, but last night it reminded me of my own eventual mortality.

There's a scene when Charleton Heston shows his, I believe, father some refrence books that he stole from the rich guy.

On the books, I saw report for 2016 to 2025.

I thought to myself, I'm glad we are not living in a Solent Green world--yet. I thought about just how difficult it is to predict the future.

That said, I don't like the direction of this internet. I loath FB. I loath it for various reasons. I'm trying to be objective. "Do I dislike it because I don't have a lot of friends?" I don't know? I just loath the site. Always have, but I'm a odd person. I'll cop to that.

Somebody above me asked for solutions. I think we should share anything we have. Yes, there are poachers, with deep pockets, that will steal ideas, but we're talking something that was very special. I liked the Internet in 2008. I don't like it as much now. So, please offer solutions?

(To the Downvoters, give people a chance to offer their ideas without your petty boos. It's not all about you, and your precious, fragile mood?)

</comment><comment><USER35> He wrote something similar earlier this year that was discussed on HN: [https://news.ycombinator.com/item?id=9994653](https://news.ycombinator.com/item?id=9994653)

There's definitely more to be said on this topic, though.

</comment><comment><USER36> This too is an endless stream of 'newness'. I log to HN as much as I do to FB. One pays with karma, the other with likes. Both are mostly garbage yet sometimes gems are found. I guess some of us are ready for curatedcontent.com

</comment><comment><USER37> Great article that sums up the reasons why I am not using any of these social networks anymore. I am going to point this to anyone who asks me why I don't have a Facebook account, thanks.

</comment><comment><USER38> Meh. Hypertexted linked blogs and web pages are still there. Facebook et al aren't killing them any more than radio killed books, TV killed radio or the internet killed TV. I doubt he would have lost his blog audience if he had not been imprisoned. It wasn't social media that did that.

<comment><USER39> I would know nothing of this person or his views but for the concise, image/video free list of hyperlinks+descriptions I frequent on Hacker News. Ironic.

</comment></comment><comment><USER40> > On his release, he found the internet stripped of its power to change the > world and instead serving up a stream of pointless social trivia.

The web works just fine for me. I just route around the damage. It's not like anyone has a gun to your head forcing you to have an Instatwitbook account.

</comment><comment><USER41> Is there any way to, or rather, is it even worth fighting centralization?

Has anything similar to this happened?

</comment><comment><USER42> Well, Zuckerberg has said that he wants Facebook to replace the internet, at least in people's minds and actions; hence why he is ever expanding the walled garden.

</comment><comment><USER43> This is why it saddened me to see Prismatic News shut down. It was a really great way to find new and interesting things outside that filter bubble of fb and twitter.

</comment><comment><USER44> This was surprisingly insightful, both at the human and the technical level (especially the thoughts on hyperlinks). Amazing read.

</comment><comment><USER45> i think that hyperlinks and decentralized blogs will make it back if the concept can generate value for advertisers.

So if all blog hosts hand out the same sticky cookies and then exchange the tracking info to collectively spy on its users - that will be the killer app (or killing app) for hyperlinks and decentralized blogs ;-)

</comment><comment><USER45> I think livejournal would be one of last remnants of the old web. In some quarters it is still quite popular

<comment><USER45> (second thought); I am not sure if the internet changed so much - there seems to be a fixed percentage of people who read and investigate things / are ready to hear alternative viewpoints, etc. These people were reading blogs in the olden times and are probably doing so right now.

Now what happened is that the online audience got much wider - now my guess is that this added audience did not result in more people reading and investigating stuff - its the same old number. (the author probably lost touch with his former readership while in prison, but eventually they will come back - if the author is still valued, but that's a separate question).

The net can't make us more curious all by itself...

</comment></comment><comment><USER46> Throwaway account for obvious reasons.

At the time of Iranian disputed elections of 2009, I worked as an engineer for one of the biggest Iranian websites with millions of audience looking for reliable source of news, in the strict absence of any news, when people were getting killed on the streets of Tehran.

I see the need to clarify who this self-titled 'blogfather' of Iran is. I see this need as things get out of control quickly on hn due to hype and links like this jump to get 1k votes, where most of the voters simply vote because others voted.

For those who do not know, since just before the Iranian disputed elections of 2009, Hossein Derakhshan has been living in Iran. He was 'supposedly' in jail, but there were rumors about his collaboration with the Iranian government to build their cyber presence, which almost did not exist at the time. Shortly after his arrest, many anti government bloggers inside Iran were arrested too, there are speculations that he revealed their identities.

Years before entering Iran, Derakhshan was busy with 'blogfathering' Iranian web space for a few years, explicitly being anti Iranian government, which always bring visitors. This way, at the rise of the weblog era, he was doing good. He had a big number of visitors which could make him enough money to not look for another job.

During post golden era of weblogs, specially when the Iranian Digg copy websites appeared, his monopoly weblog business was going south. At that point, he started publishing more unconventional content in Iranian web space to gain attention. Mostly, they were of sexual nature. A good example is a video he published where he asks an Israeli girl to repeat graphic sexual words in Farsi (Persian) after him. The girl did not speak a word of that language. Another example is his dedicated website to naked pictures of Monica Bellucci.

I am not writing this to reveal that Hossein Derakhshan is a successful web attention seeker. I am writing this to let you know that in summer of 2009, when our tiny team was trying to protect huge DDoS attacks on a handful of low budget EC2 instances funded by donations, we were convinced that on the other side of the line, Mr Derakhshan had made a deal to conduct the operations by hiring Russians. This was by tracing his old account on our website to multiple new accounts claiming how they enjoy taking down the website, and let me tell you this, if you write thousands of lines on the web with your identity, it is not easy to escape your writing style when you pretend to be someone else.

Another elections is coming in a couple of months in Iran, where the government allows high profile media to report from inside Iran, hence this article pop up out of no where. This is a known pattern.

I had to get this off my chest after so many year. It is disturbing to see links like this on the front page of hn, where people claim to be pro democracy and freedom. This hurts.

</comment><comment><USER47> Well, looks like he's back :)

So many people reposting his article!

</comment><comment><USER48> Most of this is just a guy complaining becuse he can't adapt to the new world.

<comment><USER49> I don't agree with you, but you shouldn't be downvoted for a comment like this.

I can understand why this perception could be read into his post, but I think the much stronger argument here is that the web he sees now, after his release, is not a web at all - it's 3-4 massive nodes that are connected only because they use the same pipes

<comment><USER50> >I don't agree with you, but you shouldn't be downvoted for a comment like this.

If onewaystreet had said "guy complaining about kids these days" then sure, shouldn't downvote for opinion. But "because he can't adapt" is not what the article's about. As far as I can tell, that dismissal is factually wrong. So a downvote is okay.

</comment></comment></comment><comment><USER51> "There's a story in the Qur'an that I thought about a lot during my first eight months in solitary confinement. In it, a group of persecuted Christians find refuge in a cave. They, and a dog they have with them, fall into a deep sleep and wake up under the impression that they have taken a nap: in fact, it's 300 years later. One version of the story tells of how one of them goes out to buy food – and I can only imagine how hungry they must have been after 300 years – and discovers that his money is obsolete now, a museum item. That's when he realises how long they have been absent."

Slightly off-topic, does he realize that this was a fable and not a true story as human beings can't live for 300 years much less without food, water and a way to expel waste?</comment>


Accurate, Large Minibatch SGD: Training ImageNet in 1 Hour - <AUTHOR> https://research.fb.com/publications/imagenet1kin1h/ <comment><USER2> Some quick observations:

* for synchronous model-based distributed training to scale linearly, the time required to broadcast the model must be much larger than the time required for a worker (GPU) to process a batch

* there are very large batch sizes (8196)

* it's a low latency network</comment>


The Trump Administration Just Furloughed 13,400 Immigration Workers - <AUTHOR> https://www.vice.com/en_us/article/ep4pkw/the-trump-administration-just-furloughed-13400-immigration-workers <comment><USER2> Clickbaity title. They weren't "just furloughed", they were just _notified_ of a _pending furlough_ five weeks from now.

This is required because there is no money to pay them with fees frozen because travel is frozen, and Pelosi hasn't appropriated replacement funding.

</comment><comment><USER3> If you want to rage at anyone, try raging at the criminally incompetent administration that has led to tens of thousands of unnecessary additional deaths, and the way they have committed crimes against humanity from the day this pandemic started.</comment>


Bytecode Alliance: Building a secure by default, composable future for wasm - <AUTHOR> https://bytecodealliance.org/articles/announcing-the-bytecode-alliance <comment><USER2> I'm one of the folks working with this alliance, and I'm incredibly excited about WebAssembly outside the browser. Happy to answer questions.

Imagine extensions for applications or databases, written in any language you want, with no ability to exfiltrate data. Imagine supporting a safe plugin API that isn't just for C and languages that FFI to C, but works natively with safe datatypes.</comment>


Debtmageddon vs the robot utopia  - <AUTHOR> http://www.steamthing.com/2011/07/debtmageddon-vs-the-robot-utopia.html <comment><USER2> I see this point of view a lot in my internet wanderings. Honestly I don't understand the line of thinking.

What do people think "the rich" do with their money? Store it under a mattress? Keep it in an underground vault so they can go swim in it while laughing maniacally?

Of course they don't. They invest it. They put it in Treasuries, Mutual Funds, Individual Stocks, CDs, Money Markets, Plain Old Checking Accounts.

That money is most definitely _not_ sitting still. It is out there flowing through the economy, financing mortgages, construction, businesses, and probably anything else you can think of.

The only reason to tax the rich as far as economic stimulation goes, is if you believe the Government can do better with the money than the market can. If that is what you believe, fine, just say so and state that as your argument.

But this idea that somehow money is sequestered when owned by rich people is absurd.

<comment><USER3> Yes and no. They also use it to buy and store commodities, in the believe that money will devalue and it is better to store it as gold or similar. This line of thinking pretty much creates _no_ value - the money _does_ get kept in a underground vault, albeit rarely in the shape of a swimming pool.

Where any investment happens also matters - I suspect that recently most of the value of investments have gone to raising the quality of living conditions for the middle classes in China and India, rather than in America or Western Europe. In a sense, the planting is being done overseas, and the harvesting is happening at home. One may argue that this is morally desirable, but it's not clear that it is the outcome that would be chosen by enlightened American or European self-interest.

Interest rates being as low as they are also seems to imply that there are few solid value-creating investments to be had at home in a retail sense - otherwise it would be trivial to invest money at a higher rate of interest and become quickly more rich.

One final point - money is power. When money is so heavily concentrated in the hands of very few people, you have the same very few people being very powerful economically and picking winners and losers. This happens to be _exactly_ the problem that a lot of people who are for market-driven economies have with socialism/communism - power concentrated is too prone to failure and not as great a driver for progress as power diluted.

<comment><USER4> > They also use it to buy and store commodities, in the believe that money > will devalue and it is better to store it as gold or similar

Yes, and it's worth noting that this pushes food prices up, which, in turn, pushes poor people down.

</comment></comment></comment><comment><USER5> The idea of 'Robot Utopia' is funny in a way. By most measures we are already there in terms of technology, but the economy does keep opening new avenues for work. The big question is what people would do if they didn't have to work for their needs?

One answer is make-work, i.e., hobbyist jobs. The other is general hedonism. Conservatives fear that the latter would be destructive - that it would lead to widespread addiction and criminality. The question: "What would you do if you didn't have to work?" can be answered in many different ways depending upon a person's history, self-image and inclination.

<comment><USER6> Michael , you say we're already in "robot utopia" in terms of tech but there already new jobs. If i look at it from the position of capabilities, not specific jobs, it doesn't seem that this is the case.

For example if you look at agriculture from the point of capabilities(physical repetitive labor), you see machines replacing humans. You see same powers in manufacturing.

But what about eye sight, coordination, adaptivity, ability to offer good enough human service, retaining and sorting large knowledge bases, intelligence and other capabilities ? Computers are improving in all those capabilities, and contionously replace people.

The "robot utopia" will be when machines can do those things better/cheaper than us. Then maybe the only capability that will be left is being an authentic human, for jobs that people prefer authentic humans would do.

Whether humans have this advantage over machine replicas, how many jobs like this would be available and what form this jobs would take(maybe being humiliated as servants like so common in India today?) are interesting questions.

</comment></comment><comment><USER7> Haven't read any comments here yet, but I firmly believe this analysis to be spot fucking on. Will be interesting to find out why this critique which aligns so closely to my own thoughts is 'wrong' or at least flawed.

</comment><comment><USER8> I like to read economics articles on HN because (a) I've been trained as as an economist and (b) I like to read the opinions of other clever people, even (particularly?) those who don't have any background in economic theory.

Let me make a few points:

1) Nothing the OP has written has anything to do with economics.

2) Who pays, which is the subject of the current "fiscal cliff" brinksmanship, is almost entirely a political question, not an economic one. That is, economists' insight into the present American dilemma is mostly limited to a determination of how the distribution of tax receipts under whatever bargain prevails will affect future economic growth. All other considerations are political, and economists like Krugman and Mankiw who weigh in vociferously do so as politicians, not economists.

3) Bailouts come in two distinct flavors: (a) those whose purpose is to provide essential liquidity to the capital markets at the core of our economies, while they're in distress, and (b) those that are basically handouts to the politically connected. Almost always (a) and (b) overlap. In a financial crisis, like the one we went recently went through, initially (a) dominates—"Wall Street" bailouts, necessary bailouts, lead off. Sometimes, as recently, (b) soon gain ground. The bailouts of Detroit, as with pretty much all "Main Street" bailouts, are in the latter category. These are politically motivated, not economically motivated, bailouts

3) I stand (hope!) to gain most of my future income from capital gains. I do not believe that there is any strong argument for treating capital gains differently from other other income as a matter of economic policy. There are, of course, political arguments in either direction.†

4) As I've written in reply to other HN submissions, I see little reason to believe that we are meaningfully nearer an economic singularity with respect to robot labor than in times recently past. Capital has always eroded the position of labor and forced workers into more productive roles that are less directly competitive with machines. If the situation changes dramatically, it will be clear in discussions here long before economists catch on, but we're not there yet. Nowhere close.

† – I am very much an Internet libertarian (small "L"). I despise most taxes, and I believe that much government spending is wasteful in the sense that the money would be more productive, in net, in other uses. I also (b) realize that taxation is as much about values, our values as citizens and as human beings, as it is about economics. (I also am aware that that "the path to hell is paved with good intentions" is close to being a theorem of public finance.) Lastly, my motivation for studying economics has come more from an interest in the various and common ways in which markets fail than from the ways in which they work.

<comment><USER9> > Who pays, which is the subject of the current "fiscal cliff" brinksmanship, > is almost entirely a political question, not an economic one.

ORLY? There's a paragraph in the article which starts with "Proponents of trickle-downism" and ends with "A dollar given to a poor man multiplies faster, Keynes observed, than a dollar given to a rich man."

As far as I know, that paragraph is

1) Conventional wisdom, and not widely disputed.

2) Economics

3) Of direct impact on the political question of who should pay more tax, seeing as removing a dollar of tax is the same as "a dollar given".

<comment><USER10> _"A dollar given to a poor man multiplies faster, Keynes observed, than a dollar given to a rich man."_

This may be conventional wisdom, but it doesn't make sense to me. It seems to me that how much economic growth is caused by spending dollars depends on what they're spent on, not who is spending them.

Growth caused by dollars spent on consumption is linear: the "size of the economy" is just the total number of dollars spent. If people are buying more stuff, the economy is larger; but that's all.

Growth caused by dollars spent on investment and innovation is exponential: it increases the amount of stuff that can be had for a given number of dollars, or even adds new stuff that previously could not be obtained at any price.

I think most dollars spent by both poor people and rich people are spent on consumption, not investment. So it seems to me that finding ways to get more dollars to be spent on investment rather than consumption is the best way to increase economic growth.

<comment><USER9> > This may be conventional wisdom, but it doesn't make sense to me. It seems > to me that...

Uh huh. Please help me out with some links as to why Keynes was wrong on this. He may be, but "seems" doesn't suggest that you have made much of a study of it. I haven't gone much further in my studies, perhaps you could help me here?

> economic growth is caused by spending dollars depends on what they're spent > on, not who is spending

Half correct. The argument is that an extra dollar in the hands of a poor person is much more likely to be spent _sooner_ on some basic good like food, and to another relatively poor person who will do likewise. i.e. with higher _velocity of money_. <http://en.wikipedia.org/wiki/Velocity_of_money> The article mentions this. You know about velocity of money, right?

> I think most dollars spent by both poor people and rich people are spent on > consumption, not investment

ORLY? Most arguments that I have read on it claim that most dollars spent by _rich people_ are spent on investment. i.e. Rich people can save and invest, poor people can't. Saving and investment is slow velocity money storage.

In short, since money given to poor people will probably be spent a few times over before it ends up in some corporation's coffers, why would "helicopter money" [http://www.guardian.co.uk/commentisfree/2012/jan/26/economy-...](http://www.guardian.co.uk/commentisfree/2012/jan/26/economy- uk-high-street) be worse than the current policy of printing money and giving it to banks who don't want to lend it out to any investment?

> Growth caused by dollars spent on investment and innovation is exponential. > So it seems to me that finding ways to get more dollars to be spent on > investment rather than consumption is the best way to increase economic > growth.

please supply a link to an article about how "exponential innovation" is more important than monetary velocity. It may be, but not because it "seems" to someone. Right now, that's just gibberish to me.

<comment><USER10> _You know about velocity of money, right?_

Yes, and the most common definition of "the size of the economy" is GDP, which is, as I understand it, linearly related to the velocity of money. That's another way of saying what I was saying, that economic growth due to spending on consumption is linear.

 _Most arguments that I have read on it claim that most dollars spent by rich people are spent on investment_

I'm not sure that's quite what they claim. They certainly claim that rich people spend _more_ on investment than poor people, and as you point out, that makes sense because they can afford to and poor people can't. But that's not the same as saying that _most_ of what rich people spend is spent on investment.

Spending on expensive houses, cars, private jets, yachts, traveling around the world, personal assistants, etc., etc., is all consumption, not investment. As far as I can tell, that's what most of rich people's spending is. The ones that make the news, like Bill Gates or Warren Buffett, seem to me to be the exceptions. But I would love to see hard data if there is any.

 _why would "helicopter money" be worse than the current policy of printing money and giving it to banks who don't want to lend it out to any investment?_

I agree that "helicopter money" wouldn't be any worse than giving money to banks that don't lend it out; in fact, economically speaking, "helicopter money" might actually be better, since the money would actually get spent. However, both of them are short-term solutions, like giving a nitroglycerine pill to someone having a heart attack. Neither of them fix any underlying chronic problems.

 _please supply a link to an article about how "exponential" innovation is more important than monetary velocity_

I haven't seen my statement about growth due to spending on investment being exponential phrased in exactly that way, but investment being equivalent to compound interest, which grows exponentially, is a commonplace among economists.

As for "velocity of money", try this article by Henry Hazlitt:

<http://mises.org/daily/2916>

Two key points, from the summary at the end of the article:

"Velocity of circulation is a result, not a cause. It is commonly a passive resultant of changes in people's relative valuations of money and goods."

"V is never an independent factor on the side of money, because the transfer of goods must speed up, other things being equal, to an equal amount. It is just as valid to think of the velocity of circulation of money being caused by what happens on the side of goods as by what happens on the side of money."

In other words, trying to "help the economy" by trying to speed up the velocity of money is getting things backwards.

</comment></comment></comment></comment></comment><comment><USER11> I enjoyed the authors article. However, I think he misses the mark with some of his assumptions. Unlike some in this thread, I am NOT trained in economics. But:

1) I think the author incorrectly tries to nullify the family budget metaphor for economic prescription. While any metaphor only goes so far, he attempts to compare the micro-economic interactions within the family ("essentially communist") with the macro-economic revenue/spending/balancing act for a national budget. He misses the point that, in observing that we must "understand a family as a group of people functioning a single economic agent" we must consider the requirements of that economic unit to adhere to reasonable financial policies, such as making sure revenues are sufficient to cover debt service and expenses.

2) I think the author mis-characterizes the post WWII affluence of the American economy as a result of the wartime government spending combined with some magical wealth redistribution scheme inherent in a wartime economy. In reality, I believe the great American prosperity was more to do with the nation's near monopoly on manufacturing capacity after most of Europe was decimated (and Japan as well).

3) I agree with the author that "trickle-down": economics (actually more of a political thing than a real economic theory) is inherently flawed. I think he also misapplies the family metaphor here, as well, mixing the micro with the macro.

All in all this was an enjoyable and well-written article, and I appreciate the author's ideas about the "Robot Utopia." I don;t agree, but what fun is it if we always agree, right?

</comment><comment><USER12> See also 'Manna' and 'Robotic Nation' that must be over a decade old by this point.

</comment><comment><USER13> Krugman has just started a multi-part series on "Policy Implications of Capital-Biased Technology", which I think is wonkish for what TFA is about.

[http://krugman.blogs.nytimes.com/2012/12/28/policy- implicati...](http://krugman.blogs.nytimes.com/2012/12/28/policy-implications- of-capital-biased-technology-opening-remarks/)

HN story: <http://news.ycombinator.com/item?id=4978136>

</comment><comment><USER14> It's odd that the word entitlements is no where in the OP. Entitlement spending is the biggest contributor to the debt.

It's odd that the OP fails on basic math. If you took ALL of the money from the top 10% wealthiest people and put it towards the debt it would barley make a dent.

It's odd that the OP fails to see what's happened in other countries when the tax rate is cranked up on the rich ... many leave the country. And many outside entrepreneurs considering the US as a place to start a business will take their ideas, their jobs and money elsewhere.

The debt will only get fixed when jobs get created, the tax system gets modernized and entitlements get reformed.

<comment><USER15> "It's odd that the OP fails on basic math. If you took ALL of the money from the top 10% wealthiest people and put it towards the debt it would barley make a dent."

The top 1% in the US has around $12 trillion in wealth, which is about the public part of the debt ($16 trillion total).

<http://www.irs.gov/pub/irs-soi/12pwwinbulwealth07.pdf>

<http://en.wikipedia.org/wiki/United_States_public_debt>

<comment><USER16> Thank you.

I found it hilarious how vaadu led his comment with "OP fails on basic math" and then lands a turd like that...

</comment></comment></comment><comment><USER17> Priceless dilletantism.

TLDR: "I'm not an Economist", followed by quoting Paul Krugman.

<comment><USER18> Well the fact that we're in worldwide recession despite being in a time of extreme productivity and technology, is perhaps a sign that the "real economists" and neo-liberals are fucking it all up. Elitism is counter- productive.

So, care to actually present a counterargument or are you content to be an obnoxious blowhard?

<comment><USER19> No, it really isn't a sign of anything. This is like blaming all professional plumbers for your bath tub leaking.

This is a cynical and knee jerk commentary that's emblematic of the sort of middle brow dismissals we've been working to limit on HN.

For all of the competing thoughts on economics, I don't think it's a stretch to say it's enormously complicated. Even on the most cursory examination it doesn't break down to "more productivity = better economy". "Real economists" and "neo-liberals" may in fact be fucking it all up, but I'm quite certain they'd have done no better if they modeled the economy like you have.

When your world view requires that millions of highly educated, trained, and experienced people - who have pursued a rigorous, academic field of study for decades - are _all simultaneously out to lunch_ , possibly maliciously, the onus is perhaps on you to provide more substantiation than "they're fucking it all up".

Side note: At this point I'd be very happy with HN being refocused on strictly tech/startup related posts. Every time a more general or controversial topic comes up it ends up very much like this thread. Unsubstantiated knee-jerk ad hominem. Followed by equally unsubstantiated hyperbolic cynical equip.

<comment><USER20> > This is like blaming all professional plumbers for your bath tub leaking

A large amount of bath tubs and pipes are leaking, worldwide.</comment></comment></comment></comment>


What's New in F# 4.1? [video] - <AUTHOR> https://channel9.msdn.com/Events/Connect/2016/118 <comment><USER2> While it is great to see all those new features appearing in F# 4.1, the video gives a very narrow perspective on "what is new in F#" \- it is a video about new language features in 4.1 and so this is to be expected - but if I was to list "what is new in F# in 2016", large portion of the list would include recent community contributions. Three recent projects are:

* [http://fable.io](http://fable.io), which is a modern F# to JavaScript compiler that lets you build Elm-style apps, access React and all that fun

* [http://ionide.io](http://ionide.io) which is an F# integration for Atom and VS Code that is doing amazing work towards bringing F# to a fully cross-platform ecosystem

* [http://notebooks.azure.com](http://notebooks.azure.com) which is (very new) free Microsoft-hosted Jupyter Notebook service that provides support for the usual suspects (R and Python), but also ships with great F# support out-of-the-box

In other words, I think the language is way ahead of the libraries and tooling - there is so much more that can be done (and is being done) using F# as-is!

<comment><USER3> VS Code and Ionide work really well together. There are some slight issues like the loss of syntax highlighting in certain cases, but that is a really small issue. I am using this combination on a GalliumOS chromebook and it works out of the box in like 10 or 15 minutes:

\- install VSCode and then Ionide

\- install .net core

\- install mono (i believe ionide still uses mono)

\- install node and npm and then yeoman

\- install the aspnet generator for yo

\- "yo aspnet" will give the option to generate a working ASP.NET F# website

<comment><USER4> > VS Code and Ionide work really well together

Not in my experience. Never since it appear the setup have worked for me, not even once.

I try again last week. I need to copy-paste the .sh script from github because the one it generate was wrong.

P.D: I don' use yeoman. NPM bloat is not my style: I follow the MS tutorial:

[https://docs.microsoft.com/en- us/dotnet/articles/fsharp/tuto...](https://docs.microsoft.com/en- us/dotnet/articles/fsharp/tutorials/getting-started/getting-started-vscode)

<comment><USER5> _Awkward person in the video AND author of that tutorial here..._

I'd love to learn more about what went wrong in setup. Keeping that article up to date and, more importantly, _correct_ is a priority of mine, because I really want people to learn about Ionide and F#.

<comment><USER4> I just follow the tutorial on OSX. Then I try to do the first build and get:

> build.sh: line 34: syntax error: unexpected end of file

So I delete the last empty line, and get:

> build.sh: line 33: syntax error near unexpected token `fi'

I don't see any wrong with the script (I don't know bash scripting). So I go to the github site and just copy from [https://github.com/ionide/ionide- vscode-fake/blob/master/bui...](https://github.com/ionide/ionide-vscode- fake/blob/master/build.sh)

And it work.

This is the diff:

        diff -r 8b6c97c12f6e build.sh
        --- a/build.sh  Fri Dec 09 20:27:05 2016 -0500
        +++ b/build.sh  Fri Dec 09 20:27:50 2016 -0500
        @@ -3,7 +3,7 @@
         then
           # use .Net

        -  .paket/paket.bootstrapper.exe
        +  .paket/paket.bootstrapper.exe  prerelease
           exit_code=$?
           if [ $exit_code -ne 0 ]; then
            exit $exit_code
        @@ -15,7 +15,7 @@
            exit $exit_code
           fi

        -  packages/FAKE/tools/FAKE.exe $@ --fsiargs build.fsx
        +  packages/FAKE/tools/FAKE.exe $@ --nocache --fsiargs build.fsx
         else
           # use mono
           mono .paket/paket.bootstrapper.exe
        @@ -29,5 +29,5 @@
           if [ $exit_code -ne 0 ]; then
            exit $exit_code
           fi
        -  mono packages/FAKE/tools/FAKE.exe $@ --fsiargs -d:MONO build.fsx
        +  mono packages/FAKE/tools/FAKE.exe $@ --nocache --fsiargs -d:MONO build.fsx
         fi
        \ No newline at end of file

<comment><USER6> It's probably line ending problem. Running something like dos2unix on `build.sh` would probably fix it.

</comment></comment></comment></comment></comment></comment><comment><AUTHOR> Also for those that rather read the blog post, check this out, A Peek into F# 4.1: [https://blogs.msdn.microsoft.com/dotnet/2016/07/25/a-peek- in...](https://blogs.msdn.microsoft.com/dotnet/2016/07/25/a-peek-into-f-4-1/)

</comment><comment><USER7> So, I've been making a slightly more concerted effort to pick up F# because I've always liked F# and .Net core and Fable means that I might actually get to run it at work without the non-starter of switching stuff over to windows servers. Excellent.

The main holdup is that the build/packaging situation is disastrous.

Most stuff still relies on Mono, which is fine, but trying to get things running on core quickly runs you into articles that assume you know exactly what you're doing and how all the pieces fit together, which is also fine.

What's not fine is that the base task of wanting to download existing packages and run the result doesn't have a simple solution. The base .net core install comes with a project.json solution, which seems completely sane to me, but apparently that's deprecated and not how to do things. Then there's Nuget which is a package repo but apparently not a package manager because it's supposed to be a VS extension but maybe it is in the next version because there's a shell. There's also msbuild and some variant of it for fsharp which is mostly opaque XML but can be managed using a project called forge, which seemed to kind of work for me but also seems very opaque. There's also paket which manages dependencies from nuget, there's also Fake which seems to be a Rake-like build system.

I know I'm not the only one who's run into this. I've seen at least 4 other requests for help in various F# forums and everybody seems to pretty much shrug and say that they use VS.

If one of the F# cognoscenti could write up simple instructions on how to set up a project and run it using VSCode and .Net core, I'd be grateful.

<comment><USER5> _Awkward person in the video here..._

Let me see if I can clarify the landscape a bit here:

.NET Core _tooling support_ is still in absolute Preview. The runtime and libraries are stable, but the .NET Core SDK, MSBuild support for .NET Core, the project system in Visual Studio, etc. are all Preview support.

Much of the F# community is waiting on .NET Core tooling stability to act, which they have every right to do. .NET Core tooling is still in Preview, and still changing rapidly. Using any cross-platform community tooling or libraries on .NET Core is likely going to be rough right now, and that's because the underlying tooling that the community needs to rely on is in Preview.

F# support is still officially in alpha for .NET Core, a moniker we're pretty deliberate about because we don't want to "flip the switch" until everything is stable and compatible with existing code.

Honestly, if the churn is painful for you, the best advice I can give at this point is to wait until the tooling for .NET Core stabilizes and becomes release-quality. Up until that point, there will still be churn.

<comment><USER7> I don't have anything pressing and I don't know the ecosystem so I'll be waiting it out. My frustration is mainly that I think F# with Fable and Kestrel in VSCode is very compelling for JS shops and the only reason I can't recommend it is the build situation. An explanation of how to make a project, add a dependency, and run it that would make sense to someone used to npm would really help people who aren't on windows and running visual studio. I do appreciate the efforts of the F# team has always made in maintaining an open source community and I do recognize that there are lots of complications involved. Thanks for your efforts.

<comment><USER6> > I do appreciate the efforts of the F# team has always made in maintaining an > open source community

I do appreciate the efforts of the F# open source community has always made in maintaining an VF# team.

</comment></comment></comment></comment><comment><USER8> I'm interested in .NET ecosystem languages, as well as functional programming. How is the parsing and meta-programming toolset? How easy or hard would it be for me to implement a subset of F# that only allows pure functions?

<comment><USER2> If you wanted to create a version of F# that only allows pure functions, your best option is probably to modify the F# compiler (which is open source). However, that sounds like something that might not be all that useful.

A more useful thing could potentially be to use the "F# Compiler Service" (which is the compiler API, exposed via a nice F# library) and create some tool that checks purity. I think many people might actually be interested in something like this.

<comment><USER8> My purpose would be to create a multiplayer game programming platform. Basically, it would come with a game loop already running, with communications already working. Then you could modify the game by changing functions that transform game tick N to game tick N+1.

<comment><USER9> There's another way to do this. Just scan the compiled code for access to anything other than a fairly short whitelist of functions. This is how Terrarium worked.

<comment><USER10> Yup, this is the better approach to sandboxing. You can always expand a whitelist, but it's not so easy to play black-a-mole.

</comment></comment></comment></comment></comment><comment> ainar-g I feel like the title lacks the "[video]" tag. Unless I've missed the text version somewhere on that page.

<comment><AUTHOR> good point! sorry for not adding it right away

</comment></comment><comment><USER11> Wait what, doing this as an alias

       type ProductId = ProductId of int

Meant it allocated an instance on the heap for it before 4.1? Wow.

<comment><USER12> That isn't actually an alias. That is constructing a single-case discriminated union. DUs are compiled into classes and have a few things automatic equality.

Generally speaking, it's better to use Units of Measure[0] when you want some compile-time semantics around numeric literals, as these don't incur the performance penalty of creating a class.

[0]: [https://docs.microsoft.com/en- us/dotnet/articles/fsharp/lang...](https://docs.microsoft.com/en- us/dotnet/articles/fsharp/language-reference/units-of-measure)

<comment><USER11> Yeah I realize there are more efficient aliases, but even so - just defaulting immutable data structures with only primitive types in them to cretae reference types feels like a massive foot gun performance wise. I couldn't imagine doing C# without value types, so for F# where things are usually _more_ immutable, it has to be painful if e.g. a normal point(x,y) record is a class...

<comment><USER13> You could use a struct, record, or tuple for a point. I've done all of these before.

<comment><USER11> Yes, and now they can be done right (as CLR structs)! It's just odd that this took until now.

I suppose it just shows that those of us that are using .NET to do "C++ work" (always CPU and GC bound, almost never IO bound) are pretty few...

</comment></comment></comment></comment></comment><comment><USER14> We need HKT. F#. Cmon... I love F# but seriosly...

<comment><USER2> Not only we do not need HKT, we also do not need Profunctor Optics.

<comment><USER15> F# and its spirit animal OCaml are really great precisely because of this attitude.

They're really good at saying "No" to things that offer at best incremental improvements at the cost of significant complexity.

"Profunctor Optics" is a great example. Cool paper, but no thanks.

<comment><USER16> Higher kinded types reduce complexity in the same way generics reduce code complexity. If you think one makes things simpler but not the other, I would assume you're not familiar with it?

Do you have examples of why it would add significant complexity? I use them constantly and it really simplifies my code a lot!

Also, I don't believe 'profunctor optics' is a paper, I think it's just one (interesting) implementation of optics, which are useful in any language that encourages immutability.

<comment><USER15> The complexity that HKT brings to F# is not just conceptual. It needs to exist in the CLR which will bring implementation tradeoffs.

"Cool paper but no thanks" is a saying for when people come to you with an extremely new technique and want you to incorporate it at the language level with very little proofing in the field.

"Profunctor optics" is the a description of how profunctors encode lenses and similar structures. I am aware. I also think that technique can cook in Haskell land for a few more years before non-research projects should uptake it.

<comment><USER16> Thanks for replying, yeah I suppose I didn't think about the ramifications of having to deal with reified generics and higher kinded types. I still think they're an amazing productivity boost, and the initial 'weirdness' of learning that particular abstraction pays off a tremendous amount in code readability.

As for the 'cool paper' comment, I wasn't aware of this new jargon, thanks for informing heh. I'm not sure how well it will play outside of haskell, I've done a Scala encoding of them and it's a bit more awkward than other representations.

</comment></comment></comment></comment></comment></comment><comment><USER17> Some nice performance improvements in the core libs and compiler as well.</comment>


Simple suggestions for implementing passwords correctly - <AUTHOR> http://antoniocangiano.com/2010/03/24/simple-suggestions-for-implementing-passwords-correctly/ <comment><USER2> If your app sends me my password in an e-mail. You are an asshole.</comment>


JIT Compiler with On-Stack Replacement - <AUTHOR> https://www.cs.cornell.edu/courses/cs6120/2019fa/blog/bril-osr/ <comment><USER2> The dynasm-rs package looks really useful for projects like this. Hope it helps Rust gains more steam in the PL community

</comment><comment><USER3> Testing is comprehensive and seems to show promise - although why did you choose rust for this project?</comment>


FAA faulted for outsourcing 787 safety checks to Boeing - <AUTHOR> http://seattletimes.com/html/localnews/2020288737_787faaxml.html

<comment><USER2> The sad/pathetic part of this is that Boeing are infinitely more qualified to make these assessments.

The scary/pathetic part is that when faced with such a problem, the FAA's choices were: 1. Punt the responsibility to Boeing and hope it works out. Or 2. Just tell them "no" as we've been telling everyone else who wants to use whatever post-60's technology they've chosen for their aircraft.

<comment><USER3> I don't necessarily disagree about those things being sad/scary/pathetic. But these things _cost money_. Taxpayers are generally averse to spending money on long term prevention. Something that people consider an "expensive boondoggle" and refuse to pay for before an incident tends to become "shame on you for not doing your job" right after.

Do you remember after the BP spill how people were shocked -- _shocked!_ \-- that the government did not have deep sea oil rig submersibles and that we had to rely on BP's resources? This type of thinking blew my mind. Who on earth would have supported paying for deep sea utility submersibles for some "black swan" oil spill before this incident happened? And the funny part is, now that it's over and everybody has moved on, they probably still wouldn't.

So back to the FAA... how are we going to pay for top tier engineering talent in the kinds of numbers required to check these components at the level of detail we might wish?

TL;DR: proper oversight costs money.

</comment></comment><comment><USER4> I disagree with the premise that the FAA might understand modern aircraft design better than Boeing. Or that Boeing doesn't have plenty of incentive to make the aircraft very safe.

<comment><USER5> To think that a company will police itself adequately in the face of losing money if rules are enforced correctly is naive in the extreme.

Since when has big business ever cared more about safety than the bottom line?

<comment><USER6> Normally this would be totally true, but given that every airliner crash is worldwide headlines, safety IS their bottom line.

<comment><USER7> What about Challenger? Thiokol engineers wanted to scrub the launch but were overridden by their management over business concerns:

[http://www.npr.org/blogs/thetwo- way/2012/02/06/146490064/rem...](http://www.npr.org/blogs/thetwo- way/2012/02/06/146490064/remembering-roger-boisjoly-he-tried-to-stop-shuttle- challenger-launch)

It's not exactly the same situation but I think it illustrates the need to have independent oversight from someone outside the same management hierarchy – otherwise it's just too easy to cut corners, particularly since the feedback usually isn't immediate.

<comment><USER8> It's worse than Challenger. NASA isn't a publicly traded corporation, airlines didn't buy shuttles and people didn't buy tickets on the shuttle. If a 787 crashes due to a design or manufacturing flaw, Boeing stock price will fall significantly, and customer airlines will be very hesitant to order them.

A closer analogy would be the fallout to both McDonnell-Douglas and the FAA after a series of DC-10 crashes. These crashes doomed the company, and they were sold off to Boeing.

<comment><USER7> NASA isn't a public corporation – although it seems rather unlikely that a disaster getting Congressional attention would be much easier – but Thiokol was a private business and would thus theoretically have a strong incentive not to lose a key contract due to failures in their components.

The problem was that they perceived the risk of perceived flaws as high enough that they chose not to act. Market incentives aren't always as simple as they might seem at first glance.

</comment></comment></comment></comment></comment></comment><comment><USER9> I don't know the details of this specific situation (beyond the article here), but the scenario in general is not uncommon. Employees at avionics companies can receive FAA training to act as internal FAA delegates, reviewing work in line with FAA guidelines, just as an employee of the FAA would do.

<comment><USER10> Came here to agree with you. Most of the repair stations have in house employees that are designated by the FAA to approve any changes. DER is what it is called specifically. This happens because the FAA does not have the resources to look at every single thing on an aircraft.

<comment><USER11> If they did, airline ticket prices would be astronomical.

</comment></comment></comment><comment><USER12> I don't see how the FAA could do differently, given the budget cuts and the rule that prevents them from spending more than 40 hours on a project. Until they can justify splitting up a battery into a multitude of projects (N projects on the anode, N projects on the electrolytes, N projects on the casing, ...), or they are given the means to show their expertise, the checks and balances are engineered for failure from the administration level.

</comment><comment><USER13> I'm actual surprised its not the NTSB that would do the checks. Its seems like, given the funding, that would be a natural fit and help later in the airplane's life.

</comment><comment><USER14> It's a bit of a tradeoff. If the FAA fails at some regulatory function, you can't sue the government. If Boeing fails, at least you can sue them.

<comment><USER15> Who said you can't sue the government?

<comment><USER16> It's called sovereign immunity.

Basically you can only sue the US government over things where it has agreed to let you, like things covered by The Federal Tort Claims Act.

[http://en.wikipedia.org/wiki/Sovereign_immunity_in_the_Unite...](http://en.wikipedia.org/wiki/Sovereign_immunity_in_the_United_States)

<http://en.wikipedia.org/wiki/Federal_Tort_Claims_Act>

<comment><USER15> If you got hurt because the FAA failed to do its job wouldn't that be a perfect example of a case where you could successfully sue the government?

<comment><USER14> Not unless Congress gave you permission to, which they haven't.

<comment><USER15> IANAL, but I'm pretty sure you're wrong. The Federal Tort Act explains the procedures (and puts some limits on) how you can sue the FAA, but it certainly doesn't prohibit it.

Here's 3 seconds of googling: [http://www.firstcoastnews.com/news/local/story.aspx?storyid=...](http://www.firstcoastnews.com/news/local/story.aspx?storyid=149194) [http://www.10news.com/news/faa-settles-lawsuit-with- family-o...](http://www.10news.com/news/faa-settles-lawsuit-with-family-of- deceased-pilot)</comment></comment></comment></comment></comment></comment>