Should small Rust structs be passed by-copy or by-borrow? - <AUTHOR> https://www.forrestthewoods.com/blog/should-small-rust-structs-be-passed-by-copy-or-by-borrow/ <comment><USER3> This purports to discuss pass-by-copy or reference but ends up not discussing that particular issue at all since every single compiler naturally inlined and vectorized his trivial micro-benchmark.

If you were to discuss the headline issue, I guess you could delve deep into calling conventions, register pressure, various instruction set extensions that compilers can abuse to carry the data.. or you take the compiler optimizations as a hint that concerning yourself with this is mostly pointless, as long as you don't start passing huge structures by-copy.

<comment><USER4> I've mostly only dabbled in Rust, but I recall it being really difficult to pass data by copy in Rust. It seemed to want you to pass things by reference, especially if your type is meant to implement any prominent trait. It didn't matter if my type was an int, Rust seemed to want me to pass it by reference.

<comment><USER5> Do you have an example? Copying is only hard to the extent that you need to #[derive(Copy)] for your type, and ints are already Copy. I also don't see how other traits factor here.

<comment><USER4> It's been a while, but I tried implementing a trait that took `&self` with several different types. One such type was an integer type, so I had to pass by reference. It's probably not a big deal, but there are many things like this that seem to prefer you move or reference rather than copy.

I think it would be better for all traits to implement their methods on `self` and then the caller can choose whether the type that implements the trait is `i64` or `&i64` (instead of the trait being prescriptive about the type, which largely defeats the purpose of traits to begin with).

That said, I'm not very experienced in Rust, so I expect someone can correct me about why this is a Very Bad Idea.

<comment><USER6> Rust basically has this functionality. Whether a type is borrowed or not dictates what I can do with it. For example, I cannot remove items from a `Vec` with a shared &reference. Thus, without knowing which reference type is used in a trait method, I cannot write generic code; I don't know whether my function must take &T or T.

There might be a way around this limitation, but it makes figuring out who is supposed to free a resource hard to do.

The rust solution is to have different traits for different levels of ownership. For example, if I want to iterate over a vector of strings, I can get a Iterator<&str> without destroying the vector. If I'm willing to destroy it, I can get an Iterator<String>.

Or, you can actually implement a trait on a reference type[0] to convert a `self` argument to effectively `&self`. This is the recommended way to implement some conversions, using AsRef and/or Into[1].

[0] [https://play.rust- lang.org/?version=stable&mode=debug&editio...](https://play.rust- lang.org/?version=stable&mode=debug&edition=2018&gist=f7f9b2a0a956b6b6776452133f5c53fc) [1] [https://doc.rust-lang.org/std/convert/trait.AsRef.html](https://doc.rust- lang.org/std/convert/trait.AsRef.html)

</comment></comment></comment></comment></comment><comment><USER7> You should be careful trying to apply these micro benchmarks to modern optimising compiles, behaviour may be different depending on the exact code being compiled. Rust especially has immutability and known types in generics at compile time, so the compiler can do a lot of pointer and inlining magic that C and other languages can't.

In the below example Rust switches to using a pointer when you might think it's doing pass by copy/move. This works because in Rust the moved value can never be referenced after calling the function, so the compiler can just pass a pointer and clean up the value after the function has returned.

[https://www.reddit.com/r/rust/comments/3g30fw/how_efficient_...](https://www.reddit.com/r/rust/comments/3g30fw/how_efficient_is_moving_a_struct_into_a_function/)

<comment><USER8> > so the compiler can do a lot of pointer and inlining magic that C and other > languages can't.

Isn't this a negative for Rust for when you actually _do_ care about such micro-optimizations? It feels as if you not only need to know the language itself but also how the particular version of the compiler you are using has decided to interpret the language and apply optimizations - essentially having to know how the magic trick is performed.

AFAIK this is why Free Pascal added constref in addition to const (which existed since the 90s in Delphi) - the latter doesn't guarantee pass-by- reference (even if in most cases it will do that) so if you care about that you need to know how the compiler you are using will treat it (thus needing to know more than just the language) but constref does exactly that. Now granted this was mainly done for interfacing with external code written in other langauges than micro-optimizations, but it still applies that if you cared about what the compiler will produce you had to rely on "magic knowledge" before constref was introduced.

<comment><USER7> In general Rust emphasises semantics over implementation side-effects. For example you use a pass-by-value because you're semantically moving ownership of the value to the function, not because the implementation may be faster/slower at the assembly level. Not nailing down the implementation is what allows the compiler to make so many optimisations.

If you need concise pointer control, use the unsafe trapdoor built into rust (like Rust's Vec). If you need very specialised code use assembly, not by abusing language side-effects like Duff's Device. If you need fast number crunching use the specialised library for it, not by writing a magic for loop with just the right amount of statements in it.

I admit that sometimes you need to micro-optimise, but I haven't come across this case much in my Rust code. When I do I usually hinder more then help it.

<comment><USER9> > _If you need fast number crunching use the specialised library for it, not > by writing a magic for loop with just the right amount of statements in it._

There is always that group of people who are trying to do something for which no specialized library exists.

<comment><USER10> As a member of that group, Hacker News is not where I come for answers to my questions. I think it's perfectly reasonable for comments here to assume that the readers of the comment aren't in that group. Either you know what you're doing enough that 99.9% of the internet is not helpful to you, or you're probably up shit creek without a paddle anyway until you figure out enough to move into the first group.

</comment></comment></comment></comment></comment><comment><USER11> > Blech! Having to explicitly borrow temporary values is super gross.

You can cut down on a lot of that by implementing basic operations (Add, Mul, etc.) for both value and reference types.

        impl Add<Vector3> for Vector3 { … }
        impl Add<&Vector3> for Vector3 { … }
        impl Add<Vector3> for &Vector3 { … }
        impl Add<&Vector3> for &Vector3 { … }

(The first three can delegate to the last one, unless there are value-specific optimizations you want to apply.)

<comment><USER12> This has irked me as well. Is there an acceptable way to make this less verbose?

A crate with a derive macro for example?

<comment><USER13> There is, [https://lib.rs/derive_more](https://lib.rs/derive_more)

</comment></comment></comment><comment><USER14> The Cpp Core Guidelines suggest that the cutoff between copy and const reference should be "up to two or three words" (item F.16). Following this advice, the f32 vector would be passed by value, and the f64 vector would end up in the grey zone.

[https://github.com/isocpp/CppCoreGuidelines/blob/master/CppC...](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#f16-for- in-parameters-pass-cheaply-copied-types-by-value-and-others-by-reference-to- const)

<comment><USER15> That explains why I usually see std::span passed by value.

<comment><USER16> Spans with extent known to the compiler are not even two words long. Like unique_ptr with default deleter they are the size of a pointer.

</comment></comment></comment><comment><USER17> The original question aside, it's awesome that Rust has the potential to be _faster_ than C++ because its language semantics allow for more compiler optimizations. I'd thought it was slightly slower, but maybe that's just a temporary state because C++ has had so much time to get optimized.

<comment><USER18> I don't think that's the case. The article is comparing wildly different compilers (Visual Studio and LLVM) which are inevitably going to give very different results. Comparing Rust with clang would be a more interesting comparison since they use the same back end.

<comment><USER19> The idea that Rust has the potential to produce faster binaries than C/C++ comes, I guess, mainly from the fact that (once the bugs in LLVM have been fixed) Rust will be able to apply restrict/noalias very liberally to the generated IR, facilitating optimizations by the compiler backend which are not possible in your usual C/C++ codebase.

But yes, in this case it probably came down to some more obvious cause like a wildly different compiler.

</comment></comment></comment><comment><USER20> For the difference between rust and C++ I'd say is caused by the difference between rustc+llvm and msvc++ compilers. Compiling C++ under clang should give more comparable results

<comment><USER21> I did find it frustrating that Clang wasn't the first thing he tried. But he did eventually try Clang past the end of the post (when it should've been at the top). Interestingly though, Clang doesn't bridge the gap.

<comment><USER22> > Interestingly though, Clang doesn't bridge the gap.

That might be due to differences in the code, but it might just as well be due to differences in the flags that rustc and Clang pass to the backend by default. It's not even clear what optimization level they asked for.

</comment></comment></comment><comment><USER23> Note that Rust's "clippy" linter has a `trivially_copy_pass_by_ref` lint which recommends changing by-reference to by-copy for sufficiently small structs, but presumably it's aiming to be conservative.

AIUI it recommends by-copy for structs of at most 8 bytes because it thinks that's the appropriate limit for 32-bit targets, and they don't like the set of warnings issued to change too much for different targets.

<comment><USER3> Curiously that linter rule source has a very in-depth discussion of "setting the limit", but entirely disregards that it is _the sum of parameter sizes_ , not the individual parameter (which is all the linter looks at).

</comment></comment><comment><USER24> This reminds me of the years I wasted writing C++, always looking for the idiomatic approach, rather than learning about security, networking, architecture and so on. In exactly the same way, Rust is just too complicated.

<comment><USER25> Rust is less complicated than C++, but it is more complicated than Go. However I'm a big proponent of minimizing complexity wherever possible - <USER2> overhead should not become an obstacle to programmer time.

The nice thing about Rust is that it allows you to compartmentalize complexity very nicely by creating rules the compiler will enforce, whereas with C++ the programmer is also burdened with knowing them.

I'm not sure if I'd say that it's more complicated than Python, since Python's flexibility can in practice lead to creative but very hard-to-follow code.

<comment><USER26> I recently realized that trying to order C++ and Rust precisely on a complexity scale is rather pointless and misleading, since it's obvious that they are in the same class of trickiness, but for different reasons.

If a significant number of the developers that come into contact with a language think it's hard, then... it's very likely hard.

<comment><USER27> Rust is harder than many languages, but just because something is hard doesn't mean that it's complicated. I find that the strictness of the compiler ends up all-but-forcing code to end up rather simple.

</comment></comment></comment></comment><comment><USER28> In general, in a multi-core/massively-concurrent&&parallel world, copying small, immutable data-structures is preferred. The big reason is cache hits and minimizing contention for cache lines. If you have small data structures at different addresses (that map to different cache lines), then the memory subsystem isn't stepping all over itself with RAR/WAR/RAW hazards because the copies of data structure became essentially independent of each other after the copy finished and wrote-back to L2/L3.

</comment><comment><USER29> > Rust tuples are delightful to use and C++ tuples are a monstrosity

They're not great, but they're a lot better than using out parameters!

<comment><USER30> Give Rust twenty years, and there will be plenty that's crap compared to the new hotness. C++ tuples will be no worse than they are, and possibly a little better.

</comment></comment><comment><USER31> Interesting article. I enjoyed it.

I have two thoughts.

====

1\. Regarding the benchmark itself, I wonder out loud if CPU caching could have a meaningful alter on the results. The article says :

> I randomly generate 4000 spheres, capsules, segments, and triangles.

It is not clear to me if this is enough to fill CPU L1 cache or not. My guess is that it is not. If all the benchmark indeed happens within the L1 cache, I wonder how a bigger workload would affect the results. Maybe it does not change anything. But maybe it does.

====

2\. The author mentioned two criterion for choosing between by-copy and by- borrow : performance and ergonomics. I would add a third, somewhat related to ergonomics : let's call it semantics. When some piece of data naturally belongs somewhere and some others entities are natural "readers" of it, it might make sense to use the ownership / borrowing mechanism of Rust to naturally reflect this relationship, regardless of performance or code ergonomics.

In particular, a borrow guarantees you always work on a read-only, up to date value of the data. Meanwhile, after a pass by-copy the life cycles of the data seen by the caller and the data seen by the callee become independent of each other. This can have consequences, particularly in a multi-threaded environment.

<comment><USER32> the author doesn't make the data representation explicit, but if doubles are used for positions, 4000 triangles alone would be 288,000 bytes (8 bytes * 3 indices * 3 vecs * 4000). 4,000 of each would spill the largest L1 cache I know of on a mainstream processor (512 KB) and they would still be too big to fit in L1 cache of most modern CPUs even if the vectors used floats. it wouldn't be a huge margin though.

I agree with your point 2) in general. first try for the closest mapping between language semantics and program semantics. come back and do weird stuff later after profiling.

</comment></comment><comment><USER33> My intuition would be: up to 128 bit/16 bytes always pass by-copy. For larger structs up to about 1024 bytes start with pass by-copy and switch to by-borrow only if you profiled and found a performance bottleneck.

</comment><comment><USER34> I don't really understand the complaints in the 'ergonomics' section, this code won't even compile:

      fn dot_product(a: &Vector3, b: &Vector3) -> float {
          a.x*b.x + a.y*b.y + a.z*b.z
      }

      fn do_math(p1: &Vector3, p2: &Vector3, d1: &Vector3, d2: &Vector3, s: f32, t: f32) -> f32 {
          let a = p1 + &(&d1*s);
          let b = p2 + &(&d2*t);
          let result = dot_product(&(&b - &a), &(&b - &a));
      }

Namely, how are you going to multiply a struct like d1 by an f32? Rust has deref coercions also, so there's plenty of times you don't even need to put a &.

Also, I think the idiomatic thing to do would be to implement 'Add' for Vector3.

<comment><USER35> > Namely, how are you going to multiply a struct like d1 by an f32?

[https://en.wikipedia.org/wiki/Scalar_multiplication](https://en.wikipedia.org/wiki/Scalar_multiplication)

Here's a Rust Playground with the vector math impls he's probably assuming (dummied): [https://play.rust- lang.org/?version=stable&mode=debug&editio...](https://play.rust- lang.org/?version=stable&mode=debug&edition=2018&gist=066b625c9cdcb99091a1a8c608f20604)

<comment><USER34> Oh yeah. It wasn't clear from the blog post that he had implemented some of the std::ops operators for his Vector3 struct.

You can get rid of the superfluous & symbols by implementing for &Vector3 also, so again, the ergonomics section doesn't really resonate with me.

</comment></comment></comment><comment><USER36> A graph of struct size Vs speed would have been useful. Also definitely learn to read the assembly - you can then just get an actually answer for what is happening rather than stabbing around in the dark with profiling tools.

Anyway good article.

</comment><comment><USER37> That's the compiler's decision. Whether to pass something as a reference or as a copy is up to the compiler, provided that it can tell if this affects program semantics. If a argument is not modified (or cannot be), and lifetime analysis can exclude aliasing and concurrency conflicts, then it doesn't need to be copied. It can be if it's tiny; that's the compiler's call.

That feature was in an early Modula compiler.

</comment><comment><USER38> Will the Rust compiler convert one to the other as a performance optimisation where possible?

<comment><USER39> Yes - even if you ask for pass by move, it might pass a reference for a large struct.

<comment><USER40> That's interesting, and a bit surprising. I know Ada does this, but it's explicit about only specifying semantics ("in, "out" or "in out") and letting the compiler decide.

Surely C or C++ optimizers won't do this?

<comment><USER41> > Surely C or C++ optimizers won't do this?

When they can prove it doesn't change the semantics on ways that violate the standard I think you will find that they do. Rust doesn't really have it's own optimizer after all, just a repurposed C/C++ one.

<comment><USER42> For objects with trivial constructors and destructors, that's certainly a possibility. But anything with non-trivial move constructor or destructor, e.g. anything that allocates memory, is going to be much harder to optimise in C++.

The problem is, "moving" a C++ object means executing an arbitrary function, which at the very least needs to put the object to a "do nothing on destruction" state. The moved-from object still exists and has to have its destructor run (which is also an arbitrary function). In Rust, even an unoptimised move is just a bitwise copy, and the moved-from object doesn't need a destructor run because its lifetime ends completely when it is moved from.

</comment></comment></comment></comment></comment><comment><USER43> It's wild how much longer this article was than it needed to be. The first benchmark showed that for the test case tested, the copying and borrowing performed nearly identically. The answer to the stated question is that one is free to use whichever syntax one prefers. I would pick the one with the less- confusing semantics, as less complex code is more likely to be correct.

<comment><USER44> > It's wild how much longer this article was than it needed to be. The first > benchmark showed that for the test case tested, the copying and borrowing > performed nearly identically. The answer to the stated question is that one > is free to use whichever syntax one prefers. I would pick the one with the > less-confusing semantics, as less complex code is more likely to be correct.

Please don't blindly apply this line of reasoning everywhere.

For this particular micro-benchmark the results were almost identical. So for this particular piece of code one should apply whatever makes sense.

But if you are trying to generalize to other code (or worse yet, trying to come up with a rule), then you need to understand _why_ the code is behaving the way it is. If you blindly trust your benchmarks you become blinded by their implicit assumptions.

</comment></comment><comment><USER14> Maybe I'm missing something, but it looks like about a third of the functions in by_ref.cpp take their parameters by value:

[https://www.forrestthewoods.com/blog/should-small-rust- struc...](https://www.forrestthewoods.com/blog/should-small-rust-structs-be- passed-by-copy-or-by-borrow/cpp_by_ref)

</comment><comment><USER45> I've had a smaller but similar dive recently while working on embedded machine (32 bit) with Rust. Clippy was pushing me to use move/copy instead of reference for passing a [u8; 8].

I thought this strange on a 32bit machine so I dived in and it turned out the "rule" is supposed to be "up to 2 register sized" variables are supposed to be copied, anything bigger is supposed to be referenced.

The trick here is that due to compatibility and no knowlege of target platform and setup clippy assumes 32bit register size. So on 64 bit platforms you'll only get this warning up to 8 bytes as well for example.

I never went in to actually see if it makes any sense on that particular 32bit platform, so good to see someone taking a dive on the actual compiled code side.

<comment><USER25> Did you file a ticket?

<comment><USER45> No, I asked on the IRC channel and forums as well as a friend who does embedded. The answer was basically "because clippy doesn't know the target arch it has to be a conservative-guess" which I agree with.

My friend also explained how it's a REALLY tricky question to answer properly especially given specific embedded architectures and setups where the answer is very hard.

</comment></comment></comment><comment><USER46> The article is interesting, but it is frustrating that it mainly cares about speed, but 'speed' or 'fast' is not mentioned in the title.

To answer that general title question, I would not even have considered that 'speed' might be an issue. I'd say: pass small things by value because it probably results in the most readable code, which should always be the first dimension of optimisation, I think. Also, the compiler is most probably good enough anyway, so care about your source code readability first.

So, at least the title should say 'if you care about speed a lot'.

<comment><USER30> Everyone cares about speed first, or they would be using a more convenient slow language.

The challenge of Rust is, how nice can we make a language without noticeably giving up any performance to C++? Pretty nice, it turns out.

C++ still has an edge on both performance and ability to code powerful libraries that are not a PITA to use. The performance margin definitely will close up. The library margin could, too, but it will require unpleasant choices.

Anyway both are faster than almost anything else, and will stay that way, for von Neumann machines. Those might get less important, soon.

<comment><USER47> > Everyone cares about speed first, or they would be using a more convenient > slow language.

I use Rust and I actually care about readability first.

Sincerely I find Rust more readable than most popular languages (Python, Javascript, C++, Java, even Swift...), unless I'm looking into some code that abuses generics and lifetimes (which is actually rare for me).

I think that's because it enforces some pretty clear patterns with its lack of struct inheritance, sum types with pattern matching, the way things are imported ("use" statements), lack of parenthesis around conditionals, and being expression oriented.

</comment></comment></comment><comment><USER48> "At least three things are super weird here"

What was the third thing??

</comment><comment><USER49> > My answer to by-copy versus by-borrow for small Rust structs is by-copy

The author is making the case for special treatment of structs for a special case. For a performance gain that's probably below the margin of error. This is negating the elegance and consistency of rust for a special case. I think the author thinks too much in C++ terms and is sort of missing the point of Rust (or at least one point of rust).

<comment><USER50> > The author is making the case for special treatment of structs for a special > case.

The struct by-copy is mostly a good API thing in a lot of scenarios, particularly when the objects are <1 cache line.

Even more so, when you're only writing half the code and want to separate the actions within a function from any side-effects outside.

I would say that the performance difference for small structures is irrelevant to the extra hop, particularly if the copied location is the stack on the callee.

<comment><USER49> > Even more so, when you're only writing half the code and want to separate > the actions within a function from any side-effects outside.

Due to the default immutability of references and the fact the compiler won't allow you to won't allow you to share data between threads (without jumping through a lot of hoops), the risk of side-effects are pretty well neutralized. Another selling point of Rust.

</comment></comment></comment><comment><USER51> Thanks for sharing. As a Rust learner, I still don't know how to place the cursor between performance with borrowing and ergonomic with copying. Most of the time, I just copy/clone and I tell myself that the performance does not matter that much because it will be fast enough for my purpose anyway.

<comment><USER52> > it will be fast enough for my purpose anyway

It probably will be.

I've been using Rust in production for a while now, and our bottlenecks are never Rust's performance. Something else is the bottleneck way before we approach anything close to Rust's peak throughput. This is especially true if you're doing anything that touches networking or interacts with other services.

<comment><USER53> We've used this to our advantage when performance testing things on the JVM. We might not write the final solution in Rust, but we'll use it to figure out a theoretical upper limit with various things like Kafka and misc. databases.

</comment></comment></comment><comment><USER35> Using references to temporaries is at least slightly less painful with a ref pattern:

        let ref a = p1 + &(d1*s);
        let ref b = p2 + &(d2*t);
        dot_product_by_borrow(&(b - a), &(b - a))

</comment><comment><USER54> How to design your API in Rust (or any modern language):

1) What makes the most sense semantically? (So that using your API correctly is the most obvious path)

2) Doesn't matter? Okay, what's the most ergonomic?

3) That code path needs to be performant? Try variations and benchmark within your overall application.

I'm not refuting/dismissing the article. Dives into how the compiler handles things is always interesting! But the programming ecosystem is going through some growing pains right now.

At the beginning of time we had the Era of Assembly; back when our machines were measured in MHz. Code had to be performant above all else; that was the only rule.

During the Era of Moore, performance exploded. As a counter-reaction to the Era of Assembly, programmers began chanting the mantra "No Premature Optimization!" This led to the creation of easy/lazy languages like Python, where code was an art and performance wasn't even an afterthought.

Now we're in the Era of Types. While Python and Javascript were running rampant without types ( _quack_ _quack_ ), languages like Haskell were evolving in the shadows with intricate and expressive type systems. The fruits of those labors are sprouting in the form of Rust. The mantra of "No Premature Optimization!" isn't enough. We no longer need to choose between code that is easy to write and code that is performant. With a good type system we can be more explicit with the semantics of our code and APIs. This makes our code easier to use, more ergonomic, and gives the compiler more information that it can leverage to optimize our creations into assembly machines that would make C64 developers nod approvingly (though knowing secretly that they could always do better).

The growing pain is this transition from a mindset of just "No Premature Optimization" where the focus is simply on writing "easy code" in stark reaction to the hyperoptimization of the Era of Assembly, to a modern mindset where we should write code with intentionally designed types and semantics. Hence my more complicated list of three rules instead of one.

Side Note: And of course, as some comments have pointed out, step number 3 of my guideline is fraught with peril because the compiler's behavior, and the behavior of the CPU, change like the direction of the wind. Thus the thrust of my comment is emphasizing the use of our new typing systems. If your code is typed correctly and your intentions clear (per step #1), the compiler will do the right thing on average at least.

Side Note 2: None of those guidelines apply to languages of the older eras; they aren't expressive enough to communicate with the compiler and hence you're left in the old miasma of untyped languages where optimization is near hopeless, or languages with type systems so narrow that you're battling day- to-day to build APIs with a semblance of usability.

</comment><comment><USER55> Copying data is among the fastest operations possible on a modern computer bus. Not a thing to worry much about.

<comment><USER56> Sure, until your typical workload involves billions of them.

<comment><USER55> Nope. If its a fraction of the processing you do (including loops, calculations and tests) then its negligible. Because you do billions of those things too, and they will dominate the time-cost.

The case in point, subroutine calls, the call itself is far costlier than the argument copying. So in this case, data moving is almost completely irrelevant.

</comment></comment></comment><comment> GuB-42 What I find weird is that there is a difference in performance.

If the compiler is smart enough to inline, it should be able to notice that the way arguments are passed make no difference and use the most efficient way regardless of the signature. Do I overestimate the abilities of compilers, or maybe there is some side effect I am not aware of (concurrency?).

Obviously, it only applies when inlining.

</comment><comment><USER57> Include cost of indirection

</comment><comment><USER58> A good rule is to let the caller decide. If input parameters are by-reference and the caller wants to make them by-reference, congrats, no problem. If caller wants the parameters to by a copy, they can create a clone and pass a reference. But if you impose the input parameters to by copy, there's no way back.

<comment><USER19> In Rust (end even C++ afaik) it usually makes more sense to let the callee decide. Does it need to own the value? -> Call by value. Does it only need to inspect or (visibly) mutate the value during the function call? -> Call by reference (modulo optimization concerns).

<comment><USER59> Functions can also be generic over references vs. move/copy semantics, e.g.:

        fn foo<T>(frob: T) where T: Borrow<Frob> {
          // Do something with frob.borrow()
        }

Due to monomorpization, _foo_ is specialized for moves/clones when called as _foo(frob)_ where _frob_ is a value type or for borrows when called as _foo( &frob)_. Similarly, you can use _Clone_ , _ToOwned_ or even _Into_ for going in the opposite direction.

Whether such functions are good taste in general is debatable ;).

<comment><USER60> You want AsRef, not Borrow, unless you need the additional guarantees that Borrow provides (identical comparisons and hashing).</comment></comment></comment></comment>


Ask HN: Is computer science really a science? - <AUTHOR>

How did it come to be that the field of computing became synonymous with science to form the term computer science?  As I understand it science is about figuring out and interpreting the natural world as it is and has evolved over time (biology/physics/chemistry).  Laws and theories have been formed to understand and clarify how objects are created and interact with each other.
Computer science OTOH is more akin to math and engineering than science.  While some parts of computer science deal with the natural world like the work on artificial intelligence (which is more about psychology/philosophy than science) most of it deals with programming and electronics than the study of nature.
That is not to say that computing does not have value.  It certainly does.  I just think it is questionable if it deserves the science moniker. <comment><USER2> It is not a science. It is also not about computers. :)

SICP lecture 1 -- <http://www.youtube.com/watch?v=zQLUPjefuWA>

But maybe it is a science: there are certainly a number of things in CS that yield facts about things like algorithms (Big O, etc).

I read other comments here that compare computer science to math, and it is not an unfair comparison. However, even amongst mathematicians, you will see something of an avoidance to associate math with science. Math is a framework of a sort, a way to think. When we are talking about how to think, we are talking about philosophy. Science has its own roots in philosophy, so it is not surprising that we see some grey areas here.

So let me rephrase it a little... When you learn Computer Science, you learn how to think.

People compare CS with engineering disciplines, but we find that there are a lot of methodology salesmen but few magic bullets. The problem with comparing computer programming (the practical side of CS) to engineering is that programming is very difficult to measure. We graduated from the idea of measuring lines of code. We have not figured out how to accurately measure a technique like TDD. We have an idea that code quality can rise when people pay attention to it, when people _think_ about the problem; we can encourage this with code reviews, but we can do the same by encouraging developers to have a good night's sleep. We have conjured approximations for our measurements, but none of this has quite the feel of engineering. We are not building bridges, complete with a starting plan based on knowns and an execution.

Algorithms are not building blocks. They are possible solutions to specific problems. There is more than one solution, and the algorithms our professors taught us come with trade-offs. Recently on HN, there was an excellent article and discussion on the trade-off made by grep to improve string searches.

So you cannot just pick from your handy dandy book of algorithms, fit them together in a programming jigsaw, and expect results. The world of software is soft; requirements change, and systems change. It is extremely flexible in a way that other, more physical entities, such as bridges, are not.

In addition to thinking of CS as a philosophy, I favor thinking of CS as an art. I am communicating something to the computer, certainly, but in order to ensure that my code can be picked up by others or myself a year down the line, I must also dive into aesthetics. The code must be readable. It must make sense, must describe the problem, be expressed in such a way that humans can derive meaning from it. Thus is CS as much about beautiful design as it is about getting results.

</comment><comment><USER3> The problem is that only a few decades ago, computer science was a fairly pure branch of mathematics - now you can argue whether mathematics is a science or not in general, but applied mathematics is nearly indistinguishable from physics in many areas, and computer science certainly flirted with applied mathematics.

What gets taught as computer science has evolved rapidly in the last couple of decades and it is my impression that quite a bit of it comes under software engineering now.

This is why I get annoyed when you see jobs in the software sector or software management that require a Comp Sci degree. It's actually a subtly ageist requirement - twenty years ago, computer science was not what you did if you were interested in computers - you did physics so they would let you play with their VAX cluster.

</comment><comment><USER4> If it has to put science in the name, it isn't science.

Examples, Christian Science, Library Science, Computer Science.

That said, it is worth bearing in mind that _computer science is no more about computers than astronomy is about telescopes._

<comment><USER5> >That said, it is worth bearing in mind that computer science is no more about computers than astronomy is about telescopes.

I like this quote. I think I'm going to use it next time someone says "Oh, so you're a Computer Science major? So you, like, fix computers and stuff?"

</comment></comment><comment><USER6> In most of Europe it's called "informatics" or "informatica" which at least to me makes a lot more sense: It's the study of information: data, languages, semantics, knowledge, knowledge representation, and intelligence. It has as much to do with computers as that astronomy has to do with telescopes, optics and radios. So it can/could be a science, it could also be mathematics or a philosophy of understanding.

</comment><comment><USER7> Yes. But the word "science" is very broad.

Sciences are generally classified by "hardness" or (perceived) quantitative rigor. In that respect, from "hardest" to "softest," the sciences are usually ranked roughly like this: Math (yes, math is as much a science as anything else), Physics, Chemistry, Biology, Psychology, and the Social Sciences.

Computer Science is, as most things are nowadays, interdisciplinary. As such, it really depends about what aspect of Computer Science you're referring to. Some areas of computer science are more rigorous, and have a lot in common with math and physics. Others, such as "software engineering" etc. fall on the softer end of the spectrum.

With that said, I don't think that all programmers are necessarily "computer scientists." They're practitioners of an art. Just like not all doctors are medical scientists - some are, but most are just practitioners.

</comment><comment><USER8> The wikipedia entry seems to do a pretty good job fleshing this out:

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

 _the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems_

and

 _The relationship between computer science and software engineering is a contentious issue, which is further muddied by disputes over what the term "software engineering" means, and how computer science is defined. David Parnas, taking a cue from the relationship between other engineering and science disciplines, has claimed that the principal focus of computer science is studying the properties of computation in general, while the principal focus of software engineering is the design of specific computations to achieve practical goals, making the two separate but complementary disciplines_

</comment><comment><USER9> That's just a name. It is of course not a natural science, but a formal one, as mathematics (it could even be a branch of maths). There are even other kind of sciences, social ones, like psychology (which many people wouldn't call a science, though for different reasons, after all it does study natural things, doesn't it?). And of course, there should be a distinction from engineering (electrical e., software e.), though boundaries aren't clear and never will be. If you had a better name for those different kind of sciences, call them in that manner. Also remember, that by saying that something is not a science, it might seem that you are implying that the branch is somehow inferior to the "actual science". (This is not the case, but it is going to be perceived as that.)

</comment><comment><USER10> A computer is a man made device so there is nothing to be discovered in the sense that biology, physics, chemistry required discovery to understand how things work. A computer is engineered and that in turn requires application of chemistry, physics, thermodynamics, electronics and boolean algebra (which is a part of mathematics body of knowledge).

Perhaps we should be talking about "computer engineering" which is how we build computers and "software engineering" which is how we build programs to run on those computers. Both of these require considerable learning, experience and planning. Which probably explains why people want to avoid the "engineer" tag, because it sounds like less fun than _HACKING_.

</comment><comment><USER11> How do you think the parts of the computer work and are developed? Especially processors. There's a lot of chemical and material sciences behind the scenes.

I suppose this is also why "Computer Engineering" as a discipline is somewhat growing in popularity.

</comment><comment><USER12> It's just a name.

I got an undergrad degree in "Computer Science & Engineering". If you have to nitpick, what I studied was not strictly about "Computer", "Science", or "Engineering". It has bits of computer as in how to build a computer, bits of science as in the mathematics and theories of computation behind it, and bits of engineering as in how to build a large-scale program.

Personally I like "Computer Science" just fine. It would be silly for others to mandate CS to be called "Informatics", "Computer Studies", "Mathematics: Computer", "Computational Art", etc.

</comment><comment><USER13> It depends on how you define science. Personally I define science as a process, whereby one has theories and then tries to systematically falsify them. By this measure CS isn't really much of a science, it is more like Math or Engineering.

But it is not exactly a black or white issue. It is more of a science than, say, Political Science, in terms of rigor and logic.

</comment><comment><USER14> Computer science is definitely a science. Mathematics is a science and computer science is part of mathematics. Thus computer science is a study of computation or the automatic solution of problems or processing of data, etc.

The problem is that in most universities the computer science label is used for things that aren't computer science. Most computer science departments are mostly concerned not with studying or extending the science part of computer science, but with applying computer science to solve real world problems. This really should be called computer engineering or software engineering, just as applying certain aspects of physics to create electrical devices is called electrical engineering.

<comment><USER15> _Mathematics is a science_

Most people would disagree with that, though interestingly, that was not the case in the 19th century.

[http://en.wikipedia.org/wiki/Mathematics#Mathematics_as_scie...](http://en.wikipedia.org/wiki/Mathematics#Mathematics_as_science)

It's all semantics, and not worth arguing much. But nevertheless, it's good to keep in mind that mathematics is about _deduction_. It starts from axioms and tries to find all of their consequences. Science is about _inference_ , trying to figure out the axioms given the observable consequences. Maths is bottoms- up, science is top-down.

[That's not the entire truth. Platonism in maths is a nice counterpoint to the above. [http://en.wikipedia.org/wiki/Philosophy_of_mathematics#Plato...](http://en.wikipedia.org/wiki/Philosophy_of_mathematics#Platonism)]

My vote goes to CS being a branch of maths.

<comment><USER16> Citing Gödel's incompleteness and Turing's incomputability, Gregory Chaitin says (<http://www.cs.auckland.ac.nz/~chaitin/cordoba.html>) that "mathematics is different from physics, but maybe not as different as most people think".

Perhaps CS is a math, but investigating CS sometimes necessarily employs science.

As you say: not worth arguing much.

</comment></comment></comment><comment><USER17> Computer science is the study of algorithms, the study of algorithms fits the scientific method. Programming and electronics is not computer science. QED.

<comment><USER18> Science is the study of the fundamentals. Algorithms is clearly a science as is compiler design and even electronics ( someone has to create new types of components, transistors, memristors, etc... )

Building things with those fundamentals is not science, it's engineering.

</comment></comment><comment><USER19> If you program the way I do, it's certainly an experimental science!

</comment><comment><USER20> Comes down to if you classify mathematics as a science.</comment>


Show HN: Build online Books directly from GitHub - <AUTHOR> http://bitbooks.cc

<comment><USER2> Nice. Reminds me a lot of [https://www.gitbook.io](https://www.gitbook.io)

We actually ended up building our own Gitbook/Bitbooks for Discover Meteor, in Meteor.

And we also have a Middleman implementation, although Middleman does 90% of the work out of the box.

In any case it's nice to see open-source options coming out so we don't all have to keep on reinventing the same wheel.

<comment><AUTHOR> Oh yeah, I read your follow-up post here: [https://www.discovermeteor.com/blog/community- translations-w...](https://www.discovermeteor.com/blog/community-translations- with-github-middleman-codeship-heroku/)

Middleman has been great to work with, and it makes it easy to open-source the components I'm using (like this: [https://github.com/bryanbraun/franklin](https://github.com/bryanbraun/franklin))</comment></comment>


Goliath: Non-blocking, Ruby 1.9 Web Server - <AUTHOR> http://www.igvita.com/2011/03/08/goliath-non-blocking-ruby-19-web-server/

<comment><USER2> From the FAQ: <http://postrank-labs.github.com/goliath/doc/index.html>

        How do I deploy Goliath in production?

* We recommend deploying Goliath behind a reverse proxy such as HAProxy, Nginx or equivalent. Using one of the above, you can easily run multiple instances of the same application and load balance between then within the reverse proxy.

I am still wondering about how Goliath fits into both deployment architecture and application development. Traditionally these 2 have always been separated out.

* Thread safety. It is explicitly mentioned that middleware used must be thread safe. Doesn't this hold for all code?

* Can Goliath use multiple cores, or does one instance need to be spun up for each core?

* does it make sense to say, server a Sinatra app from Goliath?

<comment><AUTHOR> In all cases where we've deployed goliath, its running with a single thread. In theory, nothing stops you from creating a thread to do some background task (or EM.defer), but then you're on your own to make sure you have all the right synchronization logic.

As far as middleware goes, because you are reusing the same "app chain" between multiple requests, you just have to make sure that your middleware does not rely on any instance variables since those will get clobbered by other requests. Check the wiki page on middleware, we have a few examples around this.

Last but not least.. the EM reactor runs on a single core, so you're basically in the same deployment scenario as Thin or node.js. Having said that (always a caveat! ;)), Goliath _can_ run on JRuby and Rubinius.. so in theory we have non-GILed environments there, which means we can start multiple reactors and run across multiple cores from within the same proc. This is not something I've experimented with in practice yet, but in theory its possible.

<comment><USER3> 2011 is either going to suck or be awesome depending on how quickly the new Ruby 1.9 features are taken up by Rubinius and JRuby.

Having to choose between multiple threads and a better language is really not a decision you should have to make.

<comment><AUTHOR> \--1.9 mode works really well under JRuby now - that was a big push within 1.6 and they've made a lot of progress. I'd call it "almost there".

Rubinius is a little bit further behind, but I've been able to run our Goliath stack on it, and that exercises quiet a few syntactic changes. So, I think both are close.

</comment></comment></comment></comment><comment><USER4> Just wanted to thank Ilya for em-synchrony, em-mysqlplus, em-http-request, goliath, and other gems that help to make developing evented ruby applications much easier.

</comment><comment><USER5> Pardon me if this is a dumb question: how do I hookup Rails (3.x) with it?

<comment><USER6> I'd say that generally, you don't hook it directly into rails. I think it may fill a role similar to node.js, with the added benefits of fibers and the ability to load your rails app's models and libraries.

For instance, I have a 20-line node.js app that does nothing but serve websockets for my rails app. I may replace that with Goliath in the interest of consistency.

</comment></comment><comment><USER7> Very timely release: I'm creating facade to other http API. Something like the sample in the article. I faced problem with slow responses from other party so I need to move to async request handling. Would you compare Goliath to EM HttpServer or other options?

<comment><AUTHOR> evma_httpserver is definitely an alternative and one we used early on at PR. Having said that, we migrated away from it because it didn't provide us with the flexibility we needed to do keepalive, pipelining, etc - it basically provides just a very thin layer on top of an EM connection, hence the minimal API and functionality.

Thin would be an alternative to Goliath as well, although we chose to switch to a different parser and also to add the Fiber logic/wrappers right into the framework.

The way I think about it is: if Thin is an app server, then Goliath is more of a minimal framework which you can use to go from start to finish in if you need to bring up an API endpoint. That includes, configuration, routing if you need it, validation, etc.

</comment></comment><comment><USER8> A noob question: If I have an expensive background job (say pdf generation) is there a way to make it async and use it with Goliath ?

<comment><AUTHOR> That's a great question actually.. In any evented app, blocking your "reactor" is a big performance problem, since everyone will be waiting for you to complete that operation before anything else can happen. In general, you want to turn any CPU intensive work into an IO-bound operation, where the reactor is "waiting" for the IO notification that the computation is complete.

Now.. How you actually achieve that is a whole different story. You could, in theory, throw a job into some external work queue and poll that, or if your runtime permits, spawn some threadpool and periodically check that, or.. spawn a process and wait on that. In other words, it all depends on the actual operation.

In the case of PDF generation, if you rely on some external tool, you could use a mechanism like EM.system('shell cmd') to spawn a process and wait for it to return you the data.

<comment><USER9> If you're going to be forking off processes to do work for you, I think it's a bad idea to hide the implicit state by using EventMachine to try to manage the pipe I/O and the process state. The reason for that is, sidecar processes screw up, backlog, crash, and eventually start consuming resources you want to track. You end up reinventing the same wheel the Github people did with Resque. Better to reify all those processes from the start with a real queue.

I only make this pedantic comment because EventMachine makes it _really_ easy to start down the path of "just event the process management and I/O", and it seems like you're almost always better off not doing that.

</comment></comment></comment><comment><USER10> I'm still not convinced that Fiber-related gymnastics are massively superior to callback-related gymnastics, especially if you ever have to debug the magic under the hood (which I inevitably end up doing).

Can someone enlighten me?

<comment><USER2> With fiber pause resume the onus is put on the IO library writer. Someone has to write a MySQSL library that used threads. The advantage is that this is completely transparent to the library user. A goliath user need not be concerned about events or fibers when using MySQL.

In contrast, a node user must specify a callback every time they make a query. I don't know if the library writer has to do anything special.

</comment></comment><comment><USER11> sounds awesome.

also noteworthy: postrank has been running ruby19 fiber'd webserver in production "for well over a year"?

cool!

<comment><USER12> So has Shopify. Serving terabytes of on-demand resized assets.

</comment></comment><comment><USER13> Know of any async postgres drivers out there?

<comment><USER14> There is one built into EventMachine. ([https://github.com/eventmachine/eventmachine/blob/master/lib...](https://github.com/eventmachine/eventmachine/blob/master/lib/em/protocols/postgres3.rb)). Never used it, so I can't say if it's good or not.</comment></comment>


Show HN: Projects Made with Code - <AUTHOR> https://www.codemade.io/ <comment><USER2> Not entirely related to the product, since I am midway through the _signup_ but something about the Auth that I thought you should take a look at right away; more so when you say Pinterest for "programmers" :)

A password field that's a text field?

[http://i.imgur.com/xNP4XHA.png](http://i.imgur.com/xNP4XHA.png)

<comment><USER3> possibly intentional: [https://www.nngroup.com/articles/stop-password- masking/](https://www.nngroup.com/articles/stop-password-masking/)

<comment><USER4> This should still be implemented by the browsers, not hard-coded in HTML. Like Microsoft's implementation mentioned at the end ;)

</comment></comment></comment><comment><USER5> The thing I don't get about this is that it puts the entire focus on the picture representing the project, which is supposed to revolve around being "made with code".

Shouldn't the code/language/libraries used or even the title stand out more than the picture?

Other than that, pretty cool idea.

<comment><USER6> I've even registered in this project because I thought it would be literally "Pinterest for code".

I'm sorta GitHub star hoarder, have starred 1.9K repos at the moment. I use that to track libraries I'm interested in (and their counterparts in other languages, for inspiration), projects addressing the same niche as the ones I'm working on... GitHub star-search is good, but can be made even better. And also some projects I don't want to forget about are not on GitHub — and I'd prefer to have a single place to store all those in a searchable fashion.

Such project I would use on a daily basis (or I'll have to write one at some point in future).

<comment><USER7> [http://astralapp.com/](http://astralapp.com/)

<comment><USER6> Wow, that's ⅔ of what I want!

Are you affiliated with the project somehow?

</comment></comment></comment></comment><comment><USER8> "a place for developers to collect and share open source projects made with code." \- If you are looking for this, I'd recommend giving a try to LibHunt [https://www.libhunt.com/](https://www.libhunt.com/)

Disclaimer, I'm the creator of LibHunt :)

<comment><USER9> Looks fantastic! Why didn't you tell me before?

(Oh, and a minor typo on the front page I think: "Learn more from our _parnter_.")

<comment><USER8> Thanks a lot, mate! Fixed!

Well, I've submitted it already to HN. However, it just sinked, as it happens from time to time :)

</comment></comment></comment><comment><USER10> Seems more like "Pinterest for Arduino and Pi enthusiasts", to me. You say "For Programmers" and I expect something a little less hardware-y, despite the obvious overlap in interests and the programming aspect to the hardware.

</comment><comment><USER11> It seems quite inconvenient to use.

One of the posts is just a raspberri pi picture. You have to go to the "source" to get what it's actually about. The whole idea of pinterest and co is that you can browse lots of content just by swiping, not by having to click through on each one.

Maybe add a link to the source on the Cards themselves, saving a useless page load, or expand inline somehow?

<comment><USER12> Agreed, I would expect to go straight to the source upon clicking on a card. However I do like the idea just some UX improvements could make this site.

<comment><AUTHOR> Any other UX improvements you would like to see?

</comment></comment></comment><comment><USER13> As someone who develops in PHP, and continues to be generally annoyed by the way many HN commenters will dismiss the language out of hand, I really hate to be the one saying this.

However, while PHP has come a long way and modernised significantly in terms of development practise, WordPress is really not an example of that modernisation. It may have applications for a basic blog, but I find it very difficult to take a Wordpress-built project seriously when it's supposedly aimed at developers and includes auth/signup + handling user credentials.

<comment><USER14> Agreed with everything except the last sentence, which I do not understand. Why shouldn't WordPress include authorization and signup? Are there higher quality PHP facilities for it or what?

<comment><USER13> Using WordPress for a simple read-only blog is OK: security is not as major a concern.

Once you're taking signups, the quality and security record of the underlying software is worth considering more carefully, and I just personally would not choose WordPress where those are requirements.

<comment><USER14> Auth code looks ok to me but I am not a PHP expert. Could find no major recent breaches--am I missing something? (Not being snarky, just trying to understand the issue.)

<comment><USER13> WordPress the app is inherently unsecure in many ways. A full overview would be lengthy, but an obvious example is the general architectural reliance on self-modifying code, which requires write access to executable files on your server (this can be disabled with some difficulty, but this makes updates difficult and completely breaks many popular plugins. Doing so is not encouraged or really properly supported by WP devs). This isn't the only problem, but it's a large enough one, and most importantly, it's by design.

Auth code might look OKish (haven't looked closely recently), but any general vulnerability in any part of the app as a whole or in any 3rd-party plugins potentially opens you up to data breaches.

</comment></comment></comment></comment></comment><comment><USER15> If I can read content without login, that's a very poor pinterest clone ;)

</comment><comment><USER16> Isn't the whole idea of Pinterest that you can just make this with Pinterest itself ?

</comment><comment><USER17> The general idea is pretty cool. The main question is probably what the images should link to and what images to use for contributions that don't have a dedicated page (just github). I think the default link should be to the code but links to videos or overview pages are also fine.

I think the idea is generally a good one, people can post cool stuff they work on and it can even be a good source of inspiration for non-programmers or people only loosely interested (I'm thinking of journalists, teachers, parents and curious youngsters answering the question "what cool stuff can be done with technology"). Could also have some job market/finding employees implications (maybe a possible monetization route?).

</comment><comment><USER18> Just a heads up that Google has a large learn to code campaign called "Made with Code" – it's the first thing I thought of when I saw this project.

[https://www.madewithcode.com/](https://www.madewithcode.com/)

</comment><comment><USER19> Also known as GitHub

<comment><USER20> I actually got excited when I saw this, I thought about like minded people on github pinning stuff, and being able to find projects that like minded people pinned. This doesn't seem to be that though.

This seems to be much more like instructables, but without original content.

libhunt (from the comment above) is closer, so looks like I found something cool today.

</comment></comment><comment><USER21> Put up a project, was there for a couple hours then the project was some how deleted. You may have a vulnerability somewhere.

</comment><comment><USER22> When submitting a new link, I receive "Sorry, Unable to find any pinnable items" \- what counts as a pinnable item?

<comment><AUTHOR> Sounds like it couldn't find an image. Working on a fix for that now.

</comment></comment><comment><USER23> I can't make heads or tails of this thing. And I don't know what the heck is Pinterest, so I can't compare.

</comment><comment><USER24> Maybe add an option to view content with standard pagination?

<comment><AUTHOR> You don't like the endless scroll?

<comment><USER24> No.

</comment></comment></comment><comment><USER25> I read "Projects made with Coke".

</comment><comment><USER26> ... er, Instructables?</comment>


YC self-venture fund - <AUTHOR>

Given the recent post (http://news.ycombinator.com/item?id=1714377) about possible collusion and price fixing between Angel Investors, I was wondering if YC startups could begin providing their own alternatives.
P2P Loans are getting much more popular, which makes me wonder if we even need Angel Investors anymore. Are they still helping the process? I know that almost every YC start up, I would have been willing to invest in. I have like $10,000 sitting in my bank account, because I have no clue what to do with it. I'm sure I'm not the only one on HN with money who could invest in one of these great companies that comes through YC.
I'm suggesting a P2P Investment fund specifically for YC start ups. Sort of a DIY invest-in-us for the YC start ups as an alternate means of funding. I'm sure it could make a great YC project itself. <comment><USER3> It's a great idea - grass-roots investment is very appealing - <USER2> unfortunately I think the main thing that angels bring is not money but contacts and experience.

This might work with YC-alumni, though they probably they probably don't have enough contacts/experience yet... but they definitely have quite a bit already, and it's growing, and will only continue to grow.

In fact, far from being a result of this meeting, this growing power is one of the causes of it (as noted in the article.)

<comment><AUTHOR> YC is an experience mill as of itself. It's only going to be so long before it hits a sort of critical mass that the angels won't be bringing in more contacts or experience than YC is already self-networking to its start ups through the virtue of being YC.

</comment></comment><comment><USER4> Its an interesting idea. I'm curious how the legal side of things would actually work. If I find a company I want to invest in and only want to do $1k, do I get stock? Does everything pool together under a single person and some legal agreements split any profit made in the future or something?

If no stock/ownership is involved then isnt it more of a donation? There are plenty of sites for that.

<comment><AUTHOR> One way to do it would be as a straight loan service to startups. I know here in Canada you have to register as an accredited investor to loan money legally (as far as I've always been told at least), which has quite ludicrous requirements for small P2P loans.

Another way would probably be for the start up to offer to sell X-percent of their company to the investment fund for a certain price. This is then broken down into shares, and individuals can buy these shares for an equivalent fraction of the offered price.

There is a third way, but I'm unsure if the start up would want it. A continual investment (IE I could put in $1,000 every month into the company for 3 years and end up with $36,000 invested) option, where people invest however much they want when they want. However, I'm unsure what this would mean for ownership of the company. I know many judges would view this as "the founders invested $50,000 into the company, but the investors put in $100,000, so the investors own 2/3 of the company", because this is how ownership is decided in most small businesses. I don't know enough about how stock options work in small business for the investments this way; I'd love to hear from someone much more knowledgeable than myself on all this, which is why I posted the suggestion.

<comment><USER5> _I know here in Canada you have to register as an accredited investor to loan money legally (as far as I've always been told at least), which has quite ludicrous requirements for small P2P loans._

You only need to be an accredited investor if you don't qualify under other rules. Lending money to a relative? No problem. Lending money to a friend you've known since high school? No problem. Lending money to a company you're working for? No problem. Lending money to a company which provides you with a detailed prospectus? Go right ahead.

Lending money to a complete stranger who hasn't provided you with full disclosure of his financial status and you don't have enough money to qualify as an accredited investor? That's when the rules stop you... and that's exactly the sort of situation which should be disallowed, because there's no way for you to not be the victim of a scam.

</comment></comment></comment><comment><USER6> I've always been interested in the thought of a Kickstarter, but for commercial projects. In exchange for $, you get back %. Always thought the legals would be much too difficult though, as it's basically a stock market.

<comment><USER7> You are correct.

As soon as you offer equity (in any form, disguised or otherwise), on a website, you have just made a public offering. The SEC has some strong opinions on how this should and should not be done, it tends to involve large legal and accounting fees.

</comment></comment><comment><USER8> I don't think the money is the bigger issue here, that could be found. The components that you'd need on top of that would be a screening process that would bring out the kind of companies that YC does invest in and people like Paul and others to help the start-ups go from 0 to 100.

The latter will be your real bottle-neck, likely there are plenty of people that would be willing to pony up a similar amount of dough, but hardly any of them could dedicate the time (and might not have the expertise) required to really make a go of it.</comment>


NATO is expected to declare space as a "warfighting domain" - <AUTHOR> https://phys.org/news/2019-10-space-war-zone.html <comment><USER2> That would be really great. _If_ Nato had anything to get their forces _into_ space, that is.</comment>


Show HN: wat2do – A map of rad things to do in San Francisco - <AUTHOR> http://www.sfwat2do.com <comment><AUTHOR> This is my final project that I built for General Assembly's Web Development Immersive program. The first iteration was really well-received and helped me build out the specs for this version. Comments/feedback/suggestions are welcome and encouraged.

Also, since I just graduated, I'm on the prowl for a junior web development position that'll help me hone my skills as a developer further. Must have awesome problems to solve :)

</comment><comment><USER2> This is pretty sweet. Really clean look and feel, and very responsive.

When I find something I like is there a way to add it to my calendar? Something like this: [https://support.google.com/calendar/answer/1186917?hl=en#ind...](https://support.google.com/calendar/answer/1186917?hl=en#individual) Then I can not only remember, but also invite friends to the event.

<comment><AUTHOR> Thank you! That's an awesome suggestion! I'll be adding it to the roadmap. Thanks :D</comment></comment>


The OS Armageddon Is Coming – John C. Dvorak - <AUTHOR> https://www.pcmag.com/commentary/361465/the-os-armageddon-is-coming <comment><USER2> It's amazing what windows users put up with. Why don't they switch to mac? It's even easier to use than windows.</comment>


Who Should Redesign? - <AUTHOR> http://www.shouldredesign.com

<comment><USER2> That site is utterly brilliant. Isn't that Firefox icon beside the website name a bit random, though?</comment>


Coding in color: How to make syntax highlighting more useful - <AUTHOR> https://medium.com/p/3a6db2743a1e

<comment><USER2> I'm not sure the proposed highlighting scheme is any good. To my aging eyes, the riot of colors just confuses things. But I also type ":syntax off" in vim many times a day.

At least one paper exists that says color and font in text editors makes a difference: Rick Kazman and Riston Tapp, "Determining the Usefulness of Colour and Fonts in a Programming Task", from: Proceedings of the 3rd Workshop on Program Comprehension, (Washington, DC), November 1994, pp. 154-161.

You can find that at: [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.48....](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.48.633&rep=rep1&type=pdf)</comment>


Announcing Weave Scope 'Cloud': hosted Docker visualisation early access program - <AUTHOR> http://blog.weave.works/2015/10/08/weave-the-fastest-path-to-docker-on-amazon-ec2-container-service/ <comment><USER2> Sweet!</comment>


The Facebook Phone - <AUTHOR> http://www.wired.com/reviews/product/inq_review <comment><USER2> "Yes I know what you're thinking: Facebook is so completely over. It's yesterday's news. It's irrelevant. It's expired."

You know, I was actually thinking that about Twitter. Twitter has jumped the shark. Facebook has jumped the chasm.

<comment><USER3> "Jumped the chasm" meaning "made it over safely?" I don't know if I've seen anything recently claiming decline in Facebook.

I think Twitter seems to be hitting a sort of limit. It's not picking up new people quickly, at least within my observable network. On the other hand, it's gaining a lot of older users. Most of my extended family is now on Facebook, aunts and uncles and grandparents included.

<comment><USER2> "Crossing the Chasm" is a popular book in Silicon valley, and basically refers to making the leap from early adopters to a mainstream audience - it's clear that facebook is there, and benefiting a lot from it. And twitter isn't there quite yet. They are stuck in the chasm, which I referred to as "jumping the shark," suddenly verging on not being cool, but with no real mainstream audience awaiting them.

<comment><USER3> Gotcha. Thanks for explaining!</comment></comment></comment></comment>


Announcing 50% Lower Gear Prices, More Countries, & 2GB Gears in the Silver Plan - <AUTHOR> https://www.openshift.com/blogs/announcing-50-lower-gear-prices-more-countries-and-2gb-gears-in-the-silver-plan

<comment><USER2> Finally in Eastern Europe too! Is the support also out of US office hours?

</comment><comment><USER3> This is just an amazing site with the xkcd Cloud -> Butt extension. I know this isn't HN appropriate, but it really is quite remarkable.

<comment><USER4> Not really.

# curl -s [https://www.openshift.com/blogs/announcing-50-lower-gear- pri...](https://www.openshift.com/blogs/announcing-50-lower-gear-prices-more- countries-and-2gb-gears-in-the-silver-plan|grep) -ci cloud

0

<comment><USER3> Oh Hacker News... In Literal Interpretation and Humorless Wit we trust.

(the front page of openshift is better)</comment></comment></comment>


Apple fires iPhone X engineer after daughter's hands-on video goes viral - <AUTHOR> https://www.theverge.com/2017/10/28/16565110/apple-engineer-iphone-x-youtube-video? <comment><USER2> Wow! Even after only four years he seemed like a veteran at Apple working on some pretty important systems. With his chops though he should be ok. Likely got scooped up by Google or something.</comment>


Joojoo tablet now in production, will support full Flash at launch - <AUTHOR> http://www.engadget.com/2010/02/03/joojoo-tablet-now-in-production-will-support-full-flash-at-laun/ <comment><USER2> <https://thejoojoo.com/> still shows the tablet with a blue-hue... wonder why they can't get a better shot.

</comment><comment><USER3> the joojoo ODM, CSL from Malaysia, are the guys who create the fake blackberry devices that have littered Asia in the past few years.

[http://www.cslcare.com/index.php/products/mobile- phone/blueb...](http://www.cslcare.com/index.php/products/mobile- phone/blueberry-series/item/102-blueberry-a-9500)

One rip-off merchant partners with another, match made in heaven.

</comment><comment><USER4> Support of a positive user experience seems unlikely.</comment>


Meet Piper: your first bitcoin paper wallet printer - <AUTHOR> http://www.techendo.co/posts/meet-piper-your-first-bitcoin-paper-wallet-printer

<comment><USER2> Thermal paper is by far the last medium I want to store a wallet on...

<comment><AUTHOR> I wonder why the creators chose this. Does it allow for a smaller footprint?

<comment><USER2> Yes, the thermal printing mechanism is very simple. You need a printing head, which you can get as pre-build module, and you need a mechanism to feed the paper.

Alternatives are for example thermal transfer printing method, where you have a roll of paper and a roll of ink on a film that gets transfered over to the paper on the areas that are heated. Technically this is more complex, but on a product like this, they saved on thew wrong end by using thermal paper.

<comment><USER3> Couldn't be a printer with same footprint be build with laser printing? If you keep the resolution low and got the time and money for the research, It should be possible I think.

</comment></comment></comment></comment><comment><USER4> Could this be useful transfers arranged through a service like [https://localbitcoins.com/](https://localbitcoins.com/) ??

</comment><comment><USER5> That'd be my second: [http://www.ollydbg.de/Paperbak/index.html](http://www.ollydbg.de/Paperbak/index.html)</comment>


Paren-free - <AUTHOR> http://brendaneich.com/2010/11/paren-free/

<comment><USER2> As a programmer whose Blub language is Python, I always feel a bit guilty when I try and squeeze an understanding of JavaScript into my Python-based mental framework. It makes me feel a lot better to see even the creator of JavaScript quoting the Zen of Python.</comment>


Worst economic crisis since 1930s depression, IMF says - <AUTHOR> https://www.bbc.co.uk/news/business-52236936 <comment><USER2> At what point does fallout from trying to avoid covid-19 deaths cause more deaths than covid-19. We're talking domestic violence, starvation abroad (due to local hoarding, which has begun), and actual crop failure (due to a shortage of transient labor). There's also suicide, depression, etc.

I'm not even saying let up on all the social distancing measures. I think social distancing measures are good, but perhaps over the top. Nowhere have I seen a discussion of where to stop with the measures because of diminishing returns and increasingly negative economic (and indirect human life loss) impact.

<comment><USER3> If you assume a mortality rate of 1% (which is probably in the ballpark) then you can expect 75 million deaths without intervention. So far world-wide we've had about 95,000 deaths. So doing nothing would result in about 700 times as many deaths as have occurred so far. I'd say it's probably to soon to throw in the towel.

<comment><USER4> No, because it's unlikely that 100% of the population will get infected. What disease has ever infected 100% of the population? None. Diseases hit an inflection point in spread, before they fall off. At any rate, how many people died in the wake of the Great Depression? World War 2 was indirectly caused by it. We lost 85 million people when the population was only 2 billion. And that's not even counting the people that died in the subsequent decades when communism took over China and Mao and Stalin had their reign of terror.

<comment><USER5> > What disease has ever infected 100% of the population?

Most people are infected with some form of Herpes virus AIUI, from Chickenpox to Cold Sores, it's _very_ common.

</comment></comment></comment></comment><comment><USER6> And yet the stock market is already recovering. I guess "worst crisis since Great Depression" has been priced in?

<comment><USER7> The increase we've seen in the last two weeks make zero sense to me. It's almost making me lose trust in the market as I feel like it's rigged. We're in a complete state of unknown, nobody knows when this will be over, unemployment raises like crazy, the US now realizes that coronavirus is hitting them the hardest...

<comment><USER8> The increase in the last two weeks is because it's becoming obvious that:

1) The US's response to this was competent.

2) The measures put in place are working.

3) The projections are improving _substantially_.

4) The time horizon is shrinking.

5) We are starting to understand how to treat this.

(+ "in the us").

Two weeks ago we were looking at places like Italy, and extrapolating that the US could see deaths in the _millions_. A week ago that projection went down to 100-200k, and yesterday it went down to 60k. _Obviously_ that is still a massive catastrophe, but it's nowhere near the catastrophe we were fearing two weeks ago.

Additionally, the writing is on the wall that manufacturing is going to be moving away from China as much as possible in the near future. Much of that, for American companies at least, is going to come back to the US, probably at the hands of massive tariffs.

That's all good news for the US economy.

>US realizes the coronavirus is hitting them the hardest.

Where did you hear this? It is absolutely not true.

<comment><USER9> The US's response could not be described as anything even approaching competent. This is still just getting started.

Let's check back in a few months and see how this comment has aged...

<comment><USER8> What should the US have done that other countries are doing?

We closed travel early, we started closing businesses early, and we hold daily press conferences with multiple medical and financial experts that are directly informing the entire population of what measures they should be taking.

edit: it seems like the general response to "what should we have done" is "the _federal government_ should have shut down travel/businesses nationwide".

Is that even legal for the federal government to do? I know that when Trump floated the idea of travel restrictions for NY, Cuomo called it an act of war ([https://www.cnn.com/2020/03/28/politics/cuomo-ny- quarantine-...](https://www.cnn.com/2020/03/28/politics/cuomo-ny-quarantine- cnntv/index.html)).

<comment><USER10> The federal government should have enacted stay at home measures.

By leaving it up to the states, it's been bungled and the covid outbreak is lasting longer and killing more people. This leads to stay at home needing extensions and a further drain on the economy.

<comment><USER11> The Federal government does not have the authority, it is expressly prohibited. What you think "should" have happened is literally impossible without dissolution of the US government. This is not remotely controversial, the Supreme Court has visited this many times. States are sovereign and autonomous entities for this purpose, same as for most things.

A surprisingly small number of Americans have any understanding of the structure of our government, a glaring failure of our education systems. It is no wonder that foreigners have so many misconceptions about the nature of US government given how few Americans understand it.

<comment><USER12> Germany also has a strict Federal structure, but they managed. They called a meeting of all the state governments, together with the Federal government, and agreed on a set of procedures. Each state does things a bit differently, but they're largely on the same page now.

Why wasn't anything like this attempted in the US?

<comment><USER11> The US Federal government is similar to the EU; member States have considerable amounts of absolute sovereignty, their own forms of government, and their own legal systems. Importantly, the Federal government cannot operate in a State except with consent of the State, which is withheld in numerous instances. The Federal government works for the States, not the other way around, and the States are free to ignore requests by the Federal government on most matters. Why wasn't the response coordinated across the EU? Same answer applies to the US. It would be like herding cats. The Federal government can ask nicely but no one is required to listen

Externally, the US presents a common negotiating front. Internally, it is 50+ separate countries. Americans interact almost exclusively with their State governments when in the country, not the Federal government. This explains, for example, why there is no "national" ID in the US. Americans are citizens of their States, first and foremost, and each State has their own independent ID systems. What makes the US somewhat unique is that Americans have an absolute right to change their citizenship among the member States at any time. There was a time not that long ago when many Americans more closely identified with their State citizenship than their Federal citizenship.

<comment><USER12> The EU is not at all comparable to the United States. The US is most certainly not composed of 50 sovereign countries, and the US has a powerful central government - something the EU almost entirely lacks.

A much better comparison is the Federal Republic of Germany, which has a strongly federal constitution, much like the United States. The Federal government in Germany has very little formal ability to impose quarantine measures on the states, but it effectively managed to do so. The Federal government called a meeting with all of the state governments, which are individually run by different, competing political parties, and managed to have all the states agree to take a similar set of measures.

The Federal government in the United States could have done the same, but chose not to. The political reason for that inaction is clear. The President's #1 priority is the economy and, specifically, the stock market. He doesn't like the idea of quarantine measures, because of their impact on the economy. He spent two months downplaying the virus, and has now shifted to blaming the WHO for his own government's failure to contain the outbreak.

> There was a time not that long ago when many Americans more closely > identified with their State citizenship than their Federal citizenship.

That time was over 150 years ago.

<comment><USER11> That is a strange but understandable misunderstanding of the relationship between the Federal government and the States in the US, it is not remotely like Germany. German states are much weaker both in theory and practice. The Federal government often cannot intervene unless the States ask them to, and the States control the terms of that intervention. People raise this issue in every major natural disaster under every administration, baffled why the Federal government doesn't do more, oblivious to the legal and practical structure of the US government. In my own lifetime there have been many cases where States actively restrict Federal operations within their jurisdiction, with full support of the Federal courts.

By convention, the States typically allow the Federal government to operate freely within their jurisdiction, but it is not an obligation as it is strictly at the pleasure of the State. When there are strong disagreements between the Federal and State governments, this is a major point of leverage. Many Federal programs have been successfully killed by States prohibiting Federal operation in their States.

<comment><USER12> I'm very familiar with the constitutions of both the United States and Germany. From what you're saying, I strongly suspect that you're only familiar with one of them.

The German Federal government is highly constrained in what it can do in many areas of life, because those areas are under the control of the states. This is why there are 16 different high-school diplomas (Abitur) in Germany, for example.

Formally, there is a strong division of powers and responsibilities between the federal and state level in both countries. But in both countries, the Federal government wields a great deal of informal power. The Federal government has access to much greater financial resources, which it can wield to coerce states. My personal view is that this Federal power is even greater in the US than in Germany, due to the enormous political power of the President and the greater financial power of the US government (Germany has to deal with the ECB, while as Trump has shown, the President can directly bully the Federal Reserve).

If Trump had made strong statements about the need to impose quarantine measures early on, that would have had a big effect. There are many instruments at his disposal that he could have used to coerce recalcitrant state governments with. Instead, he downplayed the virus until mid-March, and has continually argued against the shutdown (see his Twitter thread). In Germany, Merkel met with the state governments, they agreed on a set of common measures, and she gave a televised address explaining those measures. She's been pretty consistent in her messaging, unlike Trump. Maybe that's because she's a physicist, and he's a real-estate mogul, or maybe it says something about what plays well in each country.

<comment><USER11> I was born a citizen of both Germany and the US and have worked in both countries. Using Germany as your exemplar was to your disadvantage. I have also worked internationally for the UN, and with multiple major governments at a high level. I am under few illusions.

That aside, you did not actually provide evidence contrary to my assertion.

<comment><USER12> You vastly understate the power of the US Federal government when you compare it to the EU, and understate the power of German states. I don't know what you mean by "evidence" here. We're not discussing some sort of experimental result. We're discussing the basics of the American and German constitutions.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER13> Ok, but how noteworthy is this really? I mean, what do people expect to happen when 90% of the human race stops going to work for multiple months? And in the US, the government has incentivized small businesses to furlough employees so they can collect unemployment benefits. I realize that was not Mnuchin's intention, but it seems to be widespread in the service industry, for example. Because of this, unemployment data is unfortunately meaningless for the time being.

I'm optimistic we'll see this elusive "V shaped recovery." But we won't have a clear picture of what this recession really looks like until people are allowed back to work and we can see what the unemployment numbers revert to.

That said, I'm also worried about downstream effects like changed habits after quarantine, and avoidance of activities like going out to dinner.

</comment><comment><USER14> And the market in the US went up today.

Are people in denial, algos are driving this, or something else?

<comment><USER15> It's not all bad news out there. Didier Raoult was reporting today the results of testing anyone who turns up and treating with hydroxychloroquine and z-pak. Looks like 0.5% mortality mostly in the over 80s, and the infection rates for Marseille as a whole coming down I think from 350 cases a day to 100 or so, the ICU emptying. I know people are saying it's all unproven but at some point they'll probably say oh look it actually works, kinda.

</comment></comment><comment><USER16> 'Market learned to smooth out crises, because so many happened' is now least true than ever.

<comment><USER17> Let's check how non-capitalistic countries do after the crisis, for good measure.

<comment><USER18> Please don't take HN threads further in a generic ideological direction. That leads to the night in which all cows are black and all threads the same.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

</comment></comment></comment><comment><USER19> How a pandemic of this nature was not planned for, war gamed, and drilled until we could gain SOME intuition as to the optimal actions and effects countries should take to avoid economic meltdown while doing the vulnerable population right is beyond me. The U.N. was created to promulgate this kind of cooperation, and here it has utterly failed.

<comment><USER20> The UN was created so countries like the US and USSR could have a forum to talk with each other and avoid nuking the entire world. How well do you think the UN would have helped those two cold war superpowers coordinate on a global pandemic? What you're looking for is a world government, not an international forum.

<comment><USER19> One would surmise that when such a forum exists, it should be utilized to plan for global events that affect every country, regardless of what the original intentions were of setting it up.

<comment><USER20> That assumes the countries of the world have enough common understanding and respect for each other to actually create and execute such a plan. They don't.

<comment><USER19> One of the great things about HN is that ideas are put forth and discussed on how much better the world could be, not simply state how terrible it is.

</comment></comment></comment></comment></comment><comment><USER21> I predicted this 2 weeks ago; [https://news.ycombinator.com/item?id=22699657](https://news.ycombinator.com/item?id=22699657)

Addendum; With the Fed printing money like there is no tomorrow the US dollar could lose reserve currency status and if that happens then it will make the '29 crash look like a cake walk. Overnight the US standard of living will drop 20-30% and slowly grind even lower over the next decade.

Silver lining? It will finally put an end to the parasitic Military Industrial Complex and endless "regime change wars" (as Tulsi Gabbert would say) but also end the welfare state overnight. There will no longer be Magic Monetary Theory money to fight over for either political party.

Losing reserve currency status is not a fait accompli at this point so watch the dollar/bond market and price of gold as this will tell the tale. Because there is no real alternative to the dollar at this point, they could still pull a rabbit out of their hat and save the system. Beware that your precious 401K/IRA money is not your money and is the only pile of cash that the politicians can use to slow a dollar sell off. Look for bank bail-ins and mandatory 401K/IRA purchases of US Bonds as cover for Fed bond buying.</comment>


Mad Men's Don Draper Pitches Facebook's Timeline - <AUTHOR> http://marketaire.com/2011/09/29/mad-mens-don-draper-pitches-facebooks-timeline/

<comment><USER2> I think this is exactly the mentality that Facebook was thinking about when they decided that this functionality may actually strike a chord with users. I, for one, can remember fond times where I've scrolled back in my news feed to 2009, 2008, 2007, and been struck by all that which I forgot. I still consider myself a kid, but even just for college students, nostalgia is a powerful ally.</comment>


From Asylum Seeker to Fields Medal Winner at Cambridge - <AUTHOR> https://www.thetimes.co.uk/article/caucher-birkar-from-asylum-seeker-to-fields-medal-winner-at-cambridge-xrz5t7ktj <comment><USER2> Just think -- there's people like Caucher Birkar the world over, especially in places that might not fully recognize the talent and drive. Without access to higher education, and the connections attached, talented individuals will have a very hard time realizing their full potential.

Developed countries around the world should be tripping over themselves to offer asylum, motivated not only by humanitarian concerns but by considering asylum as an investment in the brainpower of a nation.

<comment><USER3> There are thousands of Einsteins or Thomas Edisons that were never born because someone had a headache that evening. Should countries be tripping over themselves to encourage more babies? Is there some reason that you think an asylum seeker is more likely to be a Fields Medal Winner then a regular citizen? What about the country these people come from do you think we should strip theses countries of their brain power? Do you support regime change wars if the powers that be give you a good story about wanting "freedom" for there people while taking action that will likely kill maybe a hundred thousand people?

Say a small city has about 50 new job opening per year at there current growth rate and already has about 100 people looking for work. Do you believe, because your intentions and character are good and you mean well that somehow a magic fairy is going to come down and create more jobs just because more people show up? Do believe in type of job theory where if the wealthy are allowed to keep wages low, because of competition, that we all will be better off in the long run because of some "trickle down theory of labor"?

<comment><USER4> Those people that show up will require goods and services. The economy will act to meet that demand if it is not restrained from doing so. So yes, in broad strokes, if more people show up, more work will need doing and more jobs will be created. No magic fairy required.

</comment></comment></comment><comment><USER5> Another article on the same topic without paywall: [https://www.quantamagazine.org/caucher-birkar-who-fled- war-a...](https://www.quantamagazine.org/caucher-birkar-who-fled-war-and- found-asylum-wins-fields-medal-20180801/)

</comment><comment><USER6> There were other asylum seekers who won Fields Medals.

For example Klaus Roth and Alexander Grothendieck

[https://en.wikipedia.org/wiki/Alexander_Grothendieck](https://en.wikipedia.org/wiki/Alexander_Grothendieck)

[https://en.wikipedia.org/wiki/Klaus_Roth](https://en.wikipedia.org/wiki/Klaus_Roth)

</comment><comment><USER7> How does Iran consistently produce so many great mathematicians? Few years there was Maryam Mirzakhani too.

</comment><comment><USER8> I understand that there is an HN rule against complaining about paywalls, but I think it would be helpful for everyone as a general practice, if somebody posts a paywall article, the first comment on it should be from the poster with a link to the full article text or a tool to bypass it.

<comment><USER9> I think that neither of those would constitute fair use, in the copyright conventions most of us are under.

I like what happened on this post: someone posted a link to a non-paywall article on the same topic.

<comment><USER10> Agreed. If you're allergic to paywalls the last thing you want to do is drive traffic towards them

<comment><USER11> I'm curious about your opposition to paywalls. With journalists losing their jobs, and quality newspapers closing, what would your ideal means of both reading these stories, and funding the production of them, look like?

<comment><USER10> >I'm curious about your opposition to paywalls.

It creates walled gardens & excludes the poor.

e.g. Some poor kid in Kenya googles info that could have life changing impact...and hits a paywall that demands more than he earns in a year.

The internet became great exactly because it's the wild west where crazy things like community driven wikipedia thrive.

It's not that I oppose the whole pay for quality directly (family members are journalists)...but rather that the internet has become a bit of a core pillar of human knowledge & we really can't afford that to end in a maze of corporate walled gardens - it'll crush the thing that makes it great.

>what would your ideal means of both reading these stories,

The internet was fine before paywalls - in fact it grew & thrived. The whole you have to pay or there is no quality content seems quite false to me.

<comment><USER12> >excludes the poor

This isn't how it works though. I was in India recently and i found that NYT or WSJ didn't have the 10 article limit that I'm usually accustomed to seeing.

>the internet was fine before paywalls

That is because people used to pay for quality content and the internet was just a medium to get more exposure. Now since the internet has matured and there is an abundance of information available for free, people have stopped paying for quality content.

</comment></comment></comment></comment></comment></comment><comment><USER13> Paywall and outline does not work.</comment>


The reason I won't back your KickStarter… even though I love it. - <AUTHOR> http://chad.ill.ac/post/47093146557/the-reason-i-wont-back-your-kickstarter-even-though

<comment><USER2> So now I'm thinking - is the solution to support multiple options or to own all pieces of functionality?

<comment><AUTHOR> I'm honestly not sure I can answer that. I could argue either direction. I think it boils down to how important the functionality is to your application. It seems like risky business to rely on a single third party for mission critical components of your operation. Also the assumption that ALL users you'll encounter will have an Amazon account is... optimistic. At least a payment service like PayPal offers a login or a blind CC processing option using the cards details. This lowers the bar, I've had a PayPal account for almost 10 years, I've processed multiple payments with it PayPal. In the past 4 years I haven't logged into my account to do so, I'll type in my actual card information rather than deal with remembering my password, recovering my password, updating my stored card information, etc.

</comment></comment><comment><USER3> So why don't you just sign up with a different email like Amazon suggests in their email?

<comment><AUTHOR> Well for one, I shouldn't need to. My account is healthy and in good standing across every other line of Amazon products. The ONLY service I use it for is currently KickStarter. To top it all off, I really don't care all that much. I just threw this post together after thinking about what adopting third party services for core features of my own future products and what unseen pitfalls that might entail.</comment></comment>