Bloomberg: In an era of hyper-wealth, economy-class rich starts at $25M - <AUTHOR> https://www.bloomberg.com/news/articles/2018-05-23/bankers-don-t-think-you-re-rich-unless-you-have-25-million <comment><USER2> I am quite honestly sick of articles like this.

The original title is: "Here's How Much Money You Need for Bankers to Think You're Rich"

First of all: who gives a damn what Bankers think about anyone? I entered the labor market around 2007 and since the meltdown not much of the general "Bankers Mindset" has changed. Living in London for 2 years it was quite painful listening to some young bankers on parties or other occasions. Their second question usually starts with something indicating your income. 80/20 principle applies but "character shallowness" was a widely spread phenomenon.

SV or the tech scene in general should be more forward thinking and measure a persons stance in society by "how many people does your work effectively help" with "monetary net worth" purely as the result of your actual "value added for society".

<comment><USER3> We need fundamental changes in the generic message that "value added for society" is better for you, for everyone.

Wealth is passing, wealth is relative; once your real, true needs (not the ones you think you need) are covered, we, indeed, should be focusing on moving humanity ahead, and not on personal hoarding.

When my wifes replies to questions like what is your dream house like? as a tiny, self-sustaning house, so I don't have to do housework, she regularly meets confused looks, because "but what about space and and large space and...".

Focus on what you really need, not on what society tells you to believe.

</comment></comment><comment><USER4> Sometimes I feel like these sorts of articles are written as a sort of indulgence to the aspirational class of people who will continue striving for more and more money. For those on a high-net-worth track, but under $25m, this article teases them, and motivates them. But for those over $25m it provides a bit of self satisfaction.

<comment><USER5> It is not article but the social settings you live in. The article certainly influences but that would be very minimal.

</comment></comment><comment><USER6> A million dollars was worth the equivalent of $25M today when the term millionaire was first coined so I'm not surprised.

I passed a million dollar net worth last year and I hardly consider myself a true millionaire. Just a working class developer.

<comment><USER7> I think first and foremost "working class" and "developer" are mutually exclusive, maybe even diametrically opposed terms.

We are not working class, full stop. Nobody here is being crippled by arthritis at the tender age of 40, nobody risks physical injury at their job, nobody is risking a permanent end to their ability to earn a living by someone pressing a button on a machine at the wrong time. Even ignoring the lack of any real _danger_ , don't try to tell me that sitting at a desk for 8 hours a day is even a tenth as physically demanding as welding, plumbing, carpentry, or general contracting is for 10-12.

To imply the people here getting paid $180k a year plus RSUs to type is an insult to real working class people who struggle to make rent every month.

<comment><USER8> > real working class people who struggle to make rent every month.

I agree with the overall feeling of your reply, but let's not fall in the opposite trap to paint a proletarian view of the working class either. The amount of iPhones out there in developed countries is a good indication that a good chunk of the working class has no problem shelling hundreds of dollars on expensive hardware on top of paying their rent.

<comment><USER9> Even the newest iphone cost is a drop in the bucket compared to rent, healthcare, schooling (all of which have vastly outpaced inflation).

</comment></comment></comment></comment><comment><USER10> This is a silly framing. The real story seems to be that below $25 million, it's not that you aren't rich, just that you don't really need customized, private asset management these days. Wonder if that's due simply to inflation, compared to what absolute values we used to consider rich 50 years ago, or improvement in money management options that are available to everyone, or both. It seems like it could be part of the same trend of etfs growing in popularity over active money managers these days.

And I'm completely speculating here but I imagine over that much wealth and you start having some new lucrative (but perhaps ethically dubious) options available that you need a private wealth manager for. Things like being able to exert control on asset prices, getting in on deals that involve some sort of insider info or successful lobbying of the government for special favors, other transactions involving shell corporations and offshore accounts, etc. Or maybe I just watch too many movies.

<comment><USER11> Yeah, the better line of inquiry might be, is customized, private asset management a good deal for someone w/ a $25 million net worth?

Honestly that article didn't cause me any envy, if anything it caused me imaginary anxiety.

Seems like $25 million is when you start to look like a juicy target for people trying to rip you off.

</comment></comment><comment><USER12> One of the best books I ever read was "Stop Acting Rich" by Thomas Stanley. It was the follow up book to Millionaire Next Door.

The main argument is that almost anyone can become a "simple" millionaire through frugality and--most importantly--avoiding trying to emulate the consumption patterns of the "glittering rich" (e.g. decamillionaires and those described in the article).

Combine living below your means with an in-demand skill, a healthy stoic outlook (learn to love what you already have), and you'll have a great shot at financial independence.

</comment><comment><USER13> >Placing investable assets of at least $25 million with a wealth manager—and clients with that amount or more tend to work with a few firms—can bring access to initial public offerings, and having at least $5 million in investments moves a client past one regulatory hurdle to taking part in private offerings.

That's the crux of their argument. It's not about being 'rich' in any social sense, and I think the article was written pretty shamelessly to imply otherwise.

</comment><comment><USER14> The cost of living a reasonable low-risk life certainly goes up every year. If you want to send a kid to college, be able to pay for any emergency medical expenses (like cancer), and retire - you probably need to have a lot more than a million dollars in the bank (along with good health insurance, etc). And if you're not also earning a lot every year, just the cost to live in a non-rural area will probably eat that money up in the span of a few years by itself.

</comment><comment><USER15> I wish I could have $25k per year, or $20k really... $25m would be such a dream. What people do with all this money?

<comment><USER16> Not being attacking or sarcastic. Once you hit $25K, you likely wish you could get to $40K because you could finally buy a nice.... etc., etc. It is the rare individual that can stop the chase. With a 7 figure salary, you just have a nicer and bigger house. Your vacations are to Europe and first class instead of driving to the beach, etc.

The one thing that most studies have shown is that (in today's dollars) once you get above about $80K household income, any more income doesn't make you any happier. If you think about it that makes sense, since at the level and above you can have some financial security and not be paycheck to paycheck (in most areas), have a small house and decent cars which greatly reduces your stress and leaving room for contentment. Of course, each person's goals are different and the amount of Jonesing they can control is too.

<comment><USER7> Not to be nitpicky but you can do a European vacation with first class airfare when you make much less than a million dollars a year in income. Two people NYC to London 6/18-25 is $10,200 for airfare. Assume that everything else you do costs 2x that much if you're going all out (the few times I've purchased first class tickets, that cost has ended up being 50% or more of the entire trip). You're still at $30k for a vacation, which is an astounding amount of money to spend on a week for sure. But at the same time, if you make $250k a year and this is a special event, 10th/20th/30th anniversary, big birthday event, etc, it's not outside the realm of possibilities to spend 2 months salary on something like that.

Obviously you still need to save and plan it, and if you're making $1 million a year you can probably spend $30k without thinking about it. But just wanted to point out that it's doable.

As for the $80k study you're mentioning I've seen numbers all over the place, from $70k up to $105k, but I've definitely noticed the satisfaction from each raise has decreased even while the raw dollar amounts have gone up. The last raise I got only served to go toward paying down debts faster, which I can attest makes me very happy.

<comment><USER17> I just want to point out that if you live in NYC, that $30k vacation will cost you about $50k in pre-tax income. And no one I know in NYC who makes $250k is going to spend 20% of their annual income on a vacation. And ironically, those who _could_ are disciplined and frugal enough that they probably never would.

<comment><USER7> Well nobody calculates the cost of their vacation based on pre-tax income. And someone making $250k in NYC is doing much worse off than someone making $200k within a few hours drive of major NYC airports. I just picked NYC because there are a lot of one-way flights to London.

</comment></comment></comment></comment></comment><comment><USER18> The true measure of wealth should be, are you financially independent? Meaning, could you never do wage work again in your life and never have to worry about money? By my calculations that would be in the area of a few million dollars, invested in some bonds, living purely off the interest forever.

<comment><USER3> > The true measure of wealth

Are you happy? Do you have goals? Do you have/serve a purpose?

You know, the real questions.

</comment></comment><comment><USER19> Misleading title and article premise.

As mentioned in the article itself, $25M is currently an approximate treshold where certain bankers define you as "ultra-high net worth". Which sounds reasonable to me.

That is not economy-class anything by any common definition of the term.

</comment><comment><USER20> I hate this shit. It's kind of unbelievable that this kind of wealth concentrated with such few people is allowed to exist.

If it could realistically be capped at, say, $10mil or something, why not?

Nobody needs more than that. Yes, you could say the same for one million or a hundred, but you have to start somewhere. It makes me sick that this is the society we live in.

This pathetic striving for maximum wealth, in an eternal competition over who has a bigger ficitious number attached to their family emblem, no matter what the societal, ethical and global consequences, is close to the root of all evil in my opinion.

<comment><USER21> What system do you suggest that has a track record of lifting more people out of poverty than capitalism? On average, people tend to efficiently manage their productive capacities in the pursuit of wealth.

<comment><USER20> Actually, that is an excellent point. I do not suggest another system.

I guess there is this strange notion that Capitalism is this "all or nothing" system, where you either get a free market with its invisible hand or nothing. This sort of "Everything else is communism" thinking.

We all know that this is not true. Capitalist societies have all sorts of schemes that are "un-capitalistic". Take public healthcare. In some ways that's a very socialist idea. At the same time, you could argue it supports the capitalist system by taking various burdens off the workforce, enabling them to spend more time generating more money than it cost to implement the socialist health care.

My theory is that concentration of wealth is incredibly dangerous to society because it gives disproportionate power to very few individuals. The control these people exert over policy, their workers, our entire culture leaves us at their whim. This results in things like Brexit and the insane clusterfuck that's the current US government and the populist right-wing uprising in Europe.

I don't care whether someone has tons of money so they can wank themselves to sleep over their financial portfolio. I do care when society as a whole, human progress, everyone's actions are filtered through the lens of a few rich people's actions and desires.

I hate this notion that the population-at-large is just a sideshow on this rich-people's playground we call earth. It is sickening. The wealth that these people amass does not trickle down and is not used for more useful things than it would be if this wealth was somehow capped and re-distributed for the benefit of society. (And believe me, I know that on the flipside this would be a breeding ground for bloated institution wasting money with their inefficiency. This would also not be a 'perfect' system by any means, but I do believe it would be better than whatever it is we are currently steering towards.)

To quickly touch on people being lifted out of poverty. I am all for it. But under what conditions? Is a Foxconn factory worker someone who was lifted out of poverty? Is a quasi-slave working on the Qatari football stadium lifted out of poverty? In exchange for what?

Is the ever-decreasing quality of life people on disability benefits in the UK, being harassed by the DWP 24/7 and stripped of all agency and freedom worth it, because they are not considered "below the red line poor"?

Would the reinvigoration of public services by capping wealth (or introducing profit sharing in companies, or 20:1 pay ratios / stock option ratios for companies) be so devastating to all of society that it would indeed be worse than the current destruction of democracy by your Murdochs, Kochs, Zuckerbergs, Bezoses, Rothchilds and whomever else super-rich acting in their own interests?

<comment><USER21> I also agree for progressive measures to prevent huge wealth inequality, which is not the sign of a healthy free market economy. The wealth distribution of the mid 20th century is much more in line with what I and some economists believe to be 'optimal inequality.'

Interesting link here: [http://nautil.us/issue/52/the-hive/is-there-an-ideal- amount-...](http://nautil.us/issue/52/the-hive/is-there-an-ideal-amount-of- income-inequality)

However, I have very different ideas about why it exists and how to fix it. In my opinion, over-regulation, taxes, and nanny-state-ism have caused both financial problems and culture problems. Our heavy handed government continues to further disincentivize risk-taking, a hallmark of a free society, it entrenches wealth (both private individuals and big companies) by preventing average folks from taking risks in the financial system in the name of protecting them, and by adding thousands of pages of regulations to big industries (be it cable, credit reporting, banking, and soon social media) making them inaccessible to startups without both deep pockets and connections. We also have a government that prefers an inflationary currency for the illusion of growth and questionable long-term benefits, even though the poorest are least able to translate their cash into cash-flow producing assets and the wealthiest have capital gains taxes capped at a lower rate than a relatively low-income earner's taxes, which is indeed a regressive system. Not to mention all of this is done with a nearly regressive tax system (on top of the existing inflation tax, which hits low income earners hardest).

> Is a Foxconn factory worker someone who was lifted out of poverty? Is a > quasi-slave working on the Qatari football stadium lifted out of poverty? In > exchange for what?

I would counter by asking whether these workers living in free market societies? Clearly not, both are working in dictatorships and are not free at all. Even the US is far from a free market system due to many points, some of which I touch on in this thread.

> Would the reinvigoration of public services by capping wealth (or > introducing profit sharing in companies, or 20:1 pay ratios / stock option > ratios for companies) be so devastating to all of society that it would > indeed be worse than the current destruction of democracy by your Murdochs, > Kochs, Zuckerbergs, Bezoses, Rothchilds and whomever else super-rich acting > in their own interests?

Yes I think that's the wrong way to go about it. I don't believe in forceful, direct wealth distribution against people who committed no crimes, nor hard, arbitrary caps determined by bureaucrats. Ask questions about how it happened and how to make it better. How about we start with updated income tax brackets for the super-rich or a negative income tax? Right now the highest brackets hit people who are really not that rich (making 470k as the top bracket pays the same rate as someone who made 50m, and probably more considering higher amounts are usually capital gains), where really these brackets should be spread out way further up to 100 million, and perhaps there should be discounts for wealth factored into the income tax -- e.g. if you sold your first startup for 5 million you should pay a bit less than a CEO worth 100m who makes 5m every year. Combining that with a graduated capital gains system that is updated for the modern world (where 470k isn't considered the 'richest class') would go a long way, especially if rates are reduced for people making less than 400k in the current system.

</comment></comment></comment></comment><comment><USER22> I don't like it, but I don't understand why reading this article makes me feel good.</comment>


YouTube Alters Copyright Algorithms, Will 'Manually' Review Some Claims - <AUTHOR> http://www.wired.com/threatlevel/2012/10/youtube-copyright-algorithm/

<comment><USER2> Yeah, the Ars Technica article is far better.

[http://arstechnica.com/tech-policy/2012/10/youtube- finally-o...](http://arstechnica.com/tech-policy/2012/10/youtube-finally- offers-a-meaningful-contentid-appeal-process/)

The improvements to the content ID algorithm and occasional manual review of those is all well and good, but the _far_ more important change here (as TimNN says) is to the counterclaim process. Before, you had the situation where the only person judging whether or not your counterclaim was valid was the very company that lodged the claim, which is ridiculous (and even if a company is not malicious, they could very well be lazy and just issue blanket denials of counterclaims).

A counterclaim now no longer goes into a black hole, but actually reinstates the video. If a company wants to counter your counterclaim, they then have to file a real DMCA takedown notice, with the normal DMCA process after that.

<comment><USER3> Yes, but there is an important caveat here...

YouTube has a "three strikes" policy with respect to DMCA takedown notices (which doesn't seem to take the result of the takedown into account), so if you dispute too many bogus ContentID claims you could lose your YouTube account.

So I guess the next change to push for is that users should only get a "strike" if the claimant actually sues after a counter-notification (or something like that).

<comment><USER4> Just because someone sues you, does not necessarily mean it is justified.

<comment><USER3> True, but it would be a step in the right direction.

</comment></comment></comment></comment><comment><USER5> > First Lady Michelle Obama's speech at the Democratic National Convention was > wrongly flagged by algorithms just after it aired

No it wasn't.

[http://www.slate.com/blogs/future_tense/2012/09/05/michelle_...](http://www.slate.com/blogs/future_tense/2012/09/05/michelle_obama_dnc_speech_why_did_youtube_flag_it_for_copyright_infringement_.html)

There's always a delay between the end of a livestream and the point where you can watch the prerecorded video. In this case, YouTube merely displayed the wrong error message during that delay.

</comment><comment><USER6> I think the best part is: "Under the new rules announced Wednesday, however, if the uploader challenges the [Content ID] match, the alleged rights holder must abandon I'D [copyright] claim or file an official takedown notice under the Digital Millennium Copyright Act.", as this will probably lead to content owners more carefully reviewing videos and also gives users a much better way to appeal a copyright claim.

<comment><USER7> It also thankfully gets rid of companies claiming they can't be punished for illegitimate takedowns because they weren't done through the DMCA. Until they find some other loophole to hide behind, of course.

</comment></comment><comment><USER8> Ever since my favorite Youtube Channel, SFDebris, moved to another video site after having been wrongfully flagged twice for copyright violation, I've been hoping that 'fair use' would be included.

</comment><comment><USER9> But isn't it still without consequence to file a false claim? I feel like there should be some sort of "punishment" to filing a false claim, whether done out of stupidity or malice.

<comment><USER10> The DMCA stipulates punishments for malicious claims, but not stupid ones. Proving malice would be pretty hard.

Super downside? YouTube's takedown process is a precursor to official DMCA takedowns, so the DMCA punishment doesn't apply until a formal DMCA takedown is lodged.

</comment></comment><comment><USER11> Good to hear having read many cases of somebody filming themselfs, uploading and finding somebody claiming copyright automagicaly against there video.

Be interesting to see how such situations improve.</comment>


Why Use F#? - <AUTHOR> https://fsharpforfunandprofit.com/why-use-fsharp/ <comment><USER3> In my opinion it's honestly the best statically typed general purpose programming language.

f# and also Ocaml strike for me the right balance between practicality and correctness (strict by default, no insistence on purity), but still immutable, good concurrency story, functional first with the ability to write imperative code easily, great type inference etc..

Given that so many mainstream languages are piece by piece moving into the same direction and adopting the ML family approaches I have no idea why not more people are moving directly to F# or Ocaml.

<comment><USER4> I'm looking at Ocaml again because of the existence (and quality) of the Bucklescript backend for Javscript.

That makes Ocaml sound pretty attractive on the portability front.

A question for anybody here regarding portability: Is it viable to maintain a portable core using a subset of Ocaml (something like Standard ML maybe - <USER2> objects) and compile that in F# using Ocaml portability mode?

For context, I've read this question on SO from 2010 [0] but I'm looking for some more 2018 perspectives from HN people.

[0] [https://stackoverflow.com/questions/4239121/code- compatibili...](https://stackoverflow.com/questions/4239121/code- compatibility-between-ocaml-and-f)

<comment><USER5> That answer hasn't changed, in fact as of today OCaml and F# have diverged more than they had back then.

BuckleScript and ReasonML are solid for the frontend, though. I would recommend them without hesitation. For the backend, F# could be nice but as I mentioned, you would share almost nothing between them. If you're looking for a universal (i.e. same language on BE/FE) stack there are many options today, but a classic one is [https://ocsigen.org/eliom/](https://ocsigen.org/eliom/)

<comment><USER6> > but a classic one is > [https://ocsigen.org/eliom/](https://ocsigen.org/eliom/)

I didn't know there were any other attempts at a "universal" platform since Meteor. Thanks for sharing! Please let me know if there are others that you think are worth learning.

<comment><USER5> Sure :-) Another one I admire is [http://opalang.org/](http://opalang.org/) . It too is based on OCaml, funnily enough. The last commit is from last year, though, so this is not a project on the rise.

Here's one for Scala (and Scala.js): [https://udash.io/](https://udash.io/) . It has a lot of cool concepts, like out-of-the-box push notification support with WebSockets. And I am more familiar with Scala than anything else so it is attractive. The only thing that gives me pause is that I've used Scala.js in the past, and its compile times are not something I want to deal with again after using faster transpilers like BuckleScript.

Finally, the one I'm keeping my eye on is [https://dockyard.com/blog/2018/12/12/phoenix-liveview- intera...](https://dockyard.com/blog/2018/12/12/phoenix-liveview-interactive- real-time-apps-no-need-to-write-javascript) . The idea here is to serve static HTML with a minimal bit of JavaScript needed to maintain a live connection to the server, over a WebSocket, and drive dynamism that way. Think React+Redux, but driven from the server side. The client can be mostly a dumb client again. This one has a promising future, with lots of optimizations and benefits falling out of using the Erlang runtime properly.

</comment></comment></comment></comment></comment><comment><USER7> Having used and enjoyed F#, I ended up programming in Scala which is almost the same language, despite the huge superficial differences:

\- Indentation delimited blocks vs curlies

\- CLR vs JVM

\- Whitespace vs Parenthesis for function calls

\- Currying by default vs currying optional

Despite all this, when you actually start coding, it's remarkably the same:

\- Immutability by default, transformations rather than mutation

\- Less classes with embedded implementation logic, more "dumb" records with external functions

\- Structural pattern matching

\- Tagged unions

\- Type inference

\- Convenient definition of record/struct-like data types with free copy- constructor

\- Operator overloading

\- Easy FFI to external libraries in a different paradigm

\- Easy "dropping down" to mutable, imperative code (e.g. for performance, or interop)

\- Both have lots of syntactic and semantic warts and corner cases, though few enough you can live with them

\- Garbage collected, multithreaded, JITed runtime

\- Both compile to Javascript

While every single feature looks totally different on the surface, starting with a totally different syntax, the two languages are more the same than different. If you look at the tutorials linked from that page, all of them can be translated almost line-for-line from F# to Scala (and vice versa: take any random Scala tutorial, and you can trivially translate it line-for-line into F#)

Scala brings with it a bigger ecosystem, both in Scala and from the JVM, and better tooling support in general (Both Scala-specific, as well as general JVM tooling which all works with Scala: profilers, debuggers, package managers, ...), and slightly more seamless platform interop (Scala <-> JVM is less jarring than F# <-> C#), which is why I ended up sticking around.

<comment><USER8> I can echo this. I'm working in F# in my day to day. While I like the language. I find the tooling IDE and other essentials are missing. I spent several weeks fighting swagger generation client and server tools. Something that just worked on the jvm.

I bounce between Scala and Kotlin. But as a Linux dev I find the JVM far more forgiving.

<comment><USER9> Re F# tooling and IDEs: sadly the churn around the transition to .Net Core has really hurt F#s tools. Things that were stable and working since inception, and enabled highly productive workflows, have been trampled by missing features and shifting boundaries on the new platform.

That said: it seems it's finally coming around, as .Net Core matures and gets more mature secondary tooling, a lot of the little blocking issues can finally be addressed.

</comment></comment></comment><comment><USER10> Because if you are a top-notch C# dev, F# is just like you normally code but with less brackets and null reference exceptions.

Also, you haven't experienced implicit typing until you have used F#'s ridiculously powerful approach to it (relative to C# anyway).

<comment><USER11> I'd argue that that's painting with too broad a brush. C# has picked up a lot of features to support functional programming, and has made great strides in reducing boilerplate and clutter, but there are still all sorts of things that F# has and C# either lacks, or requires a lot more verbosity to accomplish the same thing.

Pattern matching, for starters. It's not just chained if-statements on steroids; F#'s decision to make partial matching emit a compiler error is a real sea change in terms of the level of compiler support you get in guarding against unintended consequences in an evolving codebase.

Type providers. They let you interact with external data sources with about the level of ceremony you get in a dynamic language, but are still statically typed. The SQL type provider is particularly impressive. Not only does it generate your DTOs for you without ceremony, even when you `SELECT *`, even when the schema changes, but, if you make a mistake in an inline SQL query, you'll get red squigglies under exactly the spot in the string where the error is, just like if it had been a syntax error in the F# or C# code.

Computation expressions. F#'s equivalent of Haskell's do notation. C# accomplishes similar levels of purpose-specific expressivity in some specific areas - LINQ, async/await, etc - by adding syntactic sugar to the compiler, which means only the C# compiler team gets to do it. Computation expressions let you roll your own.

Currying and partial application. You can achieve the same result in C# with higher order programming, but it gets messy quickly. Also, there's an argument to be made that, similar to how objects are heavyweight closures, dependency injection is heavyweight currying.

<comment><USER12> Do you have thoughts on C# 8's increased pattern matching features?

<comment><USER11> I haven't actually used C#, or any .NET language, since before 7 came out. Based on what I've seen as a sideline observer, though, it looks to me like C#'s pattern matching and destructuring are just syntacitc sugar, and therefore still significantly weaker than what F# has. I don't think you can get to the level of type safety that F#'s pattern matching provides without F#-style algebraic data types.

The reason is that a set of algebraic types in F# is effectively bundle of types that are collectively sealed. In C#, you can really only seal the terminal classes in a cluster of types, which means that anyone else can come along and add a new class to the type at a later date, after the initial module is compiled, possibly even at run time. That undercuts your ability to ensure that a branching statement is airtight.

I believe C# also still lacks active patterns, which are a pretty killer feature if you're looking to do data-oriented programming.

<comment><USER13> C# now has active patterns (which feel like the `is` pattern matching) in the ability to declare a variable as you pass it as an out parameter to an extension function, e.g.

        if (num.IsNotPrime(out var a, out var b))
            WriteLine($"{num} = {a} × {b}");

</comment></comment></comment></comment></comment><comment><USER14> I love F# and there's only one thing lacking in its ecosystem: not many opensource projects written in it. And I don't mean libraries, tools & frameworks, there are tons of those; I mean a real app.

But I hope I can break the trend myself: [http://github.com/knocte/gwallet](http://github.com/knocte/gwallet) . If you want to learn F# by contributing to a real opensource project, you have a chance now.

<comment><USER10> I built a 2D platformer in it: [https://github.com/ChrisPritchard/MiniKnight](https://github.com/ChrisPritchard/MiniKnight)

Also uses MonoGame, and its all running on dotnet core. Reasonably sizable, though still more of an exercise than production quality.

<comment><USER14> Nice! I wonder if you could remove the dependency on System.Drawing by using SkiaSharp?

<comment><USER10> I probably don't need to use bitmaps as maps at all, really; Text files would work just as well. But using System.Drawing cross platform in .net core was an education in itself, so I think worth it :)

</comment></comment></comment></comment><comment><USER15> Can someone please explain to me how you can use F# without each aspect of the development process being a Microsoft technology?

Not to be rude, I just honestly want to know. There is quite a bit of hype around C#, F#. But every time there is a comparison to other languages it seems to skip over the fact that you much have a windows computer running Visual Studio which is a big disadvantage to some people. Quite honestly, they are great languages. I just don't want to buy in completely to Microsoft

<comment><USER16> is it microsoft or windows you are against? basically all of the f# toolchain is open source, and it runs perfectly fine on all three major os platforms using either .net framework (windows), .net core (cross-platform), or mono (cross-platform). most people either develop f# in visual studio or using visual studio code. same goes with c#.

.net core, which is intended to be fully cross-platform is the future of .net.

<comment><USER15> I understand there exists .net core and mono. I'll give them mono. My problem is I haven't seen a single example of a practical application written in .net core or a company that uses it, everything is .net framework. There just aren't many available alternatives to the frameworks and packages that are those who use .net framework take for granted. I hear what they're saying about it's the future, but I have yet to see the fruit of it.

To me .net core seems more like just a buzz word to prove that they like open source and anyone can use their software. But there isn't any way to monitize it so there isn't any reason for them to focus on it.

<comment><USER17> The last time I brought this up on HN, I received a comment [1] from one of the people who work on F# at Microsoft:

      F# is fundamentally a .NET language ... It's impossible to divorce
      the two, even if the target runtime environment is not necessary a
      .NET runtime. Those other environments inherent language design
      decisions made with .NET as a target runtime. The .NET runtime
      with .NET Core is indeed minimal, is natively supported just about
      everywhere, and was built with cross-platform in mind. F# is a
      part of this, for better or worse.

I like F# a lot, and to me it comes across as something of a cleaner, more modern OCaml. I have zero interest in .NET and its toolchain, and I don't want the baggage of its runtime or VM.

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

<comment><USER18> It strikes me as nonsense. Let's take the paragraph and replace "F#" with "C", ".NET" with "PDP-11", and "Core" with "V6 Unix".

Come on, surely you can make a non-.NET dialect of F#. Sure, not every .NET F# program will be portable to it. There must be some considerable abstraction in F# that isn't tied to .NET.

<comment><USER19> [https://fable.io/repl/](https://fable.io/repl/)

This is a F# -> Javascript compiler and environment, itself running in your browser (in Javascript, obviously).

[https://github.com/kjnilsson/fez](https://github.com/kjnilsson/fez)

This is a project running F# on BEAM (Erlang).

So yes, of course you _can_ write a compiler from F# to whatever platform you choose. It's just a really major effort, in no small part because F# is a way, _way_ higher-level language than C (you'll remember 'worse is better' \- a big deal with C is that it's easy to write a compiler for).

<comment><USER18> > _a big deal with C is that it 's easy to write a compiler for_

We are still feverishly at it in 2018 and there is no end in sight.

> _It 's just a really major effort_

That is neither here nor there.

</comment></comment></comment></comment></comment></comment></comment><comment><USER20> Okay, I have heard many good things about F# so I'll give the (probably) kind people who work there two tips on how to get more people interested.

1\. Release an easy to use web framework that deploys easily. (Rails clone)

2\. Release an IDE which can graph from the command line (R studio or Spyder clone)

If you already have these (say a subset of .Net or visual studio / vscode) then the tutorials are misleading because they don't seem the same.

<comment><USER21> Best web frameworks:

[https://github.com/giraffe-fsharp/Giraffe](https://github.com/giraffe- fsharp/Giraffe) <\- thin layer on top of ASP.NET Core

[https://safe-stack.github.io/docs/intro/](https://safe- stack.github.io/docs/intro/) <\- slightly more opinionated but also .NET Core based.

I tend to mix F# and C#, Giraffe is great for sticking a slim web API or interface in front of .NET Core applications that use a combination of F# and C#.

<comment><USER22> Another suggestion would be websharper.

I'm not a web developer, but I have found it extremely simple to write some basic web apps using this.

</comment></comment></comment><comment><USER23> Didn't see a mention of the fact it can compile to and interop with JS via Fable [https://fable.io/](https://fable.io/) which is pretty handy

</comment><comment><USER24> Big F# fan here.

After going through a dozen languages, and listening in/reading scads of debates on languages, I think the author here misses the point.

Don't get me wrong: the points he makes are valid, and they make for a great language. Where I think the problem is when discussing languages is that _languages are an ecosystem_. They're groups of people, tools, message boards, IDEs, meetups, and so forth.

F# is great on the things he mentions, but the real strength is the way F# can take a bunch of dotnet guys and slowly move them towards pure functional programming without there having to be a huge learning curve. Like C#? Like your objects and classes? Fine. Do that. Like you FooBar .NET libary? We've got that too.

From your favorite IDE to the places you hang out, it's all the same. Just now with functional programming.

F#, in my mind, is first and foremost a _training language_ , and I don't mean that in a bad way. It exists in an ecosystem where it naturally helps a bunch of devs learn new stuff. (As opposed to most languages that do some core things, then keep adding crap on top year-after-year)

Which brings me to my only criticism of the language: we're growing a community of wannabe Haskell/Erlang guys who are frustrated doing hook-the- wire-up C# in their day jobs. That can lead to language elitism and frustration on everybody's part. I'm not sure how to solve that. It's probably a good thing to have devs interested in upping their game. I think that if you want to move on to a more pristine language, you probably should do that. Understanding F# as an intermediate/training language for those interested in programming in general is a good way to keep needed context. If you expect it to be something that it's not, it's going to lead to frustration.

<comment><USER22> Maybe Microsoft don't put the effort into the F# ecosystem because it's like the gateway drug to other platforms, which aren't Microsoft. I ended up moving to Haskell after learning F#. I've since moved back to using F# as my primary language, as I'm a recovered type addict, but it does sometimes feel restrictive in its capabilities.

<comment><USER24> My mission is to help devs, so F# is the best spot for me right now. Having said that, I'm quite interested in the theory, so I'll probably be playing around with Category Theory and Haskell over the next few years.

My biggest technical frustration with F# is just what you pointed out: they started down the OCAML route, then pulled back immediately after somebody figured out it would lead devs away from MS. Now all I hear about is how F# will integrate better into existing MS stuff and complaints about how the C# guys are copying F# stuff (and badly). None of that I'm interested in. None of that helps devs.

And I believe your and my observation are related: the more MS tries to keep F# in the fold, the more tension it's going to build between devs who want to branch out and those who don't.

<comment><USER25> The way to combat that IMO is to continue to innovate the language improving both the language and the context it runs in (tooling, ecosystem, etc) making it easier to use, more robust, minimize the costs/benefits of changing, etc. Having a great working functional language with access to a large ecosystem and decent tooling makes adoption easier and less risky. There's more to a language choice than features; it has to work for the dev's, the organization and it has to scale to the "good but not passionate" developer.

</comment></comment></comment></comment><comment><USER26> I used to love F# before .NET Core, but then it was broken for two years for any sane design time experience on Core. I even wrote some rant about it with specific concerns I had ([http://hotforknowledge.com/2016/10/19/4-functional- for-thoug...](http://hotforknowledge.com/2016/10/19/4-functional-for-thought- imperative-for-hacking/)).

Two years later.. and very recently the .NET Core story started to work well, tooling improved to quite workable state, and in combination with C# it's very strong mix of practicality/performance + complex flexible abstractions and correctness.

Over that time F# has added quite a lot of low-level performance features (on par with C# - Span/Memory<T>, ref structs, struct tuples/unions, voidPtr, etc) and they _just work_. Build time is probably the main concern now, I have to disable building F# projects when they are in a solution but not touched because even on i7-8700/16GB it's very noticeable.

Two weeks ago I needed text parser and picked familiar FParsec. It's one of the fastest one in .NET (including C# ones) and is a mix of C# for low-level stuff and F# for powerful abstractions. I refactored it quite substantially and tooling was finally nice. But my attempts to micro-optimize it yielded only in substantially reduced GC due to the support of value structs and Span<T>, throughput was already quite optimal from .NET perspective (only c.<5% gain probably due to GC), so if used with care F# could be as fast as C# (which BTW is native-like fast when also used with care).

I believe such mix is the winning combination: C# is best for low-level high performance stuff, F# is best for complex things such as recursive data structures, analytics and so one.

My big concern is that F# community is great but often F#-only focused, e.g. reinventing existing C# libraries just because it's not F#. This isolationism from .NET as a uniform platform led for example to things such as F#'s `async` is better than Task Parallel Library (C#'s async/await machinery) in theory/design, but TPL is so much superior is usability, performance and deep platform integration but F# cannot use it directly. Without native TPL `task{}` F# is not a fully-featured .NET Core citizen but a niche language for specific tasks where it shines, e.g. to write a AST parser for a new query language. Sad that MSFT invests so little in F#, but the language is definitely is alive, is improving and is worth using.

<comment><USER27> As I understand it, F#'s async funktionality was there first, and C# TPL was modeled after it, but I might be mistaken...

Anyhow I am with you that this is one of the problems I have with F#. Interop from F# to C# is generally pretty bad.

<comment><USER26> Yes, F# was the first with async. Interop with C# is native, all code is compiled to IL and JIT-ed together. Problem with TPL is that it is supported by Roslyn at the language level. The C# compiler rewrites async/await into very efficient state machine. F# cannot natively integrate into that state machine and a long async call chain is always broken on C#/F# boundary, while in C# async-only code could be compiled in a big state machine and with ValueTask (and even better IValueTaskSource that is used in Streams and Sockets in dotnet core 2.1+) a long running while(true) {await... } loop could be allications-free. Add to this upcoming in C# 8 AsyncStreams and importance of this increases. F# allocates a lot on every boundary and basically cannot be a part of a high preformance async data processing pipeline where GC latency pauses are important. Throughput is also lower. There is a way to hook into the state machine manually, but it's still less efficient, cumbersome and unmaintainable. Been there - done that.

<comment><USER27> Ofc everythink is IL but working with Options in C# is not fun at all... same with F# async and C#...not belding well into each other- some things I meant when saying that interop is not good imho.

I am with you in thinking, that there should be only one mechanism and that C#s async is superior...

</comment></comment></comment></comment><comment><USER28> Someone who worked on F# once told me that one reason F#'s uptake was limited was because C# was so good at stealing its best features.

<comment><USER29> > …because C# was so good at stealing its best features.

Let's agree on "replicating some of its great features". If you look at what C# makes of them, more often than not, it's a hack. Maybe one that's better than what C# had beforehand, but a hack nonetheless.

Example:

`async` in F# is not only amazing because of async IO, but its integration is really elegant, too: `async` is basically just a computation expression (if you used haskell: read "do notation"). C# OTOH built in a whole new class of functions that's hardcoded into the language (the same techniques also differentiate C#'s iterator blocks vs. F#'s `seq`).

Another example:

F# has pattern matching, which is tremendously useful because it is exhaustive (there are squigglies if you forget a case). C# 8 introduces switch expressions that aren't, but will throw an exception at runtime instead (i.e.: the detection code is there anyway[1], it's just used the wrong way).

[1]: AFAIK, the autogenerated `default:` IL code is omitted if the compiler can prove that it will never be called. Someone mentions that in the latest "What's new in C#8" videos.

<comment><USER30> Isn't async in f# considerably less efficient than in c#?

<comment><USER31> They have different design goals. Async in F# works better for F# applications. Tomas Petricek wrote a couple good articles [1][2] comparing both approaches to async computations.

[1] [http://tomasp.net/blog/csharp-fsharp-async- intro.aspx/](http://tomasp.net/blog/csharp-fsharp-async-intro.aspx/)

[2] [http://tomasp.net/blog/csharp-async- gotchas.aspx/](http://tomasp.net/blog/csharp-async-gotchas.aspx/)

</comment></comment></comment></comment><comment><USER32> > // no curly braces, semicolons or parentheses

Is this a good thing? It feels like saying "It's English without the periods or line breaks or capital letters."

<comment><USER33> It is because those things are simply not _needed_ to parse or understand the code.

Everyone indents anyway. So why need braces?

Most people write one statement per line. Who needs semicolons. I've often called it the most useless character in programming language history. Whenever I switch from a language that doesn't use them to one that needs them, it's a horrible transition. I have to mentally remember to add this character at the end of most lines.

Parentheses for function calls - in some contexts they are helpful. In most, though, they are not needed. Wherever they are needed, you will have them in F#. For people who went from Python 2 to Python 3, you'll know the pain of suddenly needing parentheses for print statements, and for most of those people, you will not see any benefit to adding those parentheses. Extend that to other functions.

<comment><USER34> "Everyone indents anyway. So why need braces?"

I don't indent. I let the editor do it based on braces.

<comment><USER33> Fair enough. I save on keystrokes by not inserting braces. I do have to manually indent once in a while, but the editor will usually figure out what I mean.

As an example, in a for loop in Python, I need to press a single key for indenting[1]. In a language like C, it would be 4 keystrokes - 2 for each brace. Come to think of it, this is true for if conditions, functions, etc. Pretty much all places you'd need braces in C. I'm having trouble figuring out where in regular programming in Python a braces would mean less work for the programmer.

Indenting is simply less work than inserting braces.

[1]Strictly speaking, for dedenting when I'm done with the for loop.

<comment><USER34> All you are saying is personal taste and familiarity. Nothing wrong with that but I could argue every one of your points exactly the other way and would be as right as you are.

In the end you get used to almost everything.

</comment></comment></comment></comment></comment><comment><USER35> I've read on HN that F# doesn't get nearly as much attention and support from Microsoft as C# does, to the point where people expressed concern that F# might be put into maintenance mode.

Does anyone reading this feel that way, or was it just FUD?

<comment><USER36> F# support always lags behind by a couple of years. Only very recently (as of last week) you could release F# UWP apps. [https://github.com/dotnet/corert/issues/6055](https://github.com/dotnet/corert/issues/6055)

<comment><USER37> Which still isn't production ready it seems.

"One thing I noticed is that the compiler only crashes when building x86. It compiles fine for x64."

"Are we stuck on "Allowed but not officially supported" for now or are there any plans towards "Officially supported" ?"

</comment></comment></comment><comment><USER38> How does F# compare to Haskell? I wan`t to put one staticaly typed functional language under my belt and I do like what I read about F# but I do not like it`s windows/microsoft ecosystem. I`ll probably go with Haskell.

<comment><USER22> F# is not strictly tied to Windows, it also works fine on Android, iOS & Linux, and is completely open source. It was open source well before the rest of the .NET ecosystem. Community contributions are larger than Microsoft's own. Haskell has very limited mobile support.

In terms of language. F# is easier to learn and more practical to use for everyday programming. Haskell is more of an academic language, and takes a high level of expertise to utilize for real world development.

Haskell is a purely functional language which makes great effort to eliminate side-effects altogether. F# on the other hand, is merely functional-first, but allows side effects by explicitly marking things as mutable, or by utilizing existing .NET libraries which have side-effects.

</comment></comment><comment><USER39> Been learning F# the last two months. Wanted to learn Ocaml first. But F# is the sweet spot, beautiful functional syntax . Can leverage the now open .Net Ecosystem + pretty fast for doing financial stuff that I wanna do.

</comment><comment><USER40> My startup, [https://masse.app](https://masse.app) has it's entire backend running on F# + .NET Core + AWS (Lambda and Fargate). Works great!

</comment><comment><USER41> I've wanted to learn F#. I'm particularly curious about parsing and text processing, and wonder whether the pattern matching feature would work well for that.

It would be great to see an HTML minifier in F#. I've thought about building one as a way of learning the language. An F# based static site generator, similar to Jekyll or Hugo, would also be neat.

Compilation of F# is a confusing story to me. If it's still compiling to an IR, and getting JITted at runtime, that seems kind of inefficient in a world where Go exists. There's the CoreRT project, I think, that allows for precompiled .NET applications, but I'm not sure how F# fits in. I also read that all Windows Store/UWP applications are precompiled on Microsoft's cloud. I'm curious about compile-time flags and optimizations for F#, but they're rarely mentioned.

<comment><USER10> For text processing in F# there is a library called FParsec, which is really powerful: [http://www.quanttec.com/fparsec/](http://www.quanttec.com/fparsec/)

Regarding JIT and Go, I've built identical programs in both and while Go is faster, its not by as much as you would think (in my example, 60ms vs 40ms). Go is much more verbose to write, but its output exe is all by itself without the hundreds of dlls .NET likes to lug around.

F# works with CoreRT just fine, with some small caveats (its sprintf/printfn functions don't work I think). I've modded one of my games to use it: [https://github.com/ChrisPritchard/Tetris](https://github.com/ChrisPritchard/Tetris)

</comment></comment><comment><USER42> My favourite F# features:

\- Single-case discriminated unions. I feel so unprotected when working in C# due to IDs usually being primitive types. You're never sure if you'll accidentally flip two `int` parameters in a method call.

\- Automatic currying and partial application in combination with piping `|>`. Enables so intuitive and elegant code flow.

Performance characteristics are decent as well[1].

[1] [https://benchmarksgame- team.pages.debian.net/benchmarksgame/...](https://benchmarksgame- team.pages.debian.net/benchmarksgame/faster/fsharp.html)

</comment><comment><USER43> I love F#, but it seems like the language is either abandoned or on life support by Microsoft - compare the feature development speed of C# and Typescript against F# and you'll see that.

<comment><USER9> C# is still rushing to get features that F# has had for years, with no hope on some major fronts. If F# were innovating that much it would indicate that F# was sorely lacking at launch, but it wasn't.

F# is based on a much more mature langauge, with mature concepts for handling the secondary and tertiary effects of those features currently coming into C# and Typescript. By adopting that mature language, F# started out "right" and hasn't needed much to fix it.

And in terms of work: checkout the templates for F#, the libs for F#, and the thoudands of examples on MSDN in F#... But more specifically, check the amount of low-level improvements, refinements, and user-friendly sugar the team has landed in years of late. There's constant improvement, but of a less "revolutionary" nature as the base design was so mature.

People confuse new shiny toys in IDEs with fundamental support. That's not necesarily the important thing... The convergance of functional languages and cloud native development is, in many cases, the important thing to MS, and is another area where F#s tooling/ecosystem is years ahead of the C# equivalents.

</comment></comment><comment><USER44> I played around a lot with F#, and I really like it, but I got to this question of why use F#, and it is actually really hard to come up with a good answer to it, mainly because C# is really good and the real question in .NET is why use F# over C#. If you program with the same mindset of F# in C# then the differences are not super quantifiable.

In general terms F# as a language is nicer than C#, but my real question is it good enough that you'd want to covert to it if you are mainly a group of C# programmers, and I reached the conclusion that it's probablly not simply becaus C#, in general, is not really that horrible to start with and a lot more people do things in C# and everything in the .NET world is looked at through the lens of C#. I asked a similar question on the F# communities slack, and beyond a few language features ( that are nice! comprehensions and discriminated unions, and more concise syntax with implicit typing ) it's really hard to find a reason. Part of the problem is there is very little in terms of libraries that are unique for F# that massively jump start you in any particular direction. What's more, quite a lot of F# code that fits in with frameworks that were built in C# often just look like C# written in F#. F# code written with F# oriented libraries are really nice and super concise, but it's a bit of a lonely world.

<comment><USER14> > If you program with the same mindset of F# in C# then the differences are > not super quantifiable.

I think they are. F# defaults to immutable stuff. Everytime you write anything in C# and forget the word "readonly", you're opening the door for a race condition. Also F# is much more succinct, things that take dozens of lines in C# are just one line in F#, take a look at this quick guide I wrote: [https://github.com/knocte/csharp2fsharp](https://github.com/knocte/csharp2fsharp)

<comment><USER44> While those are nice things, they don't really bite me in the C# world. There's a lot of fuss about it in the F# world, but it really isn't that big of a problem in my experience. I do like the robustness of it, but in practical terms... it's only a minor point in F#s favor

<comment><USER14> I guess you say this because you don't really do multi-threading that much or haven't had the urge about parallelising your work yet ;)

<comment><USER45> C# with the good old .NET BCL has excellent support for multithreading, even if some language features could make it even better, there's no need for smugness.

<comment><USER14> I didn't say that C# doesn't have support for multithreading, I said that C#+multithreading is more prone to race-conditions than F#+multithreading.

<comment><USER22> I wish MS had continued support for their "Axum" project, or at least open- sourced it so that it could be continued outside of MS.

It was essentially a C# subset with "static" removed and replaced with "isolated", with some other new stuff added. Code was separated into domains and actors, which could be safely used without the concerns on race conditions. Essentially erlang-like programming on .NET

<comment><USER14> Interesting.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER46> Seems like a decent alternative to C# on dotnet. Its a pity it feels second- class.

</comment><comment><USER47> The curly brackets is not "coding noise."

<comment><USER27> I think otherwise. Curly braces and semicolons do not serve a purpose.

My only beef with F# is multi line expessions...indentation is sometimes weird.

<comment><USER48> curly braces enable code readability, you know where to start reading and you know where to stop reading. the situation is the same with the semicolon.

programming languages are written to be read by humans and humans do better with start and stop points. if i've ever blearily looked at code at 3 in the morning,i basically run on autopilot relying on the braces and the semicolons to guide my eyes

<comment><USER22> If you use VS or Monodevelop, there's are options you can enable which show indentation margins, which is even better than braces. Seems like a non-issue.

<comment><USER47> Basically, you are discussing an attempt to move away from the purely textual, linear representation of program code (at least, in the way the programmer sees it). Yes, sophisticated tooling becomes very important then. But it is not always available.

<comment><USER22> I wouldn't say it's really sophisticated tooling. Many basic editors support visual whitespace in one form or another. Some insert a semi-opaque character in place of tabs/spaces, and others show rulers.

F# is whitespace sensitive, so you need to stick to correct tab sizes anyway, and it becomes quite readable.

For types, you can also add `class`, `interface`, `struct` at the start and `end` on the correct indentation after its definition to show a clear boundary.

        type X() = class

            member this.X =
                ...

        end

</comment></comment></comment></comment></comment></comment><comment> ainar-g They show the "type-safe printf" example there, but they don't seem to explain anywhere, if I can write my own type-safe variadic function or not. Is printf a built-in that is built with magic not allowed for mere mortals or do they just not dive into the topic because it's complex? Can any F# affectionados elaborate?

Also, they only talk about units of measurement in the context of floats. Can I not have integers or rationals with units?

</comment><comment><USER37> Lack of support in all targets that require .NET Native, no love from the teams that do .NET graphical tooling, a couple of high figures on the community that love to bash C# and VB.NET and the company that makes it possible that F# exists to start with, is what puts me off to invest more time into F#.

It is one of the best ML derived languages, but as it is, I rather wait for C# and VB.NET to keep getting features from F#.

<comment><USER49> > a couple of high figures on the community that love to bash C# and VB.NET > and the company that makes it possible that F# exists to start with

I stopped learning F# myself for this reason in particular. I really enjoy the language but I just cannot stomach the F# community. The .NET community is small enough as it is, and F# is a fraction of a percent of that, but they are extremely vocal others and bully others for what seems like no other purpose than to gain personal popularity and sell books. If this community went away I think the language would do much better, or maybe there would be room for another functional language on .NET that could start fresh without a history of pain. The entire situation is simply sad.

</comment></comment><comment><USER50> If I want to learn F# is there a good IRC/slack channel I can get on? I'd like recommendations for libraries. I have a project I could throw at it for fun/ learning.

P.S.

Can someone explain this?

        // complex types in a few
        type Employee =
          | Worker of Person
          | Manager of Employee list

<comment><USER51>
        abstract class Employee {}
        class Worker : Employee {
          public Worker(Person o) {...}
        }
        class Manager : Employee {
          public Manager(Employee[] o) {...}
        }

<comment><USER22>
        abstract sealed class Employee {

            enum TAG { Worker, Manager }

            readonly TAG tag;

            Employee(TAG t) {
                tag = t;
            }

            public class Worker : Employee {
                public Worker(Person p) : base(TAG.Worker) { ... }
            }

            public class Manager : Employee {
                public Manager(Employee[] o) : base(TAG.Manager) { ... }
            }
        }

This is a bit closer to how it is really implemented. The constructors are internal to the outer type because it is sealed, making it a closed type. Interestingly C# rejects abstract & sealed on the same type, although this is accepted on the CLR.

Discriminated unions are sometimes called tagged unions because of the way they're implemented. It's typically more efficient to check the tag on the object than it is to test its type. The tag is used when pattern matching over the object.

<comment><USER51> Ok, the idea was to communicate to someone who has never seen an ADT before what kind of thing it is, rather than a full decompilation of how it's really implemented, but thanks for that too.

</comment></comment></comment></comment><comment><USER52> Wow, and I was just looking at mixing this in with a API C# dotnet core app I was playing with.

Wish it was easier to mix the two, it's pretty nice being able directly interface through dotnet, be even better if I could have fs and cs files next to each other.

<comment><USER22> One thing about F# is that the ordering of compilation units is essential. You need to list your files in the order they are to be compiled because you cannot have circular dependencies between the units. This leads to making better decisions about code most of the time.

It is still possible to have circular dependencies. Either by including the mutually related types in the same code file separated by the "and" keyword, or by using signature files to define the type signatures ahead of their implementation (which work similar to header/implementation files in C, C++ etc).

</comment></comment><comment><USER53> and yet they impose nonsensical CamelCase on us where unsuitable as always, for example - this.IsEven... i'd say IsEven is a type, buuuuuuuuuuuuuuuuut, how can I know here in F#?

<comment><USER54> That's PascalCase :)

</comment></comment><comment><USER27> imho one of the best sites for learning a programming language if you already know how to program.

My biggest problem with F# is the bad tooling. For professional coding you need tools like static analysis, refactoring and so on.

with those you can use the knowledge of other to improve your code.

R# did a lot for C# in that regard.

</comment><comment><USER55> Does anyone know specific teams in Microsoft which are mostly F#? I might start to target them :)

</comment><comment><USER56> I like f# because most of the notes in the scale are black keys, so don't have to move my hands very much to play the whole scale... Of course I know what you're talking about.

</comment><comment><USER57> I'm impressed :o

</comment><comment><USER58> "F# is not cluttered up with coding "noise" such as curly brackets, semicolons and so on.

You almost never have to specify the type of an object, thanks to a powerful type inference system."

As a C++ programmer, both of those sentences make me shudder. Lack of specified types reduces readability by an order of magnitude, at least for me personally, and especially with complex projects I end up spending a lot of time trying to guess "what is the compiler going to assume this object is"(looking at you, "auto" nonsense in C++)

<comment><USER59> I have seen a lot of people say something like you did, and after one month working in a mostly-always-auto project they can't ever go back to writing types that your compiler knows perfectly well. 99% percent of the time it is the interface that matters, and for the 1% remaining, sure, write your type.

<comment><USER60> This, I think. Whenever I see heavy anti-auto statements I can't help but wonder whether the author actually ever used auto (or var, or dynamically typed languages) for a while and not just read about it and thought 'wow this is radically different from what I do so it must be bad' (note: been there, done that). I mean sure everybody can have their opinion, but if you have millions using languages without bothering about types and you have the C++ gurus telling you to almost always auto then surely some bells should start ringing that maybe, just maybe, its not _that_ bad.

<comment><USER58> So personally I have tried it with the projects we work on(large, heavily templated C++ projects) and issues I have is that using auto confuses the hell out of VisualAssist and Intellisense(80% of the time they just can't guess what the type actually is so I get no autocomplete on any methods, which slows me down hugely) but the worst part is that the debugger doesn't know either - so any time I get a crash with auto I need to spend additional few minutes to find the actual type(and the right template!) and cast it manually in the watch window, because the debugger either straight up doesn't know, or is inferring the type incorrectly(which is actually worse than not knowing). That's in VS2015 with both MSVC and Clang.

It's great on smaller projects and I have used it for few tools that I wrote - but the larger projects, no thanks. In general our code standard only allows auto if the type is defined immediately before it(so if you create a vector and then want a for loop immediately below it, then it's fine to use auto for the loop, otherwise no).

<comment><USER60> Thanks for sharing, didn't know this was still as bad as you describe. Despite having a considerable amount of template code as well we don't have problems to the degree you mention - especially not in the debugger (but only when compiled in debug without optimizations, not in release, but that's sort of expected). We do use VS2017 though, and basically ditched VAssistX after moving to it because the built-in intellisesne was good enough. It's not like literally _everything_ works, but it's usable enough.

Apart from that I also have an impression, not measurable, that since a couple of years using auto we somehow got used to it and don't have to rely on intellisense etc. Sounds like a contradiction, and might not have anything to do with auto but just C++ in general or even just the team becoming better, but it's like the code is more generic and cares less about exact types but still has less bugs because it's easier to reason about.</comment></comment></comment></comment></comment>


Esquire to use E-Ink on Electronic Cover - <AUTHOR> http://www.nytimes.com/2008/07/21/business/media/21esquire.html

<comment><AUTHOR> They will have a blinking tag on the cover. As a hobbyist, I would love to get my hands on these e-ink displays for cheap.

<comment><USER2> Yes. "How I built my own Kindle using the Esquire cover." is an article I'd dearly love to read (or write).</comment></comment>


PayPal Bug Bounty - a lesson in not being a fuckup - <AUTHOR> http://l8security.com/post/33876600904/paypal-bug-bounty-a-lesson-in-not-being-a-fuckup <comment><USER2> A lovely information leak on Paypal's front-page is if you attempt to login with a banned account, and any password whatsoever, it gives you a nice error message saying that account is banned (therefore confirming the account exists, info leak #1) and also gives the current account balance (info leak #2).

I know this because my account is banned.

Why's my account banned? Because in 2006 I received an unsolicited phone call from somewhere in Nebraska claiming to be Paypal and informing me they needed to verify my account credentials. I played along with the obvious phishing attempt for a few minutes until they demanded the email and mailing address on my account to "verify I was the account holder". I told the woman on the other end to go fuck herself and hung up. Turns out it _was_ Paypal and they banned me for failing account verification.

Fuck Paypal.

<comment><USER3> Why doesn't PayPal and other services add a Verified Paypal code to a user's account page. And train users to login during these phone calls and ask the caller for the code?

The training itself - if you're being verified, you should do the same of the caller - would have immense societal value.

<comment><USER4> IIRC PayPal used to be particularly bad about obliviously sending emails and phoning users; asking for contact info, or other info that shouldn't be communicated in such a way.

</comment></comment></comment><comment><USER5> Anecdotally I've seen similar bad behaviors in a lot of bug bounty programs:

\- I haven't submitted to PayPal, but I do have a minor eBay XSS which I reported in May (eBay doesn't have a bounty program, but they do have a responsible disclosure policy: <http://pages.ebay.com/securitycenter/Researchers.html>). The last time I asked if the issue was patched I was told "Not yet. We'll let you know when this is resolved." This was in June, I haven't re-tested recently.

\- When CCBill had a bug bounty program I was able to gain access to their admin panel because it was publicly accessible and linked to via a directory index. That followed a story similar to the one here (I reported it, it was rejected as a duplicate, I followed up about a month later when it still wasn't patched and they quietly patched it and paid me money)

\- Yandex recently launched a bug bounty program. So far I've submitted 3 or 4 issues. I've only heard about one of them: it was marked as a duplicate, which is fine, but weeks later the issue still isn't patched.

That being said there _are_ companies like Google, Mozilla, Facebook, Etsy, GitHub, Reddit, and many others which take responsible disclosure of security issues seriously. But it does seem like certain companies need to re-examine how they handle reports from external researchers.

<comment><AUTHOR> you're a hero of mine. thank you for this. seriously.

</comment></comment><comment><USER6> I've actually submitted, and was recently paid for a Paypal XSS bug. I had the same issue with the expired PGP key and also received the new key from them manually. The whole process took around 4 months to complete for most of which I was left in the dark. The only notification received came in every 2 weeks to notify me that I was still in queue. Paypal paid me $250 initially and another $500 after the bug was fixed.The initial $250 was actually submitted to the email address on the account I was testing with (which had actually already been "Restricted") as opposed my real PayPal address which they requested and I had provided. I was actually surprised by the amount as at no point was I told how much I would receive (I had originally expected the second payment to also be $250). I appreciate the program but they have a lot to learn, in comparison the same process with Etsy took less than a day for them to replicate/patch. Google even with its size takes roughly 3-4 weeks and communicates fairly quickly throughout the entire process. I will say it was rather nice to be able to cash out the bounty in just a few days after each payment but compared to the rest of the companies with bug bounty programs, PayPal's ranks lowest in my opinion.

</comment><comment><USER7> As an example of a _good_ bug bounty program, my experience with Google was excellent.

If you're interested, I wrote about it here: [http://blog.andrewcantino.com/blog/2011/12/14/hacking- google...](http://blog.andrewcantino.com/blog/2011/12/14/hacking-google-for- fun-and-profit/)

</comment><comment><USER8> Maybe the writer should email the CEO or whoever it was that a week or 2 back was announcing Paypal's brave new era of happiness, joy and customer service.

<comment><AUTHOR> I would if I didn't feel like it would be a waste of my fucking time.

</comment></comment><comment> johnx123-up What tool is this <http://i.imgur.com/rRFW6.png> ?

<comment><USER9> HackBar: <https://addons.mozilla.org/en-US/firefox/addon/hackbar/>

<comment> johnx123-up Thanks. Is it better than Tamper Data and XSS Me?

<comment><AUTHOR> It's actually two different utilities. I use tamper data all the time, but HackBar is great for generating the initial GET/POST.

</comment></comment></comment></comment><comment><USER10> While this is somewhat trivial, what kind of money do companies pay when you submit a security bug? What would Paypal pay?

<comment><AUTHOR> For the Bug mentioned in this post it was $500.

<comment><USER11> Wow, that's barely worth anyone's time. They must not really care that much.

<comment><USER12> If they wanted to pay it like they were paying an employee... they'd just do that. They don't want to.

<comment><AUTHOR> ideally you would think they would pay _more_ than the blackmarket rates for the bugs. it's a capitalist economy in the bug markets.</comment></comment></comment></comment></comment>


Airbnb now lets you bitch about your neighbors if their guests piss you off - tefo-mohapi http://thenextweb.com/insider/2016/05/31/airbnb-now-lets-bitch-neighbors/ <comment><AUTHOR> And the host does what? Move? Not rent?</comment>


GoboLinux – the alternative Linux distribution - <AUTHOR> https://www.gobolinux.org/ <comment><USER2> Nice to see this resurface. Previously: \- [https://news.ycombinator.com/item?id=1735532](https://news.ycombinator.com/item?id=1735532) \- [https://hn.algolia.com/?query=gobolinux&sort=byDate&prefix&p...](https://hn.algolia.com/?query=gobolinux&sort=byDate&prefix&page=0&dateRange=all&type=story)

</comment><comment><USER3> Sounds interesting, but why did they have to use capital letters in the path names?</comment>


Printing a chain of random numbers in TeX, with time dependent seed - <AUTHOR> http://tex.stackexchange.com/q/41849/213

<comment><USER2> Our approach is to have the makefile run a script of your choice that creates a file that is then \input into the main tex document. We do it to include database query results rather than random numbers, however.</comment>


Which conditional would you write? - <AUTHOR> https://gist.github.com/primaryobjects/5510fbfd003a71c10e39c58a1e7b9442 <comment><USER2> The shortest is the first one, since it extends into the fewest text columns.

the last one is the easiest one to maintain, because it can be done on a keyboard with only 15 distinct symbols, while the other variants require 16 and 18.

I don't know which one was easiest to read, all the fonts seemed the same to me.</comment>


Bloomberg New Economy: China Is Winning the Trade War with Trump - <AUTHOR> https://www.bloomberg.com/news/newsletters/2020-09-19/bloomberg-new-economy-china-is-winning-the-trade-war-with-trump <comment><USER2> > At every turn, Trump seems to have been outplayed and outsmarted throughout > the global trade war that began shortly after he took office.

It began long before that. Surely Bloomberg isn't ignorant of all the measures China took to protect their own market, and help their own companies beat foreign competitors, first at home, then abroad? In fact, they're not:

[https://www.bloomberg.com/opinion/articles/2019-07-16/china-...](https://www.bloomberg.com/opinion/articles/2019-07-16/china- s-go-it-alone-economic-plan-is-biggest-threat-to-trade)

Nor are other publications:

[https://www.orfonline.org/expert-speak/china- protectionist-t...](https://www.orfonline.org/expert-speak/china- protectionist-tendencies-continue/)

[https://thediplomat.com/2018/05/why-china-wont-abandon- its-c...](https://thediplomat.com/2018/05/why-china-wont-abandon-its- controversial-trade-policies/) \-- _Originally approved by China's State Council in 2015, Made in China 2025 specifically targets 10 high-tech industries for China to not simply surpass but replace other high-tech economies like the United States, Germany, South Korea, and Japan. The Chinese government is investing heavily in the program through subsidies, loans, and other policy incentives to support companies focusing on high-tech research, innovation, and acquisition of overseas technologies._

<comment><USER3> Watched the four speeches by the US State Department on Chine yesterday.

\- Ambassador O'Brian \- FBI Director Wray \- AG Barr \- Pompeo at the Nixon Library

Now that we've (the US and a growing number of allies) have made it clear that we know what they are doing and will no longer stand for it, China seems to be doubling down.

[https://www.asiatimesfinancial.com/ccp-announces-plan-to- tak...](https://www.asiatimesfinancial.com/ccp-announces-plan-to-take-control- of-chinas-private-sector)

[https://sinocism.com/p/xi-weighs-in-on-united-front- work](https://sinocism.com/p/xi-weighs-in-on-united-front-work)</comment></comment>


Puzzles and Paradoxes in Mathematical Induction [pdf] - <AUTHOR> http://www.math.cornell.edu/~mec/2008-2009/ABjorndahl/ppmi.pdf <comment><USER2> I was first exposed to mathematical induction in, I think, first-year algebra. Although I was able to struggle through the work, I didn't really recognize its power, and thought the whole thing a bit pointless. Blame either my young brain or mathematics education.

A couple years later when I started to take programming more seriously and was exposed to recursion, I did recognize the power there pretty quickly and made a point of getting good at thinking that way. But, I didn't see the link then, between mathematical induction and recursive functions. A few years after _that_ , when I was exposed to mathematical induction again, it seemed like such an obvious and powerful tool, and I was amazed that I didn't recognize it for what it was on the first go around.

There is a saying:

 _when programming recursively, think inductively_

...but the inverse is also true:

 _when reasoning inductively, think recursively_

If you, or a student of yours, or your kid, or whatever, are having trouble with either concept, I would encourage you to study the other one. You probably can't truly understand one without groking the other anyway, and insights gained from the study of one will apply pretty much directly to the other.

This was an enjoyable read. Thanks.</comment>


On the hypocritical nature of self-entitled entrepreneurship - <AUTHOR> http://software-gunslinger.tumblr.com/post/48791703950/on-the-hypocritical-nature-of-self-entitled <comment><USER2> I don't disagree with your initial frustration, but be balanced and understand that your article applies just as equally to the delusional "technical" entrepreneur who: 1\. expects his technical hires to also work for equity at first (because even the technical co-founder is working for free, right?) 2\. wants to change the world with his twist on the next great video sharing app that uses the latest and greatest framework he came up with in his garage and expects all his hires to use it 3\. wants to get rich in the process.

Ultimately, there is no distinction among delusional "entrepreneurs" regardless if they are technical or not. As a matter of fact, I'll posit the technical co-founders are far worst because they expect all technical hires to work as hard as them without pay. At least with the non-technical co-founder, programmers have a little leverage.

<comment><AUTHOR> Just to clarify, I'm not the author. I submitted the article because it makes some valid points.

Of course the author generalizes and if people would stop founding because similar things already exist, there would be no progress.</comment></comment>


Ask HN: How do you test your embedded systems? - <AUTHOR> In the wake of James Coplien's "Why most unit testing is a waste" getting posted once again, I once more started to wonder if some of its theses fit better to some niches in software industry than others.
Mainly, I've been working close to ten years with more or less embedded devices, and the amount of unit testing your usual embedded shop has would make most devs from other walks of the industry faint.
However, that doesn't (necessarily) mean that there are no tests at all. But it's much more common to come across tests that test a whole part of the system end-to-end, like testing that your I2C commands are actually having the desired effect on the other end, or that your IoT node sends sensible measurements to the MQTT channel it should.
Do you use unit tests at all to verify embedded systems? Or is it system-level tests all the way? <comment><USER2> Pulling a single code unit out to test is fine so long as interrupts and other race conditions are not involved, but you must do end-to-end system tests regardless and with extremes of voltage and temperature, corrupted IO etc. It's also good to also test your device without watchdog timers, BOR, stack overflow resets enabled to catch anything that will normally fix itself.

By the way I recommend all the BOR/Watchdog timers and bit error/stack overflow errors to POR the chip if it has the option, I still see commercial controllers and devices locking up and needing a manual power off reset, really unprofessional, so totally enable all these if your micro has them.

</comment><comment><USER3> Stuff that directly touches the hardware is hard to unit test. But embedded systems have a lot of timing and sequencing stuff that can be unit tested. I unit test that fairly thoroughly.

And it's _amazing_ some of the things unit tests have turned up for me. Timing errors. Race conditions. Calling a (pure) virtual function in the destructor of the base class. Semaphore deadlocks.</comment>


10 Linux Commands That Will Save Your Time - <AUTHOR> http://azer.bike/journal/10-linux-commands-that-will-save-your-time? <comment><USER2> The `sort' example will break past one-digit numbers without the -n flag, and the example for `uniq' isn't even accurate without sorting first (not to mention the UUOC).

Setting aside the errors, the author recommends `xdotool' for finding screen coordinates for ffmpeg, but `slop -f %g' allows you to click and drag to select a rectangle and outputs a geometry string that can be given directly to ffmpeg, which is a lot faster.

<comment><AUTHOR> Hey, thanks for the tip about `slop`. I'll update the post.</comment></comment>


Stop Using Free Email - <AUTHOR> https://thetoolsweneed.com/stop-using-free-email/ <comment><USER2> What's wrong with the free tiers of, for example, ProtonMail¹ or Tutanota²?

[1] [https://protonmail.com/](https://protonmail.com/)

[2] [https://tutanota.com/](https://tutanota.com/)

<comment><AUTHOR> Nothing's wrong with the free tiers, but for many people the average storage would put them into a paid plan after a while so I don't really consider these free in the same way.

</comment></comment><comment><USER3> I see some issues with some of the pros: pros: a more private inbox

How does one evaluate that, especially someone not technical?

pro: harder for govt to snoop I have worked for 3'ish ISP's over the years...every single one had NSA core router traffic mirror port to NSA clusters. These ISP's typically get cash in return for their service. So I don't think you can say a smaller shop would be more trusted to even not let the govt in to snoop.

honestly the more i think about it..I am probably safer with a free gmail

<comment><AUTHOR> That's pretty crazy to hear. Is that public knowledge? What's being routed to NSA clusters? All content such as emails?

</comment></comment><comment><USER4> I don't see how they can claim they're "more private", and I don't mind seeing unobtrusive ads in response for good service. So I'm out.

Edit: I just checked and Gmail doesn't have ads and I didn't even notice

<comment><AUTHOR> If an algorithm is not scanning the contents of your emails, and potentially leaking/saving their entire contents outside your account, isn't that more private by definition?</comment></comment>