What motivate you to do a live streaming to the public? - <AUTHOR>

Now a day the live streaming through smart phone is booming due to the appearance of Meerkat and periscope. BUT, what's the user case? In Germany, no one gives a damn about live streaming stuff at the individual level.<p>What do you think? <comment><USER2> I do not stream myself. I do enjoy watching these types of streams. Mostly on stre.am, not meerkat or periscope, stre.am has a better community than those guys. I watch because of the interesting glimpses at people with interesting lives. I avoid the streams of someone at the bar having a drink with friends or the ones of someone grocery shopping, but instead really enjoy the more fascinating streams. for example recently i watched a guy stream his first time landing a plane. I found that quite fun to watch.

<comment><AUTHOR> Thanks for the inputs, mate! I use stre.am as well.

</comment></comment><comment><USER3> I doubt very many people on HN care about broadcasting themselves to the public using things like Meerkat and Periscope either. Maybe as a consumer it could be interesting if people are showing things other than the crap they already show on Vine/Instagram (lame comedy, butt workouts, etc.).

I know Meerket recently pitched itself as a way to share interesting events (St. Patrick's Day in Dublin, The Running of the Bulls in Madrid, etc.) but what they think people are using it for and what people are using it for in reality seem pretty far apart at this point.

<comment><AUTHOR> Thanks for your inputs, really appreciated it :)

I think so, there are more and more crappy videos, but the thing is, Meerkat and Periscope are used by very influential people in the tech industry, which probably one of the reasons why more and more people is using it and the teams also raise a lot of cash to continue with the business development.

Let's see how these will go, probably going to be huge ;)

</comment></comment><comment><USER4> > Now a day the live streaming through smart phone is booming due to the > appearance of Meerkat and periscope.

No it's not :p

<comment><AUTHOR> Tell us more, I may be wrong ;)</comment></comment>


Summary of Golang Generics Discussion - <AUTHOR> https://docs.google.com/document/d/1vrAy9gMpMoS3uaVphB32uVXX4pi-HnNjkMEgyAHX4N4/edit# <comment><USER2> > _As with any feature it should solve a set of problems, if the problem isn't > solved in the best way possible by the feature then it's either not a good > feature or of very limited value._

This is disingenuous -- just to set an artificial barrier against generics.

Go doesn't solve any problem in the "best way possible":

\- "Blessed" containers like Go's hash tables are not "the best way possible".

\- The way it handles goroutines/channels has issues (mutability/pointer issues, not pre-emptive, etc). Again, far from "the best way possible" (that would be Erlang maybe).

\- The GC was far from the "best way possible" or even "really good". Especially on the earlier versions (and crap on 32-bit).

\- Losing type checks by having to use interface{} for generality, or resolving to BS textually generated code with custom string templating is not "the best way possible".

So why only Generics has to be "perfect or bust"?

And then there's this gem, about the (lack of) need for generic data structures:

> _map /slice suffice for most of the cases encountered in programming._

...

Or this "con", about having generic to help with functional fold/zip/map:

> _The fastest solution needs to take into account when and which order to > apply those transformations, and how much data is generated at each step_

So, in other cases the hit from interface{} is OK, but suddenly now those operations have to be "the fastest solution".

(Not to mention that the fastest solution, application order etc are orthogonal to Generics).

<comment><USER3> Thanks, didn't intend for it to end up on HackerNews - at least not yet. It's still the first draft, most of it I wrote up in ~2hours. I mentioned on the forum that this document (currently) is highly biased towards my views, this is unfortunate, but this can only be fixed after numerous reviews.

Thanks for pointing out the problems with wording. I'm slowly fixing those. I've changed that "best" to "As with any feature it should solve a set of problems, if there are better ways of solving the problems, those should be used instead."... it's better but not perfect.

"in other cases the hit from interface{}" \- added that addition to the alternatives section.

Generics don't have to be perfect, but it must be actually useful and it mustn't compromise simplicity of Go.

<comment><USER4> It doesn't mention the major inconsistencies in golang at all.

Go has generics. For arrays, slices, channels, maps, and some "standard" library functions. Go has generic functions. "append" being the obvious example. Go has polymorphic functions : append, make, ... If you look at the compiler source, the type system has generics, to a large extent. It's simply not accessible to normal programmers, instead only allowed for golang's authors.

As if this is not bad enough. Go cheats the type system in thoroughly non- obvious ways to get more C-like behaviours that obviously do not improve safety or programmer productivity.

Go has _shudder_ return value polymorphic functions. Range being the obvious, but not only example (range changes in meaning depending on it's parameters AND on what you assign the result to).

As for your boxing argument. As soon as you use reflect, you're boxing everything. Oh wait, if you use a package that uses reflect, of course you're also boxing everything. Surely that can't be much ... hmmm half the standard library uses reflect. Fmt, everything in encoding, text or html templates, rpc, jsonrpc ... No need for boxing, or compile-time function evaluation or generics (all present better solutions to this, for the CTFE solution see D-lang).

Golang even has functions with type parameters. Make and new being the obvious examples. Again, this is present in the type system (not just there, also in reflect, things like printf, ...). It's simply not made accessible to us lowly go programmers.

So can we please stop with the crap that generics aren't necessary ? That nobody uses advanced type system features ? Or that polymorphism isn't necessary ? It's crap, and obviously the golang authors don't actually believe that. They just think that only they can be trusted to write such functions and that their datastructures are all anyone ever needs. If you disagree with that assessment (and everybody will, soon) Go is not for you.

So Go is simply a throwback to pre-80s programming languages, and a perfect illustration of the frustrations that led to the development and extension of the C++/Java/C# programming languages. If you give people the minimal implementation of sorting an array of structs, it becomes blatantly obvious why other languages are necessary.

The more I write Go, the more I yearn for C++. There is nothing in the C++ language that I can't do for my own datastructures/functions/... That is a huge feature, and may I just say :

From my cold, dead hands !

Btw : there is a better solution to generics as well at compiler-level, that is used in things like the CLR. First, generate unboxed versions of functions where that makes sense. If specializations are possible for 1-bit, 1-byte, 2-byte, 4-byte and 8-byte primitive data types, expand those. Then for anything bigger, like structs, create a boxed implementation, because for structs there is no longer any advantage to working unboxed. Then make it possible to pass in the version to be used in a parameter, so you don't have a combinatorial explosion when many type parameters are given.

e.g. [http://research.microsoft.com/pubs/64031/designandimplementa...](http://research.microsoft.com/pubs/64031/designandimplementationofgenerics.pdf)

<comment><USER3> > It doesn't mention the major inconsistencies in golang at all.

It has little relevance to "Generics". They are simply how Go is implemented, the question is whether "Generics" as a user implementable thing should be added.

> CLR

From my quick reasearch, it uses runtime code generation and Go must run in environments where that is disallowed.

<comment><USER5> Regarding the CLR you have ahead of time compilers in the form of Mono for iOS, Windows Phone, Bartok, ngen and now .NET Native.

How the generic code generation differs from the JIT approach I don't know.

</comment></comment></comment></comment></comment><comment><USER6> I find it amusing how angry people get about this, like really, vehemently angry.

If this issue is so important to people, don't use Go, use C++, Java, D or Rust. Don't waste your life arguing about something you'll never use, it's not a productive use of your time! Think about how much time you could save!

Alternatively, propose a solution to the problem and try and gain some traction to get it implemented into the language, or fork Go and implement it yourself. There's evidently a hunger out there for generics in Go, but everyone keeps assuming the responsibility lies with the Go Core team who's priorities seem (right now) to be in the optimising GC/compiler area.

<comment><USER7> So should people stop talking about the pros/cons of programming languages at all? Because this can also go the other way. Another person can say: "If you enjoy programming in Go, then use it but keep quiet and stop promoting it and talking about how much you like it."

I haven't used Go at all yet, but I'm interested in hearing more about it the good and bad parts, along with other languages. Telling others to not complain at all doesn't do any favors.

<comment><USER8> I agree, but I think there's something to be said for not complaining about lack of generics in Go. We kinda got it the first 100 times it was said.

</comment></comment></comment><comment><USER9> What I find frustrating is that they seem to think that there are only two solutions - C++ (create a new type for each variant) or Java (erase the type information).

C# does it differently to either - see here:

[http://www.jprl.com/Blog/archive/development/2007/Aug-31.htm...](http://www.jprl.com/Blog/archive/development/2007/Aug-31.html)

(The section marked ".NET Implementation")

Edit: And here's Anders Hejlsberg talking about the design:

[http://www.artima.com/intv/generics.html](http://www.artima.com/intv/generics.html)

<comment><USER10> > What I find frustrating is that they seem to think that there are only two > solutions - C++ (create a new type for each variant) or Java (erase the type > information).

That, at least, is correct. Generics can be erased (compile-time only) or reified (generic type instances exist at runtime).

C# uses reified generics, and Mono creates (created?) a reification for each parameter typeset, Microsoft's implementation creates the same underlying reification for all reference types as a space optimisation, but it still uses reified generics.

There is a good helping of dishonesty in using C++ as the "reified generics" example though, as C++'s templates do significantly more than just reify generics (template specialisation, code generation, etc…) and that added to the interactions between templates and other language features makes them significantly more complex than e.g. C#'s, Rust's, Ceylon's, Kotlin's, and most other instances of reified generics.

<comment><USER11> The argument brought up regarding compile times is also a misnomer. C#'s compiler pre-Roslyn is already very, very fast.

</comment></comment></comment><comment><USER3> Didn't intend for it to end up on HackerNews - at least not yet. It's still the first draft, most of it I wrote up in ~2hours. I made a mistake for not putting the "Draft" note at the top of the page in the first page.

I try my best to be objective - obviously this isn't easy. This is intended to be a review of both sides of the arguments. The generics discussion comes up again and again - I made this document to stop arguments going around in circles.

I will go over all the suggestions and add any missing information. Of course, if you have some good overview of some particular generics implementation you can PM me, or simply add that as a comment.

</comment><comment><USER5> As usual, it lacks discussion about generics in:

\- Eiffel

\- Ada

\- Modula-3

\- D

\- MLton

\- .NET

\- Rust

\- Haskell

\- OCaml

\- Sather

\- BETA

\- CLU

Even if they overlap, it would be nice to see them being discussed. Not all generics are born alike.

Personally, I don't care any longer. It is still better than just plain C.

<comment><USER12> I just want to point out that C actually supports generics in a form of pointer to void.

<comment><USER13> interface{}

<comment><USER12> I was responding to a comment claiming that Go is better than C in discussion about generic programming. I pointed out that C in fact supports generic programming (actually by void pointers and function pointers). Why you (and other downvoters) respond with the way to do it in Go isn't quite clear to me. I didn't claim anything about Go. I claimed something about C.

<comment><USER5> Maybe because Go's approach, although lacking, is still better than C in terms of type safety.

When you cast from void* to whatever type, the compiler will happily accept it and bad things will happen if the type is wrong. Maybe not right away, thus the program will bleed with corrupt memory.

With Go when you cast to the wrong type, a cast violation will occur and the program will panic right away.

<comment><USER10> I think that's memory-safety rather than type-safety: in Go (or Java or C#) the types may not be correct (so it's not type-safe) but it'll fault at runtime rather than possibly corrupt memory as C would.

</comment></comment></comment></comment></comment></comment><comment><USER14> There is only two ways to compile generics C++ (instantiation) and Java (type erasure) style. [0]

Alternatives to these are just manual or semi-manual variants. For example, Go people seem to like the "empty interface" approach. Well, that is Java-style type-erasure done manually. The code generation approach is just C++-style instantiation done outside of the compiler.

[0] [http://beza1e1.tuxen.de/articles/generics.html](http://beza1e1.tuxen.de/articles/generics.html)

<comment><USER9> C# doesn't erase types, and it doesn't create a separate type for every possible variant.

See the ".Net Implementation" section here:

[http://www.jprl.com/Blog/archive/development/2007/Aug-31.htm...](http://www.jprl.com/Blog/archive/development/2007/Aug-31.html)

<comment><USER5> This interview with Anders Hejlsberg is also a good source of information

[http://www.artima.com/intv/generics.html](http://www.artima.com/intv/generics.html)

<comment><USER14> So, C# does instantiation, but is usually clever about reference types.

I am not quite sure from the interview what happens about constraint types. It seems the reference is cast into an Interface type (IComparable) and used as such. In other words, boxing.

<comment><USER15> The arguments used for contrained type parameters can be checked by the compiler, so no casting is necessary at runtime

"... C# does strong type checking when you compile the generic type. For an unconstrained type parameter, like List<T>, the only methods available on values of type T are those that are found on type Object, because those are the only methods we can generally guarantee will exist. So in C# generics, we guarantee that any operation you do on a type parameter will succeed."

Edit (more explicit quote):

"When you say K must implement IComparable, a couple of things happen. On any value of type K, you can now directly access the interface methods without a cast, because semantically in the program it's guaranteed that it will implement that interface. Whenever you try and create an instantiation of that type, the compiler will check that any type you give as the K argument implements IComparable, or else you get a compile time error."

Furthermore (related to the CLR avoiding boxing costs):

"I'm just pointing out that we do fairly aggressive code sharing where it makes sense, but we are also very conscious about not sharing where you want the performance. Typically with value types, you really do care that List<int> is int. You don't want them to be boxed as Objects. Boxing value types is one way we could share, but boy it would be an expensive way."

<comment><USER14> What I wonder is: Take "SortedList<T> where T:IComparable". Now there is a generic add(T t) method, which needs to call t.compareTo(x). As add does not know the dynamic type of t, we don't know the vtable offset of compareTo for compilation. Thus the compareTo call cannot be compiled to "load method pointer from vtable; call it". We need something more expensive or JIT magic (traces,guards,etc).

</comment></comment></comment></comment></comment></comment><comment><USER16> Interesting timing as I had just read a great blog post about getting around the lack of generics in Go entitled "Living without generics in Go"[1] that I found to be very enlightening.

[1] [http://www.weberc2.com/posts/2014/12/12/living-without- gener...](http://www.weberc2.com/posts/2014/12/12/living-without-generics.txt)

<comment><USER17> Interesting post, but what the author doesn't seem to realize is that even though _he_ isn't doing much generic programming, _someone_ needs to be able to do it to write the libraries he needs to use. The proposed approach is decent, but it reminds me of wrapping up STL container types in the amount of useless boilerplate needed to achieve a single function (but worse, because here the function is "type safety", whereas when you wrap an STL type it's about e.g. ensuring some invariant on the members of a set)

<comment><USER18> The author here. I'm not necessarily an opponent of generics, the post was just a "how to deal with the current situation", so keep that context in mind. :)

> someone needs to be able to do it to write the libraries he needs to use

I'm not sure what this has to do with what I wrote. As evidenced by the `container/list` package, a generic implementation _can be_ distributed, and we can build our type-safe wrappers around that (if type-safety is really that important in your application--I haven't had much difficulty using the generic container as-is).

I do agree that the boilerplate is inconvenient (pretty much by definition). But it's fortunately also _trivial by definition_. People seem to think that these wrappers raise the total complexity of the program just because they contribute to the total lines of code (loc) count. Many people also think that if you don't use these type-safe wrappers that your program will be doomed to runtime errors.

I think both of these are big exaggerations, and that's why I wanted to write that post. Even in spite of Go's generics situation (I'm not entirely convinced about the degree to which it's a liability), I still find it to be the most enabling tool in my bucket.

</comment></comment></comment><comment><USER19> Sorry, but I can't see the value of posting this to hacker news. As evidenced by many people in this thread assuming it's from one of the core Go development team, it's not.

<comment><USER20> Exactly. This is one person's attempt to distill the previous conversations down to one document. It's not supposed to be justifying or rationalizing anything, nor does it speak for the core language contributors!

It's one person's summary of a very long and convoluted conversation. That's all.

</comment></comment><comment><USER21> To be fair I've not worked much in a languages that support generics but I assure you there are type safe solutions to most every problem without them (as long as you don't write yourself into a corner). Whether my life could be simpler using them is unseen but to say the lack of them cripples a language is wholly untrue. You're simply used to using them in your solution and are wired to think with them. That's a flaw in the developer, a lack of imagination, not a flaw in the language. Arguing every language needs every feature every other language has is stupid. "[lang1] is bad because it isn't [lang2]" Is always an infuriatingly stupid and pointless argument. Use lang2 if you love it so much. Seriously.

<comment><USER2> That we can manually hack around this with busywork and tiptoe around the issue with various hacks doesn't mean it's not a flaw in the language.

It's 2014. Generics are a settled deal in programming languages. It's not some syntactic sugar or something the value of which is stull undecided and its advocates might "lack an imagination".

> _Use lang2 if you love it so much. Seriously._

Well, some do. That doesn't mean they don't get to complain about something they perceive broken in Go that could be better. Especially if they could use Go (to take advantage of other benefits it might have) if it weren't for those shortcomings.

In general, the statement is analogous to "if you have a problem with X in america, why don't you immigrate", which is silly. If you have a problem, you criticize, and you try to change that. You don't just dismiss everything that's also not problematic.

</comment></comment><comment><USER22> For those who have not been following this discussion, I suggest reading this comment by Ian:

[https://groups.google.com/d/msg/golang- nuts/smT_0BhHfBs/MWwG...](https://groups.google.com/d/msg/golang- nuts/smT_0BhHfBs/MWwGlB-n40kJ)

<comment><USER5> Thanks for the link, Ian's comment is very interesting and goes into the direction I was stating in another post.

</comment></comment><comment><USER23> As a language, I like Go. I would like it to have generics (Ada-style generic syntax might fit best). I don't care enough to get emotional about it. So, meh.

</comment><comment><USER24> Given "go generate", I actually think that code generation might be better. It's a more fussy mechanism, yes - but it's also a lot more general.

<comment><USER10> 1\. Any old-timer Windows developer will tell you that statically generated code still has to be understood and maintained.

2\. generics are about type-safety, not codegen. Codegen can be added on top of parametric polymorphism (e.g. C++ template specialisation), but is not required by any means (C# or Rust don't do any generic-based codegen beyond reification)

</comment></comment><comment><USER25> If they give us type safe c-like macros I will happily live without generics. This is from a Scala dev. I write Go because it's easier and less error prone than going through JNI. However the lack of any reasonable abstractions in Go makes it my last choice language.

</comment><comment><USER26> Let's just use the C++ approach. Maybe with more restrictions to prevent abuse. Maybe not. To me the problems with C++ templates arise from their verbosity (Go's type system is rigid, but defining types is easy and encouraged and the compiler does inference for variable declarations), their abuse (let's keep it to simple type insertion), and the nasty errors / debugging (Go's type system rigidity should also help here).

Just being able to do very light type insertion and the transparent code generation to go along with it would go a long way.

</comment><comment><USER27> Does anyone know how generics (for maps, slices, channels) are implemented currently in Go? Does it use type-specialization or boxing approach?

</comment><comment><USER28> _(The Java approach.) Box everything implicitly._

Boxing and generics are orthogonal concepts.

Also: does auto-boxing even make sense in Go? Between the fact that Go is statically compiled and that there isn't an int / java.lang.Integer dichotomy to resolve, I would assume that the compiler could just do whatever it needed to with primitives, regardless of generics.

<comment><USER10> > Also: does auto-boxing even make sense in Go?

Yes, and already happens: interfaces cause wrapping of their content[0] and go does basic escape analysis and automatically allocates things which escape a function on the heap rather than the stack[1]

[0] [https://golang.org/doc/faq#nil_error](https://golang.org/doc/faq#nil_error)

[1] [https://golang.org/doc/faq#stack_or_heap](https://golang.org/doc/faq#stack_or_heap)

</comment></comment><comment><USER29> The cons subsections that say that a generic version can be less optimized than a concrete version should mention which implementation is considered. If you use mono-morphization, then you end up with the same code as you would have written by hand, so there is no loss of performance there.

<comment><USER3> Abstract things are harder to optimize than concrete things. A package for a concrete problem can be more optimized than a generic/abstract package.

I don't mean that the manually specialized version is faster than automatically specialized template. Rather that this encourages to not write abstract data-types, but rather concrete types that solve a real world problem - editor.Buffer vs. gap.Buffer. Once you have a real world problem it can optimized much better for that use case.

</comment></comment><comment><USER30> I was considering Go for some project of mine but the lack of generics turned me away because the project needed to do some heavy numeric computations over custom containers (sparse matrices).

Now days I think that adding generics to Go will be disaster - Go lacks sound type system and piling generics on top of it will make the thinks even worse.

</comment><comment><USER31> In the pros for generic data-structures, it doesn't mention type-safety?!?!

</comment><comment><USER32> I'm at the point where I hope they never add them, even though I've liked them in other languages.

Once they do, you know not every "generics or bust" will be satisfied and the anti-Go hate will simply shift.

I say let the haters hate and keep generics as their focal point.

<comment><USER33> So, you argue to not add a feature to the language because it would fix one of the main points of criticism? That is silly, don't you think?

<comment><USER34> It is. The Go language devs should just own it and say "No". Will the arguments shift somewhere else? Maybe but maybe the "Go needs generics" folks will just go away.

<comment><USER2> > _The Go language devs should just own it and say "No"_

Which is the grown up, honest, thing to do.

But I'm not sure about the other thing you mention:

"Maybe but maybe the "Go needs generics" folks will just go away."

Why would they go away?

They ask for Generics because they have found some use for Go (say, because it has a OK standard library, or decent tooling and momentum compared to alternatives), but also found a need this feature.

Neither the "use of Go" they found, nor their need for generics will disappear if the language devs say "no". If anything, as stakeholders in the languge (a user is a stakeholder) they'd be even more pressed to change the language dev's mind -- down to the fork point.

<comment><USER35> How many years to go before go users/developers outside of google will fork "go lang" the way node.js users/developers did ?

the go-lang team at google is very smart. It's not that they have a huge amount of high-priority work other than generics. Why don't they address a summary of the sentiment on hacker news on generics ?

<comment><USER2> If you're a programmer, your life is made easier if you have access to generics.

If you're a language developer, your life is made harder if you have to add generics.

And if your language gets all the people that are easily satisfied with something "static and faster to write than C" why go the extra mile?

Especially if your goal is not building a commercially succesful language, or an advanced language, or a language to solve 2014's problems, but just to hack on what you have created.

Besides, being a great programmer and a great language designer are two different skills. Would a language created by Linus be that good?

</comment></comment></comment></comment></comment></comment><comment><USER36> Not trying to troll, but it's seriously depressing how much time is wasted on this language.

<comment><USER26> Trolling or not, comment is unproductive. Might I suggest offering alternatives such as rehashing the "rust is arguably a better design with similar goals" vs "rust's library isn't as complete and the language isn't stable" debate?

I have been writing Go code professionally nearly every day for 6 months. Would I rather be writing C? Probably. Python? Not on a project of this scale. C++? Toss up. Java? No - doing far to much interfacing to C libs for that. Rust? Probably. Go is far from perfect, but honestly not that bad.

<comment><USER37> What advantages does Go have over Erlang?

<comment><USER38> It can be learned by a programmer knowing only imperative C-family languages in a couple of hours, meaning I can hire any average developer and make him productive in less than a week. Not the same as teaching pure functional style with pattern-matching and prolog's syntax. Go is also much more efficient. It also produces static executables and can be easier to deploy -- or not, depending on the exact situation. It handles strings nicely -- anything other than Erlang's approach to strings is nice.

Erlang has other advantages, though. 99.9999999% uptime and hot code replacement are easier with it, for instance. Their ideal niches don't completely overlap.

<comment><USER37> I believe I can agree to the above statements.

</comment></comment></comment></comment></comment><comment><USER39> More FUD and rationalizations from GhettoLang!

> do you want slow programmers, slow compilers and bloated binaries, or slow > execution times?

Easy I want "slow compilers and bloated binaries".

In my experience "bloated binaries" in the real world aren't as bad as one would think, since instruction cache problems only appear when your _working set_ is huge, not when your _total binary size_ is huge.

Equating big binaries with slowness is simply misleading. What's next, increased download times?

> The generic structures are less useful than a concrete one.

Without generics you can't separate algorithms from data structures so everything is much less useful. If the members names are worse, sub-type then rename symbols.

> Generic structures can be less optimized than a concrete solution.

False. That "concrete solution" not only has to be written, but it will also perform identically to an instantiated template.

And type erasure is not a solution, it prevents inlining, constant folding and hoisting. Eg: In C++ std::vector<MyObject>::operator[] has 1 indirection, while using a generic C void* container would have 2. Guess which one is faster?

> Generic algorithms can be less optimized than a concrete solution.

 _sigh_

Also wrong since generics do not prevent specialization if needed. See: static if in D, template specialization in C++.

<comment><USER3> > Without generics you can't separate algorithms from data structures so > everything is much less useful.

Generics is not the only way to separate data and algorithms. I agree that it is possible to sub-type/embed and rename - although looking at generic code, I rarely see that happen.

> That "concrete solution" not only has to be written, but it will also > perform identically to an instantiated template.

When you know where exactly the code will be run, it can be possible to create a better package taking into account the context where it will be run. By concrete, I mean a package in a real-world problem.

Basically, abstract things are harder to optimize for a particular case.

<comment><USER39> > Generics is not the only way to separate data and algorithms.

Do you see any way other than the 3 ones discussed in the OP article under the label "Generics"?

> When you know where exactly the code will be run, it can be possible to > create a better package taking into account the context where it will be > run. By concrete, I mean a package in a real-world problem. Basically, > abstract things are harder to optimize for a particular case.

I could agree with that if time wasn't limited, but imho building custom data structure/algorithms for each problem will precisely leave less time to optimize for performance since reaching a working state first will be longer without reusable abstractions.

<comment><USER3> > Do you see any way other than the 3 ones discussed in the OP article under > the label "Generics"?

The one I mainly meant was interfaces. Of course there are also DSLs and code generation.

> I could agree with that if time wasn't limited, but imho building custom > data structure/algorithms for each problem will precisely leave less time to > optimize for performance since reaching a working state first will be longer > without reusable abstractions.

I mentioned that in the summary. It's about tradeoffs. Even if all the cons/pros are listed people could still come to different conclusions, because people value different things. And there's nothing wrong about it.

The amount you need to reimplement depends on the amount of available third- party packages - the more good packages there are the less you need to build those custom data structures.</comment></comment></comment></comment>


Recent improvements to Redis Lua scripting - <AUTHOR> http://antirez.com/news/97 <comment><USER2> > _Now to show how a debugger work, by writing a blog post about it, is surely > possible but, even a purist like me writing articles in courier, will resort > to a video from time to time. So here is longish video showing the main > features of the Redis debugger. I start talking like a bit depressed since > this was early in the morning, but after a few minutes coffee fires in and > you'll se me more happy._

Stay awesome, antirez.

I wrote some semi-complex Redis Lua scripts recently... didn't need a debugger, but it's great to have.

</comment><comment><USER3> This nicely gets at the single biggest pain point that I encountered writing Redis scripts. The workaround that I came to was to insert early returns and run them over and over again. But a real debugger is much better.

That said, the biggest remaining pain point is that it would be nice if a Redis script could refer to functions in a shared library. Yes, you can always just assign functions to variables and call them that way, but now you have to copy standard functions in every script that needs them. This is a PITA.

<comment><USER4> You can call Lua scripts from other Lua scripts. It is a little funky, but that's why I built [https://github.com/josiahcarlson/lua- call](https://github.com/josiahcarlson/lua-call)

<comment><USER3> Ugh. But yes. That should work perfectly well.</comment></comment></comment>


Europe's Distorted View of US High Tech - <AUTHOR> http://www.mondaynote.com/2015/09/07/europes-distorted-view-of-us-high-tech/

<comment><USER2> > Apple invented the smartphone

No they didn't.

> (and the tablet)

No they didn't.

> Facebook coined the concept of social network.

No they didn't.

In fairness, the iPad was the first tablet to matter all that much, if not the first tablet as such. But seriously now. Blackberry? Myspace? These were enormous and important businesses (BlackBerry still is). Hell, you could date social networking back to usenet if you wanted. It would be nice if people writing "mythbuster" articles did some elementary fact checking.

<comment><USER3> > > Apple invented the smartphone (and the tablet)

> No they didn't

While you're technically correct, the iPhone was such a leap over any previous effort that it basically redefined the meaning of the word. If you showed an iPhone 1 to someone today, they'd at least recognise it as an (old) smartphone. A blackberry from the same era? I very much doubt it, and frankly I'd agree. The word now means "iphone 1 or better".

You're right about myspace though (and friendster before them)

<comment><USER4> Apple wasn't the biggest problem for the mobile phone industry though. They made an early bet on technology that wasn't mature yet and while they had some head start, partly due to aggressive business practices, other companies were catching up. If anything Apple was leading the way for more profitability. What really changed the industry was Googles price dumping of mobile operating systems.

All the other successful smartphone companies today are hardware focused, while companies with strong software departments like Nokia and RIM are struggling. Which is sad because in a couple of years hardware is going to be good enough, while we have ended up with a similar triopoly as the desktop operating systems market is suffering from.

</comment></comment></comment><comment><USER5> As a person from northern Europe, I think this is all about envy: "I don't like you because you have success, so I have to impede you".

The European politicians hate that all the major new internet companies are US based, but they have absolutely no idea about how to foster a European Sillicon Valley that can compete _and they have no interest in learning how_.

Danish politicians thought they could make a new mini-SV by building a few expensive office buildings in a location with really bad transportation. No politicians here think it's important to listen to the IT sector, instead they just tell us (literally!) to stop wearing white sports socks so women will like us better.

When a rich person in SV talks about all the new startups he has invested in, he will be admired and cheered. One of the major show-stoppers in Denmark is that such a person will be thought of as a cheesy show-off, and therefore will shunned and loose social status. So it becomes impossible to build the network needed for startup investments as such networks often live on "happenstance meetings".

Nobody here realizes how important easy access to money is for startups and to have investors that like to take _wild_ chances. Google would never have been able to succeed in Europe because they would never have been able to get the investment money needed to start up.

We have the same high housing prices as SV and almost no investment money. Add the lack of any IT center and that every country tries to do their own rather than having one common SV for all of EU. It's like if USA tried to build a SV in every single state, including Utah! The marmalade is spread too thin.

<comment><USER6> > As a person from northern Europe, I think this is all about envy: "I don't > like you because you have success, so I have to impede you".

As a person also from Europe I wish people would stop saying this, because it doesn't do justice to the issue that many of us actually have with these specific companies. All it does is divert from the real issues.

It's nothing to do with envy (for me at least, and many others) and everything to do with the way these companies conduct themselves and the outright lack of respect they demonstrate towards the public and the laws of the countries in which they operate.

They need reigning in.

<comment><USER7> Can you give specific examples of what these companies do that needs reigning in? I'm excluding the "sharing economy" companies (uber, airbnb, etc) which are a known problem everywhere.

<comment><USER8> You have to ask? The bad behavior of Facebook, Apple, Google, _etc_ has been a regular topic of discussion for years.

If you truly want specific examples, I suggest you start with Aral Balkan's talk[1] which covers several of the larger problems that needs reigning in.

[1] [https://projectbullrun.org/surveillance/2015/video-2015.html...](https://projectbullrun.org/surveillance/2015/video-2015.html#balkan)

</comment></comment></comment></comment><comment><USER9> US High Tech in Europe : massive tax evasion + not respecting the law.

<comment><USER10> The tax avoidance is allowed by the governments though. Not saying that it isn't a problem, but tax law is controlled by the government and its the governments role to set policies that allow them to collect tax revenue. The UK and Ireland have made some changes in this area recently.

<comment><USER11> Not to mention that it's hardly a "US Tech companies" phenomena; Fiat is one of the four companies under investigation, for example.

</comment></comment></comment><comment><USER10> In 7 years in London tech I have never heard once of 'GAFA' or 'NATU'

Edit: the article mentions that too, it just misleadingly refers to 'Europe' in the title when it probably means France and Germany. It also refers to the UK and Scandinavia as being 'elsewhere' when UK is in the EU and Sweden on the Euro.

<comment><USER12> Weird article title indeed. And just to clarify: Sweden, Denmark and UK are in the EU, none of them have the euro.

<comment><USER10> You're right, Sweden isn't on the Euro. I stand corrected.

</comment></comment></comment><comment><USER13> This seems like one big strawman

</comment><comment><USER14> _> you'll benefit of Amazon's assistance better if you are rated as a non- cheating customer_

What does that mean?

<comment><USER15> If you send to much stuff back, they become less nice/ after a while start blocking your account. It gets ugly when they close accounts that are "similar", there have been cases where people got their accounts closed when their neighbors in the same building created trouble.</comment></comment>


The New Copycats: How Facebook Squashes Competition From Startups - <AUTHOR> https://www.wsj.com/articles/the-new-copycats-how-facebook-squashes-competition-from-startups-1502293444 <comment><USER2> Same article (without paywall) was submitted and discussed two days ago:

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

</comment><comment><USER3> In case anyone from WSJ or other paywalled content producers reads this: I notice myself sharing far less when I hit a paywall even if I used one of my "free credits" because hitting a paywall is shitty to the people clicking the shared link. If it's important information, I will actually find a different source and share that.

So you shouldn't worry about lost subscription revenue, you should worry about lost relevancy. Lost relevancy will result in your CPMs on ads being a Mashable rate, not a WSJ rate.

Publishers that do this will literally nickel and dime themselves out of relevancy. But whatever, I don't read WSJ or the economist anymore because paywalls and they're not the only (or even best) analysis online. Sad to see the mighty fall though.

Same deal with "We noticed you running Adblock :-(..." Most tech savvy people have Adblock. Many of them have many more followers who _do not_ have Adblock, and those people get their links from social streams. So again, you're not turning away adblockers, you're turning away their friends and leaving the public consciousness.

</comment><comment><USER4> Monitoring and copying potential threats at early stage is an obvious and effective strategy. This is the unpleasant thing about many startups, technology is a commodity, the big players can simply copy it (or buy it if they think it's cheaper).

Honestly, I think it's unfair. You can put effort into making an amazing though-out product with a lot of novel ideas behind it, but the big players can simply copy you and use their monopoly power (network effects, integration into existing product, marketing) to make a superior product.

The problem is that companies like Facebook or Google are monopolies which use their monopoly profits to further expand their imperiums. In a competitive market, profit margins around 30 % would be impossible, because a competitors would push the prices close to 0 % margin (btw, the "real" profit margin is much more than 30 %, because these companies put lot of resources into research, buying overpriced startups, and in general are not very efficient with money). This just sucks in my opinion...

</comment><comment><USER5> "Mr. Zuckerberg is sensitive to anything that might disrupt Facebook, even the teeniest startup, say current and former executives and employees. "

that says it all. Facebook is vulnerable and has a limited life span. The idea is out of the bag. It has a high chance of going away just like myspace and others before. Z. knows it and it seems will protect it at any cost.

When you suppress competition instead of reinventing yourself and retaining/attracting users that way - you are basically done.

<comment><USER6> >> When you suppress competition instead of reinventing yourself and retaining/attracting users that way - you are basically done.

Tell that to Oracle.

If a company can get its hooks into something, I think they can keep it going for a very long time.

Also, ever since Microsoft achieved dominance over the PC market, they've been coasting along nicely - Leveraging their legacy (Windows server -> Azure, also many patents) - MS never had to compete on the same level as all the others who had to start from scratch... Some old leaves of their business peel off and new ones grow in their place.

</comment></comment><comment> type-2 read here if paywalled [http://archive.is/LUAA8](http://archive.is/LUAA8)

</comment><comment><USER7> Paywall

</comment><comment><USER8> surprisingly, i also got the paywall

</comment><comment><USER9> can't read it due to the paywall.</comment>


meSpeak.js 1.1 released – TTS for the web (supports iOS) - <AUTHOR> http://www.masswerk.at/mespeak

<comment><AUTHOR> Finally found time to implement support for the Web Audio API (AudioContext) and optional export of raw-audio-data. Also the Chinese voices "zh" (Mandarin) and "zh-yue" (Cantonese) are now part of the standard distribution.

Thanks to the use of the Web Audio API (which is now the preferred method of playback) it plays fine on Safari/iOS (while it needs some time for processing). With IE11 coming soon and Opera having switched to blink, there should be support for all major browsers (current versions).

meSpeak.js is based on eSpeak and speak.js, an Emscripten-port of eSpeak to JS). Many thanks to these projects!

[http://espeak.sourceforge.net/](http://espeak.sourceforge.net/)

[https://github.com/kripken/speak.js](https://github.com/kripken/speak.js)</comment>


AI resume generator based on Textgenrnn and AWS lambda - <AUTHOR> https://thisresumedoesnotexist.com/ <comment><AUTHOR> The creator of the page here, I'd be happy to answer any questions :)</comment>


Ask HN: How many LOC are you personally responsible for? - <AUTHOR> Question came up through complaining that I don't have enough shared responsibility with code I maintain. For how many LOC does the buck stop with you? I'm at 33,000 that I maintain daily and have zero support for (let alone documentation). It feels big but I've no idea how others compare. <comment><USER2> [https://www.folklore.org/StoryView.py?story=Negative_2000_Li...](https://www.folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt)

<comment><AUTHOR> Again, fair, but I'm not trying to measure progress. I'm trying to gauge jurisdiction.

</comment></comment><comment><USER3> I don't think LOC is a good measure for that, too many variables that change the effort required for same-length pieces of code: How complex is the code? How much does it change?

And when comparing between people, what does "maintain" entail?

<comment><AUTHOR> That's a fair comment but I do feel it's a good enough proxy to gauge responsibility. There's also no other metric available that's any more concise.

I figured maintain to cover having originally written it and are charged with its ongoing use.

<comment><USER4> I feel like you'd want to create an index that's something like (number of features) + (number of unit tests)^2 + (number of adjacent integration tests)^3

And maybe normalize for each by the lines of code for each component and some constant factor after twiddling.

Basically LoC by itself is meaningless. When you gauge responsibility you want to look at how many features are owned, how complex those features are (unit tests) and how critical those features are to the system/product (integration tests). With complexity/criticality being weighted much higher than feature count.

Of course like all metrics this is easy to game. But that's what code review is for.</comment></comment></comment>


Supreme Court says state may enforce some restrictions on religious gatherings [pdf] - <AUTHOR> https://www.supremecourt.gov/opinions/19pdf/19a1044_pok0.pdf <comment><USER2> The difference between respecting a right and not can be seen by how much restraint goes into crafting the law. The details can get murky, but often the spirit is plain to see: was a good faith effort made to specialize the law to the problem being solved with minimal interference on any rights?

Here, the California order doesn't ban going to church, it places additional building capacity and total attendance limits.

There are complications though -- the longer these emergency orders drag on, the more skeptical we should be. They should be reviewed frequently, enforced moderately, and lifted promptly along with other similar activities. Surely it would turn into _disrespecting_ the right if ballparks and concerts reopen first.

Another complication is the idea of protests. While limiting the capacity of a church doesn't completely deny religious services; limiting protests strikes more at the heart of the first amendment and our ability to challenge decisions at all.

The closing of gun stores is also problematic. It seems many gun stores in California have been ordered completely closed (not sure about state/county/city status), when other retail establishments remain open. A farmers market near my house is offering pony rides, the Starbucks and the Baskin Robbins are open, as are liquor stores and probably dispensaries. I think there is a real Constitutional issue there, and if it makes it to SCOTUS I would expect an injunction allowing gun stores to remain open.

<comment><USER3> Are you advocating gun stores have to remain open for the right of the people to own a gun?

Why would anybody need a gun right now while their biggest life treat is a virus?

Please lord more riots with more people having guns would be a plead from Anders Breivik. Does that guy have internet these days?

<comment><USER4> > Are you advocating gun stores have to remain open for the right of the > people to own a gun?

How am I supposed to bear arms if I can't obtain arms? I think it's fairly reasonable to close gun shops if all other stores are closed, but there's no reason not to allow gun shops to open under the same terms as other shops. Maybe pickup / curbside only, maybe strict simultaneous customer limits, whatever.

> Why would anybody need a gun right now while their biggest life treat is a > virus?

I personally don't think more guns help to deescalate situations, but there's like a lot of unrest, and some people think guns can be used to protect themselves from rioters, riot police, instigators, or some combination of the three.

<comment><USER5> I'm strongly in favor out stronger gun control but find your argument here reasonable.

After a bit of googling I see that gun stores are indeed allowed to provide for curbside pickup and are open: [http://reedsindoorrange.com/](http://reedsindoorrange.com/)

<comment><USER2> "I'm strongly in favor out stronger gun control but find your argument here reasonable."

A few genuinely curious questions.

First, would you rather there was just no 2nd Amendment at all? I can understand that point of view.

Second, let's assume there is a right to bear arms, and that it's not going away. Do you think all of the little half measures are actually helpful? Stuff like how you can buy ammo, or what models of guns are acceptable, or what kind of grip or stock a rifle can have?

Third: rifles. Not many killings happen with rifles. They are lower than knives, and behind even fists/feet[1], even in states with very permissive rifle laws. What do you think about removing pretty much all restrictions on rifles (and accessories, including suppressors[2]), and instead restricting pistols more heavily?

[1] [https://ucr.fbi.gov/crime-in-the-u.s/2018/crime-in- the-u.s.-...](https://ucr.fbi.gov/crime-in-the-u.s/2018/crime-in- the-u.s.-2018/tables/table-20)

[2] For most rifles, a normal suppressor just reduces the sound from "instant permanent hearing damage" to "louder than a jackhammer and you still probably want hearing protection".

<comment><USER5> Overall I would rather 2nd amendment would not exist and I don't think it belongs in a modern world (I am a retired soldier that has served abroad, and have gone to gun ranges to shoot).

I think currently stronger background checks, strong penalties for selling guns outside of this and bans of large magazines and ways of reloading quickly.

I would support some way of limiting open arms in public places, I do not think they belong in demonstrations or Subway stores and are often used to intimidate.

I'm personally mostly OK with rifles, except automatic rifles with large capacity magazine. If you have a hunting rifle and it can be traced back to you, please have your fun.

The parts I feel strongly about are strict background checks, weapons can be traced back, and should not be used for intimidation in protests. The rest are details and I am sure we can come to an agreement.

In the weapon culture I come from if you point a weapon at someone, loaded or not, your are assumed to be hostile or an idiot that should not have a gun and will be met with extreme force.

<comment><USER6> > Overall I would rather 2nd amendment would not exist and I don't think it > belongs in a modern world

Genuine question since I see this argument online with some regularity. Why don't you think the 2A belongs in a modern world? What does the time frame (modern vs not modern) have to do with human rights?

<comment><USER7> > Why don't you think the 2A belongs in a modern world?

The forgotten premise of the 2A is that it would prevent tyranny by providing the tools so that the citizenry could demand that the government not form permanent external or internal security services beyond what was necessary for a minimal tripwire and training cadre force that would form the nucleus of an at-need force that would be sized up as situations presented with the militia and it's privately-owned arms. Liberty wasn't guaranteed by permitting the general citizeney arms to fight the central government at need, but by providing the tools so that the citizens could use the government to meet their security needs while keeping the general citizenry and not a distinct and separate peofessional warrior group as the necessary and essential component of the government providing that function.

The development of standing armies scaled to fight major wars rather than serve as tripwire and cadre forces, professional paramilitary law enforcement services, the professionalization of not just standing military forces but even the ready reserves, culminating in the all-volunteer force, have all rendered that design outdated.

The 2A might conceivably serve it's function in a modern world, but not in a country where the citizenry has accepted the changes the US has since roughly the second quarter of the 19th Century which have completely eradicated it's fundamental premise.

<comment><USER8> I would say an armed militia can still resist any industrialized nation. The US has lost numerous modern wars against minimally armed guerilla fighters. Pretty interesting such means of resistance has been so constantly successful.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> The only thing that should be surprising about this ruling is the dissent. They can't cite any applicable case law because there isn't any. Up until now the Court has always treated the states' (note states and not federal) police power in a pandemic to be near plenary. This is in line with English common law that developed under the shadow of the repeated waves of Bubonic Plague.

Maybe that should change in light of the dramatically changed jurisprudence in so many other areas starting with the New Deal Court, but not in an application for an emergency stay.

<comment><USER10> I too am dissapointed that this ruling was not unanimous, but the majority opinion is not much better. Both opinions seem to agree on the law generally, in that restrictions on places of worship must be no more onerous than restrictions on "comparable" secular activities.

The dispute is what qualifies as comporable. The majority feels that services are comparable to

"theatrical performances, where large groups of people gather in close proximity for extended pe- riods of time", and not

"grocery stores, banks, and laundromats, in which people neither congregate in large groups nor remain in close proximity for extended periods."

The dissent considers comparable activities to include:

"factories, offices, supermarkets, restaurants, retail stores, pharmacies, shopping malls, pet grooming shops, bookstores, florists, hair salons, and cannabis dispensaries. "

Neither side cites caselaw for there determination on this crucial fact.

<comment><USER11> Because these are facts not law! As Alito points out he isn't a doctor and he isn't going to second guess them in the middle of a plague.

<comment><USER10> I do not see any statement from Alito, but he voted with the dissent.

The position of Roberts (writing for the majority) is that:

> Where those broad limits are not exceeded, they should not be subject to > second-guessing by an "unelected federal judiciary,"

Which is to say, even the majority acknlowdges that there are times where the courts should intervene. The question of what a "comparable" secular activity is is very much a legal one.

<comment><USER11> Oh good catch!

</comment></comment></comment></comment></comment><comment><USER12> Two thoughts on apolitical, pragmatic grounds:

This is a good ruling regardless of the importance of religious beliefs one might have. Churches are still subject to baseline rules like building codes, food safety (if they have a kitchen), have to pay their phone bill or else lose phone services,and the like. This represents an appropriate segregation of responsibility and allows parishioners to participate without having to consider externalities.

I also am interested by the prevalence of 5-4 rulings, which are typically taken to imply a highly polarized court (and thus leads to some consternation when the voting is "strange"). Consider the opposite: perhaps all the justices want people to be safe: when they know that five will vote in that way, the other four can safely issue "position papers".

This latter point could be very important to the survival (credibility) of the court. The justices, though they don't face elections, sometimes describe themselves as politicians: if people consider the court illegitimate or irrelevant then their rulings won't be observed. So by signalling that every position is considered they help rope in those disappointed by the result.

<comment><USER13> > The justices, though they don't face elections, sometimes describe > themselves as politicians

Could you cite examples of them saying that?

Generally, the justices go out of the way to insist that they are not political. See, for instance:

[https://www.reuters.com/article/us-usa-court- chiefjustice/u-...](https://www.reuters.com/article/us-usa-court- chiefjustice/u-s-supreme-court-not-politicized-says-chief-justice-roberts- idUSKBN1WA08F)

<comment><USER12> I'm sorry I can't easily lay hands on a link. My statement comes from various speeches given by Justices over the last few decades, which are typically to legal gatherings or to law students. The point is slightly different from the one Roberts made in the article you linked to.

In that he's talking about a perception that the court is not impartial and that the justices are seen as taking positions, and even (by implication) instruction from political parties. This concern, by the way, has existed for a long time, at least to the era of Dredd Scott if not earlier; presidents from Lincoln to FDR and, to a lesser extent to recent times have made the same charge.

And _that_ is the sense in which I have heard various justices (since the 1970s -- I'm an old fart -- through a speech Roberts gave a few years ago which I couldn't find by searching -- in which they need to manage the _perception_ of partiality because the Court is a participant in public life, and indeed in political public life. The sense in which I was quoting is that they are _political actors_ though the entity they are working to protect is the credibility of their institution.

I have no illusion that any judge is superhuman and able to be impartial. But it's interesting to see how Justices' voting tends to shift as they are on the court for a while. It implies a certain independence of mind, though perhaps not from each other.

</comment></comment></comment><comment><USER14> Just to be clear, as it seems not many people actually read the ruling, this is not an injunction on gatherings, but a ruling on the restrictions imposed (e.g. only 25% capacity, maximum of 100, etc.).

<comment><USER15> The rules that were challenged were the 25% capacity and no more than 100 people rules that newsom issued recently, after public outcry that the original rules (no church until phase 3) were inappropriate. The church in question seems to have focused on the 25% capacity portion of the new rules.

<comment><USER16> How are those rules different from the Fire Marshall rules on maximum occupancy?

<comment><USER15> The fire marshal rules take into account the size of each building and the number of exits. Newsom's rules subject small churches and large churches to the same 100-person cap, regardless of building size.

<comment><USER17> Fire rules take into account many factors to ensure the health & safety of the people in the building. A hard cap on attendance (it's 25% or 100, whichever is smaller, by the way) during a pandemic is another example of accounting for factors to protect health & safety.

</comment></comment></comment></comment></comment><comment><USER5> The key part of the dissent is what is a comparable "business" to a church service. I think it is sports arrangement, or perhaps political arrangement, and the Supreme Court justices believe It is a supermarket and manufacturing. I'm not sure how we could find common ground or understand each other.

I do believe the governor could have made the case better by stating restrictions (6 feet personal space, no sharing drinking cups, perhaps no choir in enclosed spaces?) instead of blanket numbers like max 100 people in a service regardless of church size which seems a bit arbitrary.

<comment><USER18> The dissent explicitly lists:

> "factories, offices, supermarkets, restaurants, retail stores, pharmacies, > shopping malls, pet grooming shops, bookstores, florists, hair salons, and > cannabis dispensaries. "

I think saying religion is equivalent to sports is pretty strange. People clearly place way more importance overall on religion than they do on sports, even in a country that's pretty crazy about sport.

I would definitely argue that church is more important than pretty much everything in the latter half of the dissent's list.

<comment><USER19> The question isn't one of importance, but of the danger to individuals from partaking in the activity. Yes, speaking constitutionally, shopping malls are less important than churches. But that doesn't matter if a church service is a religious concerts and concerts (religious or secular) aren't allowed.

<comment><USER5> Just note that shopping malls are closed in California so that is not a reasonable argument. But for example Tesla manufacturing is reopened, is that a comparable activity? I think this whole case is clearly subjective and should not be of course. It would be useful to have a general rule what a church is comparable to.

<comment><USER15> Malls are allowed to open in California, and they are opening.

[https://www.sacbee.com/news/business/article242962581.html](https://www.sacbee.com/news/business/article242962581.html)

</comment></comment></comment></comment></comment><comment><USER20> I'm religious and attend(ed) church weekly. I think this is great news. These idiots who are still trying to gather for church are so incredibly selfish.

<comment><USER21> I don't think it's fair to say that people who make a different assessment of risks and/or have different risk tolerance than you are "incredibly selfish". Lockdown, social distancing, mask-wearing, and other related changes in behavior are all about trade-offs in the face of uncertainty.

Maybe you're right - but maybe you're wrong.

<comment><USER20> Someone could go to a church meeting in one state and get the virus and then give it to someone else who gives it to someone else who gives it to me. x1000. That is selfish. They aren't giving a single thought for the potential ramifications of their actions on people they've never met. Acting in such a way that potentially many people could die, when all you would have had to do was stay home, is the very definition of selfishness.

<comment><USER22> I think you are projecting your opinion.

>all you would have had to do was stay home, is the very definition of selfishness.

Staying at home for extended periods is not the easy thing people seem to project. Social gathering are very important to a lot of people. Religious gathering are the same.

Telling people that there is no "risk analysis" here is both dishonest and dangerous.

<comment><USER20> People shouldn't have to stay home since it is hard?! Walking thousands of miles in the winter is hard. Fleeing an invading army is hard. Living through a famine is hard. Staying at home is not hard. And if it is, learning how to do hard things is a skill that everyone should develop.

<comment><USER22> That's a valid opinion.

It could also be that things are more of a spectrum than black and white.

</comment></comment></comment></comment></comment></comment><comment><USER23> To paraphrase a well known orthodox rabbi in the US who wrote a long letter on the topic where he rules that one should wait where he ends: "we can to wait on returning to synagogue attendence, but we can't bring back a life".

<comment><USER24> It would be nice if churches were a moderating voice but they often do the opposite.

<comment><USER25> Please don't step into religious flamewar on HN.

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

</comment></comment></comment><comment><USER26> Not a shock. Paraphrasing Scalia who wrote years ago, the context was about the 2nd, but his point was there are no absolute rights.

In this case he said that the 2nd (and clarified he meant all rights) is not a license to carry whatever weapon wherever you want for whatever purpose. That the point of the amendment was contextualized and needs to retain that context.

Religious practice doesn't HAVE to take place in a temple. It's reasonable enough to say that at home or safe group sizes during pandemic create less of a burden on the religious than the spread of a pandemic does for everyone.

I understand that that's not how it was decided. But it goes to show that they don't just think in black and white. Kavanaugh is an ignoramus though.

</comment><comment><USER27> [https://archive.md/KTALl](https://archive.md/KTALl)

</comment><comment><USER2> The ruling has not been issued. This is about an injunction before the ruling.

</comment><comment><USER8> arent the riots and protest much greater risk of spreading than a church service? why aren't police breaking them up?

</comment><comment><AUTHOR> PDF of related ruling:

[https://www.supremecourt.gov/opinions/19pdf/19a1044_pok0.pdf](https://www.supremecourt.gov/opinions/19pdf/19a1044_pok0.pdf)

<comment><USER14> Thank you. Maybe this should be the top level link? Unencumbered by the WaPo's editorializing and paywall.

<comment><AUTHOR> Sounds fine to me, mod (aka dang) would need to edit the URL and decide on the title too.

<comment><USER25> Ok, we'll switch to that from [https://www.washingtonpost.com/politics/courts_law/supreme-c...](https://www.washingtonpost.com/politics/courts_law/supreme- court-considers-churches-demands-that-states-lift-pandemic- restrictions/2020/05/29/af07b918-a1b2-11ea-81bb-c2f70f01034b_story.html).

I think the title is probably worth keeping.

</comment></comment></comment></comment><comment><USER28> probably this will rub some people the wrong way but, it amazes me how people put fiction before their well being.

<comment><USER25> No religious flamewar on HN, please.

</comment></comment><comment><USER29> It is really going to be a farce when the same jurisdictions that so zealously enforced the lockdown against churches, the same governors that threatened and said vitriolic things about small anti-lockdown protests, now refuse to enforce those same rules against the people organizing and involved in these mass protests.

<comment><USER30> It will be, but that's not super relevant to this case. California didn't enforce restrictions with any particular zeal and Newsom didn't get mad about the lockdown protests.

</comment></comment><comment><USER31> I am not a lawyer, just an IT guy trying to use logic: the rights in the US Constitution and amendments don't exist. They are not worth the paper they are printed on, because reasoning like this can kill each and every one with the death of a thousand cuts: "However free the exercise of religion may be, it must be subordinate to the criminal laws of the country, passed with reference to actions regarded by general consent as properly the subjects of punitive legislation" (source: Wikipedia article Free_Exercise_Clause).

That reasoning tells that a law (the "criminal law") beats the Constitution by putting restrictions on a Constitutional right. First, it means the law should be considered unconstitutional by any decent logic, but SCOTUS decisions tells it is not. Enough cuts, rights are dead - free speech is the one that mostly exists, second amendment is heavily stripped in most states, fourth and fifth are regularly voided, probably a good lawyer can give examples for all.

What I am telling is that if people consider some rights should be limited, the Constitution should be amended, not ignored. Two wrongs don't make a right, if something in the Constitution is wrong (the rights are too absolute) then raping the Constitution does not make it right.

Please explain me where I am wrong in terms that use logic, especially for someone like me that is a complete foreigner (I live in Europe) and not familiar with these apparent wrongdoings. I am not saying anything in support or against this decision, I am saying this decision does not make sense in the context of the US Constitution text.

<comment><USER14> > That reasoning tells that a law (the "criminal law") beats the Constitution > by putting restrictions on a Constitutional right.

There's a lot to parse in your post, but I would strongly suggest reading J.S. Mill's _On Liberty_ [1]. In it, Mill describes (what is now known) as the Harm Principle[2]. _This_ (or something like this), and not necessarily criminal law, is essentially what the Constitution is beholden to. It just so happens that most crimes also violate ethical principles.

[1] [https://www.gutenberg.org/files/34901/34901-h/34901-h.htm](https://www.gutenberg.org/files/34901/34901-h/34901-h.htm)

[2] [https://plato.stanford.edu/entries/mill-moral- political/#Har...](https://plato.stanford.edu/entries/mill-moral- political/#HarPri)

<comment><USER31> Do I need to read a book of over 220 pages to solve a simple logic problem? This is the problem:

1\. Constitution gives a right: "Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof"

2\. A law restricts the right

3\. A law cannot disobey the Constitution.

4\. Everyone thinks this is fine, including SCOTUS.

You don't have to be Vulcan to see logic is broken.

<comment><USER32> Yes, you do, but here's a short primer.

[https://www.dummies.com/education/history/american- history/h...](https://www.dummies.com/education/history/american-history/how- the-u-s-constitution-is-interpreted/)

Ultimately if you can't be bothered to read a short book on the subject, you can just live with your confusion on the subject. The world can't be boiled down to sophomoric sequences of logic that ignore the complexities of reality and human behavior.

<comment><USER31> So there is no logic explanation of the problem. I am fine with that answer, no need for more.

<comment><USER33> >So there is no logic[al] explanation of the problem.

Logic isn't even the correct framework to apply.</comment></comment></comment></comment></comment></comment>


Ask HN: How to handle clients asking for a design document before hiring. - <AUTHOR> So, I just talked to a client of mine. I bid on his job on freelancing website. The discussion went somewhat like this:
1)Client: Hey, so, you are going building this thing. 2)Me: Hi, yeah. 3)Client:  how are you going to solve this* problem? 4)Me: Well, you could do blah blah or you could do this other blah blah... 5)Back to step 3 (he did this almost 10 times)
He was asking things in excruciating detail. About how I was going to solve each and every problem. It was as if I was writing the algorithm for the problem. I finally had to stop and ask him to send me a requirements doc. And, he now wants an estimate with solutions to each of those requirement.
I haven't worked with this client before. So: 1) Should I really send him solutions to the problems in his requirements doc? 2) Should I even hope that this guy will hire me? 3) Did any of you have a similar experience? If so, how did you handle it? And how did it end?
I would really appreciate any help. <comment><USER3> My $0.02 - free advice is often worth what you pay for it - _caveat emptor_ ...

Tell him you'd love the job, and can provide a portfolio to show that you've done this sort of work before.

Then quote a price to provide the broad outline, and make that a deliverable. Then quote for any given solution to a problem. Make sure that you get paid for each piece of work before you do the next. Make it clear that you always do this until you have a history with a client - it's a clean, clear and professional way of working, especially remotely.

Provide your work in small, valuable deliverables. You're doing work - <USER2> for it. Make it clear that at any point he can take what you've done and go elsewhere, and then charge at a rate where you'd be happy if he did so.

Make it clear that you're doing work, you're spending time, you're using your expertise, and you're happy to do so and get paid for it.

Be cheerful, constructive and helpful.

<comment><USER4> Excellent advice. But from the description of the OP I doubt this will ever go anywhere.

Is this a company or an individual? If it's an individual I would suggest to run. If it's a company then maybe there's a little more hope...?

<comment><USER5> The real epiphany comes when you realize you don't _want_ these types of exchanges to go anywhere. If your intent is to be paid for your work then you have to develop strategies to separate paying and non-paying clients very early in the relationship.

<comment><USER6> This same thought process works for job interviews, too. Let's say that failure to disclose your current salary means you won't be considered for the job. Would you have enjoyed working for that organization anyway? Time saved up front for both parties.

</comment></comment></comment></comment><comment><USER7> No, absolutely not.

1) Unless the client has already signed a contract (and I hope you require a down payment) don't give away the farm. Meaning, don't give him planning, architecture, design, etc. things that hey should be paying for before you are in a contractual relationship that requires him to pay you. You have to protect yourself.

2) Don't work on spec (speculation), ever. That means that if the client wants to see a design before deciding to work with you, walk away and don't look back. No exceptions. This is a giant blinking red signal telling you that this client will not and does not respect the skill that goes into your work, and will be a pain in the ass for you. These people are almost never worth your time or what they are paying you - if they pay you at all.

Respectfully tell this client that your policy doesn't permit spec work. Check out <http://no-spec.com> for resources and details on how to explain this to your client.

</comment><comment><USER8> Not sure if this will help, but this is how we operate at the web design company I manage:

1) Prospect gets in touch with us via email or phone.

2) We send them a "Project Planner". This is a questionnaire with key questions (i.e. "What's the goal of your project?") that we've put together.

3) We quickly review the project and send the prospect an estimate of how much it will cost to develop and an estimated timeline. We make sure to make the prospect know the quote and timeline is based on the ideal that it doesn't includes revisions. Something like: Each revision will extend the delivery date by XX days.

5) If the prospect accepts we send them a contract and ask for a 50% payment before we do any work. If they are not comfortable with that, or the project is too big, we ask for 25% and then setup several payment deadlines as the project moves forward.

6) After the retainer has been paid, we send the (now) client a new questionnaire, called "Client Worksheet". Here we get specific to get to know the client better.

6) Once we receive payment, we make some research on the project and provide some wireframes along with simple explanations on how we think the goal can be achieved.

7) After the client is happy with the final wireframe and signs it off, we proceed to design the mockups. We already know what he likes so usually a couple of revisions is good enough to get final approval.

8) Once the design has been approved we start coding. Most of the "how will it work" has been already discussed through the wireframes, so it's pretty easy at this point.

9) Testing, final payment and launch :-)

Hope this helps!

<comment><USER9> i am just curious about the "Project Planner" and "Client Worksheet" you have mentioned in the comment. that's a good way to collect prospect's idea of the project. Any pointers that'd guide us build such questionnaire ? thanks.

<comment><USER8> Hey,

Sure. It depends on which kinds of projects you usually get though (most of the time we develop WordPress sites). We try to keep the questionnaires as short as possible, while gathering all the info we need.

For the Project Planner we ask things such as (In parenthesis how this helps us):

\- What do you need a website for? (The GOAL)

\- Do you need dynamic content? How often? (CMS or not?)

\- What action(s) should the user perform when visiting your site? (Which CMS? Are there plugins for this?)

\- How many sections will your website have? (How many screens we'll need to design)

\- What's your budget? (Is the client a fit?)

As for the client worksheet:

\- In which market does your business operate? (Helps with research)

\- What sets you apart from the competition? Please provide competitor URLs. (What can we focus in to make it stand out)

\- Briefly describe the need you seek to solve. (What we'll focus on)

\- Color preferences (We also suggest using colourlovers.com to send us a palette if they want to. Otherwise we pick the colors)

\- List two or three sites that you like, either how they look or the way they work (Usually they'll like a certain format or UX)

\---

LMK if you have any other questions. Hope this helps!

<comment><USER9> this will really help, we will add few more questions to suite our client base. thanks for making this clear..

</comment></comment></comment></comment><comment><USER10> It is possible he is using you to learn. Dealing with that is very common in consulting.

There are a few things you can do.

\- Find out who will be making the decision. Insist that you will provide more information as you meet the decision makers. \- Find out what alternatives they are considering. Use this knowledge to better position yourself. \- Explain that are many important details still to be considering that will be addressed as you continue the project.

I am very rusty. But read about Solution Selling. <http://en.wikipedia.org/wiki/Solution_selling>

</comment><comment><USER11> You can tell him WHAT you are going to do but not HOW. I used to have a client who would keep asking me for solution with the lure of a project coming up, but then said thanks, problem solved. I had to jokingly say I need to start charging for consultation for providing solution, but eventually had to fire the client.

But on the other hand, I have clients whom I gave detail proposal on WHAT to be done in the projects and the projects were awarded.

<comment><USER9> i ended my day concluding the same line : >> You can tell him WHAT you are going to do but not HOW.

here is what happened:

my bid was accepted, job poster selected me for interview, he sent me 3 emails straight in last seven hours via private messaging on the bidding site. i asked him to share his contact, asked him to join me in skype, got no response. he continued asking "how would you scale", "how would you fix database..", "how would you speed up the app..", "what is preferred framework for such large project.." i was more concerned about getting my first job via such freelance market, i replied all his queries, spent my day goggling around the questions. when i hit the reply button to his 3rd email, there came a notification in my email inbox "you job application was declined." 3rd email was about preferred mvc framework for his web site.

my bad, this thread was not here yesterday.

</comment></comment><comment><USER12> RiderOfGiraffes is absolutely correct. I often do quite a bit of documentation upfront to make sure the client knows exactly what they are going to get. From wireframes to technical summaries, each is a step in the overall project process (and completely billable). Don't be afraid to shoot down something you think is considered "spec" work such as a bit of UI demonstration or data modeling. They either see your previous experience and trust you or not. Otherwise run away - could be a shitty client.

In answer to your specific case - explain to him that the first deliverable is a "project brief" which summarizes the project and proposed "high-level" solutions. Again - totally billable.

</comment><comment><USER13> Been there done that.

The key is he wants all this detail before committing. This guy is never going to pay you anything, why should he, he is getting you to do everything for free. I have been there hundreds of times and not once has it lead to anything. For all you know, he is another freelancer who is having you do the design work for HIS client by asking these questions. That has happened to me before.

Detailed work requires a retainer paid in advance. Treat this as a lawyer or any other such professional would. Clients get a 30 minute free consultation wher eyou come to understand their problem and if you can help them. Then they make a decision to to hire you or not. If they want you, based on the interview and your reputation, they start by writing you a $5,000 check and you start billing off it. If there is money left over or they change their mind they get a full refund of the amount not spent.

</comment><comment><USER14> Why not charge him for the consulting? You are providing him a service solving these problems (or proposing solutions to them). Make it fair to you and him. If he's not satisfied, you can both walk away. If the project continues, you'll be starting from a pretty good position.

</comment><comment><USER15> There's no such thing as a client you have never worked with before until there is a signed contract. In other words, the person is a potential client, not an actual client.

In my opinion, you just write up a proposal that covers your interests and see what happens - try not to spend more than 1/2 a day on the proposal per $10,000 in revenue.

</comment><comment><AUTHOR> Thank you very much, everyone :) Your comments have given me a lot of clarity on how to filter good clients and how not to fall for spec work.

</comment><comment><USER16> Sounds exactly like what you're afraid of. He's milking you for free consulting. Tell him no designs will be forthcoming until he signs a legally binding contract and/or the first payment is made, depending on how you operate. I would assume that if you give him everything for free, he won't turn around and pay you after the fact.

</comment><comment><USER17> Never do spec work. Never.

Show him your portfolio and examples of solutions you have solved that are similar. Unless a contract is signed, don't do anything more than a nice proposal.</comment>


Why Adobe's mobile strategy is fundamentally flawed - <AUTHOR> http://aralbalkan.com/2895 <comment><USER2> I think when Adobe Flash Builder can compile to native iPhone and utilize true iPhone UIKit (UITableView, UITabBar)so that you can't tell the iPhone app was written in ActionScript 3 - that will allow Adobe to at least have a foothold for it's core customer base, in the form of enterprise / business iPhone apps.

Slider is a step in the right direction.

<http://labs.adobe.com/technologies/flex/mobile/>

</comment><comment><USER3> I don't miss Flash on my iPhone. There's nothing useful Flash can do that isn't better done with HTML 5 or a native app.

</comment><comment><AUTHOR> On the same topic, this response is pretty good: [http://flashmobile.scottjanousek.com/2009/12/26/commentary-o...](http://flashmobile.scottjanousek.com/2009/12/26/commentary- on-a-post-about-adobes-mobile-strategy/)

</comment><comment><USER4> This guy has it in for Adobe in general and has bashed their other products in the past. I think he just is being provocative to get traffic.

<comment><AUTHOR> Its kind of funny, Aral was one of the guys behind OSFlash.org, and a pretty well known Flash guy. I do understand where he is coming from though.

</comment></comment><comment><USER5> The post he links to, <http://aralbalkan.com/2508>, is pretty good too.</comment>


Ranbaxy's fraudulent practices may have jeopardised millions of lives - <AUTHOR> http://www.thehindu.com/business/Industry/a-deception-most-foul/article4753453.ece

<comment><AUTHOR> _On one occasion when Dr. Spreen mentioned her concerns about the quality of Ranbaxy's AIDS medicines for Africa an executive reportedly said, "Who cares? It's just blacks dying."_

Sounds eerie!</comment>


How We Work - Or why we ditched Campfire and moved to Google Wave. - <AUTHOR> http://www.veerwest.com/blog/productivity/how-we-work-or-why-we-ditched-campfire-and-moved-to-google-wave

<comment><USER2> A good use case for Google wave. Though Google wave has not been much of a success, but it has really helped a lot of small virtual companies like the ones mentioned in post to collaborate. Its totally free of cost and saves a lot of bucks!</comment>


Marvel Ipsum - <AUTHOR> http://www.marvelipsum.com/

<comment><USER2> Why does it ask for access to my contacts?</comment>


Transfer Your Google+ Connections To Another Account - <AUTHOR> http://www.technewsbest.com/2012/07/transfer-your-google-connections-to.html

<comment><USER2> It only took Google one year to release this after opening G+ to Google apps accounts.

In the meantime I lost interest. Oh well.</comment>


Serverless Unity Hosting - <AUTHOR> https://www.corepox.net/devlog/serverless-unity-game-hosting <comment><AUTHOR> I did not know you could put Unity in a Serverless function until I tried. AFAIK, this is a first, leveraging Chrome's software renderer to have unity fully working serverlessly. This will seriously save me money.

<comment><USER2> What's the use case?

<comment><AUTHOR> Its the full engine running. You could do anthing!!! Even host a multiplayer game if 1CPU is enough and the the 9 minute timeout is not too short.

But I am using it for image rendering and later, video replays. Its low traffic stuff that is expensive to host on a dedicated VM.

<comment><USER2> But why would I load the full engine when I could code the server in a more sensible way? Your use case makes sense, though.

<comment><AUTHOR> Coz coding server the existing way require upfront provisioning and a ton of waste, plus a load of devops nannying (oh no my game is down because of logs again). Keeping servers running is a constant game of wack-a-mole of edge cases, sometimes introduced applying regular software patches. Stateless ephemeral compute is so much easier, if you can offset the latency tax.</comment></comment></comment></comment></comment>