The Big Five in tech are paying like the Big Four in sports - <AUTHOR> https://adamconrad.dev/blog/the-big-four-sports-or-tech-companies/ <comment><USER3> This article is comparing starting salary for professional sports, vs "Staff engineer" salary.

The average MLB salary dropped slightly in 2019, but still north of $4million

src: [https://www.espn.com/mlb/story/_/id/28341983/average-mlb- sal...](https://www.espn.com/mlb/story/_/id/28341983/average-mlb-salary-drops- second-straight-year)

<comment><USER4> The article is so far off as to be laughable.

Here's the top salaries in MLB:

[https://www.spotrac.com/mlb/rankings/](https://www.spotrac.com/mlb/rankings/)

The top 141 players are making $10m or more per year (and that keeps rising year after year). The big five in tech don't come even remotely close to paying the way professional sports does and that includes the top thousand engineers. It's closer to a 5%-10% _total_ compensation ratio at best (including stock-based compensation), in terms of elite athletes to elite engineers.

There are too many engineers and they're too replaceable, versus a Lebron James or Mike Trout. Those players are among the few best in the world at what they do, in a field with a very small number of people being compensated and from a relatively massive pie (MLB money is being split between just ~750 primary players; ~1200 including reserves).

Everything about the comparison is off by a large margin.

<comment><USER5> Are you questioning the article where the link to the 500k salary is a 404? For shame!

</comment></comment></comment><comment><USER6> It's not really relevant to the overall point and I know it's fuzzy estimates anyways but there's a mixup in stocks and flows. linked Quora source says:

>L6 is staff engineer. Only about 15% of Google engineers are at this level or higher

And the post:

>People who make it to Staff engineer at Google per year: 1,875

I'm not sure about google but at Amazon there's definitely not that many people making it to principal/staff every year.

<comment> compiler-guy No way that 1,875 people are promoted to L6 every year.

I have no idea how he gets from "15% of google engineers are at this level or higher" to 1875 people, and then on to that many being promoted.

I might believe that 1875 is the total number of engineers at L6 or above across the company. Seems slightly low, but not impossible. But I guarantee nowhere near that many are getting promoted every year.

Also, making L6 is in no way guaranteed. It takes years.

</comment></comment><comment><USER7> The question is how long it's going to be like this? There's a sense that the software industry is living its golden years and salaries wont stay high forever. And boy, when my RSUs hit 0 I wish I stayed in better shape to join a three-letter industry like NBA or NSA

<comment><USER8> The biggest threat to Big Tech is regulation, but these companies are so deep- pocketed they could regulatory capture and lobby their way out of anything. There could be minor setbacks for the unicorns who haven't been doing so well in public markets, but this isn't a 2000-esque situation that would impact all companies: just the late arrivals who existed at the right place at the right time, when way too much capital was chasing far too few opportunities (the Lyfts/Ubers/AirBNBs/etc).

<comment><USER9> You seem to assume that the current tech investment bubble will gently deflate with minimal collateral damage. But judging by the historical record, it's far more likely to go out with a bang along with a general market overcorrection, the least of which is a whole bunch of startup software engineers suddenly looking for a job. Google had almost nothing to do with the GFC, but it still froze hiring for a while in 2008 when Lehman Brothers collapsed.

<comment><USER4> The salaries will be there so long as the profit and margin is there to pay them, versus the relative scarcity of labor supply. It's that simple.

Microsoft, for one example, will double in size in the next ten years and they're already generating ~$50 billion per year in operating income (next four quarters).

They're going to fire people while doubling in size, from their already extreme scale? Nope.

Adobe is now worth as much as SAP. They're booming, extracting vast profit from their global cloud business. They'll more than double in size in the next ten years, their operating income will zoom from $3b to $6b or more. They're going to fire people in that environment? Nope.

The same is true of Google, Facebook, Amazon, Apple.

Apple will fire people while generating $60-$70 billion per year in operating income? Nope.

So where will the labor slack come from in tech to reset salaries lower? It's not going to.

Plus, the Fed has its hands all over the financial system in several ways that it didn't in 2007. Rates will stay perma low by necessity, they'll drown everyone in inflation before they allow rates to ever rise beyond 3% again for a consequential duration of time (it'll bankrupt the US Government, they can't allow it for the same reason Japan couldn't). Those perma low rates will provide a very large support base under valuations and will persistently push money to chase greater risk (public multiple expansion; and VC capital flowing very freely).

When there is inevitably a large downturn or correction, the low rates and massive QE injections will make the bottom higher than it otherwise would be. The next downturn will be far more gentle than the great recession (and the bounce back to prime conditions also might be even slower).

The only way any of this changes substantially, is if US tech is decimated by foreign competition. US tech can pay so well because they dominate globally, extracting vast global profit and paying a relatively small number of employees (vs the profit scale) from that big haul. That's the equation that has to change to drain US tech salaries.

<comment><USER9> That money does not come from thin air. If the rest of the economy implodes or even stalls, it means less companies buying ads and less people buying new shiny iDevices, which _will_ impact FAANG as well.

As for foreign tech eating American tech's lunch, it's pretty clear that the next big social network will be (already is) TikTok, which is Chinese.

</comment></comment></comment></comment></comment><comment><USER10> Tech does NOT pay like pro sports* and will not until workers get organized enough to form a collective bargaining agreement or something similar. Could software engineers do that? Lawyers and accountants have successfully guilded. And Partners get paid a lot more than Staff engineers. But tech companies strongly prefer having engineers as employees versus farming out work to firms. Software engineers have also been walled off from competitive salary information for many years (before Glassdoor or levels.fyi). This blog article should be seen as a potential aspiration versus a present day achievement (which isn't true anyways).

* In addition to other counterarguments noted here: not everybody makes Staff engineer (many consider Senior terminal) but every rookie in sports gets a similar deal; athletes get cold hard cash but in tech a large part of total comp is tied to stock; athletes can get endorsement deals; athletes don't "work" 12 months a year; athletes usually retire long before age 65.

<comment><USER11> We have a collective bargaining agreement and a huge Union where I work (Germany). The pay is still much less than USA for the same type of jobs.

<comment><USER12> A bit offtopic, but interested to know: having such a union/agreement - <USER2> it mean you cannot bargain to get higher salary just for yourself?

<comment><USER11> You can have a talk with your manager to move to the next level on the Tarifftable, but these are extremely well defined. Another option is to move out of the agreement and get a free lease on a car, but it is not a very good idea.

</comment></comment></comment></comment><comment><USER13> Accurate headline but incorrect analysis.

Big Tech pays like sports, not because of average salary levels, but because of the _spread_ between highest and lowest paid engineers.

Let's say an entry level role in big tech pays about $200k per year in total comp.

It would not be surprising for your top engineer (Jeff Dean ~= LeBron James, e.g.) to rate north of $10m in annual total comp, so 2 orders of magnitude difference.

Multiples in sports are higher, but the point I'm making is that just as LeBron makes multiples of what a bench warmer does, so do the Jeff Deans of the world make multiples of what new college grads do. This is a markedly different landscape vs say, the late 90s when spreads were much MUCH tighter. Unfairly so in my opinion.

Disclosure: I work for Google but have no special knowledge of Jeff Dean's (or any other superstar) comp. I simply claim I wouldn't be surprised if I ever learned the real numbers. :)

</comment><comment><USER14> I do think it would be more fun to make 500K at age 20 than at age 37 so those athletes do have that going for them.

<comment><USER8> Yeah, but at 37 you're not going to be suffering brain damage in a FANG job. Sitting at a desk sure beats getting tackled for a living.

<comment><USER7> > you're not going to be suffering brain damage in a FANG job

wouldn't be so sure about that

> Sitting at a desk sure beats getting tackled for a living

standing desks exist and some of the sports mentioned don't have tackling at all (MLB)

<comment><USER8> There's enough people in the software industry for long enough to know if routinely subjecting your brain to deep analytical thought 40 hours a week would be in any way brain damaging. If health data is attached to employment data, it could be teased out. But there are studies that absolutely confirm the brain damage incurred from an NFL career.

<comment><USER15> Perhaps they meant a different type of damage.

</comment></comment></comment></comment></comment><comment><USER16> Wait... these numbers doesn't make sense!

# of software dev jobs per US gov: 1,365,500 [1]

# of people employed by big tech (FAANG+Microsoft): ~500k

Assuming 30% people are dev, still this would mean ~10% chance that given person with software dev job is in big tech. So sports comparison doesn't sound sound.

[1] [https://www.bls.gov/ooh/computer-and-information- technology/...](https://www.bls.gov/ooh/computer-and-information- technology/software-developers.htm)

</comment><comment><USER17> And yet the athletes are still smarter than the geeks... They have a union...

</comment><comment><USER18> I have to imagine more people than that are being hired out of college every year at all of FAANG.

<comment><USER8> Junior engineers probably aren't as appealing to FANGs. You have to train them, and teams built of senior engineers may not want to put the time into doing the training.

<comment><USER19> Junior engineers are very appealing to most big tech companies because there are lots of them and they need to hire lots of engineers. Also, the smartest engineers with zero years of experience are all looking for a job. The smartest engineers with n > 0 years are mostly happy where they are.

The main exception AFAICT is Netflix, who really prefers not to hire new grads.

<comment><USER20> It's definitely a mix. You can't hire just juniors because you need seniors to mentor/train them. You also probably don't want just seniors because as you said, they need the bodies. Add to that the fact that you must expect people to leave, so you have to plan for the future.

If you can manage a balance of both, depending on the individuals in the team it can end up being beneficial as juniors level-up and seniors tackle the higher-level stuff.

</comment></comment></comment></comment><comment><USER21> average != median

<comment><USER22> Arithmetic mean, median, and mode, are all measures of central tendancy, and are called "average". Median is often popularly considered as _the_ average, but that's not strictly true, and an unambiguous use references one of the _specific_ measures.

Stating that median or mode are _not_ average measures is also false.

[https://www.thoughtco.com/measures-of-central- tendency-30267...](https://www.thoughtco.com/measures-of-central- tendency-3026706)

[https://www.thefreedictionary.com/average](https://www.thefreedictionary.com/average)

<comment><USER21> No offense but that's a pedantic distinction. "Average" is commonly understood to be arithmetic mean.

The point of my comment is that if the compensation is truly showing the average / arithmetic mean, then the data is skewed by outliers. If it's the median instead, they should should say so.

<comment><USER22> Precision in thought and expression can often hinge on such pedantry. A word itself deriving from _pedante_ , "teacher": [https://www.etymonline.com/word/pedant](https://www.etymonline.com/word/pedant)

The roots of _average_ come from shipping, "any small charge over freight cost", from French _avarie_ "damage to ship".

The notion of _which_ average specifically is meant varies, the association with "mean" dates only to the late 18th or early 19th century.

[https://www.etymonline.com/word/average](https://www.etymonline.com/word/average)

What's ironic in the argument between _mean_ and _median_ is that they do in fact share the same root of the Latin _medius_

[https://www.etymonline.com/word/mean](https://www.etymonline.com/word/mean)

[https://www.etymonline.com/word/median](https://www.etymonline.com/word/median)

And again, in current dictionary usage (as well as my several uni stats courses), you'll find that "average" applies to _any_ of the measures of central tendency, though yes, "mean" is probably most commonly (and ferverantly, as you demonstrate) understood.

Merriam Webster, first defintion:

average: 1 a : a single value (such as a mean, mode, or median) that summarizes or represents the general significance of a set of unequal values

[https://www.merriam-webster.com/dictionary/average](https://www.merriam- webster.com/dictionary/average)

Which makes the argument of your initial comment, that the median is _not_ a meaning of "average", again, false.

<comment><USER21> > Which makes the argument of your initial comment, that the median is not a > meaning of "average", again, false.

As you note, my point is that "average" is most commonly understood as mean.

The original article seems to fall prey to the classic mean-vs-median distinction. The compensation numbers being presented do not necessarily represent what one would expect. FAANGs are known to give a small number of employees multi-million-dollar comp packages -- that will skew the average (erm... mean) but not the median.

<comment><USER22> Fair point, and a highly useful one to keep in mind when looking at long-tail vs. normally-distributed statistics.

The article ... contains numerous misspellings and other flaws (I can note though not really complain as I do similarly...), but yes, really should note _which_ of the various available "average" values it's considering.

</comment></comment></comment></comment></comment></comment><comment><USER23> As a nerdy person, I find this satisfying.

</comment><comment><USER7> I bet a high payed software engineer is still better at playing sports than a low payed sports player at coding</comment>


Bezos's likely Amazon successor is an executive made in Bezos's image - <AUTHOR> https://www.washingtonpost.com/technology/2020/09/10/amazon-bezos-successor-jassy/ <comment><AUTHOR> [https://archive.vn/F5Qjk](https://archive.vn/F5Qjk)</comment>


*JS : Low-Level JavaScript - <AUTHOR> http://mbebenita.github.com/Mvm/ <comment><USER3> Why does malloc take a byte count, just to divide it by sizeof(u32)? Why not embrace the fact that natural "word" in the JavaScript VM is a boxed value that stores an int, float, or string, and define sizeof(u8) === sizeof(u16) === sizeof(u32) === 1? Unless you really want each cell in your memory arena to literally emulate a byte and always store a value between 0 and 255?

In a similar vein, why not use the native JavaScript object type to back the structs? This will cooperate nicely with the inline caching in typical JavaScript JITs. The result will be native assembler that indexes directly into the structs in the way you'd hope, since your static typing system forces every object reference to be monomorphic.

Does this language actually eliminate GC pauses? Isn't the GC still going to run, except now it has to walk every single cell in your memory arena every time, defeating the very heuristics that GCs use to reduce pauses?

There's definitely something alluring about the static typing, but I'm less sold on the manual memory management. Maybe there is a way that the language could help you generate less garbage, without actually requiring you to manually control the lifetime of each object?

From your linked-list example, it's eminently clear that it needs a C++-style template system and a port of the STL :) If you wrote a C-to-*JS translator, you could hypothetically use a pre-existing cfront (C++-to-C translator) and STL implementation to get that working.

<comment><USER4> > Does this language actually eliminate GC pauses? Isn't the GC still going to > run, except now it has to walk every single cell in your memory arena every > time, defeating the very heuristics that GCs use to reduce pauses?

Yes, this eliminates GC pauses.

The JS GC will only run if allocations occur, allocations in the sense of actual JS objects. If you do malloc which amounts to manually handling indexes in a single array, no JS objects are created and destroyed.

Also, JS GC's would not walk the memory arena. The memory arena is just an array of numbers, it does not contain native JS references which is what the JS GC traces.

<comment><USER3> I meant the synthetic memory arena, the JS array that malloc() and free() manage. That certainly could contain JS references and needs to be examined by the GC.

I don't think you can actually avoid GC by avoiding JS object allocations. Any form of string manipulation, any form of IO (event handling, DOM manipulation, XHR), any use of timers, etc, is going to allocate objects, right? Also, the JS runtime could generate garbage internally. For example, since JS has closures, it wouldn't be totally unreasonable for the runtime to manage the lifetime of activation records (JS stack frames) using the GC.

<comment><USER5> The memory arena is a typed array, which cannot contain object references and so does not need to be scanned by the GC.

If you keep JavaScript object allocations to a minimum, then GC pauses will be short and infrequent. This could actually be useful to write a game render loop or any other code that can't tolerate pauses.

</comment></comment></comment></comment><comment><USER6> I understand low level languages going high level. But high level languages going low makes me frown very intensely.

Btw if you like this kind of thing, you will love Caterwaul JS. My best frowning faces are made reading that language.

<http://spencertipping.com/> / <http://caterwauljs.org/doc/caterwaul-by- example.pdf>

<comment><USER7> In practice, most safe languages provide back doors and foreign interfaces to unsafe code. Look at Obj.magic in Ocaml, or unsafePerformIO in haskell, or ffi/unsafe in Racket.

But on the web, you obviously can't tolerate _true_ unsafe back doors. This project gives you something that is "unsafe" in that you can read or write to parts of the allocated "heap" buffer that you aren't supposed to, but it's not possible for that to violate _JavaScript_ 's safety. And the compiler is generating extremely optimizable code, so it JITs very, very well.

On top of that, the fact that it's all implemented on top of a simple API (typed arrays) means that you could compile in a safe mode that does extra checks, or even trap all memory traffic and build valgrind-like diagnostic tools. It's starting out as a virtualized abstract machine, which means it's easy to hook into and provide great development tools.

I probably wouldn't reach for this kind of dialect for most purposes. But for very performance-sensitive kernels, it's got promise. But it's an experiment, so we'll see!

<comment><USER8> Dave, is there any way to get involved?

There would always be the option of running the code out into a raw VM host using NaCL or Xax style container (I know Mozilla dont see these approaches as necessarily compatible with the open web). But to take an approach like boot to gecko to the next level and being compatible with low power usage, I dream of running near native code - inline SSE/Neon with a fallback to generic code.

<comment><USER9> Why not extend the typed array API to include SIMD operations on multiple array elements, we can compile to use those and special case them in the JIT.

<comment><USER8> Makes perfect sense.

I'm also thinking how the vm/language could self extend in the field. How the SIMD extensions (or any feature) could be introduced a-posteriori or independent from browser release cycle.

</comment></comment></comment></comment></comment><comment><USER10> Cool. Does anyone else write their code with the * after the type, instead of before the variable? Like int* x; as opposed to int * x; to me int* is the type of x, so keeping it together makes sense. Like a function returning an int pointer would be - int* myfunction(); or type casting something (int* ). Putting the * before the variable and not as part of the type just seems unintuitive. Anyone else agree/disagree?

edit: another point - putting * before the variable makes me think of a dereferencing operation, and that's part of why putting it before the variable name in declaration is unintuitive, and very confusing to people learning C.

<comment><USER11> This style rests on the premise that C declaration syntax is:

      <type> <space> <name>

It isn't, and using the style is misleading people to think that it is.

You can't write:

      int[10] a;

You write:

      int a[10];

Basically any type that involves more than a base-type and a pointer is going to fail to work with that style, and then you will lose uniformity as well.

There's actually a pretty good reason for the way C syntax is: The declaration and use syntax are virtually identical, and the precedence rules are identical. It's nice to only have to learn that once.

The fact the * before the variable looks like dereferencing is _intentional_ , you're supposed to read this:

      int *x;

as: "Declare the dereference of x to be an int".

And this:

      int (*(*x)(void))[10];

As "The dereference of x is a function of void, the dereference of which is an array of 10 ints".

<comment><USER10> The declaration and use syntax of pointers is not 'virtually identical.' int* a; could be used to set int* b = a; or int c = * a; or int* d = &a;

Also for arrays it's unfortunate the syntax is like it is, because int a[10];, is of course a pointer and would be a bit more intuitive in the form of int[] a = new int[10];

Also you say * before the variable 'looks like dereferencing is intentional.' but is it really? what's your source?

<comment><USER11> You are misunderstanding.

I'll start from what you said about arrays:

> because int a[10];, is of course a pointer

This is a common misconception about C.

      int a[10]

defines an array, _not_ a pointer. typeof(a) is int[10], and not (int ptr). The thing is, whenever you take the _value_ of an array in C, it is degraded to a pointer to the array's first element, and this confuses people to no end that arrays are pointers.

For example, if we declare:

      int a[10];
      int *b;

Then sizeof(a) and sizeof(b) are very different. typeof(&a) is pointer-to- int[10], whereas typeof(&b) is pointer-to-pointer-to-int.

      void f(int (*x)[10]) { ...
      }

If you call:

      f(&a); // will type-check
      f(&b); // will not

So the syntax for declaring arrays is fine, and when you declare an array, no pointer is being declared at all.

This is C syntax for type declarations:

      <base type> <type declaration here>

The "<type declaration here>" part uses virtually the same syntax as use syntax.

For example, if x is a pointer to a function that returns a pointer to an array of floats, you could reach a float via this syntax:

      (*(*x)())[1]

You could declare x using this syntax:

      float (*(*x)())[10];

The main differences are:

* Array size instead of index

* There's no requirement to dereference a function pointer to call it, but there is a requirement to use the dereference syntax to declare it.

* Array values can be used as pointers to their first elements (due to the automatic degradation), but must be declared as arrays.

</comment></comment></comment></comment><comment><USER8> I like to see this line of work.

I'd really love to see a Frankenstein of:

* C/Javascript/Lisp on an augmented LuaJit (structs, efficient array slices, machine word types).

* dual syntax interchangable S-EXPR and C{}.

* lang(machine) { instr over machine } blocks. Where machine is either a syntactic transformation or a way of hosting binary code in another language and interchanging objects.

* raw continuations and stack management.

* explicit and implicit memory management.

* language profiles to allow assert() and compilation failures based on feature set used to allow different restricted forms of the language to be used according to the position in the software stack the code is targeting (embedded, client, server, enterprise boilerplate). eg. profile(no-gc, no-lang, must-types)

* full ability to specify code to execute and participate at: edit/view, compile (pre-process, parse, code-gen etc), link, load and runtime (debugging, re-jit, trace analysis).

</comment><comment><USER12> I love how they name languages like *JS or C! so I can't google them later.

<comment><USER7> Just a temporary name. We're tossing around name ideas. Michael's a true hacker. He writes code first, asks questions later. I'm more useless, so I like to think about names. ;-)

<comment><USER13> I'm going to throw 'J--' into the suggestion box. :-)

<comment><USER14> Jscape?

<comment><USER15> Ecmalang?

</comment></comment></comment></comment></comment><comment><USER16> Not really into high speed javascript, but wouldn't you be able to achieve the same kind of memory reuse by simply using factory methods patterns that would reuse object instance from a pool instead of reallocating ? It's the same kind of tricks we use in ios / android programming when we want to avoid memory allocation or garbage collections...

<comment><USER17> Using the pattern you describe you could only reuse the same kinds of objects. With a general heap you could reuse the memory for arbitrary structures.

</comment></comment><comment><USER18> I have a problem with this line:

        Objects in JavaScript are not cheap, they need to carry
        around lots of extra information and can be many times
        larger than their C style counterparts, moreover property
        access is slow.

It's easy to say "X is not cheap, Y is slow".

It's much more valuable to actually prove it with numbers that show _where_ it's fast and _where_ it's slow.

In my experience, object creation and property access is almost never the bottleneck, and GC pauses only are relevant (in v8 at least) if you're leaking a large number of objects, especially where those objects are of mixed generations. (Ie, have a lot of long-lived and short-lived objects that refer to one another and occasionally leak.) That is, if you are getting hit with long GC pauses, then it's worth re-thinking your design and tracking down objects that may be leaking.

Newer JS engines (ie, the ones that implement TypedArrays) already highly optimize object creation and property access. The benefit therefor seems slim and highly niche. Looking at the generated code, it seems like the debugging cost is going to be very high, and it drastically increases the number of lines that the programmer has to write, which will increase bugs.

I could see the value in certain niche situations, but I would really like to see the performance characteristics explored more fully.

<comment><USER7>
        It's easy to say "X is not cheap, Y is slow".

Yeah, I probably wouldn't have worded it that way. I think the better way to look at it is, it's hard to know how to predict the performance of JavaScript, given the complex, dynamic, heuristic optimizations performed by modern engines. This project is better thought of as an attempt to build a dialect of JS that can be more easily tuned for performance, because its performance model is simpler than that of JS.

If I were going to try to make that claim more precise, I might do some experiments to demonstrate the high _variance_ of object performance in modern JS engines.

        I could see the value in certain niche situations...

That's really the idea. This isn't meant to be an alternative to JS, but rather a tool for performance-sensitive kernels. Interoperability will therefore be key, because it has to be easy to write just a small component of a larger app in this dialect while smoothly integrating into the rest of the app.

        ...but I would really like to see the performance characteristics explored more fully.

Perhaps. I'm skeptical of our ability to accurately measure general claims like "objects are slow" or "X is easier to program in than Y" or "*JS is easier to performance tune than JS." But I do think it's easier to evaluate those claims, at least informally, after you've built something you can experiment with. Hence this experiment!

</comment></comment><comment><USER19> I'm a bit confused by the "it compiles to JavaScript" part. I would've expected it to compile to C.

<comment><USER7> Think of it more like C (really more like a hybrid of C and JS) compiling to JS. It runs on the web, but it compiles to a very stylized kind of JS: it allocates a large typed array that represents a C-like heap and does its memory access on that typed array. This is the same basic approach that Emscripten uses for running C/C++ programs.

The purpose of this project is to experiment with a dialect of JS that integrates well with regular JS, so you can write performance-sensitive parts of your application in this dialect, and they can interoperate smoothly with the other parts of your normal JS code.

</comment></comment><comment><USER20> Cool! For a while I've been pondering a similar idea with the goal of cross- compiling the language to idiomatic C and JavaScript. The JavaScript translation would necessarily be less than perfectly idiomatic, but it would be more idiomatic and have better performance and smaller size than the code generated by Emscripten. The intent was to use it for high-performance applications like games.

</comment><comment><USER21> This is interesting - who is doing this? and where?

<comment><USER7> This is a project run by Michael Bebenita at Mozilla Research, along with our colleague Shu-Yu Guo.

</comment></comment><comment><USER22> Has Typed Scheme shown that this approach yields significant performance gains or do js typed arrays not have a scheme counterpart?

</comment><comment><USER23> Performance matters. An efficient JavaScript dialect is very much needed indeed.

Another solution would be to include a C compiler in every browser, with some DOM thing binding and a convenient JavaScript bridge.

It will be interesting to see what optimizing interpretors can get, performance wise, when source code uses "performance friendly" features only.

<comment><USER24> Serious question. Do you browse the web with Internet Explorer?

V8 and the new Mozilla engine are optimized to hell already. And they compile to native code. [http://kailaspatil.blogspot.com/2011/08/jaegermonkey- archite...](http://kailaspatil.blogspot.com/2011/08/jaegermonkey- architecture.html) And they are efficient.. These engines have proven that you don't need pointers or explicit types to be an efficient Javascript implementation.

The only reason that I can see for these types of features like explicit types and pointers are to support systems programming, where they are required for certain activities (probably less that you would think though). For that, I would really love to see a CoffeeScript with those features available for use optionally. I think to do that you would want to find a way to compile directly to machine code or assembly or LLVM bytecode or something like that.

<comment><USER8> There is still a lot of performance slippage out there in high level languages (eg look at the need for assembly when people write raw codecs in C - <USER2> etc). We are rapidly approaching the battery wall on mobile devices and the clock wall is already here. ISA's may be extended to support dynamic languages more efficiently (tags, direct uop translation from user specified instructions) - but right now at a given TDP static execution is greener for many applications than dynamic, and history has shown us cpu vendors are unwilling to go down this path.

Javascript is anything but efficient right now - some code paths are fast but with a high startup cost. Look at the startup problem with Chrome/V8 for instance, or watch a nodejs application hit the GC wall with 800MB of live data.

There are times when static is faster than dynamic and vice-versa. Times when heavy upfront compilation is better than incremental run time analysis and vice-versa. As the clock wall, TDP wall and process communication wall hits we need all the tools available to exploit maximum performance.

<comment><USER24> I'm proposing to compile as much upfront as possible, more than the default for those engines. But for something like JavaScript, without the types specified or inferred in all cases, you can't necessarily compile everything upfront. Type inference would be much better than requiring manual specification of all types.

I think that it is just much better software engineering to improve the GC and JIT compilation rather than to code all of the memory management and types manually or use pointer tricks. If you are building a codec or critical part of an operating system then you may need assembly or well-defined types for static compilation.

It would be nice to have the memory management and other features available for when you need them but I don't think they should be the default.

Anyway I think it could actually be useful to find ways to remove the separation between assembly-level coding and higher level coding. For example, if I were writing a codec in CoffeeScript, I could would probably write something like interleave.highBytesFromQuads rather than PUNPCKHBW.

<comment><USER8> I agree totally about removing the separation between assembly level coding and higher level coding.

With current ISAs no matter how much genius is thrown at GC/JIT its always going to yield a layer of overhead. The pipes are a fixed with, the caches a fixed size - the plumbing is static.

Below this floor a thinner abstraction will yield greater performance. The thinner abstraction is useful to implement GC/JIT. Any language that wont let you bust outside of the GC heap is always going to hit a pain point.

Until a language can self host with no significant efficiency loss there will always be another language to wedge under it. Until a platform has a mechanism to expose its raw feature set up to a hosted language we will forever be in a world of software rasterizers, sluggish Java UI, where software developers re- implement functionality that highly tuned hardware pipes already provide.

Better to be able to write using interleave.highBytesFromQuads and better to able to include your implementation of this using a punch thru to PUNPCKHBW where available or an emulation where not. I guess its the old argument of high level interfaces versus low level. Useful high level abstractions appear over time, but without access to the low level we cannot experiment and build them on a rapid cycle.

I'm sure some OS vendors would like to keep the browser crippled - because in the natural end game their OS doesnt need to exist as an expensive product. Its good to see Mozilla pushing the boundaries.

</comment></comment></comment></comment></comment><comment><USER25> As a C programmer I like the concept but debugging is going to be a nightmare. Look at how pointers translate to Javascript. I don't foresee being able to debug anything with code like that in Chrome Developer Tools.

<comment><USER26> The code is still very young (less than a month old). Debugging in C is done by printing hex values and using valgrind, so debugging here can be done by printing hex values (array indexes in the heap or stack) and creating a valgrind that runs at about the same speed as a non-valgrind session, since valgrind can be implemented in the js engine.

<comment><USER9> Actually, you could build something like Valgrind quite easily. You can replace the underlying heap with a JS proxy and trap all read/writes, it would be a fun project.

</comment></comment></comment><comment><USER27> If it ever gets popular, it will happen _despite_ its name. Googgling it would be a flicking nightmare. Or change the name now, before it spreads.

</comment><comment><USER28> I was skeptical at first, but I've been writing so much Go lately that the struct syntax, typing and pointers would be lovely to be able to utilize in a web app without having to go so extreme as to use Dart.</comment>


Re-creating some of Hey's features using Fastmail - <AUTHOR> https://www.nunodonato.com/2020/06/25/a-guide-on-re-creating-heys-features/ <comment><USER2> This is cool, thank you for posting. I gave it a try but... I don't think it's really there. I think the thing that Hey figured out is that the best way to sort mail is by sender. Due to DKIM, SPF, et all, it's the only part of an email that can't be spoofed. So they've made a system totally built on that, with single clicks to move senders to different buckets.

Yes, you can do that in Fastly, but it's a cludge. You have to maintain contact groups, which means that every new sort "rule" involves a contact add plus a visit to the contacts page to put them in the right group. There's nothing stopping Fastly from making this dead simple, but it's not dead simple right now.

And on top of that, there are benefits to building a UI around Hey's rigid bucket structure. The "feed" area, for example, shows the first few hundred pixels of every email just like it's a feed reader. You get the cool "focus and reply" screen for emails you've put off.

I think, if you really like Hey, use Hey, don't try to recreate it somewhere else. If you're on Fastly, you probably already have a really good system that works great for you, so stick with that.

</comment><comment><USER3> Thank you [1]!

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

</comment><comment><USER4> Love to see this for gmail

</comment><comment><USER5> This was great, thanks for sharing!!</comment>


Ask HN: Train your own text to speech voice? - <AUTHOR> I've been recording oral histories from my family over the holidays, and it got me thinking that it would be neat to train a TTS voice for some older members of the family. CircumReality is the only free, complete package I've found -- but it doesn't seem to have been updated for years (and is Windows only).  Are there any other good resources to train a text-to-speech voice? <comment><USER2> This isn't exactly a productive comment, but I just wanted to say that it's extremely thoughtful to do that for the elders in your family, and I'm sure they would appreciate it immensely. Now that you've given me the idea, I want to do this for my grandmother while she is still in good health. Thank you!

<comment><AUTHOR> You might also be interested in checking out storyworth.com!</comment></comment>


Ask HN: How to get myself into startup thinking mode? - <AUTHOR> After spending a couple of years working in big tech, I have developed a habit of thinking it through. Hence, I think about software dev as just 20-30 percent of the solution, while worrying equally about CI/CD, testing, security, logging, operations and much more.<p>I am now unable to develop something hacky/dirty prototype style stuff to see and experiment. Even bad indentation bothers me. I want to do weekend projects just for the fun of it but I can't. Is there a way to out here? <comment><USER2> Be attached to the problem not the form of the solution. The user of your software doesn't care about any of those things they don't experience.

Recently I had to analyze some source code, trace 50-100 endpoints to mutating transactions, and document them in a concise format. I ended up making a utility to do this. It did exactly enough so I could copy+paste the results and no more. It was a hack that ran ripgrep twice over the same files and gave partially organized results that another program condensed into a who-calls tree and finally turned upside-down to be caller-callee tree for copy-paste.

Have exact use cases. Know what your user wants to do and why. Know all the things that don't matter to them and steer away from those.

The other things you speak of is Craft (or at its worst golf). I enjoy the exercises but don't fool yourself into thinking this is getting you anywhere close to a product.</comment>


European Parliament TTIP vote postponed 'because of huge public pressure' - <AUTHOR> http://www.eureporter.co/frontpage/2015/06/10/european-parliament-ttip-vote-cancelled-because-of-huge-public-pressure-say-green-meps/ <comment><USER2> TTIP and CETA need to go away. The trade aspect isn't terrible. Everything else is.

Treaties shouldn't be negotiated in private and withheld from scrutiny. Not anywhere claiming to be democratic.

ISDS is just wrong. TTIP opens the way for companies to use a supranational, binding court of arbitration to sue any country that impacts future profits. If a country, for instance, changed environmental protections, worker rights, food safety standards, whatever, they can be sued for large sums.

It's anti democratic and it hands sovereignty over to business interests. It's being pushed by bureaucrats and lobbyists who have tried their damnedest to keep it out of the light. To the extent that even MEPs have had to sign an NDA before being allowed to set eyes on a draft (we know this because one or two broke the NDAs)

[https://stop-ttip.org](https://stop-ttip.org)

<comment><USER3> You are aware that ISDS already exist and have been a part of trade deals for at least 20 years?

TTIP may extend these rights, and it certainly should be negotiated in such a secretive way, but the ISDS provisions are nothing particularly new. ISDS exist because national courts are not always unbiased, and may unduly favour the host nation.

<comment><USER4> I live in South Africa, which is currently renegotiating or terminating all such treaties because we've discovered first hand that it allows corporations to evade or set government policy.

Just because it isn't new doesn't mean we should shrug and accept it.

</comment></comment></comment><comment><AUTHOR> Booklet on TTIP and Digital Rights, [https://edri.org/ttip-and-digital-rights- the-booklet/](https://edri.org/ttip-and-digital-rights-the-booklet/)

From [http://www.theguardian.com/business/2015/jun/10/obscure- lega...](http://www.theguardian.com/business/2015/jun/10/obscure-legal-system- lets-corportations-sue-states-ttip-icsid)

 _" Brazil has never signed up to this system – it has not entered into a single treaty with these investor-state dispute provisions – and yet it has had no trouble attracting foreign investment."_

<comment><USER5> [http://www.tradingeconomics.com/embed/?s=brazilfordirinv&d1=...](http://www.tradingeconomics.com/embed/?s=brazilfordirinv&d1=20000101&d2=20151231&url2=/india/foreign- direct-investment&title=false&h=300&w=600&ref=/brazil/foreign-direct- investment)

[http://www.tradingeconomics.com/embed/?s=brazilfordirinv&d1=...](http://www.tradingeconomics.com/embed/?s=brazilfordirinv&d1=20000101&d2=20151231&url2=/south- africa/foreign-direct-investment&title=false&h=300&w=600&ref=/brazil/foreign- direct-investment)

<comment><USER6> Decontextualised graphs are not causation!

</comment></comment></comment><comment><USER7> Secret treaties, secret laws, and secret courts making secret decisions all must be stopped. Doesn't matter if it's about trade or surveillance.

<comment><USER8> iI would actually argue that everyone involved in this should be prosecuted for trying to overthrow our democratic system.

</comment></comment><comment><USER9> I thought the investor/state dispute settlement idea was prone to abuse, then I read this:

"secret courts"

Secret Courts? Seriously! We have (mostly) open courts today because we have learned something in the past few thousand years. Let's not go back to the dark ages. This agreement needs to fail!

<comment><USER10> The funny thing to me is that Corporations are trying to enact a form for Corporate Feudalism. They control all the resources, and we the humble workers and consumers are bound to them.

</comment></comment><comment><USER11> Even if you are pro-trade the economics don't make sense. The health cost for dropping EU legislation to ban 31 specific pesticides would be projected to cost more than all the gains TTIP would provide (€160 vs €140 over 12y):

[http://arstechnica.co.uk/tech-policy/2015/05/eu-dropped- plan...](http://arstechnica.co.uk/tech-policy/2015/05/eu-dropped-plans-for- safer-pesticides-because-of-ttip-and-pressure-from-us/)

<comment><USER12> Not a fan of TTIP but Ars got that wrong. The estimated costs are mostly from "endocrine disruptors found in food containers, plastics, furniture, toys, carpeting and cosmetics"

[http://www.theguardian.com/environment/2015/mar/06/health- co...](http://www.theguardian.com/environment/2015/mar/06/health-costs- hormone-disrupting-chemicals-150bn-a-year-europe-says-study)

<comment><USER11> Where was the Ars error? Its seems to say the same as The Guardian article you linked to, or did I miss something?

</comment></comment></comment><comment><USER13> Not cancelled but postponed.

Seems to me they are just waiting until the public forgets about it.

<comment><USER14> They will discuss it and approve it while there is some major event going down. Let's say a complete meltdown of Greece, a natural disaster, more war in the middle east...

<comment><USER15> Maybe a trade agreement would prevent a Greek meltdown by freeing trade opportunities for Greece. The problem in Greece has been too much left wing and not enough economic liberalism.

<comment><USER16> The problem in Greece[1] is a combination of the EU centralizing money but not monetary policy, and the only regulatory tools available being controlled by inflation-phobic germans and the class-specific "put option" they imposed on Greece (et al) with the regressive "austerity" policies.

[1] I recommend this explanation by (Brown University prof. econ.) Mark Blyth: [https://www.youtube.com/watch?v=B6vV8_uQmxs#t=674](https://www.youtube.com/watch?v=B6vV8_uQmxs#t=674)

<comment><USER17> You realize, that we inflation-phobic Germans have only one vote in the ECB and that the ECB is in fact doing everything to get some inflation going. Have you noticed, that the Euro nearly reached the Dollar, while the Fed itself was printing money like crazy?

I realize the horrible situation the Greek people are in, but you cannot just say, that a bit more inflation and a bit less austerity would have solved the thing. Greece had neither an economy that exported anything nor a working administration. Greece could have gotten plenty of EU investment money, they just did not file the papers. How can you expect money invested there to not mysteriously get lost on the way?

I think the idea to couple payment tranches with accomplished reforms was good, but some of the measurements clearly went to far. The core problem is, that we wanted to have them in the EU badly when everything was great, so we were okay with them cheating on the requirements.

I would argue that East-Germany had more substance 1990 than Greece has today. There was a massive investment program and still today East-Germany is not at the level West-Germany is. West-German states are heavily criticizing the systems to support the east. The average German simply does not want to send money to lazy Berliners (which is a German state receiving money from the others and builds airports with it, you might have heard of).

Unfortunately we cannot do the same with Greece, because the required solidarity is just not there yet - and Germany is not really the problem here: There are countries in the EU with lower standards of living that would never accept this. So we kind of have to operate on the living patient here. Get some reforms, invest some money, repeat. Otherwise the emerging far-right parties will take over.

<comment><USER18> _> There are countries in the EU with lower standards of living that would never accept this_

Hiding behind smaller countries is new, but I can understand the German public is running out of excuses to justify their egoism.

Thing is, all this could be solved tomorrow by introducing collective eurobonds (or similar debt-sharing facilities) and making the BCE a real central bank. But that would level the playing field a bit too much for German tastes.

 _> How can you expect money invested there to not mysteriously get lost on the way?_

Their corrupt political class has been swept away. If you don't extend some credit to new recruits who had no responsibility whatsoever in the disaster, when will you ever do it?

 _> Unfortunately we cannot do the same with Greece, because the required solidarity is just not there yet_

Where there is a will, there is a way. A certain fraulein said so herself a few days ago. If you want to do it, you do it. If you don't do it, it's because you don't want to, simple as.

 _> Otherwise the emerging far-right parties will take over._

Newsflash: the german chancellor (a law graduate) is a far-right dude. Jeroen Dijsselbloem (agricultural policy "expert") is well to the right of his Dutch Labour Party, and in fact it's costing them activists.

European economic policy is dominated by right-wing ideas right now. Are you saying we should expect even worse, coming from the North? It wouldn't be the first time.

<comment><USER17> Eurobonds would indeed solve this for small countries, but would effectively lower the overall standard in the long term. They introduce the free rider problem. Why would you ever fix your financial situation if you remove any incentive to do so? I would love to see Eurobonds, right after we introduced a unified tax system. Good luck getting the UK to do that. If we do not do this, we will make the same mistakes again we did as we gave Greece the same currency as the Netherlands, Belgium and Germany.

So lets start with easier tasks and save money by creating a single European military or introduce single European welfare systems, which would lessen the pain, too. These tasks are already hard enough. If you lose the people on this we can forget about it all for a long time.

I think your intentions are good, but your arguments are weak and you are just raging. I would love to see a unified Europe with a unified standard of living, but you cannot simply introduce things. Think about the consequences.

> Their corrupt political class has been swept away.

And now we have a coalition of far-right and far-left wannabe rockstars. The whole administration is still the same, corrupt and to a large extend unable to do its job. I give them that they are trying to poker for their country, but I fear the point the others are fed up with this bullshit, simply ignore them and let them default. The media is more and more telling the story that a so called Grexit would not be that dangerous anymore.

> Newsflash: the german chancellor (a law graduate) is a far-right dude.

The German chancellor is a physics graduate and her party (CDU) moved to the left in the last years. There are effectively 3 social-democratic, center-left parties in Germany right now: The Greens, SPD and CDU. Other than thinking a bit more backwards than the other two, it is all about introducing welfare programs as presents for being elected.

That is why she has been ruling for so long. She effectively crushed the SPD with this strategy: They introduced hard reforms ten years ago and she moved to the left. No there is not enough room between the CDU and the Lefts for the SPD. She simply ignores the AFD to the right of her as they do their best to destroy themselves already and were never an "alternative" \- as their name suggests - for most Germans.

<comment><USER18> _> Eurobonds would indeed solve this for small countries, but would effectively lower the overall standard in the long term._

It's unrealistic to think the whole of Europe will ever have the exact same economic standard as Germany. This doesn't happen even in the US, which have been a proper federal union for more than a century now. If we want a real union, we will have to harmonize things in both directions -- and yes, that means the Germans will have to endure in similar ways as they did when they annexed the DDR. The FED makes economic policy choices to suit the whole federation, not just California or New York.

If this does not suit the German people, then maybe we should just give up the federal project altogether.

 _> So lets start with easier tasks and save money by creating a single European military or introduce single European welfare systems_

The military is already highly integrated through NATO, to the point that the UK for months relied on French capabilities for their naval aircraft carriers, while their own were being repaired or manufactured. If you mean integrating foreign policy, that's much harder than harmonizing a bunch of financial arrangements, because it's the sort of thing the man on the street will have an opinion about: ask a taxi driver what an eurobond is, and he'll just blank out. Same for welfare. Besides, you cannot integrate welfare without common money pools, because welfare is by definition _subsidiary_ : the rich pays for the poor. So if you want an integrated welfare, you need integrated finances, and integrated finances require integrated debt, i.e. eurobonds.

Integrated finance and debt is the next big step for the monetary union, there is no way around it. Most people did not realize this had not been done when the Euro was introduced, and now we're seeing the problems that come from this approach. I like to think that the Maastricht "forefathers" actually expected this to happen and let it be, like Hari Seldon would have done, in the assumption that European elites would inevitably get around the inevitability of certain hard choices once faced with them. It's a more optimist view than thinking they were just idiots.

 _> Good luck getting the UK to do that._

The UK does not belong in a federal EU. They should be kept in a friendly economic zone, but they should be excluded from any decision-taking body, like it should happen for any country not adopting the Euro. Otherwise the fedealist project will forever remain a dream. This I've been saying for 20 years, btw. There is no point trying to keep them in -- England is the unofficial 51st State and will remain so for the foreseeable future. I say that as an European UK resident, so against my best interests, but it's the hard truth. If excluding England means losing the more "europeist" NI, Scotland and EIRE, so be it.

 _> And now we have a coalition of far-right and far-left wannabe rockstars._

Tony Blair _really_ was a wannabe rockstar, and he ended up being the most skillful politician of his generation in the UK, and one of the most influential across the whole of Europe. So let's leave the weak ad-hominem to tabloids please. Besides, there is more economic policy intelligence in one of Varoufakis' fingernails than in you and me combined. You have to face the fact that these guys are actually _good_ : they took a smalltime leftist operation and got them in government. They managed to coopt some of their worst enemies on the right and basically took them out of the game. They tried to build a coalition across countries with similar interests, and the failure there is just due to political weakness on the other side (Hollande is hapless, Renzi has no electoral mandate, and Spain is in the process of changing government), although there is some evidence that they might be coming around the idea of putting pressure on Merkel. If you don't help them now to establish a modern bureaucracy and statehood, you'll condemn Greece back to colony status, with periodic _coup d 'ètat_ and all that. Which would be very dangerous, considering the Russian neoimperialistic approach and eternal instability in the Balkans. But if you make them heroes to their people, making them appear as the saviours of national pride, they will have the political capital to make bolder choices in any area.

 _> The German chancellor is a physics graduate_

Apologies, I got tripped up by UK exceptionalism: I referred to the chancellor in UK terms, i.e. the minister of Finance, Schauble, who is in fact a law graduate and much to the right of Merkel. And if the Merkel coalition is the most social-democratic effort Germany can produce, Europe will soon be a thing of the past.

<comment><USER17> First of all, minor nitpicking, we did not annex the DDR. The DDR has been stolen from us and its people managed to get rid of their oppressors on their own.

> If this does not suit the German people, then maybe we should just give up > the federal project altogether.

Sorry, but that is just fatalistic. Europe will never be the US and does not need to. Germany itself is a federal project with differences among the states. Take the UK, Spain or Belgium for even harsher examples. With these differences even within the European states, you cannot expect them to give away control over economic and fiscal policies without any gain of influence. That is not how democracy works. If my money is spent, I want the right to vote on how it is spent.

I also want the UK in. For hundreds of years Europe's situation was decided by how well its great powers got along with each other. I think the UK is essential for the definition of Europe. Besides that: The UK has virtually no industry left and London is the biggest financial market in Europe. As someone living in Frankfurt I am okay with that. But do you really think the UK does not know, that Germany will not let them leave without taking London away? I recently talked to a German MEP, who said this in nicer terms. I think "Better together" will be nothing compared to the bank sponsored campaign that will be started once the UK actually tries to leave.

> Besides, you cannot integrate welfare without common money pools

That is true, but there are common money pools. Just start to move parts of the welfare systems up one level to the EU and increase their funding.

> Tony Blair really was a wannabe rockstar, and he ended up being the most > skillful politician of his generation in the UK, and one of the most > influential across the whole of Europe.

You might take a look at the disaster that is currently happening in the middle-east, that he and his buddy Bush caused so _skillfully_.

> You have to face the fact that these guys are actually good: they took a > smalltime leftist operation and got them in government. They managed to > coopt some of their worst enemies on the right and basically took them out > of the game. They tried to build a coalition across countries with similar > interests, and the failure there is just due to political weakness on the > other side […] But if you make them heroes to their people, making them > appear as the saviours of national pride, they will have the political > capital to make bolder choices in any area.

You might call the ability to increase once power skillful governing, I think we all learned that we are better of with democratic majorities behind the decision itself instead of the benevolent leader who makes them.

> […] Schauble, who is in fact a law graduate and much to the right of Merkel.

I do not like him either, but because of his former job as Secretary of the Interior [0]. Finally not spending more than you have is an achievement he will be remembered for, even if he was in a unique situation to do it easily.

> And if the Merkel coalition is the most social-democratic effort Germany can > produce, Europe will soon be a thing of the past.

They introduced pension presents for mothers and workers, regulated rent and broker commissions for tenants and introduced a minimum wage in the past two years alone. This is not a defensive argument for Merkels achievements, I could think of much better ways to spend that money, but an argument for the CDUs social-democratic character.

Edit: Forced end of conversation by HN. Nice discussion, we will see how it will work out :)

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

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER19> Public pressure should be enough reason to vote against the treaty, not postpone it until people forget about it.

<comment><USER20> It was postponed, because currently it would not pass due to pressure. So they are buying time for lobbying.

Not that it really matters, because the EC doesn't have to respect the result of the EP vote. It is just symbolic.

<comment><USER21> I'm pretty sure they do have to respect the vote. EU bureaucrats are far too frustrated with the EU parliament for it to be merely symbolic

<comment><USER2> In fact, I'm pretty sure it's the only real power the parliament has - to say "no" once in a while.

</comment></comment></comment></comment><comment><USER22> You do not get legislations like TTIP in smaller democratic circles, its only when the whole political apparatus is too big to be hold accountable. It's them the big top politicians in some far away country in EU that you cannot directly reach that we get this kind legislation.

I am assuming it's also non-governmental think tanks that come up with the ideas that leave us the funny acronym sounding legislations that is not in the public's best interest. Why do they have to draft the proposals in secret if it's good for the public? If you are not ashamed of your actions you show it, if you hide something or lie you are afraid that in the light others might not like what you propose.

The computer analogy would be open source vs closed source or security by obscurity.

<comment><USER23> Why should the size of countries matter in this regard? How small does a country have to be to not succumb to these proceedings? Example 1: CETA, the Canada-EU trade agreement. Basically similar to TTIP, by a country with 35 mio citizens. Example 2: All the trade agreements done in the last 50 years by Germany with smaller countries such as Pakistan. Investor dispute settlement courts have been invented in these trade agreements. I'd argue quite the opposite - the larger one of the entities, the better the outcome for said entity in the talks. What do you think would happen in trade agreement talks between Hungary and the US? You think Hungary would have any weight on its side?

The problem is rather the disproportionate influence of corporations on trade talks through lobbying. That needs to end and there needs to be a complementary influence by NGOs to balance the effects of lobbyists.

<comment><USER21> Pakistan is bigger than Germany. I know, it sounds weird.

</comment></comment></comment><comment><USER24> The very fact, that such a propsal makes it into parliament to be discussed, which is basically a self-castration of power shows how far politics have degenerated. What has a world come to- when you cant even trust the lust of the mighty to be in controll?

<comment><USER25> Some of them might hope for a ticket for the new power base in exchange for their compliance.

</comment></comment><comment><USER26> I'm pessimistic about the chances of TTIP being stopped. For all the public outcry and actions of those brave politicians standing against it, I have a feeling that negotiations will side with the money.

<comment><USER27> Politicians want money so they are able to influence public and get them elected again. Signing this will directly hurt the chances of reelection. That's what is holding them back. if they will lose more voters than get money to compensate for the loss it may not be worth it to take that money for them.

</comment></comment><comment><USER28> Don't worry, they'll get in through the "parliament" sooner or later.

There is too much money at stake.

</comment><comment><USER29> Postponing something like this that would boost the prosperity of both continents is highly irresponsible. Majority of the public can only grasp emotional catchphrases and isn't nearly cognitively capable of grasping the enormous benefits of this important agreement. This is incredibly frustrating, it should have been signed 50 years ago.

<comment><USER30> I don't see any benefit for EU countries here. Also, as long as the papers aren't fully opened for the public, signing them would render our "democracy" here a joke. It's just not acceptable.

Basically this whole thing exists solely to strengthen the power of huge US companies against these "nasty" EU regulations. No thanks, deregulation isn't something we want here.

Even if everything here falls apart regarding connections to the US we would still be humming along just fine in the EU.

<comment><USER29> EU is much poorer than US due to its socialist policies and if you oppose this agreement you wish to rob others EU citizens of prosperity, you should re- examine your tyrannical stance.

US companies run circles around EU companies because US has a freer business environment, although both could learn a lot from Singapore even more.

<comment><USER30> Poor? Measuring what? Yes, the US is much more liberal and stuff, but know what? We have way lower crime rates, much less citizens in prison, good healthcare and education systems for everyone, and average people don't have to work in 3 jobs in parallel to earn a living. And tell me, a german, about how rich the US is, comparing the national dept? Isn't it that China virtually owns a large chunk of the US already due to credits and bonds?

Yes, the top 1% in the US have much more money than the top 1% in EU, but that's it. Oh my god, we also have less startups with boatloads of funding that develop the next big social messenger thingy, or mobile app for optimizing "how to burn through VC". Woo!

Seriously, you lost me with "socialist policies". This is complete bullshit. You have to strike a balance between business greediness and general welfare.

</comment></comment></comment></comment><comment><USER15> It's interesting how the article explains the FUD aspects and not the benefits. There are significant benefits, but you wouldn't know it due to the anti-trade lobby's propaganda to the contrary. I don't have a position in the agreement because I haven't read it, but then again, neither has anyone else; even the U.S. congress can't get ready access to the agreement's text. So we're debating a phantom.

I would be glad if the agreement simply ended tariffs and protectionism. It's completely silly that certain products in the UK cost double the same product in the U.S., even after adjusting for VAT. For example Grivel G12 crampons cost $175 in the U.S. And about £150 in the UK. Things like clothing are hugely more expensive in France than the U.S. (North Face jackets for example.) Hershey's syrup is triple the price than in the U.S. However conversely, Nutella is actually cheaper in the U.S. There are thousands of examples like this. It's funny how a Volkswagen made in the U.S. And sold in the U.S. is less expensive than a Volkswagen made in Germany and sold in Germany.

<comment><USER31> You haven't read it but you know there are significant benefits and that the opposition to it is FUD?</comment></comment>


A garbage collector for C and C++ - <AUTHOR> http://www.hpl.hp.com/personal/Hans_Boehm/gc/

<comment><USER2> I've investigated this for an industrial-strength, large-scale project in the past. It's technologically interesting; to collect, it "stops the world" (freezing all threads but one using, e.g., POSIX signals) and then uses the CPU registers, each thread's stack, and global variables as "roots" to be traversed to find live objects. In a way, this is even more general than just C or C++; it really works for any static language, including assembly. One caveat is that if your code represents pointers in non-obvious ways, the objects referred to will look like garbage to this collector. I'm afraid it's not as unusual as one might hope for low-level code to represent pointers in funny ways...

</comment><comment><USER3> GCC has used garbage collection internally for C for the last 8 years.

<comment><USER4> Cool, this was news to me. I found this link, if anybody else is interested:

<http://gcc.gnu.org/wiki/Memory_management>

</comment></comment><comment><USER5> Is anybody using this? Experiences?

<comment><USER6> ECL (a mature, stable Lisp which compiles to C) uses it.

<comment><USER7> Mono uses it as well.

</comment></comment></comment><comment><USER8> An alternative approach to garbage collection in C++ (precise as opposed to conservative): <http://smieciuch.sourceforge.net/>

<comment><USER9> You can't do precise GC in C++ because you can't find all valid pointers.

Two of the "can't handle" cases are: (1) the XOR trick to represent the prev/next pointer for a doubly-linked list with a single field. (2) Ullman's set set representation which uses an array of values which may, or may not, be valid pointers. You don't know without consulting another structure. (The whole point of this representation is that you don't clear things on initialization.)</comment></comment>


Kim Kardashian's Video Game Is On Track To Earn $200 Million - <AUTHOR> http://www.huffingtonpost.com/2014/07/14/kim-kardashian-video-game-sales-200-million_n_5584780.html

<comment><USER2> She may not be the smartest person, but either Kim K. or someone close to her is a VERY smart businessperson.</comment>


Ask HN: Drop in programming confidence after only a few days off? - <AUTHOR>

I just finished a 3 month programming project a week ago and then was in involved in marketing and administrative duties for a few days.
But the strange thing is, even though I'm using the same technology stack as before for my new project, I've been finding it really hard to get back into programming after this short break.
Maybe it's just because the new project is so different from the previous one that it takes a while to acclimatize. But today I actually resorted to taking some stimulant medication to see if that would help (it did!) because I was starting to feel so shitty about not being able to get the wheels moving.
Does anyone else experience kind of a crisis of confidence when they start a new project (I'm actually resuming a project I had worked on in the fall - but have forgotten most of what I did back then). <comment><USER2> It's probably because the project itself is not interesting (to you).

Try to do something else if you have the choice, or try to make the project interesting if you don't. The last one is harder to do.</comment>


Too Big to Fail: A Call for States' Rights - <AUTHOR> https://outlookzen.wordpress.com/2016/11/17/too-big-to-fail-a-call-for-states-rights/ <comment><USER2> Nice idea but states won't really be independent unless they print their own money.</comment>


Do companies exaggerate about their "culture"? - <AUTHOR> Am I the only one that finds videos like the one here https://vimeo.com/140080082 way over the top and probably insulting at times?  They say things like (01:18) "no one here dares to be average" and "we think differently".  Has Silicon Valley really lost its mind, or have I lost mine? <comment><USER2> All the time. The more mediocre the company/leadership is, the more they talk about their culture.</comment>


Trade-offs in whale design - <AUTHOR> http://blogs.discovermagazine.com/loom/2009/11/24/the-origin-of-big/

<comment><USER2> Arms races. Wonderful elucidation by Dawkins.</comment>


Show HN: Webgo 4.0.7 - <AUTHOR> After ~1.5+ yrs of posting here (https://news.ycombinator.com/item?id=18755996) about webgo, this is an update, the release of v4.0.7. I know a lot of people consider "web frameworks, router etc." a joke/amateur/reinventing the wheel. But I've been able to learn a lot from it and am happy maintaining this package. Hope you like it!
Webgo maintains its promise of standard library compliance, and getting out of the execution path asap. And this version comes with quite a lot of performance improvement in terms of latency, memory usage and better code altogether.
https://github.com/bnkamalesh/webgo <comment><USER2> clickable, [https://github.com/bnkamalesh/webgo](https://github.com/bnkamalesh/webgo)</comment>


Snipcart - <AUTHOR> https://snipcart.com/# <comment><USER2> So, as a web developer, I'm not seeing anything that would inspire confidence regarding someone simply inspecting & changing this data attribute to:

data-item-price="0.01"

I skimmed through the documentation, but didn't see any real mention of this concern. I think it should be highlighted.

Seems that by allowing it to be in markup it might encourage people to be negligent and perhaps miss verifying that the submitted price is correct... maybe I'm missing something here.

<comment><USER3> Presumably they crawl the website on signup and watch out for major changes in price like that?

But, yes, if that's the case then that should be highlighted in the docs.

<comment><USER4> We crawl the page that you specify within the data-item-url attribute.

We validate that no product informations has been altered.

If so, we simply ignore the order and nothing is charged or processed.

<comment><USER5> What happens when products are loaded with JS after the initial load? For example, maybe the user presses a "Load More" button, or the site uses infinite scrolling, etc. Do you guys handle that in any way? I'm not trying to trash your product, I'm just genuinely curious.

<comment><USER4> The markup must be available on the webpage when it loads, but we plan to have JSON endpoints in a very near future, so if the URL that we crawl returns json, we will use it instead of crawling the HTML. It will be documented soon.

</comment></comment></comment></comment></comment><comment><USER6> "IF YOU SELL, WE GET PAID, IF YOU DON'T, WE'RE NOT"

I don't speak Finnish or Russian, but if I was going to offer businesses an ecommerce solution in those countries, I'd be damn sure my copy was grammatically correct.

Not to bust your balls, but we're talking about moving customers' money around - the details matter.

<comment><USER4> Fixed, thanks for your feedback! We are a company from Quebec city so we speak french most of the time!

<comment><AUTHOR> How about "If you don't, neither do we" to avoid the repetition?

</comment></comment></comment><comment><USER7> I'm confused, is the price actually stored in the DOM?

<comment><USER5> Yes, in the documentation they are selling that as a feature.

 _One of the Snipcart 's strength is that you do not have to enter your product inventory anywhere. Most of the time you will always have an inventory somewhere or an existing database, so we did not want to have you duplicate information.

So how does it work? All your product information is stored in the HTML markup._

Kind of a major oversight.

I don't really see much use for this, why give another 2% of your sales away? Stripe is already ridiculously easy to integrate.

<comment><USER4> Yes Stripe is easy to integrate, but we are mostly focusing on frontend developers that want a customizable shopping cart, with all the features like shipping rates calculation, full control on the CSS and a dashboard for their customers with the orders.

</comment></comment></comment><comment><USER8> I don't know about the product, but this site design is very pleasing to my eyes. Nice work.

<comment><USER9> Yeah and currently a nominee on [http://www.awwwards.com/best- websites/snipcart](http://www.awwwards.com/best-websites/snipcart) (this morning batch).</comment></comment>


How Apache Kylin Achieves Precision with Count Distinct - <AUTHOR> https://kyligence.io/blog/how-does-apache-kylin-achieve-precision-with-count-distinct/ <comment><USER2> Kylin is a super cool community. Very supportive and doing some neat stuff with OLAP. If anyone is curious and wants to join us, you can read more about the project here: [http://kylin.apache.org/](http://kylin.apache.org/)</comment>


Amsterdam startup is looking for a Front-end all-rounder - <AUTHOR> http://jobs.37signals.com/jobs/4022

<comment><USER2> Is wakoopa in the old post office tower, with a ping pong table in front of the elevator doors?

<comment><AUTHOR> They used to be, now moved to the old ABN Amro building, downtown. Still have the ping pong table though. ;-)

<comment><USER2> Nice, in that case I accidentally met them when the lift opened on the wrong floor</comment></comment></comment>


How to architecture the ranking of a feed like Quora - <AUTHOR> We are working on a forum-like project where we have to show the answers in a feed just like Quora.
The ranking should converge toward an ordering that is independent of the amount of attention an answer has gotten. This means that sometimes highly upvoted answers will rank below answers with fewer upvotes. As usual, the quality of a writer's previous answers will provide a hint to us about how a new answer should rank, but once we have enough votes on an answer, those become the most important signal for ranking. All of this will mean that new answers can now get to the top very quickly if they are the best.
user (content creator) -- (unique) id -- name -- email -- etc...
user_following -- (unique) id -- user_id
user_content -- (unique) id -- user_id -- post_title -- post_body -- post_created_date -- etc...
user_feed -- (unique) id -- creator_id -- content_id <comment><USER2> With this approach you are going to make it difficult for new writers. You could also consider length of answer, grammar, known vocabulary. Quora seems to also seems to rank recent answers on top for a while until it reaches a view limit. So probably takes rate of up vote as upvote/view count. Instead of taking age of answer you could consider view count .

Have a look at RankSvm if that helps. It would require good amount of data though .</comment>