Practices in source code sharing in astrophysics - <AUTHOR> http://arxiv.org/abs/1304.6780v1 <comment><USER2> I'm a computational biologist. If I read a paper where the results of an analysis are presented, but the code used is not, that analysis is worthless. Thankfully, in computational biology & bioinformatics at least, open source is widespread and growing.

Every programmer knows that every programmer makes mistakes. Lots of them. Mistakes that can completely change the outcome of an analysis. And if the results of your analysis are to be taken seriously, people have to be able to trust them, which means they have to be able to check your working.

Not publishing your code is anti-science, selfish, and IMHO should be disallowed in the literature.

<comment><USER3> "Not publishing your code is anti-science" ... "open source is widespread and growing"

I've noticed that few people realize that "publishing your code" and "open source" are two overlapping issues, but they are not the same and the needs of one field are sometimes opposed to the other field.

Open source necessarily implies that the people who receive the software have the right to modify the software, redistribute it with or without changes, and be able to do so for a charge.

No one has been able to tell me why software for scientific publications requires the third of those abilities. Everyone is agreed that access to the code and the ability to modify it makes it much easier to review and understand what it does. I can also understand the need to share modifications with collaborators, in order to help carry out the analysis. But I don't see why published software can't have a prohibition on charging a fee for using modified versions of the software, or services rendered which use the software.

My first question for you, then, is: do you need the ability to commercialize someone else's software in order to provide good scientific review of their publication? More specifically, what sorts of review would that prohibition eliminate?

In the other direction, I have scientific software which I sell for about $30K. (This is not hypothetical - I really do have this). Customers get the source code under the BSD license. This falls into every standard definition of "free software" and "open source" software. There's even an essay (at <http://www.gnu.org/philosophy/selling.html> ) encouraging people to sell free software.

If I publish a paper which uses the software, then am I obligated to give my peers access to the source code for no fee? Or can I publish the paper, say it's available under a BSD license, and charge $30K for access to it?

So my second question is, are there limits on what I can charge people in order to get access to my open source software, which was used for a paper? If so, what are they, and what is the ethical basis for that judgment? (For example, should it be "fair, reasonable and non-discriminatory"? Can it cover development costs? Distribution costs? Web site development costs?)

<comment><USER2> To clarify, I'm saying that publishing the source code so that others can run and modify it is the crucial thing. I'm not saying that not open sourcing your code is anti-science, but not making it available for scrutiny is.

So to answer your first question, I don't think the right to sell someone else's code is related to the scientific process. I can't think of a way it affects the progress of science to use (or not use) commercialisation-friendly licenses, except in some indirect economic ways I don't know enough about to predict.

As to the second question, I think if you tried to charge reviewers for access to your code, your paper would never be accepted at a journal. Science is largely public funded. When public funds are used for research, the fruits of that research should be made public. That includes your code.

<comment><USER3> Overall then it looks like you agree with me. The philosophical underpinnings of free software are different than the underpinnings of good science.

 _nods_ to your first answer. I would also say that being able to distribute source (with or without modifications) to others is important, though not as crucial. This prevents someone ( _cough_ Elsevier _cough_ ACS) from having a monopoly on providing the source. But a restriction on, say, military use or wiretapping would not inhibit scientific progress, even if such a restriction makes it something other than free or open source software.

As for the second question, the scientific software I sell is not nor ever has been publicly funded. The people who have paid for it are all for-profit organizations. I don't even get R&D tax credits for it. While you're correct that much of science is publicly funded, my software isn't.

Going back to that question: are there limits on what I can charge people in order to get access to my open source software, which was used for a paper? If so, what are they, and what is the ethical basis for that judgment?

I can tell you that I would rather not publish a paper, in order to earn income selling my software, than to describe the techniques I used in making the software and the corrections and improvements to the existing literature that I developed. Which is better for overall scientific progress, and why?

This is especially important should I choose to publish as open access, since that journal in my field costs about $1,200, so I'm already planning to pay over a month's rent in order to publish. Should I also expect to lose the equivalent of a year's salary, in the hopes that publishing the paper helps as big enough advertisement to my services?

<comment><USER2> Yours is an interesting situation. Without public funding, in my opinion you have no moral obligation to provide free (as in beer) access to your software. Indeed, the greater social benefit (if there's a binary choice between nothing being published and there being a paper but no free (as in beer) source code), is gained by you publishing a description of the work. Others can then at least benefit from your theoretical advances. To directly answer your first question: I don't think there are any ethical limits on what you can charge (but there are economic ones).

Which outcome is better for overall scientific progress depends entirely on what your software does, how large the need for it is, etc. However, one thing that is almost certainly true is that providing free (all senses) access to the software will maximise the social benefit. So if you can find a model that allows you to profit whilst still doing this, I encourage you to do so (see last point).

If I were in your situation I would say the issue of whether or not to publish is economic: publishing a paper about the software will bring it to the attention of the scientific community. That should lead to increased custom for you, provided the software is good and priced appropriately. An example of this is Robert Edgar of <http://www.drive5.com>. He has written several pieces of software which have really advanced computational biology, especially USEARCH. He makes the 32-bit version available freely, and there's a ~$800 per machine license for the 64-bit version. He also makes some tools available freely. This mixed model seems to have performed very well for him, as he is very widely cited which gets him a high profile and many large bioinformatics institutions buy licenses for his software.

Again, whether publishing open access is a good idea depends on which journal you publish in, how many people will benefit from learning of your advances, etc.

Since you say all the people who have paid for your software are for-profits, you could consider an unrestricted academic license with a paid commercial license (similar to all the baseclear products: [http://www.baseclear.com/landingpages/basetools-a-wide- range...](http://www.baseclear.com/landingpages/basetools-a-wide-range-of- bioinformatics-solutions/sspacev12/)).

<comment><USER3> "I don't think there are any ethical limits on what you can charge"

I think you can see that some others hold a different viewpoint from you and me. I've heard people say that the ability to review the software is essential for science and that the software must, in all cases, be available for trivial if not no cost, in order to allow that review. (I think this view doesn't have a moral justification.)

"the issue of whether or not to publish is economic"

Absolutely. It's advertising. It's then a question for me to decide how to maximize my profits AND maximize improvements to the field. (Only somewhat apropos, I always loved reading the PNAS blub for each article: "The publication costs of this article were defrayed in part by page charge payment. This article must therefore be hereby marked "advertisement" in accordance with 18 U.S.C. §1734 solely to indicate this fact.")

Getting back to the topic, suppose that a group uses 64-bit USEARCH to do research. You wrote "I'm saying that publishing the source code so that others can run and modify it is the crucial thing." However, that group is unable to provide the source code used to do their analysis. ("Licensee will not allow copies of the Software to be made or used by others", says the 32-bit license.)

If publishing the source code is crucial, then this secondary group, which uses the algorithm, is obligated to publish the software they used, no? Or does that obligation only apply to the primary developer of the algorithm? If the primary developer never publishes the source code, then should all secondary users be prohibited from using it in order to develop new science?

Does that prohibition extend to using Excel? Oracle? Built-in software in sequencing hardware? I don't see an obvious bright-line demarcation.

As for "unrestricted academic license", I disagree with some of the distinction between academic license/commercial license. There are academic labs with a lot more money than I have. The group I was in, in the 1990s, had a NeXT or IRIX box on each student's desk, for example. There are also academic labs which act as a front, of sorts, for a professor's commercial interests. Also, the software I'm working on makes things fast - some 40x more than what people would do on their own. Any group can make the time/money tradeoff, and an academic group may easily have more money than time.

I've decided on a different view. Anyone can get access to the older versions, at no cost and under a BSD license. The newer versions are available to anyone, for a fee, and under the BSD license. I'm not dependent on this product for revenue, so it's a test to see how successful this business model might be.

</comment></comment></comment></comment></comment></comment><comment><USER4> I'm a particle physics theorist. In our field there are a lot of open-source (see <http://www.hepforge.org/projects>), as well as some private projects. I believe that source code should be published/shared in tandem with results it produces. Otherwise, those results have no scientific value and I personaly tend not to trust them, even though they are in agreement with well-known predictions. What matters is an algorithm results are obtained with, not results themselves. In other words, scientists should form a hacker-like community and don't get into the trap of a developer-user relationships where some develop while others use software.

I actually wanted to know your opinion concerning the migration of open-source to private software. The most common open-source and free software licenses, like MIT or GNU, allow this kind of migration. That is Bob could modify Alice's public project, produce results, and publish them without sharing sources with anybody. That looks unfair, since Alice did a great job and most likely would like to see the changes. How to protect Alice from such situations? Are there any kind of license which forces to share modified software when some results it produces are published or available to the general public?

<comment><USER5> Isn't that what GPL does?

<comment><USER4> I think that no. GPL permits to keep one's changes private and doesn't force to make them public, that is bad in the case of scientific software. However, it forbids to distribute changes under the terms of other licenses, i.e. non- free, that is good.

I believe that an enforcement to share source code should be imposed on provate modifications of open-source scientific software.

</comment></comment></comment><comment><AUTHOR> As an astronomer, I hope this idea takes off. Unfortunately, judging by the reactions my colleagues have had when I've brought up this idea in the past, I don't think it's very likely.

<comment><USER6> I hope the idea takes off, too.

Providing codes is imperative; they are part of the methods and should be available for examination to ensure the integrity of the science. Those conducting research funded with public monies should be required by the funding agencies to release the products of that research, not just the results, but the data and codes, too (absent truly compelling reasons, such as national security). Eventually, I expect funding agencies will indeed require this for astronomy, just as they do for some other sciences; journals could help the field along, could improve the transparency and reproducibility of research, by requiring code release upon publication.

Absent funding agencies and journals insisting on code release and the moral argument of reproducibility, what incentives would help convince code authors to release their software?

<comment><USER7> > Absent funding agencies and journals insisting on code release and the moral > argument of reproducibility, what incentives would help convince code > authors to release their software?

Impact Factor? -> Patrick Vandewalle, "Code Sharing Is Associated with Research Impact in Image Processing", CiSE 2012 <http://doi.ieeecomputersociety.org/10.1109/MCSE.2012.63>

It could also be the pressure of colleagues who, as anonymous reviewers, would always ask for the code whenever a paper depends on computation. Journal policies will not switch to REQUIRING the code anytime soon, but peer-review can add some pressure.

</comment></comment></comment><comment><USER8> > While software and algorithms have become increasingly important in > astronomy, the majority of authors who publish computational astronomy > research do not share the source code they develop, making it difficult to > replicate and reuse the work.

This is troubling. There's no field involving computation in which withholding source code is routinely accepted. The four-color map theorem proof (Appel & Haken, 1976) would never have been accepted without source code. Modern mathematics, to the degree to which it relies on computer results, also relies on the publication of source.

Another example is the recent revelation involving an error in an Excel spreadsheet and its effect on an economic analysis -- the correction wouldn't have been possible without publication of the spreadsheet alongside the conclusions drawn from it.

Also, replication is a cornerstone of serious science. Without replication, astrophysics becomes psychology, where replication is rare.

I hope this paper has the effect of correcting this systematic flaw in astrophysics publication.

</comment><comment><USER9> As an astronomer I hope this does not take off.

The threat to job security is not just "perceived". Astronomers are frequently kept in a state of constant job-induced anxiety by the prevalent practice of fighting for 6 month - 2 year "postdocs" for the first 15-20 years of their careers (seriously, go to an astronomical conference, you would not believe the amount of people greying under 35). To "keep" your job (in reality, get another postdoc) you must do two things: author papers and get papers cited.

This practice makes collaboration actually detrimental to a researcher's career unless one of two things happens: 1) they lead the collaboration and get their name as first author 2) the collaboration allows some kind of recompense for the time invested into the collaboration.

For this reason, many collaborations have a period of proprietarity, a time when the collaboration data is available exclusively to the people who have sunk their time into the collaboration. Imagine, if the people behind the Millenium or Aquarius simulations were forced to publish their code as soon as they had run the simulations (this is true for any theorist)-- now these people have spent the past years of their lives, tweaking and perfecting code _for which they get no publications or citations_ and before they can even begin to analyze the easiest results ("low hanging fruit", the simplistic papers that usually go to collaboration members), the simulations are being run and analyzed all over the world. They have gained nothing by their efforts in actually developing the code (our world does not work like industry, we don't get a pat on the back and a raise for being team players).

For theorists, often entire careers revolve around codes that have been developed over the researcher's whole career-- to be forced to hand it over to all the first year PhDs in the world is a tremendous slap in the face.

For me, as an "experimentalist" (read, data-analyst), I also maintain job attractiveness by having sets of code that no one else has. I'm experienced in a variety of pattern finding algorithms, and have even invented a few myself for very specific problems-- and within my little sphere, people know this about me, I'm the person people come to for certain things. I spent years of my life perfecting these, learning about algorithms, learning the intricacies and quirks of the various datasets we use-- if someone wants to take my place in this community as "that guy" then I expect them to devote as much time as I have to learning these techniques inside out and then to do something better than me. I have no desire to pass my code off to a masters student and let him naively plug some dataset into it-- firstly because no one should ever rely on a black box in this field, and secondly because these codes all need to be tweaked to account for the different instruments and data structures being used.

Perhaps if my contract didn't have a built in expiration I would be willing to care-bear-share my fractal search methods and spend my Thursday afternoons showing you how to Savitsky-Golay smoothing works, but as long as I'm out of a job next July, and you're the guy applying for my job, you can keep your filthy hands off my code.

<comment><USER5> > For me, as an "experimentalist" (read, data-analyst), I also maintain job > attractiveness by having sets of code that no one else has. I'm experienced > in a variety of pattern finding algorithms, and have even invented a few > myself for very specific problems-- and within my little sphere, people know > this about me, I'm the person people come to for certain things. > I spent > years of my life perfecting these, learning about algorithms, learning the > intricacies and quirks of the various datasets we use-- if someone wants to > take my place in this community as "that guy" then I expect them to devote > as much time as I have to learning these techniques inside out and then to > do something better than me. > I have no desire to pass my code off to a > masters student and let him naively plug some dataset into it-- firstly > because no one should ever rely on a black box in this field, and secondly > because these codes all need to be tweaked to account for the different > instruments and data structures being used.

> Perhaps if my contract didn't have a built in expiration I would be willing > to care-bear-share my fractal search methods and spend my Thursday > afternoons showing you how to Savitsky-Golay smoothing works, but as long as > I'm out of a job next July, and you're the guy applying for my job, you can > keep your filthy hands off my code.

First, WOW. In can't imagine any sector (except indeed academia) where a "keep your filthy hands off my code" attitude like that is remotely acceptable.

Second question is, _whose_ code, exactly? In most lines of work, if you write code for an employer (university in this case, I suppose), the copyright for that code is implicitly given to the employer. In this particular case, it means they could, as well as _should_ force you to open this code. It could very well be that your contract explicitly states different, it has to be clear about _code_ though, it's not just implied together with writings, for instance.

Imagine if you were to work for, say, a security analysis consultancy firm, and you write a lot of cool machine learning and analysis code to detect intrusions or leakage. Regardless of whether your contract expires, if you leave, you're not leaving with your code. And if you'd refuse to document it properly so that the next guy can't use it, expect the contract to expire prematurely.

I can imagine that would seem frustrating and scary NOW, but only because they made it seem like yours was a proper approach for all those years you gave it. Of course it wasn't--and deep down inside you know this to be true--if only everything had been open from the start.

<comment><USER10> > First, WOW. In can't imagine any sector (except indeed academia) where a > "keep your filthy hands off my code" attitude like that is remotely > acceptable.

Actually, keeping code "close to your chest" is pretty common in the security industry. You'll see fuzzer frameworks get released all the time, but fuzzers which find "real bugs worth money" tend to get hoarded.

If you work for a consultancy and have private tools, you are not expected to hand those over to the company. They will appreciate it if you release some results with their name on it (as well as yours) every now and then though.

<comment><USER5> I see your point. I was actually trying to think of a counterexample where "keep your hands off my code" would indeed be a valid attitude, and the first that came to mind was the security industry (because what you describe indeed makes sense). But then I remembered the way copyrights work under employment, making it a bit of a convoluted (countercounter) example, sorry about that.

What you describe, however, is if someone _already_ has developed these tools and then joins a security consultancy company.

Wouldn't it be _very_ different if one developed the tools _while_ under employment of a certain company (and it was your job to develop such type of tools)?

Cause that's the whole point of the way copyright works here, if you develop this tool on company time, I really doubt they'd let you walk away with that IP. _Especially_ because they are worth that money. And even if you develop it in your own spare evenings, law is pretty specific that doesn't matter, for one reason that it's impossible to prove (and often quite unlikely) that you didn't use any company resources or knowledge to do so.

There is a good possibility that university contracts have different rules about the IP you produce while doing research though.

<comment><USER10> > Wouldn't it be very different if one developed the tools while under > employment of a certain company

Basically, yes, stuff done on company time is definitely theirs under 'work for hire'. Totally agree with you.

A lot of projects are done as evening/weekend work which is on shaky legal ground - similar to bootstrapping a company while employed. If you have a side activity which is making money, it's simplest to stay quiet about it.

Among the limited sample set of "people I know", it's considered extremely crass for a company to try to pull an undeserved IP grab. Such a company would find it really hard to get self-motivated people after pulling a move like that. Because _everyone_ has side projects.

Although some are diligent about getting "my stuff versus your stuff" spelled out in contract, it's often a "gentleman's agreement"...

As an aside, I wanted to point out that it's really common for security companies (or simply, "groups") to keep internal tools and only release them to the public when they've wrung all the "juice" out of them - e.g. publicity value exceeds the value of the results.

I think this model is not too far off what was described originally.

</comment></comment></comment></comment></comment><comment><USER11> Have you also seen the Open Exoplanet Catalogue proposal by Hanno Rein? (<http://arxiv.org/abs/1211.7121>)

I have no idea if you know him or not, but if not, you should consider getting in touch!

<comment><USER12> Isn't that exactly what the virtual observatory already has? They base their tables on XML, and call it a VOTable. Lots of fabulous software can read and write those.</comment></comment>


Show HN: Oat++ – Zero-dependency C++ framework for high-performance web services - <AUTHOR> https://github.com/oatpp/oatpp <comment><USER2> Hi there, great work writing oat++. I am the author of Passenger ([https://www.phusionpassenger.com](https://www.phusionpassenger.com)), an application server that powers 650.000 companies and sites world-wide such as Apple, Pixar, Juniper, etc. Passenger is mostly written in C++ and like you, performance is a priority for us.

I've done a fast code review, and I thought I'd share some of my findings with you. These are based on my experience with writing high-performance servers. You can read about some of my experience in these blog posts: [https://www.rubyraptor.org/how-we-made-raptor-up- to-4x-faste...](https://www.rubyraptor.org/how-we-made-raptor-up-to-4x-faster- than-unicorn-and-up-to-2x-faster-than-puma-torquebox/)

Hopefully you can use my feedback to make oat++ even faster and better. Code review here: [https://github.com/oatpp/oatpp/issues/15](https://github.com/oatpp/oatpp/issues/15)

I've covered:

\- Pools and contention

\- Shared_ptr and atomics everywhere

\- List vs vector

\- Zero-copy architecture

\- SpinLock everywhere

\- New does not return nullptr?

\- More documentation

\- More tests

<comment><USER3> Good point on the shared_pointers. What's your opinion on using Ravenbrook MPS pools and not deal with refcounts at all?

<comment><AUTHOR> Memory management, and pools.

Memory management is definitely super important and has big impact on the performance. Also there is a memory fragmentation issue that you should keep in mind building server apps. Solving this problems is time consuming and you need to do a lot of experiments in order to tune all this system. So if there is a robust time-proved solution for solving this problems it is definitely worth of considering.

shared_ptr and refcounts - actually it is a compromise (like any other solution). On the one hand you could avoid refcounts, atomics etc. On the other hand you have a framework for the end user. And user may be not so familiar in depth of your framework's thread management and concurrent access to some shared objects.

Also end-user may decide to bring in some other library which for example uses shared_ptr. And what user should do if he has to share some object among std::shared_ptr and your own custom shared-ptr:)?

This is the reason I decided to go with std::shared_ptr (with it's atomic refcounter) as I mentioned in the code-review in the response [https://github.com/oatpp/oatpp/issues/15](https://github.com/oatpp/oatpp/issues/15)

Now about Ravenbrook MPS pools in particular: It seems to be a robust time- proved solution which may help you to avoid a lot of pain. As for oatpp - oatpp claims to be zero-dependency at the moment. So no external dependencies are considered at the moment. This may be changed at some moment in the future but not for now.

</comment></comment></comment><comment><AUTHOR> The idea of the project is to give user something light, something that could cover a set of basic needs when you develop a web-service (Like rest- framework, basic DI-framework, web-client, connection management, object- mapping etc...) and make it highly customizable at the same time.

So when you need to kickoff something from scratch you don't need to do anything more than a git clone starter-project and start coding. And when it comes time for additional requirements you cant easily substitute ex. any SSL backend, any http-client, add http compression etc... And oat++ provides interfaces to configure there things.

See more: Example how to create web-service with swagger-uI and auto- documented endpoints [https://medium.com/oatpp/c-oatpp-web-service-with- swagger-ui...](https://medium.com/oatpp/c-oatpp-web-service-with-swagger-ui- and-auto-documented-endpoints-1d4bb7b82c21)

</comment><comment><USER4> What is the rationale behind going for from-full-scratch instead of packaging a copy of ASIO with the library? Beating properly-used ASIO performance is going to be a massive uphill battle, especially in multithreaded scenarios.

On that note, benchmarks against a simple ASIO http server are a must if performance is your #1 stated goal.

<comment><AUTHOR> I agree. I should schedule to add ASIO vs oatpp benchmark.

However performance is not the only thing oatpp has. Among with other features oatpp provides ObjectMapping layer. ObjectMapping layer enables you to do cool stuff like: \- autodocument endpoints see [https://medium.com/oatpp/c-oatpp- web-service-with-swagger-ui...](https://medium.com/oatpp/c-oatpp-web-service- with-swagger-ui-and-auto-documented-endpoints-1d4bb7b82c21)

\- easily implement custom protocols (I will write article about this later)

<comment><USER4> I think you are misunderstanding my question. I am not suggesting that ASIO fills the role your library does. All it is, really, is just fancied-up cross- patform select().

What I'm wondering is: Is there's a specific reason you chose to reinvent that specific wheel?

<comment><AUTHOR> Oh ok, thank you for clarification.

During the initial investigation boost::asio appeared to work not very good on MacOS. Problems where on the load higher than 10K concurrent connections.

There was multiple requests to compare networking performance of oatpp to ASIO lately. So I want to make full-scale testing before making statements.

</comment></comment></comment></comment><comment><AUTHOR> Have you noticed oatpp ApiClient (retrofit-like client wrapper)? This is another trick oatpp's ObjectMapper layer can do.

The oatpp-consul client is built using oatpp ApiClient. see ApiClient in the oatpp-consul [https://github.com/oatpp/oatpp- consul/blob/master/rest/Clien...](https://github.com/oatpp/oatpp- consul/blob/master/rest/Client.hpp)

example how to do client requests [https://github.com/oatpp/oatpp- examples/issues/3](https://github.com/oatpp/oatpp-examples/issues/3)

It is also possible to build your own RequestExecutor based on ex. Curl

</comment><comment><USER5> Looks pretty cool and easy to use, at least for the synchronous methods. The async methods could use a little bit more documentation, e.g. what is really async about them (what is Action? Some kind of deferred response? Can you store the request objects there for longer than the act() methods scope? Etc).

What I would also like to see there are additional examples which show how streaming the request/response body is done, e.g. for file uploads and downloads or SSE.

<comment><AUTHOR> Hey, thank you for the feedback! It is really very important to me what seems unclear to user, and what info to add.

</comment></comment><comment><USER6> I wonder how this stacks against Cutelyst in terms of performance.

<comment><AUTHOR> Hello and thank you for the question!

The short answer: \- I don't know. \- Let Techempower to settle this.

I decided to take on Go(net/http) in the initial benchmarks as it shows good performance and even overperformed c++ solutions that claimed to be more performant (in their tests).

But! There multiple things that can be tuned especially with c++ servers. And there are multiple tests which show different aspects of server's performance. The problem is that currently I have no resources to do all these tests and what is more important - I think such tests should be made by an independent third party.

So I think oat++ should be submitted to Techempower to answer all those questions.

<comment><USER6> You are expected to deliver tests to Techempower yourself. Optimizing for those tests is part of the game. ;)

net/http is known for being quite slow

<comment><AUTHOR> Yeah, I already looked through requirements. It will take me some time to prepare all that stuff. But I think it's gonna be fun

</comment></comment></comment></comment><comment><AUTHOR> Did you notice that [https://oatpp.io](https://oatpp.io) is served by oatpp :)?

<comment><USER7> I have a question. I want to adopt oatpp.io, but I'm using a synchronous database driver mongo-cxx-driver. Can I still benefit from oat++'s coroutine? Also, when using coroutine, will the server be a single-thread process? or it will be a multiple thread process with each thread using coroutines (to fully utilize the cpu)?

If my server wants to visit third party rest APIs in an asynchronized way, what's the best asynchronized library to choose to make use of coroutine?

<comment><AUTHOR> Thank you for the question.

\</comment></comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>-----

// I want to adopt oatpp.io, but I'm using a synchronous database driver mongo-cxx-driver.

\- Unfortunately no - if your driver has only synchronous API you can use it with multithreaded oatpp only.

\</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>-----

// Also, when using coroutine, will the server be a single-thread process?

// or it will be a multiple thread process with each thread using coroutines (to fully utilize the cpu)

\- Yes, it will be a multiple thread process with each thread using coroutines. You can configure how many threads should run the AsyncHttpConnectionHandler. Number of threads is passed to the AsyncHttpConnectionHandler constructor. Also you may tweak it in compile time via option:

"-D OATPP_ASYNC_HTTP_CONNECTION_HANDLER_THREAD_NUM_DEFAULT=<num of threads>"

You have to play with this parameter in order to achieve best performance. In most cases on : \- Linux it's value should be (<num of CPUs> \- 1). \- On MacOS it's value should be 2.

\</comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment></comment><comment>-----

// If my server wants to visit third party rest APIs in an asynchronous way,

// what's the best asynchronized library to choose to make use of coroutine?

\- Native way to do it is to use oatpp ApiClient [https://oatpp.io/docs/component/api- client](https://oatpp.io/docs/component/api-client)

it provides two declarations:

\- API_CALL("GET", "/resource", getResource) ///< Example of API call

\- API_CALL_ASYNC("GET", "/resource", getResourceAsync) ///< Example of Async API call

Also there is an example project with the full example how to make asynchronous calls to rest APIs [https://github.com/oatpp/oatpp- examples/tree/master/tls-libr...](https://github.com/oatpp/oatpp- examples/tree/master/tls-libressl)

There is no README currently in this example, but I gonna add asap.

</comment><comment><USER8> Have you tried using (or building on top of) seastar-framework ?

<comment><AUTHOR> Thank you for the question,

No, I have not tried seastar. But thank you for the tip, I think there might be things for me to point out.

</comment></comment><comment><USER9> > return createResponse(Status::CODE_200, "Hello World!");

Is "Status::CODE_200" a useful abstraction over just "200"?

<comment><USER10> Assuming that's an enum, the compiler will tell you if you miss one case in a switch statement. Also if you mistype 200 for example as 20 or 2000 the compiler will also tell you. None are huge reasons, but it is nice and cheap.

<comment><AUTHOR> good point

</comment></comment></comment><comment><USER11> Is this cross platform? It looks like there is direct dependency on Linux socket APIs.

<comment><AUTHOR> Hello, Thank you for the question!

oatpp has been recently tested on: \- Linux (Ubuntu 16, 18. CentOS 7.5) \- MacOS

Windows support is not currently available. But I would love to add it. If there someone with windows machine and willing to help, I will provide all needed assistance. Windows support issue: [https://github.com/oatpp/oatpp/issues/2](https://github.com/oatpp/oatpp/issues/2)

</comment></comment><comment><USER12> What about TLS 1.3?

<comment><AUTHOR> Thank you for the question,

Oat++ provides interfaces to substitute SSL backend. One can easily substitute any SSL backend by implementing two class: \- Connection \- ConnectionProvider

Currently there is an adapter for LibreSSL [https://github.com/oatpp/oatpp- libressl/tree/master/server](https://github.com/oatpp/oatpp- libressl/tree/master/server)

But if you need TLS 1.3 one may add GnuTLS adapter for example</comment></comment>


Facebook holds the IPO price after war of $38 - <AUTHOR> http://www.businessinsider.com/there-is-a-huge-battle-to-hold-the-38-price-for-facebook-happening-right-now-2012-5

<comment><USER2> I posted this in another thread, but just before close there was a bid at 38.00 for 9.6 million shares. [source: [http://finance.yahoo.com/q/bc?t=1d&s=FB&l=on&z=l...](http://finance.yahoo.com/q/bc?t=1d&s=FB&l=on&z=l...)]

The stock was artificially propped up to disguise a loss.</comment>


Ask HN: Where do you buy audiobooks without DRM? - <AUTHOR> I love listening to podcasts. And would probably also love to listen to books. But where to buy those? Somehow I have the feeling that the user experience will be dismal and I will get problem ridden DRM monstrosities when I just sign up for the next onlineshop and buy a book.<p>Any recommendations where I can simply by books as MP3s and not be plagued with anything else? <comment><USER2> [https://www.defectivebydesign.org/guide](https://www.defectivebydesign.org/guide)</comment>


This is how you check your PayPal card balance in Italy in 2017 - <AUTHOR> https://www.cartalis.it/cartalis/prepagata/index.jsp <comment><USER2> I also noticed that Italian websites often look and feel as if they're stuck in the 90es. Wonder why that is.

<comment><AUTHOR> Let me first start with saying this specific case is really shameful.

The form and the app UI in general, is designed like it explicitly wants to go against all commonly accepted look & feel defaults.

As if someone who was completely not qualified for this had to complete it in half an hour.

And it's PayPal! Well not exactly PayPal, but the company which provided the Italian PayPal card, which is called Lottomatica. But PayPal should require some minimum quality standards, shouldn't they?

You can see how drastic is the change when browsing from the PayPal page to this one, from the link below and then clicking on the top right "home banking" button.

[https://www.paypal.com/it/webapps/mpp/prepaid- discover](https://www.paypal.com/it/webapps/mpp/prepaid-discover)

It really leaves me with the feeling that the attitude of the Italian company is: "hey we're letting you check your PayPal card balance without charging you anything, so you get what you pay for".

In Italy, banks, TLC companies and other big companies, charge for stuff that you don't see in other countries. For example initially when filling up your phone credit, say 10 euros, you had to pay 2 euros for "fixed costs", so that real credit was 8 euros. This was later considered illegal. Or the case of banks which charge you for non existent costs per year, just because they've always done so.

And when these big companies are forced to adequate to the rest of Western world, being forced to give the user free services (like letting them check their balance, or change your PIN) they do that in the laziest possible way. Also to transfer money between my PayPal account and my Italian PayPal card, I had to wait 2 full days, while I'm sure that in other countries it could take at maximum some hours.

I really would like that some spotlights would be pointed at them and make them ashamed for all the frustration they cause to their customers and this general attitude these local companies have here.</comment></comment>


Power line corridors provide important wildlife habitat - <AUTHOR> https://cloverly.com/blog/power-line-corridors-provide-wildlife-habitat/ <comment><USER2> Another interesting example is the "green band", the former East-German border. One long stretch of land where for decades humans where mostly kept away, the land kept intentionally as short, easy to surveil vegetation to control the border, creating a habitat and travel route for various species as a side-effect. And now target of nature conservation efforts to keep it maintained as such a habitat.

</comment><comment><USER3> These corridors have interested me since I first noticed on Google Earth how massive they are. Straight shots that go for miles and miles</comment>


Show HN: Simple Video Chat - <AUTHOR> http://chaturl.me/

<comment><USER2> This is really cool. How long do the URLs last?</comment>


Conceptually Summarizing the Classics - <AUTHOR> http://danielmiessler.com/blog/a-proposed-project-to-summarize-the-concepts-taught-by-the-classics

<comment><USER2> Such a project might have value, but I think not for the motivation stated.

A lot of novels reference others, not to reference their "core concepts", but to allude to relationships between characters. There's also a fair amount of quoting and shadowing just for fun-- say, the novelistic equivalent of a Hollywood director intentionally "paying homage" to a scene in an earlier movie.

This reminds me, actually, of a cross-reference in Lermontov's "A Hero of Our Time." Nabokov did the translation, and obviously enjoyed himself while noting its debts to other works. One of his end-notes (to a quotation in French) read something like "The allusion is to La Femme de Trente Ans, a vulgar novelette, ending in ridiculous melodrama, by the overrated French writer Balzac."

<comment><AUTHOR> I wasn't actually thinking of novels referencing novels, but rather non- fiction referencing novels. Like, Christopher Hitchens referencing Orwell, for example.</comment></comment>


Texas Lawmakers Pass a Bill Allowing Guns at Colleges - <AUTHOR> http://www.nytimes.com/2015/06/03/us/texas-lawmakers-approve-bill-allowing-guns-on-campus.html <comment><USER2> I think this makes sense. At least in my own experience attending a university in a high crime area, there were a number of students who legally owned firearms (off campus storage), had obtained a concealed carry permit from the state, and practiced often but were not allowed to protect themselves on campus. Several times my students were robbed or even kidnapped on campus. The criminals loved having so many soft targets with new electronics.

A student group petitioned the school president and the state legislature to allow licensed guns on campus. They were told to instead walk in groups at night. As a result several enterprising robbers started carrying flex-ties so they could rob large groups and leave them face down and bereft of their belongings and dignity.

<comment><USER3> And you never thought about just transferring out of Mogadishu?

<comment><USER2> Well I left Atlanta 3 years ago and don't miss it, mainly for those kinds of reasons. I had the choice and ability to move elsewhere but a lot of people don't. Is it really reasonable to restart your graduate studies in another state because you are worried about crime? Or is it more reasonable to be allowed the same rights and responsibilities concerning self defense that exist across the street from your university?

A lot of students don't realize how dangerous their colleges are until they have been there awhile. Administrations do a good job quieting down stories and keeping them out of the paper.

<comment><USER4> Wouldn't a better long-term solution be to deal with the underlying causes of the rampant crime? You can arm everyone, but that won't actually stop crime, just move it somewhere else or force it to evolve. I mean, in the extreme the thieves could just ambush and kill / severely wound you before you had a chance to draw your gun. An arms race is never the answer.

Of course dealing with crime intelligently would involve a lot of tough questions about our economy and society, so I can certainly see how it is easier to just hand everyone a gun and call it a day. But I think we should at least advocate for a real solution.

<comment><USER5> I'm all for a real solution, but in the meantime, I would rather not be considered an ideal target due to my school's policies. If I had the option to carry a gun as a college student, at least that would put me on par with other people in the city. I wouldn't even really need to carry a gun; the mere fact that criminals no longer consider me a guaranteed soft target would be an improvement.

</comment></comment></comment></comment></comment><comment><USER6> As a non-american, this is really weird to me.

I grew up around plenty of guns at my friends - they were moose hunting rifles mostly. And they were under lock and key unless actively used for hunting, with guns locked in one location, ammunition locked in another (at least one of them in safe).

The police where I live now (Ireland) don't carry guns except for a few special units.

The fact that wearing guns is something that is every day business and that you can even discuss about is so alien to me that it is fascinating to see. I am glad I dont live in a society with those values though.

More guns means more people killed by guns. That said, I don't know the solution once you already have a proliferation of guns in your society. Personally I don't believe that maximizing the saturation of guns is a long- term solution but I recognize that it is a difficult situation.

<comment><USER7> That's probably not true. More firearms can easily mean fewer deaths. An armed society is a polite society. Historically the most heavily-armed old west towns were the ones with the lowest death rates from violence.

<comment><USER8> My main problem with this is.. why "armed" have to equal "lethal firearms"? Why no more R&D into nonlethal options (something like an improved taser?).

I don't want to own a gun, because a gun is not effective unless you're willing to use it (in a last resort), and i don't want to do that... I want to own a Taser though (for self-defense).

<comment><USER7> In the American Constitutional case, 'arms' meant firearms. In some newly constituted society you could make a different rule I suppose.

And of course nothing keeps you from carrying a taser now.

<comment><USER9> There are generally much stricter regulations on non-lethal weapons than there are on guns, so the OP might have to be careful in his choice of taser (depending on where he lives).

I grew up in Texas and was always surprised by how cautious I needed to be with my boy scout issued knife -- carrying it in Houston would have been a felony, but carrying a glock was permitted everywhere. I remember my mom having to carry a can of bear repellant instead of mace for the same reason.

</comment></comment></comment></comment></comment><comment><USER10> I'm pleasantly surprised by the feedback on this so far.

As a CHL holder in Texas, I think this law makes sense. Having taken the training, which I think should be a prerequisite for gun ownership IMO, my threshold for when I would brandish my weapon is insanely high now.

Mainly, the course emphasized the huge impact _after_ the situation ends. You may be the one who's dead, as heroic acts rarely end picture-perfect. You'll have killed another person, with a family who's life is wrecked as a result. You'll likely lose tons of money fighting the court cases that'll surely emerge.

Before, I was brought up with the southern notion that stealing a TV warranted shooting on sight. Having actually talked through scenarios, taken classes, and prepared for the unforeseen possibilities, I'd rather avoid using a weapon unless a death is imminent.

<comment><USER11> > which I think should be a prerequisite for gun ownership IMO

only the Second Amendment stops you, and people like you.

> my threshold for when I would brandish my weapon is insanely high now.

only... Texas is about to pass Open Carry.

<comment><USER12> Actually, I don't see how the 2nd amendment is incompatible with a training requirement. It specifies the need for a _well regulated_ militia, and I disagree that a training requirement constitutes an infringement. It's funny how 2nd Amendment boosters seem to have no problem denying gun privileges to ex-felons and the like, even though the Constitution makes no such restriction and there's no question taht even people locked up in prison have first amendment rights. I remember being at a legal symposum a few years ago where a lawyer cheekily offered a paper arguing that 2nd amendment rights must extend to illegal aliens, which was met with consternation from some of the more 'patriotic' types.

<comment><USER13> > even though the Constitution makes no such restriction

Please don't try to pontificate about the Constitution if you have no idea what it actually says. The fifth amendment indicates that you can be deprived of liberty after due process of law. That is to say, after you get convicted of a felony, you may have certain rights restricted.

<comment><USER7> That's a curious reading. Its about due process, and loss of life, liberty or property is forbidden without due process. I guess you can read that to mean loss of liberty is allowed for criminals. Did they mean temporary incarceration, or lifetime loss of ALL liberties? Its not clear to me. Sigh.

<comment><USER13> It's really not a curious reading at all; the due process clauses in the fifth and fourteenth amendments are the basis for the constitutionality of laws that deprive felons of certain rights.

> Did they mean temporary incarceration, or lifetime loss of ALL liberties?

Possibly either, but it's entirely possible to have those liberties restored by court order.

</comment></comment></comment></comment></comment></comment><comment><USER14> As a Swede this seems completely medeival to me and I have troubles understanding how anyone can support such a law.

But since it is the US we're talking about, I'm not surprised. The US just have 1 additional reason why I wouldn't even consider moving there.

<comment><USER15> Is Sweden one of those countries where harming a robber inside your own house can put you in jail?

<comment><USER14> Yes :P

At least if you are doing unnecessary damage to the person. For example, if you are just defending yourself, it is okay. If the robber was not armed and you shoot him/her down, you will be prosecuted for that.

</comment></comment></comment><comment><USER16> Kenya is far away from Texas but I wish some of the 147 students who were killed in their hostels on 2nd of April could shoot back.

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

</comment><comment><USER17> Why would we trust people with a concealed handgun license to carry all over town, but force them to go unarmed on campus? And before anyone says "alcohol," carrying drunk is already a separate crime.

</comment><comment><USER18> I don't know. Forget being safe, I'm reminded of how my college told me I couldn't keep a fencing foil in my dorm room because it was a "weapon" and I'm somewhat sympathetic. Especially considering students with baseball bats and such were never told anything similar. I don't think college should come with a "only approved hobbies allowed" sign.

</comment><comment><USER19> I need a browser plugin that replaces guns with teddy bears. Because outside of hunting, sport, policing or warfare I don't know that guns have much of a role in society. On campus they would seem to replace a thumb in the mouth or a plush toy in the hand of someone with major insecurities.

<comment><USER20> So what are your thoughts on [http://web.mit.edu/mitprc/www/index.html](http://web.mit.edu/mitprc/www/index.html) ?

<comment><USER19> Totally in favour of students learning how to shoot guns or bows or fence with swords. Why wait for college? With proper supervision these are all appropriate at high school.

A campus should be inclusive and non-intimidating. If you want women, minorities, foreign students to feel comfortable and secure, then arming self- entitled white males to strut around campus with deadly weapons for no reason other than pandering to their own deep insecurities is not the way to do it.

<comment><USER21> Wow, I had no idea this law forbid women and minorities from getting concealed carry permits and/or carrying on campus (for better or worse, an alien generally has to be a permanent resident to get a permit).

You don't suppose some of those women want to be able to protect themselves from the real rape culture?

I also wonder how these "women, minorities, foreign students" would even know that others are carrying _concealed_ weapons. (Further, a lot of us wonder how these special snowflakes will cope when they graduate and are in the real world, after being coddled all their lives.)

<comment><USER20> What threat model are you picturing for rape that pulling out a pistol would be an effective response? Even "jump-from-the-bushes" rape (which is a pretty small proportion of rape) tends to involve close distances. Pulling a pistol on someone within arms reach is tricky even if you are sober and at about equal strength.

(I am not a martial arts or combat systems instructor of any kind.)

<comment><USER21> Well, somehow it nonetheless works for a whole lot of women/people in general; the statistic I've read is that the average gun fight occurs at 7 feet of distance. And of course one of the points here is that a gun is an equalizer for people with a strength difference.

Consider the Zimmerman-Martin case. Martin, taller and with the advantage of hitting first, was on top of Zimmerman, pounding his head into a concrete sidewalk, and Zimmerman nonetheless was able to draw his gun and shoot Martin.

</comment></comment></comment></comment></comment></comment><comment><USER22> Now .. the cold war showed that when everybody has a nuke then nobody will ever live to tell the tale from that one guy, who build a gun wilding drone.

The problem is that crime is so high, and crime is so high, because society basically provide those guys with high-income-guaranteed-protected-by-the- state-zones (drug trade). And the drug trade is part of your way of life. You cant preach protestant ethics and expect those who fall short to stay in that harsh reality that is created.

Even if everybody gets a free wrench, if the aqueduct is pumping water into your houses attic, you never gonna have a dry day. But you gonna have people bleeding from there heads where the wrenches hit.

Armed campus police would make sense though.

</comment><comment><USER23> Once upon a time at an US college:

[http://filmmakeriq.com/wp-content/uploads/2014/07/Once- Upon-...](http://filmmakeriq.com/wp-content/uploads/2014/07/Once-Upon-a-Time- in-the-West.jpg)

</comment><comment><USER15> They should allow it in schools as well. Would stop bullying quite quick.

<comment><USER24> Out of interest, do kids get taught weapons handling and how to shoot at high school in the US?

[NB I'm asking because some kids get taught these things in the UK]

<comment><USER21> There's a Junior Reserve Officers' Training Corps (JROTC [https://en.wikipedia.org/wiki/Junior_Reserve_Officers%27_Tra...](https://en.wikipedia.org/wiki/Junior_Reserve_Officers%27_Training_Corps)) program that's reasonably popular in many parts of the US, and weapons training is a popular part of it. When I did it in the late '70s it was small bore/.22LR in the winter when getting out wasn't so practical, and there was an opportunity to go to a "summer camp" where you would practice with real service rifles, practice grenades (they wouldn't let the young ones try out real ones), putting on a gas mask in a tear gas chamber, basically a junior boot camp sort of thing. My parents were no fun at all and wouldn't let me attend the latter :-( which due to eyesight was the closest I ever could get to the real thing ).

And of course a rifle team, in which I had a lot of fun, small bore rifles, 50 feet, the "10" was a dot the size of the hole a needle makes in a piece of paper. Quite challenging and two years of early morning practice really improved my marksmanship, even got a nifty and 100% authentic Expert marksmanship badge ([https://en.wikipedia.org/wiki/Marksmanship_Badges_(United_St...](https://en.wikipedia.org/wiki/Marksmanship_Badges_\(United_States\)#United_States_Army)). We on the team helped with the safety monitoring and instruction in the winter rifle marksmanship and that was very worthwhile as well, teaching a novice well enough to get a Marksman badge was a great experience and generally useful for life.

In fact, teaching others was one of the things JROTC explicitly taught, as they pointed out the Army has to constantly teach a lot of people all sorts of things. Definitely one of the most useful things I learned in high school.

<comment><USER24> The CCF used to be called the "Junior Division of the Officers Training Corp" \- but I think they renamed it to try and remove the association of public (i.e. private) school -> posh -> officer.</comment></comment></comment></comment>


On Redis master-slave terminology - <AUTHOR> http://antirez.com/news/122 <comment><USER3> Good for antirez. We all know what master-slave mean in a computing context and separate it from distant historical meanings, just as we don't get offended by `parent.kill(child)`.

Some people get moral enjoyment from finding ways to feign offense... at best, it is a waste of time to indulge much of these false complaints.

Our goodness and values show in our worldly actions.

<comment><USER4> I mean, I don't disagree with your premise that very few people are actually offended, but this is one of those low-effort, doesn't-matter changes so why not do it?

If it does offend anyone at all, why not change it? If it might offend anyone at all, why not change it?

It's not like we're redefining the color blue to appease red-ists. There's a dozen synonyms that convey the same relationship construct as master/slave without using the word slave.

It's not the hill to die on, or take a stand on.

<comment><USER5> > this is one of those low-effort, doesn't matter changes

antirez, at least, says otherwise.

> [...] to change the documentation, deprecate the API and add a new one, > change the INFO fields, [...]

<comment><USER4> Please - it's a find/replace. The API is a bit stickier, but they can of course just map the old 'slave' designation to a new call.

<comment><USER6> Feel free to submit a PR, just make sure it passes all the tests!

</comment></comment></comment></comment></comment><comment><USER7> Thank you for saying this. I am pretty strongly socially liberal (mainly a "live and let live" type mentality), and strongly support the idea of fairness and equality for all, regardless of race, ethnic group, gender identity, or sexual orientation.

But I too think this level of extreme political correctness and people getting mobbed and harassed as a result has really gotten out of hand.

People do NOT have a right to not be offended. Somehow we've forgotten that.

</comment><comment><USER8> Slavery of the human race, whether 1, 10, or 1000 people, transcends race, culture, and time. It is an issue still going on today due to trafficking, and to place it squarely as an issue with white v. black (which implies only white people have ever engaged in the practice) is ignorant. I welcome all inclusive efforts, but it seems these types of people (activists et al) have forgotten that those terms are not just confined to colonial America.

(Please correct me if there is an error with this process.)

Edit: I would like to point out that this is not a criticism of the author or OP. It's an observation. (Also, edited wording.)

<comment><USER9> Yeah it feels pretty weird when people act like slavery was a unique thing that happened in the southern US.

I had a french person talking about how they were oblivious to that dynamic because they were raised in france where it isn't a problem.

That takes a pretty bad ignorance of colonial french history to say with a straight face.

</comment></comment><comment><USER10> I can see the argument for avoiding the terminology for new products going forward. But trying to shame a project lead for not taking on the extra work (and user confusion) to change it after the fact is super gross.

<comment><USER11> Fully agreed. It's easy enough to pick differently if you start something, but it doesn't seem necessarily to warrant effort to change it where it's been done differently in the past (If a project's maintainers want to do it, they're of course free to do so!) and the behavior of some advocates for changing it is horrible.

</comment></comment><comment><USER12> Retroactively changing terminology is a pain, but if you're doing greenfield development, you can just as easily use "Primary/Replica," which in addition to being a tasteful use of language, is actually more accurate in the context of databases.

There are a bunch of goofy alternatives as well, like "Master/Minion" or hell, why not "Dom/Sub?"

</comment><comment><USER13> Is this just virtue signalling or are people actually offended by stuff like this? It reminds me of when Harvard Law tore down their school crest recently because it was the coat of arms of a family in the early 1800s that owned slaves.

If you judge historical figures by modern morals and standards you'll find everyone is a bad person. In that case we should wipe George Washington and Thomas Jefferson's faces off of our currency because their families owned slaves too, nevermind their contributions to America.

</comment><comment><USER14> I think antirez's initial resistance to changing the terminology is reasonable, and obviously doesn't warrant the name-calling. Without a doubt there would be a lot of overhead to change documentation and code.

That said, regardless of the past and ongoing use of master/slave terminology, we should be trying to steer away from it. It's insensitive and just generally unpleasant.

<comment><USER15> Antirez has said for nearly a decade that if he was rebuilding the system he would use different terms, but changing the terms would break too many clients. Redis is backwards compatile to v1 - that's an impressive feat!

Also, they've included a note on the official position of the project about this in the docs for SLAVEOF [https://redis.io/commands/slaveof](https://redis.io/commands/slaveof)

</comment></comment><comment><USER16> If it was a new product I was writing, I would use different terminology.

But bending over backwards and rewriting and re-documenting a huge part of your extremely popular application because a subset of a subset of people find it offensive is... strange.

Also loved the reply: "You call me a fascist, you know, those people who attacked and killed people over here less than 100 years ago. Maybe YOU should watch your language." OWNED! HA!

<comment><USER15> The irony of calling someone a fascist for using the wrong word... haha

</comment></comment><comment><USER17> Great response. I will add: Do not give in to these people, even an inch. If you do, they will never be satisfied, but will find the next hill of offense to conquer, and eventually your entire project will forget its purpose.

</comment><comment><USER18> When this topic (back then it was Drupal, not Redis) was discussed here five years ago¹, I wrote this:

> _Interestingly, DNS has gone the other way. It used to be that it was called > "primary" and "secondary" DNS servers, but now the preferred terms are > "master" and "slave" servers._

You have to look at really old RFCs to see the old terminology, but it's there.

1\. [https://news.ycombinator.com/item?id=6826918#6827140](https://news.ycombinator.com/item?id=6826918#6827140)

</comment><comment><USER19> It's unfortunate that this is so poorly written in terms of it being quite obvious that he speaks English as a second language. I also have mixed feelings about a few other details.

But, on the whole, I agree with the sentiment.

I'm older than I used to be and this has made me more appreciative of polite language. But a lot of people who use what I used to somewhat contemptuously call "polite catch phrases" are often not actually any more respectful of other people than those that don't. That genuine respect matters far more to me.

In essence, I think he is correct that what America needs to do is set things right by its own people instead of telling non-Americans that they need to jump through hoops over our emotional baggage for relatively minor details of this sort.

<comment><USER20> As an American I don't feel any guilt or emotional baggage. This kind of issue is brought up by people with severely underdeveloped moral codes who have latched on to the candy equivalent of morals. Which is to say, unsophisticated but provides an easy sense of superiority.

<comment><USER19> As a white American who was born and raised in the Deep South, I can't say I feel guilt per se, but I do feel the weight of baggage in the culture around me. I do feel burdened by not knowing how to talk to people of color at times about some subjects and not knowing what I can do today to help kill this legacy rather than inadvertently keeping it alive.

In my twenties, my husband spent months going on endlessly about his new best friend "John." John this. John that. It aggravated the hell out of me. He gushed about the guy.

Then one day hubby and John arranged for the two families to meet and it turned out John and his family were black. The surprise showed on my face, which made for a very awkward meeting.

I didn't care that they were black, but my husband had never once mentioned that John was black. So I assumed he was white.

In that moment, I realized this was a racist assumption. This assumption that if he isn't white, my husband will inform me of this fact, was an artifact of a deeply racist culture. And I was tremendously upset to realize I had drunk the koolaid when I thought of myself as an idealist and not racist and so forth.

So I am very uncomfortable with the possibility that I may yet still be obliviously doing things that help keep racism alive, help keep people of color oppressed, help keep doors shut in their face without being aware of it. I don't know the solution to that and I think if you really truly believe in justice and equality, that should bother you. If it doesn't, then you are probably part of the problem and just not really wanting to take responsibility for that fact.

But, yes, nitpicking about a single word (or a couple of words, in this case) is often a cheap way to lord it over people and act morally superior without really doing anything of significance. That much, I agree with.

<comment><USER21> > I didn't care that they were black, but my husband had never once mentioned > that John was black. So I assumed he was white.

How can an assumption be racist anyway? If my friend told me about a friend I might imagine that person tall and slim with brown hair and whatever other look and if this person turns out to be short and chubby with blond hair - <USER2> cares. Obsessing about skin color like you are doing right now is completely meaningless, doesn't help anybody and just feeds the segregation even more. You can't be "subconsciously racist", don't believe those hoax psychologists that claim it.

<comment><USER19> _How can an assumption be racist anyway?_

The assumption was rooted in cultural practices of the Deep South.

Studies show that people who disagree with primary racism will still agree with secondary and tertiary rules that help enforce it. So you may not like the idea of subconscious bias, but it's quite real.

It is sort of a social "Jim Crow" law. Like when people say they aren't racist, but they wouldn't hire anyone who "sounds" black (who has the so called _black accent_ ) because you need to be articulate for the job. My rebuttal to that back in the day was "George W. Bush." Because if you actually need to be articulate, then a white man widely mocked for his speech issues should have never been president. But that's not really it.

</comment></comment></comment></comment></comment><comment><USER22> FWIW other large vendors like Microsoft use terms like primary/replica instead of master/slave. That one database uses the phrase in 2018 (MySQL) does it doesn't mean we shouldn't still strive to find more precise language

<comment><USER23> Perhaps more precise language exists, but my understanding is that master/slave more accurately describes the relationship than primary/replica does. A replica implies mirroring, but doesn't imply the other key components that differentiate it from the primary or master node.

<comment><USER24> > my understanding is that master/slave more accurately describes the > relationship than primary/replica does

Please, do go on—what else about the master/slave relationship is implied by the terminology?

<comment><USER25> Control mostly. Slave processes are controlled by the master totally and do work on the masters behalf. Parent/child does not work here as child processes are created by the parent, and do not necessarily follow the parents commands. A child can do other work, without the parent being aware of the goals. Replicas on the other hand clone behavior, it has to be identical to the primary.

</comment></comment></comment></comment><comment><USER26> Cheers Salvatore. I appreciate your stance on this ("political bikeshedding", if that's a thing).

</comment><comment><USER27> Term "political correctness" is very loaded, and using it basically flags a narrative.

No one would argue for "political correctness", only some would argue against it, because only place it exists in their imaginations.

</comment><comment><USER28> Context: I'm in the "source and replica"-camp. I'm English and white passing.

I really appreciate antirez's point on this, "Mark" definitely seems to be a person with their heart in the right place but lacking tact and being intolerant to decisions not going his way; especially given the technical work this change would necessitate the change does not seem appropriate.

That said, I hope that in time the technical world will settle on some alternative to ensure we can talk freely without distracting or offending folks.

A few years ago I was in a meeting talking about database options, hitherto I had used "master/slave" to describe this database topology. In that meeting was an African American co-worker ("Frank") and as the words left my mouth I realized that completely irrespective of my intent I brought into the room the spectre of times past. I've no idea how Frank felt about it - but all of a sudden I had lost all ability to continue my point. I paused and said something that amounted to: "you know,... that phrase is fucked up - let's not use it - what words should we use?" and Frank suggested we look at what terms Amazon uses; they used "source and read replica" and that's what we went with. I've never regretted recoding my use of words on that one.

If there's anything that this post-Trump era has really brought into focus for me: it's that my privileges of being white, able bodied, and male results in me being least well positioned to say what is offensive or not. If you think it's offensive, open it up to the rest of the room and establish how to move forward.

</comment><comment><USER29> Ah, yes, the widespread cancer of critical theory strikes Redis.

</comment><comment><USER30> Good job antirez, do not give into ideologically possessed control freaks and busybodies that actively seek out offense in everything. You can never fully satisfy them so don't even bother trying. They do not care about the 'morality' of the master/slave language here, but merely use it as a tool to control behavior of others and exert unearned power over your project. It's a pathetic power play, and nothing more.

</comment><comment><USER31> Or maybe, you could not write a blog post and just fix your fucking terminology.

</comment><comment><USER32> The next time someone uses the phrase "political correctness", replace it in the sentence with "treating people with dignity" and re-read it.

<comment><USER23> I would if that's what all, or even most, instances of modern political correctness were. It's also telling that the person trying to bully him into the change definitely did not treat him with dignity, by falsely accusing him of being a fascist when his family suffered and died at the hands of fascists and when his own views are the opposite.

Computer code can't literally enslave other computer code (at least not until AI improves by a lot). Inanimate objects can't cause or experience suffering to/from other inanimate objects. Abstract concepts don't have agency. A master-slave relationship is just an accurate and abstract way of describing certain kinds of concepts.

</comment></comment><comment><USER32> >Moreover I don't believe in the right to be offended, because it's a subjective thing. Different groups may feel offended by different things.

Spoken like someone who has never had to face systemic oppression.</comment>


A new antenna using single atoms could usher in the age of atomic radio - <AUTHOR> https://arstechnica.com/science/2018/09/a-new-antenna-using-single-atoms-could-usher-in-the-age-of-atomic-radio/ <comment><USER2> The phrase "single atoms" seems misleading. The article describes the primary device as a cell containing a vapor that needs a laser to activate the gas and a laser to measure the gas. As far as I can tell the only thing "single" here is that the vapor consists of one type of element, which doesn't seem like an important piece of information for the title.

Edit: "single atoms" -> "gas and lasers"

<comment><USER2> Here is an alternate source with more concise details and a nice diagram of the lasers and the cell.

[https://www.technologyreview.com/s/611977/get-ready-for- atom...](https://www.technologyreview.com/s/611977/get-ready-for-atomic- radio/)

<comment><USER3> This is really interesting, but I am a bit confused on the practical implementation. How could this be used to replace real-life systems? If I understood it correctly, a potential system would be made up of lasers at the transmitters, and a cloud of Rydberg atom gas at the receiving end plus a specifically tuned laser to saturate the gas.

But this design runs into line-of-sight issues between the receiver and transmitter. Also, the Rydhberg gas needs to be contained in some way that will hold the gas in whatever place it needs to be but also be transparent such that the transmitting laser can impact the gas as required without interference from the containing medium.

I feel like this is conceptually cool, but not useful/practical outside of a lab or unrealistically perfect outdoors environment. Does anyone know of any uses for this new tech?

<comment><USER2> The signals are not transmitted with lasers, they are transmitted with traditional RF broadcasting equipment. This is just an AM/FM radio receiver that detects RF with lasers. The breakthrough is that it doesn't require a physical antenna proportional in size to the wavelength of the frequency it is detecting.

</comment></comment></comment></comment><comment><USER4> Interesting. But I had never before heard a description of RF ranges in octaves. I suppose it makes sense, but that completely threw me off because I thought they were talking about sound waves for a second.

<comment><USER5> > never before heard a description of RF ranges in octaves

you can read something about filter designs...

> _It is usual to measure roll-off as a function of logarithmic frequency, > consequently, the units of roll-off are either decibels per decade (dB > /decade), where a decade is a 10-times increase in frequency, or decibels > per octave (dB/8ve), where an octave is 2-times increase in frequency. _

[https://en.wikipedia.org/wiki/Roll-off](https://en.wikipedia.org/wiki/Roll- off)

</comment></comment><comment><USER6> The market price for a pair of tunable lasers to do this is more than $100k.

</comment><comment><USER7> Very small, but needs a large "backup system"? So, not very small. And what exactly is this backup system?

<comment><USER7> Ok, I've been downvoted. But I'm still curious what in the world could be considered a "backup system" but also necessary for implementing the technology. Anything necessary for it to work isn't a "backup" is it?

And I'm also still curious what this particular large "backup system" is.

</comment></comment><comment><USER8> Does that mean we should have SETI looking into other channels?

</comment><comment><USER9> Antenna engineer here. The metal antennas mentioned in the article are resonant (standing wave) antennas. There is another class of antennas called traveling waves, but still need to be about 1/2 wavelength to operate efficiently.

That being said, antennas can be much smaller than 1/2 wavelength, but their efficiency goes down. There is a theoretical limit trading off bandwidth and efficiency for volume, called the Chu limit.

So it would be interesting how this technique compares. It says it's narrow band, so like a laser, which means it may still be limited.

There are other methods, such as bouncing a laser off a thin metal membrane, which supposedly has very low noise. Wonder how noisy this method is?

Antenna noise temperature is related to efficiency, but this is an active antenna. So it really boils down to bandwidth vs. noise temperature per volume. That metric would give an indication of how it compares to classical antennas.

<comment><USER10> Any introductory reading you might recommend?

<comment><USER9> There are a couple of books on electrically small antennas, but those are not introductory. Stutzman and Theile is a good antenna textbook, and there are many others; John Krause for example.

You could start with the ARRL Antenna Compendium, for non-engineering books.

Steven Best has some good papers (i.e. the spherical folded dipole), if you have access to IEEE Xplore. The APS magazine articles are very good.

<comment><USER10> I meant basic, standard, antenna engineering.

Though the small stuff is also interesting.

Thanks.

<comment><USER11> Might want to try

 _Antenna Theory - Analysis and Design - Balanis (2016)_

But noticed a 2005 3rd edition is available in .pdf for download gratis at:

[https://archive.org/details/AntennaTheoryAnalysisAndDesign3r...](https://archive.org/details/AntennaTheoryAnalysisAndDesign3rdEd)

<comment><USER10> Thanks, this and the above are a good start.

</comment></comment></comment></comment></comment></comment><comment><USER12> We can create life in a lab. And we also create new realities on a computer. How long before we create a new reality in a lab and life on a computer?</comment>


Bitcoin-only art platform: Cointemporary - <AUTHOR> http://cointemporary.com

<comment><USER2> Discussed 2 weeks ago: [https://news.ycombinator.com/item?id=7811924](https://news.ycombinator.com/item?id=7811924)

<comment><AUTHOR> Right. But new artwork online in the meantime.

<comment><USER2> That's not a sufficient reason to resubmit so soon.

<comment><USER3> Why?

<comment><USER2> If everyone on Hacker News submitted their website every few weeks to highlight _minor_ improvements, /new would be unusable. :P

Submitting a website that offers no new insight to what has already hit the front page on HN is not constructive.

<comment><USER3> Apparently it's an online gallery, showing only one artwork every few days (week?). It amuses me, that you use the term 'minor improvement' when they swap exhibitions. I assume some would also consider this a new insight.

</comment></comment></comment></comment></comment></comment><comment><USER4> That's about $12,000 USD for some welded scrap metal?

Sheesh! I'm in the wrong line of work!

</comment><comment><USER5> I like this idea a lot.</comment>


Distribution Rules Content - <AUTHOR> http://dundeeventurecapital.com/2016/01/distribution-rules-content <comment><USER2> Fascinating. I like that they were open about their strategy and the results. Targeting works!</comment>


Man builds bicycle out of cardboard for $9 - <AUTHOR> http://www.fastcoexist.com/1680293/watch-this-man-build-an-amazing-cardboard-bicycle-that-you-can-actually-ridezing-cardboard-bicycle-that-you-can-actually-ride#2

<comment><USER2> <http://news.ycombinator.com/item?id=4290187> <\- Many comments

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

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

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


Live classifying human movement through machine learning - <AUTHOR> http://blog.telenor.io/2015/10/26/machine-learning.html <comment><USER2> You have literally 6 features; you do not need to do dimensionality reduction here. Further, PCA is used generally before performing a linear regression model, which assumes independence among variables. SVM's are nonlinear and so don't care (though you specify both a linear kernel and the RBF kernel in your code?). If the data was very high dimension you could do PCA and then SVM in order to increase _speed_ at the expense of _accuracy_ \- there is no free lunch. I think that's what you see in your results.

As a side note, SVM's and Random Forests are generally considered the best 'out of the box' models. So you chose a good one to experiment with!

Also, since you already wrote the analysis code in Python, why not write the front-end in Python (rather than Node) as well?

<comment><USER3> > You have literally 6 features; you do not need to do dimensionality > reduction here.

We do have six features, but they are not rotation invariant. I was hoping we could find the "axis of maximal motion" (or something along those lines) within each sample period, project the movement along that axis, and then do FFT to find what kind of bouncing around the test subject were doing. That didn't work out too well in practice, but it still sounds like the smart thing to do :-) What do you think?

</comment></comment><comment><USER4> I love posts like this, but I suspect another set of algorithms is going to win this race. Probably some combination of convnets and recurrent neural nets.

[http://www.unnvision.com/pub/DDNN_ECCVW2014.pdf](http://www.unnvision.com/pub/DDNN_ECCVW2014.pdf) [http://jmlr.org/proceedings/papers/v32/pinheiro14.pdf](http://jmlr.org/proceedings/papers/v32/pinheiro14.pdf)

</comment><comment><USER5> [https://www.moves-app.com/](https://www.moves-app.com/) also uses machine learning to classify walking, running, cycling etc. Not sure what algos but there are some pointers on the founder's website - [http://www.cs.cmu.edu/~akyrola/](http://www.cs.cmu.edu/~akyrola/)</comment>


Ask HN: Google warned me that a state organized hacking group targeted me - <AUTHOR> Has anyone of you guys gotten that message?
I'm still not sure why they targeted me nor how? I'm neither famous nor a journalist or blogger or scientist or something like that.
Nonetheless,what can I do to find out how they tried it? Or if they broke in or if my network is comprised?
And what can I do to prevent in future? Beside 2fa. <comment><USER2> My team at Google is responsible for identifying the users we give these warnings to. Here's what I wrote last year to provide a bit more context: [https://security.googleblog.com/2017/03/reassuring-our- users...](https://security.googleblog.com/2017/03/reassuring-our-users-about- government.html)

The most important point is that this indicates signs of targeting not compromise. Also,like all systems there are false positives especially for security researchers and the similar types but we hope it is a useful indicator to reassess your security posture.

<comment><USER3> Thanks for the extra context. One thing I didn't see addressed that I'm curious about is how does Google distinguish a "government-backed" attack vs your normal everyday hackers? Is it a function of the specific methods used, the depth and breadth of resources deployed, source ip ranges, or what?

<comment><USER2> It's a range of factors. Basically this warning means that what we detected ties in some way to wider activity that looks government backed. There's some border cases, but in practice the targeted campaigns of governments look very different in both technique, volume and targeting to say a widespread cybercrime phishing campaign. It's not a perfect science, but we believe its worth calling out separately the activity that does fall into this bucket.

<comment><AUTHOR> But Google would tell me if they were successful,right?

Also: should I tell my coworkers what happened?

<comment><USER2> If we detected your account was compromised Google would have given you a different notification at that time and forced you to change your password.

<comment><AUTHOR> Thanks,at least it is something.

I'm really curious what they hoped for though.

I have nothing of interest. I do nothing interesting ( except they get really excited about people working in IT consulting) which probably would be millions by now...

<comment><USER4> Do you have any controversial opinions? Have you ever worked for any governments? How about any weapons or other military contractor companies? Critical IT infrastructure? Could be a number of reason's you're targeted.

<comment><AUTHOR> Worked for government, but that is looong ago. Like six years or so? And the government organization I worked is not really interesting I think. ( No weapons, no military, no foreign Relations etc)

Never worked for any military or weapons org or other stuff.

Currently I'm working to create a community portal for a bank. Which will only be used by developers in b2b. ( Documentation and stuff)

But maybe they hoped for weakest link? That's why I'm thinking about to tell my co workers about it.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER5> This is when you know you've "made it", when state intel is trying to get to you :-)

Seriously now, even though you're not famous or a jounalist you might have some type of valuable access in your life? Or maybe it's just a false positive from google. Or maybe you weren't being especially targetted, and instead your e-mail ended up in some list of valuable e-mails (rightly or wrongly).

<comment><USER6> Yeah but they're not going to let you know if the NSA or the CIA targets you.

So the message can be read more like: a non-allied state actor has targeted your email and we are notifying you to show how good we are. Please note we will not reveal when you are targeted by an allied state intelligence. Privacy is relative, mostly an illusion. Thank you for your cooperation.

<comment><AUTHOR> Jeah,my thought were along that line to.

It's not America. More likely is Russia,China,Japan, Germany or God knows...

</comment></comment></comment><comment><USER7> Perhaps you aren't of interest, but you are in the address book of somebody of interest, or in the address book once/twice/thrice removed of somebody of interest.

</comment><comment><USER8> Ironic Google warns you of this while we have Apple moving their iCloud to GCBD in China where GCBD is managed by the China Gov.

Then they also moved the keys also to China. Then on top removed the VPN apps from the app store.

Google Gmail was getting hacked by China gov so they warned and ultimately left China.

Even Amnesty International has opened a campaign on Apple and their disregard for privacy.

[https://www.amnesty.org/en/latest/news/2018/03/apple- privacy...](https://www.amnesty.org/en/latest/news/2018/03/apple-privacy- betrayal-for-chinese-icloud-users/) Campaign targets Apple over privacy betrayal for Chinese iCloud ...

</comment><comment><USER9> I got it too years ago. It said it might also be my circle of contacts being attacked. So it might not be you in specific.

<comment><AUTHOR> Mine didn't..

That's bad I guess.

</comment></comment><comment><USER10> This in itself sounds like a phishing attack. Is the mail authentic?

<comment><AUTHOR> Not a mail.you get that message when logging in to Google.

I first thought that too.and tried another browser ( got that message in Vivaldi first,than tried IE) Same result.

Here are some old articles about that:

[https://www.recode.net/2017/3/24/15054954/google- reassures-u...](https://www.recode.net/2017/3/24/15054954/google-reassures- users-government-backed-hackers)

[http://www.zdnet.com/article/google-heres-why-you- shouldnt-f...](http://www.zdnet.com/article/google-heres-why-you-shouldnt- flip-out-over-government-backed-hacker-alerts/)

<comment><USER10> Yea, it does look legit after reading the articles you posted. I am not a hacker per se, but I guess uncovering what a gov hacker did in your account is highly difficult. In terms of safety, use a password manager that creates and stores hard-to-crack passwords for you. I am pretty happy with Dashlane, 1password has a good reputation, too.

<comment><USER11> What ! Don't use a password manager and turn on 2 factor Authentication

<comment><USER12> Absolutely use a password manager, and a strong passphrase for the master password [1]

Why would you say not?

I'm not trying to be rude or anything. Let's have a discussion, and if I can convince you to do use one, I'd have made one more person safer.

[1] I made this for a dead simple way to make passphrases: [https://amingilani.github.io/password- maker/](https://amingilani.github.io/password-maker/)

<comment><USER13> Not OP but open for a chance. Last time I checked the popular password managers saved the passwords in one way or another. Which personally simply sounds like a bad idea to begin with.

Even if in theorie they are safe. Even the slight chance that a single failure could lead to all my passwords getting in the wrong hands at once just is to scary.

<comment><USER14> How do you propose one memorizes a properly random/secure/long password, let alone multiple ones, without trusting 'something' with it, whether a password manager of good repute, a hand-rolled version with potentially bigger security issues, or a piece of paper somewhere?

<comment><USER15> I've memorized multiple long passwords, and routinely memorize new ones. Also phone numbers, poems, mailing addresses, digits of pi, etc. It's not really _that_ challenging. Especially if you do it often.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> how do they know it's a state organized group?

<comment><USER17> Advanced Persistent Threat (APT aka Nation state) actors are tracked using known indicators of compromise. These indicators can include infrastructure identifiers such as domain names and ip addresses that maybe used in a phishing url or post-compromise for command-and-control or to download other malware.

Other indicators can include malware sample hashes or actor-specific detection rules (Example: YARA,Snort or Netwitness rules).

These indicators are typically not public. Some can be accessed if you pay the right sum of money and undergo vetting,still,some are kept private within the relevat security firms or organizations.

As you can imagine,Google has their hands in many pies including security research and threat intelligence collection(Everyone loves their VirusTotal intelligence product). They can scan email metadata for any of these indicators as they see fit.

Generally speaking,some indicators are of such high quality, they can be used to detect well crafted spear phishing by a nation state actor. But most are good only to detect untargeted attacks or targeted attacks that include a large number of targets.

Hope that answered your question.

<comment><USER16> also why do people like to use the term nation state when it involves hacking. just to sound fancier? according to wiki nation state has a precise meaning and it's not equivalent to the term country

<comment><USER18> I wrote my doctorate thesis in international relations theory and taught Intro to IR courses where the difference between country, state, nation, and nation state were covered in week one. You're right that there's a difference between country and nation state (and a difference between nation state and both nation and state, too) but in popular use - including politicians who should know better - the terms are interchangeable.</comment></comment></comment></comment>