Regulex – JavaScript Regular Expression Visualizer - <AUTHOR> http://jex.im/regulex/ <comment><USER3> I use [https://www.debuggex.com/](https://www.debuggex.com/) for regular expression debugging and testing.

I find it more useful as it can show how each position of my test string relates to parts of my regular expression

<comment><USER4> I wonder if the author knew this existed.

<comment><USER5> Yeah debuggex's output looks slightly better, on top of having a lot more options. Regulex however is open-source with nicely written javascript: [https://github.com/JexCheng/regulex](https://github.com/JexCheng/regulex)

Here's a side by side comparison with the regexp I wrote to parse URLs [0]

Debuggex: [https://www.debuggex.com/r/yPBRv77Rxl0Ji3Pi](https://www.debuggex.com/r/yPBRv77Rxl0Ji3Pi)

Regulex: [http://jex.im/regulex/#!embed=true&re=^%28https%3F\%3A%29\%2...](http://jex.im/regulex/#!embed=true&re=^%28https%3F\\%3A%29\\%2F\\%2F%28%28\[^%3A\\%2F%3F%23\]*%29%28%3F%3A\\%3A%28\[0-9\]%2B%29%29%3F%29%28\\%2F\[^%3F%23\]*%29%28\\%3F\[^%23\]*|%29%28%23.*|%29%24)

[0] [http://stackoverflow.com/a/21553982/542156](http://stackoverflow.com/a/21553982/542156)

<comment><USER6> On the whole yes, but the minor tweak of expanding shirt hand into a full statement really makes it easier to follow.

</comment></comment></comment></comment><comment><USER7> Thanks for sharing it here. Actually I didn't intend to publish this tool at the beginning,because there are some already. This tool emerges from a piece of extempore code which is a regex parser implemented with DFA only. Then I give it a GUI,so becomes regulex.

Debuggex and regexper are powerful,I agree,that I also hesitate whether there's any reason to publish it.

But I'd like to point out some merits of regulex:

\- Regulex is dedicated to ECMAScript RegExp syntax(So I didn't plan to add PCRE support now)

\- regexper.com can not point out the syntax error index precisely.(Much JS interpreter can not do that)

\- regexper and debuggex both tolerate OctalEscape.

\- Regulex can detect invalid backref,which is treated as OctalEscape in Debuggex and regexper.

\- Because of OctalEscape's complexity, Debuggex did not parse `(\1)\1\2` correctly ( [https://www.debuggex.com/r/_U1r_NxTvLan7h9R](https://www.debuggex.com/r/_U1r_NxTvLan7h9R) ),also regexper.And /^\1(a)$/ will match "a",not "aa".So I treat it as an error.

So at least it can be used to find javascript regex syntax error. ;)

<comment><USER8> One of the creators of debuggex here.

For javascript, debuggex conforms to the regular expression implementation in google chrome (which is mostly the same as all other browsers).

Specifically, a \n in your regex where group n doesn't exist is actually interpreted as the octal \00n.

If I recall correctly, \1(a) should match just "a" because all groups start out as being empty.

Parsing regular expressions is indeed complex, and we've got a massive suite of tests to make sure our engine works correctly (with respect to the chrome implementation, since that's what most people are using js regexes for).

<comment><USER7> Thank you for the great works of debuggex, I like it.

My little tool didn't intend to act like a extreme powerful and multifunctional tool which debuggex is. I know debuggex need to conform existing regex engines,so it will be more useful and can be widely applied. But what my tool intended is another side,trying to point out errors strictly.Such as /\1(a)/ or /(\1)/ doesn't make sense, so I think the ability to report errors like this will be useful.Although js interpreter's regex engine still supports octal today,but I remove it radically(see the project README).Maybe this little feature is useful for someone. ;)

</comment></comment></comment><comment><USER9> Pretty impressive. I took a complicated regex that accepts valid email addresses and the output result looks quite neat:

[http://jex.im/regulex/#!embed=true&re=(%3F%3A%5Ba-z0-9!%23%2...](http://jex.im/regulex/#!embed=true&re=\(%3F%3A%5Ba-z0-9!%23%24%25%26'*%2B%2F%3D%3F%5E_%60%7B%7C%7D~-%5D%2B\(%3F%3A%5C.%5Ba-z0-9!%23%24%25%26'*%2B%2F%3D%3F%5E_%60%7B%7C%7D~-%5D%2B\)*%20%20%20%7C%20%20%22\(%3F%3A%5B%5Cx01-%5Cx08%5Cx0b%5Cx0c%5Cx0e-%5Cx1f%5Cx21%5Cx23-%5Cx5b%5Cx5d-%5Cx7f%5D%20%20%20%20%20%20%20%7C%20%20%5C%5C%5B%5Cx01-%5Cx09%5Cx0b%5Cx0c%5Cx0e-%5Cx7f%5D\)*%22\)%20%40%20\(%3F%3A\(%3F%3A%5Ba-z0-9%5D\(%3F%3A%5Ba-z0-9-%5D*%5Ba-z0-9%5D\)%3F%5C.\)%2B%5Ba-z0-9%5D\(%3F%3A%5Ba-z0-9-%5D*%5Ba-z0-9%5D\)%3F%20%20%20%7C%20%20%5C%5B\(%3F%3A\(%3F%3A25%5B0-5%5D%7C2%5B0-4%5D%5B0-9%5D%7C%5B01%5D%3F%5B0-9%5D%5B0-9%5D%3F\)%5C.\)%7B3%7D%20%20%20%20%20%20%20%20\(%3F%3A25%5B0-5%5D%7C2%5B0-4%5D%5B0-9%5D%7C%5B01%5D%3F%5B0-9%5D%5B0-9%5D%3F%7C%5Ba-z0-9-%5D*%5Ba-z0-9%5D%3A%20%20%20%20%20%20%20%20%20%20%20\(%3F%3A%5B%5Cx01-%5Cx08%5Cx0b%5Cx0c%5Cx0e-%5Cx1f%5Cx21-%5Cx5a%5Cx53-%5Cx7f%5D%20%20%20%20%20%20%20%20%20%20%20%7C%20%20%5C%5C%5B%5Cx01-%5Cx09%5Cx0b%5Cx0c%5Cx0e-%5Cx7f%5D\)%2B\)%20%20%20%20%20%20%5C%5D))

</comment><comment><USER10> These never get old for me. I don't think I've ever used one when I needed it most, because it slips my mind as I power through building a complex regex.. but damn it, not the next time round.

</comment><comment><USER11> This is great but I prefer - [http://www.regexr.com/](http://www.regexr.com/)

<comment><USER12> +1 regexr is my goto tool for regex's.

</comment></comment><comment> guard-of-terra Everybody seems to write a regex visualizer.

It's neat, simple enough to actually finish it and rewarding enough because people like regexes.

The first one I was exposed to is probably KRegexEditor.

But I think it's non-news otherwise.

</comment><comment><USER13> It looks very cool.

I think that on nullable quantifiers (? and (how the fuck do I type a star on the comments)) it misses the optional branch (check [http://www.regexper.com/#ab*c](http://www.regexper.com/#ab*c) vs [http://jex.im/regulex/#!embed=false&re=ab*c](http://jex.im/regulex/#!embed=false&re=ab*c) to see what I mean).

</comment><comment><USER14> Does well on the UK Government Postcode Regex from [http://stackoverflow.com/a/164994/114770](http://stackoverflow.com/a/164994/114770):

      http://jex.im/regulex/#!embed=false&re=(GIR%200AA)%7C(((%5BA-Z-%5BQVX%5D%5D%5B0-9%5D%5B0-9%5D%3F)%7C((%5BA-Z-%5BQVX%5D%5D%5BA-Z-%5BIJZ%5D%5D%5B0-9%5D%5B0-9%5D%3F)%7C((%5BA-Z-%5BQVX%5D%5D%5B0-9%5D%5BA-HJKSTUW%5D)%7C(%5BA-Z-%5BQVX%5D%5D%5BA-Z-%5BIJZ%5D%5D%5B0-9%5D%5BABEHMNPRVWXY%5D))))%20%5B0-9%5D%5BA-Z-%5BCIKMOV%5D%5D%7B2%7D)

edit: the link won't embed here nicely

</comment><comment><USER15> Really interesting visualizing an expression for recognizing multiples of 3 (in base 10)

[http://jex.im/regulex/#!embed=false&re=%5E(%5B0369%5D%7C%5B1...](http://jex.im/regulex/#!embed=false&re=%5E\(%5B0369%5D%7C%5B147%5D%5B0369%5D*\(%5B147%5D%5B0369%5D*%5B258%5D%5B0369%5D*\)*\(%5B147%5D%5B0369%5D*%5B147%5D%7C%5B258%5D\)%7C%5B258%5D%5B0369%5D*\(%5B258%5D%5B0369%5D*%5B147%5D%5B0369%5D*\)*\(%5B258%5D%5B0369%5D*%5B258%5D%7C%5B147%5D\)\)%2B%24)

</comment><comment><USER16> Looks similiar to [http://www.regexper.com](http://www.regexper.com) but working fully on the client.

</comment><comment><USER17> [https://atom.io/packages/regex-railroad- diagram](https://atom.io/packages/regex-railroad-diagram) The main diagram and regex packages are separate node packages, by the same author.

It's nice because it automatically detects when your cursor is in a regex and opens a bottom panel. works for js and Python.

</comment><comment><USER18> My favorite large regex for testing sites like this (Regulex link was very long, so here's a tinyurl):

[http://tinyurl.com/ovmvphg](http://tinyurl.com/ovmvphg)

Original paper: [http://www.cs.sfu.ca/~cameron/REX.html](http://www.cs.sfu.ca/~cameron/REX.html)

</comment><comment><USER19> Kudos to Cheng for putting this nice regexp visualization tool out there. Regexp editors are indispensable for complex regexp'es. I still come back to this minimalistic regexp editor [http://rubular.com](http://rubular.com) when doing regexp in ruby.

</comment><comment><USER20> Wow, there is no shortage of great tools. I really like rubular.com - <USER2> though it is for Ruby I use it for JavaScript too. Being able to generate a url and save it in my code comments is extremely valuable when I come back to the code.

</comment><comment><USER21> Very nice. but it should visualize repetition instead of printing "Repeat 1 or more times". e.g. for "a+" it should be "a -> a*"

</comment><comment><USER22> [http://regexp.quaxio.com/](http://regexp.quaxio.com/)

</comment><comment><USER23> To bad it doesn't work on my phone :(

</comment><comment><USER24> can't do negations, e.g. ^[ ]

</comment><comment><USER24> doesn't do negations

</comment><comment><USER25> Dat comic sans though :P</comment>


Prisons Are an Abomination - <AUTHOR> http://churchlife.nd.edu/2019/02/26/prisons-are-a-biblical-abomination/ <comment><USER3> Article says to abolish prisons and instead focus on healing. But as long as there are criminal opportunities, some percentage of baseline humans will want to exploit them, whether due to rational economic decision-making or quirks of their neurological or psychological makeup. Either way, once there are people with criminal intent, it becomes necessary to limit their possible actions to both limit harm to the community and to facilitate healing. So while we may get away from literal barred cells as other solutions become available, the idea of imprisonment is not going anywhere.

<comment><USER4> > But as long as there are criminal opportunities, some percentage of baseline > humans will want to exploit them, whether due to rational economic decision- > making or quirks of their neurological or psychological makeup.

Can you cite a source on this?

<comment><USER5> obviously they can't, but it seems to be true throughput the recorded history of civilization. the burden of proof is probably on those who want to refute this claim.

<comment><USER6> > the burden of proof is probably on those who want to refute this claim.

I agree that the claim is fairly self-evident, but the burden of proof should be on the person making the claim.

It's not my job to do your research!

<comment><USER7> > but the burden of proof should be on the person making the claim.

I think the burden of proof should be on whomever is making the less collectively accepted claim. If I claim the earth is round and you are a flat earther, I don't have to prove anything to you despite your demands. However, if people everywhere generally accept that the earth is flat, then indeed the burden of proof is on me to prove that the earth is actually round.

In GP's example, the statement "as long as there are criminal opportunities, some percentage of baseline humans will want to exploit them" is a collectively accepted claim. Therefore the burden of proof is on anyone claiming something to the contrary.

<comment><USER6> > I think the burden of proof should be on whomever is making the less > collectively accepted claim.

Good point

</comment></comment></comment></comment></comment></comment><comment><USER8> I hope that this article doesn't distract us from the elephant in the room - that the US incarcerates a greater proportion of its population than any other country, with no apparent benefit in terms of crime prevention. Most of that disparity has been created since the Reagan administration's "war on drugs".

The case for abolishing prison entirely is distinctly tenuous, but there's a fairly obvious case that the US criminal justice system is needlessly costly, cruel and ineffective. Most of the arguments in defence of the status quo are tacitly racist, e.g. "European countries don't need to imprison as many people because their population isn't as _diverse_ ".

Prisons may be a necessary last resort to protect the public from violent criminals, but the US criminal justice system is riddled with genuine abominations - Three Strikes laws, plea bargains, private prison contracts with minimum occupancy quotas, the high proportion of seriously mentally ill inmates etc.

<comment><USER9> > the US incarcerates a greater proportion of its population than any other > country

A large part of this is ridiculously long sentences. You called out California's three strikes law in you comment. One example of this I heard on the excellent Ear Hustle podcast was somebody who was sentenced to 50 years to life for stealing $40 (unarmed) after having two prior convictions. I don't see how this is good for anybody.

<comment><USER10> I personally believe that the American criminal system is more influenced by the Islamic Sharia system when it comes to punishment.

Under the Islamic Sharia system, the laws are very harsh - you steal and your hand is cut off, you rape someone and you are stoned to death, you commit adultery and you are publicly lashed and so on.

But the Sharia also allows the victim (or their relatives) to forgive the perpetrator (with or without some compensation, usually money) in the spirit of Islam.

The American criminal legal system tries to model something similar - and that is why the punishments for most crimes are absurd too; for e.g. US courts sometimes award absurd punishments of 200 years of jail time. Like the Sharia system, once punishments is awarded and carried out the system ensures you end up broken (in spirit, if not physically).

Where as in a Sharia system the victim decides on being compassionate or a "fair" compensation in lieu of a lesser punishment, in the US system this power is held with the government. And this is used as a bargaining chip to make "deals" with the accused (note that I don't say the guilty, as sometimes even the innocent make such deals afraid of the harsher punishment if they were to lose the trial).

(From what I have read, some of the founding fathers of the US were admirers of the Islamic empire and their political and legal system influenced by Islam).

</comment></comment></comment><comment><USER9> Why was the word "biblical" removed from the title? It definitely seems relevant to know that this is a religious argument.

<comment><USER11> Probably something like the BBC, certain words are removed from the lexicon of main stream media.

<comment><USER9> To clarify, the actual article does have "biblical" in the title, it was just removed from the HN submission.

</comment></comment></comment><comment><USER12> After long introspeccion on the topic of prisons I finally distilled why I found them terrible. Prisons as we know them are monuments to the hatred of freedom.

If a society valued freedom as highly as possible, sending someone to prison would be such a spectacular condemnation that great accomodations would be offered. Instead, prisons serve as a demeaning punishment and eternal condemnation.

There is great moral value in taking the liberty stance: it would mean that prison would not be a great punishment for the great number of innocent and wrongfully incarcerated. And It would also be a lot easier to prosecute all kinds of crimes, as prison would not be as terrible as it is (but, if freedom valued, still a punishment)

<comment><USER13> But then you lose the value of deterrence. I'm not bashing Norway, but if that's what our prisons were like, I think a lot of people wouldn't find them a deterrent at all, and in fact for a lot of people, they would represent an improvement in their lives.

Prison should not be cruel (e.g., solitary confinement for more than a short period of time in unacceptable), but it should still be unpleasant if it is to serve as a deterrent to committing crime, and that is definitely one of the biggest reasons we have prisons... to incentivize people to stay out of them.

<comment><USER6> Unfortunately, I think this is true.

If in a game I can steal 10 points and at most get a 1 point penalty for getting caught, I'm much more likely to give it a shot than if I get a 10 or 20 point penalty for getting caught. Plus, if everyone else in the game is cheating and getting away with it, I'm much more likely to try it too.

The problem is if you make the penalties so severe and the application of the rules unequal, then you end up with chopping people's hands off for stealing.

<comment><USER12> Losing your freedom is a -100. That is, if you value freedom.

<comment><USER6> Depends on how long you're in jail for and if it's Club Fed, or a Super Max.

I'm sure there are tons of people that would be willing to risk a month or even a year in Club Fed for a chance at set for life money.

The calculation is different for everyone.

<comment><USER12> If jail were not a terrible place, would criminals to be choose not to be criminals and just go to jail?

</comment></comment></comment></comment></comment></comment><comment><USER14> I don't really know if I agree with the premise of this essay, mostly due to its deeply religious argument. Beyond its intense spirituality however its message is quite clear- the writer considers prisons to be a horrific phenomenon, and because horror is a reaction of morality, a morally unacceptable phenomenon.

The writer goes on to emphasize that prisons are morally unacceptable, but also importantly the normalization of imprisoning humans to be morally unacceptable.

<comment><USER15> The author probably only finds confinement-as-punishment morally unacceptable because he believes that just punishment will be meted out in the afterlife anyway. If you take away the assumption of religion, there's really no argument left.

<comment><USER13> If he's appealing to Catholic social teaching and using that thinking, he's definitely missing the point.

No proper Catholic would think, "We don't need to punish people now because they'll get theirs in the afterlife". That is absolutely not a Catholic view for a number of reasons.

</comment></comment></comment><comment><USER16> It seems there is a shift in the terminology used - at least in the US - <USER2> explicitly referring to people being _caged_. This is the second article in a few weeks I read with this new language. The previous one was I think an article about the jail in NY left without electricity. I must say even if it seems at first to be a strong vocabulary it doesn't seem to me exaggerated. Maybe it will help people understand the overall inhumanity of the current situation.

</comment><comment><USER17> I only skimmed, but...there weren't a bunch of supporting arguments in this piece, right? The argument is basically "people in cages is bad", which seems like a reasonable take if you never question why people are in there.

Anger doesn't "mark...our reaction to encountering a wrong" if our reaction is not grounded in truth.

There is plenty of room for criminal justice reform, but not by banning prisons, and not by this kind of argumentation.

</comment><comment><USER18> Reminds me of Norway's implementation of prisons:

[https://www.businessinsider.com/why-norways-prison-system- is...](https://www.businessinsider.com/why-norways-prison-system-is-so- successful-2014-12)

Treating people with decency and respect, and giving them options to better their life usually does wonders.

<comment><USER19> Norwegian prisons are based on the aspect that "people make mistakes, but they can improve", in other words, rehabilitation. Most countries have based their prisons on the view that prison should be a form of punishment for wrong doings.

</comment></comment><comment><USER20> > Attacking the image of God in the human is abominable, but this need not be > a literal attack. Rather, a literal attack names but one species of the > genus 'domination,' a broader category in which one imposes an arbitrary > will on another. An individual can dominate, or a social system.

I am enjoying seeing anarchist anti-capitalism popping up everywhere. This professor should check out Current Affairs and Nathan J. Robinson, folk punk, Proudhon...

> Just as human-made categories disguise themselves as divine, divinity is > obscured by social conventions.

I feel the professor would appreciate some Buddhist teachers!

</comment><comment><USER21> Wow this is something else. The historical revisionism and simultaneous appeal to Catholicism is ridiculous.

While prisons have many problems and the church has spoken against poor treatment of prisoners for many years, the opposite conclusion -- that we should abolish prisons -- is nowhere to be found in the compendium of social teaching. Moreover, the idea that prisons should serve a purely restorative role is a modern invention. While restoration is certainly one goal, catholic teaching also commands just punishment for crimes. The issue today is disproprotionality in the sentence when compared with the crime committed.

Had the author stuck to that point, he would have had a good essay. Instead he claimed all prisons are immoral. This is simply at odds with the Catholic social teaching that just societies must seek temporal justice on behalf of the victimized

Claims that prisons did not exist in the past are met with obvious skepticism when you read about the apostles being imprisoned for sedition as well as the catholic moral commandment to visit the imprisoned. Long sentences are of course more common today as the power of the state has grown, but this is not something to be criticized since many prisoners who have long sentences today would have been swiftly executed in the past.

(Focusing on catholic teaching here because its from notre dame and Villanova)

<comment><USER22> I commented myself then deleted it because your rebuttal was more elegant :-)

As a father of daughters I am personally glad that prisons exist and fully understand the issues with incarceration, but gladly accept the trade-off (like many moral dilemmas the optimal choice may differ from person to person). Were I African American and more likely to be wrongly imprisoned, I might feel differently.

<comment><USER9> > As a father of daughters [...]

> Were I African American [...] I might feel differently.

Why can't you incorporate women's issues into your world view without having daughters? Or civil rights issues without being black?

<comment><USER23> > Why can't you incorporate women's issues into your world view without having > daughters? Or civil rights issues without being black?

Most people are most sympathetic to the plight of themselves and perhaps their children. The GP has daughters and is presumably not African-American.

I wonder if you're talking about an attitude that you think the OP _ought to_ have, whereas he/she is describing the attitude that he/she _does_ have.

<comment><USER9> > I wonder if you're talking about an attitude that you think the OP ought to > have

Yes, of course I am. My question was rhetorical. It sounds like that person understands that there are serious race issues in the criminal justice system but is willing to overlook them for his own self interest. I think we'd all be better off if we cared a bit more about people who are different from us.

</comment></comment></comment></comment></comment><comment><USER7> > Just as anger marks our reaction to encountering a wrong and love marks our > reaction to encountering the good, horror is a moral emotion marking our > encounter with an abomination.

"If something makes me feel bad, therefore it _is_ bad. If something makes me feel good, therefore it _is_ good."

Yes, prisons are unpleasant. Yes, we have a lot of people in there that _probably_ don't belong there.

But we also have a lot of people that just can't integrate without society without committing egregious crimes no matter how many chances they get. What do we do with people like Charles Bronson[1]? Of course, fluff pieces like this don't propose any solutions, just make sweeping declarations that prisons should go away because a 5-year-old spoke a profound truth that keeping people in cages is wrong.

[1] [https://en.wikipedia.org/wiki/Charles_Bronson_(prisoner)](https://en.wikipedia.org/wiki/Charles_Bronson_\(prisoner\))

<comment><USER24> > _Yes, prisons are unpleasant_

I think that's a bit of an understatement. For a vast number of inmates, prisons seem to be hell on earth.

<comment><USER7> Are they really that bad though compared to historical prisons? What makes them "hell on earth"? Modern prisons you get climate control, TVs, gym access, library access, (limited) internet access, 3 meals a day, etc. Not even 200 years ago, prisons were often the crawlspace under a building where the ceiling was only 4 feet off the exposed ground. If it was summer, you sweltered. If it was winter, you froze. No entertainment of any kind was provided, you couldn't even stand up straight without hitting the ceiling and you were lucky to be fed once a day.

<comment><USER24> > _Are they really that bad though compared to historical prisons?_

Yes. But that particular comparison wasn't the point anyway.

> _What makes them "hell on earth"?_

Beatings. Rapes. Gangs. Drugs. Being forced to do illegal things by the guards. Prisoners being at the mercy of people whose word always trumps theirs (which means they will lose most cases of "I said, he said", which is a big deal in prison). Many inmates enter prison as petty criminals and end up graduating to the big leagues inside.</comment></comment></comment></comment>


Capitalist Science - <AUTHOR> http://arxiv.org/abs/1102.2474

<comment><USER2> But this "capitalist science" has already existed for ages, hasn't it? Plenty of companies do science, monopolize the results through patents, and exploit them for private profit. That's capitalist science.

> The economic structure of basic science is currently socialist, funded by > the public at large through taxes for the benefit of the public at large.

Yes, but increasingly less so. The public may fund it, but too much of the results get copyrighted by Elsevier and patented by other parties.

> Capitalist science will better align the incentives of scientists with > taxpayer interests,

No it won't. It will align the incentives of scientists with the interests of corporations.

> channel more money into basic science, lower your taxes, and generally > improve the quality of your life.

Nice talk. I think you're trying to sell me something, but I'm not buying it.

<comment><USER3> >> The economic structure of basic science is currently socialist,

> Yes, but increasingly less so.

IMO opinion the real problem isn't that basic science is becoming less publicly available as much as it's becoming less basic, and really less science also.

If "capitalist science" meaning holding scientists to the same production quotas that Frederick Taylor gave steel workers, then above and beyond the problems seen with steel workers, there's the additional problem that bad science drives out good since it's easier to produce.

</comment></comment><comment><USER4> Wow, I couldn't disagree with this premise more. I believe the exact opposite.

Capitalist science already happens - that's how capitalism works. If something has the potential to be directly turned into profit, people create businesses around that. Governments professing to be capitalist shouldn't interfere with that process.

Academic science ought not to be capitalist. Governments should fund science that benefits society and that wouldn't otherwise be happening in a capitalist system. We should expect that to be indirectly-profitable (not profitable for the inventor) and loss-making work with long-term benefit. That's what we pay taxes for.

Academic science is already far too capitalist for my liking - the existing funding system requires scientists to chase money, acting as poor mimics of capitalists, while corporate-sponsored grants mean lobbyists are getting their favoured R&D done on the cheap.

( _Edited to add:_ that said, the paper is still worth reading and makes good points about how we identify the value of science)

<comment><USER5> _Governments should fund science that benefits society and that wouldn 't otherwise be happening in a capitalist system._

But that's not what ends up happening. The funding doesn't get allocated such that the total utility would be maximized. Instead, it is directed toward those areas having a constituency that's better organized.

The result is that AIDS research -- its victims being fairly focused in a particular demographic -- gets about 350x more research funding per victim than does COPD. It gets 112x more than Hepatitis C, and 33x more than Alzheimer's disease. [1]

Government funding equals political funding. And this is what leads to scandals like Solaris, too. The government is not able to make rational decisions, as much as we might tell ourselves that it does. In a democracy, the funding will go to those causes that can muster the most votes.

[1] Source: [http://www.fairfoundation.org/factslinks.htm](http://www.fairfoundation.org/factslinks.htm)

</comment></comment><comment><USER6> Don't we already _have_ both? We have a "socialist" component (accepting the paper's terms uncritically for the moment), and we still have private investment for gain in many areas. In theory they complement each other. In practice... well, perhaps not, but I would have a hard time swallowing the idea that it is somehow because of the split, mostly because the deficiencies we observe on both sides would almost certainly still exist even if the alternative system were entirely eliminated.

(I would observe, in semi-reply to many people in this thread, that incremental improvement and the relative drudgery of bringing tech to market manifested in real, concrete objects is actually _very_ important. A system that _only_ did "fundamental" research would produce an impoverished society every bit as much as a system that does nothing but "capitalist" work... and measured in man-hours, the "capitalist" work is often harder and longer than the fundamental research. You can tell because small teams can make "fundamental" breakthroughs but the actual act of bringing to market requires further engineering, design, integration into existing large engineered systems, logistics, scaling work, etc.)

</comment><comment><USER7> If you edited this abstract to replace Capitalist with some other philosophy and it's concepts (say "Buddhist" or "Environmentalist"), it would have roughly the same level of validity, which is to say, not much.

<comment><USER8> Have you read the article? It's interesting and follows the individual reward premise of capitalism, although absolutely impracticable not to mention it only makes sense in a very limited number of fields.

</comment></comment><comment><USER9> > channel more money into basic science

This has been already experimentally proven to be false. I have several friends in the basic Biology research and they have mentioned several times that companies explicitly fund only the applied research where they can reap the fruits early and not in 10 or so years.

</comment><comment><USER10> I am torn between tears and laughter. I wish science belongs to humanity forever.

<comment><USER11> Science does. Each discovery is the heritage of humanity, the beneficiary of being in the world that we are in. This suggestion is nothing more than an attempt to steal that heritage and dole it back out in limited amounts, expecting us to be grateful for it.

</comment></comment><comment><USER12> _" The economic structure of basic science is currently socialist, funded by the public at large through taxes for the benefit of the public at large."_

Except where the benefit goes to the capital, ready to charge you $20 for a publicly founded research paper.

</comment><comment><USER13> I'd argue that our scientific process and development would improve exponentially as result of replacing the old Socialist, state funded model with a voluntary consumer model.

Private enterprise is already financing ambitious projects once sought only by state provisions on their own merit. Such as Virgin Galactic. I think if innovation in these fields were brought into the responsibility of private investment, investors would see it as their job and not the state. In other words the state monopolises on grandiose scientific projects, making it too difficult for the average enterprise to compete.

This is probably due to the states mechanism of 'bigging up' its own achievements in order to justify its own existence.

I think there's a bright future for technology and science in the private sphere. Facebook working on AI is another recent example. Google have been funding scientific studies mostly in tech for years. We need to embrace this.

Big businesses understand that scientific breakthrough could well be the next biggest product on the market, even on a simple basis of materials. Producing newer, stronger, more durable materials is not just benefit to the producers, but to the consumers. State science rarely deals with practical innovation that we as consumers can benefit directly from either.

Almost every business, big and small has some form of R&D department or group, and more are following suite. It's becoming a standard and I think in this model, we will see our species's biggest gains in advancement.

I think another important point is that consumers have a choice when it comes to private enterprise, whereas they don't when these funds are forcibly extorted through taxation. Those on minimum wage can barely afford essentials, let alone the money to fund space programs.

Long live private enterprise, long live Capitalism!

<comment><USER14> I don't recognise the world you are talking about. Particularly "the state monopolises on grandiose scientific projects, making it too difficult for the average enterprise to compete". On the contrary, the state funds the basic research that is then "monopolised" by enterprise once it has been sufficiently developed. The rocket tech. that Virgin Galactic is using didn't come from nowhere. Neither did the deep learning methods that Facebook is investing in.

<comment><USER13> NASA is a government agency, in the UK we're bound to a part of the EU known as the European Space Agency, they aren't subject to the same laws and regulations, let alone taxes as well as all the normal rules of competitive business that privately owned enterprises are.

They've utilised their monopoly of force in order to contract themselves to these responsibilities. Most likely in order to use the glory to justify their existence.

</comment></comment></comment><comment><USER15> Is this supposed to be a scientific research paper?

> "The companies selling this product are required by the Capitalist Science > Act of 2012 to identify the hypotheses in the database (or their negatives) > that are necessary for the product to work as intended. By 2020, the > database contains millions of hypotheses. Of the hypotheses in the database > in 2020, many have a posterior (current belief) sufficiently close to the > prior (set by the initial auction for that hypothesis) that the money made > by the authors who provided evidence for the hypothesis is negligible"

What's up with the citation to the above paragraph:

> "[11] Both the prior (circa 2012) and posterior on Newton's Law of Gravity > (with appropriate caveats) will be very close to unity, for example, and the > money made by the authors of database entries adjusting the belief in > Newton's Law of Gravity can be neglected in this example."

I can't parse this, Don't adjust your beliefs based on the fictional database? caveats to Newton's Law of Gravity? I don't understand.

This doesn't seem rational or scientific. It seems more like a narrative or personal exposition. Can anyone point out a hypothesis or any science here?

</comment><comment><USER16> Further discussion from a libertarian (and capitalist) POV: [http://www.cato- unbound.org/issues/august-2013/who-pays-scie...](http://www.cato- unbound.org/issues/august-2013/who-pays-science)

</comment><comment><USER17> "Basic science is currently a socialist enterprise, funded by the taxpayer, with the results available to society at large."

One current problem is that this is that the results are not always available to society at large; I've seen a lot of stories on HN about attempts to change that.

"Since the benefits of scientific advances are consumed by everyone, no individual has a strong financial incentive to invest in basic research."

Related to this point, patent law causes companies to focus more on efforts that lead to patentable inventions, and therefore away from basic science, which is unpatentable.

<comment> wes-exp I don't think this it is the _fault_ of patent law that companies do not fund basic research. I think is it just the fact that it is very hard to profit from basic research, fundamentally. If anything, patent law (for all its faults) at least tries to create some incentives.

</comment></comment><comment><USER18> Contradiction in terms, given that blue-sky, basic research has gone away in industry and academia and it's capitalism's fault. Capitalism is great at technology and incremental innovation, but bad at science. This sort of thing is why a functional society needs some aspects of both (socialism and communism) in it.

That's also why I dislike the term "data scientist". I'm not a scientist, because I'm not impartially searching for truth. I'll ignore avenues of inquiry that aren't profitable. It's my job to do so. I'm more of a data _technologist_ , in truth.

<comment><USER5> How is it that basic research has gone away in industry? Don't we see really interesting stuff coming from Google, pharma, all kinds of materials stuff that we never even see going into textiles and building products...

Why would you say that (a) Capitalism has caused basic research to go away, and (b) that it's bad at science in general?

Added later: after a moment's thought, it seems to me that we have a great example in head-to-head competition. In the competition between private and government-run science in the Human Genome Project, it seems pretty clear which side played the greater role.

<comment><USER19> The problem is that most science that is funded by private companies is done only to further their funding companies' interests, not those of the general populace. For example, Big Pharma has no incentive to make a cheap cancer cure, it makes too much money off of current cancer treatment. Furthermore, the capitalist approach leads to biased results, again, because research has no incentive at that point to be honest. (Imagine if the only crop research was done by Monsanto.) Capitalism hasn't caused basic research to go away, but if we only rely on science from capitalism, there will undoubtedly be a ton of problems to face there.

<comment><USER5> _Big Pharma has no incentive to make a cheap cancer cure, it makes too much money off of current cancer treatment._

Except for their competition from other companies making other treatments, and the fact that their patents will run out eventually. Do you really believe that they're not interested in finding an actual cure? I believe that you're viewing these corporations as giant faceless evil monsters. But these corporations are run by, and certainly have researchers who are, real people whose mother was killed by cancer, and worry about that gene popping up in their own children.

 _the capitalist approach leads to biased results, again, because research has no incentive at that point to be honest_

Certainly we've seen an unfortunate amount of dishonest results in recent years. Do you have any evidence that the problem is worse in the private sector? My expectation would be the opposite, because in the private sector you've eventually got to sell something that works, whereas in the public sector you can just keep applying for more grants, leaving behind your previous bogus results.

Let me also throw in that publicly-funded research is biased in a different way. Where the funds go is targeted not on any rational basis, but based on where the well-organized constituencies are. So what we see today is that per- victim, the amount spent on AIDS/HIV research is vastly disproportionate compared to other maladies whose sufferers are from more diffuse demographics. That is, comparing funding of AIDS research to, say, colon cancer, we spend FAR more for each AIDS patient than for each colon cancer patient. The politicization of science leads to waste such as the recent Solaris nonsense, where we allocate funding based on politics and posturing rather than where it will have the most utility across the whole nation.

<comment><USER19> > real people whose mother was killed by cancer, and worry about that gene > popping up in their own children

Certainly everyone's mother was killed by cancer who works on cancer. And no, not everyone who works at a Big Pharma company is terrible, but the problem is more that Big Pharma is concentrated on improving their current prescription systems, rather than finding a cheap one-off cure. If Big Pharma wants to stop acting like a giant faceless evil monster, I will stop treating it as such. But how can you really justify current medical costs without saying that someone, somewhere in that industry is doing something disingenuous?

> The politicization of science leads to waste such as the recent Solaris > nonsense, where we allocate funding based on politics and posturing rather > than where it will have the most utility across the whole nation.

The problem is that there isn't enough demand to justify the cost, if we're doing it in a "if a person is diagnosed, they pay for it" manner that capitalism demands. Cancer research costs many, many billions of dollars due to many factors [1]. Say we're talking about leukemia research. 40,000 cases were diagnosed this year [2], but should each of those cases have to pay for the extremely high costs of research? Or, could we distribute it in a way such that each citizen pitches in a much smaller amount to help cancer research? In my opinion, the latter makes more sense, rather than punishing those who get sick.

Lastly as for credibility in the research world, there are definitely lots of examples I could look up. And also plenty of examples to look up for your cases that you mentioned as well. I think it would be too hard to count, no? But when you see things like the Tobacco Institute ([http://en.wikipedia.org/wiki/Tobacco_Institute#In_popular_cu...](http://en.wikipedia.org/wiki/Tobacco_Institute#In_popular_culture)) it's hard to say that we should research everything privately, because the conflict of interest is just too high. In my opinion, publicly funded research could / should be reformed, but there's not as obvious of a bias one way or the other there.

[1] [http://www.nih.gov/news/health/jan2011/nci-12.htm](http://www.nih.gov/news/health/jan2011/nci-12.htm) [2] [http://seer.cancer.gov/statfacts/html/leuks.html](http://seer.cancer.gov/statfacts/html/leuks.html)

</comment></comment></comment></comment></comment><comment><USER20> Maybe we should crowd-fund science projects like we do Kickstarter projects. In the Internet Age, that's about as capitalistic as you can get.

<comment><USER17> It's already happening: [https://news.ycombinator.com/item?id=6889305](https://news.ycombinator.com/item?id=6889305)

</comment></comment><comment><USER21> Article starts off with brushes that are too wide, but gets interesting around Appendix B where he talks about a sort of "Market for Hypotheses". Interesting concept, but doesn't talk much about the incentive structure needed for companies to play the game fairly. Also the market would have to be government created and run, a responsibility the ACA should make anyone skeptic of.

</comment><comment><USER22> Have the pharmaceutical companies been informed of this???

<comment><USER19> If they didn't in fact fund it themselves

</comment></comment><comment><USER23> This is daft.

<comment><USER24> From reading the abstract, i assumed it was satire. Is it serious?

See also:

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

<comment><USER25> Based on his previous two papers which detail a way of determining the value of various research projects, I'm inclined to say yes, he's serious. Either that or I'm unable to hear the _whoosh_.</comment></comment></comment>


Remarker.be, beyond webpage highlighter, best practices for making notes - <AUTHOR> http://remarker.be

<comment><USER2> Looks great and I was wishing for exactly this tool last week. It seems to be having trouble saving with Evernote, though. Is it just me?

<comment><AUTHOR> Thanks for your reply. :) I'm the one built it. Could you try another pages to test whether it works? If you still have problems , please send me the details by mail. Thank you. hustgock#gmail.com.

</comment></comment><comment><USER3> I use diigo for this, but will try your app because I'm not 100% I can reuse my data from them.

<comment><AUTHOR> thx. I tried diigo before, but I think only highlight is not enough. That's why I came up with structured mark and the whole thing. Hope you like it.</comment></comment>


Ebay's glitch and customer service that lost me as a customer for life - <AUTHOR> https://docs.google.com/document/d/1RocUIgYwdOsbxR30uvJtb3gPB53gF-F9DurisGVoK8o/edit?usp=sharing

<comment><USER2> Try and call paypal and ebay at the same time again but this time ask the ebay CS person if they can approve a reversal fee and tell that to the paypal CS rep. If they approve it paypal will reverse your payment to Ebay and then once you receive the funds back you can make another payment to Ebay.

Just an idea.

<comment><AUTHOR> Oh that's a good idea! I'll try it. Thanks

</comment></comment><comment><AUTHOR> OP here. Any suggestions for what to do now much appreciated.</comment>


VimR – Refined Vim Experience for OS X - <AUTHOR> http://vimr.org/ <comment><AUTHOR> Previous discussion: [https://news.ycombinator.com/item?id=8186407](https://news.ycombinator.com/item?id=8186407) (~2 years ago, 63 comments)

(probably out of date, looks like it was rewritten in Swift and switched from MacVim to Neovim as backend)</comment>


Ask HN: How do you invest your savings? - <AUTHOR>

Graduate here.
Just started my full-time job and from what it seems I will be able to save about £800-1000 a month. I have some savings already (not much, £7-8k) and want to find some good investment options, but I am obviously not very experienced in that. My question is - what do you think is the best way to employ this money (the savings + the monthly chunk I can save) in order to get a decent return without taking too much risk. Obviously, I am not even thinking I can live off that but I think it's good to start thinking about those sort of things as early as possible and having just graduated I don't think there's a better time :)
How do you go about investing your savings? Any answers will be greatly appreciated. <comment><USER2> I did a few things when I started working.

First, I'm very conservative and got hired on during the 2008/2009 financial melt down. I saved up enough cash to survive for a year (I was still used to college spending so this didn't actually take long to accumulate). I put this cash into 4 CDs, each is a one year CD and one comes up every 3 months. The interest isn't great, it's pretty bad, but it's better than the interest on a savings account. This isn't an investment, this is "in case I lose my job or get furloughed or ...". I've since made it a point to bump up the amount in the CDs to represent my current cost of living less things I can easily cut every couple of years.

Second, I owned my car outright at the time, I put the equivalent of a car payment (it was old then) into a savings account every month. I used this to (almost) pay cash for my new car this past year.

Third, I put a similar amount into a brokerage account, but I didn't start that until after I had that 1-year fund. I'm not a great investor, I can't give advice on this part, I've just gotten lucky on a couple things but mostly played it safe.

Fourth, I know how much cash I need in my checking account every month (with a buffer, just in case), so at the end of the month I transfer the excess to my savings. (This year excepted, a bunch of unexpected medical expenses)

The result is, if I lose my job, I have enough cash on hand to get me to my first CD's maturity date, and they can each carry me to the next. This is a lot of peace of mind for me after seeing many colleagues laid-off in 2008/2009 and others who'd been unemployed for a year or more. In my current job that's a low risk, but once the money is saved you can ignore it (until you need it). I also have enough cash + credit that, in a catastrophe, I could carry myself to the CD maturity dates to pay off the debt or, worst case, I could take a hit on the CDs and close them early (I wouldn't lose much, penalty is the interest + a fee and the interest is low at the moment).

This next part is US-centric, I don't know the UK's retirement system.

Retirement, here in the US we have (at many companies) 401k's available with some matching. I put in the minimum needed to get that matching: it's free money for retirement. I put in more now that I'm in a better paying job and have my other finances in order. We also have IRAs, another retirement account, I've been maxing that out since my 3rd year of full-time employment, I could have started my 2nd year but decided the 1-year fund had priority at the time (I don't regret that decision, my employer at the time laid a lot of people off that year and my office was next on the chopping block). Whatever the UK equivalent is, explore them. I know too many of my peers that have no savings or minimal savings for retirement, we're obviously 20-30 years away from it, but investing earlier you'll get a much greater return, and when you have a family and need money for those sorts of expenses, you can (though you should try to avoid this) cut back on your retirement savings without too severely impacting your retirement goal.

</comment><comment><USER3> I have two forms of savings:

* A pile of cash in a bank account.

* A pile of cash which is used for buying index funds.

Even with a credit-card it is useful to have a pool of cash for short-term emergencies, such as job-loss, car-crash, or roof repairs. On that basis I keep £15,000 in an online bank account. The interest rate is terrible, but that's the price I'm willing to pay to make sure I can get cash to hand if I need to in very short term.

After that the real investment goes to index funds. Every month I allocate £300 to buying more shares. (In the past I used that money for peer-to-peer lending with zopa.com, I didn't lose money but I started to get concerned about the time it took to get money out. So I've ceased offering loans there.)

Index funds are pretty fun, and traditionally less risky than buying shares arbitrarily in individual companies. Still there is a risk. If your fund is small enough you're probably able to use an ISA, or similar, I forget what the max per year is, but it is pretty low.

ObRandom: I'm also overpaying my mortgage with the intention I'll own my house within the next 2-3 years.

</comment><comment><USER4> For the last 2 years my investments outperformed DJ by 150% and S&P 500 by 100%. What did I do? Go with the winners! Every January you revise your portfolio and spread the basket among potential winners. Then you wait ... After 2-3 months check to determine loser/losers and dump them in favor of the winner. Bring in from time to time reps from hot areas. I have three specific examples: Auto, Biotech and European Nordic fund. First one is having the true renaissance in last couple of years, I bought a medium chunk of it in 2008 and it gave me 120% growth by now. Some biotech funds are more than 50% since 01/2013\. What is there secret? They invest in a well-selected portfolio of companies with pending FDA approvals. If a product goes through clinical trials and gets the approval, that company is growing by the order of magnitude. If it doesn't, oh well, you can write off a single value. For the fund that I bought the success ratio is 2:1, which is great and that's why it's 50% just for last 9 months. And lastly, Europe has been marked as the undervalued commodity and specifically the Nordic geo with gas and oil reserves. The European Nordic fund is 15% in green just in last 3 months. As soon as any of your eggs in the baskets stops performing well, you switch it to your other egg or shop for what's hot now. Just for fun, if you have time and desire, leave a small change for daily/weekly trading to keep yourself busy, but that strictly optional.

</comment><comment><USER5> This really depends on when you need to use the cash, and how much risk you can accept.

This is pretty deep: [http://en.wikipedia.org/wiki/Modern_portfolio_theory](http://en.wikipedia.org/wiki/Modern_portfolio_theory)

... but it basically boils down to: Invest in a mixture of index/mutual funds and bonds. If you need lower risk (but lower return), then tip towards more bonds. If you can accept a higher risk (but in theory a higher amortized return), then tip towards more stocks. If you do buy mutual funds, make sure you read the fine print about fees/load.

(I am not a financial advisor)

</comment><comment><USER6> My favorite investment is in something that has no monetary value. But it is priceless! I have it in a Bank Direct account that gives airline miles monthly. I get almost no interest.

It forces me to think hard about traveling, however. I can fly free for life. Since I'm not going to waste free flights, I take several international trips a year. Sometimes I work. Sometimes I don't. It allows me reset and really observe life.

</comment><comment><USER7> Exact same situation here, but in the Netherlands.

So far I put everything I can on a low interest account (circa 2%). My idea is to wait 1 more year and invest in real-estate, without having to take a loan . The rent would be used to reinvest in the future.

I don´t trust the stock exchange, mainly because I don´t really understand it, probably.

</comment><comment><USER8> Just don't spend it, that's the key. ;)

A simple solution: auto-transfer the 'extra income' every month to a low- interest checking/savings account. Once a year, transfer some amount from low- interest savings into an index fund.

<comment><USER9> Why low-interest account?

</comment></comment><comment><USER10> I am a fresh too! I save nearly 60% of my salary and invest 80% of it in the stock market. Each year I make more than 10% of my total investment which I didn't withdraw any of the profit I made, instead I keep pumping in money and investing.

</comment><comment><USER11> I know you're in the UK, but I use [http://www.futureadvisor.com](http://www.futureadvisor.com) here in the US. I make monthly deposits, they rebalance according to investment research.

</comment><comment><USER12> Betterment, 40% portfolio return this year! You can very easy adjust allocations according to your risk level and goals. It's low maintenance and awesome.

<comment><USER13> I've evaluated them and for what they do they are pretty expensive.

</comment></comment><comment><USER14> At that amount, it's worth considering a stocks & shares ISA. Something low- involvement, like an index fund.

</comment><comment><USER15> Myself and my business. My returns have always been far above the market average ;)

</comment><comment><USER16> I am very much interested in this topic too - specifically for the UK market.</comment>


Uber posts $1B loss - <AUTHOR> https://mobile.reuters.com/article/amp/idUSKCN1NJ2YM <comment><USER2> Other discussion on the front page (with more votes/comments):

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

</comment><comment><USER3> I'm baffled that this company as of October is targeting a $120B IPO valuation [1]. I'm assuming there are institutional buyers out there at this price as the article says banks advised them on this number. It would be one thing if the prospects for Uber converting revenue to its bottom line were great, but margins are _shrinking_. The CEO admits "we're in a big battle" with Lyft and more competitors are coming. Waymo will be all over the news next month [2]. IPOing in this environment - at least at a valuation 1.6x its last round [3] - seems difficult.

[1] - [https://www.theguardian.com/technology/2018/oct/16/uber- targ...](https://www.theguardian.com/technology/2018/oct/16/uber- targets-120bn-valuation-2019-flotation-report)

[2] - [https://www.bloomberg.com/news/articles/2018-11-13/waymo- to-...](https://www.bloomberg.com/news/articles/2018-11-13/waymo-to-start- first-driverless-car-service-next-month)

[3] - [https://www.cnbc.com/2018/08/27/toyota-to- invest-500-million...](https://www.cnbc.com/2018/08/27/toyota-to- invest-500-million-in-uber-at-a-valuation-of-72b-wsj.html)

<comment><USER4> An IPO, no matter the climate, is the only way anyone gets their money even half back. If they wait, they will simply burn even more money and likely face an even worse climate as their business model is exposed more and more as unviable. Not that I would go near Uber with a 10 foot pole, but if I had money in this and didn't care about anything else, IPO ASAP would be my call.

<comment><USER5> So the moment an IPO happens each investor is going to dump their stock? That's probably a great short opportunity right?

<comment><USER6> Would have to be naked shorts. Check out Groupon's IPO.

</comment></comment></comment></comment><comment><USER7> Honest question from someone who doesn't understand high finance:

Article says $2.95b revenue. Where did all that money go? Wiki says they have 12k employees, is every single employee getting paid $300k+?

And if Uber has never been profitable, or at least not for a while, where does the money come from? Is there really $100b+ of investor cash floating around out there, getting spent on stuff like Uber?

<comment><USER8> You're just missing some terminology. This stuff is surprisingly complex -- which gives technical people used to worrying about mind-numbing levels of complexity an edge ;)

"Revenue" is confusing for business like this. More precise reporting usually reports either "GMV" (gross marketplace value, all the payments Uber took in) or "net revenue", which would deduct the amounts paid to drivers. If an article said "revenue" without further qualification and it was a marketplace business, I'd probably assume they were talking about GMV.

"Profit" is to some extent a fiction of the accounting department -- the relevant question is actually cashflow. Money in, money out. When you need to make a payment for loan service/payroll/etc and don't have the cash, you're headed for bankruptcy; that's pretty easy to understand. By way of comparison, whether or not a firm is "profitable" requires making a bunch of complicated judgments about whether you've actually "earned" the cash you've collected (e.g. gift cards, multi-year software contracts) and on the expense side, how to spread the cost of large, long-term, fixed assets (like code development, PCs, etc) against what they productively delivered (revenue-wise) over long timescales, potentially decades. That's called depreciation and amortization and it's a big topic in accounting school.

One thing many developers forget is that customer acquisition, especially in marketplace businesses like Uber, DEVOURS cash. Uber spends like crazy on everything from conventional advertising (digital, TV, radio), referral/sign- up credits, rider incentives, cross-promotions with other brands (stay at X hotel and get uber for 10% off), etc.

Uber is uniquely complex because it's sort of an aggregated conglomerate of a bunch of markets with differing stages of maturity and profitability. Think of each of these as different businesses, where the older, more developed (e.g. Chicago, New York) ones are putting cash into the business, subsidizing the spend (investment) on developing a good competitive position in later markets.

And yes, there is absolutely truckloads of money available if you can show you can reliably acquire customers on a business with good economics.

<comment><USER9> Profit is not a fiction, it's just a different thing that cash flow.

Cash flows ultimately reconcile with profit. Or they should.

<comment><USER10> It's fiction in that it can be whatever they want it to be.

Like Amazon was known for years to intentionally not make a profit. They arranged their business so that all the money they made got plowed back into the business in such a way that they could claim a slight loss.

That was in their control to some degree.

<comment><USER9> "It's fiction in that it can be whatever they want it to be."

No, absolutely not. There are well accepted accounting principles.

If a company wants to re-invest, then they can do that - but 'profit' is a material, objective thing, of course it changes profit, but it also would change 'cash flow'.

Financial accounting is a real thing, not any kind of fiction.

It gets to be fiction when there are things that are difficult to account for, or intangible things like goodwill.

But if they book a sale on Dec 1 - then that's revenue, even if the money doesn't come in until 3 months later.

<comment><USER8> Yes and no.

While you're technically correct that there are well-accepted principles, they don't always have much bearing on whether a company will be solvent, or easy to finance.

Example 1: Amazon's core retail business. Not very "profitable". Yet, it provides a massive amount of float through their ability to get inventory quickly from suppliers on long payment terms (30-60 days), that's sold to customers in something like 7-14 days with immediate collection. That means Amazon has something like 2-6 weeks cash, at hundreds of billions/revenue per year (8-40 billion in interest-free cash), as effectively an interest-free loan. That might not be profitable but it's very easy to see how that allows cheap financing of capital-intensive investment. Amazon is explicitly run with emphasis on cashflow dynamics (less on profit). It's worked exceedingly well for them.

Example 2: A hotel might run very profitably on a unit basis but require so much upfront capital to finance that it's practically impossible to build.

My point isn't that accounting isn't "real". Money is also in some sense a "shared fiction" [1] and yet it's quite real. It's just that looking merely at accounting profit/loss doesn't really tell you much about the operational dynamics of a company. It took me a really long time to understand this.

[1] From "Sapiens", a great book, explaining the role of fiction in real-world decision-making and beliefs.

<comment><USER9> Yes, that's the difference between profit and cash flow, basically working capital.

I think most people get this, this isn't really one of those magic things.

In both cases you've described 'profit' is still 'profit' in the generally accepted sense, and we have cash flow statements to help us understand that.

</comment></comment></comment></comment></comment></comment></comment><comment><USER11> This is interesting. I wonder how much money they are spending to keep ahead of competitors and I wonder if it will, in fact, pay off in the long run. They can't sustain a loss for long before people lose faith.

</comment><comment><USER12> At least the early investors have probably made pretty substantial exits by now, made a nice chunk of money in record time. But at what cost? I don't think anyone sane could argue that their growth has been organic?</comment>


Responsive JavaScript - <AUTHOR> http://www.responsivejavascript.com/

<comment><USER2> I really like Jeremy Keith's approach to "responsive javascript". He uses `:after` and updates the content property based on media queries. It keeps it nice and DRY. Here's a small demo: [http://jsbin.com/meqon/2/edit?css,js,output](http://jsbin.com/meqon/2/edit?css,js,output)

<comment><USER3> Yes! Was surprised this wasn't there and was happy to see someone toss it in the comments :)

Edit: How he got there is a neat, quick read for anyone interested: [http://adactio.com/journal/5429/](http://adactio.com/journal/5429/)

</comment></comment><comment><USER4> First time I've come across the matchMedia api. This would have been extremely useful in my last project.

Thanks for spreading the word.

</comment><comment><USER5> In my experience, setting a handler for every onresize event can lead to performance problems if you've got a complex layout. It's better to wrap it in something like Underscore's throttle function (1) and only let it fire every 200ms or so.

1: [http://underscorejs.org/#throttle](http://underscorejs.org/#throttle)

</comment><comment><USER6> more things that take the control out of the user. and add lots of complexity for no good reason.

why on earth have javascript to do CSS's work?

and why do you care about screen size changes? the only good thing it does is hint you about device orientation. But who says when i change from portrait to landscape i want a whole new site? sometimes turning a device just mean i want to fit one image better in the screen. not change all my navigation elements to fit the designer dream of multi-screen shenanigans.

yeah, i sound like the old fart who don't like shinny things and change. but people impressed by this sound like the kids adding animated gif after animated gif to their geocities page. now get off my lawn!

<comment><USER7> Some behaviour may need to be initialised depending on the width of the viewport. For example: I may want to provide a side swipe menu in my mobile version that I do not want to initialise and become available in the web version.

Yes, you don't need a whole new site. But I as a developer may want to provide a better experience with the additional horizontal space I just received in the landscape mode. Or I may want to sneak in some ads on the side.

Media queries go only so far but they cannot help you to create behaviour that depends on the width of the viewport.

<comment><USER6> Why users on tablet with huge screens should be denied Swype menu?

See you are just adding complexity to development and use of the site.

</comment></comment></comment><comment><USER8> "The benefit of this being that we can use the same media queries in the Javascript as we have used in our Javascript."

I guess the second mention of "Javascript" should be "CSS", right?

</comment><comment><USER9> The one problem I've found with this approach is making sure that the CSS and JS breakpoints stay in sync as a site is maintained. At my previous job, we came up with a way of changing JS behavior based on CSS changes to DOM objects. [http://blog.cloudfour.com/behavioral- breakpoints/](http://blog.cloudfour.com/behavioral-breakpoints/)

<comment><USER9> I don't think it's mentioned in the blog post, but we used csswatch jQuery plugin to watch for changes. [https://github.com/leifcr/jquery- csswatch/](https://github.com/leifcr/jquery-csswatch/)

</comment></comment><comment><USER10> Has any work been done on identifying the browsers connection speed so that we may serve high quality vs. low quality assets? The only thing I've been able to find for this is the MaxMind GeoIP Netspeed database, but I have no idea if the data is accurate enough to be valuable. I suppose you could measure latency, but not during the initial page load..

<comment><USER9> When you have a few hours, Google "responsive images".

</comment></comment><comment><USER11> I can see the appeal, but I wonder if this might not be better accomplished with an HTTP header that would explicitly give the viewport dimensions and/or some information about the connection type/speed.

<comment><USER12> Viewports can change in size once the page has loaded. A Connection-Quality: GPRS, 512kbps; header would be nice. But then you still get an issue when phones must report or the user toggles on WiFi as soon as they see a few bad (low bitrate) assets.

<comment><USER13> Its more simple than that, imagine I rotate my screen.

Do now need to send every possible view port with the original header?

<comment><USER11> Yeah, suggesting viewport dimensions was a lazily considered and unfortunate choice on my part. Screen dimensions -- probably in particular the larger device width -- would be better, and now that pixel density is an issue, that as well.

</comment></comment></comment></comment><comment><USER14> Wrote a little layer on top of the matchMedia api: [https://github.com/twobit/mquery](https://github.com/twobit/mquery)

</comment><comment><USER15> Sad to see another site making the mistake of thinking that Opera 12 and below are the same as Opera 15 and above, despite the two sharing literally zero code.

</comment><comment><USER16> aka "Progressive Enhancement"

</comment><comment><USER17> Nice resource. It would be cool if the author added links to the libraries that are being referenced.

<comment><USER18> the top examples use the native browser API, and there are links to related libraries below.</comment></comment>


All 77 false-positive Covid-19 tests come back negative upon reruns - <AUTHOR> https://www.nfl.com/news/all-77-false-positive-covid-19-tests-come-back-negative-upon-reruns <comment><USER2> Yes, that's what false positive means.</comment>


Major release of xocc C compiler, 0.9.2, based on BSD license - <AUTHOR> Hello everybody,

  I'm glad to announce the major release of xocc C compiler, 0.9.2, based on BSD license.
  xocc is a C compiler that based on XOC infrastructure, XGEN code generator and XOCFE
  C frontend.
  Both xocc, XOC, XGEN, and XOCFE are based on BSD license.

  XOC provides multi-level operations, flexibility, and the capability of representing almost all popular languages.
  There are mainly two level IR representations used throughout all phases of the compilation.
  In addition to basic IR representation, XOC also provides IR builder, BB manipulating api, Control Flow Graph(CFG),
  IR lowering, Control Dependent Graph, Dominator Tree, Register SSA, Memory SSA, Agressive Flow Sensitive Alias Analysis,
  Flow Insensitive Alias Analysis, Agressive Field Sensitive Alias Analysis, Interprocedual Analysis Framework, Inliner,
  Dead Code Elimination, Copy Propagation, GCSE, GVN, and a lot of sophisticated control flow and peephole optimizations.
  Moveover, XOC does not use any std library, it provides all basic algorithm library, see Manual.txt of XOC.

  XGEN provides a retargetable machine code generator.
  For now, it could generate ARM, x86, PAC code. But, x86 and PAC code generator are not release for temporary.
  XGEN provides IR2OR translator, Pre-Instruction-Schedular, Register Allocation, Post-Instruction-Schedular,
  Instruction Packager and Assembly Printer.

  XOCFE is a C frontend, it could provide AST as output.

  xocc is a driver that compose XOCFE, AST2IR, XOC and XGEN into complete C compiler.

  All features provided by xocc, XOC, XGEN, XOCFE could empower you to develop any compiler and analysis tools.

  More important is, any feedback on the compiler and its components would be much appreciated!

 Get them:
  https://github.com/stevenknown/xgen
  https://github.com/stevenknown/xoc
  https://github.com/stevenknown/xocfe
  https://github.com/stevenknown/xpoly
email@example.com <comment><USER2> As this seems to be a fairly unknown project, some benchmarks against clang/gcc would surly spark more interest in the project.

Afaict, the XOC infrastructure, released by Alibaba, hasn't seen any commits in the last few years.

So my question then is, does this project offer something that the others (gcc/clang/icc) don't, or why should someone use it? Or is it just a hobby project, or a purely academic exercise?

<comment><USER3> I may be misinterpreting, but I think _are based on BSD license_ is what this does that others don't (clang comes close, but is moving slightly further away from it, towards Apache 2.0)

<comment><AUTHOR> Yes, XOC's licenses are very business-friendly.</comment></comment></comment>


Greenspan: Tradeoffs of client-side rendering vs. server-side rendering - <AUTHOR> http://www.quora.com/Web-Development/What-are-the-tradeoffs-of-client-side-rendering-vs-server-side-rendering/answer/David-Greenspan

<comment><USER2> For anyone who wants to take the "Holy Grail" path, I've been a big fan of Rendr. ( [https://github.com/airbnb/rendr](https://github.com/airbnb/rendr) ).

With a bit of self-discipline, all your views can be written out using string concatenation on the server before being sent out to the client. This means no worrying about full browser stacks, or DOM manipulation, or anything else server-side.

Rendr helps with that step in addition to wrapping up model fetching and re- hydration when they get sent out to the client.

Using something like Rendr keeps you in the full Backbone/node ecosystem instead of the Meteor walled garden, letting you incrementally handle this instead of making a strict architecture choice to Meteor.</comment>


Argo from Cloudflare – featuring Smart Routing and Tiered Cache - <AUTHOR> https://blog.cloudflare.com/argo/ <comment><USER2> Akamai has had SureRoute and Tiered distribution for probably over a decade.

It would be nice if the HN front page can stop serving as Ad space for CloudFlare.

<comment><USER3> Not specific to HN, but if Akamai wants more buzz and discussion, all they need to do is introduce some small/hobby level plans with up-front pricing and no interaction with salespeople.

<comment><USER2> That's a fair point...though the bar for Akamai is a lot higher than that of CF as it relates to their customer base...let's just say when your clients include some of the most renowned companies in the world, top US government agencies, the US military...the people you let on your platform becomes a matter of concern.

<comment><USER4> The real barrier is the pricing. Don't bother talking to Akamai if you don't have one million dollar.

Big companies, government and military are the only ones which can afford it.

They'd use a registration form too, if there were one.

</comment></comment></comment></comment><comment><USER5> The pricing model on this makes no sense. Argo claims to optimize the route between Cloudflare and the origin, which is only used during cache misses, yet they charge $0.10/gb for _all_ traffic from Cloudflare to visitors.

Considering most sites will be aiming for a high cache hit rate, I don't see this being very attractive unless your user base is constantly logged in and hitting your backend.

<comment><USER2> Not all content can be cached,that's where optimal routing to origin provides the most benefit...for instance if you're serving pages with PII after the user logs in, you can't cache that on a CDN (you can do browser based private caching though).

</comment></comment><comment><USER6> Any chance the Smart Routing would be available as a TCP/UDP proxy service? It would be great to take advantage of Cloudflare's network without having to hand over your SSL keys.

<comment><USER7> > Because of our physical and virtual presence around the world, Cloudflare is > uniquely positioned to rebuild the core of the Internet. Every customer we > bring on increases the size of our [surveillance] network.

Google was founded by CIA[1]. There's no way Cloudflare isn't.

[1] [https://medium.com/insurge-intelligence/how-the-cia-made- goo...](https://medium.com/insurge-intelligence/how-the-cia-made- google-e836451a959e)

<comment><USER3> >Google was founded by CIA[1]

The linked article does little to establish that, other than early Google got some funding from NSF programs that were of interest to the CIA.

That's not unusual being that Sergey was a CS grad student at Stanford. Cloudflare has a different history...it didn't sprout out of a university project.

</comment></comment></comment><comment><USER8> has anyone moved their site to argo yet? i am looking for some benchmarks for it. so far i found this site that did move to it and it sounds like they had a little improvement, but no where near as much as cloudflare blog post leads us to believe?

[https://www.rootusers.com/cloudflare-argo- benchmark/](https://www.rootusers.com/cloudflare-argo-benchmark/)

if you have moved over plz let me know how if it has helped you.

</comment><comment><USER9> Sounds very similar to how Fastly works.

<comment><USER10> The concept of symmetrical DSA is not new.

This is an accessible implementation that's more like Akamai SurePath as Fastly doesn't (AFAIK) do route optimization or run premium backbone between POPs.

</comment></comment><comment><USER11> but it seems very similar to NP2 from datapath</comment>


The Man Who Tried to Kill Math in America - <AUTHOR> http://www.theatlantic.com/education/archive/2016/01/the-man-who-tried-to-kill-math-in-america/429231/?utm_source=SFFB&single_page=true <comment><USER2> " or who didn't intend to go into engineering or hard science (these students being invariably female)."

Were there no male liberal arts majors in those days, or does the author mean "female students invariably being counted among those not needing advanced math"? If the latter, can we blame it on W.H. Kirkpatrick?

Kirkpatrick was an interesting example of what someone with an anti- intellectual bias can do in a prominent educational post. Diane Ravitch has an interesting essay on the history of the progressive education movement in _The Troubled Crusade: American Education 1945-1980_.</comment>


Welcome to Baghdad: How Iraq Used to Be in the 1950s - <AUTHOR> https://www.youtube.com/watch?v=AajPxROvcTA

<comment><USER2> i feel sorry for Iraq, they didn't deserve what was done to them in recent years</comment>


37 Signals hates competition - <AUTHOR> http://www.amemototheinternet.com/2008/06/11/37signals-hates-competition/

<comment><USER2> For what it's worth I think this is a weak argument. The posts at Signal v Noise never encourage you to "slow down" for the sake of slowing down... they just encourage you to think about starting up in a different light. If you can take life as a startup founder easier, yet be more productive or generally have a more fulfilling experience, so much the better.

Anyway it seems an unlikely strategy that to quell competition 37signals tries to injure _everyone's_ productivity by way of deliberately poor advice. I just don't see how the author makes that logical step (or the point isn't defended well).

Only my take.

<comment><USER3> If the author really thinks 37s doesn't like competition, he should address why they would open source the framework created from their flagship product. Seriously, why would a company that wants to prevent others from competing with them give away the tools they use for increasing productivity and making it easier to realize innovative ideas?

37signals is trying to spread what they think are good ideas - the techniques and models that have worked for them. If you've ever talked to them you'll find they do this because they're passionate ideas, not because they want to harm an entire industry. Jason Fried has been talking about "embracing constraints" for how long now? And he does it only out of malice? He speaks about these ideas at events and organizations to people who would never compete with 37signals because he's scared of competition? This idea is so stupid it's laughable.

The only point he might have (and I don't think he's even making it) is that 37signals is not what most people think of as a startup. Over the past few months it seems like 37signals has been trying to change part of the definition of "startup" - they're trying to change the class of companies to which the term "startup" applies but keep the connotations of independence, adventure, and creativity.

<comment><USER4> That would have been a better point to make, you're right.

As noted elsewhere, AMTTI is more of a personal rant board. I'll work on making the content a bit more cogent in the future as I'd like it to mature beyond that...

<comment><USER5> You should blog when you have something to say, not just because you want to critique someone.

<comment><USER6> Criticism is fine (and I think there is room for a good critique of 37signals). Just pretend that you're saying what you're writing directly to the person in question, and adjust your tone as a consequence.

</comment></comment></comment></comment></comment><comment><USER6> I'd like to read some good, well thought out criticism of 37signals, but this isn't it. Unfortunate, as David U is a smart guy:

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

<comment><USER4> That's pretty reasonable. I'll try to make more salient arguments next time. A Memo To The Internet is more of a rant board... but I'll start cleaning it up.

<comment><USER7> Have you listened to/talked to any of the 37signals guys? It's hard to believe you would make such silly arguments if you had.

(I'd respond on the post itself, but there's a lot more noise in those comments.)

</comment></comment></comment><comment><USER8> This comes across as a rant from someone who doesn't understand how 37Signals became successful.

They seem to practice what they preach. It may not be the right approach for everyone, but it definitely works for them.

How does having only 10 employees after 9 years not count as growing slowly?

</comment><comment><USER9> My biggest criticism of 37 Signals is how easy they make selling simple products out to be. It's hard to imagine their success without the onslaught of positive attention rails has given them.

That said, this protectionist deliberate misinformation theory is pretty absurd.

</comment><comment><USER10> From the article, I doubt it is 37Signals plan to make others develop more slowly so 37Signals retains more customers.

Consider SalesForce and others that have the same and greater functionality.

There are hundreds of options in the same space, SurgarCRM, phpGroupWare, my own officezilla.com. There is plenty of choice and it is not like 37Signals dominates in any way. They are far from the dominate leader in there space (and they don't claim to be).

I don't believe they have a lifestyle business, they have a very good business that is profitable and growing. They might not claim to be out marketing & promoting, but it sure does seem like they have plenty of marketing and promotion through "submarine" tactics rather then overt (here is our ad) methods.

</comment><comment><USER11> Since when is competition something a business should foster? They should, in fact, do everything within their power to make competition as hard as possible. This typically happens with things like patents, trademarks, copyrights, exclusive agreements, etc.

But it doesn't really matter because this blog post is a statement, not an argument. It is equally as persuasive as an entry which says the exacty opposite ("37 Signals loves competition") since the blogger gives no reason for his position.

</comment><comment><USER12> I generally hate the meta-conversations about story quality and the necessity for a down-arrow - but this story was the most awful (and obvious flame-bait) story I've seen voted to #1.

</comment><comment><USER13> PG! I want my downvote-story button!

<comment><USER14> me too... while david ulevitch is, I believe, a smart guy, this article is utter headline grabbing nonsense.

</comment></comment><comment><USER15> "And for my sixth blog post, following up such gems as 'Rickrolling has been retired. We get it. It was funny. It's over now. You can stop.', quoted here in its entirety, I am going to perform the amazing feat of baiting Hacker News."

We get it. It was funny. Can you stop now?

</comment><comment><USER16> 37 Signals has sustained revenue. They are not a startup in the same sense as YC or Silicon Valley thinks of a startup but they have the linchpin of a healthy business -- and every healthy business dislikes competition.

<comment><USER17> > every business dislikes competition.

Not true. A struggling business dislikes competition. A healthy business likes competition. A competitor validates your market and frames a choice. With a competitor, a customer doesn't just have the choice of buying from A or not. A customer now has to consider buying from A or B (or buying nothing). When you've got dozens of competitors, you've got a market.

<comment><USER16> Competitors do validate your market. That doesn't mean you like them (e.g. <http://www.apple.com/getamac/ads/>).

<comment><USER17> You're doing it wrong if it becomes a grudge match. See <http://blog.guykawasaki.com/2006/03/the_art_of_driv.html>

(Yes, I am aware that Guy Kawasaki marketed the Apple MacIntosh at launch.)

</comment></comment></comment></comment><comment><USER5> The article doesn't have anything to say, except that they hate 37signals. Why does this get promoted here?!!

</comment><comment><USER18> simple argument: huddlechat

37signals should be (and apparently is) afraid of simple integration with the Gmail/Google apps suite by Google.

They would eat 37signals lunch.

<comment><USER19> I don't know. Google is very good at making well-programmed apps, but they don't make them enjoyable to use. They're usually fairly cluttered visually if not in terms of features, and their stuff is minimal to a fault.

Campfire, I think, is still a much better app than Google Talk, partly because it gives the chat so much space to breathe.

And I don't think all PROGRAMMERS care about that, but a significant number of DESIGNERS do.

<comment><USER18> huddlechat=campfire and was made on Google App Engine in like a week or something.

37signals IS successful because their stuff is minimal, which, again, is why Google would eat their lunch.

<comment><USER20> But copying something doesn't mean you can come up with the next thing.

<comment><USER18> See Gmail. Google will do it better. Moreover, the integration with Google Apps/Docs automatically increases its versatility for someone already using Google Apps

</comment></comment></comment></comment></comment><comment><USER21> amen.

<comment><USER21> wow, lots of 37signals fanbitches on here.

<comment><USER22> you weren't downmodded for agreeing with the story, it was because your comment was substance-less. nobody here wants to read "me too"-type things, it's just a waste of time.

if you've got something to add to the conversation, by all means, do so. if you've got nothing to say but "me too," just mod the story up and move on.

<comment><USER21> yea, great job on posting a comment that has nothing to do with this story.

<comment><USER22> The way this site's values are carried forward is the older hands show the newer ones how things are done around here. That sort of community maintenance might happen anywhere, on-topic for the current submission or not.

But heck, if you're really hellbent on not listening to advice, go right ahead doing what you're doing. It's possible your account's karma will wind up in negative numbers and then get deleted, but that's hardly the end of the world, I guess.

</comment></comment></comment></comment></comment><comment><USER23> 100% agree. The "advice" coming out of 37 signals is completely ridiculous. Don't hire overachievers. Only work 4 days a week. Take 6 weeks of vacation.</comment>